flmsg-2.0.10/0000775000175000017500000000000012516663374007722 500000000000000flmsg-2.0.10/Makefile.am0000664000175000017500000000043212330516146011661 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src if HAVE_FLUID flgen: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif if DARWIN appbundle: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif if HAVE_NSIS nsisinst: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif #EXTRA_DIST = build-aux/config.rpath flmsg-2.0.10/Makefile.in0000664000175000017500000005656612516663012011716 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL build-aux/config.guess build-aux/config.sub \ build-aux/depcomp build-aux/install-sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLMSG_BUILD_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ FLMSG_BUILD_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ FLMSG_BUILD_LDADD = @FLMSG_BUILD_LDADD@ FLMSG_BUILD_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ FLMSG_VERSION = @FLMSG_VERSION@ FLMSG_VERSION_MAJOR = @FLMSG_VERSION_MAJOR@ FLMSG_VERSION_MINOR = @FLMSG_VERSION_MINOR@ FLMSG_VERSION_PATCH = @FLMSG_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am @HAVE_FLUID_TRUE@flgen: @HAVE_FLUID_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) @DARWIN_TRUE@appbundle: @DARWIN_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) @HAVE_NSIS_TRUE@nsisinst: @HAVE_NSIS_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) #EXTRA_DIST = build-aux/config.rpath # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: flmsg-2.0.10/ChangeLog0000664000175000017500000001644012516662741011416 00000000000000 =Version 2.0.10= 2015-04-25 David Freese 67088e1: mongoose warnings 0faad47: flxmlrpc b7108b6: FSF address =Version 2.0.9= 1c105a4: ICS 213 =Version 2.0.8= ba29425: Web Server Port =Version 2.0.7= 8ac241b: build scripts 8673835: fileselect =Version 2.0.6= 1b24463: fltk 1.3.3 bc38fd2: custom form 774c731: FLDIGI IO Mode Check =Version 2.0.5= 2014-09-07 w1hkj.mint 40d6d2d: build fix 2014-07-11 David Freese a2e6406: User manual update =Version 2.0.4= 2014-06-26 Robert Stiles 17da998: Doxygen Inclusion 2014-04-25 David Freese cea378f: eol-double-quote-escape 7555118: TextArea bug fix ba9d924: NBEMS app dir =Version 2.0.3= 2aafd27: Custom select =Version 2.0.2= 71c8a20: ICS205 template f03328d: Config/Ports f20592c: Max size of textarea a5db8fe: Case independent tags 3772616: Custom html transfer =Version 2.0.1= 16671f6: Radiogram/IARU choices 76bbf35: Custom Forms =Version 2.0= c1c2ca3: Radiogram 0c420d1: CUSTOM Editable 5501f7e: Mongoose =Version 1.1.34= 670249f: HICS203 54b5c0b: Custom forms bb1a85a: CAP cosmetics 5f1046a: Deprecate Fl_Choice c6af6bd: Main menu 9e76837: UI modification 05474ef: ComboBox/ListBox 57dcb9a: Force compression b525348: Transfer time 37cebca: License Declaration 3dfa12a: CAP 48525f7: MARS ineei report 2014-01-28 Robert Stiles 813b0ee: xml_io bug fix 2014-01-28 David Freese 8201deb: ICS 309 csv export ca7a764: UTC date retrofit ca6048b: ICS-309 bug fix 7b76cbd: Mars Navy format bd0c89a: wx reports 0a7d2e9: Thumb drive 9a390bf: MFSK 64L, 128L =Version 1.1.33= 9c7e92f: ICS309 template 004c9ee: UTF-8 3a1c304: MXE build =Version 1.1.32= 48b0a14: ICS 205 update =Version 1.1.31= c0d8584: Plaintext title 26de24c: Binary build 817f111: String_c e524e39: MT63 Mode changes a23e09c: XML status queries ce83233: Args testing 96e3925: CRLF boogy man 89ff39a: ICS205 update =Version 1.1.30= 2338416: Argument parsing 2a21108: ICS 309 021df66: Control cursor 67f79b2: THOR mode update 800415a: MODES =Version 1.1.29= 2012-11-10 Dave Freese (none) 971b968: Socket interface 2012-11-03 David Freese 1f04a18: HICS-213 db9b2ab: IN/EEI report =Version 1.1.28= 0299cbd: MS thumbdrive 7ac87a6: Mars IN/IEE =Version 1.1.27= 7863b9b: CSV Import 67877bd: Modes Combo Init c2d47fb: IARU bug fix 400f9ef: Templates 4dfe37f: OS X Lion bug fix 3004815: Modes table 99c90f6: LZMA compression 82320e2: Estimate button =Version 1.1.26= eb563ba: MT63 size estimate 9d09a9e: EXP Mode Table =Version 1.1.25= 855bc4e: Linked Modes Table a8f8056: Wrap corrections =Version 1.1.24= 059f3ea: Base 128/256 d0cd678: File transfer c44002c: waiting for check 0c6a1b1: Xmlrpc interface c9d4204: Combo box update ae494f2: Socket address/port c9fe25b: MARS edit cursor =Version 1.1.23= 4d366b3: CSV table view cc47029: Compression 652ff62: Hurricane report =Version 1.1.22= 05e6c32: Socket interface 213fdee: Autosave menu 07a1e5a: Non Standard Radiogram ccecd3e: Autosend test aad7d27: CSV templates a75eba1: Tango pixmaps =Version 1.1.21= 2012-06-30 Kamal Mostafa 6f601bb: Tango icon pixmaps update to version 0.8.90 (public domain) =Version 1.1.20= 2012-06-16 David Freese e12c7b9: Corrupt correction =Version 1.1.19= e59025f: Fork header reference f4a3c8c: Corrupt filenames =Version 1.1.18= 1771972: OS X --p failure =Version 1.1.17= f5f31d8: Unwrapfile 4c792b6: CRC16 38dfa8d: Apple file drop cef4a2f: OS X fileselect =Version 1.1.16= 66498a8: Command line processing 3f9a0cc: UNCLAS =Version 1.1.15= a3a8ea9: IARU header 21b8eb7: Auto open d6cc867: MARS e365061: Radiogram edits a20e8f9: Text Edit 7e3aeed: Check my_call =Version 1.1.14= 1a843f5: Widget size corrections ab2e120: FTextView 4eac069: Cast fix ee8f62a: Personal data 69a6934: Control fields 85b18f0: MARS Army msg deaffce: REDX 5739A-B edc03fe: Default folders 3649e03: Red Cross 5739 997f148: Menu Paradigm 7d592d0: Desktop 709bbb4: Event Log =Version 1.1.13= 50865cd: Event log 02230e6: Fl::lock 6482b49: Text Edit revision 6cf85c1: FLTK version 66185d9: Debug revision cd790b5: fltk-1.3 mods =Version 1.1.12= 5796660: Escape sequence =Version 1.1.11= b966442: Word wrap 32a9465: flnfc_common location 4f8e907: HICS-213 fix =Version 1.1.10= 76301d5: Html fonts 57c7a40: ARRL radiogram 44d5253: IARU 19f48d1: ICS-213 template 1638f75: ICS206 correction d556b4b: Auto-dir 4ce46ca: HICS 7839a4f: Reorg 3415e1b: Preformatted text ffcd62e: FLMSG default folder =Version 1.1.9= a137449: Radio text output a018b5b: Save and well =Version 1.1.8= bd5cc51: Unwrap failure 0c93153: Cosmetics =Version 1.1.7= 039b59a: MARS TO-FM fields a71886c: Red Cross b758293: Army MARS std msg baa51ca: MARS precedence 23ed763: NAVY MARS msg 1c9a27d: RedCross SnW form f6df72d: ARRL html format e97c134: Date-Time e1d88ff: ARL message 2055167: navy mars 363e9c2: MARS messages =Version 1.1.6= 8c2abe9: Escaped chars =Version 1.1.5= ed019ec: Template mods for IE =Version 1.1.4= 86a1a70: Template corrections debae23: Open flmsg with browser cddab92: Fix LDFLAGS 50b9852: Template simplfication =Version 1.1.3= bc1502f: ICS205A update f7269e9: Print exit b270dd9: Command line import filename e652355: Missing files in repository =Version 1.1.2= 8426e70: ICS205a ac93d65: OS X dnd =Version 1.1.1= 9648b9a: Files-folders 531905d: Open on wrap export fc882fd: Drop Box 01efd8e: ICS214 clear form 3f95181: File Select-Naming 25d52b3: ICS 216 f18370e: ICS214 d9b0cfd: ICS forms update =Version 1.1.0= ad8f280: Type depunned pointer aaae41e: Ignore UNWRAP errors 38b1a12: Radiogram Autoincrement 4490346: ICS 203 48f5c2b: Default tab 52a4fcd: Common code 6695d2b: ICS-206 7c5eb23: ICS 205 e4839af: Plain text etal =Version 1.0.6= 692a5a1: ARL Field Separator =Version 1.0.5= 610e4c0: Radiogram Autosave =Version 1.0.4= d80946b: Create filename fix c1d7016: Wrap extract =Version 1.0.3= e0eecf4: Wrap Import Failure c8ef359: Filename Auto Create 2a0784a: Open Files =Version 1.0.2= 673d7f0: Bug fixes 8f30b53: Documentation update =Version 1.0.1= 329d437: Write Empty Radiogram =Version 1.0.0= 4173931: ICON update =Version 0.9.12= 47e1b4a: Radiogram CK =Version 0.9.11= e0f4cd4: Data File =Version 0.9.10= c57ec98: Radiogram 008e5ac: Combo widget =Version 0.9.09= 83420c8: ICS-213 Text Output 3e3aeca: Wrap Auto Extract 00567d7: Radiogram formating =Version 0.9.08= 7b517a1: RTF output f6388c4: Radiogram =Version 0.9.07= =Version 0.9.06= 269f8d1: ARRL Radiogram =Version 0.9.05= 2f8997b: Radiogram update 11ce565: FLMSG =Version 1.0.21= ba5af37: MSDOS file format =Version 1.0.2= 8d22545: QForm import =Version 1.0.1= 53f9b23: Date format cdd1107: NBEMS default directory 61e3062: Missing files =Version 0.3.4= cfc5deb: Program configuration =Version 0.3.3= 0a2652b: Build Failure on Ubuntu 9.10 =Version 0.3.2= f0a6d83: Wrapped file extension =Version 0.3.1= 38269a5: Auto Send Extension 40f5c13: OS X mods =Version 0.3.0= flmsg-2.0.10/COPYING0000664000175000017500000004313312330516146010665 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. flmsg-2.0.10/AUTHORS0000664000175000017500000000021512330516146010674 00000000000000AUTHOR: Dave Freese CALLSIGN: W1HKJ EMAIL: w1hkj@w1hkj.com Author can be contacted on the linuxham yahoo group EMAIL: linuxham@yahoo.com flmsg-2.0.10/aclocal.m40000664000175000017500000011763312516663006011505 00000000000000# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/build.m4]) m4_include([m4/debug.m4]) m4_include([m4/fltk.m4]) m4_include([m4/funcs.m4]) m4_include([m4/macosx.m4]) m4_include([m4/np-compat.m4]) m4_include([m4/opt.m4]) m4_include([m4/pkg-config.m4]) m4_include([m4/static.m4]) m4_include([m4/win32.m4]) flmsg-2.0.10/README0000664000175000017500000000067112330516146010512 00000000000000flmsg is a editor / file management tool for ics213 forms which form the basis for emergency communications data transfers. The latest version can always be found at: http://www.w1hkj.com/ Join the linuxham, NBEMSham or win-fldigi Yahoo group for support, news and updates on W1HKJ software: http://groups.yahoo.com/group/linuxham/join http://groups.yahoo.com/group/NBEMSham/join http://groups.yahoo.com/group/win-fldigi/join flmsg-2.0.10/src/0000775000175000017500000000000012516663375010512 500000000000000flmsg-2.0.10/src/transfer/0000775000175000017500000000000012516663375012336 500000000000000flmsg-2.0.10/src/transfer/transfer_tab.cxx0000664000175000017500000000436612330516146015450 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "transfer.h" #include "combo.h" Fl_Group *tab_transfer = (Fl_Group *)0; Fl_Button *btn_select_send = (Fl_Button *)0; Fl_Button *btn_save_rcvd = (Fl_Button *)0; Fl_Output *txt_send_filename = (Fl_Output *)0; Fl_Output *txt_rcvd_filename = (Fl_Output *)0; static void cb_btn_select_send(Fl_Button*, void*) { cb_transfer_open(); } static void cb_btn_save_rcvd(Fl_Button*, void*) { cb_transfer_save_as(); } void create_transfer_tab() { tab_transfer = new Fl_Group(0, tab_top, 570, 430 - tab_top); tab_transfer->align(FL_ALIGN_TOP); txt_send_filename = new Fl_Output(5, tab_top + 50, 485, 24, _("Transmit file:")); txt_send_filename->align(FL_ALIGN_TOP_LEFT); txt_send_filename->tooltip(""); btn_select_send = new Fl_Button(495, tab_top + 50, 70, 24, _("Select")); btn_select_send->tooltip(_("Select data file to transfer")); btn_select_send->callback((Fl_Callback*)cb_btn_select_send); txt_rcvd_filename = new Fl_Output(5, tab_top + 120, 485, 24, _("Received file:")); txt_rcvd_filename->align(FL_ALIGN_TOP_LEFT); txt_rcvd_filename->tooltip(""); btn_save_rcvd = new Fl_Button(495, tab_top + 120, 70, 24, _("Save")); btn_save_rcvd->tooltip(_("Export data to file")); btn_save_rcvd->callback((Fl_Callback*)cb_btn_save_rcvd); tab_transfer->end(); tab_transfer->hide(); } flmsg-2.0.10/src/transfer/transfer.cxx0000664000175000017500000001437712330516146014625 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #include "icons.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include "transfer.h" using namespace std; string transfer_buffer = ""; string def_transfer_filename = ""; string base_transfer_filename = ""; const char xfrstr[] = "\n"; void clear_transfer_form() { txt_send_filename->value(""); txt_rcvd_filename->value(""); show_filename(""); transfer_buffer.clear(); btn_save_rcvd->color(FL_BACKGROUND_COLOR); } void read_transfer_buffer(string data) { size_t p1 = data.find(xfrstr); if (p1 != string::npos) p1 += strlen(xfrstr); data.erase(0, p1); transfer_buffer = data; read_header(data); } void cb_transfer_new() { clear_transfer_form(); def_transfer_filename = XFR_dir; show_filename(def_transfer_filename); clear_estimate(); } void cb_transfer_import() { fl_alert2("Not implemented"); } void cb_transfer_export() { fl_alert2("Not implemented"); } void cb_transfer_wrap_import(string wrapfilename, string inpbuffer) { clear_transfer_form(); read_transfer_buffer(inpbuffer); def_transfer_filename = XFR_dir; def_transfer_filename.append(wrapfilename); txt_rcvd_filename->value(def_transfer_filename.c_str()); btn_save_rcvd->color(FL_RED); } int eval_transfer_fsize() { if (transfer_buffer.empty()) return 0; Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(fl_filename_name(def_transfer_filename.c_str())).append("]"); evalstr.append(header("")); string outbuf(transfer_buffer); if (outbuf.empty()) return 0; compress_maybe( outbuf, true ); evalstr.append( outbuf ); string ck = chksum.scrc16(evalstr); evalstr.append("[WRAP:chksum ").append(ck).append("][WRAP:end]"); return evalstr.length(); } void cb_transfer_wrap_export() { if (transfer_buffer.empty()) return; string wrapfilename = WRAP_send_dir; base_transfer_filename = fl_filename_name(def_transfer_filename.c_str()); wrapfilename.append(base_transfer_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); string fbuff(header("")); string outbuf(transfer_buffer); compress_maybe(outbuf, true); fbuff.append(outbuf); export_wrapfile(base_transfer_filename, wrapfilename, fbuff, pext != WRAP_EXT); } } void cb_transfer_wrap_autosend() { if (transfer_buffer.empty()) return; update_header(FROM); string fbuff(header("")); string outbuf(transfer_buffer); compress_maybe(outbuf, true); fbuff.append(outbuf); xfr_via_socket(fl_filename_name(def_transfer_filename.c_str()), fbuff); } void cb_transfer_load_template() { fl_alert2("Not implemented"); } void cb_transfer_save_template() { fl_alert2("Not implemented"); } void cb_transfer_save_as_template() { fl_alert2("Not implemented"); } void cb_transfer_open() { const char *p = FSEL::select(_("Open file"), "transfer\t*", def_transfer_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_transfer_form(); def_transfer_filename = p; txt_send_filename->value(def_transfer_filename.c_str()); transfer_buffer.clear(); FILE *dfile = fopen(p, "rb"); if (!dfile) { txt_send_filename->value(""); transfer_buffer.clear(); return; } fseek(dfile, 0, SEEK_END); size_t fsize = ftell(dfile); if (fsize <= 0) return; fseek(dfile, 0, SEEK_SET); transfer_buffer.resize(fsize); size_t r = fread((void *)transfer_buffer.c_str(), 1, fsize, dfile); fclose(dfile); if (r != fsize) { txt_send_filename->value(""); transfer_buffer.clear(); return; } estimate(); } void write_transfer(string s) { return; } bool cb_transfer_save_as() { if (transfer_buffer.empty()) return false; const char *p; btn_save_rcvd->color(FL_BACKGROUND_COLOR); p = FSEL::saveas(_("Save file"), "received\t*", def_transfer_filename.c_str()); if (!p) return false; FILE *binfile = fopen(p, "wb"); if (binfile) { fwrite(transfer_buffer.c_str(), transfer_buffer.length(), 1, binfile); fclose(binfile); } cb_transfer_new(); return true; } void cb_transfer_save() { cb_transfer_save_as(); } void cb_transfer_msg_type() { if (tabs_msg_type->value() == tab_transfer ) { show_filename(def_transfer_filename); } else { show_filename(def_rg_filename); } } void cb_transfer_html() { fl_alert2("Not implemented"); } void cb_transfer_textout() { fl_alert2("Not implemented"); } void cb_transfer_import_data() { fl_alert2("Not implemented"); } void cb_transfer_export_data() { fl_alert2("Not implemented"); } flmsg-2.0.10/src/Makefile.am0000664000175000017500000002356212516201752012461 00000000000000# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) bin_PROGRAMS = flmsg MINGW32_SRC = flmsg-rc.rc include/flmsgrc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flmsg_SOURCES = $(FLMSG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) flmsg_SOURCES = if !ENABLE_FLXMLRPC flmsg_SOURCES += $(XMLRPCPP_SRC) flmsg_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ flmsg_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ flmsg_CFLAGS = $(flmsg_CXXFLAGS) flmsg_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ flmsg_LDADD = @FLMSG_BUILD_LDADD@ else flmsg_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ flmsg_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ flmsg_CFLAGS = $(flmsg_CXXFLAGS) flmsg_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ flmsg_LDADD = @FLMSG_BUILD_LDADD@ endif if MINGW32 if HAVE_WINDRES flmsg_SOURCES += $(MINGW32_SRC) endif endif ######################################################################## FLMSG_VERSION_MAJOR = @FLMSG_VERSION_MAJOR@ FLMSG_VERSION_MINOR = @FLMSG_VERSION_MINOR@ FLMSG_VERSION_PATCH = @FLMSG_VERSION_PATCH@ FLMSG_VERSION = @FLMSG_VERSION@ .EXPORT_ALL_VARIABLES: nsisinst appbundle # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flmsg_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) CLEAN_LOCAL = if MINGW32 if HAVE_WINDRES .rc.o: $(WINDRES) -Iinclude -I../data/win32 $< -O coff $@ endif endif install-data-local: if test -f ../data/flmsg.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) ../data/flmsg.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f ../data/flmsg.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) ../data/flmsg.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flmsg.xpm rm -f $(DESTDIR)/$(datadir)/applications/flmsg.desktop # FL_SRC = flmsg_dialog.fl if HAVE_FLUID flgen: $(FL_SRC) (cd include; \ for f in $(FL_SRC); do \ c=$${f%.fl}.cxx; \ h=$${f%.fl}.h; \ h=$${h##*/}; \ $(FLUID) -c -o ../$$c -h $$h ../$$f; \ done) endif INSTALLER_FILE = flmsg-$(FLMSG_VERSION)_setup.exe APPBUNDLE=flmsg-$(FLMSG_VERSION) APPBUNDLE_NOLIBS=$(APPBUNDLE)-nolibs if HAVE_NSIS nsisinst: $(bin_PROGRAMS) sh ../scripts/mknsisinst.sh "../data" . CLEANFILES += $(INSTALLER_FILE) endif if DARWIN appbundle: $(bin_PROGRAMS) sh ../scripts/mkappbundle.sh "../data" . CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg endif clean-local: -rm -rf $(CLEAN_LOCAL) # Sources that we build. It is OK to have headers here. flmsg_SOURCES += \ blank-dnd/baddata_templates.cxx \ blank-dnd/blank.cxx \ blank-dnd/blank_tab.cxx \ blank-dnd/blank_templates.cxx \ blank-dnd/dnd_tab.cxx \ cap/cap105.cxx \ cap/cap105_tab.cxx \ cap/cap110.cxx \ cap/cap110_tab.cxx \ cap/cap_templates.cxx \ csv/csv.cxx \ csv/csv_tab.cxx \ csv/csv_templates.cxx \ csv/csv_table.cxx \ custom/custom.cxx \ custom/custom_tab.cxx \ custom/custom_templates.cxx \ include/custom.h \ flmsg.cxx \ flmsg_dialog.cxx \ iaru/iaru.cxx \ iaru/iaru_tab.cxx \ iaru/iaru_templates.cxx \ ics/ics203.cxx \ ics/ics205.cxx \ ics/ics205a.cxx \ ics/ics206.cxx \ ics/ics213.cxx \ ics/ics214.cxx \ ics/ics216.cxx \ ics/ics309.cxx \ ics/ics_tab.cxx \ ics/ics203_tab.cxx \ ics/ics205_tab.cxx \ ics/ics205a_tab.cxx \ ics/ics206_tab.cxx \ ics/ics213_tab.cxx \ ics/ics214_tab.cxx \ ics/ics216_tab.cxx \ ics/ics309_tab.cxx \ ics/ics203_templates.cxx \ ics/ics205_templates.cxx \ ics/ics205a_templates.cxx \ ics/ics206_templates.cxx \ ics/ics213_templates.cxx \ ics/ics214_templates.cxx \ ics/ics216_templates.cxx \ ics/ics309_templates.cxx \ hics/hics_tab.cxx \ hics/hics203.cxx \ hics/hics203_tab.cxx \ hics/hics203_templates.cxx\ hics/hics206.cxx \ hics/hics206_tab.cxx \ hics/hics206_templates.cxx\ hics/hics213.cxx \ hics/hics213_tab.cxx \ hics/hics213_templates.cxx\ hics/hics214.cxx \ hics/hics214_tab.cxx \ hics/hics214_templates.cxx\ lzma/Alloc.h \ lzma/Alloc.c \ lzma/LzFind.c \ lzma/LzFind.h \ lzma/LzHash.h \ lzma/LzmaDec.c \ lzma/LzmaDec.h \ lzma/LzmaEnc.c \ lzma/LzmaEnc.h \ lzma/LzmaLib.c \ lzma/LzmaLib.h \ lzma/Types.h \ mars/mars_tab.cxx \ mars/mars_daily.cxx \ mars/mars_ineei.cxx \ mars/mars_net.cxx \ mars/mars_daily_tab.cxx \ mars/mars_ineei_tab.cxx \ mars/mars_net_tab.cxx \ mars/mars_army.cxx \ mars/mars_army_tab.cxx \ mars/mars_navy.cxx \ mars/navy_mars_tab.cxx \ mars/mars_templates.cxx \ plaintext/plaintext.cxx \ plaintext/plaintext_tab.cxx \ plaintext/plaintext_templates.cxx \ radiogram/arl_msgs.cxx \ radiogram/hx_msgs.cxx \ radiogram/radiogram.cxx \ radiogram/radiogram_tab.cxx \ radiogram/radiogram_templates.cxx \ redx/redx_tab.cxx \ redx/redx_snw.cxx \ redx/redx_snw_tab.cxx \ redx/redx_snw_template.cxx \ redx/redx_5739.cxx \ redx/redx_5739_tab.cxx \ redx/redx_5739A.cxx \ redx/redx_5739A_tab.cxx \ redx/redx_5739B.cxx \ redx/redx_5739B_tab.cxx \ redx/redx_5739_template.cxx \ transfer/transfer.cxx \ transfer/transfer_tab.cxx \ custom/custom_transfer_tab.cxx \ utils/base64.cxx \ utils/base128.cxx \ utils/base256.cxx \ utils/debug.cxx \ utils/ext_string.cxx \ utils/mongoose.c \ utils/parse_xml.cxx \ utils/socket.cxx \ utils/status.cxx \ utils/timeops.cxx \ utils/time_table.cxx \ utils/threads.cxx \ utils/util.cxx \ utils/wrap.cxx \ utils/xml_io.cxx \ widgets/calendar.cxx \ widgets/combo.cxx \ widgets/date.cxx \ widgets/fileselect.cxx \ widgets/flinput2.cxx \ widgets/flslider2.cxx \ widgets/Fl_Text_Buffer_mod.cxx \ widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx \ widgets/Fl_Native_File_Chooser.cxx \ widgets/FTextView.cxx \ widgets/icons.cxx \ widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx \ widgets/font_browser.cxx \ wx/hurricane.cxx \ wx/hurricane_tab.cxx \ wx/hurricane_template.cxx \ wx/severe_wx.cxx \ wx/severe_wx_tab.cxx \ wx/severe_wx_template.cxx \ wx/wx_strings.cxx \ wx/storm_report.cxx \ wx/storm_report_tab.cxx \ wx/storm_report_template.cxx # wx/storm_report.cxx # wx/storm_report_template.cxx EXTRA_DIST = # Additional source files that are distributed EXTRA_DIST += \ config.h \ utils/mingw.c \ widgets/flnfc_common.cxx \ widgets/Fl_Native_File_Chooser_FLTK.cxx \ widgets/Fl_Native_File_Chooser_MAC.cxx \ widgets/Fl_Native_File_Chooser_WIN32.cxx \ include/arl_msgs.h \ include/ascii.h \ include/base64.h \ include/base128.h \ include/base256.h \ include/calendar.h \ include/cap.h \ include/combo.h \ include/compat.h \ include/compat-mingw.h \ include/crc16.h \ include/date.h \ include/debug.h \ include/dirent-check.h \ include/ext_string.h \ include/fileselect.h \ include/fl_lock.h \ include/flmisc.h \ include/flmsg_config.h \ include/flmsgrc.h \ include/flinput2.h \ include/flslider2.h \ include/font_browser.h \ include/gettext.h \ include/hx_msgs.h \ include/iaru.h \ include/icons.h \ include/flmsg.h \ include/flmsg_dialog.h \ include/mongoose.h \ include/socket.h \ include/templates.h \ include/mingw.h \ include/parse_xml.h \ include/pixmaps.h \ include/status.h \ include/threads.h \ include/timeops.h \ include/time_table.h \ include/transfer.h \ include/util.h \ include/wrap.h \ include/wx_strings.h \ include/xml_io.h \ widgets/missing_strings.c \ widgets/Fl_Text_Buffer_mod_1_1.cxx \ widgets/Fl_Text_Buffer_mod_1_3.cxx \ widgets/Fl_Text_Display_mod_1_1.cxx \ widgets/Fl_Text_Display_mod_1_3.cxx \ widgets/Fl_Text_Editor_mod_1_1.cxx \ widgets/Fl_Text_Editor_mod_1_3.cxx \ include/Fl_Text_Buffer_mod.H \ include/Fl_Text_Buffer_mod_1_1.H \ include/Fl_Text_Buffer_mod_1_3.H \ include/Fl_Text_Display_mod.H \ include/Fl_Text_Display_mod_1_1.H \ include/Fl_Text_Display_mod_1_3.H \ include/Fl_Text_Editor_mod.H \ include/Fl_Text_Editor_mod_1_1.H \ include/Fl_Text_Editor_mod_1_3.H \ include/FTextView.h \ include/FL/Fl_Native_File_Chooser_FLTK.H \ include/FL/Fl_Native_File_Chooser_MAC.H \ include/FL/Fl_Native_File_Chooser.H \ include/FL/Fl_Native_File_Chooser_WIN32.H \ include/blank.h \ include/csv.h \ include/missing_strings.h \ include/plaintext.h \ include/radiogram.h \ flmsg_dialog.cxx # Additional non-source files that are distributed EXTRA_DIST += \ ../data/template.rtf \ html_templates/blank_template.html \ html_templates/ics203_template.html \ html_templates/ics205_template.html \ html_templates/ics205a_template.html \ html_templates/ics206_template.html \ html_templates/ics213_templates.html \ html_templates/ics214_templates.html \ html_templates/ics216_templates.html \ html_templates/plaintext_template.html \ html_templates/radiogram_fc_template.html \ html_templates/radiogram_template.html \ html_templates/mars_daily.html \ html_templates/mars_ineei.html \ html_templates/mars_net.html # Additional source files that support non-Linux cross compilation EXTRA_DIST += \ ../data/flmsg.desktop \ ../data/flmsg.xpm \ ../data/win32/fl_app.nsi \ ../data/win32/flmsg.ico \ ../scripts/build4mingw.sh \ ../scripts/builddist.sh \ ../scripts/mkappbundle.sh \ ../scripts/mknsisinst.sh \ ../data/mac/Info.plist.in \ ../data/mac/flmsg.icns \ $(FLMSG_WIN32_SRC) \ $(FLMSG_FL_SRC) flmsg-2.0.10/src/html_templates/0000775000175000017500000000000012516663375013534 500000000000000flmsg-2.0.10/src/html_templates/ics205a_template.html0000664000175000017500000001332112330516146017366 00000000000000 :TITLE:
1. Incident name
:inc:
2.From:
:dfm: :tfm:
3.To:
:dto: :tto:
COMMUNICATIONS LIST
(ICS-205A)
4. Basic Local Communications Info

Assignment

Name

Methods of Contact
(radio frequency, phone, pager, cell, etc.)
:asg[0]::nam[0]::inf[0]:
:asg[1]::nam[1]::inf[1]:
:asg[2]::nam[2]::inf[2]:
:asg[3]::nam[3]::inf[3]:
:asg[4]::nam[4]::inf[4]:
:asg[5]::nam[5]::inf[5]:
:asg[6]::nam[6]::inf[6]:
:asg[7]::nam[7]::inf[7]:
:asg[8]::nam[8]::inf[8]:
:asg[9]::nam[9]::inf[9]:
:asg[10]::nam[10]::inf[10]:
:asg[11]::nam[11]::inf[11]:
:asg[12]::nam[12]::inf[12]:
:asg[13]::nam[13]::inf[13]:
:asg[14]::nam[14]::inf[14]:
:asg[15]::nam[15]::inf[15]:
:asg[16]::nam[16]::inf[16]:
:asg[17]::nam[17]::inf[17]:
:asg[18]::nam[18]::inf[18]:
:asg[19]::nam[19]::inf[19]:
:asg[20]::nam[20]::inf[20]:
:asg[21]::nam[21]::inf[21]:
:asg[22]::nam[22]::inf[22]:
:asg[23]::nam[23]::inf[23]:
:asg[24]::nam[24]::inf[24]:
:asg[25]::nam[25]::inf[25]:
:asg[26]::nam[26]::inf[26]:
:asg[27]::nam[27]::inf[27]:
:asg[28]::nam[28]::inf[28]:
:asg[29]::nam[29]::inf[29]:
:asg[30]::nam[30]::inf[30]:
:asg[31]::nam[31]::inf[31]:
5. Prepared by:
:pre:
Position/Title:
:pos:
Date time:
:dtm:
ICS-205AIAP PageSignature:

flmsg-2.0.10/src/html_templates/plaintext_template.html0000664000175000017500000000134512330516146020233 00000000000000 :TITLE:
:tt:
TO: :to:
FROM: :fm:
SUBJ: :sb:
DATE: :dt:
TIME: :tm:
MESSAGE:
:mg:
flmsg-2.0.10/src/html_templates/mars_net.html0000664000175000017500000000142412330516146016136 00000000000000 :TITLE:
MARS NET REPORT

DE    :de:  :nbr:
:prec: :dtg:
FM :fmname: :fmcall: :fmstate:
TO :topos:/:tocall: :tostate:
INFO :info1pos:/:info1call: :info1state:
BT
:incident:
SUBJECT: NET REPORT :dnd:
1. :netcall:
2. :dtgstart: :dtgend:
3. :netsb:
4. :ncscall:
5. :nbrstas:, :calls:
6. NA
7. A. :nbrmsgs:
   B. :comments:
:incident:
BT
/EX
NNNN
flmsg-2.0.10/src/html_templates/radiogram_fc_template.html0000664000175000017500000000611412330516146020637 00000000000000 radiogram-file-copy
THE AMERICAN RADIO RELAY LEAGUE
RADIOGRAM
VIA AMATEUR RADIO
NUMBER PRECEDENCE HX STATION OF ORIGIN CHECK PLACE OF ORIGIN TIME FILED DATE
:nbr: :prec: :hx: :sta: :ck: :org: :t1: :d1:
TO
:to:
THIS RADIO MESSAGE WAS RECEIVED AT
:rx:
PHONE NUMBER
:tel:
:msg:
:sig:

ORIG - FROM / DATE/TIME
:ori:

DLVD - to / DATE/TIME
:dlv:

flmsg-2.0.10/src/html_templates/radiogram_template.html0000664000175000017500000000722112330516146020167 00000000000000 radiogram
THE AMERICAN RADIO RELAY LEAGUE
RADIOGRAM
VIA AMATEUR RADIO
NUMBER PRECEDENCE HX STATION OF ORIGIN CHECK PLACE OF ORIGIN TIME FILED DATE
:nbr: :prec: :hx: :sta: :ck: :org: :t1: :d1:
TO
:to:
THIS RADIO MESSAGE WAS RECEIVED AT
:rx:
PHONE NUMBER
:tel:
:msg:
:sig:

:exp:

flmsg-2.0.10/src/html_templates/blank_template.html0000664000175000017500000000057312330516146017314 00000000000000 :TITLE:
:mg:
flmsg-2.0.10/src/html_templates/ics205_template.html0000664000175000017500000000545712330516146017240 00000000000000 :TITLE:
INCIDENT RADIO
COMMUNICATIONS PLAN
1. Incident Name
:nam:
2. Date/Time Prepared
:dt1:
3. Operational Period Date/Time
:dt2:
4. Basic Radio Channel Utilization
System
Cache
Channel
Function
Frequency
Tone
Assignment
Remarks
:typ0:
:chn0:
:fun0:
:frq0:
:ass0:
:rem0:
:typ1:
:chn1:
:fun1:
:frq1:
:ass1:
:rem1:
:typ2:
:chn2:
:fun2:
:frq2:
:ass2:
:rem2:
:typ3:
:chn3:
:fun3:
:frq3:
:ass3:
:rem3:
:typ4:
:chn4:
:fun4:
:frq4:
:ass4:
:rem4:
:typ5:
:chn5:
:fun5:
:frq5:
:ass5:
:rem5:
:typ6:
:chn6:
:fun6:
:frq6:
:ass6:
:rem6:
:typ7:
:chn7:
:fun7:
:frq7:
:ass7:
:rem7:
5. Prepared by (Communications unit)
:prp:
flmsg-2.0.10/src/html_templates/ics214_templates.html0000664000175000017500000001015112330516146017406 00000000000000 :TITLE:
UNIT LOG
1. Incident name
:inc:
2.Date Prepared
:dat:
3.Time Prepared
:tim:
4. Unit Name / Designatiors
:und:
5. Unit leader (Name and Position)
:unl:
6. Operational Period
:opp:
7. Personnel Roster Assigned
Name
ICS Position
Home Base
:nam[0]::pos[0]::hom[0]:
:nam[1]::pos[1]::hom[1]:
:nam[2]::pos[2]::hom[2]:
:nam[3]::pos[3]::hom[3]:
:nam[4]::pos[4]::hom[4]:
:nam[5]::pos[5]::hom[5]:
:nam[6]::pos[6]::hom[6]:
:nam[7]::pos[7]::hom[7]:
:nam[8]::pos[8]::hom[8]:
:nam[9]::pos[9]::hom[9]:
:nam[10]::pos[10]::hom[10]:
:nam[11]::pos[11]::hom[11]:
:nam[12]::pos[12]::hom[12]:
:nam[13]::pos[13]::hom[13]:
:nam[14]::pos[14]::hom[14]:
:nam[15]::pos[15]::hom[15]:
8. Activity Log
Time
Major Events
:at[0]::ev[0]:
:at[1]::ev[1]:
:at[2]::ev[2]:
:at[3]::ev[3]:
:at[4]::ev[4]:
:at[5]::ev[5]:
:at[6]::ev[6]:
:at[7]::ev[7]:
:at[8]::ev[8]:
:at[9]::ev[9]:
:at[10]::ev[10]:
:at[11]::ev[11]:
:at[12]::ev[12]:
:at[13]::ev[13]:
:at[14]::ev[14]:
:at[15]::ev[15]:
9. Prepared by (Name and Position)
:pre:
ICS-214
flmsg-2.0.10/src/html_templates/ics213_templates.html0000664000175000017500000000261112330516146017407 00000000000000 :TITLE:

GENERAL MESSAGE

(ics-213)

TO: :to:
POSITION: :p1:
FROM: :fm:
POSITION: :p2:
SUBJ: :sb:
DATE: :d1:
TIME: :t1:
MESSAGE:
:mg:
SIGNATURE: :s1:
POSITION: :p3:
REPLY:
:rp:
DATE:
:d2:
TIME:
:t2:
SIGNATURE/POSITION:
:s2: / :p4:

flmsg-2.0.10/src/html_templates/ics216_templates.html0000664000175000017500000001371012330516146017414 00000000000000 :TITLE:
RADIO REQUIREMENTS WORKSHEET
1. Incident name
:inc:
2.Date Prepared
:dat:
3.Time Prepared
:tim:
4. Branch
:br:
5. Agency
:agc:
6. Operational Period
:opp:
7. Tactical Frequency
:tfr:
8. Division/Group
:div[0]:
Division/Group
:div[1]:
Division/Group
:div[2]:
Division/Group
:div[3]:
Agency
:agy[0]:
Agency
:agy[1]:
Agency
:agy[2]:
Agency
:agy[3]:
9. Agency
ID No.
Radio Requirements
Agency
ID No.
Radio Requirements
Agency
ID No.
Radio Requirements
Agency
ID No.
Radio Requirements
:ag[0]:
:id[0]:
:rr[0]:
:ag[9]:
:id[9]:
:rr[9]:
:ag[18]:
:id[18]:
:rr[18]:
:ag[27]:
:id[27]:
:rr[27]:
:ag[1]:
:id[1]:
:rr[1]:
:ag[10]:
:id[10]:
:rr[10]:
:ag[19]:
:id[19]:
:rr[19]:
:ag[28]:
:id[28]:
:rr[28]:
:ag[2]:
:id[2]:
:rr[2]:
:ag[11]:
:id[11]:
:rr[11]:
:ag[20]:
:id[20]:
:rr[20]:
:ag[29]:
:id[29]:
:rr[29]:
:ag[3]:
:id[3]:
:rr[3]:
:ag[12]:
:id[12]:
:rr[12]:
:ag[21]:
:id[21]:
:rr[21]:
:ag[30]:
:id[30]:
:rr[30]:
:ag[4]:
:id[4]:
:rr[4]:
:ag[13]:
:id[13]:
:rr[13]:
:ag[22]:
:id[22]:
:rr[22]:
:ag[31]:
:id[31]:
:rr[31]:
:ag[5]:
:id[5]:
:rr[5]:
:ag[14]:
:id[14]:
:rr[14]:
:ag[23]:
:id[23]:
:rr[23]:
:ag[32]:
:id[32]:
:rr[32]:
:ag[6]:
:id[6]:
:rr[6]:
:ag[15]:
:id[15]:
:rr[15]:
:ag[24]:
:id[24]:
:rr[24]:
:ag[33]:
:id[33]:
:rr[33]:
:ag[7]:
:id[7]:
:rr[7]:
:ag[16]:
:id[16]:
:rr[16]:
:ag[25]:
:id[25]:
:rr[25]:
:ag[34]:
:id[34]:
:rr[34]:
:ag[8]:
:id[8]:
:rr[8]:
:ag[17]:
:id[17]:
:rr[17]:
:ag[26]:
:id[26]:
:rr[26]:
:ag[35]:
:id[35]:
:rr[35]:
Page __ of __
10. Prepared by (Name and Position)
:pre:
ICS-216
flmsg-2.0.10/src/html_templates/mars_daily.html0000664000175000017500000000152212330516146016451 00000000000000 :TITLE:
MARS DAILY REPORT

DE :md_de_: NR :md_nbr:
:md_pre: :md_dtg:
FM :md_fnm: :md_fcl: :md_fst:
TO :md_tps:/:md_tcl: :md_tst:
INFO :md_ps1:/:md_cl1: :md_st1:
INFO :md_ps2:/:md_cl2: :md_st2:
INFO :md_ps3:/:md_cl3: :md_st3:
BT
:md_inc:
SUBJECT: SITREP / :md_sid: / :md_slo:
1. :md_22h:
2. :md_ncl:/:e_x:
3. :md_dta:/:md_dtd: :md_nst:
A. :md_det:
B. :md_acs:
4. :md_agy:
5. :md_rem:
:md_inc:
BT
/EX
NNNN
flmsg-2.0.10/src/html_templates/mars_ineei.html0000664000175000017500000000141412330516146016440 00000000000000 :TITLE:
MARS IN/EEI REPORT

DE    :de:  :nbr:
:prec: :dtg:
FM :fmname: :fmcall: :fmstate:
TO :topos:/:tocall: :tostate:
INFO :info1pos:/:info1call: :info1state:
INFO :info2pos:/:info2call: :info2state:
BT
:incident:
SUBJECT: IN/EEI REPORT
:line1:
:lineA:
:lineB:
:lineC:
:lineD:
:lineE:
:lineF:
:lineG:
:lineH:
:incident:
BT
/EX
NNNN
flmsg-2.0.10/src/html_templates/ics203_template.html0000664000175000017500000001744212330516146017233 00000000000000 :TITLE:
ORGANIZATION ASSIGNMENT LIST 1. Incident name
:inc:
2.Date Prepared
:dat:
3.Time Prepared
:tim:



5. Incident Command and Staff
4. Operational Period (Date/Time)
:opp:

9. Operations section
Incident Commander
:icc:
Chief
:ops_chief:
Deputy
:icd:
Deputy
:ops_deputy:
Safety Officer
:ics:
a. Branch I - Division / Groups
Information Officer
:ici:
Branch Director
:b1_director:
Liaison Officer
:icl:
Deputy
:b1_deputy:
6. Agency Representative
Division / Group
Agency
Name
:b1_div[0]:
:b1_grp[0]:
:agency[0]:
:agency_name[0]:
:b1_div[1]:
:b1_grp[1]:
:agency[1]:
:agency_name[1]:
:b1_div[2]:
:b1_grp[2]:
:agency[2]:
:agency_name[2]:
:b1_div[3]:
:b1_grp[3]:
:agency[3]:
:agency_name[3]:
b. Branch II - Division / Groups
:agency[4]:
:agency_name[4]:
Chief
:b2_director:
:agency[5]:
:agency_name[5]:
Deputy
:b2_deputy:
:agency[6]:
:agency_name[6]: Division / Group
7. Planning Section
:b2_div[0]:
:b2_grp[0]:
Chief
:planning_chief:
:b2_div[1]:
:b2_grp[1]:
Deputy
:planning_deputy:
:b2_div[2]:
:b2_grp[2]:
Resources Unit
:resources_unit:
:b2_div[3]:
:b2_grp[3]:
Situation Unit
:situation_unit:
c. Branch III - Division / Groups
Documentation Unit
:documentation_unit:
Chief
:b3_director:
Demobilization Unit
:demobilization_unit:
Deputy
:b3_deputy:
Technical Specialists
Division / Group
Specialist :tech_spc[0]: :b3_div[0]:
:b3_grp[0]:
Specialist :tech_spc[1]: :b3_div[1]:
:b3_grp[1]:
Specialist :tech_spc[2]: :b3_div[2]:
:b3_grp[2]:
8. Logistics Section
:b3_div[3]:
:b3_grp[3]:
Chief
:logistics_chief:
d. Air Operations Branch
Deputy
:logistics_deputy:
Air Operations Br. Dir.
:air_ops_br_dir:
a. Support Branch
Air Tactical Group Sup.
:air_tactical_group_sup:
Director
:support_director:
Air Support Group Sup.
:air_support_group_sup:
Supply Unit
:supply_unit:
Helicopter Coordinator
:helicopter_coordinator:
Facilities Unit
:facilities_unit:
Air Tanker / Fixed Wing Crd.
:air_tanker_fixed_wing:
Ground Support Unit
:ground_support:

b. Service Branch
10. Finance / Administration Section
Director
:service_director:
Chief
:finance_chief:
Communications Unit
:communications_unit:
Deputy
:finance_deputy:
Medical Unit
:medical_unit:
Time Unit
:time_unit:
Food Unit
:food_unit:
Procurement Unit
:procurement_unit:

Compensation/Claims Unit
:claims_unit:

Cost Unit
:cost_unit:
Prepared by (Resources Unit)
:pre:
ICS-203
flmsg-2.0.10/src/html_templates/ics206_template.html0000664000175000017500000001424112330516146017230 00000000000000 :TITLE:
MEDICAL PLAN 1. Incident Name
:nam:
2. Date Prepared
:dat:
3. Time Prepared
:tim:
4. Operational Period
:opp:
5. Incident Medical Aid Station
Medical Aid Stations
Location
      Paramedics
:msta0:
:mloc0:
:mpar0:
:msta1:
:mloc1:
:mpar1:
:msta2:
:mloc2:
:mpar2:
:msta3:
:mloc3:
:mpar3:
:msta4:
:mloc4:
:mpar4:
6. Transportation
A. Ambulance Services
Name Address
Phone
Paramedics
:tname0:
:taddr0:
:tphon0:
:tpara0:
:tname1:
:taddr1:
:tphon1:
:tpara1:
:tname2:
:taddr2:
:tphon2:
:tpara2:
:tname3:
:taddr3:
:tphon3:
:tpara3:
:tname4:
:taddr4:
:tphon4:
:tpara4:
B. Incident Ambulances
Name
Location
Paramedics
:aname0:
:aloca0:
:apara0:
:aname1:
:aloca1:
:apara1:
:aname2:
:aloca2:
:apara2:
:aname3:
:aloca3:
:apara3:
:aname4:
:aloca4:
:apara4:
7. Hospitals
Name
Address
  Travel Time
  Air        Grnd
Phone
Helipad
Burn
Center
:hname0:
:haddr0:
:hatim0:
:hgtim0:
:hphon0:
:hheli0:
:hburn0:
:hname1:
:haddr1:
:hatim1:
:hgtim1:
:hphon1:
:hheli1:
:hburn1:
:hname2:
:haddr2:
:hatim2:
:hgtim2:
:hphon2:
:hheli2:
:hburn2:
:hname3:
:haddr3:
:hatim3:
:hgtim3:
:hphon3:
:hheli3:
:hburn3:
:hname4:
:haddr4:
:hatim4:
:hgtim4:
:hphon4:
:hheli4:
:hburn4:
8. Medical Emergency Procedures
:proc:
9. Prepared by (Medical Unit Leader)
:prep:
10.Reviewed by (Safety Officer)
:rvwr:


ICS206
flmsg-2.0.10/src/hics/0000775000175000017500000000000012516663375011440 500000000000000flmsg-2.0.10/src/hics/hics214_templates.cxx0000664000175000017500000001534412330516146015331 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "templates.h" const char hics214_html_template[] = "\n\ \n\ \n\ HICS-206\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

HICS 214 – OPERATIONAL LOG

1. INCIDENT NAME
:1:
2. DATE/TIME PREPARED
:2:
3. OPERATIONAL PERIOD DATE/TIME
:3:
4. SECTION /BRANCH
:4:
5. POSITION
:5:

6. ACTIVITY LOG

Time

Major Events, Decisions Made, and Notifications Given

:T[00]:

:E[00]:

:T[01]:

:E[01]:

:T[02]:

:E[02]:

:T[03]:

:E[03]:

:T[04]:

:E[04]:

:T[05]:

:E[05]:

:T[06]:

:E[06]:

:T[07]:

:E[07]:

:T[08]:

:E[08]:

:T[09]:

:E[09]:

:T[10]:

:E[10]:

:T[11]:

:E[11]:

:T[12]:

:E[12]:

:T[13]:

:E[13]:

:T[14]:

:E[14]:

:T[15]:

:E[15]:

:T[16]:

:E[16]:

:T[17]:

:E[17]:

:T[18]:

:E[18]:

:T[19]:

:E[19]:

:T[20]:

:E[20]:

:T[21]:

:E[21]:

:T[22]:

:E[22]:

:T[23]:

:E[23]:

:T[24]:

:E[24]:

:T[25]:

:E[25]:

:T[26]:

:E[26]:

:T[27]:

:E[27]:

:T[28]:

:E[28]:

:T[29]:

:E[29]:

7. Prepared by: :7:

8. Facility Name: :8:

\n\ \n\ \n\ "; const char hics214_text_template[] = "HICS 214 – OPERATIONAL LOG\n\ 1. Incident Name: :1:\n\ 2. Date/Time Prepared :2:\n\ 3. Operational Period Date/Time :3:\n\ 4. Section /Branch :4:\n\ 5. Position :5:\n\ 6. Activity Log\n\ Major Events, Decisions Made, and Notifications Given

\n\\n\ Time: :T[00]:, Event: :E[00]:\n\ Time: :T[01]:, Event: :E[01]:\n\ Time: :T[02]:, Event: :E[02]:\n\ Time: :T[03]:, Event: :E[03]:\n\ Time: :T[04]:, Event: :E[04]:\n\ Time: :T[05]:, Event: :E[05]:\n\ Time: :T[06]:, Event: :E[06]:\n\ Time: :T[07]:, Event: :E[07]:\n\ Time: :T[08]:, Event: :E[08]:\n\ Time: :T[09]:, Event: :E[09]:\n\ Time: :T[10]:, Event: :E[10]:\n\ Time: :T[11]:, Event: :E[11]:\n\ Time: :T[12]:, Event: :E[12]:\n\ Time: :T[13]:, Event: :E[13]:\n\ Time: :T[14]:, Event: :E[14]:\n\ Time: :T[15]:, Event: :E[15]:\n\ Time: :T[16]:, Event: :E[16]:\n\ Time: :T[17]:, Event: :E[17]:\n\ Time: :T[18]:, Event: :E[18]:\n\ Time: :T[19]:, Event: :E[19]:\n\ Time: :T[20]:, Event: :E[20]:\n\ Time: :T[21]:, Event: :E[21]:\n\ Time: :T[22]:, Event: :E[22]:\n\ Time: :T[23]:, Event: :E[23]:\n\ Time: :T[24]:, Event: :E[24]:\n\ Time: :T[25]:, Event: :E[25]:\n\ Time: :T[26]:, Event: :E[26]:\n\ Time: :T[27]:, Event: :E[27]:\n\ Time: :T[28]:, Event: :E[28]:\n\ Time: :T[29]:, Event: :E[29]:\n\ 7. Prepared by: :7:\n\ 8. Facility Name: :8:\n\ "; flmsg-2.0.10/src/hics/hics213.cxx0000664000175000017500000003537112330516146013254 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include using namespace std; string h213_buffer; string h213_base_filename = ""; string h213_def_filename = ""; string h213_def_template_name = ""; bool h213_using_template = false; string h213_tag_fm = ":1:"; string h213_tag_to = ":2:"; string h213_tag_date = ":3:"; string h213_tag_time = ":4:"; string h213_tag_via_phone = ":5a:"; string h213_tag_via_radio = ":5b:"; string h213_tag_via_other = ":5c:"; string h213_tag_reply_yes = ":6a:"; string h213_tag_reply_no = ":6b:"; string h213_tag_reply_to = ":6c:"; string h213_tag_priority = ":7:"; string h213_tag_high = ":7a:"; string h213_tag_medium = ":7b:"; string h213_tag_low = ":7c:"; string h213_tag_msg = ":8:"; string h213_tag_action = ":9:"; string h213_tag_rcvd_by = ":10:"; string h213_tag_time_rcvd = ":11:"; string h213_tag_fwd_to = ":12:"; string h213_tag_comments = ":13:"; string h213_tag_rcvd_by2 = ":14:"; string h213_tag_time_rcvd2 = ":15:"; string h213_tag_fwd_to2 = ":16:"; string h213_tag_comments2 = ":17:"; string h213_tag_facility = ":18:"; FIELD h213_fields[] = { { h213_tag_to, "", (void **)&h213_txt_to, 't' }, { h213_tag_fm, "", (void **)&h213_txt_fm, 't' }, { h213_tag_date, "", (void **)&h213_txt_date, 'd' }, { h213_tag_time, "", (void **)&h213_txt_time, 't' }, { h213_tag_via_phone, "", (void **)&h213_btn_phone, 'b' }, { h213_tag_via_radio, "", (void **)&h213_btn_radio, 'b' }, { h213_tag_via_other, "", (void **)&h213_btn_other, 'b' }, { h213_tag_reply_yes, "", (void **)&h213_btn_yes, 'b' }, { h213_tag_reply_no, "", (void **)&h213_btn_no, 'b' }, { h213_tag_reply_to, "", (void **)&h213_txt_reply_to, 't' }, { h213_tag_high, "", (void **)&h213_btn_high, 'b' }, { h213_tag_medium, "", (void **)&h213_btn_medium, 'b' }, { h213_tag_low, "", (void **)&h213_btn_low, 'b' }, { h213_tag_msg, "", (void **)&h213_txt_msg, 'e' }, { h213_tag_action, "", (void **)&h213_txt_action, 'e' }, { h213_tag_rcvd_by, "", (void **)&h213_txt_rcvd_by, 't' }, { h213_tag_time_rcvd, "", (void **)&h213_txt_time_rcvd, 't' }, { h213_tag_fwd_to, "", (void **)&h213_txt_fwd_to, 't' }, { h213_tag_comments, "", (void **)&h213_txt_comments, 'e' }, { h213_tag_rcvd_by2, "", (void **)&h213_txt_rcvd_by2, 't' }, { h213_tag_time_rcvd2, "", (void **)&h213_txt_time_rcvd2, 't' }, { h213_tag_fwd_to2, "", (void **)&h213_txt_fwd_to2, 't' }, { h213_tag_comments2, "", (void **)&h213_txt_comments2, 'e' }, { h213_tag_facility, "", (void **)&h213_txt_facility, 't' } }; int h213_numfields = sizeof(h213_fields) / sizeof(FIELD); void h213_cb_set_date() { h213_txt_date->value(szDate()); } void h213_cb_set_time0() { h213_txt_time->value(szTime(progStatus.UTC)); } void h213_cb_set_time1() { h213_txt_time_rcvd->value(szTime(progStatus.UTC)); } void h213_cb_set_time2() { h213_txt_time_rcvd2->value(szTime(progStatus.UTC)); } void h213_clear_fields() { for (int i = 0; i < h213_numfields; i++) h213_fields[i].f_data.clear(); } bool check_hics213fields() { for (int i = 0; i < h213_numfields; i++) { if (h213_fields[i].w_type == 'd') { if (h213_fields[i].f_data != ((Fl_DateInput *)(*h213_fields[i].w))->value()) return true; } else if (h213_fields[i].w_type == 't') { if (h213_fields[i].f_data != ((Fl_Input2 *)(*h213_fields[i].w))->value()) return true; } else if (h213_fields[i].w_type == 'e') { if (h213_fields[i].f_data != ((FTextEdit *)(*h213_fields[i].w))->buffer()->text()) return true; } else if (h213_fields[i].w_type == 'b') { string val = ((Fl_Check_Button *)(*h213_fields[i].w))->value() ? "X" : ""; if (h213_fields[i].f_data != val) return true; } } return false; } void h213_update_fields() { for (int i = 0; i < h213_numfields; i++) { if (h213_fields[i].w_type == 'd') { h213_fields[i].f_data = ((Fl_DateInput *)(*h213_fields[i].w))->value(); } else if (h213_fields[i].w_type == 't') { h213_fields[i].f_data = ((Fl_Input2 *)(*h213_fields[i].w))->value(); } else if (h213_fields[i].w_type == 'e') { h213_fields[i].f_data = ((FTextEdit *)(*h213_fields[i].w))->buffer()->text(); } else if (h213_fields[i].w_type == 'b') { string val = ((Fl_Check_Button *)(*h213_fields[i].w))->value() ? "X" : ""; h213_fields[i].f_data = val; } } } void h213_clear_form() { h213_clear_fields(); for (int i = 0; i < h213_numfields; i++) { if (h213_fields[i].w_type == 'd') ((Fl_DateInput *)(*h213_fields[i].w))->value(""); else if (h213_fields[i].w_type == 'b') ((Fl_Check_Button *)(*h213_fields[i].w))->value(0); else if (h213_fields[i].w_type == 't') ((Fl_Input2 *)(*h213_fields[i].w))->value(""); else if (h213_fields[i].w_type == 'e') ((FTextEdit *)(*h213_fields[i].w))->clear(); } h213_update_fields(); } void h213_update_form() { for (int i = 0; i < h213_numfields; i++) { if (h213_fields[i].w_type == 'd') ((Fl_DateInput *)(*h213_fields[i].w))->value(h213_fields[i].f_data.c_str()); else if (h213_fields[i].w_type == 'b') ((Fl_Check_Button *)(*h213_fields[i].w))->value(h213_fields[i].f_data == "X"); else if (h213_fields[i].w_type == 't') ((Fl_Input2 *)(*h213_fields[i].w))->value(h213_fields[i].f_data.c_str()); else if (h213_fields[i].w_type == 'e') { ((FTextEdit *)(*h213_fields[i].w))->clear(); ((FTextEdit *)(*h213_fields[i].w))->add(h213_fields[i].f_data.c_str()); } } } void h213_make_buffer(bool compress = false) { string mbuff; mbuff.clear(); for (int i = 0; i < h213_numfields; i++) mbuff.append( lineout( h213_fields[i].f_type, h213_fields[i].f_data ) ); if (compress) compress_maybe(mbuff); h213_buffer.append(mbuff); } void h213_read_buffer(string data) { h213_clear_fields(); read_header(data); for (int i = 0; i < h213_numfields; i++) h213_fields[i].f_data = findstr(data, h213_fields[i].f_type); h213_update_form(); } void h213_cb_new() { if (check_hics213fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); h213_cb_save(); } } h213_clear_form(); clear_header(); h213_def_filename = ICS_msg_dir; h213_def_filename.append("new"HF213_EXT); h213_using_template = false; show_filename(h213_def_filename); } void h213_cb_import() { fl_alert2("Not implemented"); } void h213_cb_export() { fl_alert2("Not implemented"); } void h213_cb_wrap_import(string wrapfilename, string inpbuffer) { h213_clear_form(); h213_read_buffer(inpbuffer); h213_def_filename = ICS_msg_dir; h213_def_filename.append(wrapfilename); show_filename(h213_def_filename); h213_using_template = false; } int eval_h213_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(h213_base_filename).append("]"); h213_update_fields(); update_header(FROM); evalstr.append(header("")); h213_buffer.clear(); h213_make_buffer(true); if (h213_buffer.empty()) return 0; compress_maybe( h213_buffer ); evalstr.append( h213_buffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void h213_cb_wrap_export() { if (check_hics213fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } h213_update_fields(); if (h213_base_filename == "new"HF213_EXT || h213_base_filename == "default"HF213_EXT) if (!h213_cb_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(h213_base_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); h213_buffer.assign(header("")); h213_make_buffer(true); export_wrapfile(h213_base_filename, wrapfilename, h213_buffer, pext != WRAP_EXT); h213_buffer.assign(header("")); h213_make_buffer(false); h213_write(h213_def_filename); } } void h213_cb_wrap_autosend() { if (check_hics213fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } h213_update_fields(); if (h213_base_filename == "new"HF213_EXT || h213_base_filename == "default"HF213_EXT) if (!h213_cb_save_as()) return; update_header(FROM); h213_buffer.assign(header("")); h213_make_buffer(true); xfr_via_socket(h213_base_filename, h213_buffer); h213_buffer.assign(header("")); h213_make_buffer(false); h213_write(h213_def_filename); } void h213_cb_load_template() { string h213_def_filename = h213_def_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"HT213_EXT, h213_def_filename.c_str()); if (p) { h213_clear_form(); read_data_file(p); h213_def_template_name = p; show_filename(h213_def_template_name); h213_using_template = true; } } void h213_cb_save_template() { if (!h213_using_template) { cb_save_as_template(); return; } string h213_def_filename = h213_def_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"HT213_EXT, h213_def_filename.c_str()); if (p) { update_header(CHANGED); h213_update_fields(); h213_buffer.assign(header("")); h213_make_buffer(); h213_write(p); } } void h213_cb_save_as_template() { string h213_def_filename = h213_def_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"HT213_EXT, h213_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); h213_def_template_name = p; if (strlen(pext) == 0) h213_def_template_name.append(HT213_EXT); remove_spaces_from_filename(h213_def_template_name); clear_header(); update_header(CHANGED); h213_update_fields(); h213_buffer.assign(header("")); h213_make_buffer(); h213_write(h213_def_template_name); show_filename(h213_def_template_name); h213_using_template = true; } } void h213_cb_open() { const char *p = FSEL::select(_("Open data file"), "HICS-213\t*.{H213}", h213_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; h213_clear_form(); read_data_file(p); h213_using_template = false; h213_def_filename = p; show_filename(h213_def_filename); } void h213_write(string s) { FILE *hicsfile = fopen(s.c_str(), "w"); if (!hicsfile) return; fwrite(h213_buffer.c_str(), h213_buffer.length(), 1, hicsfile); fclose(hicsfile); } bool h213_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(HF213_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = h213_def_filename; p = FSEL::saveas(_("Save data file"), "HICS-213\t*.{H213}", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); h213_def_filename = p; if (strlen(pext) == 0) h213_def_filename.append(HF213_EXT); remove_spaces_from_filename(h213_def_filename); h213_update_fields(); update_header(NEW); h213_buffer.assign(header("")); h213_make_buffer(); h213_write(h213_def_filename); h213_using_template = false; show_filename(h213_def_filename); return true; } void h213_cb_save() { if (h213_base_filename == "new"HF213_EXT || h213_base_filename == "default"HF213_EXT || h213_using_template == true) { h213_cb_save_as(); return; } if (check_hics213fields()) update_header(CHANGED); h213_buffer.assign(header("")); h213_update_fields(); h213_make_buffer(); h213_write(h213_def_filename); h213_using_template = false; } void h213_cb_html() { string fname_name = fl_filename_name(h213_def_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string hicsname = ICS_dir; hicsname.append(fname_name); hicsname.append(".html"); string html_text = ""; h213_update_fields(); string form = hics213_html_template; string temp, temp2; for (int i = 0; i < h213_numfields; i++) { temp = h213_fields[i].f_type; if (temp == h213_tag_msg || temp == h213_tag_action || temp == h213_tag_comments || temp == h213_tag_comments2 ) { temp2 = h213_fields[i].f_data; if (progStatus.autowordwrap) temp2 = wordwrap(h213_fields[i].f_data, progStatus.charcount); replacestr( form, h213_fields[i].f_type, temp2 ); } else replacestr( form, h213_fields[i].f_type, h213_fields[i].f_data ); } FILE *hicsfile = fopen(hicsname.c_str(), "w"); fprintf(hicsfile,"%s", form.c_str()); fclose(hicsfile); open_url(hicsname.c_str()); } void h213_cb_textout() { string hicsname = ICS_dir; hicsname.append("hics213.txt"); h213_update_fields(); string form = hics213_text_template; for (int i = 0; i < h213_numfields; i++) replacestr( form, h213_fields[i].f_type, h213_fields[i].f_data); FILE *hicsfile = fopen(hicsname.c_str(), "w"); fprintf(hicsfile,"%s", form.c_str()); fclose(hicsfile); open_url(hicsname.c_str()); } flmsg-2.0.10/src/hics/hics_tab.cxx0000664000175000017500000000222112330516146013640 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" void hics_changed(Fl_Widget *, void *) { estimate(); } void create_hics_tab() { create_hics203_tab(); create_hics206_tab(); create_hics213_tab(); create_hics214_tab(); } flmsg-2.0.10/src/hics/hics213_tab.cxx0000664000175000017500000004051612330516146014077 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *h213_tab = (Fl_Group *)0; Fl_Tabs *h213_tab_type = (Fl_Tabs *)0; Fl_Group *tab_213_grp_orig = (Fl_Group *)0; Fl_Group *tab_213_grp_msg = (Fl_Group *)0; Fl_Group *tab_213_grp_action = (Fl_Group *)0; Fl_Group *tab_213_grp_receipt1 = (Fl_Group *)0; Fl_Group *tab_213_grp_receipt2 = (Fl_Group *)0; Fl_Input2 *h213_txt_to = (Fl_Input2 *)0; Fl_Input2 *h213_txt_fm = (Fl_Input2 *)0; Fl_DateInput *h213_txt_date = (Fl_DateInput *)0; Fl_Button *h213_btn_date = (Fl_Button *)0; Fl_Input2 *h213_txt_time = (Fl_Input2 *)0; Fl_Button *h213_btn_time0 = (Fl_Button *)0; Fl_Check_Button *h213_btn_phone = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_radio = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_other = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_yes = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_no = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_high = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_medium = (Fl_Check_Button *)0; Fl_Check_Button *h213_btn_low = (Fl_Check_Button *)0; Fl_Input2 *h213_txt_reply_to = (Fl_Input2 *)0; FTextEdit *h213_txt_msg = (FTextEdit *)0; FTextEdit *h213_txt_action = (FTextEdit *)0; Fl_Input2 *h213_txt_rcvd_by = (Fl_Input2 *)0; Fl_Input2 *h213_txt_time_rcvd = (Fl_Input2 *)0; Fl_Button *h213_btn_time1 = (Fl_Button *)0; Fl_Input2 *h213_txt_fwd_to = (Fl_Input2 *)0; FTextEdit *h213_txt_comments = (FTextEdit *)0; Fl_Input2 *h213_txt_rcvd_by2 = (Fl_Input2 *)0; Fl_Input2 *h213_txt_time_rcvd2 = (Fl_Input2 *)0; Fl_Button *h213_btn_time2 = (Fl_Button *)0; Fl_Input2 *h213_txt_fwd_to2 = (Fl_Input2 *)0; FTextEdit *h213_txt_comments2 = (FTextEdit *)0; Fl_Input2 *h213_txt_facility = (Fl_Input2 *)0; static void h213_cb_btn_date(Fl_Button*, void*) { h213_cb_set_date(); } static void h213_cb_btn_time0(Fl_Button*, void*) { h213_cb_set_time0(); } static void h213_cb_btn_time1(Fl_Button*, void*) { h213_cb_set_time1(); } static void h213_cb_btn_time2(Fl_Button*, void*) { h213_cb_set_time2(); } static void h213_cb_btn_via(Fl_Button *b, void*) { Fl_Check_Button *btn = (Fl_Check_Button *)b; if (btn == h213_btn_other && btn->value()) { h213_btn_radio->value(0); h213_btn_phone->value(0); } else if (btn == h213_btn_radio && btn->value()) { h213_btn_phone->value(0); h213_btn_other->value(0); } else if (btn == h213_btn_phone && btn->value()){ h213_btn_radio->value(0); h213_btn_other->value(0); } } static void h213_cb_btn_yes_no(Fl_Button *b, void*) { Fl_Check_Button *btn = (Fl_Check_Button *)b; if (btn == h213_btn_yes && btn->value()) h213_btn_no->value(0); else if (btn == h213_btn_no && btn->value()) h213_btn_yes->value(0); } static void h213_cb_btn_priority(Fl_Button *b, void*) { Fl_Check_Button *btn = (Fl_Check_Button *)b; if (btn == h213_btn_low && btn->value()) { h213_btn_high->value(0); h213_btn_medium->value(0); } else if (btn == h213_btn_medium && btn->value()) { h213_btn_high->value(0); h213_btn_low->value(0); } else if (btn == h213_btn_high && btn->value()) { h213_btn_medium->value(0); h213_btn_low->value(0); } } void create_hics213_tab() { int Y = tab_top; h213_tab = new Fl_Group(0, Y, 570, 390); h213_tab->align(FL_ALIGN_TOP); h213_tab_type = new Fl_Tabs(0, Y, 570, 387); h213_tab_type->selection_color((Fl_Color)246); tab_213_grp_orig = new Fl_Group(0, Y+25, 570, 360, _("Originator")); { h213_txt_fm = new Fl_Input2(80, Y+40, 480, 24, _("From")); h213_txt_fm->tooltip(_("originator")); h213_txt_fm->box(FL_DOWN_BOX); h213_txt_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_fm->labeltype(FL_NORMAL_LABEL); h213_txt_fm->labelfont(0); h213_txt_fm->labelsize(14); h213_txt_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_fm->align(FL_ALIGN_LEFT); h213_txt_fm->callback(hics_changed); h213_txt_fm->when(FL_WHEN_CHANGED); h213_txt_to = new Fl_Input2(80, Y+66, 480, 24, _("To")); h213_txt_to->tooltip(_("Addressee")); h213_txt_to->box(FL_DOWN_BOX); h213_txt_to->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_to->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_to->labeltype(FL_NORMAL_LABEL); h213_txt_to->labelfont(0); h213_txt_to->labelsize(14); h213_txt_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_to->align(FL_ALIGN_LEFT); h213_txt_to->callback(hics_changed); h213_txt_to->when(FL_WHEN_CHANGED); h213_txt_date = new Fl_DateInput(80, Y+92, 125, 24, _("Date")); h213_txt_date->tooltip(_("Date of origination")); h213_txt_date->box(FL_DOWN_BOX); h213_txt_date->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_date->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_date->labeltype(FL_NORMAL_LABEL); h213_txt_date->labelfont(0); h213_txt_date->labelsize(14); h213_txt_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_date->align(FL_ALIGN_LEFT); h213_txt_date->when(FL_WHEN_CHANGED); h213_txt_date->callback(hics_changed); h213_txt_date->local_datetime(progStatus.UTC > 1); h213_txt_date->format(2); h213_btn_date = new Fl_Button(210, Y+94, 20, 20, _("...")); h213_btn_date->tooltip(_("Set today")); h213_btn_date->callback((Fl_Callback*)h213_cb_btn_date); h213_txt_time = new Fl_Input2(300, Y+92, 103, 24, _("Time")); h213_txt_time->tooltip(_("Time of origination")); h213_txt_time->box(FL_DOWN_BOX); h213_txt_time->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_time->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_time->labeltype(FL_NORMAL_LABEL); h213_txt_time->labelfont(0); h213_txt_time->labelsize(14); h213_txt_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_time->align(FL_ALIGN_LEFT); h213_txt_time->callback(hics_changed); h213_txt_time->when(FL_WHEN_CHANGED); h213_btn_time0 = new Fl_Button(410, Y+94, 20, 20, _("...")); h213_btn_time0->tooltip(_("Set time now")); h213_btn_time0->callback((Fl_Callback*)h213_cb_btn_time0); { Fl_Group *o = new Fl_Group(2, Y+124, 282, 50, _("Received via:")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h213_btn_phone = new Fl_Check_Button(30, Y+145, 60, 24, _("Phone")); h213_btn_phone->value(0); h213_btn_phone->callback((Fl_Callback*)h213_cb_btn_via); h213_btn_radio = new Fl_Check_Button(120, Y+145, 60, 24, _("Radio")); h213_btn_radio->value(0); h213_btn_radio->callback((Fl_Callback*)h213_cb_btn_via); h213_btn_other = new Fl_Check_Button(210, Y+145, 60, 24, _("Other")); h213_btn_other->value(0); h213_btn_other->callback((Fl_Callback*)h213_cb_btn_via); o->end(); } { Fl_Group *o = new Fl_Group(286, Y+124, 282, 50, _("Reply requested:")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h213_btn_yes = new Fl_Check_Button(340, Y+145, 60, 24, _("Yes")); h213_btn_yes->value(0); h213_btn_yes->callback((Fl_Callback*)h213_cb_btn_yes_no); h213_btn_no = new Fl_Check_Button(440, Y+145, 60, 24, _("No")); h213_btn_no->value(0); h213_btn_no->callback((Fl_Callback*)h213_cb_btn_yes_no); o->end(); } h213_txt_reply_to = new Fl_Input2(80, Y+175, 480, 24, _("Reply to:")); h213_txt_reply_to->tooltip(_("alternate reply-to if NO reply requested")); h213_txt_reply_to->box(FL_DOWN_BOX); h213_txt_reply_to->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_reply_to->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_reply_to->labeltype(FL_NORMAL_LABEL); h213_txt_reply_to->labelfont(0); h213_txt_reply_to->labelsize(14); h213_txt_reply_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_reply_to->align(FL_ALIGN_LEFT); h213_txt_reply_to->callback(hics_changed); h213_txt_reply_to->when(FL_WHEN_CHANGED); { Fl_Group *o = new Fl_Group(2, Y+205, 566, 50, _("Priority")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h213_btn_high = new Fl_Check_Button(20, Y+226, 60, 24, _("Urgent - High")); h213_btn_high->value(0); h213_btn_high->callback((Fl_Callback*)h213_cb_btn_priority); h213_btn_medium = new Fl_Check_Button(155, Y+226, 60, 24, _("Non Urgent - Medium")); h213_btn_medium->value(0); h213_btn_medium->callback((Fl_Callback*)h213_cb_btn_priority); h213_btn_low = new Fl_Check_Button(340, Y+226, 60, 24, _("Informational - Low")); h213_btn_low->value(0); h213_btn_low->callback((Fl_Callback*)h213_cb_btn_priority); o->end(); } h213_txt_facility = new Fl_Input2(80, Y+270, 480, 24, _("Facility")); h213_txt_facility->tooltip(_("")); h213_txt_facility->box(FL_DOWN_BOX); h213_txt_facility->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_facility->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_facility->labeltype(FL_NORMAL_LABEL); h213_txt_facility->labelfont(0); h213_txt_facility->labelsize(14); h213_txt_facility->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_facility->align(FL_ALIGN_LEFT); h213_txt_facility->callback(hics_changed); h213_txt_facility->when(FL_WHEN_CHANGED); } tab_213_grp_orig->end(); tab_213_grp_msg = new Fl_Group(0, Y+25, 570, 360, _("Message/Action")); { h213_txt_msg = new FTextEdit(5, Y+50, 562, 155, _("Message:")); h213_txt_msg->box(FL_DOWN_FRAME); h213_txt_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_msg->labeltype(FL_NORMAL_LABEL); h213_txt_msg->labelfont(0); h213_txt_msg->labelsize(14); h213_txt_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_msg->align(FL_ALIGN_TOP_LEFT); h213_txt_msg->callback(hics_changed); h213_txt_msg->when(FL_WHEN_CHANGED); h213_txt_action = new FTextEdit(5, Y+225, 562, 155, _("Action:")); h213_txt_action->box(FL_DOWN_FRAME); h213_txt_action->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_action->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_action->labeltype(FL_NORMAL_LABEL); h213_txt_action->labelfont(0); h213_txt_action->labelsize(14); h213_txt_action->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_action->align(FL_ALIGN_TOP_LEFT); h213_txt_action->callback(hics_changed); h213_txt_action->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(h213_txt_msg); } tab_213_grp_msg->end(); tab_213_grp_receipt1 = new Fl_Group(0, Y+25, 570, 360, _("Receipt 1")); { h213_txt_rcvd_by = new Fl_Input2(80, Y+40, 480, 24, _("Rec' by")); h213_txt_rcvd_by->tooltip(_("first receipt")); h213_txt_rcvd_by->box(FL_DOWN_BOX); h213_txt_rcvd_by->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_rcvd_by->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_rcvd_by->labeltype(FL_NORMAL_LABEL); h213_txt_rcvd_by->labelfont(0); h213_txt_rcvd_by->labelsize(14); h213_txt_rcvd_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_rcvd_by->align(FL_ALIGN_LEFT); h213_txt_rcvd_by->callback(hics_changed); h213_txt_rcvd_by->when(FL_WHEN_CHANGED); h213_txt_time_rcvd = new Fl_Input2(80, Y+66, 103, 24, _("Time")); h213_txt_time_rcvd->tooltip(_("Time of receipt")); h213_txt_time_rcvd->box(FL_DOWN_BOX); h213_txt_time_rcvd->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_time_rcvd->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_time_rcvd->labeltype(FL_NORMAL_LABEL); h213_txt_time_rcvd->labelfont(0); h213_txt_time_rcvd->labelsize(14); h213_txt_time_rcvd->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_time_rcvd->align(FL_ALIGN_LEFT); h213_txt_time_rcvd->callback(hics_changed); h213_txt_time_rcvd->when(FL_WHEN_CHANGED); h213_btn_time1 = new Fl_Button(185, Y+68, 20, 20, _("...")); h213_btn_time1->tooltip(_("Set time now")); h213_btn_time1->callback((Fl_Callback*)h213_cb_btn_time1); h213_txt_fwd_to = new Fl_Input2(80, Y+92, 480, 24, _("Fwd to")); h213_txt_fwd_to->tooltip(_("forwarded to")); h213_txt_fwd_to->box(FL_DOWN_BOX); h213_txt_fwd_to->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_fwd_to->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_fwd_to->labeltype(FL_NORMAL_LABEL); h213_txt_fwd_to->labelfont(0); h213_txt_fwd_to->labelsize(14); h213_txt_fwd_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_fwd_to->align(FL_ALIGN_LEFT); h213_txt_fwd_to->callback(hics_changed); h213_txt_fwd_to->when(FL_WHEN_CHANGED); h213_txt_comments = new FTextEdit(5, Y+136, 562, 240, _("Comments")); h213_txt_comments->box(FL_DOWN_FRAME); h213_txt_comments->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_comments->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_comments->labeltype(FL_NORMAL_LABEL); h213_txt_comments->labelfont(0); h213_txt_comments->labelsize(14); h213_txt_comments->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_comments->align(FL_ALIGN_TOP_LEFT); h213_txt_comments->callback(hics_changed); h213_txt_comments->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(h213_txt_comments); } tab_213_grp_receipt1->end(); tab_213_grp_receipt2 = new Fl_Group(0, Y+25, 570, 360, _("Receipt 2")); { h213_txt_rcvd_by2 = new Fl_Input2(80, Y+40, 480, 24, _("Rec' by")); h213_txt_rcvd_by2->tooltip(_("first receipt")); h213_txt_rcvd_by2->box(FL_DOWN_BOX); h213_txt_rcvd_by2->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_rcvd_by2->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_rcvd_by2->labeltype(FL_NORMAL_LABEL); h213_txt_rcvd_by2->labelfont(0); h213_txt_rcvd_by2->labelsize(14); h213_txt_rcvd_by2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_rcvd_by2->align(FL_ALIGN_LEFT); h213_txt_rcvd_by2->callback(hics_changed); h213_txt_rcvd_by2->when(FL_WHEN_CHANGED); h213_txt_time_rcvd2 = new Fl_Input2(80, Y+66, 103, 24, _("Time")); h213_txt_time_rcvd2->tooltip(_("Time of receipt")); h213_txt_time_rcvd2->box(FL_DOWN_BOX); h213_txt_time_rcvd2->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_time_rcvd2->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_time_rcvd2->labeltype(FL_NORMAL_LABEL); h213_txt_time_rcvd2->labelfont(0); h213_txt_time_rcvd2->labelsize(14); h213_txt_time_rcvd2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_time_rcvd2->align(FL_ALIGN_LEFT); h213_txt_time_rcvd2->callback(hics_changed); h213_txt_time_rcvd2->when(FL_WHEN_CHANGED); h213_btn_time2 = new Fl_Button(185, Y+68, 20, 20, _("...")); h213_btn_time2->tooltip(_("Set time now")); h213_btn_time2->callback((Fl_Callback*)h213_cb_btn_time2); h213_txt_fwd_to2 = new Fl_Input2(80, Y+92, 480, 24, _("Fwd to")); h213_txt_fwd_to2->tooltip(_("forwarded to")); h213_txt_fwd_to2->box(FL_DOWN_BOX); h213_txt_fwd_to2->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_fwd_to2->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_fwd_to2->labeltype(FL_NORMAL_LABEL); h213_txt_fwd_to2->labelfont(0); h213_txt_fwd_to2->labelsize(14); h213_txt_fwd_to2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_fwd_to2->align(FL_ALIGN_LEFT); h213_txt_fwd_to2->callback(hics_changed); h213_txt_fwd_to2->when(FL_WHEN_CHANGED); h213_txt_comments2 = new FTextEdit(5, Y+136, 562, 240, _("Comments")); h213_txt_comments2->box(FL_DOWN_FRAME); h213_txt_comments2->color((Fl_Color)FL_BACKGROUND2_COLOR); h213_txt_comments2->selection_color((Fl_Color)FL_SELECTION_COLOR); h213_txt_comments2->labeltype(FL_NORMAL_LABEL); h213_txt_comments2->labelfont(0); h213_txt_comments2->labelsize(14); h213_txt_comments2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h213_txt_comments2->align(FL_ALIGN_TOP_LEFT); h213_txt_comments2->callback(hics_changed); h213_txt_comments2->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(h213_txt_comments2); } tab_213_grp_receipt2->end(); h213_tab_type->end(); Fl_Group::current()->resizable(h213_tab_type); h213_tab->end(); h213_tab->hide(); } flmsg-2.0.10/src/hics/hics206_tab.cxx0000664000175000017500000010325412330516146014100 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *h206_tab = (Fl_Group *)0; Fl_Tabs *h206_tab_type = (Fl_Tabs *)0; Fl_Group *h206_tab_plan = (Fl_Group *)0; Fl_Group *h206_tab_treatment = (Fl_Group *)0; Fl_Group *h206_tab_resource = (Fl_Group *)0; Fl_Group *h206_tab_staff = (Fl_Group *)0; Fl_Group *h206_tab_medicines = (Fl_Group *)0; Fl_Group *h206_tab_sites = (Fl_Group *)0; Fl_Group *h206_grp1 = (Fl_Group *)0; Fl_Group *h206_grp2 = (Fl_Group *)0; Fl_Group *h206_grp3 = (Fl_Group *)0; Fl_Group *h206_grp4 = (Fl_Group *)0; Fl_Group *h206_grp5 = (Fl_Group *)0; Fl_Group *h206_grp6 = (Fl_Group *)0; Fl_Input2 *h206_txt_name = (Fl_Input2 *)0; Fl_Input2 *h206_txt_op_period = (Fl_Input2 *)0; Fl_Input2 *h206_txt_time_prepared = (Fl_Input2 *)0; Fl_Button *h206_btn_time = (Fl_Button *)0; Fl_DateInput *h206_txt_date_prepared = (Fl_DateInput *)0; Fl_Button *h206_btn_date = (Fl_Button *)0; Fl_Input2 *h206_txt_location = (Fl_Input2 *)0; Fl_Input2 *h206_txt_loc_contact = (Fl_Input2 *)0; Fl_Input2 *h206_txt_team_leader = (Fl_Input2 *)0; Fl_Input2 *h206_txt_team_contact = (Fl_Input2 *)0; FTextEdit *h206_txt_special_instructions = (FTextEdit *)0; Fl_Input2 *h206_txt_md_do = (Fl_Input2 *)0; Fl_Input2 *h206_txt_pa_np = (Fl_Input2 *)0; Fl_Input2 *h206_txt_rn_lpn = (Fl_Input2 *)0; Fl_Input2 *h206_txt_tech_cn = (Fl_Input2 *)0; Fl_Input2 *h206_txt_team_other = (Fl_Input2 *)0; Fl_Input2 *h206_txt_litters = (Fl_Input2 *)0; Fl_Input2 *h206_txt_portable = (Fl_Input2 *)0; Fl_Input2 *h206_txt_transport = (Fl_Input2 *)0; Fl_Input2 *h206_txt_wheelchairs = (Fl_Input2 *)0; Fl_Input2 *h206_txt_transport_other = (Fl_Input2 *)0; Fl_Input2 *h206_txt_meds_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_meds_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_meds_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_meds_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_meds_5 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_supp_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_supp_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_supp_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_supp_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_supp_5 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_site_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_address_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_phone_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_spec_care_1 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_site_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_address_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_phone_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_spec_care_2 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_site_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_address_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_phone_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_spec_care_3 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_site_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_address_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_phone_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_spec_care_4 = (Fl_Input2 *)0; Fl_Input2 *h206_txt_preparer = (Fl_Input2 *)0; Fl_Input2 *h206_txt_facility = (Fl_Input2 *)0; static void cb_btn_h206time(Fl_Button*, void*) { h206_cb_settime(); } static void cb_btn_h206date(Fl_Button*, void*) { h206_cb_setdate(); } void create_hics206_tab() { int Y = tab_top; h206_tab = new Fl_Group(0, Y, 570, 390); h206_tab->align(FL_ALIGN_TOP); h206_tab_type = new Fl_Tabs(0, Y, 570, 387); h206_tab_type->selection_color((Fl_Color)246); h206_tab_plan = new Fl_Group(0, Y+25, 570, 360, _("Plan")); h206_grp1 = new Fl_Group(2, Y+30, 566, 80); h206_grp1->box(FL_ENGRAVED_FRAME); h206_txt_name = new Fl_Input2(9, Y+49, 242, 24, _("Incident Name")); h206_txt_name->tooltip(_("")); h206_txt_name->box(FL_DOWN_BOX); h206_txt_name->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_name->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_name->labeltype(FL_NORMAL_LABEL); h206_txt_name->labelfont(0); h206_txt_name->labelsize(14); h206_txt_name->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_name->align(FL_ALIGN_TOP_LEFT); h206_txt_name->callback(hics_changed); h206_txt_name->when(FL_WHEN_CHANGED); h206_txt_op_period = new Fl_Input2(151, Y+77, 410, 24, _("Operational Period:")); h206_txt_op_period->tooltip(_("")); h206_txt_op_period->box(FL_DOWN_BOX); h206_txt_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_op_period->labeltype(FL_NORMAL_LABEL); h206_txt_op_period->labelfont(0); h206_txt_op_period->labelsize(14); h206_txt_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_op_period->align(FL_ALIGN_LEFT); h206_txt_op_period->callback(hics_changed); h206_txt_op_period->when(FL_WHEN_CHANGED); h206_txt_time_prepared = new Fl_Input2(407, Y+47, 103, 24, _("Time Prepared")); h206_txt_time_prepared->tooltip(_("Time of origination")); h206_txt_time_prepared->box(FL_DOWN_BOX); h206_txt_time_prepared->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_time_prepared->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_time_prepared->labeltype(FL_NORMAL_LABEL); h206_txt_time_prepared->labelfont(0); h206_txt_time_prepared->labelsize(14); h206_txt_time_prepared->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_time_prepared->align(FL_ALIGN_TOP_LEFT); h206_txt_time_prepared->callback(hics_changed); h206_txt_time_prepared->when(FL_WHEN_CHANGED); h206_btn_time = new Fl_Button(517, Y+49, 20, 20, _("...")); h206_btn_time->tooltip(_("Set time now")); h206_btn_time->callback((Fl_Callback*)cb_btn_h206time); h206_txt_date_prepared = new Fl_DateInput(256, Y+47, 125, 24, _("Date Prepared")); h206_txt_date_prepared->tooltip(_("Date of origination")); h206_txt_date_prepared->box(FL_DOWN_BOX); h206_txt_date_prepared->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_date_prepared->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_date_prepared->labeltype(FL_NORMAL_LABEL); h206_txt_date_prepared->labelfont(0); h206_txt_date_prepared->labelsize(14); h206_txt_date_prepared->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_date_prepared->align(FL_ALIGN_TOP_LEFT); h206_txt_date_prepared->callback(hics_changed); h206_txt_date_prepared->when(FL_WHEN_CHANGED); h206_txt_date_prepared->local_datetime(progStatus.UTC > 1); h206_btn_date = new Fl_Button(383, Y+49, 20, 20, _("...")); h206_btn_date->tooltip(_("Set today")); h206_btn_date->callback((Fl_Callback*)cb_btn_h206date); h206_grp1->end(); h206_grp2 = new Fl_Group(2, Y+112, 566, 30); h206_grp2->box(FL_ENGRAVED_FRAME); h206_txt_preparer = new Fl_Input2(71, Y+114, 210, 24, _("Preparer")); h206_txt_preparer->tooltip(_("")); h206_txt_preparer->box(FL_DOWN_BOX); h206_txt_preparer->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_preparer->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_preparer->labeltype(FL_NORMAL_LABEL); h206_txt_preparer->labelfont(0); h206_txt_preparer->labelsize(14); h206_txt_preparer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_preparer->align(FL_ALIGN_LEFT); h206_txt_preparer->callback(hics_changed); h206_txt_preparer->when(FL_WHEN_CHANGED); h206_txt_facility = new Fl_Input2(350, Y+114, 210, 24, _("Facility")); h206_txt_facility->tooltip(_("")); h206_txt_facility->box(FL_DOWN_BOX); h206_txt_facility->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_facility->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_facility->labeltype(FL_NORMAL_LABEL); h206_txt_facility->labelfont(0); h206_txt_facility->labelsize(14); h206_txt_facility->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_facility->align(FL_ALIGN_LEFT); h206_txt_facility->callback(hics_changed); h206_txt_facility->when(FL_WHEN_CHANGED); h206_grp2->end(); h206_tab_plan->end(); h206_tab_treatment = new Fl_Group(0, Y+25, 570, 360, _("Trmnt")); h206_txt_location = new Fl_Input2(4, Y+49, 278, 24, _("Location")); h206_txt_location->tooltip(_("location of staff treatment area")); h206_txt_location->box(FL_DOWN_BOX); h206_txt_location->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_location->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_location->labeltype(FL_NORMAL_LABEL); h206_txt_location->labelfont(0); h206_txt_location->labelsize(14); h206_txt_location->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_location->align(FL_ALIGN_TOP_LEFT); h206_txt_location->callback(hics_changed); h206_txt_location->when(FL_WHEN_CHANGED); h206_txt_loc_contact = new Fl_Input2(284, Y+49, 278, 24, _("Contact Information")); h206_txt_loc_contact->tooltip(_("")); h206_txt_loc_contact->box(FL_DOWN_BOX); h206_txt_loc_contact->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_loc_contact->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_loc_contact->labeltype(FL_NORMAL_LABEL); h206_txt_loc_contact->labelfont(0); h206_txt_loc_contact->labelsize(14); h206_txt_loc_contact->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_loc_contact->align(FL_ALIGN_TOP_LEFT); h206_txt_loc_contact->callback(hics_changed); h206_txt_loc_contact->when(FL_WHEN_CHANGED); h206_txt_team_leader = new Fl_Input2(4, Y+97, 278, 24, _("Treatment area team leader")); h206_txt_team_leader->tooltip(_("")); h206_txt_team_leader->box(FL_DOWN_BOX); h206_txt_team_leader->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_team_leader->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_team_leader->labeltype(FL_NORMAL_LABEL); h206_txt_team_leader->labelfont(0); h206_txt_team_leader->labelsize(14); h206_txt_team_leader->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_team_leader->align(FL_ALIGN_TOP_LEFT); h206_txt_team_leader->callback(hics_changed); h206_txt_team_leader->when(FL_WHEN_CHANGED); h206_txt_team_contact = new Fl_Input2(284, Y+97, 278, 24, _("Contact Information")); h206_txt_team_contact->tooltip(_("")); h206_txt_team_contact->box(FL_DOWN_BOX); h206_txt_team_contact->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_team_contact->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_team_contact->labeltype(FL_NORMAL_LABEL); h206_txt_team_contact->labelfont(0); h206_txt_team_contact->labelsize(14); h206_txt_team_contact->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_team_contact->align(FL_ALIGN_TOP_LEFT); h206_txt_team_contact->callback(hics_changed); h206_txt_team_contact->when(FL_WHEN_CHANGED); h206_txt_special_instructions = new FTextEdit(4, Y+145, 562, 230, _("Special Instructions")); h206_txt_special_instructions->box(FL_DOWN_FRAME); h206_txt_special_instructions->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_special_instructions->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_special_instructions->labeltype(FL_NORMAL_LABEL); h206_txt_special_instructions->labelfont(0); h206_txt_special_instructions->labelsize(14); h206_txt_special_instructions->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_special_instructions->align(FL_ALIGN_TOP_LEFT); h206_txt_special_instructions->callback(hics_changed); h206_txt_special_instructions->when(FL_WHEN_CHANGED); h206_tab_treatment->end(); h206_tab_staff = new Fl_Group(0, Y+25, 570, 360, _("Staff/Trans'")); h206_grp3 = new Fl_Group(2, Y+28, 566, 155, "Staff"); h206_grp3->box(FL_ENGRAVED_FRAME); h206_grp3->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h206_txt_md_do = new Fl_Input2(110, Y+50, 445, 24, _("MD/DO")); h206_txt_md_do->tooltip(_("medical doctor")); h206_txt_md_do->box(FL_DOWN_BOX); h206_txt_md_do->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_md_do->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_md_do->labeltype(FL_NORMAL_LABEL); h206_txt_md_do->labelfont(0); h206_txt_md_do->labelsize(14); h206_txt_md_do->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_md_do->align(FL_ALIGN_LEFT); h206_txt_md_do->callback(hics_changed); h206_txt_md_do->when(FL_WHEN_CHANGED); h206_txt_pa_np = new Fl_Input2(110, Y+76, 445, 24, _("PA/NP")); h206_txt_pa_np->tooltip(_("physicians assistant / nurse practitioner")); h206_txt_pa_np->box(FL_DOWN_BOX); h206_txt_pa_np->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_pa_np->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_pa_np->labeltype(FL_NORMAL_LABEL); h206_txt_pa_np->labelfont(0); h206_txt_pa_np->labelsize(14); h206_txt_pa_np->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_pa_np->align(FL_ALIGN_LEFT); h206_txt_pa_np->callback(hics_changed); h206_txt_pa_np->when(FL_WHEN_CHANGED); h206_txt_rn_lpn = new Fl_Input2(110, Y+102, 445, 24, _("RN/LPN")); h206_txt_rn_lpn->tooltip(_("registered nurse / licensed practical nurse")); h206_txt_rn_lpn->box(FL_DOWN_BOX); h206_txt_rn_lpn->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_rn_lpn->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_rn_lpn->labeltype(FL_NORMAL_LABEL); h206_txt_rn_lpn->labelfont(0); h206_txt_rn_lpn->labelsize(14); h206_txt_rn_lpn->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_rn_lpn->align(FL_ALIGN_LEFT); h206_txt_rn_lpn->callback(hics_changed); h206_txt_rn_lpn->when(FL_WHEN_CHANGED); h206_txt_tech_cn = new Fl_Input2(110, Y+128, 445, 24, _("Tech/CN")); h206_txt_tech_cn->tooltip(_("technician")); h206_txt_tech_cn->box(FL_DOWN_BOX); h206_txt_tech_cn->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_tech_cn->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_tech_cn->labeltype(FL_NORMAL_LABEL); h206_txt_tech_cn->labelfont(0); h206_txt_tech_cn->labelsize(14); h206_txt_tech_cn->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_tech_cn->align(FL_ALIGN_LEFT); h206_txt_tech_cn->callback(hics_changed); h206_txt_tech_cn->when(FL_WHEN_CHANGED); h206_txt_team_other = new Fl_Input2(110, Y+154, 445, 24, _("Team-other")); h206_txt_team_other->tooltip(_("")); h206_txt_team_other->box(FL_DOWN_BOX); h206_txt_team_other->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_team_other->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_team_other->labeltype(FL_NORMAL_LABEL); h206_txt_team_other->labelfont(0); h206_txt_team_other->labelsize(14); h206_txt_team_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_team_other->align(FL_ALIGN_LEFT); h206_txt_team_other->callback(hics_changed); h206_txt_team_other->when(FL_WHEN_CHANGED); h206_grp3->end(); h206_grp4 = new Fl_Group(2, Y+185, 566, 165, "Transportation"); h206_grp4->box(FL_ENGRAVED_FRAME); h206_grp4->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h206_txt_litters = new Fl_Input2(110, Y+210, 445, 24, _("Litters")); h206_txt_litters->tooltip(_("")); h206_txt_litters->box(FL_DOWN_BOX); h206_txt_litters->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_litters->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_litters->labeltype(FL_NORMAL_LABEL); h206_txt_litters->labelfont(0); h206_txt_litters->labelsize(14); h206_txt_litters->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_litters->align(FL_ALIGN_LEFT); h206_txt_litters->callback(hics_changed); h206_txt_litters->when(FL_WHEN_CHANGED); h206_txt_portable = new Fl_Input2(110, Y+236, 445, 24, _("Portable")); h206_txt_portable->tooltip(_("")); h206_txt_portable->box(FL_DOWN_BOX); h206_txt_portable->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_portable->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_portable->labeltype(FL_NORMAL_LABEL); h206_txt_portable->labelfont(0); h206_txt_portable->labelsize(14); h206_txt_portable->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_portable->align(FL_ALIGN_LEFT); h206_txt_portable->callback(hics_changed); h206_txt_portable->when(FL_WHEN_CHANGED); h206_txt_transport = new Fl_Input2(110, Y+262, 445, 24, _("Transport")); h206_txt_transport->tooltip(_("")); h206_txt_transport->box(FL_DOWN_BOX); h206_txt_transport->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_transport->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_transport->labeltype(FL_NORMAL_LABEL); h206_txt_transport->labelfont(0); h206_txt_transport->labelsize(14); h206_txt_transport->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_transport->align(FL_ALIGN_LEFT); h206_txt_transport->callback(hics_changed); h206_txt_transport->when(FL_WHEN_CHANGED); h206_txt_wheelchairs = new Fl_Input2(110, Y+288, 445, 24, _("Wheelchairs")); h206_txt_wheelchairs->tooltip(_("")); h206_txt_wheelchairs->box(FL_DOWN_BOX); h206_txt_wheelchairs->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_wheelchairs->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_wheelchairs->labeltype(FL_NORMAL_LABEL); h206_txt_wheelchairs->labelfont(0); h206_txt_wheelchairs->labelsize(14); h206_txt_wheelchairs->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_wheelchairs->align(FL_ALIGN_LEFT); h206_txt_wheelchairs->callback(hics_changed); h206_txt_wheelchairs->when(FL_WHEN_CHANGED); h206_txt_transport_other = new Fl_Input2(110, Y+314, 445, 24, _("Trans'-other")); h206_txt_transport_other->tooltip(_("")); h206_txt_transport_other->box(FL_DOWN_BOX); h206_txt_transport_other->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_transport_other->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_transport_other->labeltype(FL_NORMAL_LABEL); h206_txt_transport_other->labelfont(0); h206_txt_transport_other->labelsize(14); h206_txt_transport_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_transport_other->align(FL_ALIGN_LEFT); h206_txt_transport_other->callback(hics_changed); h206_txt_transport_other->when(FL_WHEN_CHANGED); h206_grp4->end(); h206_tab_staff->end(); h206_tab_medicines = new Fl_Group(0, Y+25, 570, 360, _("Med/Supply")); Fl_Group *h206_grp5 = new Fl_Group(2, Y+28, 566, 155, "Medicines"); h206_grp5->box(FL_ENGRAVED_FRAME); h206_grp5->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h206_txt_meds_1 = new Fl_Input2(110, Y+50, 445, 24, _("Medicine")); h206_txt_meds_1->tooltip(_("")); h206_txt_meds_1->box(FL_DOWN_BOX); h206_txt_meds_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_meds_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_meds_1->labeltype(FL_NORMAL_LABEL); h206_txt_meds_1->labelfont(0); h206_txt_meds_1->labelsize(14); h206_txt_meds_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_meds_1->align(FL_ALIGN_LEFT); h206_txt_meds_1->callback(hics_changed); h206_txt_meds_1->when(FL_WHEN_CHANGED); h206_txt_meds_2 = new Fl_Input2(110, Y+76, 445, 24, _("Medicine")); h206_txt_meds_2->tooltip(_("")); h206_txt_meds_2->box(FL_DOWN_BOX); h206_txt_meds_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_meds_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_meds_2->labeltype(FL_NORMAL_LABEL); h206_txt_meds_2->labelfont(0); h206_txt_meds_2->labelsize(14); h206_txt_meds_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_meds_2->align(FL_ALIGN_LEFT); h206_txt_meds_2->callback(hics_changed); h206_txt_meds_2->when(FL_WHEN_CHANGED); h206_txt_meds_3 = new Fl_Input2(110, Y+102, 445, 24, _("Medicine")); h206_txt_meds_3->tooltip(_("")); h206_txt_meds_3->box(FL_DOWN_BOX); h206_txt_meds_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_meds_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_meds_3->labeltype(FL_NORMAL_LABEL); h206_txt_meds_3->labelfont(0); h206_txt_meds_3->labelsize(14); h206_txt_meds_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_meds_3->align(FL_ALIGN_LEFT); h206_txt_meds_3->callback(hics_changed); h206_txt_meds_3->when(FL_WHEN_CHANGED); h206_txt_meds_4 = new Fl_Input2(110, Y+128, 445, 24, _("Medicine")); h206_txt_meds_4->tooltip(_("")); h206_txt_meds_4->box(FL_DOWN_BOX); h206_txt_meds_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_meds_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_meds_4->labeltype(FL_NORMAL_LABEL); h206_txt_meds_4->labelfont(0); h206_txt_meds_4->labelsize(14); h206_txt_meds_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_meds_4->align(FL_ALIGN_LEFT); h206_txt_meds_4->callback(hics_changed); h206_txt_meds_4->when(FL_WHEN_CHANGED); h206_txt_meds_5 = new Fl_Input2(110, Y+154, 445, 24, _("Medicine")); h206_txt_meds_5->tooltip(_("")); h206_txt_meds_5->box(FL_DOWN_BOX); h206_txt_meds_5->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_meds_5->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_meds_5->labeltype(FL_NORMAL_LABEL); h206_txt_meds_5->labelfont(0); h206_txt_meds_5->labelsize(14); h206_txt_meds_5->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_meds_5->align(FL_ALIGN_LEFT); h206_txt_meds_5->callback(hics_changed); h206_txt_meds_5->when(FL_WHEN_CHANGED); h206_grp5->end(); h206_grp6 = new Fl_Group(2, Y+185, 566, 165, "Supplies"); h206_grp6->box(FL_ENGRAVED_FRAME); h206_grp6->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); h206_txt_supp_1 = new Fl_Input2(110, Y+210, 445, 24, _("Supply")); h206_txt_supp_1->tooltip(_("")); h206_txt_supp_1->box(FL_DOWN_BOX); h206_txt_supp_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_supp_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_supp_1->labeltype(FL_NORMAL_LABEL); h206_txt_supp_1->labelfont(0); h206_txt_supp_1->labelsize(14); h206_txt_supp_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_supp_1->align(FL_ALIGN_LEFT); h206_txt_supp_1->callback(hics_changed); h206_txt_supp_1->when(FL_WHEN_CHANGED); h206_txt_supp_2 = new Fl_Input2(110, Y+236, 445, 24, _("Supply")); h206_txt_supp_2->tooltip(_("")); h206_txt_supp_2->box(FL_DOWN_BOX); h206_txt_supp_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_supp_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_supp_2->labeltype(FL_NORMAL_LABEL); h206_txt_supp_2->labelfont(0); h206_txt_supp_2->labelsize(14); h206_txt_supp_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_supp_2->align(FL_ALIGN_LEFT); h206_txt_supp_2->callback(hics_changed); h206_txt_supp_2->when(FL_WHEN_CHANGED); h206_txt_supp_3 = new Fl_Input2(110, Y+262, 445, 24, _("Supply")); h206_txt_supp_3->tooltip(_("")); h206_txt_supp_3->box(FL_DOWN_BOX); h206_txt_supp_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_supp_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_supp_3->labeltype(FL_NORMAL_LABEL); h206_txt_supp_3->labelfont(0); h206_txt_supp_3->labelsize(14); h206_txt_supp_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_supp_3->align(FL_ALIGN_LEFT); h206_txt_supp_3->callback(hics_changed); h206_txt_supp_3->when(FL_WHEN_CHANGED); h206_txt_supp_4 = new Fl_Input2(110, Y+288, 445, 24, _("Supply")); h206_txt_supp_4->tooltip(_("")); h206_txt_supp_4->box(FL_DOWN_BOX); h206_txt_supp_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_supp_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_supp_4->labeltype(FL_NORMAL_LABEL); h206_txt_supp_4->labelfont(0); h206_txt_supp_4->labelsize(14); h206_txt_supp_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_supp_4->align(FL_ALIGN_LEFT); h206_txt_supp_4->callback(hics_changed); h206_txt_supp_4->when(FL_WHEN_CHANGED); h206_txt_supp_5 = new Fl_Input2(110, Y+314, 445, 24, _("Supply")); h206_txt_supp_5->tooltip(_("")); h206_txt_supp_5->box(FL_DOWN_BOX); h206_txt_supp_5->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_supp_5->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_supp_5->labeltype(FL_NORMAL_LABEL); h206_txt_supp_5->labelfont(0); h206_txt_supp_5->labelsize(14); h206_txt_supp_5->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_supp_5->align(FL_ALIGN_LEFT); h206_txt_supp_5->callback(hics_changed); h206_txt_supp_5->when(FL_WHEN_CHANGED); h206_grp6->end(); h206_tab_medicines->end(); h206_tab_sites = new Fl_Group(0, Y+25, 570, 360, _("Sites")); h206_txt_site_1 = new Fl_Input2(80, Y+40, 200, 24, _("Name")); h206_txt_site_1->tooltip(_("")); h206_txt_site_1->box(FL_DOWN_BOX); h206_txt_site_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_site_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_site_1->labeltype(FL_NORMAL_LABEL); h206_txt_site_1->labelfont(0); h206_txt_site_1->labelsize(14); h206_txt_site_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_site_1->align(FL_ALIGN_LEFT); h206_txt_site_1->callback(hics_changed); h206_txt_site_1->when(FL_WHEN_CHANGED); h206_txt_phone_1 = new Fl_Input2(360, Y+40, 200, 24, _("Phone")); h206_txt_phone_1->tooltip(_("")); h206_txt_phone_1->box(FL_DOWN_BOX); h206_txt_phone_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_phone_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_phone_1->labeltype(FL_NORMAL_LABEL); h206_txt_phone_1->labelfont(0); h206_txt_phone_1->labelsize(14); h206_txt_phone_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_phone_1->align(FL_ALIGN_LEFT); h206_txt_phone_1->callback(hics_changed); h206_txt_phone_1->when(FL_WHEN_CHANGED); h206_txt_address_1 = new Fl_Input2(80, Y+66, 200, 24, _("Address")); h206_txt_address_1->tooltip(_("")); h206_txt_address_1->box(FL_DOWN_BOX); h206_txt_address_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_address_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_address_1->labeltype(FL_NORMAL_LABEL); h206_txt_address_1->labelfont(0); h206_txt_address_1->labelsize(14); h206_txt_address_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_address_1->align(FL_ALIGN_LEFT); h206_txt_address_1->callback(hics_changed); h206_txt_address_1->when(FL_WHEN_CHANGED); h206_txt_spec_care_1 = new Fl_Input2(360, Y+66, 200, 24, _("Spec care")); h206_txt_spec_care_1->tooltip(_("")); h206_txt_spec_care_1->box(FL_DOWN_BOX); h206_txt_spec_care_1->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_spec_care_1->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_spec_care_1->labeltype(FL_NORMAL_LABEL); h206_txt_spec_care_1->labelfont(0); h206_txt_spec_care_1->labelsize(14); h206_txt_spec_care_1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_spec_care_1->align(FL_ALIGN_LEFT); h206_txt_spec_care_1->callback(hics_changed); h206_txt_spec_care_1->when(FL_WHEN_CHANGED); h206_txt_site_2 = new Fl_Input2(80, Y+106, 200, 24, _("Name")); h206_txt_site_2->tooltip(_("")); h206_txt_site_2->box(FL_DOWN_BOX); h206_txt_site_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_site_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_site_2->labeltype(FL_NORMAL_LABEL); h206_txt_site_2->labelfont(0); h206_txt_site_2->labelsize(14); h206_txt_site_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_site_2->align(FL_ALIGN_LEFT); h206_txt_site_2->callback(hics_changed); h206_txt_site_2->when(FL_WHEN_CHANGED); h206_txt_phone_2 = new Fl_Input2(360, Y+106, 200, 24, _("Phone")); h206_txt_phone_2->tooltip(_("")); h206_txt_phone_2->box(FL_DOWN_BOX); h206_txt_phone_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_phone_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_phone_2->labeltype(FL_NORMAL_LABEL); h206_txt_phone_2->labelfont(0); h206_txt_phone_2->labelsize(14); h206_txt_phone_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_phone_2->align(FL_ALIGN_LEFT); h206_txt_phone_2->callback(hics_changed); h206_txt_phone_2->when(FL_WHEN_CHANGED); h206_txt_address_2 = new Fl_Input2(80, Y+132, 200, 24, _("Address")); h206_txt_address_2->tooltip(_("")); h206_txt_address_2->box(FL_DOWN_BOX); h206_txt_address_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_address_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_address_2->labeltype(FL_NORMAL_LABEL); h206_txt_address_2->labelfont(0); h206_txt_address_2->labelsize(14); h206_txt_address_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_address_2->align(FL_ALIGN_LEFT); h206_txt_address_2->callback(hics_changed); h206_txt_address_2->when(FL_WHEN_CHANGED); h206_txt_spec_care_2 = new Fl_Input2(360, Y+132, 200, 24, _("Spec care")); h206_txt_spec_care_2->tooltip(_("")); h206_txt_spec_care_2->box(FL_DOWN_BOX); h206_txt_spec_care_2->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_spec_care_2->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_spec_care_2->labeltype(FL_NORMAL_LABEL); h206_txt_spec_care_2->labelfont(0); h206_txt_spec_care_2->labelsize(14); h206_txt_spec_care_2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_spec_care_2->align(FL_ALIGN_LEFT); h206_txt_spec_care_2->callback(hics_changed); h206_txt_spec_care_2->when(FL_WHEN_CHANGED); h206_txt_site_3 = new Fl_Input2(80, Y+172, 200, 24, _("Name")); h206_txt_site_3->tooltip(_("")); h206_txt_site_3->box(FL_DOWN_BOX); h206_txt_site_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_site_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_site_3->labeltype(FL_NORMAL_LABEL); h206_txt_site_3->labelfont(0); h206_txt_site_3->labelsize(14); h206_txt_site_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_site_3->align(FL_ALIGN_LEFT); h206_txt_site_3->callback(hics_changed); h206_txt_site_3->when(FL_WHEN_CHANGED); h206_txt_phone_3 = new Fl_Input2(360, Y+172, 200, 24, _("Phone")); h206_txt_phone_3->tooltip(_("")); h206_txt_phone_3->box(FL_DOWN_BOX); h206_txt_phone_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_phone_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_phone_3->labeltype(FL_NORMAL_LABEL); h206_txt_phone_3->labelfont(0); h206_txt_phone_3->labelsize(14); h206_txt_phone_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_phone_3->align(FL_ALIGN_LEFT); h206_txt_phone_3->callback(hics_changed); h206_txt_phone_3->when(FL_WHEN_CHANGED); h206_txt_address_3 = new Fl_Input2(80, Y+198, 200, 24, _("Address")); h206_txt_address_3->tooltip(_("")); h206_txt_address_3->box(FL_DOWN_BOX); h206_txt_address_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_address_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_address_3->labeltype(FL_NORMAL_LABEL); h206_txt_address_3->labelfont(0); h206_txt_address_3->labelsize(14); h206_txt_address_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_address_3->align(FL_ALIGN_LEFT); h206_txt_address_3->callback(hics_changed); h206_txt_address_3->when(FL_WHEN_CHANGED); h206_txt_spec_care_3 = new Fl_Input2(360, Y+198, 200, 24, _("Spec care")); h206_txt_spec_care_3->tooltip(_("")); h206_txt_spec_care_3->box(FL_DOWN_BOX); h206_txt_spec_care_3->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_spec_care_3->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_spec_care_3->labeltype(FL_NORMAL_LABEL); h206_txt_spec_care_3->labelfont(0); h206_txt_spec_care_3->labelsize(14); h206_txt_spec_care_3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_spec_care_3->align(FL_ALIGN_LEFT); h206_txt_spec_care_3->callback(hics_changed); h206_txt_spec_care_3->when(FL_WHEN_CHANGED); h206_txt_site_4 = new Fl_Input2(80, Y+238, 200, 24, _("Name")); h206_txt_site_4->tooltip(_("")); h206_txt_site_4->box(FL_DOWN_BOX); h206_txt_site_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_site_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_site_4->labeltype(FL_NORMAL_LABEL); h206_txt_site_4->labelfont(0); h206_txt_site_4->labelsize(14); h206_txt_site_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_site_4->align(FL_ALIGN_LEFT); h206_txt_site_4->callback(hics_changed); h206_txt_site_4->when(FL_WHEN_CHANGED); h206_txt_phone_4 = new Fl_Input2(360, Y+238, 200, 24, _("Phone")); h206_txt_phone_4->tooltip(_("")); h206_txt_phone_4->box(FL_DOWN_BOX); h206_txt_phone_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_phone_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_phone_4->labeltype(FL_NORMAL_LABEL); h206_txt_phone_4->labelfont(0); h206_txt_phone_4->labelsize(14); h206_txt_phone_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_phone_4->align(FL_ALIGN_LEFT); h206_txt_phone_4->callback(hics_changed); h206_txt_phone_4->when(FL_WHEN_CHANGED); h206_txt_address_4 = new Fl_Input2(80, Y+264, 200, 24, _("Address")); h206_txt_address_4->tooltip(_("")); h206_txt_address_4->box(FL_DOWN_BOX); h206_txt_address_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_address_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_address_4->labeltype(FL_NORMAL_LABEL); h206_txt_address_4->labelfont(0); h206_txt_address_4->labelsize(14); h206_txt_address_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_address_4->align(FL_ALIGN_LEFT); h206_txt_address_4->callback(hics_changed); h206_txt_address_4->when(FL_WHEN_CHANGED); h206_txt_spec_care_4 = new Fl_Input2(360, Y+264, 200, 24, _("Spec care")); h206_txt_spec_care_4->tooltip(_("")); h206_txt_spec_care_4->box(FL_DOWN_BOX); h206_txt_spec_care_4->color((Fl_Color)FL_BACKGROUND2_COLOR); h206_txt_spec_care_4->selection_color((Fl_Color)FL_SELECTION_COLOR); h206_txt_spec_care_4->labeltype(FL_NORMAL_LABEL); h206_txt_spec_care_4->labelfont(0); h206_txt_spec_care_4->labelsize(14); h206_txt_spec_care_4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); h206_txt_spec_care_4->align(FL_ALIGN_LEFT); h206_txt_spec_care_4->callback(hics_changed); h206_txt_spec_care_4->when(FL_WHEN_CHANGED); h206_tab_sites->end(); h206_tab_type->end(); Fl_Group::current()->resizable(h206_tab_type); h206_tab->end(); h206_tab->hide(); } flmsg-2.0.10/src/hics/hics214.cxx0000664000175000017500000003766112330516146013261 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include using namespace std; // --------------------------------------------------------------------- // hics 214 field variables and template variables // --------------------------------------------------------------------- string hics214_tag_incident = ":1:"; string hics214_tag_date = ":2:"; string hics214_tag_time = ":2a:"; string hics214_tag_op_period = ":3:"; string hics214_tag_sec_brch = ":4:"; string hics214_tag_position = ":5:"; string hics214_tag_activity_time = ":T[n]:"; // 30 string hics214_tag_activity_event = ":E[n]:"; string hics214_tag_prepared_by = ":7:"; string hics214_tag_facility = ":8:"; // new field string hics214_incident; string hics214_date; string hics214_time; string hics214_op_period; string hics214_sec_brch; string hics214_position; string hics214_activity_time[30]; string hics214_activity_event[30]; string hics214_prepared_by; string hics214_facility; // ===================================================================== string hics214_buff; string hics214_def_filename = ""; string hics214_base_filename = ""; string hics214_template_name = ""; bool hics214_using_template = false; void hics214_cb_set_date() { hics214_txt_date->value(szDate()); } void hics214_cb_set_time() { hics214_txt_time->value(szTime()); } void hics214_clear_fields() { hics214_incident.clear(); hics214_date.clear(); hics214_time.clear(); hics214_op_period.clear(); hics214_sec_brch.clear(); hics214_position.clear(); hics214_prepared_by.clear(); hics214_facility.clear(); for (int i = 0; i < 30; i++) { hics214_activity_time[i].clear(); hics214_activity_event[i].clear(); } } bool check_hics214fields() { if (hics214_incident != hics214_txt_incident->value()) return true; if (hics214_date != hics214_txt_date->value()) return true; if (hics214_time != hics214_txt_time->value()) return true; if (hics214_op_period != hics214_txt_op_period->value()) return true; if (hics214_sec_brch != hics214_txt_sec_brch->value()) return true; if (hics214_position != hics214_txt_position->value()) return true; if (hics214_prepared_by != hics214_txt_prepared_by->value()) return true; if (hics214_facility != hics214_txt_facility->value()) return true; for (int i = 0; i < 30; i++) { if (hics214_activity_time[i] != hics214_txt_activity_time[i]->value()) return true; if (hics214_activity_event[i] != hics214_txt_activity_event[i]->value()) return true; } return false; } void hics214_update_fields() { hics214_incident = hics214_txt_incident->value(); hics214_date = hics214_txt_date->value(); hics214_time = hics214_txt_time->value(); hics214_op_period = hics214_txt_op_period->value(); hics214_sec_brch = hics214_txt_sec_brch->value(); hics214_position = hics214_txt_position->value(); hics214_prepared_by = hics214_txt_prepared_by->value(); hics214_facility = hics214_txt_facility->value(); for (int i = 0; i < 30; i++) { hics214_activity_time[i] = hics214_txt_activity_time[i]->value(); hics214_activity_event[i] = hics214_txt_activity_event[i]->value(); } } void hics214_update_form() { hics214_txt_incident->value(hics214_incident.c_str()); hics214_txt_date->value(hics214_date.c_str()); hics214_txt_time->value(hics214_time.c_str()); hics214_txt_op_period->value(hics214_op_period.c_str()); hics214_txt_sec_brch->value(hics214_sec_brch.c_str()); hics214_txt_position->value(hics214_position.c_str()); hics214_txt_prepared_by->value(hics214_prepared_by.c_str()); hics214_txt_facility->value(hics214_facility.c_str()); for (int i = 0; i < 30; i++) { hics214_txt_activity_time[i]->value(hics214_activity_time[i].c_str()); hics214_txt_activity_event[i]->value(hics214_activity_event[i].c_str()); } } void hics214_clear_form() { hics214_clear_fields(); hics214_update_form(); } static string &hics_nn(string & subst, int n) { static string garbage = "#$^*!"; static string hics; hics.clear(); hics = subst; size_t pos = hics.find("["); if (pos == string::npos) return garbage; pos++; hics[pos] = '0' + (n/10 % 10); hics[pos+1] = '0' + n % 10; hics[pos+2] = ']'; hics += ':'; return hics; } void hics214_make_buff(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( hics214_tag_incident, hics214_incident ) ); mbuff.append( lineout( hics214_tag_date, hics214_date ) ); mbuff.append( lineout( hics214_tag_time, hics214_time ) ); mbuff.append( lineout( hics214_tag_op_period, hics214_op_period ) ); mbuff.append( lineout( hics214_tag_sec_brch, hics214_sec_brch) ); mbuff.append( lineout( hics214_tag_position, hics214_position) ); mbuff.append( lineout( hics214_tag_prepared_by, hics214_prepared_by ) ); mbuff.append( lineout( hics214_tag_facility, hics214_facility ) ); for (int i = 0; i < 30; i++) { mbuff.append( lineout( hics_nn( hics214_tag_activity_time, i ), hics214_activity_time[i] ) ); mbuff.append( lineout( hics_nn( hics214_tag_activity_event, i ), hics214_activity_event[i] ) ); } if (compress) compress_maybe(mbuff); hics214_buff.append(mbuff); } void hics214_read_buffer(string data) { hics214_clear_fields(); read_header(data); hics214_incident = findstr(data, hics214_tag_incident); hics214_date = findstr(data, hics214_tag_date); hics214_time = findstr(data, hics214_tag_time); hics214_op_period = findstr(data, hics214_tag_op_period); hics214_sec_brch = findstr(data, hics214_tag_sec_brch); hics214_position = findstr(data, hics214_tag_position); hics214_prepared_by = findstr(data, hics214_tag_prepared_by); hics214_facility = findstr(data, hics214_tag_facility); for (int i = 0; i < 30; i++) { hics214_activity_time[i] = findstr(data, hics_nn( hics214_tag_activity_time, i ) ); hics214_activity_event[i] = findstr(data, hics_nn( hics214_tag_activity_event, i ) ); } hics214_update_form(); } void hics214_cb_new() { if (check_hics214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); hics214_cb_save(); } } hics214_clear_form(); clear_header(); hics214_def_filename = ICS_msg_dir; hics214_def_filename.append("new"HF214_EXT); show_filename(hics214_def_filename); hics214_using_template = false; } void hics214_cb_import() { fl_alert2("Not implemented"); } void hics214_cb_export() { fl_alert2("Not implemented"); } void hics214_cb_wrap_import(string wrapfilename, string inpbuffer) { hics214_clear_form(); hics214_read_buffer(inpbuffer); hics214_def_filename = ICS_msg_dir; hics214_def_filename.append(wrapfilename); show_filename(hics214_def_filename); hics214_using_template = false; } int eval_hics214_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(hics214_base_filename).append("]"); hics214_update_fields(); update_header(FROM); evalstr.append(header("")); hics214_buff.clear(); hics214_make_buff(true); if (hics214_buff.empty()) return 0; compress_maybe( hics214_buff ); evalstr.append( hics214_buff ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void hics214_cb_wrap_export() { if (check_hics214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } hics214_update_fields(); if (hics214_base_filename == "new"HF214_EXT || hics214_base_filename == "default"HF214_EXT) hics214_cb_save_as(); string wrapfilename = WRAP_send_dir; wrapfilename.append(hics214_base_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); hics214_buff.assign(header("")); hics214_make_buff(true); export_wrapfile(hics214_base_filename, wrapfilename, hics214_buff, pext != ".wrap"); hics214_buff.assign(header("")); hics214_make_buff(false); hics214_write(hics214_def_filename); } } void hics214_cb_wrap_autosend() { if (check_hics214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } hics214_update_fields(); if (hics214_base_filename == "new"HF214_EXT || hics214_base_filename == "default"HF214_EXT) hics214_cb_save_as(); update_header(FROM); hics214_buff.assign(header("")); hics214_make_buff(true); xfr_via_socket(hics214_base_filename,hics214_buff); hics214_buff.assign(header("")); hics214_make_buff(false); hics214_write(hics214_def_filename); } void hics214_cb_load_template() { string hics214_def_filename = hics214_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"HT214_EXT, hics214_def_filename.c_str()); if (p) { hics214_clear_form(); read_data_file(p); hics214_template_name = p; show_filename(hics214_template_name); hics214_using_template = true; } } void hics214_cb_save_template() { if (!hics214_using_template) { hics214_cb_save_as_template(); return; } string hics214_def_filename = hics214_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"HT214_EXT, hics214_def_filename.c_str()); if (p) { update_header(CHANGED); hics214_update_fields(); hics214_buff.assign(header("")); hics214_make_buff(); hics214_write(p); } } void hics214_cb_save_as_template() { string hics214_def_filename = hics214_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"HT214_EXT, hics214_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); hics214_template_name = p; if (strlen(pext) == 0) hics214_template_name.append(HT214_EXT); remove_spaces_from_filename(hics214_template_name); clear_header(); update_header(CHANGED); hics214_update_fields(); hics214_buff.assign(header("")); hics214_make_buff(); hics214_write(hics214_template_name); show_filename(hics214_template_name); hics214_using_template = true; } } void hics214_cb_open() { const char *p = FSEL::select(_("Open data file"), "HICS-214\t*"HF214_EXT, hics214_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; hics214_clear_form(); read_data_file(p); hics214_using_template = false; hics214_def_filename = p; show_filename(hics214_def_filename); } void hics214_write(string s) { FILE *file214 = fopen(s.c_str(), "w"); if (!file214) return; fwrite(hics214_buff.c_str(), hics214_buff.length(), 1, file214); fclose(file214); } bool hics214_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(HF214_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = hics214_def_filename; p = FSEL::saveas(_("Save data file"), "HICS-214\t*"HF214_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); hics214_def_filename = p; if (strlen(pext) == 0) hics214_def_filename.append(HF214_EXT); remove_spaces_from_filename(hics214_def_filename); hics214_update_fields(); update_header(NEW); hics214_buff.assign(header("")); hics214_make_buff(); hics214_write(hics214_def_filename); hics214_using_template = false; show_filename(hics214_def_filename); return true; } void hics214_cb_save() { if (hics214_base_filename == "new"HF214_EXT || hics214_base_filename == "default"HF214_EXT || hics214_using_template == true) { hics214_cb_save_as(); return; } if (check_hics214fields()) update_header(CHANGED); hics214_buff.assign(header("")); hics214_update_fields(); hics214_make_buff(); hics214_write(hics214_def_filename); hics214_using_template = false; } void hics214_cb_html() { string fname_name = fl_filename_name(hics214_def_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string hics214_fname = ICS_dir; hics214_fname.append(fname_name); hics214_fname.append(".html"); string html_text = ""; hics214_update_fields(); string form214 = hics214_html_template; replacestr(form214, TITLE, fname_name); replacestr(form214, hics214_tag_incident, hics214_incident ); replacestr(form214, hics214_tag_date, hics214_date ); replacestr(form214, hics214_tag_time, hics214_time ); replacestr(form214, hics214_tag_op_period, hics214_op_period ); replacestr(form214, hics214_tag_sec_brch, hics214_sec_brch ); replacestr(form214, hics214_tag_position, hics214_position ); replacestr(form214, hics214_tag_prepared_by, hics214_prepared_by ); replacestr(form214, hics214_tag_facility, hics214_facility ); for (int i = 0; i < 30; i++) { replacestr(form214, hics_nn( hics214_tag_activity_time, i ), hics214_activity_time[i] ); replacestr(form214, hics_nn( hics214_tag_activity_event, i ), hics214_activity_event[i] ); } FILE *file214 = fopen(hics214_fname.c_str(), "w"); fprintf(file214,"%s", form214.c_str()); fclose(file214); open_url(hics214_fname.c_str()); } void hics214_cb_textout() { string hics214_fname = ICS_dir; hics214_fname.append("hics214.txt"); hics214_update_fields(); string form214 = hics214_text_template; replacestr(form214, hics214_tag_incident, hics214_incident ); replacestr(form214, hics214_tag_date, hics214_date ); replacestr(form214, hics214_tag_time, hics214_time ); replacestr(form214, hics214_tag_op_period, hics214_op_period ); replacestr(form214, hics214_tag_sec_brch, hics214_sec_brch ); replacestr(form214, hics214_tag_position, hics214_position ); replacestr(form214, hics214_tag_prepared_by, hics214_prepared_by ); replacestr(form214, hics214_tag_facility, hics214_facility ); for (int i = 0; i < 30; i++) { replacestr(form214, hics_nn( hics214_tag_activity_time, i ), hics214_activity_time[i] ); replacestr(form214, hics_nn( hics214_tag_activity_event, i ), hics214_activity_event[i] ); } FILE *file214 = fopen(hics214_fname.c_str(), "w"); fprintf(file214,"%s", form214.c_str()); fclose(file214); open_url(hics214_fname.c_str()); } flmsg-2.0.10/src/hics/hics203_tab.cxx0000664000175000017500000010142012330516146014066 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_hics203 = (Fl_Group *)0; Fl_Tabs *tab_hics203_type = (Fl_Tabs *)0; Fl_Group *tab_hics203_1 = (Fl_Group *)0; Fl_Input2 *txt_hics203_incident = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_date = (Fl_Input2 *)0; Fl_Button *btn_hics203_date = (Fl_Button *)0; Fl_Input2 *txt_hics203_time = (Fl_Input2 *)0; Fl_Button *btn_hics203_time = (Fl_Button *)0; Fl_Input2 *txt_hics203_op_period = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_incident_commander = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_incident_safety_officer = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_incident_info_officer = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_liaison_officer = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_prepared_by = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_facility = (Fl_Input2 *)0; Fl_Group *tab_hics203_tech_spec = (Fl_Group *)0; Fl_Input2 *txt_hics203_tech_spc[6]={(Fl_Input2 *)0}; Fl_Group *tab_hics203_planning = (Fl_Group *)0; Fl_Input2 *txt_hics203_planning_chief = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_planning_other = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_res_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_sit_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_doc_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_dem_unit = (Fl_Input2 *)0; Fl_Group *tab_hics203_logisthics = (Fl_Group *)0; Fl_Input2 *txt_hics203_log_chief = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_log_other = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_log_sup_brch = (Fl_Input2 *)0; Fl_Group *tab_hics203_ops = (Fl_Group *)0; Fl_Input2 *txt_hics203_ops_chief = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_bus_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_stg_mgr = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_med_care_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_infr_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_sec_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_hazmat_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_ops_other = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_hcc_agency = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_svc_brch = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_hcc_rep = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_ext_loc = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_ext_rep = (Fl_Input2 *)0; Fl_Group *tab_hics203_admin = (Fl_Group *)0; Fl_Input2 *txt_hics203_fin_chief = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_fin_other = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_time_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_proc_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_comp_unit = (Fl_Input2 *)0; Fl_Input2 *txt_hics203_cost_unit = (Fl_Input2 *)0; static void cb_btn_hics203_date(Fl_Button*, void*) { cb_hics203_set_date(); } static void cb_btn_hics203_time(Fl_Button*, void*) { cb_hics203_set_time(); } void create_hics203_tab() { int Y = tab_top; tab_hics203 = new Fl_Group(0, Y, 570, 390); tab_hics203->align(FL_ALIGN_TOP); tab_hics203_type = new Fl_Tabs(0, Y, 570, 387); tab_hics203_type->selection_color((Fl_Color)246); { // tab_hics203_orglist tab_hics203_1 = new Fl_Group(0, Y+25, 570, 360, _("Org")); { // group_hics203_orglist_1 Fl_Group* group_hics203_orglist_1 = new Fl_Group(2, Y+31, 566, 115); group_hics203_orglist_1->box(FL_ENGRAVED_FRAME); group_hics203_orglist_1->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_hics203_incident = new Fl_Input2(135, Y+36, 425, 24, _("1. Incident Name")); txt_hics203_incident->tooltip(_("Incident name")); txt_hics203_incident->box(FL_DOWN_BOX); txt_hics203_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_incident->labeltype(FL_NORMAL_LABEL); txt_hics203_incident->labelfont(0); txt_hics203_incident->labelsize(14); txt_hics203_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_incident->align(FL_ALIGN_LEFT); txt_hics203_incident->callback(hics_changed); txt_hics203_incident->when(FL_WHEN_CHANGED); txt_hics203_date = new Fl_Input2(135, Y+62, 155, 24, _("2. Date Prepared")); txt_hics203_date->tooltip(_("Date prepared")); txt_hics203_date->box(FL_DOWN_BOX); txt_hics203_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_date->labeltype(FL_NORMAL_LABEL); txt_hics203_date->labelfont(0); txt_hics203_date->labelsize(14); txt_hics203_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_date->align(FL_ALIGN_LEFT); txt_hics203_date->callback(hics_changed); txt_hics203_date->when(FL_WHEN_CHANGED); btn_hics203_date = new Fl_Button(294, Y+64, 20, 20, _("...")); btn_hics203_date->tooltip(_("Set today")); btn_hics203_date->callback((Fl_Callback*)cb_btn_hics203_date); txt_hics203_time = new Fl_Input2(135, Y+88, 103, 24, _("3. Time Prepared")); txt_hics203_time->tooltip(_("Time prepared")); txt_hics203_time->box(FL_DOWN_BOX); txt_hics203_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_time->labeltype(FL_NORMAL_LABEL); txt_hics203_time->labelfont(0); txt_hics203_time->labelsize(14); txt_hics203_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_time->align(FL_ALIGN_LEFT); txt_hics203_time->callback(hics_changed); txt_hics203_time->when(FL_WHEN_CHANGED); btn_hics203_time = new Fl_Button(247, Y+90, 20, 20, _("...")); btn_hics203_time->tooltip(_("Set time now")); btn_hics203_time->callback((Fl_Callback*)cb_btn_hics203_time); txt_hics203_op_period = new Fl_Input2(135, Y+116, 425, 24, _("4. Oper\' Period")); txt_hics203_op_period->tooltip(_("Date / Time")); txt_hics203_op_period->box(FL_DOWN_BOX); txt_hics203_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_op_period->labeltype(FL_NORMAL_LABEL); txt_hics203_op_period->labelfont(0); txt_hics203_op_period->labelsize(14); txt_hics203_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_op_period->align(FL_ALIGN_LEFT); txt_hics203_op_period->callback(hics_changed); txt_hics203_op_period->when(FL_WHEN_CHANGED); group_hics203_orglist_1->end(); } // group_hics203_orglist_1 { // group_hics203_orglist_2 Fl_Group* group_hics203_orglist_2 = new Fl_Group(2, Y+147, 566, 138, ""); group_hics203_orglist_2->box(FL_ENGRAVED_FRAME); group_hics203_orglist_2->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE); txt_hics203_incident_commander = new Fl_Input2(133, Y+152, 425, 24, _("Commander")); txt_hics203_incident_commander->tooltip(_("name")); txt_hics203_incident_commander->box(FL_DOWN_BOX); txt_hics203_incident_commander->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_incident_commander->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_incident_commander->labeltype(FL_NORMAL_LABEL); txt_hics203_incident_commander->labelfont(0); txt_hics203_incident_commander->labelsize(14); txt_hics203_incident_commander->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_incident_commander->align(FL_ALIGN_LEFT); txt_hics203_incident_commander->callback(hics_changed); txt_hics203_incident_commander->when(FL_WHEN_CHANGED); txt_hics203_incident_safety_officer = new Fl_Input2(133, Y+178, 425, 24, _("Safety Officer")); txt_hics203_incident_safety_officer->tooltip(_("name")); txt_hics203_incident_safety_officer->box(FL_DOWN_BOX); txt_hics203_incident_safety_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_incident_safety_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_incident_safety_officer->labeltype(FL_NORMAL_LABEL); txt_hics203_incident_safety_officer->labelfont(0); txt_hics203_incident_safety_officer->labelsize(14); txt_hics203_incident_safety_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_incident_safety_officer->align(FL_ALIGN_LEFT); txt_hics203_incident_safety_officer->callback(hics_changed); txt_hics203_incident_safety_officer->when(FL_WHEN_CHANGED); txt_hics203_incident_info_officer = new Fl_Input2(133, Y+205, 425, 24, _("Information Off\'")); txt_hics203_incident_info_officer->tooltip(_("name")); txt_hics203_incident_info_officer->box(FL_DOWN_BOX); txt_hics203_incident_info_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_incident_info_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_incident_info_officer->labeltype(FL_NORMAL_LABEL); txt_hics203_incident_info_officer->labelfont(0); txt_hics203_incident_info_officer->labelsize(14); txt_hics203_incident_info_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_incident_info_officer->align(FL_ALIGN_LEFT); txt_hics203_incident_info_officer->callback(hics_changed); txt_hics203_incident_info_officer->when(FL_WHEN_CHANGED); txt_hics203_liaison_officer = new Fl_Input2(133, Y+230, 425, 24, _("Liaison Officer")); txt_hics203_liaison_officer->tooltip(_("name")); txt_hics203_liaison_officer->box(FL_DOWN_BOX); txt_hics203_liaison_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_liaison_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_liaison_officer->labeltype(FL_NORMAL_LABEL); txt_hics203_liaison_officer->labelfont(0); txt_hics203_liaison_officer->labelsize(14); txt_hics203_liaison_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_liaison_officer->align(FL_ALIGN_LEFT); txt_hics203_liaison_officer->callback(hics_changed); txt_hics203_liaison_officer->when(FL_WHEN_CHANGED); group_hics203_orglist_2->end(); } // group_hics203_orglist_2 { // group_hics203_orglist_3 Fl_Group* group_hics203_orglist_3 = new Fl_Group(2, Y+286, 565, 60); group_hics203_orglist_3->box(FL_ENGRAVED_FRAME); txt_hics203_prepared_by = new Fl_Input2(133, Y+292, 425, 24, _("Prepared By")); txt_hics203_prepared_by->tooltip(_("preparer")); txt_hics203_prepared_by->box(FL_DOWN_BOX); txt_hics203_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_prepared_by->labeltype(FL_NORMAL_LABEL); txt_hics203_prepared_by->labelfont(0); txt_hics203_prepared_by->labelsize(14); txt_hics203_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_prepared_by->align(FL_ALIGN_LEFT); txt_hics203_prepared_by->callback(hics_changed); txt_hics203_prepared_by->when(FL_WHEN_CHANGED); txt_hics203_facility = new Fl_Input2(133, Y+318, 425, 24, _("Facility")); txt_hics203_facility->tooltip(_("facility name")); txt_hics203_facility->box(FL_DOWN_BOX); txt_hics203_facility->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_facility->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_facility->labeltype(FL_NORMAL_LABEL); txt_hics203_facility->labelfont(0); txt_hics203_facility->labelsize(14); txt_hics203_facility->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_facility->align(FL_ALIGN_LEFT); txt_hics203_facility->callback(hics_changed); txt_hics203_facility->when(FL_WHEN_CHANGED); group_hics203_orglist_3->end(); } // group_hics203_orglist_3 tab_hics203_1->end(); } // Fl_Group* tab_hics203_orglist { // tab_hics203_tech_spec tab_hics203_tech_spec = new Fl_Group(0, Y+25, 570, 360, _("Med/Tech")); { Fl_Group* o = new Fl_Group(2, Y+36, 566, 314, _("Medical / Technical Specialists")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); for (int i = 0; i < 6; i++) { txt_hics203_tech_spc[i] = new Fl_Input2(135, Y+62 + 30*i, 425, 24, _("Specialist")); txt_hics203_tech_spc[i]->tooltip(_("med / tech spec.")); txt_hics203_tech_spc[i]->box(FL_DOWN_BOX); txt_hics203_tech_spc[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_tech_spc[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_tech_spc[i]->labeltype(FL_NORMAL_LABEL); txt_hics203_tech_spc[i]->labelfont(0); txt_hics203_tech_spc[i]->labelsize(14); txt_hics203_tech_spc[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_tech_spc[i]->align(FL_ALIGN_LEFT); txt_hics203_tech_spc[i]->callback(hics_changed); txt_hics203_tech_spc[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Group* o tab_hics203_tech_spec->end(); } // Fl_Group* tab_hics203_tech_spec tab_hics203_tech_spec->hide(); { // tab_hics203_ops tab_hics203_ops = new Fl_Group(0, Y+25, 570, 360, _("Ops")); txt_hics203_ops_chief = new Fl_Input2(135, Y+40, 425, 24, _("Chief")); txt_hics203_ops_chief->tooltip(""); txt_hics203_ops_chief->box(FL_DOWN_BOX); txt_hics203_ops_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_ops_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_ops_chief->labeltype(FL_NORMAL_LABEL); txt_hics203_ops_chief->labelfont(0); txt_hics203_ops_chief->labelsize(14); txt_hics203_ops_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_ops_chief->align(FL_ALIGN_LEFT); txt_hics203_ops_chief->callback(hics_changed); txt_hics203_ops_chief->when(FL_WHEN_CHANGED); txt_hics203_bus_brch = new Fl_Input2(135, Y+66, 425, 24, _("Bus'/Cont' branch")); txt_hics203_bus_brch->tooltip(_("business continuity")); txt_hics203_bus_brch->box(FL_DOWN_BOX); txt_hics203_bus_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_bus_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_bus_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_bus_brch->labelfont(0); txt_hics203_bus_brch->labelsize(14); txt_hics203_bus_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_bus_brch->align(FL_ALIGN_LEFT); txt_hics203_bus_brch->callback(hics_changed); txt_hics203_bus_brch->when(FL_WHEN_CHANGED); txt_hics203_stg_mgr = new Fl_Input2(135, Y+92, 425, 24, _("Staging manager")); txt_hics203_stg_mgr->tooltip(_("staging")); txt_hics203_stg_mgr->box(FL_DOWN_BOX); txt_hics203_stg_mgr->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_stg_mgr->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_stg_mgr->labeltype(FL_NORMAL_LABEL); txt_hics203_stg_mgr->labelfont(0); txt_hics203_stg_mgr->labelsize(14); txt_hics203_stg_mgr->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_stg_mgr->align(FL_ALIGN_LEFT); txt_hics203_stg_mgr->callback(hics_changed); txt_hics203_stg_mgr->when(FL_WHEN_CHANGED); txt_hics203_med_care_brch = new Fl_Input2(135, Y+118, 425, 24, _("Med' care branch")); txt_hics203_med_care_brch->tooltip(_("medical care")); txt_hics203_med_care_brch->box(FL_DOWN_BOX); txt_hics203_med_care_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_med_care_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_med_care_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_med_care_brch->labelfont(0); txt_hics203_med_care_brch->labelsize(14); txt_hics203_med_care_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_med_care_brch->align(FL_ALIGN_LEFT); txt_hics203_med_care_brch->callback(hics_changed); txt_hics203_med_care_brch->when(FL_WHEN_CHANGED); txt_hics203_infr_brch = new Fl_Input2(135, Y+144, 425, 24, _("Infra' branch")); txt_hics203_infr_brch->tooltip(_("infrastructure")); txt_hics203_infr_brch->box(FL_DOWN_BOX); txt_hics203_infr_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_infr_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_infr_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_infr_brch->labelfont(0); txt_hics203_infr_brch->labelsize(14); txt_hics203_infr_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_infr_brch->align(FL_ALIGN_LEFT); txt_hics203_infr_brch->callback(hics_changed); txt_hics203_infr_brch->when(FL_WHEN_CHANGED); txt_hics203_sec_brch = new Fl_Input2(135, Y+170, 425, 24, _("Security branch")); txt_hics203_sec_brch->tooltip(_("security")); txt_hics203_sec_brch->box(FL_DOWN_BOX); txt_hics203_sec_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_sec_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_sec_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_sec_brch->labelfont(0); txt_hics203_sec_brch->labelsize(14); txt_hics203_sec_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_sec_brch->align(FL_ALIGN_LEFT); txt_hics203_sec_brch->callback(hics_changed); txt_hics203_sec_brch->when(FL_WHEN_CHANGED); txt_hics203_hazmat_brch = new Fl_Input2(135, Y+196, 425, 24, _("Hazmat branch")); txt_hics203_hazmat_brch->tooltip(_("hazardous materials")); txt_hics203_hazmat_brch->box(FL_DOWN_BOX); txt_hics203_hazmat_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_hazmat_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_hazmat_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_hazmat_brch->labelfont(0); txt_hics203_hazmat_brch->labelsize(14); txt_hics203_hazmat_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_hazmat_brch->align(FL_ALIGN_LEFT); txt_hics203_hazmat_brch->callback(hics_changed); txt_hics203_hazmat_brch->when(FL_WHEN_CHANGED); txt_hics203_ops_other = new Fl_Input2(135, Y+222, 425, 24, _("Other")); txt_hics203_ops_other->tooltip(""); txt_hics203_ops_other->box(FL_DOWN_BOX); txt_hics203_ops_other->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_ops_other->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_ops_other->labeltype(FL_NORMAL_LABEL); txt_hics203_ops_other->labelfont(0); txt_hics203_ops_other->labelsize(14); txt_hics203_ops_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_ops_other->align(FL_ALIGN_LEFT); txt_hics203_ops_other->callback(hics_changed); txt_hics203_ops_other->when(FL_WHEN_CHANGED); tab_hics203_ops->end(); } // Fl_Group* tab_hics203_ops tab_hics203_ops->hide(); { // tab_hics203_planning tab_hics203_planning = new Fl_Group(0, Y+25, 570, 360, _("Plan'/Log'")); { Fl_Group* o = new Fl_Group(2, Y+31, 566, 184, _("Planning")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_hics203_planning_chief = new Fl_Input2(135, Y+46, 425, 24, _("Chief")); txt_hics203_planning_chief->tooltip(""); txt_hics203_planning_chief->box(FL_DOWN_BOX); txt_hics203_planning_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_planning_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_planning_chief->labeltype(FL_NORMAL_LABEL); txt_hics203_planning_chief->labelfont(0); txt_hics203_planning_chief->labelsize(14); txt_hics203_planning_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_planning_chief->align(FL_ALIGN_LEFT); txt_hics203_planning_chief->callback(hics_changed); txt_hics203_planning_chief->when(FL_WHEN_CHANGED); txt_hics203_res_unit = new Fl_Input2(135, Y+72, 425, 24, _("Resources Unit")); txt_hics203_res_unit->tooltip(_("resources")); txt_hics203_res_unit->box(FL_DOWN_BOX); txt_hics203_res_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_res_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_res_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_res_unit->labelfont(0); txt_hics203_res_unit->labelsize(14); txt_hics203_res_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_res_unit->align(FL_ALIGN_LEFT); txt_hics203_res_unit->callback(hics_changed); txt_hics203_res_unit->when(FL_WHEN_CHANGED); txt_hics203_sit_unit = new Fl_Input2(135, Y+98, 425, 24, _("Situation Unit")); txt_hics203_sit_unit->tooltip(_("situation")); txt_hics203_sit_unit->box(FL_DOWN_BOX); txt_hics203_sit_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_sit_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_sit_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_sit_unit->labelfont(0); txt_hics203_sit_unit->labelsize(14); txt_hics203_sit_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_sit_unit->align(FL_ALIGN_LEFT); txt_hics203_sit_unit->callback(hics_changed); txt_hics203_sit_unit->when(FL_WHEN_CHANGED); txt_hics203_doc_unit = new Fl_Input2(135, Y+124, 425, 24, _("Doc' Unit")); txt_hics203_doc_unit->tooltip(_("documentation")); txt_hics203_doc_unit->box(FL_DOWN_BOX); txt_hics203_doc_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_doc_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_doc_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_doc_unit->labelfont(0); txt_hics203_doc_unit->labelsize(14); txt_hics203_doc_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_doc_unit->align(FL_ALIGN_LEFT); txt_hics203_doc_unit->callback(hics_changed); txt_hics203_doc_unit->when(FL_WHEN_CHANGED); txt_hics203_dem_unit = new Fl_Input2(135, Y+150, 425, 24, _("Demob' Unit")); txt_hics203_dem_unit->tooltip(_("demobilization")); txt_hics203_dem_unit->box(FL_DOWN_BOX); txt_hics203_dem_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_dem_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_dem_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_dem_unit->labelfont(0); txt_hics203_dem_unit->labelsize(14); txt_hics203_dem_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_dem_unit->align(FL_ALIGN_LEFT); txt_hics203_dem_unit->callback(hics_changed); txt_hics203_dem_unit->when(FL_WHEN_CHANGED); txt_hics203_planning_other = new Fl_Input2(135, Y+176, 425, 24, _("Other branch")); txt_hics203_planning_other->tooltip(""); txt_hics203_planning_other->box(FL_DOWN_BOX); txt_hics203_planning_other->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_planning_other->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_planning_other->labeltype(FL_NORMAL_LABEL); txt_hics203_planning_other->labelfont(0); txt_hics203_planning_other->labelsize(14); txt_hics203_planning_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_planning_other->align(FL_ALIGN_LEFT); txt_hics203_planning_other->callback(hics_changed); txt_hics203_planning_other->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(2, Y+215, 566, 140, _("Logistics")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_hics203_log_chief = new Fl_Input2(135, Y+240, 425, 24, _("Chief")); txt_hics203_log_chief->tooltip(""); txt_hics203_log_chief->box(FL_DOWN_BOX); txt_hics203_log_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_log_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_log_chief->labeltype(FL_NORMAL_LABEL); txt_hics203_log_chief->labelfont(0); txt_hics203_log_chief->labelsize(14); txt_hics203_log_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_log_chief->align(FL_ALIGN_LEFT); txt_hics203_log_chief->callback(hics_changed); txt_hics203_log_chief->when(FL_WHEN_CHANGED); txt_hics203_svc_brch = new Fl_Input2(135, Y+266, 425, 24, _("Services branch")); txt_hics203_svc_brch->tooltip(""); txt_hics203_svc_brch->box(FL_DOWN_BOX); txt_hics203_svc_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_svc_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_svc_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_svc_brch->labelfont(0); txt_hics203_svc_brch->labelsize(14); txt_hics203_svc_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_svc_brch->align(FL_ALIGN_LEFT); txt_hics203_svc_brch->callback(hics_changed); txt_hics203_svc_brch->when(FL_WHEN_CHANGED); txt_hics203_log_sup_brch = new Fl_Input2(135, Y+292, 425, 24, _("Support branch")); txt_hics203_log_sup_brch->tooltip(""); txt_hics203_log_sup_brch->box(FL_DOWN_BOX); txt_hics203_log_sup_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_log_sup_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_log_sup_brch->labeltype(FL_NORMAL_LABEL); txt_hics203_log_sup_brch->labelfont(0); txt_hics203_log_sup_brch->labelsize(14); txt_hics203_log_sup_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_log_sup_brch->align(FL_ALIGN_LEFT); txt_hics203_log_sup_brch->callback(hics_changed); txt_hics203_log_sup_brch->when(FL_WHEN_CHANGED); txt_hics203_log_other = new Fl_Input2(135, Y+318, 425, 24, _("Other branch")); txt_hics203_log_other->tooltip(""); txt_hics203_log_other->box(FL_DOWN_BOX); txt_hics203_log_other->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_log_other->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_log_other->labeltype(FL_NORMAL_LABEL); txt_hics203_log_other->labelfont(0); txt_hics203_log_other->labelsize(14); txt_hics203_log_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_log_other->align(FL_ALIGN_LEFT); txt_hics203_log_other->callback(hics_changed); txt_hics203_log_other->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o tab_hics203_planning->end(); } // tab_hics203_planning tab_hics203_planning->hide(); { // tab_hics203_admin tab_hics203_admin = new Fl_Group(0, Y+31, 570, 326, _("Admin")); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 176, _("Finance/Admin Section")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_hics203_fin_chief = new Fl_Input2(135, Y+50, 425, 24, _("Chief")); txt_hics203_fin_chief->tooltip(""); txt_hics203_fin_chief->box(FL_DOWN_BOX); txt_hics203_fin_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_fin_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_fin_chief->labeltype(FL_NORMAL_LABEL); txt_hics203_fin_chief->labelfont(0); txt_hics203_fin_chief->labelsize(14); txt_hics203_fin_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_fin_chief->align(FL_ALIGN_LEFT); txt_hics203_fin_chief->callback(hics_changed); txt_hics203_fin_chief->when(FL_WHEN_CHANGED); txt_hics203_time_unit = new Fl_Input2(135, Y+76, 425, 24, _("Time")); txt_hics203_time_unit->tooltip("time unit"); txt_hics203_time_unit->box(FL_DOWN_BOX); txt_hics203_time_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_time_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_time_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_time_unit->labelfont(0); txt_hics203_time_unit->labelsize(14); txt_hics203_time_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_time_unit->align(FL_ALIGN_LEFT); txt_hics203_time_unit->callback(hics_changed); txt_hics203_time_unit->when(FL_WHEN_CHANGED); txt_hics203_proc_unit = new Fl_Input2(135, Y+102, 425, 24, _("Procurement")); txt_hics203_proc_unit->tooltip("procurement unit"); txt_hics203_proc_unit->box(FL_DOWN_BOX); txt_hics203_proc_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_proc_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_proc_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_proc_unit->labelfont(0); txt_hics203_proc_unit->labelsize(14); txt_hics203_proc_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_proc_unit->align(FL_ALIGN_LEFT); txt_hics203_proc_unit->callback(hics_changed); txt_hics203_proc_unit->when(FL_WHEN_CHANGED); txt_hics203_comp_unit = new Fl_Input2(135, Y+128, 425, 24, _("Comp' / Claims")); txt_hics203_comp_unit->tooltip("compensation/claims unit"); txt_hics203_comp_unit->box(FL_DOWN_BOX); txt_hics203_comp_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_comp_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_comp_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_comp_unit->labelfont(0); txt_hics203_comp_unit->labelsize(14); txt_hics203_comp_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_comp_unit->align(FL_ALIGN_LEFT); txt_hics203_comp_unit->callback(hics_changed); txt_hics203_comp_unit->when(FL_WHEN_CHANGED); txt_hics203_cost_unit = new Fl_Input2(135, Y+154, 425, 24, _("Cost Unit")); txt_hics203_cost_unit->tooltip(""); txt_hics203_cost_unit->box(FL_DOWN_BOX); txt_hics203_cost_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_cost_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_cost_unit->labeltype(FL_NORMAL_LABEL); txt_hics203_cost_unit->labelfont(0); txt_hics203_cost_unit->labelsize(14); txt_hics203_cost_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_cost_unit->align(FL_ALIGN_LEFT); txt_hics203_cost_unit->callback(hics_changed); txt_hics203_cost_unit->when(FL_WHEN_CHANGED); txt_hics203_fin_other = new Fl_Input2(135, Y+180, 425, 24, _("Other branch")); txt_hics203_fin_other->tooltip(""); txt_hics203_fin_other->box(FL_DOWN_BOX); txt_hics203_fin_other->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_fin_other->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_fin_other->labeltype(FL_NORMAL_LABEL); txt_hics203_fin_other->labelfont(0); txt_hics203_fin_other->labelsize(14); txt_hics203_fin_other->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_fin_other->align(FL_ALIGN_LEFT); txt_hics203_fin_other->callback(hics_changed); txt_hics203_fin_other->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(2, Y+208, 566, 144, _("Representatives")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_hics203_hcc_agency = new Fl_Input2(135, Y+238, 425, 24, _("Hospital CC")); txt_hics203_hcc_agency->tooltip(_("hospital command center")); txt_hics203_hcc_agency->box(FL_DOWN_BOX); txt_hics203_hcc_agency->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_hcc_agency->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_hcc_agency->labeltype(FL_NORMAL_LABEL); txt_hics203_hcc_agency->labelfont(0); txt_hics203_hcc_agency->labelsize(14); txt_hics203_hcc_agency->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_hcc_agency->align(FL_ALIGN_LEFT); txt_hics203_hcc_agency->callback(hics_changed); txt_hics203_hcc_agency->when(FL_WHEN_CHANGED); txt_hics203_hcc_rep = new Fl_Input2(135, Y+264, 425, 24, _("Representative")); txt_hics203_hcc_rep->tooltip(_("HCC representative")); txt_hics203_hcc_rep->box(FL_DOWN_BOX); txt_hics203_hcc_rep->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_hcc_rep->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_hcc_rep->labeltype(FL_NORMAL_LABEL); txt_hics203_hcc_rep->labelfont(0); txt_hics203_hcc_rep->labelsize(14); txt_hics203_hcc_rep->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_hcc_rep->align(FL_ALIGN_LEFT); txt_hics203_hcc_rep->callback(hics_changed); txt_hics203_hcc_rep->when(FL_WHEN_CHANGED); txt_hics203_ext_loc = new Fl_Input2(135, Y+290, 425, 24, _("Ext Location")); txt_hics203_ext_loc->tooltip(_("external location")); txt_hics203_ext_loc->box(FL_DOWN_BOX); txt_hics203_ext_loc->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_ext_loc->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_ext_loc->labeltype(FL_NORMAL_LABEL); txt_hics203_ext_loc->labelfont(0); txt_hics203_ext_loc->labelsize(14); txt_hics203_ext_loc->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_ext_loc->align(FL_ALIGN_LEFT); txt_hics203_ext_loc->callback(hics_changed); txt_hics203_ext_loc->when(FL_WHEN_CHANGED); txt_hics203_ext_rep = new Fl_Input2(135, Y+318, 425, 24, _("Representative")); txt_hics203_ext_rep->tooltip(_("external representative")); txt_hics203_ext_rep->box(FL_DOWN_BOX); txt_hics203_ext_rep->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hics203_ext_rep->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hics203_ext_rep->labeltype(FL_NORMAL_LABEL); txt_hics203_ext_rep->labelfont(0); txt_hics203_ext_rep->labelsize(14); txt_hics203_ext_rep->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hics203_ext_rep->align(FL_ALIGN_LEFT); txt_hics203_ext_rep->callback(hics_changed); txt_hics203_ext_rep->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o tab_hics203_admin->end(); } // Fl_Group* tab_hics203_admin tab_hics203_admin->hide(); tab_hics203_type->end(); Fl_Group::current()->resizable(tab_hics203_type); tab_hics203->end(); tab_hics203->hide(); } // Fl_Group* tab_hics203 flmsg-2.0.10/src/hics/hics203_templates.cxx0000664000175000017500000006104212330516146015323 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "templates.h" const char hics203_html_template[] = "\ \ \ \ \ \ ORGANIZATION ASSIGNMENT LIST\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\

HICS 203 – ORGANIZATION ASSIGNMENT LIST

\
\

 

\

1.  INCIDENT NAME

\
\

2.   DATE PREPARED

\
\

3.  TIME PREPARED

\
\

4.  OPERATIONAL PERIOD DATE/TIME

\
\

 :inc:

\
\

 :dat:

\
\

 :tim:

\
\

 :opp:

\
\

POSITION

\
\

NAME / AGENCY

\
\

5.  Incident Commander and Staff

\
\

Incident Commander

\
\

 :icc:

\
\

Public Information Officer

\
\

 :ici:

\
\

Liaison Officer

\
\

 :icl:

\
\

Safety Officer

\
\

 :ics:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[0]:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[1]:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[2]:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[3]:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[4]:

\
\

Medical/Technical Specialist (Type)

\
\

 :tech_spc[5]:

\
\

6.  Operations Section

\
\

Chief

\
\

 :ops_chief:

\
\

Staging Manager

\
\

 :stg_mgr:

\
\

Medical Care Branch

\
\

 :med_care_brch:

\
\

Infrastructure Branch

\
\

 :infr_brch:

\
\

Security Branch

\
\

 :sec_brch:

\
\

Business Continuity Branch

\
\

 :bus_brch:

\
\

HazMat Branch

\
\

 :hazmat_brch:

\
\

Other Branch:

\
\

 :ops_other:

\
\

7.  Planning Section

\
\

Chief

\
\

 :planning_chief:

\
\

Resources Unit

\
\

 :res_unit:

\
\

Situation Unit

\
\

 :sit_unit:

\
\

Documentation Unit

\
\

 :doc_unit:

\
\

Demobilization Unit

\
\

 :dem_unit:

\
\

Other Branch:

\
\

 :planning_other:

\
\

8.  Logistics Section

\
\

Chief

\
\

 :log_chief:

\
\

Service Branch

\
\

 :svc_brch:

\
\

Support Branch

\
\

 :sup_brch:

\
\

Other Branch:

\
\

 :log_other:

\
\

9.  Finance/Administration Section

\
\

Chief

\
\

 :fin_chief:

\
\

Time Unit

\
\

 :time_unit:

\
\

Procurement Unit

\
\

 :proc_unit:

\
\

Compensation/Claims Unit

\
\

 :comp_unit:

\
\

Cost Unit

\
\

 :cost_unit:

\
\

Other Branch:

\
\

 :fin_other:

\
\

10.  Agency Representative (in Hospital Command Center)

\
\

Agency

\
\

 :hcc_agency:

\

 :hcc_rep:

\
\

 

\

\
\

 

\
\

 

\
\

11.  Hospital Representative (in External EOC)

\
\

External Location

\
\

 :ext_loc:

\

 :ext_rep:

\
\

 

\
\

 

\
\

 

\
\

 

\
\

12. PREPARED BY (RESOURCES UNIT LEADER) :pre:

\
\

13. FACILITY NAME :facility:

\
\

 

\ "; const char hics203_text_template[] = "HICS 203 ORGANIZATION ASSIGNMENT LIST\n\n\ 1. INCIDENT NAME: :inc:\n\ 2. DATE PREPARED: :dat:\n\ 3. TIME PREPARED: :tim:\n\ 4. OPERATIONAL PERIOD: :opp:\n\ 5. Incident Commander and Staff\n\ Incident Commander: :icc:\n\ Public Information Officer: :ici:\n\ Liaison Officer: :icl:\n\ Safety Officer: :ics:\n\ Medical/Technical Specialist (Type)\n\ :tech_spc[0]:\n\ :tech_spc[1]:\n\ :tech_spc[2]:\n\ :tech_spc[3]:\n\ :tech_spc[4]:\n\ :tech_spc[5]:\n\ 6. Operations Section\n\ Chief: :ops_chief:\n\ Staging Manager: :stg_mgr:\n\ Medical Care Branch: :med_care_brch:\n\ Infrastructure Branch: :infr_brch:\n\ Security Branch: :sec_brch:\n\ Business Continuity Branch: :bus_brch:\n\ HazMat Branch: :hazmat_brch:\n\ Other Ops Branch: :ops_other:\n\ 7. Planning Section\n\ Chief: :planning_chief:\n\ Resources Unit: :res_unit:\n\ Situation Unit: :sit_unit:\n\ Documentation Unit: :doc_unit:\n\ Demobilization Unit: :dem_unit:\n\ Other Planning Branch: :planning_other:\n\ 8. Logistics Section\n\ Chief: :log_chief:\n\ Service Branch: :svc_brch:\n\ Support Branch: :sup_brch:\n\ Other Logistics Branch: :log_other:\n\ 9. Finance/Administration Section\n\ Chief: :fin_chief:\n\ Time Unit: :time_unit:\n\ Procurement Unit: :proc_unit:\n\ Compensation/Claims Unit: :comp_unit:\n\ Cost Unit: :cost_unit:\n\ Other Finance/Admin Branch: :fin_other:\n\ 10. Agency Representative (in Hospital Command Center)\n\ Agency: :hcc_agency:\n\ Rep: :hcc_rep:\n\ 11. Hospital Representative (in External EOC)\n\ External Location: :ext_loc:\n\ Rep: :ext_rep:\n\ 12. PREPARED BY (RESOURCES UNIT LEADER): :pre:\n\ 13. FACILITY NAME: :facility:\n"; flmsg-2.0.10/src/hics/hics214_tab.cxx0000664000175000017500000002354512330516146014103 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *hics214_tab = (Fl_Group *)0; Fl_Tabs *hics214_tab_type = (Fl_Tabs *)0; Fl_Group *hics214_tab_1 = (Fl_Group *)0; Fl_Input2 *hics214_txt_incident = (Fl_Input2 *)0; Fl_Input2 *hics214_txt_date = (Fl_Input2 *)0; Fl_Input2 *hics214_txt_sec_brch = (Fl_Input2 *)0; Fl_Input2 *hics214_txt_position = (Fl_Input2 *)0; Fl_Button *hics214_btn_date = (Fl_Button *)0; Fl_Input2 *hics214_txt_time = (Fl_Input2 *)0; Fl_Button *hics214_btn_time = (Fl_Button *)0; Fl_Input2 *hics214_txt_op_period = (Fl_Input2 *)0; Fl_Input2 *hics214_txt_prepared_by = (Fl_Input2 *)0; Fl_Input2 *hics214_txt_facility = (Fl_Input2 *)0; Fl_Group *hics214_tab_2 = (Fl_Group *)0; Fl_Input2 *hics214_txt_activity_time[30]={(Fl_Input2 *)0}; Fl_Input2 *hics214_txt_activity_event[30]={(Fl_Input2 *)0}; static void cb_hics214_btn_date(Fl_Button*, void*) { hics214_cb_set_date(); } static void cb_hics214_btn_time(Fl_Button*, void*) { hics214_cb_set_time(); } void create_hics214_tab() { int Y = tab_top; hics214_tab = new Fl_Group(0, Y, 570, 390); hics214_tab->align(FL_ALIGN_TOP); hics214_tab_type = new Fl_Tabs(0, Y, 570, 387); hics214_tab_type->selection_color((Fl_Color)246); hics214_tab_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 170); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); hics214_txt_incident = new Fl_Input2(135, Y+38, 425, 24, _("Incident Name")); hics214_txt_incident->tooltip(_("Incident name")); hics214_txt_incident->box(FL_DOWN_BOX); hics214_txt_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_incident->labeltype(FL_NORMAL_LABEL); hics214_txt_incident->labelfont(0); hics214_txt_incident->labelsize(14); hics214_txt_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_incident->align(FL_ALIGN_LEFT); hics214_txt_incident->callback(hics_changed); hics214_txt_incident->when(FL_WHEN_CHANGED); hics214_txt_date = new Fl_Input2(135, Y+65, 155, 24, _("Date Prepared")); hics214_txt_date->tooltip(_("Date prepared")); hics214_txt_date->box(FL_DOWN_BOX); hics214_txt_date->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_date->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_date->labeltype(FL_NORMAL_LABEL); hics214_txt_date->labelfont(0); hics214_txt_date->labelsize(14); hics214_txt_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_date->align(FL_ALIGN_LEFT); hics214_txt_date->callback(hics_changed); hics214_txt_date->when(FL_WHEN_CHANGED); hics214_btn_date = new Fl_Button(294, Y+67, 20, 20, _("...")); hics214_btn_date->tooltip(_("Set today")); hics214_btn_date->callback((Fl_Callback*)cb_hics214_btn_date); hics214_txt_time = new Fl_Input2(135, Y+90, 103, 24, _("Time Prepared")); hics214_txt_time->tooltip(_("Time prepared")); hics214_txt_time->box(FL_DOWN_BOX); hics214_txt_time->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_time->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_time->labeltype(FL_NORMAL_LABEL); hics214_txt_time->labelfont(0); hics214_txt_time->labelsize(14); hics214_txt_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_time->align(FL_ALIGN_LEFT); hics214_txt_time->callback(hics_changed); hics214_txt_time->when(FL_WHEN_CHANGED); hics214_btn_time = new Fl_Button(247, Y+92, 20, 20, _("...")); hics214_btn_time->tooltip(_("Set time now")); hics214_btn_time->callback((Fl_Callback*)cb_hics214_btn_time); hics214_txt_sec_brch = new Fl_Input2(135, Y+115, 425, 24, _("Unit Name")); hics214_txt_sec_brch->tooltip(_("Name / Designation")); hics214_txt_sec_brch->box(FL_DOWN_BOX); hics214_txt_sec_brch->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_sec_brch->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_sec_brch->labeltype(FL_NORMAL_LABEL); hics214_txt_sec_brch->labelfont(0); hics214_txt_sec_brch->labelsize(14); hics214_txt_sec_brch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_sec_brch->align(FL_ALIGN_LEFT); hics214_txt_sec_brch->callback(hics_changed); hics214_txt_sec_brch->when(FL_WHEN_CHANGED); hics214_txt_position = new Fl_Input2(135, Y+140, 425, 24, _("Unit leader")); hics214_txt_position->tooltip(_("Name and Position")); hics214_txt_position->box(FL_DOWN_BOX); hics214_txt_position->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_position->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_position->labeltype(FL_NORMAL_LABEL); hics214_txt_position->labelfont(0); hics214_txt_position->labelsize(14); hics214_txt_position->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_position->align(FL_ALIGN_LEFT); hics214_txt_position->callback(hics_changed); hics214_txt_position->when(FL_WHEN_CHANGED); hics214_txt_op_period = new Fl_Input2(135, Y+165, 425, 24, _("Oper\' Period")); hics214_txt_op_period->tooltip(_("Date / Time")); hics214_txt_op_period->box(FL_DOWN_BOX); hics214_txt_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_op_period->labeltype(FL_NORMAL_LABEL); hics214_txt_op_period->labelfont(0); hics214_txt_op_period->labelsize(14); hics214_txt_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_op_period->align(FL_ALIGN_LEFT); hics214_txt_op_period->callback(hics_changed); hics214_txt_op_period->when(FL_WHEN_CHANGED); o->end(); } { Fl_Group* o = new Fl_Group(2, Y+203, 566, 60); o->box(FL_ENGRAVED_FRAME); hics214_txt_prepared_by = new Fl_Input2(135, Y+208, 425, 24, _("Prepared By")); hics214_txt_prepared_by->tooltip(_("Name and Position")); hics214_txt_prepared_by->box(FL_DOWN_BOX); hics214_txt_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_prepared_by->labeltype(FL_NORMAL_LABEL); hics214_txt_prepared_by->labelfont(0); hics214_txt_prepared_by->labelsize(14); hics214_txt_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_prepared_by->align(FL_ALIGN_LEFT); hics214_txt_prepared_by->callback(hics_changed); hics214_txt_prepared_by->when(FL_WHEN_CHANGED); hics214_txt_facility = new Fl_Input2(135, Y+234, 425, 24, _("Facility")); hics214_txt_facility->tooltip(_("")); hics214_txt_facility->box(FL_DOWN_BOX); hics214_txt_facility->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_facility->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_facility->labeltype(FL_NORMAL_LABEL); hics214_txt_facility->labelfont(0); hics214_txt_facility->labelsize(14); hics214_txt_facility->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_facility->align(FL_ALIGN_LEFT); hics214_txt_facility->callback(hics_changed); hics214_txt_facility->when(FL_WHEN_CHANGED); o->end(); } hics214_tab_1->end(); hics214_tab_2 = new Fl_Group(0, Y+25, 570, 360, _("Activity Log")); hics214_tab_2->hide(); hics214_tab_2->hide(); { Fl_Box* o = new Fl_Box(5, Y+32, 100, 20, _("Time")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Box* o = new Fl_Box(106, Y+32, 440, 20, _("Major Events")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); o->type(2); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 30; i++) { hics214_txt_activity_time[i] = new Fl_Input2(5, Y+54 + i*24, 100, 24); hics214_txt_activity_time[i]->tooltip(_("")); hics214_txt_activity_time[i]->box(FL_DOWN_BOX); hics214_txt_activity_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_activity_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_activity_time[i]->labeltype(FL_NORMAL_LABEL); hics214_txt_activity_time[i]->labelfont(0); hics214_txt_activity_time[i]->labelsize(14); hics214_txt_activity_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_activity_time[i]->align(FL_ALIGN_CENTER); hics214_txt_activity_time[i]->when(FL_WHEN_CHANGED); hics214_txt_activity_event[i] = new Fl_Input2(106, Y+54 + i*24, 442, 24); hics214_txt_activity_event[i]->tooltip(_("")); hics214_txt_activity_event[i]->box(FL_DOWN_BOX); hics214_txt_activity_event[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); hics214_txt_activity_event[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); hics214_txt_activity_event[i]->labeltype(FL_NORMAL_LABEL); hics214_txt_activity_event[i]->labelfont(0); hics214_txt_activity_event[i]->labelsize(14); hics214_txt_activity_event[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); hics214_txt_activity_event[i]->align(FL_ALIGN_CENTER); hics214_txt_activity_event[i]->callback(hics_changed); hics214_txt_activity_event[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Scroll* o hics214_tab_2->end(); hics214_tab_type->end(); Fl_Group::current()->resizable(hics214_tab_type); hics214_tab->end(); hics214_tab->hide(); } flmsg-2.0.10/src/hics/hics206_templates.cxx0000664000175000017500000001533312330516146015330 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "templates.h" const char hics206_html_template[] = "\n\ \n\ \n\ HICS-206\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

\n\ HICS 206 – STAFF MEDICAL PLAN

\n\

\n\ 1. INCIDENT NAME\n\
:1:\n\

\n\

\n\ 2. DATE PREPARED\n\
:2:\n\

\n\

\n\ 3. TIME PREPARED\n\
:3:\n\

\n\

\n\ 4. OPERATIONAL PERIOD DATE/TIME\n\
:4:\n\

\n\
\n\

\n\ 5. TREATMENT OF INJURED / STAFF

\n\

\n\ Location of Staff Treatment Area\n\
:5:
\n\

\n\ Contact Information\n\
:6:
\n\

\n\ Treatment Area Team Leader\n\
:7:
\n\

\n\

\n\ Contact Information\n\
:8:
\n\

\n\

\n\ Special Instructions

\n\

:9:

\n\

6. RESOURCES ON HAND

\n\ STAFF\n\

\n\
\n\

\n\ MEDICAL TRANSPORTATION \n\

\n\
\n\

\n\ MEDICATION \n\

\n\
\n\

\n\ SUPPLIES\n\

\n\

MD/DO: :10:

Litters: :11:

:12:

:13:

PA/NP: :14:

Portable :15:

:16:

:17:

RN/LPN: :18:

Transport: :19:

:20:

:21:

Technicians/CN: :22:

Wheelchairs: :23:

:24:

:25:

Ancillary/Other: :26:

:27:

:28:

:29:

7. ALTERNATE CARE SITE(S)

NAME

ADDRESS

PHONE

SPECIALTY CARE

:30:

:31:

:32:

:33:

:34:

:35:

:36:

:37:

:38:

:39:

:40:

:41:

:42:

:43:

:44:

:45:

\n\ 8. PREPARED BY (SUPPORT BRANCH DIRECTOR): :46:\n\

\n\

\n\ 9. FACILITY NAME :47:\n\

\n\
\n\ \n\ "; const char hics206_text_template[] = "HICS 206 – STAFF MEDICAL PLAN\n\ 1. INCIDENT NAME :1:\n\ 2. DATE PREPARED :2:\n\ 3. TIME PREPARED :3:\n\ 4. OPERATIONAL PERIOD DATE/TIME :4:\n\ 5. TREATMENT OF INJURED / STAFF\n\ Location of Staff Treatment Area :5:
\n\ Contact Information :6:
\n\ Treatment Area Team Leader :7:
\n\ Contact Information :8:
\n\ Special Instructions :9:
\n\ 6. RESOURCES ON HAND\n\ STAFF\n\ MD/DO: :10:\n\ PA/NP: :14:\n\ RN/LPN: :18:\n\ Technicians/CN: :22:\n\ Ancilliary/Other: :26:\n\ MEDICAL TRANSPORTATION \n\ Litters: :11:\n\ Portable: :15:\n\ Transport: :19:\n\ Wheelchairs: :23:\n\ Other: :27:\n\ MEDICATION\n\ :12:\n\ :16:\n\ :20:\n\ :24:\n\ :28:\n\ SUPPLIES\n\ :13:\n\ :17:\n\ :21:\n\ :25:\n\ :29:\n\ 7. ALTERNATE CARE SITE(S)\n\ NAME: :30:\n\ ADDRESS: :31:\n\ PHONE: :32:\n\ SPEC CARE: :33:\n\ NAME: :34:\n\ ADDRESS: :35:\n\ PHONE: :36:\n\ SPEC CARE: :37:\n\ NAME: :38:\n\ ADDRESS: :39:\n\ PHONE: :40:\n\ SPEC CARE: :41:\n\ NAME: :42:\n\ ADDRESS: :43:\n\ PHONE: :44:\n\ SPEC CARE: :45:\n\ 8. PREPARED BY (SUPPORT BRANCH DIRECTOR): :46:\n\ 9. FACILITY NAME :47:\n"; flmsg-2.0.10/src/hics/hics213_templates.cxx0000664000175000017500000001431212330516146015322 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "templates.h" const char hics213_html_template[] = "\n\ HICS-213\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

HICS-213 – INCIDENT MESSAGE FORM

1. FROM (Sender):
:1:

2. TO (Receiver):
:2:

3. DATE RECEIVED

4. TIME RECEIVED

5. RECEIVED VIA

6. REPLY REQUESTED:

:3:

:4:

\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\
:5a:Phone:5b:Radio
\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

Reply

:6a:

Yes

:6b:

No

\n\

\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\
:5c:Other
\n\

If YES, REPLY TO: :6c:

\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

7. PRIORITY

:7a:

Urgent - High

:7b:

Non Urgent – Medium

:7c:

Informational - Low

\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

8. MESSAGE (KEEP ALL MESSAGES / REQUESTS BRIEF, TO THE POINT, AND VERY SPECIFIC):

\n\

:8:

9. ACTION TAKEN (if any):


\n\

:9:

\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

Received by:

Time Received:

Forward to:

:10:

:11:

:12:

Comments:

\n\

:13:

\n\
\n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\

Received by:

Time Received:

Forward to:

:14:

:15:

:16:

Comments:

\n\

:17:

\n\
\n\ \n\ \n\ \n\ \n\

10. FACILITY NAME
:18:

\n\ \n\ \n\ "; const char hics213_text_template[] = "1. FROM (Sender): :1:\n\ 2. TO (Receiver): :2:\n\ 3. DATE RECEIVED: :3:\n\ 4. TIME RECEIVED: :4:\n\ 5a. RECEIVED via PHONE: :5a:\n\ 5b. RECEIVED via RADIO: :5b:\n\ 5b. RECEIVED via OTHER: :5c:\n\ 6a. REPLY REQUESTED YES: :6a:\n\ 6b. REPLY REQUESTED NO: :6b:\n\ 6c. IF YES REPLY TO: :6c:\n\ 7. PRIORITY high: :7a:, medium: :7b:, low: :7c:\n\ 8. MESSAGE: :8:\n\ 9. ACTION TAKEN: :9:\n\ 10. Received by: :10:\n\ 11. Time Received: :11:\n\ 12. Forward to: :12:\n\ 13. Comments: :13:\n\ 14. Received by: :14:\n\ 15. Time Received: :15:\n\ 16. Forward to: :16:\n\ 17. Comments: :17:\n\ 18. FACILITY NAME :18:\n"; flmsg-2.0.10/src/hics/hics206.cxx0000664000175000017500000010116612330516146013252 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include using namespace std; // hics206 tag fields string h206_tag_name = ":1:"; string h206_tag_date_prepared = ":2:"; string h206_tag_time_prepared = ":3:"; string h206_tag_period = ":4:"; string h206_tag_location = ":5:"; string h206_tag_loc_contact = ":6:"; string h206_tag_team_leader = ":7:"; string h206_tag_team_contact = ":8:"; string h206_tag_special_instructions = ":9:"; string h206_tag_md_do = ":10:"; string h206_tag_litters = ":11:"; string h206_tag_pa_np = ":14:"; string h206_tag_portable = ":15:"; string h206_tag_rn_lpn = ":18:"; string h206_tag_transport = ":19:"; string h206_tag_tech_cn = ":22:"; string h206_tag_wheelchairs = ":23:"; string h206_tag_team_other = ":26:"; string h206_tag_transport_other = ":27:"; string h206_tag_meds_1 = ":12:"; string h206_tag_meds_2 = ":16:"; string h206_tag_meds_3 = ":20:"; string h206_tag_meds_4 = ":24:"; string h206_tag_meds_5 = ":28:"; string h206_tag_supp_1 = ":13:"; string h206_tag_supp_2 = ":17:"; string h206_tag_supp_3 = ":21:"; string h206_tag_supp_4 = ":25:"; string h206_tag_supp_5 = ":29:"; string h206_tag_site_1 = ":30:"; string h206_tag_address_1 = ":31:"; string h206_tag_phone_1 = ":32:"; string h206_tag_spec_care_1 = ":33:"; string h206_tag_site_2 = ":34:"; string h206_tag_address_2 = ":35:"; string h206_tag_phone_2 = ":36:"; string h206_tag_spec_care_2 = ":37:"; string h206_tag_site_3 = ":38:"; string h206_tag_address_3 = ":39:"; string h206_tag_phone_3 = ":40:"; string h206_tag_spec_care_3 = ":41:"; string h206_tag_site_4 = ":42:"; string h206_tag_address_4 = ":43:"; string h206_tag_phone_4 = ":44:"; string h206_tag_spec_care_4 = ":45:"; string h206_tag_preparer = ":46:"; string h206_tag_facility = ":47:"; string h206_name; string h206_period; string h206_date_prepared; string h206_time_prepared; string h206_location; string h206_loc_contact; string h206_team_leader; string h206_team_contact; string h206_special_instructions; string h206_md_do; string h206_litters; string h206_pa_np; string h206_portable; string h206_rn_lpn; string h206_transport; string h206_tech_cn; string h206_wheelchairs; string h206_team_other; string h206_transport_other; string h206_meds_1; string h206_meds_2; string h206_meds_3; string h206_meds_4; string h206_meds_5; string h206_supp_1; string h206_supp_2; string h206_supp_3; string h206_supp_4; string h206_supp_5; string h206_site_1; string h206_address_1; string h206_phone_1; string h206_spec_care_1; string h206_site_2; string h206_address_2; string h206_phone_2; string h206_spec_care_2; string h206_site_3; string h206_address_3; string h206_phone_3; string h206_spec_care_3; string h206_site_4; string h206_address_4; string h206_phone_4; string h206_spec_care_4; string h206_preparer; string h206_facility; string h206_buff; string h206_def_filename = ""; string h206_base_filename = ""; string h206_def_template_name = ""; bool h206_using206_template = false; void h206_cb_setdate() { h206_txt_date_prepared->value(szDate()); } void h206_cb_settime() { h206_txt_time_prepared->value(szTime()); } void h206_clear_fields() { h206_name.clear(); h206_period.clear(); h206_date_prepared.clear(); h206_time_prepared.clear(); h206_location.clear(); h206_loc_contact.clear(); h206_team_leader.clear(); h206_team_contact.clear(); h206_md_do.clear(); h206_litters.clear(); h206_pa_np.clear(); h206_portable.clear(); h206_rn_lpn.clear(); h206_transport.clear(); h206_tech_cn.clear(); h206_wheelchairs.clear(); h206_team_other.clear(); h206_transport_other.clear(); h206_meds_1.clear(); h206_supp_1.clear(); h206_meds_2.clear(); h206_supp_2.clear(); h206_meds_3.clear(); h206_supp_3.clear(); h206_meds_4.clear(); h206_supp_4.clear(); h206_meds_5.clear(); h206_supp_5.clear(); h206_special_instructions.clear(); h206_preparer.clear(); h206_facility.clear(); h206_site_1.clear(); h206_address_1.clear(); h206_phone_1.clear(); h206_spec_care_1.clear(); h206_site_2.clear(); h206_address_2.clear(); h206_phone_2.clear(); h206_spec_care_2.clear(); h206_site_3.clear(); h206_address_3.clear(); h206_phone_3.clear(); h206_spec_care_3.clear(); h206_site_4.clear(); h206_address_4.clear(); h206_phone_4.clear(); h206_spec_care_4.clear(); } bool check_hics206fields() { if (h206_name != h206_txt_name->value()) return true; if (h206_period != h206_txt_op_period->value()) return true; if (h206_date_prepared != h206_txt_date_prepared->value()) return true; if (h206_time_prepared != h206_txt_time_prepared->value()) return true; if (h206_location != h206_txt_location->value()) return true; if (h206_loc_contact != h206_txt_loc_contact->value()) return true; if (h206_team_leader != h206_txt_team_leader->value()) return true; if (h206_team_contact != h206_txt_team_contact->value()) return true; if (h206_md_do != h206_txt_md_do->value()) return true; if (h206_litters != h206_txt_litters->value()) return true; if (h206_pa_np != h206_txt_pa_np->value()) return true; if (h206_portable != h206_txt_portable->value()) return true; if (h206_rn_lpn != h206_txt_rn_lpn->value()) return true; if (h206_transport != h206_txt_transport->value()) return true; if (h206_tech_cn != h206_txt_tech_cn->value()) return true; if (h206_wheelchairs != h206_txt_wheelchairs->value()) return true; if (h206_team_other != h206_txt_team_other->value()) return true; if (h206_transport_other != h206_txt_transport_other->value()) return true; if (h206_meds_1 != h206_txt_meds_1->value()) return true; if (h206_supp_1 != h206_txt_supp_1->value()) return true; if (h206_meds_2 != h206_txt_meds_2->value()) return true; if (h206_supp_2 != h206_txt_supp_2->value()) return true; if (h206_meds_3 != h206_txt_meds_3->value()) return true; if (h206_supp_3 != h206_txt_supp_3->value()) return true; if (h206_meds_4 != h206_txt_meds_4->value()) return true; if (h206_supp_4 != h206_txt_supp_4->value()) return true; if (h206_meds_5 != h206_txt_meds_5->value()) return true; if (h206_supp_5 != h206_txt_supp_5->value()) return true; if (h206_special_instructions != h206_txt_special_instructions->buffer()->text()) return true; if (h206_preparer != h206_txt_preparer->value()) return true; if (h206_facility != h206_txt_facility->value()) return true; if (h206_site_1 != h206_txt_site_1->value()) return true; if (h206_address_1 != h206_txt_address_1->value()) return true; if (h206_phone_1 != h206_txt_phone_1->value()) return true; if (h206_spec_care_1 != h206_txt_spec_care_1->value()) return true; if (h206_site_2 != h206_txt_site_2->value()) return true; if (h206_address_2 != h206_txt_address_2->value()) return true; if (h206_phone_2 != h206_txt_phone_2->value()) return true; if (h206_spec_care_2 != h206_txt_spec_care_2->value()) return true; if (h206_site_3 != h206_txt_site_3->value()) return true; if (h206_address_3 != h206_txt_address_3->value()) return true; if (h206_phone_3 != h206_txt_phone_3->value()) return true; if (h206_spec_care_3 != h206_txt_spec_care_3->value()) return true; if (h206_site_4 != h206_txt_site_4->value()) return true; if (h206_address_4 != h206_txt_address_4->value()) return true; if (h206_phone_4 != h206_txt_phone_4->value()) return true; if (h206_spec_care_4 != h206_txt_spec_care_4->value()) return true; return false; } void h206_update_fields() { h206_name = h206_txt_name->value(); h206_period = h206_txt_op_period->value(); h206_date_prepared = h206_txt_date_prepared->value(); h206_time_prepared = h206_txt_time_prepared->value(); h206_location = h206_txt_location->value(); h206_loc_contact = h206_txt_loc_contact->value(); h206_team_leader = h206_txt_team_leader->value(); h206_team_contact = h206_txt_team_contact->value(); h206_md_do = h206_txt_md_do->value(); h206_litters = h206_txt_litters->value(); h206_pa_np = h206_txt_pa_np->value(); h206_portable = h206_txt_portable->value(); h206_rn_lpn = h206_txt_rn_lpn->value(); h206_transport = h206_txt_transport->value(); h206_tech_cn = h206_txt_tech_cn->value(); h206_wheelchairs = h206_txt_wheelchairs->value(); h206_team_other = h206_txt_team_other->value(); h206_transport_other = h206_txt_transport_other->value(); h206_meds_1 = h206_txt_meds_1->value(); h206_supp_1 = h206_txt_supp_1->value(); h206_meds_2 = h206_txt_meds_2->value(); h206_supp_2 = h206_txt_supp_2->value(); h206_meds_3 = h206_txt_meds_3->value(); h206_supp_3 = h206_txt_supp_3->value(); h206_meds_4 = h206_txt_meds_4->value(); h206_supp_4 = h206_txt_supp_4->value(); h206_meds_5 = h206_txt_meds_5->value(); h206_supp_5 = h206_txt_supp_5->value(); h206_special_instructions = h206_txt_special_instructions->buffer()->text(); h206_preparer = h206_txt_preparer->value(); h206_facility = h206_txt_facility->value(); h206_site_1 = h206_txt_site_1->value(); h206_address_1 = h206_txt_address_1->value(); h206_phone_1 = h206_txt_phone_1->value(); h206_spec_care_1 = h206_txt_spec_care_1->value(); h206_site_2 = h206_txt_site_2->value(); h206_address_2 = h206_txt_address_2->value(); h206_phone_2 = h206_txt_phone_2->value(); h206_spec_care_2 = h206_txt_spec_care_2->value(); h206_site_3 = h206_txt_site_3->value(); h206_address_3 = h206_txt_address_3->value(); h206_phone_3 = h206_txt_phone_3->value(); h206_spec_care_3 = h206_txt_spec_care_3->value(); h206_site_4 = h206_txt_site_4->value(); h206_address_4 = h206_txt_address_4->value(); h206_phone_4 = h206_txt_phone_4->value(); h206_spec_care_4 = h206_txt_spec_care_4->value(); } void h206_update_form() { h206_txt_name->value(h206_name.c_str()); h206_txt_op_period->value(h206_period.c_str()); h206_txt_date_prepared->value(h206_date_prepared.c_str()); h206_txt_time_prepared->value(h206_time_prepared.c_str()); h206_txt_location->value(h206_location.c_str()); h206_txt_loc_contact->value(h206_loc_contact.c_str()); h206_txt_team_leader->value(h206_team_leader.c_str()); h206_txt_team_contact->value(h206_team_contact.c_str()); h206_txt_md_do->value(h206_md_do.c_str()); h206_txt_litters->value(h206_litters.c_str()); h206_txt_pa_np->value(h206_pa_np.c_str()); h206_txt_portable->value(h206_portable.c_str()); h206_txt_rn_lpn->value(h206_rn_lpn.c_str()); h206_txt_transport->value(h206_transport.c_str()); h206_txt_tech_cn->value(h206_tech_cn.c_str()); h206_txt_wheelchairs->value(h206_wheelchairs.c_str()); h206_txt_team_other->value(h206_team_other.c_str()); h206_txt_transport_other->value(h206_transport_other.c_str()); h206_txt_meds_1->value(h206_meds_1.c_str()); h206_txt_supp_1->value(h206_supp_1.c_str()); h206_txt_meds_2->value(h206_meds_2.c_str()); h206_txt_supp_2->value(h206_supp_2.c_str()); h206_txt_meds_3->value(h206_meds_3.c_str()); h206_txt_supp_3->value(h206_supp_3.c_str()); h206_txt_meds_4->value(h206_meds_4.c_str()); h206_txt_supp_4->value(h206_supp_4.c_str()); h206_txt_meds_5->value(h206_meds_5.c_str()); h206_txt_supp_5->value(h206_supp_5.c_str()); h206_txt_special_instructions->addstr(h206_special_instructions.c_str()); h206_txt_preparer->value(h206_preparer.c_str()); h206_txt_facility->value(h206_facility.c_str()); h206_txt_site_1->value(h206_site_1.c_str()); h206_txt_address_1->value(h206_address_1.c_str()); h206_txt_phone_1->value(h206_phone_1.c_str()); h206_txt_spec_care_1->value(h206_spec_care_1.c_str()); h206_txt_site_2->value(h206_site_2.c_str()); h206_txt_address_2->value(h206_address_2.c_str()); h206_txt_phone_2->value(h206_phone_2.c_str()); h206_txt_spec_care_2->value(h206_spec_care_2.c_str()); h206_txt_site_3->value(h206_site_3.c_str()); h206_txt_address_3->value(h206_address_3.c_str()); h206_txt_phone_3->value(h206_phone_3.c_str()); h206_txt_spec_care_3->value(h206_spec_care_3.c_str()); h206_txt_site_4->value(h206_site_4.c_str()); h206_txt_address_4->value(h206_address_4.c_str()); h206_txt_phone_4->value(h206_phone_4.c_str()); h206_txt_spec_care_4->value(h206_spec_care_4.c_str()); } void h206_clear__form() { h206_clear_fields(); h206_txt_name->value(""); h206_txt_op_period->value(""); h206_txt_date_prepared->value(""); h206_txt_time_prepared->value(""); h206_txt_location->value(""); h206_txt_loc_contact->value(""); h206_txt_team_leader->value(""); h206_txt_team_contact->value(""); h206_txt_md_do->value(""); h206_txt_litters->value(""); h206_txt_pa_np->value(""); h206_txt_portable->value(""); h206_txt_rn_lpn->value(""); h206_txt_transport->value(""); h206_txt_tech_cn->value(""); h206_txt_wheelchairs->value(""); h206_txt_team_other->value(""); h206_txt_transport_other->value(""); h206_txt_meds_1->value(""); h206_txt_supp_1->value(""); h206_txt_meds_2->value(""); h206_txt_supp_2->value(""); h206_txt_meds_3->value(""); h206_txt_supp_3->value(""); h206_txt_meds_4->value(""); h206_txt_supp_4->value(""); h206_txt_meds_5->value(""); h206_txt_supp_5->value(""); h206_txt_special_instructions->clear(); h206_txt_preparer->value(""); h206_txt_facility->value(""); h206_txt_site_1->value(""); h206_txt_address_1->value(""); h206_txt_phone_1->value(""); h206_txt_spec_care_1->value(""); h206_txt_site_2->value(""); h206_txt_address_2->value(""); h206_txt_phone_2->value(""); h206_txt_spec_care_2->value(""); h206_txt_site_3->value(""); h206_txt_address_3->value(""); h206_txt_phone_3->value(""); h206_txt_spec_care_3->value(""); h206_txt_site_4->value(""); h206_txt_address_4->value(""); h206_txt_phone_4->value(""); h206_txt_spec_care_4->value(""); } void h206_make_buff(bool compress = false) { string mbuff; mbuff.assign( lineout( h206_tag_name, h206_name ) ); mbuff.append( lineout( h206_tag_period, h206_period ) ); mbuff.append( lineout( h206_tag_date_prepared, h206_date_prepared ) ); mbuff.append( lineout( h206_tag_time_prepared, h206_time_prepared ) ); mbuff.append( lineout( h206_tag_location, h206_location)); mbuff.append( lineout( h206_tag_loc_contact, h206_loc_contact)); mbuff.append( lineout( h206_tag_team_leader, h206_team_leader)); mbuff.append( lineout( h206_tag_team_contact, h206_team_contact)); mbuff.append( lineout( h206_tag_md_do, h206_md_do)); mbuff.append( lineout( h206_tag_litters, h206_litters)); mbuff.append( lineout( h206_tag_pa_np, h206_pa_np)); mbuff.append( lineout( h206_tag_portable, h206_portable)); mbuff.append( lineout( h206_tag_rn_lpn, h206_rn_lpn)); mbuff.append( lineout( h206_tag_transport, h206_transport)); mbuff.append( lineout( h206_tag_tech_cn, h206_tech_cn)); mbuff.append( lineout( h206_tag_wheelchairs, h206_wheelchairs)); mbuff.append( lineout( h206_tag_team_other, h206_team_other)); mbuff.append( lineout( h206_tag_transport_other, h206_transport_other)); mbuff.append( lineout( h206_tag_meds_1, h206_meds_1)); mbuff.append( lineout( h206_tag_supp_1, h206_supp_1)); mbuff.append( lineout( h206_tag_meds_2, h206_meds_2)); mbuff.append( lineout( h206_tag_supp_2, h206_supp_2)); mbuff.append( lineout( h206_tag_meds_3, h206_meds_3)); mbuff.append( lineout( h206_tag_supp_3, h206_supp_3)); mbuff.append( lineout( h206_tag_meds_4, h206_meds_4)); mbuff.append( lineout( h206_tag_supp_4, h206_supp_4)); mbuff.append( lineout( h206_tag_meds_5, h206_meds_5)); mbuff.append( lineout( h206_tag_supp_5, h206_supp_5)); mbuff.append( lineout( h206_tag_special_instructions, h206_special_instructions ) ); mbuff.append( lineout( h206_tag_preparer, h206_preparer ) ); mbuff.append( lineout( h206_tag_facility, h206_facility ) ); mbuff.append( lineout( h206_tag_site_1, h206_site_1 ) ); mbuff.append( lineout( h206_tag_address_1, h206_address_1 ) ); mbuff.append( lineout( h206_tag_phone_1, h206_phone_1 ) ); mbuff.append( lineout( h206_tag_spec_care_1, h206_spec_care_1 ) ); mbuff.append( lineout( h206_tag_site_2, h206_site_2 ) ); mbuff.append( lineout( h206_tag_address_2, h206_address_2 ) ); mbuff.append( lineout( h206_tag_phone_2, h206_phone_2 ) ); mbuff.append( lineout( h206_tag_spec_care_2, h206_spec_care_2 ) ); mbuff.append( lineout( h206_tag_site_3, h206_site_3 ) ); mbuff.append( lineout( h206_tag_address_3, h206_address_3 ) ); mbuff.append( lineout( h206_tag_phone_3, h206_phone_3 ) ); mbuff.append( lineout( h206_tag_spec_care_3, h206_spec_care_3 ) ); mbuff.append( lineout( h206_tag_site_4, h206_site_4 ) ); mbuff.append( lineout( h206_tag_address_4, h206_address_4 ) ); mbuff.append( lineout( h206_tag_phone_4, h206_phone_4 ) ); mbuff.append( lineout( h206_tag_spec_care_4, h206_spec_care_4 ) ); if (compress) compress_maybe(mbuff); h206_buff.append(mbuff); } void h206_read_buffer(string data) { h206_clear_fields(); read_header(data); h206_name = findstr(data, h206_tag_name); h206_period = findstr(data, h206_tag_period); h206_date_prepared = findstr(data, h206_tag_date_prepared); h206_time_prepared = findstr(data, h206_tag_time_prepared); h206_location = findstr(data, h206_tag_location); h206_loc_contact = findstr(data, h206_tag_loc_contact); h206_team_leader = findstr(data, h206_tag_team_leader); h206_team_contact = findstr(data, h206_tag_team_contact); h206_md_do = findstr(data, h206_tag_md_do); h206_litters = findstr(data, h206_tag_litters); h206_pa_np = findstr(data, h206_tag_pa_np); h206_portable = findstr(data, h206_tag_portable); h206_rn_lpn = findstr(data, h206_tag_rn_lpn); h206_transport = findstr(data, h206_tag_transport); h206_tech_cn = findstr(data, h206_tag_tech_cn); h206_wheelchairs = findstr(data, h206_tag_wheelchairs); h206_team_other = findstr(data, h206_tag_team_other); h206_transport_other = findstr(data, h206_tag_transport_other); h206_meds_1 = findstr(data, h206_tag_meds_1); h206_supp_1 = findstr(data, h206_tag_supp_1); h206_meds_2 = findstr(data, h206_tag_meds_2); h206_supp_2 = findstr(data, h206_tag_supp_2); h206_meds_3 = findstr(data, h206_tag_meds_3); h206_supp_3 = findstr(data, h206_tag_supp_3); h206_meds_4 = findstr(data, h206_tag_meds_4); h206_supp_4 = findstr(data, h206_tag_supp_4); h206_meds_5 = findstr(data, h206_tag_meds_5); h206_supp_5 = findstr(data, h206_tag_supp_5); h206_special_instructions = findstr(data, h206_tag_special_instructions); h206_preparer = findstr(data, h206_tag_preparer); h206_facility = findstr(data, h206_tag_facility); h206_site_1 = findstr(data, h206_tag_site_1); h206_address_1 = findstr(data, h206_tag_address_1); h206_phone_1 = findstr(data, h206_tag_phone_1); h206_spec_care_1 = findstr(data, h206_tag_spec_care_1); h206_site_2 = findstr(data, h206_tag_site_2); h206_address_2 = findstr(data, h206_tag_address_2); h206_phone_2 = findstr(data, h206_tag_phone_2); h206_spec_care_2 = findstr(data, h206_tag_spec_care_2); h206_site_3 = findstr(data, h206_tag_site_3); h206_address_3 = findstr(data, h206_tag_address_3); h206_phone_3 = findstr(data, h206_tag_phone_3); h206_spec_care_3 = findstr(data, h206_tag_spec_care_4); h206_site_4 = findstr(data, h206_tag_site_4); h206_address_4 = findstr(data, h206_tag_address_4); h206_phone_4 = findstr(data, h206_tag_phone_4); h206_spec_care_4 = findstr(data, h206_tag_spec_care_4); h206_update_form(); } void h206_cb_new() { if (check_hics206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); h206_cb_save(); } } h206_clear__form(); clear_header(); h206_def_filename = ICS_msg_dir; h206_def_filename.append("new"HF206_EXT); show_filename(h206_def_filename); h206_using206_template = false; } void h206_cb_import() { fl_alert2("Not implemented"); } void h206_cb_export() { fl_alert2("Not implemented"); } void h206_cb_wrap_import(string wrapfilename, string inpbuffer) { h206_clear__form(); h206_read_buffer(inpbuffer); h206_def_filename = ICS_msg_dir; h206_def_filename.append(wrapfilename); show_filename(h206_def_filename); h206_using206_template = false; } int eval_h206_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(h206_base_filename).append("]"); h206_update_fields(); update_header(FROM); evalstr.append(header("")); h206_buff.clear(); h206_make_buff(true); if (h206_buff.empty()) return 0; compress_maybe( h206_buff ); evalstr.append( h206_buff ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void h206_cb_wrap_export() { if (check_hics206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } h206_update_fields(); if (h206_base_filename == "new"HF206_EXT || h206_base_filename == "default"HF206_EXT) if (!h206_cb_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(h206_base_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); h206_buff.assign(header("")); h206_make_buff(true); export_wrapfile(h206_base_filename, wrapfilename, h206_buff, pext != ".wrap"); h206_buff.assign(header("")); h206_make_buff(false); h206_write(h206_def_filename); } } void h206_cb_wrap_autosend() { if (check_hics206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } h206_update_fields(); if (h206_base_filename == "new"HF206_EXT || h206_base_filename == "default"HF206_EXT) if (!h206_cb_save_as()) return; update_header(FROM); h206_buff.assign(header("")); h206_make_buff(true); xfr_via_socket(h206_base_filename, h206_buff); h206_buff.assign(header("")); h206_make_buff(false); h206_write(h206_def_filename); } void h206_cb_load_template() { string h206_def_filename = h206_def_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"HT206_EXT, h206_def_filename.c_str()); if (p) { h206_clear__form(); read_data_file(p); h206_def_template_name = p; show_filename(h206_def_template_name); h206_using206_template = true; } } void h206_cb_save_template() { if (!h206_using206_template) { h206_cb_save_as_template(); return; } string h206_def_filename = h206_def_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"HT206_EXT, h206_def_filename.c_str()); if (p) { update_header(CHANGED); h206_update_fields(); h206_buff.assign(header("")); h206_make_buff(); h206_write(p); } } void h206_cb_save_as_template() { string h206_def_filename = h206_def_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"HT206_EXT, h206_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); h206_def_template_name = p; if (strlen(pext) == 0) h206_def_template_name.append(HT206_EXT); remove_spaces_from_filename(h206_def_template_name); clear_header(); update_header(CHANGED); h206_update_fields(); h206_buff.assign(header("")); h206_make_buff(); h206_write(h206_def_template_name); show_filename(h206_def_template_name); h206_using206_template = true; } } void h206_cb_open() { const char *p = FSEL::select(_("Open data file"), "HICS-206\t*"HF206_EXT, h206_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; h206_clear__form(); read_data_file(p); h206_using206_template = false; h206_def_filename = p; show_filename(h206_def_filename); } void h206_write(string s) { FILE *file206 = fopen(s.c_str(), "w"); if (!file206) return; fwrite(h206_buff.c_str(), h206_buff.length(), 1, file206); fclose(file206); } bool h206_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(HF206_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = h206_def_filename; p = FSEL::saveas(_("Save data file"), "HICS-206\t*"HF206_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); h206_def_filename = p; if (strlen(pext) == 0) h206_def_filename.append(HF206_EXT); remove_spaces_from_filename(h206_def_filename); h206_update_fields(); update_header(NEW); h206_buff.assign(header("")); h206_write(h206_def_filename); h206_using206_template = false; show_filename(h206_def_filename); return true; } void h206_cb_save() { if (h206_base_filename == "new"HF206_EXT || h206_base_filename == "default"HF206_EXT || h206_using206_template == true) { h206_cb_save_as(); return; } if (check_hics206fields()) update_header(CHANGED); h206_buff.assign(header("")); h206_make_buff(); h206_write(h206_def_filename); h206_using206_template = false; } void h206_cb_html() { string fname_name = fl_filename_name(h206_def_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string hics206_fname = ICS_dir; hics206_fname.append(fname_name); hics206_fname.append(".html"); string html_text = ""; h206_update_fields(); string form206 = hics206_html_template; replacestr(form206, TITLE, fname_name); replacestr(form206, h206_tag_name, h206_name); replacestr(form206, h206_tag_date_prepared, h206_date_prepared); replacestr(form206, h206_tag_time_prepared, h206_time_prepared); replacestr(form206, h206_tag_period, h206_period); replacestr(form206, h206_tag_location, h206_location); replacestr(form206, h206_tag_loc_contact, h206_loc_contact); replacestr(form206, h206_tag_team_leader, h206_team_leader); replacestr(form206, h206_tag_team_contact, h206_team_contact); replacestr(form206, h206_tag_md_do, h206_md_do); replacestr(form206, h206_tag_litters, h206_litters); replacestr(form206, h206_tag_pa_np, h206_pa_np); replacestr(form206, h206_tag_portable, h206_portable); replacestr(form206, h206_tag_rn_lpn, h206_rn_lpn); replacestr(form206, h206_tag_transport, h206_transport); replacestr(form206, h206_tag_tech_cn, h206_tech_cn); replacestr(form206, h206_tag_wheelchairs, h206_wheelchairs); replacestr(form206, h206_tag_team_other, h206_team_other); replacestr(form206, h206_tag_transport_other, h206_transport_other); replacestr(form206, h206_tag_meds_1, h206_meds_1); replacestr(form206, h206_tag_supp_1, h206_supp_1); replacestr(form206, h206_tag_meds_2, h206_meds_2); replacestr(form206, h206_tag_supp_2, h206_supp_2); replacestr(form206, h206_tag_meds_3, h206_meds_3); replacestr(form206, h206_tag_supp_3, h206_supp_3); replacestr(form206, h206_tag_meds_4, h206_meds_4); replacestr(form206, h206_tag_supp_4, h206_supp_4); replacestr(form206, h206_tag_meds_5, h206_meds_5); replacestr(form206, h206_tag_supp_5, h206_supp_5); string temp = h206_special_instructions; if (progStatus.autowordwrap) temp = wordwrap(h206_special_instructions, progStatus.charcount); replacestr(form206, h206_tag_special_instructions, temp); replacestr(form206, h206_tag_site_1, h206_site_1); replacestr(form206, h206_tag_address_1, h206_address_1); replacestr(form206, h206_tag_phone_1, h206_phone_1); replacestr(form206, h206_tag_spec_care_1, h206_spec_care_1); replacestr(form206, h206_tag_site_2, h206_site_2); replacestr(form206, h206_tag_address_2, h206_address_2); replacestr(form206, h206_tag_phone_2, h206_phone_2); replacestr(form206, h206_tag_spec_care_2, h206_spec_care_2); replacestr(form206, h206_tag_site_3, h206_site_3); replacestr(form206, h206_tag_address_3, h206_address_3); replacestr(form206, h206_tag_phone_3, h206_phone_3); replacestr(form206, h206_tag_spec_care_3, h206_spec_care_3); replacestr(form206, h206_tag_site_4, h206_site_4); replacestr(form206, h206_tag_address_4, h206_address_4); replacestr(form206, h206_tag_phone_4, h206_phone_4); replacestr(form206, h206_tag_spec_care_4, h206_spec_care_4); replacestr(form206, h206_tag_preparer, h206_preparer); replacestr(form206, h206_tag_facility, h206_facility); FILE *file206 = fopen(hics206_fname.c_str(), "w"); fprintf(file206,"%s", form206.c_str()); fclose(file206); open_url(hics206_fname.c_str()); } void h206_cb_textout() { string hics206_fname = ICS_dir; hics206_fname.append("hics206.txt"); h206_update_fields(); string form206 = hics206_text_template; replacestr(form206, h206_tag_name, h206_name); replacestr(form206, h206_tag_period, h206_period); replacestr(form206, h206_tag_date_prepared, h206_date_prepared); replacestr(form206, h206_tag_time_prepared, h206_time_prepared); replacestr(form206, h206_tag_location, h206_location); replacestr(form206, h206_tag_loc_contact, h206_loc_contact); replacestr(form206, h206_tag_team_leader, h206_team_leader); replacestr(form206, h206_tag_team_contact, h206_team_contact); replacestr(form206, h206_tag_md_do, h206_md_do); replacestr(form206, h206_tag_litters, h206_litters); replacestr(form206, h206_tag_pa_np, h206_pa_np); replacestr(form206, h206_tag_portable, h206_portable); replacestr(form206, h206_tag_rn_lpn, h206_rn_lpn); replacestr(form206, h206_tag_transport, h206_transport); replacestr(form206, h206_tag_tech_cn, h206_tech_cn); replacestr(form206, h206_tag_wheelchairs, h206_wheelchairs); replacestr(form206, h206_tag_team_other, h206_team_other); replacestr(form206, h206_tag_transport_other, h206_transport_other); replacestr(form206, h206_tag_meds_1, h206_meds_1); replacestr(form206, h206_tag_supp_1, h206_supp_1); replacestr(form206, h206_tag_meds_2, h206_meds_2); replacestr(form206, h206_tag_supp_2, h206_supp_2); replacestr(form206, h206_tag_meds_3, h206_meds_3); replacestr(form206, h206_tag_supp_3, h206_supp_3); replacestr(form206, h206_tag_meds_4, h206_meds_4); replacestr(form206, h206_tag_supp_4, h206_supp_4); replacestr(form206, h206_tag_meds_5, h206_meds_5); replacestr(form206, h206_tag_supp_5, h206_supp_5); replacestr(form206, h206_tag_special_instructions, h206_special_instructions); replacestr(form206, h206_tag_site_1, h206_site_1); replacestr(form206, h206_tag_address_1, h206_address_1); replacestr(form206, h206_tag_phone_1, h206_phone_1); replacestr(form206, h206_tag_spec_care_1, h206_spec_care_1); replacestr(form206, h206_tag_site_2, h206_site_2); replacestr(form206, h206_tag_address_2, h206_address_2); replacestr(form206, h206_tag_phone_2, h206_phone_2); replacestr(form206, h206_tag_spec_care_2, h206_spec_care_2); replacestr(form206, h206_tag_site_3, h206_site_3); replacestr(form206, h206_tag_address_3, h206_address_3); replacestr(form206, h206_tag_phone_3, h206_phone_3); replacestr(form206, h206_tag_spec_care_3, h206_spec_care_3); replacestr(form206, h206_tag_site_4, h206_site_4); replacestr(form206, h206_tag_address_4, h206_address_4); replacestr(form206, h206_tag_phone_4, h206_phone_4); replacestr(form206, h206_tag_spec_care_4, h206_spec_care_4); replacestr(form206, h206_tag_preparer, h206_preparer); replacestr(form206, h206_tag_facility, h206_facility); FILE *file206 = fopen(hics206_fname.c_str(), "w"); fprintf(file206,"%s", form206.c_str()); fclose(file206); open_url(hics206_fname.c_str()); } flmsg-2.0.10/src/hics/hics203.cxx0000664000175000017500000010252412330516146013246 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include using namespace std; // --------------------------------------------------------------------- // hics 203 field variables and template variables // --------------------------------------------------------------------- string hics203_tag_incident = ":inc:"; string hics203_tag_date = ":dat:"; string hics203_tag_time = ":tim:"; string hics203_tag_op_period = ":opp:"; string hics203_tag_incident_commander = ":icc:"; string hics203_tag_incident_safety_officer = ":ics:"; string hics203_tag_incident_info_officer = ":ici:"; string hics203_tag_liaison_officer = ":icl:"; string hics203_tag_prepared_by = ":pre:"; string hics203_tag_facility = ":facility:"; string hics203_tag_tech_spc = ":tech_spc[n]:"; // 6 string hics203_tag_ops_chief = ":ops_chief:"; string hics203_tag_bus_brch = ":bus_brch:"; string hics203_tag_stg_mgr = ":stg_mgr:"; string hics203_tag_med_care_brch = ":med_care_brch:"; string hics203_tag_infr_brch = ":infr_brch:"; string hics203_tag_sec_brch = ":sec_brch:"; string hics203_tag_hazmat_brch = ":hazmat_brch:"; string hics203_tag_ops_other = ":ops_other:"; string hics203_tag_fin_chief = ":fin_chief:"; string hics203_tag_cost_unit = ":cost_unit:"; string hics203_tag_proc_unit = ":proc_unit:"; string hics203_tag_comp_unit = ":comp_unit:"; string hics203_tag_time_unit = ":time_unit:"; string hics203_tag_fin_other = ":fin_other:"; string hics203_tag_planning_chief = ":planning_chief:"; string hics203_tag_res_unit = ":res_unit:"; string hics203_tag_sit_unit = ":sit_unit:"; string hics203_tag_doc_unit = ":doc_unit:"; string hics203_tag_dem_unit = ":dem_unit:"; string hics203_tag_planning_other = ":planning_other:"; string hics203_tag_log_chief = ":log_chief:"; string hics203_tag_sup_brch = ":sup_brch:"; string hics203_tag_svc_brch = ":svc_brch:"; string hics203_tag_log_other = ":log_other:"; string hics203_tag_hcc_agency = ":hcc_agency:"; string hics203_tag_hcc_rep = ":hcc_rep:"; string hics203_tag_ext_loc = ":ext_loc:"; string hics203_tag_ext_rep = ":ext_rep:"; string hics203_incident; string hics203_date; string hics203_time; string hics203_op_period; string hics203_incident_commander; string hics203_incident_safety_officer; string hics203_incident_info_officer; string hics203_liaison_officer; string hics203_prepared_by; string hics203_facility; string hics203_fin_chief; string hics203_fin_other; string hics203_time_unit; string hics203_proc_unit; string hics203_comp_unit; string hics203_cost_unit; string hics203_tech_spc[6]; string hics203_planning_chief; string hics203_planning_other; string hics203_res_unit; string hics203_sit_unit; string hics203_doc_unit; string hics203_dem_unit; string hics203_log_chief; string hics203_log_other; string hics203_log_sup_brch; string hics203_bus_brch; string hics203_stg_mgr; string hics203_med_care_brch; string hics203_infr_brch; string hics203_sec_brch; string hics203_hazmat_brch; string hics203_hcc_agency; string hics203_svc_brch; string hics203_hcc_rep; string hics203_ext_loc; string hics203_ext_rep; string hics203_ops_chief; string hics203_ops_other; // ===================================================================== string hics_buff203; string def_hics203_filename = ""; string base_hics203_filename = ""; string def_hics203_TemplateName = ""; bool using_hics203_template = false; void cb_hics203_set_date() { txt_hics203_date->value(szDate()); } void cb_hics203_set_time() { txt_hics203_time->value(szTime()); } void clear_hics203fields() { hics203_incident.clear(); hics203_date.clear(); hics203_time.clear(); hics203_op_period.clear(); hics203_incident_commander.clear(); hics203_incident_safety_officer.clear(); hics203_incident_info_officer.clear(); hics203_liaison_officer.clear(); hics203_prepared_by.clear(); hics203_facility.clear(); hics203_planning_chief.clear(); hics203_planning_other.clear(); hics203_res_unit.clear(); hics203_sit_unit.clear(); hics203_doc_unit.clear(); hics203_dem_unit.clear(); hics203_log_chief.clear(); hics203_log_other.clear(); hics203_log_sup_brch.clear(); hics203_bus_brch.clear(); hics203_stg_mgr.clear(); hics203_med_care_brch.clear(); hics203_infr_brch.clear(); hics203_sec_brch.clear(); hics203_hazmat_brch.clear(); hics203_hcc_agency.clear(); hics203_svc_brch.clear(); hics203_hcc_rep.clear(); hics203_ext_loc.clear(); hics203_ext_rep.clear(); hics203_ops_chief.clear(); hics203_ops_other.clear(); hics203_fin_chief.clear(); hics203_fin_other.clear(); hics203_time_unit.clear(); hics203_proc_unit.clear(); hics203_comp_unit.clear(); hics203_cost_unit.clear(); for (int i = 0; i < 6; i++) { hics203_tech_spc[i].clear(); } } bool check_hics203fields() { if (hics203_incident != txt_hics203_incident->value()) return true; if (hics203_date != txt_hics203_date->value()) return true; if (hics203_time != txt_hics203_time->value()) return true; if (hics203_op_period != txt_hics203_op_period->value()) return true; if (hics203_incident_commander != txt_hics203_incident_commander->value()) return true; if (hics203_incident_safety_officer != txt_hics203_incident_safety_officer->value()) return true; if (hics203_incident_info_officer != txt_hics203_incident_info_officer->value()) return true; if (hics203_liaison_officer != txt_hics203_liaison_officer->value()) return true; if (hics203_prepared_by != txt_hics203_prepared_by->value()) return true; if (hics203_facility != txt_hics203_facility->value()) return true; if (hics203_planning_chief != txt_hics203_planning_chief->value()) return true; if (hics203_planning_other != txt_hics203_planning_other->value()) return true; if (hics203_res_unit != txt_hics203_res_unit->value()) return true; if (hics203_sit_unit != txt_hics203_sit_unit->value()) return true; if (hics203_doc_unit != txt_hics203_doc_unit->value()) return true; if (hics203_dem_unit != txt_hics203_dem_unit->value()) return true; if (hics203_log_chief != txt_hics203_log_chief->value()) return true; if (hics203_log_other != txt_hics203_log_other->value()) return true; if (hics203_log_sup_brch != txt_hics203_log_sup_brch->value()) return true; if (hics203_bus_brch != txt_hics203_bus_brch->value()) return true; if (hics203_stg_mgr != txt_hics203_stg_mgr->value()) return true; if (hics203_med_care_brch != txt_hics203_med_care_brch->value()) return true; if (hics203_infr_brch != txt_hics203_infr_brch->value()) return true; if (hics203_sec_brch != txt_hics203_sec_brch->value()) return true; if (hics203_hazmat_brch != txt_hics203_hazmat_brch->value()) return true; if (hics203_hcc_agency != txt_hics203_hcc_agency->value()) return true; if (hics203_svc_brch != txt_hics203_svc_brch->value()) return true; if (hics203_hcc_rep != txt_hics203_hcc_rep->value()) return true; if (hics203_ext_loc != txt_hics203_ext_loc->value()) return true; if (hics203_ext_rep != txt_hics203_ext_rep->value()) return true; if (hics203_ops_chief != txt_hics203_ops_chief->value()) return true; if (hics203_ops_other != txt_hics203_ops_other->value()) return true; if (hics203_fin_chief != txt_hics203_fin_chief->value()) return true; if (hics203_fin_other != txt_hics203_fin_other->value()) return true; if (hics203_time_unit != txt_hics203_time_unit->value()) return true; if (hics203_proc_unit != txt_hics203_proc_unit->value()) return true; if (hics203_comp_unit != txt_hics203_comp_unit->value()) return true; if (hics203_cost_unit != txt_hics203_cost_unit->value()) return true; for (int i = 0; i < 6; i++) { if (hics203_tech_spc[i] != txt_hics203_tech_spc[i]->value()) return true; } return false; } void update_hics203fields() { hics203_incident = txt_hics203_incident->value(); hics203_date = txt_hics203_date->value(); hics203_time = txt_hics203_time->value(); hics203_op_period = txt_hics203_op_period->value(); hics203_incident_commander = txt_hics203_incident_commander->value(); hics203_incident_safety_officer = txt_hics203_incident_safety_officer->value(); hics203_incident_info_officer = txt_hics203_incident_info_officer->value(); hics203_liaison_officer = txt_hics203_liaison_officer->value(); hics203_prepared_by = txt_hics203_prepared_by->value(); hics203_facility = txt_hics203_facility->value(); hics203_planning_chief = txt_hics203_planning_chief->value(); hics203_planning_other = txt_hics203_planning_other->value(); hics203_res_unit = txt_hics203_res_unit->value(); hics203_sit_unit = txt_hics203_sit_unit->value(); hics203_doc_unit = txt_hics203_doc_unit->value(); hics203_dem_unit = txt_hics203_dem_unit->value(); hics203_log_chief = txt_hics203_log_chief->value(); hics203_log_other = txt_hics203_log_other->value(); hics203_log_sup_brch = txt_hics203_log_sup_brch->value(); hics203_bus_brch = txt_hics203_bus_brch->value(); hics203_stg_mgr = txt_hics203_stg_mgr->value(); hics203_med_care_brch = txt_hics203_med_care_brch->value(); hics203_infr_brch = txt_hics203_infr_brch->value(); hics203_sec_brch = txt_hics203_sec_brch->value(); hics203_hazmat_brch = txt_hics203_hazmat_brch->value(); hics203_hcc_agency = txt_hics203_hcc_agency->value(); hics203_svc_brch = txt_hics203_svc_brch->value(); hics203_hcc_rep = txt_hics203_hcc_rep->value(); hics203_ext_loc = txt_hics203_ext_loc->value(); hics203_ext_rep = txt_hics203_ext_rep->value(); hics203_ops_chief = txt_hics203_ops_chief->value(); hics203_ops_other = txt_hics203_ops_other->value(); hics203_fin_chief = txt_hics203_fin_chief->value(); hics203_fin_other = txt_hics203_fin_other->value(); hics203_time_unit = txt_hics203_time_unit->value(); hics203_proc_unit = txt_hics203_proc_unit->value(); hics203_comp_unit = txt_hics203_comp_unit->value(); hics203_cost_unit = txt_hics203_cost_unit->value(); for (int i = 0; i < 6; i++) { hics203_tech_spc[i] = txt_hics203_tech_spc[i]->value(); } } void update_hics203form() { txt_hics203_incident->value(hics203_incident.c_str()); txt_hics203_date->value(hics203_date.c_str()); txt_hics203_time->value(hics203_time.c_str()); txt_hics203_op_period->value(hics203_op_period.c_str()); txt_hics203_incident_commander->value(hics203_incident_commander.c_str()); txt_hics203_incident_safety_officer->value(hics203_incident_safety_officer.c_str()); txt_hics203_incident_info_officer->value(hics203_incident_info_officer.c_str()); txt_hics203_liaison_officer->value(hics203_liaison_officer.c_str()); txt_hics203_prepared_by->value(hics203_prepared_by.c_str()); txt_hics203_facility->value(hics203_facility.c_str()); txt_hics203_planning_chief->value(hics203_planning_chief.c_str()); txt_hics203_planning_other->value(hics203_planning_other.c_str()); txt_hics203_res_unit->value(hics203_res_unit.c_str()); txt_hics203_sit_unit->value(hics203_sit_unit.c_str()); txt_hics203_doc_unit->value(hics203_doc_unit.c_str()); txt_hics203_dem_unit->value(hics203_dem_unit.c_str()); txt_hics203_log_chief->value(hics203_log_chief.c_str()); txt_hics203_log_other->value(hics203_log_other.c_str()); txt_hics203_log_sup_brch->value(hics203_log_sup_brch.c_str()); txt_hics203_bus_brch->value(hics203_bus_brch.c_str()); txt_hics203_stg_mgr->value(hics203_stg_mgr.c_str()); txt_hics203_med_care_brch->value(hics203_med_care_brch.c_str()); txt_hics203_infr_brch->value(hics203_infr_brch.c_str()); txt_hics203_sec_brch->value(hics203_sec_brch.c_str()); txt_hics203_hazmat_brch->value(hics203_hazmat_brch.c_str()); txt_hics203_hcc_agency->value(hics203_hcc_agency.c_str()); txt_hics203_svc_brch->value(hics203_svc_brch.c_str()); txt_hics203_hcc_rep->value(hics203_hcc_rep.c_str()); txt_hics203_ext_loc->value(hics203_ext_loc.c_str()); txt_hics203_ext_rep->value(hics203_ext_rep.c_str()); txt_hics203_ops_chief->value(hics203_ops_chief.c_str()); txt_hics203_ops_other->value(hics203_ops_other.c_str()); txt_hics203_fin_chief->value(hics203_fin_chief.c_str()); txt_hics203_fin_other->value(hics203_fin_other.c_str()); txt_hics203_time_unit->value(hics203_time_unit.c_str()); txt_hics203_proc_unit->value(hics203_proc_unit.c_str()); txt_hics203_comp_unit->value(hics203_comp_unit.c_str()); txt_hics203_cost_unit->value(hics203_cost_unit.c_str()); for (int i = 0; i < 6; i++) { txt_hics203_tech_spc[i]->value(hics203_tech_spc[i].c_str()); } } void clear_hics203_form() { clear_hics203fields(); txt_hics203_incident->value(""); txt_hics203_date->value(""); txt_hics203_time->value(""); txt_hics203_op_period->value(""); txt_hics203_incident_commander->value(""); txt_hics203_incident_safety_officer->value(""); txt_hics203_incident_info_officer->value(""); txt_hics203_liaison_officer->value(""); txt_hics203_prepared_by->value(""); txt_hics203_facility->value(""); txt_hics203_planning_chief->value(""); txt_hics203_planning_other->value(""); txt_hics203_res_unit->value(""); txt_hics203_sit_unit->value(""); txt_hics203_doc_unit->value(""); txt_hics203_dem_unit->value(""); txt_hics203_log_chief->value(""); txt_hics203_log_other->value(""); txt_hics203_log_sup_brch->value(""); txt_hics203_bus_brch->value(""); txt_hics203_stg_mgr->value(""); txt_hics203_med_care_brch->value(""); txt_hics203_infr_brch->value(""); txt_hics203_sec_brch->value(""); txt_hics203_hazmat_brch->value(""); txt_hics203_hcc_agency->value(""); txt_hics203_svc_brch->value(""); txt_hics203_hcc_rep->value(""); txt_hics203_ext_loc->value(""); txt_hics203_ext_rep->value(""); txt_hics203_ops_chief->value(""); txt_hics203_ops_other->value(""); txt_hics203_fin_chief->value(""); txt_hics203_fin_other->value(""); txt_hics203_time_unit->value(""); txt_hics203_proc_unit->value(""); txt_hics203_comp_unit->value(""); txt_hics203_cost_unit->value(""); for (int i = 0; i < 6; i++) { txt_hics203_tech_spc[i]->value(""); } } string &hics_n(string & subst, int n) { static string garbage = "#$^*!"; size_t pos = subst.find("["); if (pos == string::npos) return garbage; pos++; subst[pos] = '0' + n; return subst; } void make_hics_buff203(bool compress = false) { string mbuff; mbuff.assign( lineout( hics203_tag_incident, hics203_incident ) ); mbuff.append( lineout( hics203_tag_date, hics203_date ) ); mbuff.append( lineout( hics203_tag_time, hics203_time ) ); mbuff.append( lineout( hics203_tag_op_period, hics203_op_period ) ); mbuff.append( lineout( hics203_tag_incident_commander, hics203_incident_commander ) ); mbuff.append( lineout( hics203_tag_incident_safety_officer, hics203_incident_safety_officer ) ); mbuff.append( lineout( hics203_tag_incident_info_officer, hics203_incident_info_officer ) ); mbuff.append( lineout( hics203_tag_liaison_officer, hics203_liaison_officer ) ); mbuff.append( lineout( hics203_tag_prepared_by, hics203_prepared_by ) ); mbuff.append( lineout( hics203_tag_facility, hics203_facility ) ); mbuff.append( lineout( hics203_tag_planning_chief, hics203_planning_chief ) ); mbuff.append( lineout( hics203_tag_planning_other, hics203_planning_other ) ); mbuff.append( lineout( hics203_tag_res_unit, hics203_res_unit ) ); mbuff.append( lineout( hics203_tag_sit_unit, hics203_sit_unit ) ); mbuff.append( lineout( hics203_tag_doc_unit, hics203_doc_unit ) ); mbuff.append( lineout( hics203_tag_dem_unit, hics203_dem_unit ) ); mbuff.append( lineout( hics203_tag_log_chief, hics203_log_chief ) ); mbuff.append( lineout( hics203_tag_log_other, hics203_log_other ) ); mbuff.append( lineout( hics203_tag_sup_brch, hics203_log_sup_brch ) ); mbuff.append( lineout( hics203_tag_bus_brch, hics203_bus_brch ) ); mbuff.append( lineout( hics203_tag_stg_mgr, hics203_stg_mgr ) ); mbuff.append( lineout( hics203_tag_med_care_brch, hics203_med_care_brch ) ); mbuff.append( lineout( hics203_tag_infr_brch, hics203_infr_brch ) ); mbuff.append( lineout( hics203_tag_sec_brch, hics203_sec_brch ) ); mbuff.append( lineout( hics203_tag_hazmat_brch, hics203_hazmat_brch ) ); mbuff.append( lineout( hics203_tag_hcc_agency, hics203_hcc_agency ) ); mbuff.append( lineout( hics203_tag_svc_brch, hics203_svc_brch ) ); mbuff.append( lineout( hics203_tag_hcc_rep, hics203_hcc_rep ) ); mbuff.append( lineout( hics203_tag_ext_loc, hics203_ext_loc ) ); mbuff.append( lineout( hics203_tag_ext_rep, hics203_ext_rep ) ); mbuff.append( lineout( hics203_tag_ops_chief, hics203_ops_chief ) ); mbuff.append( lineout( hics203_tag_ops_other, hics203_ops_other ) ); mbuff.append( lineout( hics203_tag_fin_chief, hics203_fin_chief ) ); mbuff.append( lineout( hics203_tag_fin_other, hics203_fin_other ) ); mbuff.append( lineout( hics203_tag_time_unit, hics203_time_unit ) ); mbuff.append( lineout( hics203_tag_proc_unit, hics203_proc_unit ) ); mbuff.append( lineout( hics203_tag_comp_unit, hics203_comp_unit ) ); mbuff.append( lineout( hics203_tag_cost_unit, hics203_cost_unit ) ); for (int i = 0; i < 6; i++) { mbuff.append( lineout( hics_n( hics203_tag_tech_spc, i ), hics203_tech_spc[i] ) ); } if (compress) compress_maybe(mbuff); hics_buff203.append(mbuff); } void read_hics203_buffer(string data) { clear_hics203fields(); read_header(data); hics203_incident = findstr(data, hics203_tag_incident); hics203_date = findstr(data, hics203_tag_date); hics203_time = findstr(data, hics203_tag_time); hics203_op_period = findstr(data, hics203_tag_op_period); hics203_incident_commander = findstr(data, hics203_tag_incident_commander); hics203_incident_safety_officer = findstr(data, hics203_tag_incident_safety_officer); hics203_incident_info_officer = findstr(data, hics203_tag_incident_info_officer); hics203_liaison_officer = findstr(data, hics203_tag_liaison_officer); hics203_prepared_by = findstr(data, hics203_tag_prepared_by); hics203_facility = findstr(data, hics203_tag_facility); hics203_planning_chief = findstr(data, hics203_tag_planning_chief); hics203_planning_other = findstr(data, hics203_tag_planning_other); hics203_res_unit = findstr(data, hics203_tag_res_unit); hics203_sit_unit = findstr(data, hics203_tag_sit_unit); hics203_doc_unit = findstr(data, hics203_tag_doc_unit); hics203_dem_unit = findstr(data, hics203_tag_dem_unit); hics203_log_chief = findstr(data, hics203_tag_log_chief); hics203_log_other = findstr(data, hics203_tag_log_other); hics203_log_sup_brch = findstr(data, hics203_tag_sup_brch); hics203_bus_brch = findstr(data, hics203_tag_bus_brch); hics203_stg_mgr = findstr(data, hics203_tag_stg_mgr); hics203_med_care_brch = findstr(data, hics203_tag_med_care_brch); hics203_infr_brch = findstr(data, hics203_tag_infr_brch); hics203_sec_brch = findstr(data, hics203_tag_sec_brch); hics203_hazmat_brch = findstr(data, hics203_tag_hazmat_brch); hics203_hcc_agency = findstr(data, hics203_tag_hcc_agency); hics203_svc_brch = findstr(data, hics203_tag_svc_brch); hics203_hcc_rep = findstr(data, hics203_tag_hcc_rep); hics203_ext_loc = findstr(data, hics203_tag_ext_loc); hics203_ext_rep = findstr(data, hics203_tag_ext_rep); hics203_ops_chief = findstr(data, hics203_tag_ops_chief); hics203_ops_other = findstr(data, hics203_tag_ops_other); hics203_fin_chief = findstr(data, hics203_tag_fin_chief); hics203_fin_other = findstr(data, hics203_tag_fin_other); hics203_time_unit = findstr(data, hics203_tag_time_unit); hics203_proc_unit = findstr(data, hics203_tag_proc_unit); hics203_comp_unit = findstr(data, hics203_tag_comp_unit); hics203_cost_unit = findstr(data, hics203_tag_cost_unit); for (int i = 0; i < 6; i++) { hics203_tech_spc[i] = findstr(data, hics_n( hics203_tag_tech_spc, i) ); } update_hics203form(); } void cb_hics203_new() { if (check_hics203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_hics203_save(); } } clear_hics203_form(); clear_header(); def_hics203_filename = ICS_msg_dir; def_hics203_filename.append("new"HF203_EXT); show_filename(def_hics203_filename); using_hics203_template = false; } void cb_hics203_import() { fl_alert2("Not implemented"); } void cb_hics203_export() { fl_alert2("Not implemented"); } void cb_hics203_wrap_import(string wrapfilename, string inpbuffer) { clear_hics203_form(); read_hics203_buffer(inpbuffer); def_hics203_filename = ICS_msg_dir; def_hics203_filename.append(wrapfilename); show_filename(def_hics203_filename); using_hics203_template = false; } int eval_hics203_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_hics203_filename).append("]"); update_hics203fields(); update_header(FROM); evalstr.append(header("")); hics_buff203.clear(); make_hics_buff203(true); if (hics_buff203.empty()) return 0; compress_maybe( hics_buff203 ); evalstr.append( hics_buff203 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_hics203_wrap_export() { if (check_hics203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_hics203fields(); if (base_hics203_filename == "new"HF203_EXT || base_hics203_filename == "default"HF203_EXT) if (!cb_hics203_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_hics203_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); hics_buff203.assign(header("")); make_hics_buff203(true); export_wrapfile(base_hics203_filename, wrapfilename, hics_buff203, pext != ".wrap"); hics_buff203.assign(header("")); make_hics_buff203(false); write_hics203(def_hics203_filename); } } void cb_hics203_wrap_autosend() { if (check_hics203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_hics203fields(); if (base_hics203_filename == "new"HF203_EXT || base_hics203_filename == "default"HF203_EXT) cb_hics203_save_as(); update_header(FROM); hics_buff203.assign(header("")); make_hics_buff203(true); xfr_via_socket(base_hics203_filename, hics_buff203); hics_buff203.assign(header("")); make_hics_buff203(false); write_hics203(def_hics203_filename); } void cb_hics203_load_template() { string def_hics203_filename = def_hics203_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"HT203_EXT, def_hics203_filename.c_str()); if (p) { clear_hics203_form(); read_data_file(p); def_hics203_TemplateName = p; show_filename(def_hics203_TemplateName); using_hics203_template = true; } } void cb_hics203_save_template() { if (!using_hics203_template) { cb_hics203_save_as_template(); return; } string def_hics203_filename = def_hics203_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"HT203_EXT, def_hics203_filename.c_str()); if (p) { update_header(CHANGED); update_203fields(); hics_buff203.assign(header("")); make_hics_buff203(); write_hics203(p); } } void cb_hics203_save_as_template() { string def_hics203_filename = def_hics203_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"HT203_EXT, def_hics203_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_hics203_TemplateName = p; if (strlen(pext) == 0) def_hics203_TemplateName.append(HT203_EXT); remove_spaces_from_filename(def_hics203_TemplateName); clear_header(); update_header(CHANGED); update_203fields(); hics_buff203.assign(header("")); make_hics_buff203(); write_hics203(def_hics203_TemplateName); show_filename(def_hics203_TemplateName); using_hics203_template = true; } } void cb_hics203_open() { const char *p = FSEL::select(_("Open data file"), "HICS-203\t*"HF203_EXT, def_hics203_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_hics203_form(); read_data_file(p); using_hics203_template = false; def_hics203_filename = p; show_filename(def_hics203_filename); } void write_hics203(string s) { FILE *file203 = fopen(s.c_str(), "w"); if (!file203) return; fwrite(hics_buff203.c_str(), hics_buff203.length(), 1, file203); fclose(file203); } bool cb_hics203_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F203_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_hics203_filename; p = FSEL::saveas(_("Save data file"), "HICS-203\t*"HF203_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_hics203_filename = p; if (strlen(pext) == 0) def_hics203_filename.append(HF203_EXT); remove_spaces_from_filename(def_hics203_filename); update_hics203fields(); update_header(NEW); hics_buff203.assign(header("")); make_hics_buff203(); write_hics203(def_hics203_filename); using_hics203_template = false; show_filename(def_hics203_filename); return true; } void cb_hics203_save() { if (base_hics203_filename == "new"HF203_EXT || base_hics203_filename == "default"HF203_EXT || using_hics203_template == true) { cb_hics203_save_as(); return; } if (check_hics203fields()) update_header(CHANGED); update_hics203fields(); hics_buff203.assign(header("")); make_hics_buff203(); write_hics203(def_hics203_filename); using_hics203_template = false; } void cb_hics203_html() { string fname_name = fl_filename_name(def_hics203_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string hics203_fname = ICS_dir; hics203_fname.append(fname_name); hics203_fname.append(".html"); string html_text = ""; update_hics203fields(); string form203 = hics203_html_template; replacestr(form203, TITLE, fname_name); replacestr(form203, hics203_tag_incident, hics203_incident ); replacestr(form203, hics203_tag_date, hics203_date ); replacestr(form203, hics203_tag_time, hics203_time ); replacestr(form203, hics203_tag_op_period, hics203_op_period ); replacestr(form203, hics203_tag_incident_commander, hics203_incident_commander ); replacestr(form203, hics203_tag_incident_safety_officer, hics203_incident_safety_officer ); replacestr(form203, hics203_tag_incident_info_officer, hics203_incident_info_officer ); replacestr(form203, hics203_tag_liaison_officer, hics203_liaison_officer ); replacestr(form203, hics203_tag_prepared_by, hics203_prepared_by ); replacestr(form203, hics203_tag_facility, hics203_facility ); replacestr(form203, hics203_tag_planning_chief, hics203_planning_chief ); replacestr(form203, hics203_tag_planning_other, hics203_planning_other ); replacestr(form203, hics203_tag_res_unit, hics203_res_unit ); replacestr(form203, hics203_tag_sit_unit, hics203_sit_unit ); replacestr(form203, hics203_tag_doc_unit, hics203_doc_unit ); replacestr(form203, hics203_tag_dem_unit, hics203_dem_unit ); replacestr(form203, hics203_tag_log_chief, hics203_log_chief ); replacestr(form203, hics203_tag_log_other, hics203_log_other ); replacestr(form203, hics203_tag_sup_brch, hics203_log_sup_brch ); replacestr(form203, hics203_tag_bus_brch, hics203_bus_brch ); replacestr(form203, hics203_tag_stg_mgr, hics203_stg_mgr); replacestr(form203, hics203_tag_med_care_brch, hics203_med_care_brch); replacestr(form203, hics203_tag_infr_brch, hics203_infr_brch); replacestr(form203, hics203_tag_sec_brch, hics203_sec_brch); replacestr(form203, hics203_tag_hazmat_brch, hics203_hazmat_brch ); replacestr(form203, hics203_tag_hcc_agency, hics203_hcc_agency ); replacestr(form203, hics203_tag_svc_brch, hics203_svc_brch ); replacestr(form203, hics203_tag_hcc_rep, hics203_hcc_rep ); replacestr(form203, hics203_tag_ext_loc, hics203_ext_loc ); replacestr(form203, hics203_tag_ext_rep, hics203_ext_rep ); replacestr(form203, hics203_tag_ops_chief, hics203_ops_chief ); replacestr(form203, hics203_tag_ops_other, hics203_ops_other ); replacestr(form203, hics203_tag_fin_chief, hics203_fin_chief ); replacestr(form203, hics203_tag_fin_other, hics203_fin_other ); replacestr(form203, hics203_tag_time_unit, hics203_time_unit ); replacestr(form203, hics203_tag_proc_unit, hics203_proc_unit ); replacestr(form203, hics203_tag_comp_unit, hics203_comp_unit ); replacestr(form203, hics203_tag_cost_unit, hics203_cost_unit ); for (int i = 0; i < 6; i++) { replacestr(form203, hics_n( hics203_tag_tech_spc, i ), hics203_tech_spc[i] ); } FILE *file203 = fopen(hics203_fname.c_str(), "w"); fprintf(file203,"%s", form203.c_str()); fclose(file203); open_url(hics203_fname.c_str()); } void cb_hics203_msg_type() { if (tabs_msg_type->value() == tab_hics203 ) { tab_hics203_type->value(tab_hics203_1); show_filename(def_hics203_filename); } } void cb_hics203_textout() { string hics203_fname = ICS_dir; hics203_fname.append("hics203.txt"); update_hics203fields(); string form203 = hics203_text_template; replacestr(form203, hics203_tag_incident, hics203_incident ); replacestr(form203, hics203_tag_date, hics203_date ); replacestr(form203, hics203_tag_time, hics203_time ); replacestr(form203, hics203_tag_op_period, hics203_op_period ); replacestr(form203, hics203_tag_incident_commander, hics203_incident_commander ); replacestr(form203, hics203_tag_incident_safety_officer, hics203_incident_safety_officer ); replacestr(form203, hics203_tag_incident_info_officer, hics203_incident_info_officer ); replacestr(form203, hics203_tag_liaison_officer, hics203_liaison_officer ); replacestr(form203, hics203_tag_prepared_by, hics203_prepared_by ); replacestr(form203, hics203_tag_facility, hics203_facility ); replacestr(form203, hics203_tag_planning_chief, hics203_planning_chief ); replacestr(form203, hics203_tag_planning_other, hics203_planning_other ); replacestr(form203, hics203_tag_res_unit, hics203_res_unit ); replacestr(form203, hics203_tag_sit_unit, hics203_sit_unit ); replacestr(form203, hics203_tag_doc_unit, hics203_doc_unit ); replacestr(form203, hics203_tag_dem_unit, hics203_dem_unit ); replacestr(form203, hics203_tag_log_chief, hics203_log_chief ); replacestr(form203, hics203_tag_log_other, hics203_log_other ); replacestr(form203, hics203_tag_sup_brch, hics203_log_sup_brch ); replacestr(form203, hics203_tag_bus_brch, hics203_bus_brch ); replacestr(form203, hics203_tag_stg_mgr, hics203_stg_mgr); replacestr(form203, hics203_tag_med_care_brch, hics203_med_care_brch); replacestr(form203, hics203_tag_infr_brch, hics203_infr_brch); replacestr(form203, hics203_tag_sec_brch, hics203_sec_brch); replacestr(form203, hics203_tag_hazmat_brch, hics203_hazmat_brch ); replacestr(form203, hics203_tag_hcc_agency, hics203_hcc_agency ); replacestr(form203, hics203_tag_svc_brch, hics203_svc_brch ); replacestr(form203, hics203_tag_hcc_rep, hics203_hcc_rep ); replacestr(form203, hics203_tag_ext_loc, hics203_ext_loc ); replacestr(form203, hics203_tag_ext_rep, hics203_ext_rep ); replacestr(form203, hics203_tag_ops_chief, hics203_ops_chief ); replacestr(form203, hics203_tag_ops_other, hics203_ops_other ); replacestr(form203, hics203_tag_fin_chief, hics203_fin_chief ); replacestr(form203, hics203_tag_fin_other, hics203_fin_other ); replacestr(form203, hics203_tag_time_unit, hics203_time_unit ); replacestr(form203, hics203_tag_proc_unit, hics203_proc_unit ); replacestr(form203, hics203_tag_comp_unit, hics203_comp_unit ); replacestr(form203, hics203_tag_cost_unit, hics203_cost_unit ); for (int i = 0; i < 6; i++) { replacestr(form203, hics_n( hics203_tag_tech_spc, i ), hics203_tech_spc[i] ); } FILE *file203 = fopen(hics203_fname.c_str(), "w"); fprintf(file203,"%s", form203.c_str()); fclose(file203); open_url(hics203_fname.c_str()); } flmsg-2.0.10/src/plaintext/0000775000175000017500000000000012516663375012522 500000000000000flmsg-2.0.10/src/plaintext/plaintext_templates.cxx0000664000175000017500000000345712330516146017250 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "templates.h" const char pt_html_template[] = "\ \ \ :tt:\ \ \ \ \ \ \ \ \ \ \ \ \ \
:tt:
TO: :to:
FROM: :fm:
SUBJ: :sb:
DATE: :dt:
TIME: :tm:
MESSAGE:
:mg:
\ "; const char pt_txt_template[] = "TITLE: :tt:\n\ TO: :to:\n\ FROM: :fm:\n\ SUBJ: :sb:\n\ DATE: :dt:\n\ TIME: :tm:\n\ MESSAGE:\n\ :mg:\n\ "; flmsg-2.0.10/src/plaintext/plaintext_tab.cxx0000664000175000017500000001306412330516146016013 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_plaintext = (Fl_Group *)0; Fl_Input2 *txt_pt_title = (Fl_Input2 *)0; Fl_Input2 *txt_pt_to = (Fl_Input2 *)0; Fl_Input2 *txt_pt_fm = (Fl_Input2 *)0; Fl_Input2 *txt_pt_subj = (Fl_Input2 *)0; FTextEdit *txt_pt_msg = (FTextEdit *)0; Fl_DateInput *txt_pt_date = (Fl_DateInput *)0; Fl_Button *btn_pt_date = (Fl_Button *)0; Fl_Input2 *txt_pt_time = (Fl_Input2 *)0; Fl_Button *btn_pt_time = (Fl_Button *)0; static void cb_btn_pt_date(Fl_Button*, void*) { cb_set_pt_date(); } static void cb_btn_pt_time(Fl_Button*, void*) { cb_set_pt_time(); } void plain_changed(Fl_Widget *, void *) { estimate(); } void create_plaintext_tab() { int Y = tab_top; tab_plaintext = new Fl_Group(0, Y, 570, 380); tab_plaintext->align(FL_ALIGN_TOP); txt_pt_title = new Fl_Input2(41, Y, 525, 24, _("Title")); txt_pt_title->tooltip(_("Addressee")); txt_pt_title->box(FL_DOWN_BOX); txt_pt_title->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_title->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_title->labeltype(FL_NORMAL_LABEL); txt_pt_title->labelfont(0); txt_pt_title->labelsize(14); txt_pt_title->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_title->align(FL_ALIGN_LEFT); txt_pt_title->callback(plain_changed); txt_pt_title->when(FL_WHEN_CHANGED); txt_pt_to = new Fl_Input2(42, Y+25, 320, 24, _("To")); txt_pt_to->tooltip(_("Addressee")); txt_pt_to->box(FL_DOWN_BOX); txt_pt_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_to->labeltype(FL_NORMAL_LABEL); txt_pt_to->labelfont(0); txt_pt_to->labelsize(14); txt_pt_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_to->align(FL_ALIGN_LEFT); txt_pt_to->callback(plain_changed); txt_pt_to->when(FL_WHEN_CHANGED); txt_pt_fm = new Fl_Input2(42, Y+50, 320, 24, _("Fm")); txt_pt_fm->tooltip(_("Originator")); txt_pt_fm->box(FL_DOWN_BOX); txt_pt_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_fm->labeltype(FL_NORMAL_LABEL); txt_pt_fm->labelfont(0); txt_pt_fm->labelsize(14); txt_pt_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_fm->align(FL_ALIGN_LEFT); txt_pt_fm->callback(plain_changed); txt_pt_fm->when(FL_WHEN_CHANGED); txt_pt_subj = new Fl_Input2(42, Y+75, 525, 24, _("Sub.")); txt_pt_subj->tooltip(_("Subject")); txt_pt_subj->box(FL_DOWN_BOX); txt_pt_subj->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_subj->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_subj->labeltype(FL_NORMAL_LABEL); txt_pt_subj->labelfont(0); txt_pt_subj->labelsize(14); txt_pt_subj->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_subj->align(FL_ALIGN_LEFT); txt_pt_subj->callback(plain_changed); txt_pt_subj->when(FL_WHEN_CHANGED); txt_pt_msg = new FTextEdit(4, Y+125, 562, 250, _("Message:")); txt_pt_msg->box(FL_DOWN_FRAME); txt_pt_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_msg->labeltype(FL_NORMAL_LABEL); txt_pt_msg->labelfont(0); txt_pt_msg->labelsize(14); txt_pt_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_msg->align(FL_ALIGN_TOP_LEFT); txt_pt_msg->callback(plain_changed); txt_pt_msg->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(txt_pt_msg); txt_pt_date = new Fl_DateInput(404, Y+25, 125, 24, _("Date")); txt_pt_date->tooltip(_("Date of origination")); txt_pt_date->box(FL_DOWN_BOX); txt_pt_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_date->labeltype(FL_NORMAL_LABEL); txt_pt_date->labelfont(0); txt_pt_date->labelsize(14); txt_pt_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_date->align(FL_ALIGN_LEFT); txt_pt_date->callback(plain_changed); txt_pt_date->when(FL_WHEN_CHANGED); btn_pt_date = new Fl_Button(537, Y+27, 20, 20, _("...")); btn_pt_date->tooltip(_("Set today")); btn_pt_date->callback((Fl_Callback*)cb_btn_pt_date); txt_pt_time = new Fl_Input2(404, Y+50, 125, 24, _("Time")); txt_pt_time->tooltip(_("Time of origination")); txt_pt_time->box(FL_DOWN_BOX); txt_pt_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_pt_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_pt_time->labeltype(FL_NORMAL_LABEL); txt_pt_time->labelfont(0); txt_pt_time->labelsize(14); txt_pt_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_pt_time->align(FL_ALIGN_LEFT); txt_pt_time->callback(plain_changed); txt_pt_time->when(FL_WHEN_CHANGED); btn_pt_time = new Fl_Button(537, Y+52, 20, 20, _("...")); btn_pt_time->tooltip(_("Set time now")); btn_pt_time->callback((Fl_Callback*)cb_btn_pt_time); tab_plaintext->end(); tab_plaintext->hide(); } flmsg-2.0.10/src/plaintext/plaintext.cxx0000664000175000017500000003076412330516146015173 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #include "dirent-check.h" #include #include #include using namespace std; // plaintext fields // compatibility fields required to read older data files string apt_title = "value(szDate()); } void cb_set_pt_time() { txt_pt_time->value(szTime(progStatus.UTC)); } void clear_ptfields() { for (int i = 0; i < num_ptfields; i++) ptfields[i].f_data.clear(); } bool check_ptfields() { for (int i = 0; i < num_ptfields; i++) { if (ptfields[i].w_type == 'd') { if (ptfields[i].f_data != ((Fl_DateInput *)(*ptfields[i].w))->value()) return true; } else if (ptfields[i].w_type == 't') { if (ptfields[i].f_data != ((Fl_Input2 *)(*ptfields[i].w))->value()) return true; } else if (ptfields[i].w_type == 'e') { if (ptfields[i].f_data != ((FTextEdit *)(*ptfields[i].w))->buffer()->text()) return true; } } return false; } void update_ptfields() { for (int i = 0; i < num_ptfields; i++) { if (ptfields[i].w_type == 'd') ptfields[i].f_data = ((Fl_DateInput *)(*ptfields[i].w))->value(); else if (ptfields[i].w_type == 't') ptfields[i].f_data = ((Fl_Input2 *)(*ptfields[i].w))->value(); else if (ptfields[i].w_type == 'e') { ptfields[i].f_data = ((FTextEdit *)(*ptfields[i].w))->buffer()->text(); } } } void clear_pt_form() { clear_ptfields(); ptfields[0].f_data = "General Message"; txt_pt_title->value(ptfields[0].f_data.c_str()); txt_pt_to->value(""); txt_pt_fm->value(""); txt_pt_subj->value(""); txt_pt_date->value(""); txt_pt_time->value(""); txt_pt_msg->clear(); update_ptfields(); } void update_pt_form() { for (int i = 0; i < num_ptfields; i++) { if (ptfields[i].w_type == 'd') ((Fl_DateInput *)(*ptfields[i].w))->value(ptfields[i].f_data.c_str()); else if (ptfields[i].w_type == 't') ((Fl_Input2 *)(*ptfields[i].w))->value(ptfields[i].f_data.c_str()); else { ((FTextEdit *)(*ptfields[i].w))->clear(); ((FTextEdit *)(*ptfields[i].w))->add(ptfields[i].f_data.c_str()); } } } void make_ptbuffer(bool compress = false) { string mbuff; mbuff.clear(); for (int i = 0; i < num_ptfields; i++) mbuff.append( lineout( ptfields[i].f_type, ptfields[i].f_data ) ); if (compress) compress_maybe(mbuff); ptbuffer.append(mbuff); } void read_ptbuffer(string data) { bool data_ok = false; clear_ptfields(); read_header(data); for (int i = 0; i < num_ptfields; i++) { ptfields[i].f_data = findstr(data, ptfields[i].f_type); if (!ptfields[i].f_data.empty()) data_ok = true; } if (!data_ok) for (int i = 0; i < num_ptfields; i++) ptfields[i].f_data = findstr(data, aptfields[i].f_type); update_pt_form(); } void cb_pt_new() { if (check_ptfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_pt_save(); } } clear_pt_form(); clear_header(); def_pt_filename = ICS_msg_dir; def_pt_filename.append("new"PTFILE_EXT); show_filename(def_pt_filename); using_pt_template = false; } void cb_pt_import() { fl_alert2("Not implemented"); } void cb_pt_export() { fl_alert2("Not implemented"); } void cb_pt_wrap_import(string wrapfilename, string inpbuffer) { clear_pt_form(); read_ptbuffer(inpbuffer); def_pt_filename = ICS_msg_dir; def_pt_filename.append(wrapfilename); show_filename(def_pt_filename); using_pt_template = false; } int eval_pt_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_pt_filename).append("]"); update_ptfields(); update_header(FROM); evalstr.append(header("")); ptbuffer.clear(); make_ptbuffer(true); if (ptbuffer.empty()) return 0; compress_maybe( ptbuffer ); evalstr.append( ptbuffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_pt_wrap_export() { if (check_ptfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_ptfields(); if (base_pt_filename == "new"PTFILE_EXT || base_pt_filename == "default"PTFILE_EXT) if (!cb_pt_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_pt_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(true); export_wrapfile(base_pt_filename, wrapfilename, ptbuffer, pext != WRAP_EXT); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(false); write_pt(def_pt_filename); } } void cb_pt_wrap_autosend() { if (check_ptfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_ptfields(); if (base_pt_filename == "new"PTFILE_EXT || base_pt_filename == "default"PTFILE_EXT) if (!cb_pt_save_as()) return; update_header(FROM); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(true); xfr_via_socket(base_pt_filename, ptbuffer); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(false); write_pt(def_pt_filename); } void cb_pt_load_template() { string def_pt_filename = def_pt_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"PTTEMP_EXT, def_pt_filename.c_str()); if (p) { clear_pt_form(); read_data_file(p); def_pt_TemplateName = p; show_filename(def_pt_TemplateName); using_pt_template = true; } } void cb_pt_save_template() { if (!using_pt_template) { cb_pt_save_as_template(); return; } string def_pt_filename = def_pt_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"PTTEMP_EXT, def_pt_filename.c_str()); if (p) { update_header(CHANGED); update_ptfields(); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(); write_pt(p); } } void cb_pt_save_as_template() { string def_pt_filename = def_pt_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"PTTEMP_EXT, def_pt_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_pt_TemplateName = p; if (strlen(pext) == 0) def_pt_TemplateName.append(PTTEMP_EXT); remove_spaces_from_filename(def_pt_TemplateName); clear_header(); update_header(CHANGED); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(); write_pt(def_pt_TemplateName); show_filename(def_pt_TemplateName); using_pt_template = true; } } void cb_pt_open() { const char *p = FSEL::select(_("Open data file"), "plain_text\t*.p2s", def_pt_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_pt_form(); read_data_file(p); using_pt_template = false; def_pt_filename = p; show_filename(def_pt_filename); } void write_pt(string s) { FILE *ptfile = fopen(s.c_str(), "w"); if (!ptfile) return; fwrite(ptbuffer.c_str(), ptbuffer.length(), 1, ptfile); fclose(ptfile); } bool cb_pt_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(".p2s"); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_pt_filename; p = FSEL::saveas(_("Save data file"), "plain_text\t*.p2s", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_pt_filename = p; if (strlen(pext) == 0) def_pt_filename.append(".p2s"); remove_spaces_from_filename(def_pt_filename); update_header(NEW); update_ptfields(); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(); write_pt(def_pt_filename); using_pt_template = false; show_filename(def_pt_filename); return true; } void cb_pt_save() { if (base_pt_filename == "new.p2s" || base_pt_filename == "default.p2s" || using_pt_template == true) { cb_pt_save_as(); return; } if (check_ptfields()) update_header(CHANGED); update_ptfields(); ptbuffer.assign(header("<plaintext>")); make_ptbuffer(); write_pt(def_pt_filename); using_pt_template = false; } void cb_pt_html() { string pt_name = ICS_dir; string html_text = ""; pt_name.append("plaintext_doc.html"); update_ptfields(); string ptform = pt_html_template; for (int i = 0; i < num_ptfields; i++) { if (ptfields[i].w_type != 'e') replacestr( ptform, ptfields[i].f_type, ptfields[i].f_data ); else { html_text = "<pre><big style= font-family: \"Consolas\", \"Monospace\", \"Courier\";\">"; if (progStatus.autowordwrap) html_text.append(wordwrap(ptfields[i].f_data, progStatus.charcount)); else html_text.append(ptfields[i].f_data); html_text.append("</big></pre>"); replacestr( ptform, ptfields[i].f_type, html_text ); } } FILE *ptfile = fopen(pt_name.c_str(), "w"); fprintf(ptfile,"%s", ptform.c_str()); fclose(ptfile); open_url(pt_name.c_str()); } void cb_pt_msg_type() { if (tabs_msg_type->value() == tab_plaintext ) { show_filename(def_pt_filename); } else { show_filename(def_rg_filename); } } void cb_pt_textout() { string pt_name = ICS_dir; pt_name.append("plaintext.txt"); update_ptfields(); string ptform = pt_txt_template; for (int i = 0; i < num_ptfields; i++) replacestr( ptform, ptfields[i].f_type, ptfields[i].f_data); FILE *ptfile = fopen(pt_name.c_str(), "w"); fprintf(ptfile,"%s", ptform.c_str()); fclose(ptfile); open_url(pt_name.c_str()); } ������������flmsg-2.0.10/src/Makefile.in������������������������������������������������������������������������0000664�0001750�0001750�00001336336�12516663012�012502� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = flmsg$(EXEEXT) @ENABLE_FLXMLRPC_FALSE@am__append_1 = $(XMLRPCPP_SRC) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__append_2 = $(MINGW32_SRC) @HAVE_NSIS_TRUE@am__append_3 = $(INSTALLER_FILE) @DARWIN_TRUE@am__append_4 = $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__flmsg_SOURCES_DIST = xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h flmsg-rc.rc include/flmsgrc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c blank-dnd/baddata_templates.cxx \ blank-dnd/blank.cxx blank-dnd/blank_tab.cxx \ blank-dnd/blank_templates.cxx blank-dnd/dnd_tab.cxx \ cap/cap105.cxx cap/cap105_tab.cxx cap/cap110.cxx \ cap/cap110_tab.cxx cap/cap_templates.cxx csv/csv.cxx \ csv/csv_tab.cxx csv/csv_templates.cxx csv/csv_table.cxx \ custom/custom.cxx custom/custom_tab.cxx \ custom/custom_templates.cxx include/custom.h flmsg.cxx \ flmsg_dialog.cxx iaru/iaru.cxx iaru/iaru_tab.cxx \ iaru/iaru_templates.cxx ics/ics203.cxx ics/ics205.cxx \ ics/ics205a.cxx ics/ics206.cxx ics/ics213.cxx ics/ics214.cxx \ ics/ics216.cxx ics/ics309.cxx ics/ics_tab.cxx \ ics/ics203_tab.cxx ics/ics205_tab.cxx ics/ics205a_tab.cxx \ ics/ics206_tab.cxx ics/ics213_tab.cxx ics/ics214_tab.cxx \ ics/ics216_tab.cxx ics/ics309_tab.cxx ics/ics203_templates.cxx \ ics/ics205_templates.cxx ics/ics205a_templates.cxx \ ics/ics206_templates.cxx ics/ics213_templates.cxx \ ics/ics214_templates.cxx ics/ics216_templates.cxx \ ics/ics309_templates.cxx hics/hics_tab.cxx hics/hics203.cxx \ hics/hics203_tab.cxx hics/hics203_templates.cxx \ hics/hics206.cxx hics/hics206_tab.cxx \ hics/hics206_templates.cxx hics/hics213.cxx \ hics/hics213_tab.cxx hics/hics213_templates.cxx \ hics/hics214.cxx hics/hics214_tab.cxx \ hics/hics214_templates.cxx lzma/Alloc.h lzma/Alloc.c \ lzma/LzFind.c lzma/LzFind.h lzma/LzHash.h lzma/LzmaDec.c \ lzma/LzmaDec.h lzma/LzmaEnc.c lzma/LzmaEnc.h lzma/LzmaLib.c \ lzma/LzmaLib.h lzma/Types.h mars/mars_tab.cxx \ mars/mars_daily.cxx mars/mars_ineei.cxx mars/mars_net.cxx \ mars/mars_daily_tab.cxx mars/mars_ineei_tab.cxx \ mars/mars_net_tab.cxx mars/mars_army.cxx \ mars/mars_army_tab.cxx mars/mars_navy.cxx \ mars/navy_mars_tab.cxx mars/mars_templates.cxx \ plaintext/plaintext.cxx plaintext/plaintext_tab.cxx \ plaintext/plaintext_templates.cxx radiogram/arl_msgs.cxx \ radiogram/hx_msgs.cxx radiogram/radiogram.cxx \ radiogram/radiogram_tab.cxx radiogram/radiogram_templates.cxx \ redx/redx_tab.cxx redx/redx_snw.cxx redx/redx_snw_tab.cxx \ redx/redx_snw_template.cxx redx/redx_5739.cxx \ redx/redx_5739_tab.cxx redx/redx_5739A.cxx \ redx/redx_5739A_tab.cxx redx/redx_5739B.cxx \ redx/redx_5739B_tab.cxx redx/redx_5739_template.cxx \ transfer/transfer.cxx transfer/transfer_tab.cxx \ custom/custom_transfer_tab.cxx utils/base64.cxx \ utils/base128.cxx utils/base256.cxx utils/debug.cxx \ utils/ext_string.cxx utils/mongoose.c utils/parse_xml.cxx \ utils/socket.cxx utils/status.cxx utils/timeops.cxx \ utils/time_table.cxx utils/threads.cxx utils/util.cxx \ utils/wrap.cxx utils/xml_io.cxx widgets/calendar.cxx \ widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \ widgets/flinput2.cxx widgets/flslider2.cxx \ widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx \ widgets/Fl_Native_File_Chooser.cxx widgets/FTextView.cxx \ widgets/icons.cxx widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx widgets/font_browser.cxx \ wx/hurricane.cxx wx/hurricane_tab.cxx \ wx/hurricane_template.cxx wx/severe_wx.cxx \ wx/severe_wx_tab.cxx wx/severe_wx_template.cxx \ wx/wx_strings.cxx wx/storm_report.cxx wx/storm_report_tab.cxx \ wx/storm_report_template.cxx am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = xmlrpcpp/flmsg-XmlRpcClient.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcDispatch.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcMutex.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcServerConnection.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcServer.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcServerMethod.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcSocket.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcSource.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcUtil.$(OBJEXT) \ xmlrpcpp/flmsg-XmlRpcValue.$(OBJEXT) @ENABLE_FLXMLRPC_FALSE@am__objects_2 = $(am__objects_1) am__objects_3 = flmsg-rc.$(OBJEXT) utils/flmsg-mingw.$(OBJEXT) \ utils/flmsg-getsysinfo.$(OBJEXT) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__objects_4 = $(am__objects_3) am_flmsg_OBJECTS = $(am__objects_2) $(am__objects_4) \ blank-dnd/flmsg-baddata_templates.$(OBJEXT) \ blank-dnd/flmsg-blank.$(OBJEXT) \ blank-dnd/flmsg-blank_tab.$(OBJEXT) \ blank-dnd/flmsg-blank_templates.$(OBJEXT) \ blank-dnd/flmsg-dnd_tab.$(OBJEXT) cap/flmsg-cap105.$(OBJEXT) \ cap/flmsg-cap105_tab.$(OBJEXT) cap/flmsg-cap110.$(OBJEXT) \ cap/flmsg-cap110_tab.$(OBJEXT) \ cap/flmsg-cap_templates.$(OBJEXT) csv/flmsg-csv.$(OBJEXT) \ csv/flmsg-csv_tab.$(OBJEXT) csv/flmsg-csv_templates.$(OBJEXT) \ csv/flmsg-csv_table.$(OBJEXT) custom/flmsg-custom.$(OBJEXT) \ custom/flmsg-custom_tab.$(OBJEXT) \ custom/flmsg-custom_templates.$(OBJEXT) flmsg-flmsg.$(OBJEXT) \ flmsg-flmsg_dialog.$(OBJEXT) iaru/flmsg-iaru.$(OBJEXT) \ iaru/flmsg-iaru_tab.$(OBJEXT) \ iaru/flmsg-iaru_templates.$(OBJEXT) ics/flmsg-ics203.$(OBJEXT) \ ics/flmsg-ics205.$(OBJEXT) ics/flmsg-ics205a.$(OBJEXT) \ ics/flmsg-ics206.$(OBJEXT) ics/flmsg-ics213.$(OBJEXT) \ ics/flmsg-ics214.$(OBJEXT) ics/flmsg-ics216.$(OBJEXT) \ ics/flmsg-ics309.$(OBJEXT) ics/flmsg-ics_tab.$(OBJEXT) \ ics/flmsg-ics203_tab.$(OBJEXT) ics/flmsg-ics205_tab.$(OBJEXT) \ ics/flmsg-ics205a_tab.$(OBJEXT) ics/flmsg-ics206_tab.$(OBJEXT) \ ics/flmsg-ics213_tab.$(OBJEXT) ics/flmsg-ics214_tab.$(OBJEXT) \ ics/flmsg-ics216_tab.$(OBJEXT) ics/flmsg-ics309_tab.$(OBJEXT) \ ics/flmsg-ics203_templates.$(OBJEXT) \ ics/flmsg-ics205_templates.$(OBJEXT) \ ics/flmsg-ics205a_templates.$(OBJEXT) \ ics/flmsg-ics206_templates.$(OBJEXT) \ ics/flmsg-ics213_templates.$(OBJEXT) \ ics/flmsg-ics214_templates.$(OBJEXT) \ ics/flmsg-ics216_templates.$(OBJEXT) \ ics/flmsg-ics309_templates.$(OBJEXT) \ hics/flmsg-hics_tab.$(OBJEXT) hics/flmsg-hics203.$(OBJEXT) \ hics/flmsg-hics203_tab.$(OBJEXT) \ hics/flmsg-hics203_templates.$(OBJEXT) \ hics/flmsg-hics206.$(OBJEXT) hics/flmsg-hics206_tab.$(OBJEXT) \ hics/flmsg-hics206_templates.$(OBJEXT) \ hics/flmsg-hics213.$(OBJEXT) hics/flmsg-hics213_tab.$(OBJEXT) \ hics/flmsg-hics213_templates.$(OBJEXT) \ hics/flmsg-hics214.$(OBJEXT) hics/flmsg-hics214_tab.$(OBJEXT) \ hics/flmsg-hics214_templates.$(OBJEXT) \ lzma/flmsg-Alloc.$(OBJEXT) lzma/flmsg-LzFind.$(OBJEXT) \ lzma/flmsg-LzmaDec.$(OBJEXT) lzma/flmsg-LzmaEnc.$(OBJEXT) \ lzma/flmsg-LzmaLib.$(OBJEXT) mars/flmsg-mars_tab.$(OBJEXT) \ mars/flmsg-mars_daily.$(OBJEXT) \ mars/flmsg-mars_ineei.$(OBJEXT) mars/flmsg-mars_net.$(OBJEXT) \ mars/flmsg-mars_daily_tab.$(OBJEXT) \ mars/flmsg-mars_ineei_tab.$(OBJEXT) \ mars/flmsg-mars_net_tab.$(OBJEXT) \ mars/flmsg-mars_army.$(OBJEXT) \ mars/flmsg-mars_army_tab.$(OBJEXT) \ mars/flmsg-mars_navy.$(OBJEXT) \ mars/flmsg-navy_mars_tab.$(OBJEXT) \ mars/flmsg-mars_templates.$(OBJEXT) \ plaintext/flmsg-plaintext.$(OBJEXT) \ plaintext/flmsg-plaintext_tab.$(OBJEXT) \ plaintext/flmsg-plaintext_templates.$(OBJEXT) \ radiogram/flmsg-arl_msgs.$(OBJEXT) \ radiogram/flmsg-hx_msgs.$(OBJEXT) \ radiogram/flmsg-radiogram.$(OBJEXT) \ radiogram/flmsg-radiogram_tab.$(OBJEXT) \ radiogram/flmsg-radiogram_templates.$(OBJEXT) \ redx/flmsg-redx_tab.$(OBJEXT) redx/flmsg-redx_snw.$(OBJEXT) \ redx/flmsg-redx_snw_tab.$(OBJEXT) \ redx/flmsg-redx_snw_template.$(OBJEXT) \ redx/flmsg-redx_5739.$(OBJEXT) \ redx/flmsg-redx_5739_tab.$(OBJEXT) \ redx/flmsg-redx_5739A.$(OBJEXT) \ redx/flmsg-redx_5739A_tab.$(OBJEXT) \ redx/flmsg-redx_5739B.$(OBJEXT) \ redx/flmsg-redx_5739B_tab.$(OBJEXT) \ redx/flmsg-redx_5739_template.$(OBJEXT) \ transfer/flmsg-transfer.$(OBJEXT) \ transfer/flmsg-transfer_tab.$(OBJEXT) \ custom/flmsg-custom_transfer_tab.$(OBJEXT) \ utils/flmsg-base64.$(OBJEXT) utils/flmsg-base128.$(OBJEXT) \ utils/flmsg-base256.$(OBJEXT) utils/flmsg-debug.$(OBJEXT) \ utils/flmsg-ext_string.$(OBJEXT) \ utils/flmsg-mongoose.$(OBJEXT) utils/flmsg-parse_xml.$(OBJEXT) \ utils/flmsg-socket.$(OBJEXT) utils/flmsg-status.$(OBJEXT) \ utils/flmsg-timeops.$(OBJEXT) utils/flmsg-time_table.$(OBJEXT) \ utils/flmsg-threads.$(OBJEXT) utils/flmsg-util.$(OBJEXT) \ utils/flmsg-wrap.$(OBJEXT) utils/flmsg-xml_io.$(OBJEXT) \ widgets/flmsg-calendar.$(OBJEXT) widgets/flmsg-combo.$(OBJEXT) \ widgets/flmsg-date.$(OBJEXT) \ widgets/flmsg-fileselect.$(OBJEXT) \ widgets/flmsg-flinput2.$(OBJEXT) \ widgets/flmsg-flslider2.$(OBJEXT) \ widgets/flmsg-Fl_Text_Buffer_mod.$(OBJEXT) \ widgets/flmsg-Fl_Text_Editor_mod.$(OBJEXT) \ widgets/flmsg-Fl_Text_Display_mod.$(OBJEXT) \ widgets/flmsg-Fl_Native_File_Chooser.$(OBJEXT) \ widgets/flmsg-FTextView.$(OBJEXT) \ widgets/flmsg-icons.$(OBJEXT) widgets/flmsg-pixmaps.$(OBJEXT) \ widgets/flmsg-pixmaps_tango.$(OBJEXT) \ widgets/flmsg-font_browser.$(OBJEXT) \ wx/flmsg-hurricane.$(OBJEXT) wx/flmsg-hurricane_tab.$(OBJEXT) \ wx/flmsg-hurricane_template.$(OBJEXT) \ wx/flmsg-severe_wx.$(OBJEXT) wx/flmsg-severe_wx_tab.$(OBJEXT) \ wx/flmsg-severe_wx_template.$(OBJEXT) \ wx/flmsg-wx_strings.$(OBJEXT) wx/flmsg-storm_report.$(OBJEXT) \ wx/flmsg-storm_report_tab.$(OBJEXT) \ wx/flmsg-storm_report_template.$(OBJEXT) am__objects_5 = nodist_flmsg_OBJECTS = $(am__objects_5) flmsg_OBJECTS = $(am_flmsg_OBJECTS) $(nodist_flmsg_OBJECTS) flmsg_DEPENDENCIES = flmsg_LINK = $(CXXLD) $(flmsg_CXXFLAGS) $(CXXFLAGS) $(flmsg_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(flmsg_SOURCES) $(EXTRA_flmsg_SOURCES) \ $(nodist_flmsg_SOURCES) DIST_SOURCES = $(am__flmsg_SOURCES_DIST) $(EXTRA_flmsg_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLMSG_BUILD_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ FLMSG_BUILD_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ FLMSG_BUILD_LDADD = @FLMSG_BUILD_LDADD@ FLMSG_BUILD_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ FLMSG_VERSION = @FLMSG_VERSION@ ######################################################################## FLMSG_VERSION_MAJOR = @FLMSG_VERSION_MAJOR@ FLMSG_VERSION_MINOR = @FLMSG_VERSION_MINOR@ FLMSG_VERSION_PATCH = @FLMSG_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MINGW32_SRC = flmsg-rc.rc include/flmsgrc.h \ utils/mingw.c include/mingw.h include/compat.h \ utils/getsysinfo.c # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flmsg_SOURCES = $(FLMSG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) # Sources that we build. It is OK to have headers here. flmsg_SOURCES = $(am__append_1) $(am__append_2) \ blank-dnd/baddata_templates.cxx blank-dnd/blank.cxx \ blank-dnd/blank_tab.cxx blank-dnd/blank_templates.cxx \ blank-dnd/dnd_tab.cxx cap/cap105.cxx cap/cap105_tab.cxx \ cap/cap110.cxx cap/cap110_tab.cxx cap/cap_templates.cxx \ csv/csv.cxx csv/csv_tab.cxx csv/csv_templates.cxx \ csv/csv_table.cxx custom/custom.cxx custom/custom_tab.cxx \ custom/custom_templates.cxx include/custom.h flmsg.cxx \ flmsg_dialog.cxx iaru/iaru.cxx iaru/iaru_tab.cxx \ iaru/iaru_templates.cxx ics/ics203.cxx ics/ics205.cxx \ ics/ics205a.cxx ics/ics206.cxx ics/ics213.cxx ics/ics214.cxx \ ics/ics216.cxx ics/ics309.cxx ics/ics_tab.cxx \ ics/ics203_tab.cxx ics/ics205_tab.cxx ics/ics205a_tab.cxx \ ics/ics206_tab.cxx ics/ics213_tab.cxx ics/ics214_tab.cxx \ ics/ics216_tab.cxx ics/ics309_tab.cxx ics/ics203_templates.cxx \ ics/ics205_templates.cxx ics/ics205a_templates.cxx \ ics/ics206_templates.cxx ics/ics213_templates.cxx \ ics/ics214_templates.cxx ics/ics216_templates.cxx \ ics/ics309_templates.cxx hics/hics_tab.cxx hics/hics203.cxx \ hics/hics203_tab.cxx hics/hics203_templates.cxx \ hics/hics206.cxx hics/hics206_tab.cxx \ hics/hics206_templates.cxx hics/hics213.cxx \ hics/hics213_tab.cxx hics/hics213_templates.cxx \ hics/hics214.cxx hics/hics214_tab.cxx \ hics/hics214_templates.cxx lzma/Alloc.h lzma/Alloc.c \ lzma/LzFind.c lzma/LzFind.h lzma/LzHash.h lzma/LzmaDec.c \ lzma/LzmaDec.h lzma/LzmaEnc.c lzma/LzmaEnc.h lzma/LzmaLib.c \ lzma/LzmaLib.h lzma/Types.h mars/mars_tab.cxx \ mars/mars_daily.cxx mars/mars_ineei.cxx mars/mars_net.cxx \ mars/mars_daily_tab.cxx mars/mars_ineei_tab.cxx \ mars/mars_net_tab.cxx mars/mars_army.cxx \ mars/mars_army_tab.cxx mars/mars_navy.cxx \ mars/navy_mars_tab.cxx mars/mars_templates.cxx \ plaintext/plaintext.cxx plaintext/plaintext_tab.cxx \ plaintext/plaintext_templates.cxx radiogram/arl_msgs.cxx \ radiogram/hx_msgs.cxx radiogram/radiogram.cxx \ radiogram/radiogram_tab.cxx radiogram/radiogram_templates.cxx \ redx/redx_tab.cxx redx/redx_snw.cxx redx/redx_snw_tab.cxx \ redx/redx_snw_template.cxx redx/redx_5739.cxx \ redx/redx_5739_tab.cxx redx/redx_5739A.cxx \ redx/redx_5739A_tab.cxx redx/redx_5739B.cxx \ redx/redx_5739B_tab.cxx redx/redx_5739_template.cxx \ transfer/transfer.cxx transfer/transfer_tab.cxx \ custom/custom_transfer_tab.cxx utils/base64.cxx \ utils/base128.cxx utils/base256.cxx utils/debug.cxx \ utils/ext_string.cxx utils/mongoose.c utils/parse_xml.cxx \ utils/socket.cxx utils/status.cxx utils/timeops.cxx \ utils/time_table.cxx utils/threads.cxx utils/util.cxx \ utils/wrap.cxx utils/xml_io.cxx widgets/calendar.cxx \ widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \ widgets/flinput2.cxx widgets/flslider2.cxx \ widgets/Fl_Text_Buffer_mod.cxx widgets/Fl_Text_Editor_mod.cxx \ widgets/Fl_Text_Display_mod.cxx \ widgets/Fl_Native_File_Chooser.cxx widgets/FTextView.cxx \ widgets/icons.cxx widgets/pixmaps.cxx \ widgets/pixmaps_tango.cxx widgets/font_browser.cxx \ wx/hurricane.cxx wx/hurricane_tab.cxx \ wx/hurricane_template.cxx wx/severe_wx.cxx \ wx/severe_wx_tab.cxx wx/severe_wx_template.cxx \ wx/wx_strings.cxx wx/storm_report.cxx wx/storm_report_tab.cxx \ wx/storm_report_template.cxx @ENABLE_FLXMLRPC_FALSE@flmsg_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ @ENABLE_FLXMLRPC_TRUE@flmsg_CPPFLAGS = @FLMSG_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flmsg_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ @ENABLE_FLXMLRPC_TRUE@flmsg_CXXFLAGS = @FLMSG_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flmsg_CFLAGS = $(flmsg_CXXFLAGS) @ENABLE_FLXMLRPC_TRUE@flmsg_CFLAGS = $(flmsg_CXXFLAGS) @ENABLE_FLXMLRPC_FALSE@flmsg_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ @ENABLE_FLXMLRPC_TRUE@flmsg_LDFLAGS = @FLMSG_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ @ENABLE_FLXMLRPC_FALSE@flmsg_LDADD = @FLMSG_BUILD_LDADD@ @ENABLE_FLXMLRPC_TRUE@flmsg_LDADD = @FLMSG_BUILD_LDADD@ # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flmsg_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) $(am__append_3) CLEAN_LOCAL = $(am__append_4) INSTALLER_FILE = flmsg-$(FLMSG_VERSION)_setup.exe APPBUNDLE = flmsg-$(FLMSG_VERSION) APPBUNDLE_NOLIBS = $(APPBUNDLE)-nolibs # wx/storm_report.cxx # wx/storm_report_template.cxx # Additional source files that are distributed # Additional non-source files that are distributed # Additional source files that support non-Linux cross compilation EXTRA_DIST = config.h utils/mingw.c widgets/flnfc_common.cxx \ widgets/Fl_Native_File_Chooser_FLTK.cxx \ widgets/Fl_Native_File_Chooser_MAC.cxx \ widgets/Fl_Native_File_Chooser_WIN32.cxx include/arl_msgs.h \ include/ascii.h include/base64.h include/base128.h \ include/base256.h include/calendar.h include/cap.h \ include/combo.h include/compat.h include/compat-mingw.h \ include/crc16.h include/date.h include/debug.h \ include/dirent-check.h include/ext_string.h \ include/fileselect.h include/fl_lock.h include/flmisc.h \ include/flmsg_config.h include/flmsgrc.h include/flinput2.h \ include/flslider2.h include/font_browser.h include/gettext.h \ include/hx_msgs.h include/iaru.h include/icons.h \ include/flmsg.h include/flmsg_dialog.h include/mongoose.h \ include/socket.h include/templates.h include/mingw.h \ include/parse_xml.h include/pixmaps.h include/status.h \ include/threads.h include/timeops.h include/time_table.h \ include/transfer.h include/util.h include/wrap.h \ include/wx_strings.h include/xml_io.h \ widgets/missing_strings.c widgets/Fl_Text_Buffer_mod_1_1.cxx \ widgets/Fl_Text_Buffer_mod_1_3.cxx \ widgets/Fl_Text_Display_mod_1_1.cxx \ widgets/Fl_Text_Display_mod_1_3.cxx \ widgets/Fl_Text_Editor_mod_1_1.cxx \ widgets/Fl_Text_Editor_mod_1_3.cxx \ include/Fl_Text_Buffer_mod.H include/Fl_Text_Buffer_mod_1_1.H \ include/Fl_Text_Buffer_mod_1_3.H include/Fl_Text_Display_mod.H \ include/Fl_Text_Display_mod_1_1.H \ include/Fl_Text_Display_mod_1_3.H include/Fl_Text_Editor_mod.H \ include/Fl_Text_Editor_mod_1_1.H \ include/Fl_Text_Editor_mod_1_3.H include/FTextView.h \ include/FL/Fl_Native_File_Chooser_FLTK.H \ include/FL/Fl_Native_File_Chooser_MAC.H \ include/FL/Fl_Native_File_Chooser.H \ include/FL/Fl_Native_File_Chooser_WIN32.H include/blank.h \ include/csv.h include/missing_strings.h include/plaintext.h \ include/radiogram.h flmsg_dialog.cxx ../data/template.rtf \ html_templates/blank_template.html \ html_templates/ics203_template.html \ html_templates/ics205_template.html \ html_templates/ics205a_template.html \ html_templates/ics206_template.html \ html_templates/ics213_templates.html \ html_templates/ics214_templates.html \ html_templates/ics216_templates.html \ html_templates/plaintext_template.html \ html_templates/radiogram_fc_template.html \ html_templates/radiogram_template.html \ html_templates/mars_daily.html html_templates/mars_ineei.html \ html_templates/mars_net.html ../data/flmsg.desktop \ ../data/flmsg.xpm ../data/win32/fl_app.nsi \ ../data/win32/flmsg.ico ../scripts/build4mingw.sh \ ../scripts/builddist.sh ../scripts/mkappbundle.sh \ ../scripts/mknsisinst.sh ../data/mac/Info.plist.in \ ../data/mac/flmsg.icns $(FLMSG_WIN32_SRC) $(FLMSG_FL_SRC) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .cxx .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err </dev/null \ && test -n "`cat c$${pid}_.out`" \ && test -z "`cat c$${pid}_.err`"; then :; \ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad xmlrpcpp/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp @: > xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp/$(DEPDIR) @: > xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcClient.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcDispatch.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcMutex.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcServerConnection.$(OBJEXT): \ xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcServer.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcServerMethod.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcSocket.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcSource.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcUtil.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flmsg-XmlRpcValue.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) utils/$(am__dirstamp): @$(MKDIR_P) utils @: > utils/$(am__dirstamp) utils/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) utils/$(DEPDIR) @: > utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-mingw.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-getsysinfo.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) blank-dnd/$(am__dirstamp): @$(MKDIR_P) blank-dnd @: > blank-dnd/$(am__dirstamp) blank-dnd/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) blank-dnd/$(DEPDIR) @: > blank-dnd/$(DEPDIR)/$(am__dirstamp) blank-dnd/flmsg-baddata_templates.$(OBJEXT): \ blank-dnd/$(am__dirstamp) blank-dnd/$(DEPDIR)/$(am__dirstamp) blank-dnd/flmsg-blank.$(OBJEXT): blank-dnd/$(am__dirstamp) \ blank-dnd/$(DEPDIR)/$(am__dirstamp) blank-dnd/flmsg-blank_tab.$(OBJEXT): blank-dnd/$(am__dirstamp) \ blank-dnd/$(DEPDIR)/$(am__dirstamp) blank-dnd/flmsg-blank_templates.$(OBJEXT): blank-dnd/$(am__dirstamp) \ blank-dnd/$(DEPDIR)/$(am__dirstamp) blank-dnd/flmsg-dnd_tab.$(OBJEXT): blank-dnd/$(am__dirstamp) \ blank-dnd/$(DEPDIR)/$(am__dirstamp) cap/$(am__dirstamp): @$(MKDIR_P) cap @: > cap/$(am__dirstamp) cap/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) cap/$(DEPDIR) @: > cap/$(DEPDIR)/$(am__dirstamp) cap/flmsg-cap105.$(OBJEXT): cap/$(am__dirstamp) \ cap/$(DEPDIR)/$(am__dirstamp) cap/flmsg-cap105_tab.$(OBJEXT): cap/$(am__dirstamp) \ cap/$(DEPDIR)/$(am__dirstamp) cap/flmsg-cap110.$(OBJEXT): cap/$(am__dirstamp) \ cap/$(DEPDIR)/$(am__dirstamp) cap/flmsg-cap110_tab.$(OBJEXT): cap/$(am__dirstamp) \ cap/$(DEPDIR)/$(am__dirstamp) cap/flmsg-cap_templates.$(OBJEXT): cap/$(am__dirstamp) \ cap/$(DEPDIR)/$(am__dirstamp) csv/$(am__dirstamp): @$(MKDIR_P) csv @: > csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) csv/$(DEPDIR) @: > csv/$(DEPDIR)/$(am__dirstamp) csv/flmsg-csv.$(OBJEXT): csv/$(am__dirstamp) \ csv/$(DEPDIR)/$(am__dirstamp) csv/flmsg-csv_tab.$(OBJEXT): csv/$(am__dirstamp) \ csv/$(DEPDIR)/$(am__dirstamp) csv/flmsg-csv_templates.$(OBJEXT): csv/$(am__dirstamp) \ csv/$(DEPDIR)/$(am__dirstamp) csv/flmsg-csv_table.$(OBJEXT): csv/$(am__dirstamp) \ csv/$(DEPDIR)/$(am__dirstamp) custom/$(am__dirstamp): @$(MKDIR_P) custom @: > custom/$(am__dirstamp) custom/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) custom/$(DEPDIR) @: > custom/$(DEPDIR)/$(am__dirstamp) custom/flmsg-custom.$(OBJEXT): custom/$(am__dirstamp) \ custom/$(DEPDIR)/$(am__dirstamp) custom/flmsg-custom_tab.$(OBJEXT): custom/$(am__dirstamp) \ custom/$(DEPDIR)/$(am__dirstamp) custom/flmsg-custom_templates.$(OBJEXT): custom/$(am__dirstamp) \ custom/$(DEPDIR)/$(am__dirstamp) iaru/$(am__dirstamp): @$(MKDIR_P) iaru @: > iaru/$(am__dirstamp) iaru/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) iaru/$(DEPDIR) @: > iaru/$(DEPDIR)/$(am__dirstamp) iaru/flmsg-iaru.$(OBJEXT): iaru/$(am__dirstamp) \ iaru/$(DEPDIR)/$(am__dirstamp) iaru/flmsg-iaru_tab.$(OBJEXT): iaru/$(am__dirstamp) \ iaru/$(DEPDIR)/$(am__dirstamp) iaru/flmsg-iaru_templates.$(OBJEXT): iaru/$(am__dirstamp) \ iaru/$(DEPDIR)/$(am__dirstamp) ics/$(am__dirstamp): @$(MKDIR_P) ics @: > ics/$(am__dirstamp) ics/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ics/$(DEPDIR) @: > ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics203.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205a.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics206.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics213.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics214.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics216.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics309.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics203_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205a_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics206_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics213_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics214_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics216_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics309_tab.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics203_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics205a_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics206_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics213_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics214_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics216_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) ics/flmsg-ics309_templates.$(OBJEXT): ics/$(am__dirstamp) \ ics/$(DEPDIR)/$(am__dirstamp) hics/$(am__dirstamp): @$(MKDIR_P) hics @: > hics/$(am__dirstamp) hics/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) hics/$(DEPDIR) @: > hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics_tab.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics203.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics203_tab.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics203_templates.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics206.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics206_tab.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics206_templates.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics213.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics213_tab.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics213_templates.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics214.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics214_tab.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) hics/flmsg-hics214_templates.$(OBJEXT): hics/$(am__dirstamp) \ hics/$(DEPDIR)/$(am__dirstamp) lzma/$(am__dirstamp): @$(MKDIR_P) lzma @: > lzma/$(am__dirstamp) lzma/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lzma/$(DEPDIR) @: > lzma/$(DEPDIR)/$(am__dirstamp) lzma/flmsg-Alloc.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flmsg-LzFind.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flmsg-LzmaDec.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flmsg-LzmaEnc.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) lzma/flmsg-LzmaLib.$(OBJEXT): lzma/$(am__dirstamp) \ lzma/$(DEPDIR)/$(am__dirstamp) mars/$(am__dirstamp): @$(MKDIR_P) mars @: > mars/$(am__dirstamp) mars/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) mars/$(DEPDIR) @: > mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_daily.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_ineei.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_net.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_daily_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_ineei_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_net_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_army.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_army_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_navy.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-navy_mars_tab.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) mars/flmsg-mars_templates.$(OBJEXT): mars/$(am__dirstamp) \ mars/$(DEPDIR)/$(am__dirstamp) plaintext/$(am__dirstamp): @$(MKDIR_P) plaintext @: > plaintext/$(am__dirstamp) plaintext/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plaintext/$(DEPDIR) @: > plaintext/$(DEPDIR)/$(am__dirstamp) plaintext/flmsg-plaintext.$(OBJEXT): plaintext/$(am__dirstamp) \ plaintext/$(DEPDIR)/$(am__dirstamp) plaintext/flmsg-plaintext_tab.$(OBJEXT): plaintext/$(am__dirstamp) \ plaintext/$(DEPDIR)/$(am__dirstamp) plaintext/flmsg-plaintext_templates.$(OBJEXT): \ plaintext/$(am__dirstamp) plaintext/$(DEPDIR)/$(am__dirstamp) radiogram/$(am__dirstamp): @$(MKDIR_P) radiogram @: > radiogram/$(am__dirstamp) radiogram/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) radiogram/$(DEPDIR) @: > radiogram/$(DEPDIR)/$(am__dirstamp) radiogram/flmsg-arl_msgs.$(OBJEXT): radiogram/$(am__dirstamp) \ radiogram/$(DEPDIR)/$(am__dirstamp) radiogram/flmsg-hx_msgs.$(OBJEXT): radiogram/$(am__dirstamp) \ radiogram/$(DEPDIR)/$(am__dirstamp) radiogram/flmsg-radiogram.$(OBJEXT): radiogram/$(am__dirstamp) \ radiogram/$(DEPDIR)/$(am__dirstamp) radiogram/flmsg-radiogram_tab.$(OBJEXT): radiogram/$(am__dirstamp) \ radiogram/$(DEPDIR)/$(am__dirstamp) radiogram/flmsg-radiogram_templates.$(OBJEXT): \ radiogram/$(am__dirstamp) radiogram/$(DEPDIR)/$(am__dirstamp) redx/$(am__dirstamp): @$(MKDIR_P) redx @: > redx/$(am__dirstamp) redx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) redx/$(DEPDIR) @: > redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_tab.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_snw.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_snw_tab.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_snw_template.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739_tab.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739A.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739A_tab.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739B.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739B_tab.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) redx/flmsg-redx_5739_template.$(OBJEXT): redx/$(am__dirstamp) \ redx/$(DEPDIR)/$(am__dirstamp) transfer/$(am__dirstamp): @$(MKDIR_P) transfer @: > transfer/$(am__dirstamp) transfer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) transfer/$(DEPDIR) @: > transfer/$(DEPDIR)/$(am__dirstamp) transfer/flmsg-transfer.$(OBJEXT): transfer/$(am__dirstamp) \ transfer/$(DEPDIR)/$(am__dirstamp) transfer/flmsg-transfer_tab.$(OBJEXT): transfer/$(am__dirstamp) \ transfer/$(DEPDIR)/$(am__dirstamp) custom/flmsg-custom_transfer_tab.$(OBJEXT): custom/$(am__dirstamp) \ custom/$(DEPDIR)/$(am__dirstamp) utils/flmsg-base64.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-base128.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-base256.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-debug.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-ext_string.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-mongoose.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-parse_xml.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-socket.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-status.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-timeops.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-time_table.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-threads.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-util.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-wrap.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/flmsg-xml_io.$(OBJEXT): utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) widgets/$(am__dirstamp): @$(MKDIR_P) widgets @: > widgets/$(am__dirstamp) widgets/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) widgets/$(DEPDIR) @: > widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-calendar.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-combo.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-date.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-fileselect.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-flinput2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-flslider2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-Fl_Text_Buffer_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-Fl_Text_Editor_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-Fl_Text_Display_mod.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-Fl_Native_File_Chooser.$(OBJEXT): \ widgets/$(am__dirstamp) widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-FTextView.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-icons.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-pixmaps.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-pixmaps_tango.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flmsg-font_browser.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) wx/$(am__dirstamp): @$(MKDIR_P) wx @: > wx/$(am__dirstamp) wx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) wx/$(DEPDIR) @: > wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-hurricane.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-hurricane_tab.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-hurricane_template.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-severe_wx.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-severe_wx_tab.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-severe_wx_template.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-wx_strings.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-storm_report.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-storm_report_tab.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) wx/flmsg-storm_report_template.$(OBJEXT): wx/$(am__dirstamp) \ wx/$(DEPDIR)/$(am__dirstamp) flmsg$(EXEEXT): $(flmsg_OBJECTS) $(flmsg_DEPENDENCIES) $(EXTRA_flmsg_DEPENDENCIES) @rm -f flmsg$(EXEEXT) $(flmsg_LINK) $(flmsg_OBJECTS) $(flmsg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f blank-dnd/flmsg-baddata_templates.$(OBJEXT) -rm -f blank-dnd/flmsg-blank.$(OBJEXT) -rm -f blank-dnd/flmsg-blank_tab.$(OBJEXT) -rm -f blank-dnd/flmsg-blank_templates.$(OBJEXT) -rm -f blank-dnd/flmsg-dnd_tab.$(OBJEXT) -rm -f cap/flmsg-cap105.$(OBJEXT) -rm -f cap/flmsg-cap105_tab.$(OBJEXT) -rm -f cap/flmsg-cap110.$(OBJEXT) -rm -f cap/flmsg-cap110_tab.$(OBJEXT) -rm -f cap/flmsg-cap_templates.$(OBJEXT) -rm -f csv/flmsg-csv.$(OBJEXT) -rm -f csv/flmsg-csv_tab.$(OBJEXT) -rm -f csv/flmsg-csv_table.$(OBJEXT) -rm -f csv/flmsg-csv_templates.$(OBJEXT) -rm -f custom/flmsg-custom.$(OBJEXT) -rm -f custom/flmsg-custom_tab.$(OBJEXT) -rm -f custom/flmsg-custom_templates.$(OBJEXT) -rm -f custom/flmsg-custom_transfer_tab.$(OBJEXT) -rm -f hics/flmsg-hics203.$(OBJEXT) -rm -f hics/flmsg-hics203_tab.$(OBJEXT) -rm -f hics/flmsg-hics203_templates.$(OBJEXT) -rm -f hics/flmsg-hics206.$(OBJEXT) -rm -f hics/flmsg-hics206_tab.$(OBJEXT) -rm -f hics/flmsg-hics206_templates.$(OBJEXT) -rm -f hics/flmsg-hics213.$(OBJEXT) -rm -f hics/flmsg-hics213_tab.$(OBJEXT) -rm -f hics/flmsg-hics213_templates.$(OBJEXT) -rm -f hics/flmsg-hics214.$(OBJEXT) -rm -f hics/flmsg-hics214_tab.$(OBJEXT) -rm -f hics/flmsg-hics214_templates.$(OBJEXT) -rm -f hics/flmsg-hics_tab.$(OBJEXT) -rm -f iaru/flmsg-iaru.$(OBJEXT) -rm -f iaru/flmsg-iaru_tab.$(OBJEXT) -rm -f iaru/flmsg-iaru_templates.$(OBJEXT) -rm -f ics/flmsg-ics203.$(OBJEXT) -rm -f ics/flmsg-ics203_tab.$(OBJEXT) -rm -f ics/flmsg-ics203_templates.$(OBJEXT) -rm -f ics/flmsg-ics205.$(OBJEXT) -rm -f ics/flmsg-ics205_tab.$(OBJEXT) -rm -f ics/flmsg-ics205_templates.$(OBJEXT) -rm -f ics/flmsg-ics205a.$(OBJEXT) -rm -f ics/flmsg-ics205a_tab.$(OBJEXT) -rm -f ics/flmsg-ics205a_templates.$(OBJEXT) -rm -f ics/flmsg-ics206.$(OBJEXT) -rm -f ics/flmsg-ics206_tab.$(OBJEXT) -rm -f ics/flmsg-ics206_templates.$(OBJEXT) -rm -f ics/flmsg-ics213.$(OBJEXT) -rm -f ics/flmsg-ics213_tab.$(OBJEXT) -rm -f ics/flmsg-ics213_templates.$(OBJEXT) -rm -f ics/flmsg-ics214.$(OBJEXT) -rm -f ics/flmsg-ics214_tab.$(OBJEXT) -rm -f ics/flmsg-ics214_templates.$(OBJEXT) -rm -f ics/flmsg-ics216.$(OBJEXT) -rm -f ics/flmsg-ics216_tab.$(OBJEXT) -rm -f ics/flmsg-ics216_templates.$(OBJEXT) -rm -f ics/flmsg-ics309.$(OBJEXT) -rm -f ics/flmsg-ics309_tab.$(OBJEXT) -rm -f ics/flmsg-ics309_templates.$(OBJEXT) -rm -f ics/flmsg-ics_tab.$(OBJEXT) -rm -f lzma/flmsg-Alloc.$(OBJEXT) -rm -f lzma/flmsg-LzFind.$(OBJEXT) -rm -f lzma/flmsg-LzmaDec.$(OBJEXT) -rm -f lzma/flmsg-LzmaEnc.$(OBJEXT) -rm -f lzma/flmsg-LzmaLib.$(OBJEXT) -rm -f mars/flmsg-mars_army.$(OBJEXT) -rm -f mars/flmsg-mars_army_tab.$(OBJEXT) -rm -f mars/flmsg-mars_daily.$(OBJEXT) -rm -f mars/flmsg-mars_daily_tab.$(OBJEXT) -rm -f mars/flmsg-mars_ineei.$(OBJEXT) -rm -f mars/flmsg-mars_ineei_tab.$(OBJEXT) -rm -f mars/flmsg-mars_navy.$(OBJEXT) -rm -f mars/flmsg-mars_net.$(OBJEXT) -rm -f mars/flmsg-mars_net_tab.$(OBJEXT) -rm -f mars/flmsg-mars_tab.$(OBJEXT) -rm -f mars/flmsg-mars_templates.$(OBJEXT) -rm -f mars/flmsg-navy_mars_tab.$(OBJEXT) -rm -f plaintext/flmsg-plaintext.$(OBJEXT) -rm -f plaintext/flmsg-plaintext_tab.$(OBJEXT) -rm -f plaintext/flmsg-plaintext_templates.$(OBJEXT) -rm -f radiogram/flmsg-arl_msgs.$(OBJEXT) -rm -f radiogram/flmsg-hx_msgs.$(OBJEXT) -rm -f radiogram/flmsg-radiogram.$(OBJEXT) -rm -f radiogram/flmsg-radiogram_tab.$(OBJEXT) -rm -f radiogram/flmsg-radiogram_templates.$(OBJEXT) -rm -f redx/flmsg-redx_5739.$(OBJEXT) -rm -f redx/flmsg-redx_5739A.$(OBJEXT) -rm -f redx/flmsg-redx_5739A_tab.$(OBJEXT) -rm -f redx/flmsg-redx_5739B.$(OBJEXT) -rm -f redx/flmsg-redx_5739B_tab.$(OBJEXT) -rm -f redx/flmsg-redx_5739_tab.$(OBJEXT) -rm -f redx/flmsg-redx_5739_template.$(OBJEXT) -rm -f redx/flmsg-redx_snw.$(OBJEXT) -rm -f redx/flmsg-redx_snw_tab.$(OBJEXT) -rm -f redx/flmsg-redx_snw_template.$(OBJEXT) -rm -f redx/flmsg-redx_tab.$(OBJEXT) -rm -f transfer/flmsg-transfer.$(OBJEXT) -rm -f transfer/flmsg-transfer_tab.$(OBJEXT) -rm -f utils/flmsg-base128.$(OBJEXT) -rm -f utils/flmsg-base256.$(OBJEXT) -rm -f utils/flmsg-base64.$(OBJEXT) -rm -f utils/flmsg-debug.$(OBJEXT) -rm -f utils/flmsg-ext_string.$(OBJEXT) -rm -f utils/flmsg-getsysinfo.$(OBJEXT) -rm -f utils/flmsg-mingw.$(OBJEXT) -rm -f utils/flmsg-mongoose.$(OBJEXT) -rm -f utils/flmsg-parse_xml.$(OBJEXT) -rm -f utils/flmsg-socket.$(OBJEXT) -rm -f utils/flmsg-status.$(OBJEXT) -rm -f utils/flmsg-threads.$(OBJEXT) -rm -f utils/flmsg-time_table.$(OBJEXT) -rm -f utils/flmsg-timeops.$(OBJEXT) -rm -f utils/flmsg-util.$(OBJEXT) -rm -f utils/flmsg-wrap.$(OBJEXT) -rm -f utils/flmsg-xml_io.$(OBJEXT) -rm -f widgets/flmsg-FTextView.$(OBJEXT) -rm -f widgets/flmsg-Fl_Native_File_Chooser.$(OBJEXT) -rm -f widgets/flmsg-Fl_Text_Buffer_mod.$(OBJEXT) -rm -f widgets/flmsg-Fl_Text_Display_mod.$(OBJEXT) -rm -f widgets/flmsg-Fl_Text_Editor_mod.$(OBJEXT) -rm -f widgets/flmsg-calendar.$(OBJEXT) -rm -f widgets/flmsg-combo.$(OBJEXT) -rm -f widgets/flmsg-date.$(OBJEXT) -rm -f widgets/flmsg-fileselect.$(OBJEXT) -rm -f widgets/flmsg-flinput2.$(OBJEXT) -rm -f widgets/flmsg-flslider2.$(OBJEXT) -rm -f widgets/flmsg-font_browser.$(OBJEXT) -rm -f widgets/flmsg-icons.$(OBJEXT) -rm -f widgets/flmsg-pixmaps.$(OBJEXT) -rm -f widgets/flmsg-pixmaps_tango.$(OBJEXT) -rm -f wx/flmsg-hurricane.$(OBJEXT) -rm -f wx/flmsg-hurricane_tab.$(OBJEXT) -rm -f wx/flmsg-hurricane_template.$(OBJEXT) -rm -f wx/flmsg-severe_wx.$(OBJEXT) -rm -f wx/flmsg-severe_wx_tab.$(OBJEXT) -rm -f wx/flmsg-severe_wx_template.$(OBJEXT) -rm -f wx/flmsg-storm_report.$(OBJEXT) -rm -f wx/flmsg-storm_report_tab.$(OBJEXT) -rm -f wx/flmsg-storm_report_template.$(OBJEXT) -rm -f wx/flmsg-wx_strings.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcClient.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcDispatch.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcMutex.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcServer.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcServerConnection.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcServerMethod.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcSocket.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcSource.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcUtil.$(OBJEXT) -rm -f xmlrpcpp/flmsg-XmlRpcValue.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flmsg-flmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flmsg-flmsg_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@blank-dnd/$(DEPDIR)/flmsg-blank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@blank-dnd/$(DEPDIR)/flmsg-blank_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@blank-dnd/$(DEPDIR)/flmsg-blank_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cap/$(DEPDIR)/flmsg-cap105.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cap/$(DEPDIR)/flmsg-cap105_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cap/$(DEPDIR)/flmsg-cap110.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cap/$(DEPDIR)/flmsg-cap110_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cap/$(DEPDIR)/flmsg-cap_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/flmsg-csv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/flmsg-csv_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/flmsg-csv_table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/flmsg-csv_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@custom/$(DEPDIR)/flmsg-custom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@custom/$(DEPDIR)/flmsg-custom_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@custom/$(DEPDIR)/flmsg-custom_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@custom/$(DEPDIR)/flmsg-custom_transfer_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics203.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics203_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics203_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics206.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics206_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics206_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics213.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics213_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics213_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics214.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics214_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics214_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hics/$(DEPDIR)/flmsg-hics_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@iaru/$(DEPDIR)/flmsg-iaru.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@iaru/$(DEPDIR)/flmsg-iaru_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@iaru/$(DEPDIR)/flmsg-iaru_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics203.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics203_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics203_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205a_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics205a_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics206.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics206_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics206_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics213.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics213_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics213_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics214.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics214_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics214_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics216.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics216_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics216_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics309.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics309_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics309_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ics/$(DEPDIR)/flmsg-ics_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flmsg-Alloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flmsg-LzFind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flmsg-LzmaDec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flmsg-LzmaEnc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lzma/$(DEPDIR)/flmsg-LzmaLib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_army.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_army_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_daily.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_daily_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_ineei.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_ineei_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_navy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_net.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_net_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-mars_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mars/$(DEPDIR)/flmsg-navy_mars_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plaintext/$(DEPDIR)/flmsg-plaintext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plaintext/$(DEPDIR)/flmsg-plaintext_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plaintext/$(DEPDIR)/flmsg-plaintext_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-arl_msgs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-hx_msgs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@radiogram/$(DEPDIR)/flmsg-radiogram_templates.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739A.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739B.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_5739_template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_snw_template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@redx/$(DEPDIR)/flmsg-redx_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@transfer/$(DEPDIR)/flmsg-transfer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@transfer/$(DEPDIR)/flmsg-transfer_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-base128.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-base256.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-base64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-ext_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-getsysinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-mingw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-mongoose.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-parse_xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-status.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-time_table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-timeops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-wrap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/flmsg-xml_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-FTextView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-calendar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-combo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-date.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-fileselect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-flinput2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-flslider2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-font_browser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-icons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-pixmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flmsg-pixmaps_tango.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-hurricane.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-hurricane_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-hurricane_template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-severe_wx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-severe_wx_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-severe_wx_template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-storm_report.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-storm_report_tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-storm_report_template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wx/$(DEPDIR)/flmsg-wx_strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` utils/flmsg-mingw.o: utils/mingw.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-mingw.o -MD -MP -MF utils/$(DEPDIR)/flmsg-mingw.Tpo -c -o utils/flmsg-mingw.o `test -f 'utils/mingw.c' || echo '$(srcdir)/'`utils/mingw.c @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-mingw.Tpo utils/$(DEPDIR)/flmsg-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/mingw.c' object='utils/flmsg-mingw.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-mingw.o `test -f 'utils/mingw.c' || echo '$(srcdir)/'`utils/mingw.c utils/flmsg-mingw.obj: utils/mingw.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-mingw.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-mingw.Tpo -c -o utils/flmsg-mingw.obj `if test -f 'utils/mingw.c'; then $(CYGPATH_W) 'utils/mingw.c'; else $(CYGPATH_W) '$(srcdir)/utils/mingw.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-mingw.Tpo utils/$(DEPDIR)/flmsg-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/mingw.c' object='utils/flmsg-mingw.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-mingw.obj `if test -f 'utils/mingw.c'; then $(CYGPATH_W) 'utils/mingw.c'; else $(CYGPATH_W) '$(srcdir)/utils/mingw.c'; fi` utils/flmsg-getsysinfo.o: utils/getsysinfo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-getsysinfo.o -MD -MP -MF utils/$(DEPDIR)/flmsg-getsysinfo.Tpo -c -o utils/flmsg-getsysinfo.o `test -f 'utils/getsysinfo.c' || echo '$(srcdir)/'`utils/getsysinfo.c @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-getsysinfo.Tpo utils/$(DEPDIR)/flmsg-getsysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/getsysinfo.c' object='utils/flmsg-getsysinfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-getsysinfo.o `test -f 'utils/getsysinfo.c' || echo '$(srcdir)/'`utils/getsysinfo.c utils/flmsg-getsysinfo.obj: utils/getsysinfo.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-getsysinfo.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-getsysinfo.Tpo -c -o utils/flmsg-getsysinfo.obj `if test -f 'utils/getsysinfo.c'; then $(CYGPATH_W) 'utils/getsysinfo.c'; else $(CYGPATH_W) '$(srcdir)/utils/getsysinfo.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-getsysinfo.Tpo utils/$(DEPDIR)/flmsg-getsysinfo.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/getsysinfo.c' object='utils/flmsg-getsysinfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-getsysinfo.obj `if test -f 'utils/getsysinfo.c'; then $(CYGPATH_W) 'utils/getsysinfo.c'; else $(CYGPATH_W) '$(srcdir)/utils/getsysinfo.c'; fi` lzma/flmsg-Alloc.o: lzma/Alloc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-Alloc.o -MD -MP -MF lzma/$(DEPDIR)/flmsg-Alloc.Tpo -c -o lzma/flmsg-Alloc.o `test -f 'lzma/Alloc.c' || echo '$(srcdir)/'`lzma/Alloc.c @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-Alloc.Tpo lzma/$(DEPDIR)/flmsg-Alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/Alloc.c' object='lzma/flmsg-Alloc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-Alloc.o `test -f 'lzma/Alloc.c' || echo '$(srcdir)/'`lzma/Alloc.c lzma/flmsg-Alloc.obj: lzma/Alloc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-Alloc.obj -MD -MP -MF lzma/$(DEPDIR)/flmsg-Alloc.Tpo -c -o lzma/flmsg-Alloc.obj `if test -f 'lzma/Alloc.c'; then $(CYGPATH_W) 'lzma/Alloc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/Alloc.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-Alloc.Tpo lzma/$(DEPDIR)/flmsg-Alloc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/Alloc.c' object='lzma/flmsg-Alloc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-Alloc.obj `if test -f 'lzma/Alloc.c'; then $(CYGPATH_W) 'lzma/Alloc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/Alloc.c'; fi` lzma/flmsg-LzFind.o: lzma/LzFind.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzFind.o -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzFind.Tpo -c -o lzma/flmsg-LzFind.o `test -f 'lzma/LzFind.c' || echo '$(srcdir)/'`lzma/LzFind.c @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzFind.Tpo lzma/$(DEPDIR)/flmsg-LzFind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzFind.c' object='lzma/flmsg-LzFind.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzFind.o `test -f 'lzma/LzFind.c' || echo '$(srcdir)/'`lzma/LzFind.c lzma/flmsg-LzFind.obj: lzma/LzFind.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzFind.obj -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzFind.Tpo -c -o lzma/flmsg-LzFind.obj `if test -f 'lzma/LzFind.c'; then $(CYGPATH_W) 'lzma/LzFind.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzFind.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzFind.Tpo lzma/$(DEPDIR)/flmsg-LzFind.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzFind.c' object='lzma/flmsg-LzFind.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzFind.obj `if test -f 'lzma/LzFind.c'; then $(CYGPATH_W) 'lzma/LzFind.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzFind.c'; fi` lzma/flmsg-LzmaDec.o: lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaDec.o -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaDec.Tpo -c -o lzma/flmsg-LzmaDec.o `test -f 'lzma/LzmaDec.c' || echo '$(srcdir)/'`lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaDec.Tpo lzma/$(DEPDIR)/flmsg-LzmaDec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaDec.c' object='lzma/flmsg-LzmaDec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaDec.o `test -f 'lzma/LzmaDec.c' || echo '$(srcdir)/'`lzma/LzmaDec.c lzma/flmsg-LzmaDec.obj: lzma/LzmaDec.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaDec.obj -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaDec.Tpo -c -o lzma/flmsg-LzmaDec.obj `if test -f 'lzma/LzmaDec.c'; then $(CYGPATH_W) 'lzma/LzmaDec.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaDec.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaDec.Tpo lzma/$(DEPDIR)/flmsg-LzmaDec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaDec.c' object='lzma/flmsg-LzmaDec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaDec.obj `if test -f 'lzma/LzmaDec.c'; then $(CYGPATH_W) 'lzma/LzmaDec.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaDec.c'; fi` lzma/flmsg-LzmaEnc.o: lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaEnc.o -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaEnc.Tpo -c -o lzma/flmsg-LzmaEnc.o `test -f 'lzma/LzmaEnc.c' || echo '$(srcdir)/'`lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaEnc.Tpo lzma/$(DEPDIR)/flmsg-LzmaEnc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaEnc.c' object='lzma/flmsg-LzmaEnc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaEnc.o `test -f 'lzma/LzmaEnc.c' || echo '$(srcdir)/'`lzma/LzmaEnc.c lzma/flmsg-LzmaEnc.obj: lzma/LzmaEnc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaEnc.obj -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaEnc.Tpo -c -o lzma/flmsg-LzmaEnc.obj `if test -f 'lzma/LzmaEnc.c'; then $(CYGPATH_W) 'lzma/LzmaEnc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaEnc.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaEnc.Tpo lzma/$(DEPDIR)/flmsg-LzmaEnc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaEnc.c' object='lzma/flmsg-LzmaEnc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaEnc.obj `if test -f 'lzma/LzmaEnc.c'; then $(CYGPATH_W) 'lzma/LzmaEnc.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaEnc.c'; fi` lzma/flmsg-LzmaLib.o: lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaLib.o -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaLib.Tpo -c -o lzma/flmsg-LzmaLib.o `test -f 'lzma/LzmaLib.c' || echo '$(srcdir)/'`lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaLib.Tpo lzma/$(DEPDIR)/flmsg-LzmaLib.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaLib.c' object='lzma/flmsg-LzmaLib.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaLib.o `test -f 'lzma/LzmaLib.c' || echo '$(srcdir)/'`lzma/LzmaLib.c lzma/flmsg-LzmaLib.obj: lzma/LzmaLib.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT lzma/flmsg-LzmaLib.obj -MD -MP -MF lzma/$(DEPDIR)/flmsg-LzmaLib.Tpo -c -o lzma/flmsg-LzmaLib.obj `if test -f 'lzma/LzmaLib.c'; then $(CYGPATH_W) 'lzma/LzmaLib.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaLib.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lzma/$(DEPDIR)/flmsg-LzmaLib.Tpo lzma/$(DEPDIR)/flmsg-LzmaLib.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lzma/LzmaLib.c' object='lzma/flmsg-LzmaLib.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o lzma/flmsg-LzmaLib.obj `if test -f 'lzma/LzmaLib.c'; then $(CYGPATH_W) 'lzma/LzmaLib.c'; else $(CYGPATH_W) '$(srcdir)/lzma/LzmaLib.c'; fi` utils/flmsg-mongoose.o: utils/mongoose.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-mongoose.o -MD -MP -MF utils/$(DEPDIR)/flmsg-mongoose.Tpo -c -o utils/flmsg-mongoose.o `test -f 'utils/mongoose.c' || echo '$(srcdir)/'`utils/mongoose.c @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-mongoose.Tpo utils/$(DEPDIR)/flmsg-mongoose.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/mongoose.c' object='utils/flmsg-mongoose.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-mongoose.o `test -f 'utils/mongoose.c' || echo '$(srcdir)/'`utils/mongoose.c utils/flmsg-mongoose.obj: utils/mongoose.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -MT utils/flmsg-mongoose.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-mongoose.Tpo -c -o utils/flmsg-mongoose.obj `if test -f 'utils/mongoose.c'; then $(CYGPATH_W) 'utils/mongoose.c'; else $(CYGPATH_W) '$(srcdir)/utils/mongoose.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-mongoose.Tpo utils/$(DEPDIR)/flmsg-mongoose.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils/mongoose.c' object='utils/flmsg-mongoose.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CFLAGS) $(CFLAGS) -c -o utils/flmsg-mongoose.obj `if test -f 'utils/mongoose.c'; then $(CYGPATH_W) 'utils/mongoose.c'; else $(CYGPATH_W) '$(srcdir)/utils/mongoose.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` xmlrpcpp/flmsg-XmlRpcClient.o: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcClient.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Tpo -c -o xmlrpcpp/flmsg-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flmsg-XmlRpcClient.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/flmsg-XmlRpcClient.obj: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcClient.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Tpo -c -o xmlrpcpp/flmsg-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flmsg-XmlRpcClient.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` xmlrpcpp/flmsg-XmlRpcDispatch.o: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcDispatch.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flmsg-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flmsg-XmlRpcDispatch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/flmsg-XmlRpcDispatch.obj: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcDispatch.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flmsg-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flmsg-XmlRpcDispatch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` xmlrpcpp/flmsg-XmlRpcMutex.o: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcMutex.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Tpo -c -o xmlrpcpp/flmsg-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flmsg-XmlRpcMutex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/flmsg-XmlRpcMutex.obj: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcMutex.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Tpo -c -o xmlrpcpp/flmsg-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flmsg-XmlRpcMutex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` xmlrpcpp/flmsg-XmlRpcServerConnection.o: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServerConnection.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flmsg-XmlRpcServerConnection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp xmlrpcpp/flmsg-XmlRpcServerConnection.obj: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServerConnection.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flmsg-XmlRpcServerConnection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` xmlrpcpp/flmsg-XmlRpcServer.o: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServer.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flmsg-XmlRpcServer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp xmlrpcpp/flmsg-XmlRpcServer.obj: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServer.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flmsg-XmlRpcServer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` xmlrpcpp/flmsg-XmlRpcServerMethod.o: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServerMethod.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flmsg-XmlRpcServerMethod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp xmlrpcpp/flmsg-XmlRpcServerMethod.obj: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcServerMethod.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flmsg-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flmsg-XmlRpcServerMethod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` xmlrpcpp/flmsg-XmlRpcSocket.o: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcSocket.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Tpo -c -o xmlrpcpp/flmsg-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flmsg-XmlRpcSocket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp xmlrpcpp/flmsg-XmlRpcSocket.obj: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcSocket.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Tpo -c -o xmlrpcpp/flmsg-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flmsg-XmlRpcSocket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` xmlrpcpp/flmsg-XmlRpcSource.o: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcSource.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Tpo -c -o xmlrpcpp/flmsg-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flmsg-XmlRpcSource.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp xmlrpcpp/flmsg-XmlRpcSource.obj: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcSource.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Tpo -c -o xmlrpcpp/flmsg-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flmsg-XmlRpcSource.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` xmlrpcpp/flmsg-XmlRpcUtil.o: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcUtil.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Tpo -c -o xmlrpcpp/flmsg-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flmsg-XmlRpcUtil.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp xmlrpcpp/flmsg-XmlRpcUtil.obj: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcUtil.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Tpo -c -o xmlrpcpp/flmsg-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flmsg-XmlRpcUtil.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` xmlrpcpp/flmsg-XmlRpcValue.o: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcValue.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Tpo -c -o xmlrpcpp/flmsg-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flmsg-XmlRpcValue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp xmlrpcpp/flmsg-XmlRpcValue.obj: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flmsg-XmlRpcValue.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Tpo -c -o xmlrpcpp/flmsg-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flmsg-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flmsg-XmlRpcValue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flmsg-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` blank-dnd/flmsg-baddata_templates.o: blank-dnd/baddata_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-baddata_templates.o -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Tpo -c -o blank-dnd/flmsg-baddata_templates.o `test -f 'blank-dnd/baddata_templates.cxx' || echo '$(srcdir)/'`blank-dnd/baddata_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Tpo blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/baddata_templates.cxx' object='blank-dnd/flmsg-baddata_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-baddata_templates.o `test -f 'blank-dnd/baddata_templates.cxx' || echo '$(srcdir)/'`blank-dnd/baddata_templates.cxx blank-dnd/flmsg-baddata_templates.obj: blank-dnd/baddata_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-baddata_templates.obj -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Tpo -c -o blank-dnd/flmsg-baddata_templates.obj `if test -f 'blank-dnd/baddata_templates.cxx'; then $(CYGPATH_W) 'blank-dnd/baddata_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/baddata_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Tpo blank-dnd/$(DEPDIR)/flmsg-baddata_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/baddata_templates.cxx' object='blank-dnd/flmsg-baddata_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-baddata_templates.obj `if test -f 'blank-dnd/baddata_templates.cxx'; then $(CYGPATH_W) 'blank-dnd/baddata_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/baddata_templates.cxx'; fi` blank-dnd/flmsg-blank.o: blank-dnd/blank.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank.o -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank.Tpo -c -o blank-dnd/flmsg-blank.o `test -f 'blank-dnd/blank.cxx' || echo '$(srcdir)/'`blank-dnd/blank.cxx @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank.Tpo blank-dnd/$(DEPDIR)/flmsg-blank.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank.cxx' object='blank-dnd/flmsg-blank.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank.o `test -f 'blank-dnd/blank.cxx' || echo '$(srcdir)/'`blank-dnd/blank.cxx blank-dnd/flmsg-blank.obj: blank-dnd/blank.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank.obj -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank.Tpo -c -o blank-dnd/flmsg-blank.obj `if test -f 'blank-dnd/blank.cxx'; then $(CYGPATH_W) 'blank-dnd/blank.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank.Tpo blank-dnd/$(DEPDIR)/flmsg-blank.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank.cxx' object='blank-dnd/flmsg-blank.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank.obj `if test -f 'blank-dnd/blank.cxx'; then $(CYGPATH_W) 'blank-dnd/blank.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank.cxx'; fi` blank-dnd/flmsg-blank_tab.o: blank-dnd/blank_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank_tab.o -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank_tab.Tpo -c -o blank-dnd/flmsg-blank_tab.o `test -f 'blank-dnd/blank_tab.cxx' || echo '$(srcdir)/'`blank-dnd/blank_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank_tab.Tpo blank-dnd/$(DEPDIR)/flmsg-blank_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank_tab.cxx' object='blank-dnd/flmsg-blank_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank_tab.o `test -f 'blank-dnd/blank_tab.cxx' || echo '$(srcdir)/'`blank-dnd/blank_tab.cxx blank-dnd/flmsg-blank_tab.obj: blank-dnd/blank_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank_tab.obj -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank_tab.Tpo -c -o blank-dnd/flmsg-blank_tab.obj `if test -f 'blank-dnd/blank_tab.cxx'; then $(CYGPATH_W) 'blank-dnd/blank_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank_tab.Tpo blank-dnd/$(DEPDIR)/flmsg-blank_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank_tab.cxx' object='blank-dnd/flmsg-blank_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank_tab.obj `if test -f 'blank-dnd/blank_tab.cxx'; then $(CYGPATH_W) 'blank-dnd/blank_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank_tab.cxx'; fi` blank-dnd/flmsg-blank_templates.o: blank-dnd/blank_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank_templates.o -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank_templates.Tpo -c -o blank-dnd/flmsg-blank_templates.o `test -f 'blank-dnd/blank_templates.cxx' || echo '$(srcdir)/'`blank-dnd/blank_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank_templates.Tpo blank-dnd/$(DEPDIR)/flmsg-blank_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank_templates.cxx' object='blank-dnd/flmsg-blank_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank_templates.o `test -f 'blank-dnd/blank_templates.cxx' || echo '$(srcdir)/'`blank-dnd/blank_templates.cxx blank-dnd/flmsg-blank_templates.obj: blank-dnd/blank_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-blank_templates.obj -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-blank_templates.Tpo -c -o blank-dnd/flmsg-blank_templates.obj `if test -f 'blank-dnd/blank_templates.cxx'; then $(CYGPATH_W) 'blank-dnd/blank_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-blank_templates.Tpo blank-dnd/$(DEPDIR)/flmsg-blank_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/blank_templates.cxx' object='blank-dnd/flmsg-blank_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-blank_templates.obj `if test -f 'blank-dnd/blank_templates.cxx'; then $(CYGPATH_W) 'blank-dnd/blank_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/blank_templates.cxx'; fi` blank-dnd/flmsg-dnd_tab.o: blank-dnd/dnd_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-dnd_tab.o -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Tpo -c -o blank-dnd/flmsg-dnd_tab.o `test -f 'blank-dnd/dnd_tab.cxx' || echo '$(srcdir)/'`blank-dnd/dnd_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Tpo blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/dnd_tab.cxx' object='blank-dnd/flmsg-dnd_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-dnd_tab.o `test -f 'blank-dnd/dnd_tab.cxx' || echo '$(srcdir)/'`blank-dnd/dnd_tab.cxx blank-dnd/flmsg-dnd_tab.obj: blank-dnd/dnd_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT blank-dnd/flmsg-dnd_tab.obj -MD -MP -MF blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Tpo -c -o blank-dnd/flmsg-dnd_tab.obj `if test -f 'blank-dnd/dnd_tab.cxx'; then $(CYGPATH_W) 'blank-dnd/dnd_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/dnd_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Tpo blank-dnd/$(DEPDIR)/flmsg-dnd_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='blank-dnd/dnd_tab.cxx' object='blank-dnd/flmsg-dnd_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o blank-dnd/flmsg-dnd_tab.obj `if test -f 'blank-dnd/dnd_tab.cxx'; then $(CYGPATH_W) 'blank-dnd/dnd_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/blank-dnd/dnd_tab.cxx'; fi` cap/flmsg-cap105.o: cap/cap105.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap105.o -MD -MP -MF cap/$(DEPDIR)/flmsg-cap105.Tpo -c -o cap/flmsg-cap105.o `test -f 'cap/cap105.cxx' || echo '$(srcdir)/'`cap/cap105.cxx @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap105.Tpo cap/$(DEPDIR)/flmsg-cap105.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap105.cxx' object='cap/flmsg-cap105.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap105.o `test -f 'cap/cap105.cxx' || echo '$(srcdir)/'`cap/cap105.cxx cap/flmsg-cap105.obj: cap/cap105.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap105.obj -MD -MP -MF cap/$(DEPDIR)/flmsg-cap105.Tpo -c -o cap/flmsg-cap105.obj `if test -f 'cap/cap105.cxx'; then $(CYGPATH_W) 'cap/cap105.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap105.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap105.Tpo cap/$(DEPDIR)/flmsg-cap105.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap105.cxx' object='cap/flmsg-cap105.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap105.obj `if test -f 'cap/cap105.cxx'; then $(CYGPATH_W) 'cap/cap105.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap105.cxx'; fi` cap/flmsg-cap105_tab.o: cap/cap105_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap105_tab.o -MD -MP -MF cap/$(DEPDIR)/flmsg-cap105_tab.Tpo -c -o cap/flmsg-cap105_tab.o `test -f 'cap/cap105_tab.cxx' || echo '$(srcdir)/'`cap/cap105_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap105_tab.Tpo cap/$(DEPDIR)/flmsg-cap105_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap105_tab.cxx' object='cap/flmsg-cap105_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap105_tab.o `test -f 'cap/cap105_tab.cxx' || echo '$(srcdir)/'`cap/cap105_tab.cxx cap/flmsg-cap105_tab.obj: cap/cap105_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap105_tab.obj -MD -MP -MF cap/$(DEPDIR)/flmsg-cap105_tab.Tpo -c -o cap/flmsg-cap105_tab.obj `if test -f 'cap/cap105_tab.cxx'; then $(CYGPATH_W) 'cap/cap105_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap105_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap105_tab.Tpo cap/$(DEPDIR)/flmsg-cap105_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap105_tab.cxx' object='cap/flmsg-cap105_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap105_tab.obj `if test -f 'cap/cap105_tab.cxx'; then $(CYGPATH_W) 'cap/cap105_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap105_tab.cxx'; fi` cap/flmsg-cap110.o: cap/cap110.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap110.o -MD -MP -MF cap/$(DEPDIR)/flmsg-cap110.Tpo -c -o cap/flmsg-cap110.o `test -f 'cap/cap110.cxx' || echo '$(srcdir)/'`cap/cap110.cxx @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap110.Tpo cap/$(DEPDIR)/flmsg-cap110.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap110.cxx' object='cap/flmsg-cap110.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap110.o `test -f 'cap/cap110.cxx' || echo '$(srcdir)/'`cap/cap110.cxx cap/flmsg-cap110.obj: cap/cap110.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap110.obj -MD -MP -MF cap/$(DEPDIR)/flmsg-cap110.Tpo -c -o cap/flmsg-cap110.obj `if test -f 'cap/cap110.cxx'; then $(CYGPATH_W) 'cap/cap110.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap110.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap110.Tpo cap/$(DEPDIR)/flmsg-cap110.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap110.cxx' object='cap/flmsg-cap110.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap110.obj `if test -f 'cap/cap110.cxx'; then $(CYGPATH_W) 'cap/cap110.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap110.cxx'; fi` cap/flmsg-cap110_tab.o: cap/cap110_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap110_tab.o -MD -MP -MF cap/$(DEPDIR)/flmsg-cap110_tab.Tpo -c -o cap/flmsg-cap110_tab.o `test -f 'cap/cap110_tab.cxx' || echo '$(srcdir)/'`cap/cap110_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap110_tab.Tpo cap/$(DEPDIR)/flmsg-cap110_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap110_tab.cxx' object='cap/flmsg-cap110_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap110_tab.o `test -f 'cap/cap110_tab.cxx' || echo '$(srcdir)/'`cap/cap110_tab.cxx cap/flmsg-cap110_tab.obj: cap/cap110_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap110_tab.obj -MD -MP -MF cap/$(DEPDIR)/flmsg-cap110_tab.Tpo -c -o cap/flmsg-cap110_tab.obj `if test -f 'cap/cap110_tab.cxx'; then $(CYGPATH_W) 'cap/cap110_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap110_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap110_tab.Tpo cap/$(DEPDIR)/flmsg-cap110_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap110_tab.cxx' object='cap/flmsg-cap110_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap110_tab.obj `if test -f 'cap/cap110_tab.cxx'; then $(CYGPATH_W) 'cap/cap110_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap110_tab.cxx'; fi` cap/flmsg-cap_templates.o: cap/cap_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap_templates.o -MD -MP -MF cap/$(DEPDIR)/flmsg-cap_templates.Tpo -c -o cap/flmsg-cap_templates.o `test -f 'cap/cap_templates.cxx' || echo '$(srcdir)/'`cap/cap_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap_templates.Tpo cap/$(DEPDIR)/flmsg-cap_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap_templates.cxx' object='cap/flmsg-cap_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap_templates.o `test -f 'cap/cap_templates.cxx' || echo '$(srcdir)/'`cap/cap_templates.cxx cap/flmsg-cap_templates.obj: cap/cap_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT cap/flmsg-cap_templates.obj -MD -MP -MF cap/$(DEPDIR)/flmsg-cap_templates.Tpo -c -o cap/flmsg-cap_templates.obj `if test -f 'cap/cap_templates.cxx'; then $(CYGPATH_W) 'cap/cap_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) cap/$(DEPDIR)/flmsg-cap_templates.Tpo cap/$(DEPDIR)/flmsg-cap_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cap/cap_templates.cxx' object='cap/flmsg-cap_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o cap/flmsg-cap_templates.obj `if test -f 'cap/cap_templates.cxx'; then $(CYGPATH_W) 'cap/cap_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/cap/cap_templates.cxx'; fi` csv/flmsg-csv.o: csv/csv.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv.o -MD -MP -MF csv/$(DEPDIR)/flmsg-csv.Tpo -c -o csv/flmsg-csv.o `test -f 'csv/csv.cxx' || echo '$(srcdir)/'`csv/csv.cxx @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv.Tpo csv/$(DEPDIR)/flmsg-csv.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv.cxx' object='csv/flmsg-csv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv.o `test -f 'csv/csv.cxx' || echo '$(srcdir)/'`csv/csv.cxx csv/flmsg-csv.obj: csv/csv.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv.obj -MD -MP -MF csv/$(DEPDIR)/flmsg-csv.Tpo -c -o csv/flmsg-csv.obj `if test -f 'csv/csv.cxx'; then $(CYGPATH_W) 'csv/csv.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv.Tpo csv/$(DEPDIR)/flmsg-csv.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv.cxx' object='csv/flmsg-csv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv.obj `if test -f 'csv/csv.cxx'; then $(CYGPATH_W) 'csv/csv.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv.cxx'; fi` csv/flmsg-csv_tab.o: csv/csv_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_tab.o -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_tab.Tpo -c -o csv/flmsg-csv_tab.o `test -f 'csv/csv_tab.cxx' || echo '$(srcdir)/'`csv/csv_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_tab.Tpo csv/$(DEPDIR)/flmsg-csv_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_tab.cxx' object='csv/flmsg-csv_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_tab.o `test -f 'csv/csv_tab.cxx' || echo '$(srcdir)/'`csv/csv_tab.cxx csv/flmsg-csv_tab.obj: csv/csv_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_tab.obj -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_tab.Tpo -c -o csv/flmsg-csv_tab.obj `if test -f 'csv/csv_tab.cxx'; then $(CYGPATH_W) 'csv/csv_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_tab.Tpo csv/$(DEPDIR)/flmsg-csv_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_tab.cxx' object='csv/flmsg-csv_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_tab.obj `if test -f 'csv/csv_tab.cxx'; then $(CYGPATH_W) 'csv/csv_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_tab.cxx'; fi` csv/flmsg-csv_templates.o: csv/csv_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_templates.o -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_templates.Tpo -c -o csv/flmsg-csv_templates.o `test -f 'csv/csv_templates.cxx' || echo '$(srcdir)/'`csv/csv_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_templates.Tpo csv/$(DEPDIR)/flmsg-csv_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_templates.cxx' object='csv/flmsg-csv_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_templates.o `test -f 'csv/csv_templates.cxx' || echo '$(srcdir)/'`csv/csv_templates.cxx csv/flmsg-csv_templates.obj: csv/csv_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_templates.obj -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_templates.Tpo -c -o csv/flmsg-csv_templates.obj `if test -f 'csv/csv_templates.cxx'; then $(CYGPATH_W) 'csv/csv_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_templates.Tpo csv/$(DEPDIR)/flmsg-csv_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_templates.cxx' object='csv/flmsg-csv_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_templates.obj `if test -f 'csv/csv_templates.cxx'; then $(CYGPATH_W) 'csv/csv_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_templates.cxx'; fi` csv/flmsg-csv_table.o: csv/csv_table.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_table.o -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_table.Tpo -c -o csv/flmsg-csv_table.o `test -f 'csv/csv_table.cxx' || echo '$(srcdir)/'`csv/csv_table.cxx @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_table.Tpo csv/$(DEPDIR)/flmsg-csv_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_table.cxx' object='csv/flmsg-csv_table.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_table.o `test -f 'csv/csv_table.cxx' || echo '$(srcdir)/'`csv/csv_table.cxx csv/flmsg-csv_table.obj: csv/csv_table.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT csv/flmsg-csv_table.obj -MD -MP -MF csv/$(DEPDIR)/flmsg-csv_table.Tpo -c -o csv/flmsg-csv_table.obj `if test -f 'csv/csv_table.cxx'; then $(CYGPATH_W) 'csv/csv_table.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_table.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) csv/$(DEPDIR)/flmsg-csv_table.Tpo csv/$(DEPDIR)/flmsg-csv_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='csv/csv_table.cxx' object='csv/flmsg-csv_table.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o csv/flmsg-csv_table.obj `if test -f 'csv/csv_table.cxx'; then $(CYGPATH_W) 'csv/csv_table.cxx'; else $(CYGPATH_W) '$(srcdir)/csv/csv_table.cxx'; fi` custom/flmsg-custom.o: custom/custom.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom.o -MD -MP -MF custom/$(DEPDIR)/flmsg-custom.Tpo -c -o custom/flmsg-custom.o `test -f 'custom/custom.cxx' || echo '$(srcdir)/'`custom/custom.cxx @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom.Tpo custom/$(DEPDIR)/flmsg-custom.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom.cxx' object='custom/flmsg-custom.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom.o `test -f 'custom/custom.cxx' || echo '$(srcdir)/'`custom/custom.cxx custom/flmsg-custom.obj: custom/custom.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom.obj -MD -MP -MF custom/$(DEPDIR)/flmsg-custom.Tpo -c -o custom/flmsg-custom.obj `if test -f 'custom/custom.cxx'; then $(CYGPATH_W) 'custom/custom.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom.Tpo custom/$(DEPDIR)/flmsg-custom.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom.cxx' object='custom/flmsg-custom.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom.obj `if test -f 'custom/custom.cxx'; then $(CYGPATH_W) 'custom/custom.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom.cxx'; fi` custom/flmsg-custom_tab.o: custom/custom_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_tab.o -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_tab.Tpo -c -o custom/flmsg-custom_tab.o `test -f 'custom/custom_tab.cxx' || echo '$(srcdir)/'`custom/custom_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_tab.Tpo custom/$(DEPDIR)/flmsg-custom_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_tab.cxx' object='custom/flmsg-custom_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_tab.o `test -f 'custom/custom_tab.cxx' || echo '$(srcdir)/'`custom/custom_tab.cxx custom/flmsg-custom_tab.obj: custom/custom_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_tab.obj -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_tab.Tpo -c -o custom/flmsg-custom_tab.obj `if test -f 'custom/custom_tab.cxx'; then $(CYGPATH_W) 'custom/custom_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_tab.Tpo custom/$(DEPDIR)/flmsg-custom_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_tab.cxx' object='custom/flmsg-custom_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_tab.obj `if test -f 'custom/custom_tab.cxx'; then $(CYGPATH_W) 'custom/custom_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_tab.cxx'; fi` custom/flmsg-custom_templates.o: custom/custom_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_templates.o -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_templates.Tpo -c -o custom/flmsg-custom_templates.o `test -f 'custom/custom_templates.cxx' || echo '$(srcdir)/'`custom/custom_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_templates.Tpo custom/$(DEPDIR)/flmsg-custom_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_templates.cxx' object='custom/flmsg-custom_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_templates.o `test -f 'custom/custom_templates.cxx' || echo '$(srcdir)/'`custom/custom_templates.cxx custom/flmsg-custom_templates.obj: custom/custom_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_templates.obj -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_templates.Tpo -c -o custom/flmsg-custom_templates.obj `if test -f 'custom/custom_templates.cxx'; then $(CYGPATH_W) 'custom/custom_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_templates.Tpo custom/$(DEPDIR)/flmsg-custom_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_templates.cxx' object='custom/flmsg-custom_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_templates.obj `if test -f 'custom/custom_templates.cxx'; then $(CYGPATH_W) 'custom/custom_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_templates.cxx'; fi` flmsg-flmsg.o: flmsg.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT flmsg-flmsg.o -MD -MP -MF $(DEPDIR)/flmsg-flmsg.Tpo -c -o flmsg-flmsg.o `test -f 'flmsg.cxx' || echo '$(srcdir)/'`flmsg.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/flmsg-flmsg.Tpo $(DEPDIR)/flmsg-flmsg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flmsg.cxx' object='flmsg-flmsg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o flmsg-flmsg.o `test -f 'flmsg.cxx' || echo '$(srcdir)/'`flmsg.cxx flmsg-flmsg.obj: flmsg.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT flmsg-flmsg.obj -MD -MP -MF $(DEPDIR)/flmsg-flmsg.Tpo -c -o flmsg-flmsg.obj `if test -f 'flmsg.cxx'; then $(CYGPATH_W) 'flmsg.cxx'; else $(CYGPATH_W) '$(srcdir)/flmsg.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/flmsg-flmsg.Tpo $(DEPDIR)/flmsg-flmsg.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flmsg.cxx' object='flmsg-flmsg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o flmsg-flmsg.obj `if test -f 'flmsg.cxx'; then $(CYGPATH_W) 'flmsg.cxx'; else $(CYGPATH_W) '$(srcdir)/flmsg.cxx'; fi` flmsg-flmsg_dialog.o: flmsg_dialog.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT flmsg-flmsg_dialog.o -MD -MP -MF $(DEPDIR)/flmsg-flmsg_dialog.Tpo -c -o flmsg-flmsg_dialog.o `test -f 'flmsg_dialog.cxx' || echo '$(srcdir)/'`flmsg_dialog.cxx @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/flmsg-flmsg_dialog.Tpo $(DEPDIR)/flmsg-flmsg_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flmsg_dialog.cxx' object='flmsg-flmsg_dialog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o flmsg-flmsg_dialog.o `test -f 'flmsg_dialog.cxx' || echo '$(srcdir)/'`flmsg_dialog.cxx flmsg-flmsg_dialog.obj: flmsg_dialog.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT flmsg-flmsg_dialog.obj -MD -MP -MF $(DEPDIR)/flmsg-flmsg_dialog.Tpo -c -o flmsg-flmsg_dialog.obj `if test -f 'flmsg_dialog.cxx'; then $(CYGPATH_W) 'flmsg_dialog.cxx'; else $(CYGPATH_W) '$(srcdir)/flmsg_dialog.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/flmsg-flmsg_dialog.Tpo $(DEPDIR)/flmsg-flmsg_dialog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='flmsg_dialog.cxx' object='flmsg-flmsg_dialog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o flmsg-flmsg_dialog.obj `if test -f 'flmsg_dialog.cxx'; then $(CYGPATH_W) 'flmsg_dialog.cxx'; else $(CYGPATH_W) '$(srcdir)/flmsg_dialog.cxx'; fi` iaru/flmsg-iaru.o: iaru/iaru.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru.o -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru.Tpo -c -o iaru/flmsg-iaru.o `test -f 'iaru/iaru.cxx' || echo '$(srcdir)/'`iaru/iaru.cxx @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru.Tpo iaru/$(DEPDIR)/flmsg-iaru.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru.cxx' object='iaru/flmsg-iaru.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru.o `test -f 'iaru/iaru.cxx' || echo '$(srcdir)/'`iaru/iaru.cxx iaru/flmsg-iaru.obj: iaru/iaru.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru.obj -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru.Tpo -c -o iaru/flmsg-iaru.obj `if test -f 'iaru/iaru.cxx'; then $(CYGPATH_W) 'iaru/iaru.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru.Tpo iaru/$(DEPDIR)/flmsg-iaru.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru.cxx' object='iaru/flmsg-iaru.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru.obj `if test -f 'iaru/iaru.cxx'; then $(CYGPATH_W) 'iaru/iaru.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru.cxx'; fi` iaru/flmsg-iaru_tab.o: iaru/iaru_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru_tab.o -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru_tab.Tpo -c -o iaru/flmsg-iaru_tab.o `test -f 'iaru/iaru_tab.cxx' || echo '$(srcdir)/'`iaru/iaru_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru_tab.Tpo iaru/$(DEPDIR)/flmsg-iaru_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru_tab.cxx' object='iaru/flmsg-iaru_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru_tab.o `test -f 'iaru/iaru_tab.cxx' || echo '$(srcdir)/'`iaru/iaru_tab.cxx iaru/flmsg-iaru_tab.obj: iaru/iaru_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru_tab.obj -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru_tab.Tpo -c -o iaru/flmsg-iaru_tab.obj `if test -f 'iaru/iaru_tab.cxx'; then $(CYGPATH_W) 'iaru/iaru_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru_tab.Tpo iaru/$(DEPDIR)/flmsg-iaru_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru_tab.cxx' object='iaru/flmsg-iaru_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru_tab.obj `if test -f 'iaru/iaru_tab.cxx'; then $(CYGPATH_W) 'iaru/iaru_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru_tab.cxx'; fi` iaru/flmsg-iaru_templates.o: iaru/iaru_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru_templates.o -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru_templates.Tpo -c -o iaru/flmsg-iaru_templates.o `test -f 'iaru/iaru_templates.cxx' || echo '$(srcdir)/'`iaru/iaru_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru_templates.Tpo iaru/$(DEPDIR)/flmsg-iaru_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru_templates.cxx' object='iaru/flmsg-iaru_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru_templates.o `test -f 'iaru/iaru_templates.cxx' || echo '$(srcdir)/'`iaru/iaru_templates.cxx iaru/flmsg-iaru_templates.obj: iaru/iaru_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT iaru/flmsg-iaru_templates.obj -MD -MP -MF iaru/$(DEPDIR)/flmsg-iaru_templates.Tpo -c -o iaru/flmsg-iaru_templates.obj `if test -f 'iaru/iaru_templates.cxx'; then $(CYGPATH_W) 'iaru/iaru_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) iaru/$(DEPDIR)/flmsg-iaru_templates.Tpo iaru/$(DEPDIR)/flmsg-iaru_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iaru/iaru_templates.cxx' object='iaru/flmsg-iaru_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o iaru/flmsg-iaru_templates.obj `if test -f 'iaru/iaru_templates.cxx'; then $(CYGPATH_W) 'iaru/iaru_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/iaru/iaru_templates.cxx'; fi` ics/flmsg-ics203.o: ics/ics203.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203.Tpo -c -o ics/flmsg-ics203.o `test -f 'ics/ics203.cxx' || echo '$(srcdir)/'`ics/ics203.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203.Tpo ics/$(DEPDIR)/flmsg-ics203.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203.cxx' object='ics/flmsg-ics203.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203.o `test -f 'ics/ics203.cxx' || echo '$(srcdir)/'`ics/ics203.cxx ics/flmsg-ics203.obj: ics/ics203.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203.Tpo -c -o ics/flmsg-ics203.obj `if test -f 'ics/ics203.cxx'; then $(CYGPATH_W) 'ics/ics203.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203.Tpo ics/$(DEPDIR)/flmsg-ics203.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203.cxx' object='ics/flmsg-ics203.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203.obj `if test -f 'ics/ics203.cxx'; then $(CYGPATH_W) 'ics/ics203.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203.cxx'; fi` ics/flmsg-ics205.o: ics/ics205.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205.Tpo -c -o ics/flmsg-ics205.o `test -f 'ics/ics205.cxx' || echo '$(srcdir)/'`ics/ics205.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205.Tpo ics/$(DEPDIR)/flmsg-ics205.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205.cxx' object='ics/flmsg-ics205.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205.o `test -f 'ics/ics205.cxx' || echo '$(srcdir)/'`ics/ics205.cxx ics/flmsg-ics205.obj: ics/ics205.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205.Tpo -c -o ics/flmsg-ics205.obj `if test -f 'ics/ics205.cxx'; then $(CYGPATH_W) 'ics/ics205.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205.Tpo ics/$(DEPDIR)/flmsg-ics205.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205.cxx' object='ics/flmsg-ics205.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205.obj `if test -f 'ics/ics205.cxx'; then $(CYGPATH_W) 'ics/ics205.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205.cxx'; fi` ics/flmsg-ics205a.o: ics/ics205a.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a.Tpo -c -o ics/flmsg-ics205a.o `test -f 'ics/ics205a.cxx' || echo '$(srcdir)/'`ics/ics205a.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a.Tpo ics/$(DEPDIR)/flmsg-ics205a.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a.cxx' object='ics/flmsg-ics205a.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a.o `test -f 'ics/ics205a.cxx' || echo '$(srcdir)/'`ics/ics205a.cxx ics/flmsg-ics205a.obj: ics/ics205a.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a.Tpo -c -o ics/flmsg-ics205a.obj `if test -f 'ics/ics205a.cxx'; then $(CYGPATH_W) 'ics/ics205a.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a.Tpo ics/$(DEPDIR)/flmsg-ics205a.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a.cxx' object='ics/flmsg-ics205a.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a.obj `if test -f 'ics/ics205a.cxx'; then $(CYGPATH_W) 'ics/ics205a.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a.cxx'; fi` ics/flmsg-ics206.o: ics/ics206.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206.Tpo -c -o ics/flmsg-ics206.o `test -f 'ics/ics206.cxx' || echo '$(srcdir)/'`ics/ics206.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206.Tpo ics/$(DEPDIR)/flmsg-ics206.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206.cxx' object='ics/flmsg-ics206.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206.o `test -f 'ics/ics206.cxx' || echo '$(srcdir)/'`ics/ics206.cxx ics/flmsg-ics206.obj: ics/ics206.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206.Tpo -c -o ics/flmsg-ics206.obj `if test -f 'ics/ics206.cxx'; then $(CYGPATH_W) 'ics/ics206.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206.Tpo ics/$(DEPDIR)/flmsg-ics206.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206.cxx' object='ics/flmsg-ics206.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206.obj `if test -f 'ics/ics206.cxx'; then $(CYGPATH_W) 'ics/ics206.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206.cxx'; fi` ics/flmsg-ics213.o: ics/ics213.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213.Tpo -c -o ics/flmsg-ics213.o `test -f 'ics/ics213.cxx' || echo '$(srcdir)/'`ics/ics213.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213.Tpo ics/$(DEPDIR)/flmsg-ics213.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213.cxx' object='ics/flmsg-ics213.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213.o `test -f 'ics/ics213.cxx' || echo '$(srcdir)/'`ics/ics213.cxx ics/flmsg-ics213.obj: ics/ics213.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213.Tpo -c -o ics/flmsg-ics213.obj `if test -f 'ics/ics213.cxx'; then $(CYGPATH_W) 'ics/ics213.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213.Tpo ics/$(DEPDIR)/flmsg-ics213.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213.cxx' object='ics/flmsg-ics213.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213.obj `if test -f 'ics/ics213.cxx'; then $(CYGPATH_W) 'ics/ics213.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213.cxx'; fi` ics/flmsg-ics214.o: ics/ics214.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214.Tpo -c -o ics/flmsg-ics214.o `test -f 'ics/ics214.cxx' || echo '$(srcdir)/'`ics/ics214.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214.Tpo ics/$(DEPDIR)/flmsg-ics214.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214.cxx' object='ics/flmsg-ics214.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214.o `test -f 'ics/ics214.cxx' || echo '$(srcdir)/'`ics/ics214.cxx ics/flmsg-ics214.obj: ics/ics214.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214.Tpo -c -o ics/flmsg-ics214.obj `if test -f 'ics/ics214.cxx'; then $(CYGPATH_W) 'ics/ics214.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214.Tpo ics/$(DEPDIR)/flmsg-ics214.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214.cxx' object='ics/flmsg-ics214.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214.obj `if test -f 'ics/ics214.cxx'; then $(CYGPATH_W) 'ics/ics214.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214.cxx'; fi` ics/flmsg-ics216.o: ics/ics216.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216.Tpo -c -o ics/flmsg-ics216.o `test -f 'ics/ics216.cxx' || echo '$(srcdir)/'`ics/ics216.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216.Tpo ics/$(DEPDIR)/flmsg-ics216.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216.cxx' object='ics/flmsg-ics216.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216.o `test -f 'ics/ics216.cxx' || echo '$(srcdir)/'`ics/ics216.cxx ics/flmsg-ics216.obj: ics/ics216.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216.Tpo -c -o ics/flmsg-ics216.obj `if test -f 'ics/ics216.cxx'; then $(CYGPATH_W) 'ics/ics216.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216.Tpo ics/$(DEPDIR)/flmsg-ics216.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216.cxx' object='ics/flmsg-ics216.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216.obj `if test -f 'ics/ics216.cxx'; then $(CYGPATH_W) 'ics/ics216.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216.cxx'; fi` ics/flmsg-ics309.o: ics/ics309.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309.Tpo -c -o ics/flmsg-ics309.o `test -f 'ics/ics309.cxx' || echo '$(srcdir)/'`ics/ics309.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309.Tpo ics/$(DEPDIR)/flmsg-ics309.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309.cxx' object='ics/flmsg-ics309.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309.o `test -f 'ics/ics309.cxx' || echo '$(srcdir)/'`ics/ics309.cxx ics/flmsg-ics309.obj: ics/ics309.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309.Tpo -c -o ics/flmsg-ics309.obj `if test -f 'ics/ics309.cxx'; then $(CYGPATH_W) 'ics/ics309.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309.Tpo ics/$(DEPDIR)/flmsg-ics309.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309.cxx' object='ics/flmsg-ics309.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309.obj `if test -f 'ics/ics309.cxx'; then $(CYGPATH_W) 'ics/ics309.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309.cxx'; fi` ics/flmsg-ics_tab.o: ics/ics_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics_tab.Tpo -c -o ics/flmsg-ics_tab.o `test -f 'ics/ics_tab.cxx' || echo '$(srcdir)/'`ics/ics_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics_tab.Tpo ics/$(DEPDIR)/flmsg-ics_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics_tab.cxx' object='ics/flmsg-ics_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics_tab.o `test -f 'ics/ics_tab.cxx' || echo '$(srcdir)/'`ics/ics_tab.cxx ics/flmsg-ics_tab.obj: ics/ics_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics_tab.Tpo -c -o ics/flmsg-ics_tab.obj `if test -f 'ics/ics_tab.cxx'; then $(CYGPATH_W) 'ics/ics_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics_tab.Tpo ics/$(DEPDIR)/flmsg-ics_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics_tab.cxx' object='ics/flmsg-ics_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics_tab.obj `if test -f 'ics/ics_tab.cxx'; then $(CYGPATH_W) 'ics/ics_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics_tab.cxx'; fi` ics/flmsg-ics203_tab.o: ics/ics203_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203_tab.Tpo -c -o ics/flmsg-ics203_tab.o `test -f 'ics/ics203_tab.cxx' || echo '$(srcdir)/'`ics/ics203_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203_tab.Tpo ics/$(DEPDIR)/flmsg-ics203_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203_tab.cxx' object='ics/flmsg-ics203_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203_tab.o `test -f 'ics/ics203_tab.cxx' || echo '$(srcdir)/'`ics/ics203_tab.cxx ics/flmsg-ics203_tab.obj: ics/ics203_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203_tab.Tpo -c -o ics/flmsg-ics203_tab.obj `if test -f 'ics/ics203_tab.cxx'; then $(CYGPATH_W) 'ics/ics203_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203_tab.Tpo ics/$(DEPDIR)/flmsg-ics203_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203_tab.cxx' object='ics/flmsg-ics203_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203_tab.obj `if test -f 'ics/ics203_tab.cxx'; then $(CYGPATH_W) 'ics/ics203_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203_tab.cxx'; fi` ics/flmsg-ics205_tab.o: ics/ics205_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205_tab.Tpo -c -o ics/flmsg-ics205_tab.o `test -f 'ics/ics205_tab.cxx' || echo '$(srcdir)/'`ics/ics205_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205_tab.Tpo ics/$(DEPDIR)/flmsg-ics205_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205_tab.cxx' object='ics/flmsg-ics205_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205_tab.o `test -f 'ics/ics205_tab.cxx' || echo '$(srcdir)/'`ics/ics205_tab.cxx ics/flmsg-ics205_tab.obj: ics/ics205_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205_tab.Tpo -c -o ics/flmsg-ics205_tab.obj `if test -f 'ics/ics205_tab.cxx'; then $(CYGPATH_W) 'ics/ics205_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205_tab.Tpo ics/$(DEPDIR)/flmsg-ics205_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205_tab.cxx' object='ics/flmsg-ics205_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205_tab.obj `if test -f 'ics/ics205_tab.cxx'; then $(CYGPATH_W) 'ics/ics205_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205_tab.cxx'; fi` ics/flmsg-ics205a_tab.o: ics/ics205a_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a_tab.Tpo -c -o ics/flmsg-ics205a_tab.o `test -f 'ics/ics205a_tab.cxx' || echo '$(srcdir)/'`ics/ics205a_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a_tab.Tpo ics/$(DEPDIR)/flmsg-ics205a_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a_tab.cxx' object='ics/flmsg-ics205a_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a_tab.o `test -f 'ics/ics205a_tab.cxx' || echo '$(srcdir)/'`ics/ics205a_tab.cxx ics/flmsg-ics205a_tab.obj: ics/ics205a_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a_tab.Tpo -c -o ics/flmsg-ics205a_tab.obj `if test -f 'ics/ics205a_tab.cxx'; then $(CYGPATH_W) 'ics/ics205a_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a_tab.Tpo ics/$(DEPDIR)/flmsg-ics205a_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a_tab.cxx' object='ics/flmsg-ics205a_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a_tab.obj `if test -f 'ics/ics205a_tab.cxx'; then $(CYGPATH_W) 'ics/ics205a_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a_tab.cxx'; fi` ics/flmsg-ics206_tab.o: ics/ics206_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206_tab.Tpo -c -o ics/flmsg-ics206_tab.o `test -f 'ics/ics206_tab.cxx' || echo '$(srcdir)/'`ics/ics206_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206_tab.Tpo ics/$(DEPDIR)/flmsg-ics206_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206_tab.cxx' object='ics/flmsg-ics206_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206_tab.o `test -f 'ics/ics206_tab.cxx' || echo '$(srcdir)/'`ics/ics206_tab.cxx ics/flmsg-ics206_tab.obj: ics/ics206_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206_tab.Tpo -c -o ics/flmsg-ics206_tab.obj `if test -f 'ics/ics206_tab.cxx'; then $(CYGPATH_W) 'ics/ics206_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206_tab.Tpo ics/$(DEPDIR)/flmsg-ics206_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206_tab.cxx' object='ics/flmsg-ics206_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206_tab.obj `if test -f 'ics/ics206_tab.cxx'; then $(CYGPATH_W) 'ics/ics206_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206_tab.cxx'; fi` ics/flmsg-ics213_tab.o: ics/ics213_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213_tab.Tpo -c -o ics/flmsg-ics213_tab.o `test -f 'ics/ics213_tab.cxx' || echo '$(srcdir)/'`ics/ics213_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213_tab.Tpo ics/$(DEPDIR)/flmsg-ics213_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213_tab.cxx' object='ics/flmsg-ics213_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213_tab.o `test -f 'ics/ics213_tab.cxx' || echo '$(srcdir)/'`ics/ics213_tab.cxx ics/flmsg-ics213_tab.obj: ics/ics213_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213_tab.Tpo -c -o ics/flmsg-ics213_tab.obj `if test -f 'ics/ics213_tab.cxx'; then $(CYGPATH_W) 'ics/ics213_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213_tab.Tpo ics/$(DEPDIR)/flmsg-ics213_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213_tab.cxx' object='ics/flmsg-ics213_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213_tab.obj `if test -f 'ics/ics213_tab.cxx'; then $(CYGPATH_W) 'ics/ics213_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213_tab.cxx'; fi` ics/flmsg-ics214_tab.o: ics/ics214_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214_tab.Tpo -c -o ics/flmsg-ics214_tab.o `test -f 'ics/ics214_tab.cxx' || echo '$(srcdir)/'`ics/ics214_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214_tab.Tpo ics/$(DEPDIR)/flmsg-ics214_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214_tab.cxx' object='ics/flmsg-ics214_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214_tab.o `test -f 'ics/ics214_tab.cxx' || echo '$(srcdir)/'`ics/ics214_tab.cxx ics/flmsg-ics214_tab.obj: ics/ics214_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214_tab.Tpo -c -o ics/flmsg-ics214_tab.obj `if test -f 'ics/ics214_tab.cxx'; then $(CYGPATH_W) 'ics/ics214_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214_tab.Tpo ics/$(DEPDIR)/flmsg-ics214_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214_tab.cxx' object='ics/flmsg-ics214_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214_tab.obj `if test -f 'ics/ics214_tab.cxx'; then $(CYGPATH_W) 'ics/ics214_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214_tab.cxx'; fi` ics/flmsg-ics216_tab.o: ics/ics216_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216_tab.Tpo -c -o ics/flmsg-ics216_tab.o `test -f 'ics/ics216_tab.cxx' || echo '$(srcdir)/'`ics/ics216_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216_tab.Tpo ics/$(DEPDIR)/flmsg-ics216_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216_tab.cxx' object='ics/flmsg-ics216_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216_tab.o `test -f 'ics/ics216_tab.cxx' || echo '$(srcdir)/'`ics/ics216_tab.cxx ics/flmsg-ics216_tab.obj: ics/ics216_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216_tab.Tpo -c -o ics/flmsg-ics216_tab.obj `if test -f 'ics/ics216_tab.cxx'; then $(CYGPATH_W) 'ics/ics216_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216_tab.Tpo ics/$(DEPDIR)/flmsg-ics216_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216_tab.cxx' object='ics/flmsg-ics216_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216_tab.obj `if test -f 'ics/ics216_tab.cxx'; then $(CYGPATH_W) 'ics/ics216_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216_tab.cxx'; fi` ics/flmsg-ics309_tab.o: ics/ics309_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309_tab.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309_tab.Tpo -c -o ics/flmsg-ics309_tab.o `test -f 'ics/ics309_tab.cxx' || echo '$(srcdir)/'`ics/ics309_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309_tab.Tpo ics/$(DEPDIR)/flmsg-ics309_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309_tab.cxx' object='ics/flmsg-ics309_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309_tab.o `test -f 'ics/ics309_tab.cxx' || echo '$(srcdir)/'`ics/ics309_tab.cxx ics/flmsg-ics309_tab.obj: ics/ics309_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309_tab.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309_tab.Tpo -c -o ics/flmsg-ics309_tab.obj `if test -f 'ics/ics309_tab.cxx'; then $(CYGPATH_W) 'ics/ics309_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309_tab.Tpo ics/$(DEPDIR)/flmsg-ics309_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309_tab.cxx' object='ics/flmsg-ics309_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309_tab.obj `if test -f 'ics/ics309_tab.cxx'; then $(CYGPATH_W) 'ics/ics309_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309_tab.cxx'; fi` ics/flmsg-ics203_templates.o: ics/ics203_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203_templates.Tpo -c -o ics/flmsg-ics203_templates.o `test -f 'ics/ics203_templates.cxx' || echo '$(srcdir)/'`ics/ics203_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203_templates.Tpo ics/$(DEPDIR)/flmsg-ics203_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203_templates.cxx' object='ics/flmsg-ics203_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203_templates.o `test -f 'ics/ics203_templates.cxx' || echo '$(srcdir)/'`ics/ics203_templates.cxx ics/flmsg-ics203_templates.obj: ics/ics203_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics203_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics203_templates.Tpo -c -o ics/flmsg-ics203_templates.obj `if test -f 'ics/ics203_templates.cxx'; then $(CYGPATH_W) 'ics/ics203_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics203_templates.Tpo ics/$(DEPDIR)/flmsg-ics203_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics203_templates.cxx' object='ics/flmsg-ics203_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics203_templates.obj `if test -f 'ics/ics203_templates.cxx'; then $(CYGPATH_W) 'ics/ics203_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics203_templates.cxx'; fi` ics/flmsg-ics205_templates.o: ics/ics205_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205_templates.Tpo -c -o ics/flmsg-ics205_templates.o `test -f 'ics/ics205_templates.cxx' || echo '$(srcdir)/'`ics/ics205_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205_templates.Tpo ics/$(DEPDIR)/flmsg-ics205_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205_templates.cxx' object='ics/flmsg-ics205_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205_templates.o `test -f 'ics/ics205_templates.cxx' || echo '$(srcdir)/'`ics/ics205_templates.cxx ics/flmsg-ics205_templates.obj: ics/ics205_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205_templates.Tpo -c -o ics/flmsg-ics205_templates.obj `if test -f 'ics/ics205_templates.cxx'; then $(CYGPATH_W) 'ics/ics205_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205_templates.Tpo ics/$(DEPDIR)/flmsg-ics205_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205_templates.cxx' object='ics/flmsg-ics205_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205_templates.obj `if test -f 'ics/ics205_templates.cxx'; then $(CYGPATH_W) 'ics/ics205_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205_templates.cxx'; fi` ics/flmsg-ics205a_templates.o: ics/ics205a_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a_templates.Tpo -c -o ics/flmsg-ics205a_templates.o `test -f 'ics/ics205a_templates.cxx' || echo '$(srcdir)/'`ics/ics205a_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a_templates.Tpo ics/$(DEPDIR)/flmsg-ics205a_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a_templates.cxx' object='ics/flmsg-ics205a_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a_templates.o `test -f 'ics/ics205a_templates.cxx' || echo '$(srcdir)/'`ics/ics205a_templates.cxx ics/flmsg-ics205a_templates.obj: ics/ics205a_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics205a_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics205a_templates.Tpo -c -o ics/flmsg-ics205a_templates.obj `if test -f 'ics/ics205a_templates.cxx'; then $(CYGPATH_W) 'ics/ics205a_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics205a_templates.Tpo ics/$(DEPDIR)/flmsg-ics205a_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics205a_templates.cxx' object='ics/flmsg-ics205a_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics205a_templates.obj `if test -f 'ics/ics205a_templates.cxx'; then $(CYGPATH_W) 'ics/ics205a_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics205a_templates.cxx'; fi` ics/flmsg-ics206_templates.o: ics/ics206_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206_templates.Tpo -c -o ics/flmsg-ics206_templates.o `test -f 'ics/ics206_templates.cxx' || echo '$(srcdir)/'`ics/ics206_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206_templates.Tpo ics/$(DEPDIR)/flmsg-ics206_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206_templates.cxx' object='ics/flmsg-ics206_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206_templates.o `test -f 'ics/ics206_templates.cxx' || echo '$(srcdir)/'`ics/ics206_templates.cxx ics/flmsg-ics206_templates.obj: ics/ics206_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics206_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics206_templates.Tpo -c -o ics/flmsg-ics206_templates.obj `if test -f 'ics/ics206_templates.cxx'; then $(CYGPATH_W) 'ics/ics206_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics206_templates.Tpo ics/$(DEPDIR)/flmsg-ics206_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics206_templates.cxx' object='ics/flmsg-ics206_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics206_templates.obj `if test -f 'ics/ics206_templates.cxx'; then $(CYGPATH_W) 'ics/ics206_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics206_templates.cxx'; fi` ics/flmsg-ics213_templates.o: ics/ics213_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213_templates.Tpo -c -o ics/flmsg-ics213_templates.o `test -f 'ics/ics213_templates.cxx' || echo '$(srcdir)/'`ics/ics213_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213_templates.Tpo ics/$(DEPDIR)/flmsg-ics213_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213_templates.cxx' object='ics/flmsg-ics213_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213_templates.o `test -f 'ics/ics213_templates.cxx' || echo '$(srcdir)/'`ics/ics213_templates.cxx ics/flmsg-ics213_templates.obj: ics/ics213_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics213_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics213_templates.Tpo -c -o ics/flmsg-ics213_templates.obj `if test -f 'ics/ics213_templates.cxx'; then $(CYGPATH_W) 'ics/ics213_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics213_templates.Tpo ics/$(DEPDIR)/flmsg-ics213_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics213_templates.cxx' object='ics/flmsg-ics213_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics213_templates.obj `if test -f 'ics/ics213_templates.cxx'; then $(CYGPATH_W) 'ics/ics213_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics213_templates.cxx'; fi` ics/flmsg-ics214_templates.o: ics/ics214_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214_templates.Tpo -c -o ics/flmsg-ics214_templates.o `test -f 'ics/ics214_templates.cxx' || echo '$(srcdir)/'`ics/ics214_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214_templates.Tpo ics/$(DEPDIR)/flmsg-ics214_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214_templates.cxx' object='ics/flmsg-ics214_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214_templates.o `test -f 'ics/ics214_templates.cxx' || echo '$(srcdir)/'`ics/ics214_templates.cxx ics/flmsg-ics214_templates.obj: ics/ics214_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics214_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics214_templates.Tpo -c -o ics/flmsg-ics214_templates.obj `if test -f 'ics/ics214_templates.cxx'; then $(CYGPATH_W) 'ics/ics214_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics214_templates.Tpo ics/$(DEPDIR)/flmsg-ics214_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics214_templates.cxx' object='ics/flmsg-ics214_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics214_templates.obj `if test -f 'ics/ics214_templates.cxx'; then $(CYGPATH_W) 'ics/ics214_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics214_templates.cxx'; fi` ics/flmsg-ics216_templates.o: ics/ics216_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216_templates.Tpo -c -o ics/flmsg-ics216_templates.o `test -f 'ics/ics216_templates.cxx' || echo '$(srcdir)/'`ics/ics216_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216_templates.Tpo ics/$(DEPDIR)/flmsg-ics216_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216_templates.cxx' object='ics/flmsg-ics216_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216_templates.o `test -f 'ics/ics216_templates.cxx' || echo '$(srcdir)/'`ics/ics216_templates.cxx ics/flmsg-ics216_templates.obj: ics/ics216_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics216_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics216_templates.Tpo -c -o ics/flmsg-ics216_templates.obj `if test -f 'ics/ics216_templates.cxx'; then $(CYGPATH_W) 'ics/ics216_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics216_templates.Tpo ics/$(DEPDIR)/flmsg-ics216_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics216_templates.cxx' object='ics/flmsg-ics216_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics216_templates.obj `if test -f 'ics/ics216_templates.cxx'; then $(CYGPATH_W) 'ics/ics216_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics216_templates.cxx'; fi` ics/flmsg-ics309_templates.o: ics/ics309_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309_templates.o -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309_templates.Tpo -c -o ics/flmsg-ics309_templates.o `test -f 'ics/ics309_templates.cxx' || echo '$(srcdir)/'`ics/ics309_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309_templates.Tpo ics/$(DEPDIR)/flmsg-ics309_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309_templates.cxx' object='ics/flmsg-ics309_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309_templates.o `test -f 'ics/ics309_templates.cxx' || echo '$(srcdir)/'`ics/ics309_templates.cxx ics/flmsg-ics309_templates.obj: ics/ics309_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT ics/flmsg-ics309_templates.obj -MD -MP -MF ics/$(DEPDIR)/flmsg-ics309_templates.Tpo -c -o ics/flmsg-ics309_templates.obj `if test -f 'ics/ics309_templates.cxx'; then $(CYGPATH_W) 'ics/ics309_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) ics/$(DEPDIR)/flmsg-ics309_templates.Tpo ics/$(DEPDIR)/flmsg-ics309_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ics/ics309_templates.cxx' object='ics/flmsg-ics309_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o ics/flmsg-ics309_templates.obj `if test -f 'ics/ics309_templates.cxx'; then $(CYGPATH_W) 'ics/ics309_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/ics/ics309_templates.cxx'; fi` hics/flmsg-hics_tab.o: hics/hics_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics_tab.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics_tab.Tpo -c -o hics/flmsg-hics_tab.o `test -f 'hics/hics_tab.cxx' || echo '$(srcdir)/'`hics/hics_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics_tab.Tpo hics/$(DEPDIR)/flmsg-hics_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics_tab.cxx' object='hics/flmsg-hics_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics_tab.o `test -f 'hics/hics_tab.cxx' || echo '$(srcdir)/'`hics/hics_tab.cxx hics/flmsg-hics_tab.obj: hics/hics_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics_tab.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics_tab.Tpo -c -o hics/flmsg-hics_tab.obj `if test -f 'hics/hics_tab.cxx'; then $(CYGPATH_W) 'hics/hics_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics_tab.Tpo hics/$(DEPDIR)/flmsg-hics_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics_tab.cxx' object='hics/flmsg-hics_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics_tab.obj `if test -f 'hics/hics_tab.cxx'; then $(CYGPATH_W) 'hics/hics_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics_tab.cxx'; fi` hics/flmsg-hics203.o: hics/hics203.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203.Tpo -c -o hics/flmsg-hics203.o `test -f 'hics/hics203.cxx' || echo '$(srcdir)/'`hics/hics203.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203.Tpo hics/$(DEPDIR)/flmsg-hics203.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203.cxx' object='hics/flmsg-hics203.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203.o `test -f 'hics/hics203.cxx' || echo '$(srcdir)/'`hics/hics203.cxx hics/flmsg-hics203.obj: hics/hics203.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203.Tpo -c -o hics/flmsg-hics203.obj `if test -f 'hics/hics203.cxx'; then $(CYGPATH_W) 'hics/hics203.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203.Tpo hics/$(DEPDIR)/flmsg-hics203.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203.cxx' object='hics/flmsg-hics203.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203.obj `if test -f 'hics/hics203.cxx'; then $(CYGPATH_W) 'hics/hics203.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203.cxx'; fi` hics/flmsg-hics203_tab.o: hics/hics203_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203_tab.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203_tab.Tpo -c -o hics/flmsg-hics203_tab.o `test -f 'hics/hics203_tab.cxx' || echo '$(srcdir)/'`hics/hics203_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203_tab.Tpo hics/$(DEPDIR)/flmsg-hics203_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203_tab.cxx' object='hics/flmsg-hics203_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203_tab.o `test -f 'hics/hics203_tab.cxx' || echo '$(srcdir)/'`hics/hics203_tab.cxx hics/flmsg-hics203_tab.obj: hics/hics203_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203_tab.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203_tab.Tpo -c -o hics/flmsg-hics203_tab.obj `if test -f 'hics/hics203_tab.cxx'; then $(CYGPATH_W) 'hics/hics203_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203_tab.Tpo hics/$(DEPDIR)/flmsg-hics203_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203_tab.cxx' object='hics/flmsg-hics203_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203_tab.obj `if test -f 'hics/hics203_tab.cxx'; then $(CYGPATH_W) 'hics/hics203_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203_tab.cxx'; fi` hics/flmsg-hics203_templates.o: hics/hics203_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203_templates.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203_templates.Tpo -c -o hics/flmsg-hics203_templates.o `test -f 'hics/hics203_templates.cxx' || echo '$(srcdir)/'`hics/hics203_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203_templates.Tpo hics/$(DEPDIR)/flmsg-hics203_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203_templates.cxx' object='hics/flmsg-hics203_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203_templates.o `test -f 'hics/hics203_templates.cxx' || echo '$(srcdir)/'`hics/hics203_templates.cxx hics/flmsg-hics203_templates.obj: hics/hics203_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics203_templates.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics203_templates.Tpo -c -o hics/flmsg-hics203_templates.obj `if test -f 'hics/hics203_templates.cxx'; then $(CYGPATH_W) 'hics/hics203_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics203_templates.Tpo hics/$(DEPDIR)/flmsg-hics203_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics203_templates.cxx' object='hics/flmsg-hics203_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics203_templates.obj `if test -f 'hics/hics203_templates.cxx'; then $(CYGPATH_W) 'hics/hics203_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics203_templates.cxx'; fi` hics/flmsg-hics206.o: hics/hics206.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206.Tpo -c -o hics/flmsg-hics206.o `test -f 'hics/hics206.cxx' || echo '$(srcdir)/'`hics/hics206.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206.Tpo hics/$(DEPDIR)/flmsg-hics206.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206.cxx' object='hics/flmsg-hics206.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206.o `test -f 'hics/hics206.cxx' || echo '$(srcdir)/'`hics/hics206.cxx hics/flmsg-hics206.obj: hics/hics206.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206.Tpo -c -o hics/flmsg-hics206.obj `if test -f 'hics/hics206.cxx'; then $(CYGPATH_W) 'hics/hics206.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206.Tpo hics/$(DEPDIR)/flmsg-hics206.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206.cxx' object='hics/flmsg-hics206.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206.obj `if test -f 'hics/hics206.cxx'; then $(CYGPATH_W) 'hics/hics206.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206.cxx'; fi` hics/flmsg-hics206_tab.o: hics/hics206_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206_tab.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206_tab.Tpo -c -o hics/flmsg-hics206_tab.o `test -f 'hics/hics206_tab.cxx' || echo '$(srcdir)/'`hics/hics206_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206_tab.Tpo hics/$(DEPDIR)/flmsg-hics206_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206_tab.cxx' object='hics/flmsg-hics206_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206_tab.o `test -f 'hics/hics206_tab.cxx' || echo '$(srcdir)/'`hics/hics206_tab.cxx hics/flmsg-hics206_tab.obj: hics/hics206_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206_tab.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206_tab.Tpo -c -o hics/flmsg-hics206_tab.obj `if test -f 'hics/hics206_tab.cxx'; then $(CYGPATH_W) 'hics/hics206_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206_tab.Tpo hics/$(DEPDIR)/flmsg-hics206_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206_tab.cxx' object='hics/flmsg-hics206_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206_tab.obj `if test -f 'hics/hics206_tab.cxx'; then $(CYGPATH_W) 'hics/hics206_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206_tab.cxx'; fi` hics/flmsg-hics206_templates.o: hics/hics206_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206_templates.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206_templates.Tpo -c -o hics/flmsg-hics206_templates.o `test -f 'hics/hics206_templates.cxx' || echo '$(srcdir)/'`hics/hics206_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206_templates.Tpo hics/$(DEPDIR)/flmsg-hics206_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206_templates.cxx' object='hics/flmsg-hics206_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206_templates.o `test -f 'hics/hics206_templates.cxx' || echo '$(srcdir)/'`hics/hics206_templates.cxx hics/flmsg-hics206_templates.obj: hics/hics206_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics206_templates.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics206_templates.Tpo -c -o hics/flmsg-hics206_templates.obj `if test -f 'hics/hics206_templates.cxx'; then $(CYGPATH_W) 'hics/hics206_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics206_templates.Tpo hics/$(DEPDIR)/flmsg-hics206_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics206_templates.cxx' object='hics/flmsg-hics206_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics206_templates.obj `if test -f 'hics/hics206_templates.cxx'; then $(CYGPATH_W) 'hics/hics206_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics206_templates.cxx'; fi` hics/flmsg-hics213.o: hics/hics213.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213.Tpo -c -o hics/flmsg-hics213.o `test -f 'hics/hics213.cxx' || echo '$(srcdir)/'`hics/hics213.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213.Tpo hics/$(DEPDIR)/flmsg-hics213.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213.cxx' object='hics/flmsg-hics213.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213.o `test -f 'hics/hics213.cxx' || echo '$(srcdir)/'`hics/hics213.cxx hics/flmsg-hics213.obj: hics/hics213.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213.Tpo -c -o hics/flmsg-hics213.obj `if test -f 'hics/hics213.cxx'; then $(CYGPATH_W) 'hics/hics213.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213.Tpo hics/$(DEPDIR)/flmsg-hics213.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213.cxx' object='hics/flmsg-hics213.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213.obj `if test -f 'hics/hics213.cxx'; then $(CYGPATH_W) 'hics/hics213.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213.cxx'; fi` hics/flmsg-hics213_tab.o: hics/hics213_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213_tab.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213_tab.Tpo -c -o hics/flmsg-hics213_tab.o `test -f 'hics/hics213_tab.cxx' || echo '$(srcdir)/'`hics/hics213_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213_tab.Tpo hics/$(DEPDIR)/flmsg-hics213_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213_tab.cxx' object='hics/flmsg-hics213_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213_tab.o `test -f 'hics/hics213_tab.cxx' || echo '$(srcdir)/'`hics/hics213_tab.cxx hics/flmsg-hics213_tab.obj: hics/hics213_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213_tab.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213_tab.Tpo -c -o hics/flmsg-hics213_tab.obj `if test -f 'hics/hics213_tab.cxx'; then $(CYGPATH_W) 'hics/hics213_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213_tab.Tpo hics/$(DEPDIR)/flmsg-hics213_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213_tab.cxx' object='hics/flmsg-hics213_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213_tab.obj `if test -f 'hics/hics213_tab.cxx'; then $(CYGPATH_W) 'hics/hics213_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213_tab.cxx'; fi` hics/flmsg-hics213_templates.o: hics/hics213_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213_templates.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213_templates.Tpo -c -o hics/flmsg-hics213_templates.o `test -f 'hics/hics213_templates.cxx' || echo '$(srcdir)/'`hics/hics213_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213_templates.Tpo hics/$(DEPDIR)/flmsg-hics213_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213_templates.cxx' object='hics/flmsg-hics213_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213_templates.o `test -f 'hics/hics213_templates.cxx' || echo '$(srcdir)/'`hics/hics213_templates.cxx hics/flmsg-hics213_templates.obj: hics/hics213_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics213_templates.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics213_templates.Tpo -c -o hics/flmsg-hics213_templates.obj `if test -f 'hics/hics213_templates.cxx'; then $(CYGPATH_W) 'hics/hics213_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics213_templates.Tpo hics/$(DEPDIR)/flmsg-hics213_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics213_templates.cxx' object='hics/flmsg-hics213_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics213_templates.obj `if test -f 'hics/hics213_templates.cxx'; then $(CYGPATH_W) 'hics/hics213_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics213_templates.cxx'; fi` hics/flmsg-hics214.o: hics/hics214.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214.Tpo -c -o hics/flmsg-hics214.o `test -f 'hics/hics214.cxx' || echo '$(srcdir)/'`hics/hics214.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214.Tpo hics/$(DEPDIR)/flmsg-hics214.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214.cxx' object='hics/flmsg-hics214.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214.o `test -f 'hics/hics214.cxx' || echo '$(srcdir)/'`hics/hics214.cxx hics/flmsg-hics214.obj: hics/hics214.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214.Tpo -c -o hics/flmsg-hics214.obj `if test -f 'hics/hics214.cxx'; then $(CYGPATH_W) 'hics/hics214.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214.Tpo hics/$(DEPDIR)/flmsg-hics214.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214.cxx' object='hics/flmsg-hics214.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214.obj `if test -f 'hics/hics214.cxx'; then $(CYGPATH_W) 'hics/hics214.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214.cxx'; fi` hics/flmsg-hics214_tab.o: hics/hics214_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214_tab.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214_tab.Tpo -c -o hics/flmsg-hics214_tab.o `test -f 'hics/hics214_tab.cxx' || echo '$(srcdir)/'`hics/hics214_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214_tab.Tpo hics/$(DEPDIR)/flmsg-hics214_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214_tab.cxx' object='hics/flmsg-hics214_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214_tab.o `test -f 'hics/hics214_tab.cxx' || echo '$(srcdir)/'`hics/hics214_tab.cxx hics/flmsg-hics214_tab.obj: hics/hics214_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214_tab.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214_tab.Tpo -c -o hics/flmsg-hics214_tab.obj `if test -f 'hics/hics214_tab.cxx'; then $(CYGPATH_W) 'hics/hics214_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214_tab.Tpo hics/$(DEPDIR)/flmsg-hics214_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214_tab.cxx' object='hics/flmsg-hics214_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214_tab.obj `if test -f 'hics/hics214_tab.cxx'; then $(CYGPATH_W) 'hics/hics214_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214_tab.cxx'; fi` hics/flmsg-hics214_templates.o: hics/hics214_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214_templates.o -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214_templates.Tpo -c -o hics/flmsg-hics214_templates.o `test -f 'hics/hics214_templates.cxx' || echo '$(srcdir)/'`hics/hics214_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214_templates.Tpo hics/$(DEPDIR)/flmsg-hics214_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214_templates.cxx' object='hics/flmsg-hics214_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214_templates.o `test -f 'hics/hics214_templates.cxx' || echo '$(srcdir)/'`hics/hics214_templates.cxx hics/flmsg-hics214_templates.obj: hics/hics214_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT hics/flmsg-hics214_templates.obj -MD -MP -MF hics/$(DEPDIR)/flmsg-hics214_templates.Tpo -c -o hics/flmsg-hics214_templates.obj `if test -f 'hics/hics214_templates.cxx'; then $(CYGPATH_W) 'hics/hics214_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) hics/$(DEPDIR)/flmsg-hics214_templates.Tpo hics/$(DEPDIR)/flmsg-hics214_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='hics/hics214_templates.cxx' object='hics/flmsg-hics214_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o hics/flmsg-hics214_templates.obj `if test -f 'hics/hics214_templates.cxx'; then $(CYGPATH_W) 'hics/hics214_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/hics/hics214_templates.cxx'; fi` mars/flmsg-mars_tab.o: mars/mars_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_tab.Tpo -c -o mars/flmsg-mars_tab.o `test -f 'mars/mars_tab.cxx' || echo '$(srcdir)/'`mars/mars_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_tab.Tpo mars/$(DEPDIR)/flmsg-mars_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_tab.cxx' object='mars/flmsg-mars_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_tab.o `test -f 'mars/mars_tab.cxx' || echo '$(srcdir)/'`mars/mars_tab.cxx mars/flmsg-mars_tab.obj: mars/mars_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_tab.Tpo -c -o mars/flmsg-mars_tab.obj `if test -f 'mars/mars_tab.cxx'; then $(CYGPATH_W) 'mars/mars_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_tab.Tpo mars/$(DEPDIR)/flmsg-mars_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_tab.cxx' object='mars/flmsg-mars_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_tab.obj `if test -f 'mars/mars_tab.cxx'; then $(CYGPATH_W) 'mars/mars_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_tab.cxx'; fi` mars/flmsg-mars_daily.o: mars/mars_daily.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_daily.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_daily.Tpo -c -o mars/flmsg-mars_daily.o `test -f 'mars/mars_daily.cxx' || echo '$(srcdir)/'`mars/mars_daily.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_daily.Tpo mars/$(DEPDIR)/flmsg-mars_daily.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_daily.cxx' object='mars/flmsg-mars_daily.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_daily.o `test -f 'mars/mars_daily.cxx' || echo '$(srcdir)/'`mars/mars_daily.cxx mars/flmsg-mars_daily.obj: mars/mars_daily.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_daily.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_daily.Tpo -c -o mars/flmsg-mars_daily.obj `if test -f 'mars/mars_daily.cxx'; then $(CYGPATH_W) 'mars/mars_daily.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_daily.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_daily.Tpo mars/$(DEPDIR)/flmsg-mars_daily.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_daily.cxx' object='mars/flmsg-mars_daily.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_daily.obj `if test -f 'mars/mars_daily.cxx'; then $(CYGPATH_W) 'mars/mars_daily.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_daily.cxx'; fi` mars/flmsg-mars_ineei.o: mars/mars_ineei.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_ineei.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_ineei.Tpo -c -o mars/flmsg-mars_ineei.o `test -f 'mars/mars_ineei.cxx' || echo '$(srcdir)/'`mars/mars_ineei.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_ineei.Tpo mars/$(DEPDIR)/flmsg-mars_ineei.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_ineei.cxx' object='mars/flmsg-mars_ineei.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_ineei.o `test -f 'mars/mars_ineei.cxx' || echo '$(srcdir)/'`mars/mars_ineei.cxx mars/flmsg-mars_ineei.obj: mars/mars_ineei.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_ineei.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_ineei.Tpo -c -o mars/flmsg-mars_ineei.obj `if test -f 'mars/mars_ineei.cxx'; then $(CYGPATH_W) 'mars/mars_ineei.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_ineei.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_ineei.Tpo mars/$(DEPDIR)/flmsg-mars_ineei.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_ineei.cxx' object='mars/flmsg-mars_ineei.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_ineei.obj `if test -f 'mars/mars_ineei.cxx'; then $(CYGPATH_W) 'mars/mars_ineei.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_ineei.cxx'; fi` mars/flmsg-mars_net.o: mars/mars_net.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_net.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_net.Tpo -c -o mars/flmsg-mars_net.o `test -f 'mars/mars_net.cxx' || echo '$(srcdir)/'`mars/mars_net.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_net.Tpo mars/$(DEPDIR)/flmsg-mars_net.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_net.cxx' object='mars/flmsg-mars_net.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_net.o `test -f 'mars/mars_net.cxx' || echo '$(srcdir)/'`mars/mars_net.cxx mars/flmsg-mars_net.obj: mars/mars_net.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_net.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_net.Tpo -c -o mars/flmsg-mars_net.obj `if test -f 'mars/mars_net.cxx'; then $(CYGPATH_W) 'mars/mars_net.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_net.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_net.Tpo mars/$(DEPDIR)/flmsg-mars_net.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_net.cxx' object='mars/flmsg-mars_net.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_net.obj `if test -f 'mars/mars_net.cxx'; then $(CYGPATH_W) 'mars/mars_net.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_net.cxx'; fi` mars/flmsg-mars_daily_tab.o: mars/mars_daily_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_daily_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_daily_tab.Tpo -c -o mars/flmsg-mars_daily_tab.o `test -f 'mars/mars_daily_tab.cxx' || echo '$(srcdir)/'`mars/mars_daily_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_daily_tab.Tpo mars/$(DEPDIR)/flmsg-mars_daily_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_daily_tab.cxx' object='mars/flmsg-mars_daily_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_daily_tab.o `test -f 'mars/mars_daily_tab.cxx' || echo '$(srcdir)/'`mars/mars_daily_tab.cxx mars/flmsg-mars_daily_tab.obj: mars/mars_daily_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_daily_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_daily_tab.Tpo -c -o mars/flmsg-mars_daily_tab.obj `if test -f 'mars/mars_daily_tab.cxx'; then $(CYGPATH_W) 'mars/mars_daily_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_daily_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_daily_tab.Tpo mars/$(DEPDIR)/flmsg-mars_daily_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_daily_tab.cxx' object='mars/flmsg-mars_daily_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_daily_tab.obj `if test -f 'mars/mars_daily_tab.cxx'; then $(CYGPATH_W) 'mars/mars_daily_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_daily_tab.cxx'; fi` mars/flmsg-mars_ineei_tab.o: mars/mars_ineei_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_ineei_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_ineei_tab.Tpo -c -o mars/flmsg-mars_ineei_tab.o `test -f 'mars/mars_ineei_tab.cxx' || echo '$(srcdir)/'`mars/mars_ineei_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_ineei_tab.Tpo mars/$(DEPDIR)/flmsg-mars_ineei_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_ineei_tab.cxx' object='mars/flmsg-mars_ineei_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_ineei_tab.o `test -f 'mars/mars_ineei_tab.cxx' || echo '$(srcdir)/'`mars/mars_ineei_tab.cxx mars/flmsg-mars_ineei_tab.obj: mars/mars_ineei_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_ineei_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_ineei_tab.Tpo -c -o mars/flmsg-mars_ineei_tab.obj `if test -f 'mars/mars_ineei_tab.cxx'; then $(CYGPATH_W) 'mars/mars_ineei_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_ineei_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_ineei_tab.Tpo mars/$(DEPDIR)/flmsg-mars_ineei_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_ineei_tab.cxx' object='mars/flmsg-mars_ineei_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_ineei_tab.obj `if test -f 'mars/mars_ineei_tab.cxx'; then $(CYGPATH_W) 'mars/mars_ineei_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_ineei_tab.cxx'; fi` mars/flmsg-mars_net_tab.o: mars/mars_net_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_net_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_net_tab.Tpo -c -o mars/flmsg-mars_net_tab.o `test -f 'mars/mars_net_tab.cxx' || echo '$(srcdir)/'`mars/mars_net_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_net_tab.Tpo mars/$(DEPDIR)/flmsg-mars_net_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_net_tab.cxx' object='mars/flmsg-mars_net_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_net_tab.o `test -f 'mars/mars_net_tab.cxx' || echo '$(srcdir)/'`mars/mars_net_tab.cxx mars/flmsg-mars_net_tab.obj: mars/mars_net_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_net_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_net_tab.Tpo -c -o mars/flmsg-mars_net_tab.obj `if test -f 'mars/mars_net_tab.cxx'; then $(CYGPATH_W) 'mars/mars_net_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_net_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_net_tab.Tpo mars/$(DEPDIR)/flmsg-mars_net_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_net_tab.cxx' object='mars/flmsg-mars_net_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_net_tab.obj `if test -f 'mars/mars_net_tab.cxx'; then $(CYGPATH_W) 'mars/mars_net_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_net_tab.cxx'; fi` mars/flmsg-mars_army.o: mars/mars_army.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_army.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_army.Tpo -c -o mars/flmsg-mars_army.o `test -f 'mars/mars_army.cxx' || echo '$(srcdir)/'`mars/mars_army.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_army.Tpo mars/$(DEPDIR)/flmsg-mars_army.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_army.cxx' object='mars/flmsg-mars_army.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_army.o `test -f 'mars/mars_army.cxx' || echo '$(srcdir)/'`mars/mars_army.cxx mars/flmsg-mars_army.obj: mars/mars_army.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_army.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_army.Tpo -c -o mars/flmsg-mars_army.obj `if test -f 'mars/mars_army.cxx'; then $(CYGPATH_W) 'mars/mars_army.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_army.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_army.Tpo mars/$(DEPDIR)/flmsg-mars_army.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_army.cxx' object='mars/flmsg-mars_army.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_army.obj `if test -f 'mars/mars_army.cxx'; then $(CYGPATH_W) 'mars/mars_army.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_army.cxx'; fi` mars/flmsg-mars_army_tab.o: mars/mars_army_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_army_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_army_tab.Tpo -c -o mars/flmsg-mars_army_tab.o `test -f 'mars/mars_army_tab.cxx' || echo '$(srcdir)/'`mars/mars_army_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_army_tab.Tpo mars/$(DEPDIR)/flmsg-mars_army_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_army_tab.cxx' object='mars/flmsg-mars_army_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_army_tab.o `test -f 'mars/mars_army_tab.cxx' || echo '$(srcdir)/'`mars/mars_army_tab.cxx mars/flmsg-mars_army_tab.obj: mars/mars_army_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_army_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_army_tab.Tpo -c -o mars/flmsg-mars_army_tab.obj `if test -f 'mars/mars_army_tab.cxx'; then $(CYGPATH_W) 'mars/mars_army_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_army_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_army_tab.Tpo mars/$(DEPDIR)/flmsg-mars_army_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_army_tab.cxx' object='mars/flmsg-mars_army_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_army_tab.obj `if test -f 'mars/mars_army_tab.cxx'; then $(CYGPATH_W) 'mars/mars_army_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_army_tab.cxx'; fi` mars/flmsg-mars_navy.o: mars/mars_navy.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_navy.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_navy.Tpo -c -o mars/flmsg-mars_navy.o `test -f 'mars/mars_navy.cxx' || echo '$(srcdir)/'`mars/mars_navy.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_navy.Tpo mars/$(DEPDIR)/flmsg-mars_navy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_navy.cxx' object='mars/flmsg-mars_navy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_navy.o `test -f 'mars/mars_navy.cxx' || echo '$(srcdir)/'`mars/mars_navy.cxx mars/flmsg-mars_navy.obj: mars/mars_navy.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_navy.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_navy.Tpo -c -o mars/flmsg-mars_navy.obj `if test -f 'mars/mars_navy.cxx'; then $(CYGPATH_W) 'mars/mars_navy.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_navy.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_navy.Tpo mars/$(DEPDIR)/flmsg-mars_navy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_navy.cxx' object='mars/flmsg-mars_navy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_navy.obj `if test -f 'mars/mars_navy.cxx'; then $(CYGPATH_W) 'mars/mars_navy.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_navy.cxx'; fi` mars/flmsg-navy_mars_tab.o: mars/navy_mars_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-navy_mars_tab.o -MD -MP -MF mars/$(DEPDIR)/flmsg-navy_mars_tab.Tpo -c -o mars/flmsg-navy_mars_tab.o `test -f 'mars/navy_mars_tab.cxx' || echo '$(srcdir)/'`mars/navy_mars_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-navy_mars_tab.Tpo mars/$(DEPDIR)/flmsg-navy_mars_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/navy_mars_tab.cxx' object='mars/flmsg-navy_mars_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-navy_mars_tab.o `test -f 'mars/navy_mars_tab.cxx' || echo '$(srcdir)/'`mars/navy_mars_tab.cxx mars/flmsg-navy_mars_tab.obj: mars/navy_mars_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-navy_mars_tab.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-navy_mars_tab.Tpo -c -o mars/flmsg-navy_mars_tab.obj `if test -f 'mars/navy_mars_tab.cxx'; then $(CYGPATH_W) 'mars/navy_mars_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/navy_mars_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-navy_mars_tab.Tpo mars/$(DEPDIR)/flmsg-navy_mars_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/navy_mars_tab.cxx' object='mars/flmsg-navy_mars_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-navy_mars_tab.obj `if test -f 'mars/navy_mars_tab.cxx'; then $(CYGPATH_W) 'mars/navy_mars_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/navy_mars_tab.cxx'; fi` mars/flmsg-mars_templates.o: mars/mars_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_templates.o -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_templates.Tpo -c -o mars/flmsg-mars_templates.o `test -f 'mars/mars_templates.cxx' || echo '$(srcdir)/'`mars/mars_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_templates.Tpo mars/$(DEPDIR)/flmsg-mars_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_templates.cxx' object='mars/flmsg-mars_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_templates.o `test -f 'mars/mars_templates.cxx' || echo '$(srcdir)/'`mars/mars_templates.cxx mars/flmsg-mars_templates.obj: mars/mars_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT mars/flmsg-mars_templates.obj -MD -MP -MF mars/$(DEPDIR)/flmsg-mars_templates.Tpo -c -o mars/flmsg-mars_templates.obj `if test -f 'mars/mars_templates.cxx'; then $(CYGPATH_W) 'mars/mars_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) mars/$(DEPDIR)/flmsg-mars_templates.Tpo mars/$(DEPDIR)/flmsg-mars_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mars/mars_templates.cxx' object='mars/flmsg-mars_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o mars/flmsg-mars_templates.obj `if test -f 'mars/mars_templates.cxx'; then $(CYGPATH_W) 'mars/mars_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/mars/mars_templates.cxx'; fi` plaintext/flmsg-plaintext.o: plaintext/plaintext.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext.o -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext.Tpo -c -o plaintext/flmsg-plaintext.o `test -f 'plaintext/plaintext.cxx' || echo '$(srcdir)/'`plaintext/plaintext.cxx @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext.Tpo plaintext/$(DEPDIR)/flmsg-plaintext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext.cxx' object='plaintext/flmsg-plaintext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext.o `test -f 'plaintext/plaintext.cxx' || echo '$(srcdir)/'`plaintext/plaintext.cxx plaintext/flmsg-plaintext.obj: plaintext/plaintext.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext.obj -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext.Tpo -c -o plaintext/flmsg-plaintext.obj `if test -f 'plaintext/plaintext.cxx'; then $(CYGPATH_W) 'plaintext/plaintext.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext.Tpo plaintext/$(DEPDIR)/flmsg-plaintext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext.cxx' object='plaintext/flmsg-plaintext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext.obj `if test -f 'plaintext/plaintext.cxx'; then $(CYGPATH_W) 'plaintext/plaintext.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext.cxx'; fi` plaintext/flmsg-plaintext_tab.o: plaintext/plaintext_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext_tab.o -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext_tab.Tpo -c -o plaintext/flmsg-plaintext_tab.o `test -f 'plaintext/plaintext_tab.cxx' || echo '$(srcdir)/'`plaintext/plaintext_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext_tab.Tpo plaintext/$(DEPDIR)/flmsg-plaintext_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext_tab.cxx' object='plaintext/flmsg-plaintext_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext_tab.o `test -f 'plaintext/plaintext_tab.cxx' || echo '$(srcdir)/'`plaintext/plaintext_tab.cxx plaintext/flmsg-plaintext_tab.obj: plaintext/plaintext_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext_tab.obj -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext_tab.Tpo -c -o plaintext/flmsg-plaintext_tab.obj `if test -f 'plaintext/plaintext_tab.cxx'; then $(CYGPATH_W) 'plaintext/plaintext_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext_tab.Tpo plaintext/$(DEPDIR)/flmsg-plaintext_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext_tab.cxx' object='plaintext/flmsg-plaintext_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext_tab.obj `if test -f 'plaintext/plaintext_tab.cxx'; then $(CYGPATH_W) 'plaintext/plaintext_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext_tab.cxx'; fi` plaintext/flmsg-plaintext_templates.o: plaintext/plaintext_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext_templates.o -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext_templates.Tpo -c -o plaintext/flmsg-plaintext_templates.o `test -f 'plaintext/plaintext_templates.cxx' || echo '$(srcdir)/'`plaintext/plaintext_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext_templates.Tpo plaintext/$(DEPDIR)/flmsg-plaintext_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext_templates.cxx' object='plaintext/flmsg-plaintext_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext_templates.o `test -f 'plaintext/plaintext_templates.cxx' || echo '$(srcdir)/'`plaintext/plaintext_templates.cxx plaintext/flmsg-plaintext_templates.obj: plaintext/plaintext_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT plaintext/flmsg-plaintext_templates.obj -MD -MP -MF plaintext/$(DEPDIR)/flmsg-plaintext_templates.Tpo -c -o plaintext/flmsg-plaintext_templates.obj `if test -f 'plaintext/plaintext_templates.cxx'; then $(CYGPATH_W) 'plaintext/plaintext_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) plaintext/$(DEPDIR)/flmsg-plaintext_templates.Tpo plaintext/$(DEPDIR)/flmsg-plaintext_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='plaintext/plaintext_templates.cxx' object='plaintext/flmsg-plaintext_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o plaintext/flmsg-plaintext_templates.obj `if test -f 'plaintext/plaintext_templates.cxx'; then $(CYGPATH_W) 'plaintext/plaintext_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/plaintext/plaintext_templates.cxx'; fi` radiogram/flmsg-arl_msgs.o: radiogram/arl_msgs.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-arl_msgs.o -MD -MP -MF radiogram/$(DEPDIR)/flmsg-arl_msgs.Tpo -c -o radiogram/flmsg-arl_msgs.o `test -f 'radiogram/arl_msgs.cxx' || echo '$(srcdir)/'`radiogram/arl_msgs.cxx @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-arl_msgs.Tpo radiogram/$(DEPDIR)/flmsg-arl_msgs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/arl_msgs.cxx' object='radiogram/flmsg-arl_msgs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-arl_msgs.o `test -f 'radiogram/arl_msgs.cxx' || echo '$(srcdir)/'`radiogram/arl_msgs.cxx radiogram/flmsg-arl_msgs.obj: radiogram/arl_msgs.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-arl_msgs.obj -MD -MP -MF radiogram/$(DEPDIR)/flmsg-arl_msgs.Tpo -c -o radiogram/flmsg-arl_msgs.obj `if test -f 'radiogram/arl_msgs.cxx'; then $(CYGPATH_W) 'radiogram/arl_msgs.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/arl_msgs.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-arl_msgs.Tpo radiogram/$(DEPDIR)/flmsg-arl_msgs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/arl_msgs.cxx' object='radiogram/flmsg-arl_msgs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-arl_msgs.obj `if test -f 'radiogram/arl_msgs.cxx'; then $(CYGPATH_W) 'radiogram/arl_msgs.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/arl_msgs.cxx'; fi` radiogram/flmsg-hx_msgs.o: radiogram/hx_msgs.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-hx_msgs.o -MD -MP -MF radiogram/$(DEPDIR)/flmsg-hx_msgs.Tpo -c -o radiogram/flmsg-hx_msgs.o `test -f 'radiogram/hx_msgs.cxx' || echo '$(srcdir)/'`radiogram/hx_msgs.cxx @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-hx_msgs.Tpo radiogram/$(DEPDIR)/flmsg-hx_msgs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/hx_msgs.cxx' object='radiogram/flmsg-hx_msgs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-hx_msgs.o `test -f 'radiogram/hx_msgs.cxx' || echo '$(srcdir)/'`radiogram/hx_msgs.cxx radiogram/flmsg-hx_msgs.obj: radiogram/hx_msgs.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-hx_msgs.obj -MD -MP -MF radiogram/$(DEPDIR)/flmsg-hx_msgs.Tpo -c -o radiogram/flmsg-hx_msgs.obj `if test -f 'radiogram/hx_msgs.cxx'; then $(CYGPATH_W) 'radiogram/hx_msgs.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/hx_msgs.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-hx_msgs.Tpo radiogram/$(DEPDIR)/flmsg-hx_msgs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/hx_msgs.cxx' object='radiogram/flmsg-hx_msgs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-hx_msgs.obj `if test -f 'radiogram/hx_msgs.cxx'; then $(CYGPATH_W) 'radiogram/hx_msgs.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/hx_msgs.cxx'; fi` radiogram/flmsg-radiogram.o: radiogram/radiogram.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram.o -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram.Tpo -c -o radiogram/flmsg-radiogram.o `test -f 'radiogram/radiogram.cxx' || echo '$(srcdir)/'`radiogram/radiogram.cxx @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram.Tpo radiogram/$(DEPDIR)/flmsg-radiogram.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram.cxx' object='radiogram/flmsg-radiogram.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram.o `test -f 'radiogram/radiogram.cxx' || echo '$(srcdir)/'`radiogram/radiogram.cxx radiogram/flmsg-radiogram.obj: radiogram/radiogram.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram.obj -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram.Tpo -c -o radiogram/flmsg-radiogram.obj `if test -f 'radiogram/radiogram.cxx'; then $(CYGPATH_W) 'radiogram/radiogram.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram.Tpo radiogram/$(DEPDIR)/flmsg-radiogram.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram.cxx' object='radiogram/flmsg-radiogram.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram.obj `if test -f 'radiogram/radiogram.cxx'; then $(CYGPATH_W) 'radiogram/radiogram.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram.cxx'; fi` radiogram/flmsg-radiogram_tab.o: radiogram/radiogram_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram_tab.o -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram_tab.Tpo -c -o radiogram/flmsg-radiogram_tab.o `test -f 'radiogram/radiogram_tab.cxx' || echo '$(srcdir)/'`radiogram/radiogram_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram_tab.Tpo radiogram/$(DEPDIR)/flmsg-radiogram_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram_tab.cxx' object='radiogram/flmsg-radiogram_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram_tab.o `test -f 'radiogram/radiogram_tab.cxx' || echo '$(srcdir)/'`radiogram/radiogram_tab.cxx radiogram/flmsg-radiogram_tab.obj: radiogram/radiogram_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram_tab.obj -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram_tab.Tpo -c -o radiogram/flmsg-radiogram_tab.obj `if test -f 'radiogram/radiogram_tab.cxx'; then $(CYGPATH_W) 'radiogram/radiogram_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram_tab.Tpo radiogram/$(DEPDIR)/flmsg-radiogram_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram_tab.cxx' object='radiogram/flmsg-radiogram_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram_tab.obj `if test -f 'radiogram/radiogram_tab.cxx'; then $(CYGPATH_W) 'radiogram/radiogram_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram_tab.cxx'; fi` radiogram/flmsg-radiogram_templates.o: radiogram/radiogram_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram_templates.o -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram_templates.Tpo -c -o radiogram/flmsg-radiogram_templates.o `test -f 'radiogram/radiogram_templates.cxx' || echo '$(srcdir)/'`radiogram/radiogram_templates.cxx @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram_templates.Tpo radiogram/$(DEPDIR)/flmsg-radiogram_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram_templates.cxx' object='radiogram/flmsg-radiogram_templates.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram_templates.o `test -f 'radiogram/radiogram_templates.cxx' || echo '$(srcdir)/'`radiogram/radiogram_templates.cxx radiogram/flmsg-radiogram_templates.obj: radiogram/radiogram_templates.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT radiogram/flmsg-radiogram_templates.obj -MD -MP -MF radiogram/$(DEPDIR)/flmsg-radiogram_templates.Tpo -c -o radiogram/flmsg-radiogram_templates.obj `if test -f 'radiogram/radiogram_templates.cxx'; then $(CYGPATH_W) 'radiogram/radiogram_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram_templates.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) radiogram/$(DEPDIR)/flmsg-radiogram_templates.Tpo radiogram/$(DEPDIR)/flmsg-radiogram_templates.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='radiogram/radiogram_templates.cxx' object='radiogram/flmsg-radiogram_templates.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o radiogram/flmsg-radiogram_templates.obj `if test -f 'radiogram/radiogram_templates.cxx'; then $(CYGPATH_W) 'radiogram/radiogram_templates.cxx'; else $(CYGPATH_W) '$(srcdir)/radiogram/radiogram_templates.cxx'; fi` redx/flmsg-redx_tab.o: redx/redx_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_tab.Tpo -c -o redx/flmsg-redx_tab.o `test -f 'redx/redx_tab.cxx' || echo '$(srcdir)/'`redx/redx_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_tab.Tpo redx/$(DEPDIR)/flmsg-redx_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_tab.cxx' object='redx/flmsg-redx_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_tab.o `test -f 'redx/redx_tab.cxx' || echo '$(srcdir)/'`redx/redx_tab.cxx redx/flmsg-redx_tab.obj: redx/redx_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_tab.Tpo -c -o redx/flmsg-redx_tab.obj `if test -f 'redx/redx_tab.cxx'; then $(CYGPATH_W) 'redx/redx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_tab.Tpo redx/$(DEPDIR)/flmsg-redx_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_tab.cxx' object='redx/flmsg-redx_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_tab.obj `if test -f 'redx/redx_tab.cxx'; then $(CYGPATH_W) 'redx/redx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_tab.cxx'; fi` redx/flmsg-redx_snw.o: redx/redx_snw.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw.Tpo -c -o redx/flmsg-redx_snw.o `test -f 'redx/redx_snw.cxx' || echo '$(srcdir)/'`redx/redx_snw.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw.Tpo redx/$(DEPDIR)/flmsg-redx_snw.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw.cxx' object='redx/flmsg-redx_snw.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw.o `test -f 'redx/redx_snw.cxx' || echo '$(srcdir)/'`redx/redx_snw.cxx redx/flmsg-redx_snw.obj: redx/redx_snw.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw.Tpo -c -o redx/flmsg-redx_snw.obj `if test -f 'redx/redx_snw.cxx'; then $(CYGPATH_W) 'redx/redx_snw.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw.Tpo redx/$(DEPDIR)/flmsg-redx_snw.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw.cxx' object='redx/flmsg-redx_snw.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw.obj `if test -f 'redx/redx_snw.cxx'; then $(CYGPATH_W) 'redx/redx_snw.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw.cxx'; fi` redx/flmsg-redx_snw_tab.o: redx/redx_snw_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo -c -o redx/flmsg-redx_snw_tab.o `test -f 'redx/redx_snw_tab.cxx' || echo '$(srcdir)/'`redx/redx_snw_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo redx/$(DEPDIR)/flmsg-redx_snw_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw_tab.cxx' object='redx/flmsg-redx_snw_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_tab.o `test -f 'redx/redx_snw_tab.cxx' || echo '$(srcdir)/'`redx/redx_snw_tab.cxx redx/flmsg-redx_snw_tab.obj: redx/redx_snw_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo -c -o redx/flmsg-redx_snw_tab.obj `if test -f 'redx/redx_snw_tab.cxx'; then $(CYGPATH_W) 'redx/redx_snw_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_tab.Tpo redx/$(DEPDIR)/flmsg-redx_snw_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw_tab.cxx' object='redx/flmsg-redx_snw_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_tab.obj `if test -f 'redx/redx_snw_tab.cxx'; then $(CYGPATH_W) 'redx/redx_snw_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_tab.cxx'; fi` redx/flmsg-redx_snw_template.o: redx/redx_snw_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_template.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo -c -o redx/flmsg-redx_snw_template.o `test -f 'redx/redx_snw_template.cxx' || echo '$(srcdir)/'`redx/redx_snw_template.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo redx/$(DEPDIR)/flmsg-redx_snw_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw_template.cxx' object='redx/flmsg-redx_snw_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_template.o `test -f 'redx/redx_snw_template.cxx' || echo '$(srcdir)/'`redx/redx_snw_template.cxx redx/flmsg-redx_snw_template.obj: redx/redx_snw_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_snw_template.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo -c -o redx/flmsg-redx_snw_template.obj `if test -f 'redx/redx_snw_template.cxx'; then $(CYGPATH_W) 'redx/redx_snw_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_template.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_snw_template.Tpo redx/$(DEPDIR)/flmsg-redx_snw_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_snw_template.cxx' object='redx/flmsg-redx_snw_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_snw_template.obj `if test -f 'redx/redx_snw_template.cxx'; then $(CYGPATH_W) 'redx/redx_snw_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_snw_template.cxx'; fi` redx/flmsg-redx_5739.o: redx/redx_5739.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739.Tpo -c -o redx/flmsg-redx_5739.o `test -f 'redx/redx_5739.cxx' || echo '$(srcdir)/'`redx/redx_5739.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739.Tpo redx/$(DEPDIR)/flmsg-redx_5739.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739.cxx' object='redx/flmsg-redx_5739.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739.o `test -f 'redx/redx_5739.cxx' || echo '$(srcdir)/'`redx/redx_5739.cxx redx/flmsg-redx_5739.obj: redx/redx_5739.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739.Tpo -c -o redx/flmsg-redx_5739.obj `if test -f 'redx/redx_5739.cxx'; then $(CYGPATH_W) 'redx/redx_5739.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739.Tpo redx/$(DEPDIR)/flmsg-redx_5739.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739.cxx' object='redx/flmsg-redx_5739.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739.obj `if test -f 'redx/redx_5739.cxx'; then $(CYGPATH_W) 'redx/redx_5739.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739.cxx'; fi` redx/flmsg-redx_5739_tab.o: redx/redx_5739_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo -c -o redx/flmsg-redx_5739_tab.o `test -f 'redx/redx_5739_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739_tab.cxx' object='redx/flmsg-redx_5739_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_tab.o `test -f 'redx/redx_5739_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739_tab.cxx redx/flmsg-redx_5739_tab.obj: redx/redx_5739_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo -c -o redx/flmsg-redx_5739_tab.obj `if test -f 'redx/redx_5739_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739_tab.cxx' object='redx/flmsg-redx_5739_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_tab.obj `if test -f 'redx/redx_5739_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_tab.cxx'; fi` redx/flmsg-redx_5739A.o: redx/redx_5739A.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A.Tpo -c -o redx/flmsg-redx_5739A.o `test -f 'redx/redx_5739A.cxx' || echo '$(srcdir)/'`redx/redx_5739A.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A.Tpo redx/$(DEPDIR)/flmsg-redx_5739A.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739A.cxx' object='redx/flmsg-redx_5739A.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A.o `test -f 'redx/redx_5739A.cxx' || echo '$(srcdir)/'`redx/redx_5739A.cxx redx/flmsg-redx_5739A.obj: redx/redx_5739A.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A.Tpo -c -o redx/flmsg-redx_5739A.obj `if test -f 'redx/redx_5739A.cxx'; then $(CYGPATH_W) 'redx/redx_5739A.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A.Tpo redx/$(DEPDIR)/flmsg-redx_5739A.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739A.cxx' object='redx/flmsg-redx_5739A.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A.obj `if test -f 'redx/redx_5739A.cxx'; then $(CYGPATH_W) 'redx/redx_5739A.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A.cxx'; fi` redx/flmsg-redx_5739A_tab.o: redx/redx_5739A_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo -c -o redx/flmsg-redx_5739A_tab.o `test -f 'redx/redx_5739A_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739A_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739A_tab.cxx' object='redx/flmsg-redx_5739A_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A_tab.o `test -f 'redx/redx_5739A_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739A_tab.cxx redx/flmsg-redx_5739A_tab.obj: redx/redx_5739A_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739A_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo -c -o redx/flmsg-redx_5739A_tab.obj `if test -f 'redx/redx_5739A_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739A_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739A_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739A_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739A_tab.cxx' object='redx/flmsg-redx_5739A_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739A_tab.obj `if test -f 'redx/redx_5739A_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739A_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739A_tab.cxx'; fi` redx/flmsg-redx_5739B.o: redx/redx_5739B.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B.Tpo -c -o redx/flmsg-redx_5739B.o `test -f 'redx/redx_5739B.cxx' || echo '$(srcdir)/'`redx/redx_5739B.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B.Tpo redx/$(DEPDIR)/flmsg-redx_5739B.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739B.cxx' object='redx/flmsg-redx_5739B.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B.o `test -f 'redx/redx_5739B.cxx' || echo '$(srcdir)/'`redx/redx_5739B.cxx redx/flmsg-redx_5739B.obj: redx/redx_5739B.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B.Tpo -c -o redx/flmsg-redx_5739B.obj `if test -f 'redx/redx_5739B.cxx'; then $(CYGPATH_W) 'redx/redx_5739B.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B.Tpo redx/$(DEPDIR)/flmsg-redx_5739B.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739B.cxx' object='redx/flmsg-redx_5739B.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B.obj `if test -f 'redx/redx_5739B.cxx'; then $(CYGPATH_W) 'redx/redx_5739B.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B.cxx'; fi` redx/flmsg-redx_5739B_tab.o: redx/redx_5739B_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B_tab.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo -c -o redx/flmsg-redx_5739B_tab.o `test -f 'redx/redx_5739B_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739B_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739B_tab.cxx' object='redx/flmsg-redx_5739B_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B_tab.o `test -f 'redx/redx_5739B_tab.cxx' || echo '$(srcdir)/'`redx/redx_5739B_tab.cxx redx/flmsg-redx_5739B_tab.obj: redx/redx_5739B_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739B_tab.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo -c -o redx/flmsg-redx_5739B_tab.obj `if test -f 'redx/redx_5739B_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739B_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739B_tab.Tpo redx/$(DEPDIR)/flmsg-redx_5739B_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739B_tab.cxx' object='redx/flmsg-redx_5739B_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739B_tab.obj `if test -f 'redx/redx_5739B_tab.cxx'; then $(CYGPATH_W) 'redx/redx_5739B_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739B_tab.cxx'; fi` redx/flmsg-redx_5739_template.o: redx/redx_5739_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_template.o -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo -c -o redx/flmsg-redx_5739_template.o `test -f 'redx/redx_5739_template.cxx' || echo '$(srcdir)/'`redx/redx_5739_template.cxx @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo redx/$(DEPDIR)/flmsg-redx_5739_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739_template.cxx' object='redx/flmsg-redx_5739_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_template.o `test -f 'redx/redx_5739_template.cxx' || echo '$(srcdir)/'`redx/redx_5739_template.cxx redx/flmsg-redx_5739_template.obj: redx/redx_5739_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT redx/flmsg-redx_5739_template.obj -MD -MP -MF redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo -c -o redx/flmsg-redx_5739_template.obj `if test -f 'redx/redx_5739_template.cxx'; then $(CYGPATH_W) 'redx/redx_5739_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_template.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) redx/$(DEPDIR)/flmsg-redx_5739_template.Tpo redx/$(DEPDIR)/flmsg-redx_5739_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redx/redx_5739_template.cxx' object='redx/flmsg-redx_5739_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o redx/flmsg-redx_5739_template.obj `if test -f 'redx/redx_5739_template.cxx'; then $(CYGPATH_W) 'redx/redx_5739_template.cxx'; else $(CYGPATH_W) '$(srcdir)/redx/redx_5739_template.cxx'; fi` transfer/flmsg-transfer.o: transfer/transfer.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT transfer/flmsg-transfer.o -MD -MP -MF transfer/$(DEPDIR)/flmsg-transfer.Tpo -c -o transfer/flmsg-transfer.o `test -f 'transfer/transfer.cxx' || echo '$(srcdir)/'`transfer/transfer.cxx @am__fastdepCXX_TRUE@ $(am__mv) transfer/$(DEPDIR)/flmsg-transfer.Tpo transfer/$(DEPDIR)/flmsg-transfer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transfer/transfer.cxx' object='transfer/flmsg-transfer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o transfer/flmsg-transfer.o `test -f 'transfer/transfer.cxx' || echo '$(srcdir)/'`transfer/transfer.cxx transfer/flmsg-transfer.obj: transfer/transfer.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT transfer/flmsg-transfer.obj -MD -MP -MF transfer/$(DEPDIR)/flmsg-transfer.Tpo -c -o transfer/flmsg-transfer.obj `if test -f 'transfer/transfer.cxx'; then $(CYGPATH_W) 'transfer/transfer.cxx'; else $(CYGPATH_W) '$(srcdir)/transfer/transfer.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) transfer/$(DEPDIR)/flmsg-transfer.Tpo transfer/$(DEPDIR)/flmsg-transfer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transfer/transfer.cxx' object='transfer/flmsg-transfer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o transfer/flmsg-transfer.obj `if test -f 'transfer/transfer.cxx'; then $(CYGPATH_W) 'transfer/transfer.cxx'; else $(CYGPATH_W) '$(srcdir)/transfer/transfer.cxx'; fi` transfer/flmsg-transfer_tab.o: transfer/transfer_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT transfer/flmsg-transfer_tab.o -MD -MP -MF transfer/$(DEPDIR)/flmsg-transfer_tab.Tpo -c -o transfer/flmsg-transfer_tab.o `test -f 'transfer/transfer_tab.cxx' || echo '$(srcdir)/'`transfer/transfer_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) transfer/$(DEPDIR)/flmsg-transfer_tab.Tpo transfer/$(DEPDIR)/flmsg-transfer_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transfer/transfer_tab.cxx' object='transfer/flmsg-transfer_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o transfer/flmsg-transfer_tab.o `test -f 'transfer/transfer_tab.cxx' || echo '$(srcdir)/'`transfer/transfer_tab.cxx transfer/flmsg-transfer_tab.obj: transfer/transfer_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT transfer/flmsg-transfer_tab.obj -MD -MP -MF transfer/$(DEPDIR)/flmsg-transfer_tab.Tpo -c -o transfer/flmsg-transfer_tab.obj `if test -f 'transfer/transfer_tab.cxx'; then $(CYGPATH_W) 'transfer/transfer_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/transfer/transfer_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) transfer/$(DEPDIR)/flmsg-transfer_tab.Tpo transfer/$(DEPDIR)/flmsg-transfer_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transfer/transfer_tab.cxx' object='transfer/flmsg-transfer_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o transfer/flmsg-transfer_tab.obj `if test -f 'transfer/transfer_tab.cxx'; then $(CYGPATH_W) 'transfer/transfer_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/transfer/transfer_tab.cxx'; fi` custom/flmsg-custom_transfer_tab.o: custom/custom_transfer_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_transfer_tab.o -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_transfer_tab.Tpo -c -o custom/flmsg-custom_transfer_tab.o `test -f 'custom/custom_transfer_tab.cxx' || echo '$(srcdir)/'`custom/custom_transfer_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_transfer_tab.Tpo custom/$(DEPDIR)/flmsg-custom_transfer_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_transfer_tab.cxx' object='custom/flmsg-custom_transfer_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_transfer_tab.o `test -f 'custom/custom_transfer_tab.cxx' || echo '$(srcdir)/'`custom/custom_transfer_tab.cxx custom/flmsg-custom_transfer_tab.obj: custom/custom_transfer_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT custom/flmsg-custom_transfer_tab.obj -MD -MP -MF custom/$(DEPDIR)/flmsg-custom_transfer_tab.Tpo -c -o custom/flmsg-custom_transfer_tab.obj `if test -f 'custom/custom_transfer_tab.cxx'; then $(CYGPATH_W) 'custom/custom_transfer_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_transfer_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) custom/$(DEPDIR)/flmsg-custom_transfer_tab.Tpo custom/$(DEPDIR)/flmsg-custom_transfer_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='custom/custom_transfer_tab.cxx' object='custom/flmsg-custom_transfer_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o custom/flmsg-custom_transfer_tab.obj `if test -f 'custom/custom_transfer_tab.cxx'; then $(CYGPATH_W) 'custom/custom_transfer_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/custom/custom_transfer_tab.cxx'; fi` utils/flmsg-base64.o: utils/base64.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base64.o -MD -MP -MF utils/$(DEPDIR)/flmsg-base64.Tpo -c -o utils/flmsg-base64.o `test -f 'utils/base64.cxx' || echo '$(srcdir)/'`utils/base64.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base64.Tpo utils/$(DEPDIR)/flmsg-base64.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base64.cxx' object='utils/flmsg-base64.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base64.o `test -f 'utils/base64.cxx' || echo '$(srcdir)/'`utils/base64.cxx utils/flmsg-base64.obj: utils/base64.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base64.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-base64.Tpo -c -o utils/flmsg-base64.obj `if test -f 'utils/base64.cxx'; then $(CYGPATH_W) 'utils/base64.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base64.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base64.Tpo utils/$(DEPDIR)/flmsg-base64.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base64.cxx' object='utils/flmsg-base64.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base64.obj `if test -f 'utils/base64.cxx'; then $(CYGPATH_W) 'utils/base64.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base64.cxx'; fi` utils/flmsg-base128.o: utils/base128.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base128.o -MD -MP -MF utils/$(DEPDIR)/flmsg-base128.Tpo -c -o utils/flmsg-base128.o `test -f 'utils/base128.cxx' || echo '$(srcdir)/'`utils/base128.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base128.Tpo utils/$(DEPDIR)/flmsg-base128.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base128.cxx' object='utils/flmsg-base128.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base128.o `test -f 'utils/base128.cxx' || echo '$(srcdir)/'`utils/base128.cxx utils/flmsg-base128.obj: utils/base128.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base128.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-base128.Tpo -c -o utils/flmsg-base128.obj `if test -f 'utils/base128.cxx'; then $(CYGPATH_W) 'utils/base128.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base128.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base128.Tpo utils/$(DEPDIR)/flmsg-base128.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base128.cxx' object='utils/flmsg-base128.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base128.obj `if test -f 'utils/base128.cxx'; then $(CYGPATH_W) 'utils/base128.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base128.cxx'; fi` utils/flmsg-base256.o: utils/base256.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base256.o -MD -MP -MF utils/$(DEPDIR)/flmsg-base256.Tpo -c -o utils/flmsg-base256.o `test -f 'utils/base256.cxx' || echo '$(srcdir)/'`utils/base256.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base256.Tpo utils/$(DEPDIR)/flmsg-base256.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base256.cxx' object='utils/flmsg-base256.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base256.o `test -f 'utils/base256.cxx' || echo '$(srcdir)/'`utils/base256.cxx utils/flmsg-base256.obj: utils/base256.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-base256.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-base256.Tpo -c -o utils/flmsg-base256.obj `if test -f 'utils/base256.cxx'; then $(CYGPATH_W) 'utils/base256.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base256.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-base256.Tpo utils/$(DEPDIR)/flmsg-base256.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/base256.cxx' object='utils/flmsg-base256.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-base256.obj `if test -f 'utils/base256.cxx'; then $(CYGPATH_W) 'utils/base256.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/base256.cxx'; fi` utils/flmsg-debug.o: utils/debug.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-debug.o -MD -MP -MF utils/$(DEPDIR)/flmsg-debug.Tpo -c -o utils/flmsg-debug.o `test -f 'utils/debug.cxx' || echo '$(srcdir)/'`utils/debug.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-debug.Tpo utils/$(DEPDIR)/flmsg-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/debug.cxx' object='utils/flmsg-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-debug.o `test -f 'utils/debug.cxx' || echo '$(srcdir)/'`utils/debug.cxx utils/flmsg-debug.obj: utils/debug.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-debug.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-debug.Tpo -c -o utils/flmsg-debug.obj `if test -f 'utils/debug.cxx'; then $(CYGPATH_W) 'utils/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/debug.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-debug.Tpo utils/$(DEPDIR)/flmsg-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/debug.cxx' object='utils/flmsg-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-debug.obj `if test -f 'utils/debug.cxx'; then $(CYGPATH_W) 'utils/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/debug.cxx'; fi` utils/flmsg-ext_string.o: utils/ext_string.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-ext_string.o -MD -MP -MF utils/$(DEPDIR)/flmsg-ext_string.Tpo -c -o utils/flmsg-ext_string.o `test -f 'utils/ext_string.cxx' || echo '$(srcdir)/'`utils/ext_string.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-ext_string.Tpo utils/$(DEPDIR)/flmsg-ext_string.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/ext_string.cxx' object='utils/flmsg-ext_string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-ext_string.o `test -f 'utils/ext_string.cxx' || echo '$(srcdir)/'`utils/ext_string.cxx utils/flmsg-ext_string.obj: utils/ext_string.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-ext_string.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-ext_string.Tpo -c -o utils/flmsg-ext_string.obj `if test -f 'utils/ext_string.cxx'; then $(CYGPATH_W) 'utils/ext_string.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/ext_string.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-ext_string.Tpo utils/$(DEPDIR)/flmsg-ext_string.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/ext_string.cxx' object='utils/flmsg-ext_string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-ext_string.obj `if test -f 'utils/ext_string.cxx'; then $(CYGPATH_W) 'utils/ext_string.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/ext_string.cxx'; fi` utils/flmsg-parse_xml.o: utils/parse_xml.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-parse_xml.o -MD -MP -MF utils/$(DEPDIR)/flmsg-parse_xml.Tpo -c -o utils/flmsg-parse_xml.o `test -f 'utils/parse_xml.cxx' || echo '$(srcdir)/'`utils/parse_xml.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-parse_xml.Tpo utils/$(DEPDIR)/flmsg-parse_xml.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/parse_xml.cxx' object='utils/flmsg-parse_xml.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-parse_xml.o `test -f 'utils/parse_xml.cxx' || echo '$(srcdir)/'`utils/parse_xml.cxx utils/flmsg-parse_xml.obj: utils/parse_xml.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-parse_xml.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-parse_xml.Tpo -c -o utils/flmsg-parse_xml.obj `if test -f 'utils/parse_xml.cxx'; then $(CYGPATH_W) 'utils/parse_xml.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/parse_xml.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-parse_xml.Tpo utils/$(DEPDIR)/flmsg-parse_xml.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/parse_xml.cxx' object='utils/flmsg-parse_xml.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-parse_xml.obj `if test -f 'utils/parse_xml.cxx'; then $(CYGPATH_W) 'utils/parse_xml.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/parse_xml.cxx'; fi` utils/flmsg-socket.o: utils/socket.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-socket.o -MD -MP -MF utils/$(DEPDIR)/flmsg-socket.Tpo -c -o utils/flmsg-socket.o `test -f 'utils/socket.cxx' || echo '$(srcdir)/'`utils/socket.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-socket.Tpo utils/$(DEPDIR)/flmsg-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/socket.cxx' object='utils/flmsg-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-socket.o `test -f 'utils/socket.cxx' || echo '$(srcdir)/'`utils/socket.cxx utils/flmsg-socket.obj: utils/socket.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-socket.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-socket.Tpo -c -o utils/flmsg-socket.obj `if test -f 'utils/socket.cxx'; then $(CYGPATH_W) 'utils/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/socket.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-socket.Tpo utils/$(DEPDIR)/flmsg-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/socket.cxx' object='utils/flmsg-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-socket.obj `if test -f 'utils/socket.cxx'; then $(CYGPATH_W) 'utils/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/socket.cxx'; fi` utils/flmsg-status.o: utils/status.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-status.o -MD -MP -MF utils/$(DEPDIR)/flmsg-status.Tpo -c -o utils/flmsg-status.o `test -f 'utils/status.cxx' || echo '$(srcdir)/'`utils/status.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-status.Tpo utils/$(DEPDIR)/flmsg-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/status.cxx' object='utils/flmsg-status.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-status.o `test -f 'utils/status.cxx' || echo '$(srcdir)/'`utils/status.cxx utils/flmsg-status.obj: utils/status.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-status.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-status.Tpo -c -o utils/flmsg-status.obj `if test -f 'utils/status.cxx'; then $(CYGPATH_W) 'utils/status.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/status.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-status.Tpo utils/$(DEPDIR)/flmsg-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/status.cxx' object='utils/flmsg-status.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-status.obj `if test -f 'utils/status.cxx'; then $(CYGPATH_W) 'utils/status.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/status.cxx'; fi` utils/flmsg-timeops.o: utils/timeops.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-timeops.o -MD -MP -MF utils/$(DEPDIR)/flmsg-timeops.Tpo -c -o utils/flmsg-timeops.o `test -f 'utils/timeops.cxx' || echo '$(srcdir)/'`utils/timeops.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-timeops.Tpo utils/$(DEPDIR)/flmsg-timeops.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/timeops.cxx' object='utils/flmsg-timeops.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-timeops.o `test -f 'utils/timeops.cxx' || echo '$(srcdir)/'`utils/timeops.cxx utils/flmsg-timeops.obj: utils/timeops.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-timeops.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-timeops.Tpo -c -o utils/flmsg-timeops.obj `if test -f 'utils/timeops.cxx'; then $(CYGPATH_W) 'utils/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/timeops.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-timeops.Tpo utils/$(DEPDIR)/flmsg-timeops.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/timeops.cxx' object='utils/flmsg-timeops.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-timeops.obj `if test -f 'utils/timeops.cxx'; then $(CYGPATH_W) 'utils/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/timeops.cxx'; fi` utils/flmsg-time_table.o: utils/time_table.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-time_table.o -MD -MP -MF utils/$(DEPDIR)/flmsg-time_table.Tpo -c -o utils/flmsg-time_table.o `test -f 'utils/time_table.cxx' || echo '$(srcdir)/'`utils/time_table.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-time_table.Tpo utils/$(DEPDIR)/flmsg-time_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/time_table.cxx' object='utils/flmsg-time_table.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-time_table.o `test -f 'utils/time_table.cxx' || echo '$(srcdir)/'`utils/time_table.cxx utils/flmsg-time_table.obj: utils/time_table.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-time_table.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-time_table.Tpo -c -o utils/flmsg-time_table.obj `if test -f 'utils/time_table.cxx'; then $(CYGPATH_W) 'utils/time_table.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/time_table.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-time_table.Tpo utils/$(DEPDIR)/flmsg-time_table.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/time_table.cxx' object='utils/flmsg-time_table.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-time_table.obj `if test -f 'utils/time_table.cxx'; then $(CYGPATH_W) 'utils/time_table.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/time_table.cxx'; fi` utils/flmsg-threads.o: utils/threads.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-threads.o -MD -MP -MF utils/$(DEPDIR)/flmsg-threads.Tpo -c -o utils/flmsg-threads.o `test -f 'utils/threads.cxx' || echo '$(srcdir)/'`utils/threads.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-threads.Tpo utils/$(DEPDIR)/flmsg-threads.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/threads.cxx' object='utils/flmsg-threads.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-threads.o `test -f 'utils/threads.cxx' || echo '$(srcdir)/'`utils/threads.cxx utils/flmsg-threads.obj: utils/threads.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-threads.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-threads.Tpo -c -o utils/flmsg-threads.obj `if test -f 'utils/threads.cxx'; then $(CYGPATH_W) 'utils/threads.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/threads.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-threads.Tpo utils/$(DEPDIR)/flmsg-threads.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/threads.cxx' object='utils/flmsg-threads.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-threads.obj `if test -f 'utils/threads.cxx'; then $(CYGPATH_W) 'utils/threads.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/threads.cxx'; fi` utils/flmsg-util.o: utils/util.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-util.o -MD -MP -MF utils/$(DEPDIR)/flmsg-util.Tpo -c -o utils/flmsg-util.o `test -f 'utils/util.cxx' || echo '$(srcdir)/'`utils/util.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-util.Tpo utils/$(DEPDIR)/flmsg-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/util.cxx' object='utils/flmsg-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-util.o `test -f 'utils/util.cxx' || echo '$(srcdir)/'`utils/util.cxx utils/flmsg-util.obj: utils/util.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-util.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-util.Tpo -c -o utils/flmsg-util.obj `if test -f 'utils/util.cxx'; then $(CYGPATH_W) 'utils/util.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-util.Tpo utils/$(DEPDIR)/flmsg-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/util.cxx' object='utils/flmsg-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-util.obj `if test -f 'utils/util.cxx'; then $(CYGPATH_W) 'utils/util.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/util.cxx'; fi` utils/flmsg-wrap.o: utils/wrap.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-wrap.o -MD -MP -MF utils/$(DEPDIR)/flmsg-wrap.Tpo -c -o utils/flmsg-wrap.o `test -f 'utils/wrap.cxx' || echo '$(srcdir)/'`utils/wrap.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-wrap.Tpo utils/$(DEPDIR)/flmsg-wrap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/wrap.cxx' object='utils/flmsg-wrap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-wrap.o `test -f 'utils/wrap.cxx' || echo '$(srcdir)/'`utils/wrap.cxx utils/flmsg-wrap.obj: utils/wrap.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-wrap.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-wrap.Tpo -c -o utils/flmsg-wrap.obj `if test -f 'utils/wrap.cxx'; then $(CYGPATH_W) 'utils/wrap.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/wrap.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-wrap.Tpo utils/$(DEPDIR)/flmsg-wrap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/wrap.cxx' object='utils/flmsg-wrap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-wrap.obj `if test -f 'utils/wrap.cxx'; then $(CYGPATH_W) 'utils/wrap.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/wrap.cxx'; fi` utils/flmsg-xml_io.o: utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-xml_io.o -MD -MP -MF utils/$(DEPDIR)/flmsg-xml_io.Tpo -c -o utils/flmsg-xml_io.o `test -f 'utils/xml_io.cxx' || echo '$(srcdir)/'`utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-xml_io.Tpo utils/$(DEPDIR)/flmsg-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/xml_io.cxx' object='utils/flmsg-xml_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-xml_io.o `test -f 'utils/xml_io.cxx' || echo '$(srcdir)/'`utils/xml_io.cxx utils/flmsg-xml_io.obj: utils/xml_io.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT utils/flmsg-xml_io.obj -MD -MP -MF utils/$(DEPDIR)/flmsg-xml_io.Tpo -c -o utils/flmsg-xml_io.obj `if test -f 'utils/xml_io.cxx'; then $(CYGPATH_W) 'utils/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/xml_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) utils/$(DEPDIR)/flmsg-xml_io.Tpo utils/$(DEPDIR)/flmsg-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='utils/xml_io.cxx' object='utils/flmsg-xml_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o utils/flmsg-xml_io.obj `if test -f 'utils/xml_io.cxx'; then $(CYGPATH_W) 'utils/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/utils/xml_io.cxx'; fi` widgets/flmsg-calendar.o: widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-calendar.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-calendar.Tpo -c -o widgets/flmsg-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-calendar.Tpo widgets/$(DEPDIR)/flmsg-calendar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/calendar.cxx' object='widgets/flmsg-calendar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx widgets/flmsg-calendar.obj: widgets/calendar.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-calendar.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-calendar.Tpo -c -o widgets/flmsg-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-calendar.Tpo widgets/$(DEPDIR)/flmsg-calendar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/calendar.cxx' object='widgets/flmsg-calendar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi` widgets/flmsg-combo.o: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-combo.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-combo.Tpo -c -o widgets/flmsg-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-combo.Tpo widgets/$(DEPDIR)/flmsg-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/combo.cxx' object='widgets/flmsg-combo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx widgets/flmsg-combo.obj: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-combo.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-combo.Tpo -c -o widgets/flmsg-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-combo.Tpo widgets/$(DEPDIR)/flmsg-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/combo.cxx' object='widgets/flmsg-combo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` widgets/flmsg-date.o: widgets/date.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-date.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-date.Tpo -c -o widgets/flmsg-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-date.Tpo widgets/$(DEPDIR)/flmsg-date.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/date.cxx' object='widgets/flmsg-date.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx widgets/flmsg-date.obj: widgets/date.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-date.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-date.Tpo -c -o widgets/flmsg-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-date.Tpo widgets/$(DEPDIR)/flmsg-date.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/date.cxx' object='widgets/flmsg-date.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi` widgets/flmsg-fileselect.o: widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-fileselect.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-fileselect.Tpo -c -o widgets/flmsg-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-fileselect.Tpo widgets/$(DEPDIR)/flmsg-fileselect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/fileselect.cxx' object='widgets/flmsg-fileselect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx widgets/flmsg-fileselect.obj: widgets/fileselect.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-fileselect.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-fileselect.Tpo -c -o widgets/flmsg-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-fileselect.Tpo widgets/$(DEPDIR)/flmsg-fileselect.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/fileselect.cxx' object='widgets/flmsg-fileselect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi` widgets/flmsg-flinput2.o: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-flinput2.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-flinput2.Tpo -c -o widgets/flmsg-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-flinput2.Tpo widgets/$(DEPDIR)/flmsg-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/flinput2.cxx' object='widgets/flmsg-flinput2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx widgets/flmsg-flinput2.obj: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-flinput2.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-flinput2.Tpo -c -o widgets/flmsg-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-flinput2.Tpo widgets/$(DEPDIR)/flmsg-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/flinput2.cxx' object='widgets/flmsg-flinput2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` widgets/flmsg-flslider2.o: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-flslider2.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-flslider2.Tpo -c -o widgets/flmsg-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-flslider2.Tpo widgets/$(DEPDIR)/flmsg-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/flslider2.cxx' object='widgets/flmsg-flslider2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx widgets/flmsg-flslider2.obj: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-flslider2.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-flslider2.Tpo -c -o widgets/flmsg-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-flslider2.Tpo widgets/$(DEPDIR)/flmsg-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/flslider2.cxx' object='widgets/flmsg-flslider2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` widgets/flmsg-Fl_Text_Buffer_mod.o: widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Buffer_mod.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Tpo -c -o widgets/flmsg-Fl_Text_Buffer_mod.o `test -f 'widgets/Fl_Text_Buffer_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Buffer_mod.cxx' object='widgets/flmsg-Fl_Text_Buffer_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Buffer_mod.o `test -f 'widgets/Fl_Text_Buffer_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Buffer_mod.cxx widgets/flmsg-Fl_Text_Buffer_mod.obj: widgets/Fl_Text_Buffer_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Buffer_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Tpo -c -o widgets/flmsg-Fl_Text_Buffer_mod.obj `if test -f 'widgets/Fl_Text_Buffer_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Buffer_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Buffer_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Buffer_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Buffer_mod.cxx' object='widgets/flmsg-Fl_Text_Buffer_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Buffer_mod.obj `if test -f 'widgets/Fl_Text_Buffer_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Buffer_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Buffer_mod.cxx'; fi` widgets/flmsg-Fl_Text_Editor_mod.o: widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Editor_mod.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Tpo -c -o widgets/flmsg-Fl_Text_Editor_mod.o `test -f 'widgets/Fl_Text_Editor_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Editor_mod.cxx' object='widgets/flmsg-Fl_Text_Editor_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Editor_mod.o `test -f 'widgets/Fl_Text_Editor_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Editor_mod.cxx widgets/flmsg-Fl_Text_Editor_mod.obj: widgets/Fl_Text_Editor_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Editor_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Tpo -c -o widgets/flmsg-Fl_Text_Editor_mod.obj `if test -f 'widgets/Fl_Text_Editor_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Editor_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Editor_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Editor_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Editor_mod.cxx' object='widgets/flmsg-Fl_Text_Editor_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Editor_mod.obj `if test -f 'widgets/Fl_Text_Editor_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Editor_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Editor_mod.cxx'; fi` widgets/flmsg-Fl_Text_Display_mod.o: widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Display_mod.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Tpo -c -o widgets/flmsg-Fl_Text_Display_mod.o `test -f 'widgets/Fl_Text_Display_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Display_mod.cxx' object='widgets/flmsg-Fl_Text_Display_mod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Display_mod.o `test -f 'widgets/Fl_Text_Display_mod.cxx' || echo '$(srcdir)/'`widgets/Fl_Text_Display_mod.cxx widgets/flmsg-Fl_Text_Display_mod.obj: widgets/Fl_Text_Display_mod.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Text_Display_mod.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Tpo -c -o widgets/flmsg-Fl_Text_Display_mod.obj `if test -f 'widgets/Fl_Text_Display_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Display_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Display_mod.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Tpo widgets/$(DEPDIR)/flmsg-Fl_Text_Display_mod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Text_Display_mod.cxx' object='widgets/flmsg-Fl_Text_Display_mod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Text_Display_mod.obj `if test -f 'widgets/Fl_Text_Display_mod.cxx'; then $(CYGPATH_W) 'widgets/Fl_Text_Display_mod.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Text_Display_mod.cxx'; fi` widgets/flmsg-Fl_Native_File_Chooser.o: widgets/Fl_Native_File_Chooser.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Native_File_Chooser.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Tpo -c -o widgets/flmsg-Fl_Native_File_Chooser.o `test -f 'widgets/Fl_Native_File_Chooser.cxx' || echo '$(srcdir)/'`widgets/Fl_Native_File_Chooser.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Tpo widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Native_File_Chooser.cxx' object='widgets/flmsg-Fl_Native_File_Chooser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Native_File_Chooser.o `test -f 'widgets/Fl_Native_File_Chooser.cxx' || echo '$(srcdir)/'`widgets/Fl_Native_File_Chooser.cxx widgets/flmsg-Fl_Native_File_Chooser.obj: widgets/Fl_Native_File_Chooser.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-Fl_Native_File_Chooser.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Tpo -c -o widgets/flmsg-Fl_Native_File_Chooser.obj `if test -f 'widgets/Fl_Native_File_Chooser.cxx'; then $(CYGPATH_W) 'widgets/Fl_Native_File_Chooser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Native_File_Chooser.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Tpo widgets/$(DEPDIR)/flmsg-Fl_Native_File_Chooser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/Fl_Native_File_Chooser.cxx' object='widgets/flmsg-Fl_Native_File_Chooser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-Fl_Native_File_Chooser.obj `if test -f 'widgets/Fl_Native_File_Chooser.cxx'; then $(CYGPATH_W) 'widgets/Fl_Native_File_Chooser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Native_File_Chooser.cxx'; fi` widgets/flmsg-FTextView.o: widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-FTextView.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-FTextView.Tpo -c -o widgets/flmsg-FTextView.o `test -f 'widgets/FTextView.cxx' || echo '$(srcdir)/'`widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-FTextView.Tpo widgets/$(DEPDIR)/flmsg-FTextView.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/FTextView.cxx' object='widgets/flmsg-FTextView.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-FTextView.o `test -f 'widgets/FTextView.cxx' || echo '$(srcdir)/'`widgets/FTextView.cxx widgets/flmsg-FTextView.obj: widgets/FTextView.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-FTextView.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-FTextView.Tpo -c -o widgets/flmsg-FTextView.obj `if test -f 'widgets/FTextView.cxx'; then $(CYGPATH_W) 'widgets/FTextView.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FTextView.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-FTextView.Tpo widgets/$(DEPDIR)/flmsg-FTextView.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/FTextView.cxx' object='widgets/flmsg-FTextView.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-FTextView.obj `if test -f 'widgets/FTextView.cxx'; then $(CYGPATH_W) 'widgets/FTextView.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FTextView.cxx'; fi` widgets/flmsg-icons.o: widgets/icons.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-icons.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-icons.Tpo -c -o widgets/flmsg-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-icons.Tpo widgets/$(DEPDIR)/flmsg-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/icons.cxx' object='widgets/flmsg-icons.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx widgets/flmsg-icons.obj: widgets/icons.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-icons.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-icons.Tpo -c -o widgets/flmsg-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-icons.Tpo widgets/$(DEPDIR)/flmsg-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/icons.cxx' object='widgets/flmsg-icons.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi` widgets/flmsg-pixmaps.o: widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-pixmaps.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-pixmaps.Tpo -c -o widgets/flmsg-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-pixmaps.Tpo widgets/$(DEPDIR)/flmsg-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/pixmaps.cxx' object='widgets/flmsg-pixmaps.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx widgets/flmsg-pixmaps.obj: widgets/pixmaps.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-pixmaps.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-pixmaps.Tpo -c -o widgets/flmsg-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-pixmaps.Tpo widgets/$(DEPDIR)/flmsg-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/pixmaps.cxx' object='widgets/flmsg-pixmaps.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi` widgets/flmsg-pixmaps_tango.o: widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-pixmaps_tango.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-pixmaps_tango.Tpo -c -o widgets/flmsg-pixmaps_tango.o `test -f 'widgets/pixmaps_tango.cxx' || echo '$(srcdir)/'`widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-pixmaps_tango.Tpo widgets/$(DEPDIR)/flmsg-pixmaps_tango.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/pixmaps_tango.cxx' object='widgets/flmsg-pixmaps_tango.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-pixmaps_tango.o `test -f 'widgets/pixmaps_tango.cxx' || echo '$(srcdir)/'`widgets/pixmaps_tango.cxx widgets/flmsg-pixmaps_tango.obj: widgets/pixmaps_tango.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-pixmaps_tango.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-pixmaps_tango.Tpo -c -o widgets/flmsg-pixmaps_tango.obj `if test -f 'widgets/pixmaps_tango.cxx'; then $(CYGPATH_W) 'widgets/pixmaps_tango.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps_tango.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-pixmaps_tango.Tpo widgets/$(DEPDIR)/flmsg-pixmaps_tango.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/pixmaps_tango.cxx' object='widgets/flmsg-pixmaps_tango.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-pixmaps_tango.obj `if test -f 'widgets/pixmaps_tango.cxx'; then $(CYGPATH_W) 'widgets/pixmaps_tango.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps_tango.cxx'; fi` widgets/flmsg-font_browser.o: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-font_browser.o -MD -MP -MF widgets/$(DEPDIR)/flmsg-font_browser.Tpo -c -o widgets/flmsg-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-font_browser.Tpo widgets/$(DEPDIR)/flmsg-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/font_browser.cxx' object='widgets/flmsg-font_browser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx widgets/flmsg-font_browser.obj: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT widgets/flmsg-font_browser.obj -MD -MP -MF widgets/$(DEPDIR)/flmsg-font_browser.Tpo -c -o widgets/flmsg-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) widgets/$(DEPDIR)/flmsg-font_browser.Tpo widgets/$(DEPDIR)/flmsg-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='widgets/font_browser.cxx' object='widgets/flmsg-font_browser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flmsg-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` wx/flmsg-hurricane.o: wx/hurricane.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane.o -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane.Tpo -c -o wx/flmsg-hurricane.o `test -f 'wx/hurricane.cxx' || echo '$(srcdir)/'`wx/hurricane.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane.Tpo wx/$(DEPDIR)/flmsg-hurricane.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane.cxx' object='wx/flmsg-hurricane.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane.o `test -f 'wx/hurricane.cxx' || echo '$(srcdir)/'`wx/hurricane.cxx wx/flmsg-hurricane.obj: wx/hurricane.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane.Tpo -c -o wx/flmsg-hurricane.obj `if test -f 'wx/hurricane.cxx'; then $(CYGPATH_W) 'wx/hurricane.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane.Tpo wx/$(DEPDIR)/flmsg-hurricane.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane.cxx' object='wx/flmsg-hurricane.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane.obj `if test -f 'wx/hurricane.cxx'; then $(CYGPATH_W) 'wx/hurricane.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane.cxx'; fi` wx/flmsg-hurricane_tab.o: wx/hurricane_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane_tab.o -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane_tab.Tpo -c -o wx/flmsg-hurricane_tab.o `test -f 'wx/hurricane_tab.cxx' || echo '$(srcdir)/'`wx/hurricane_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane_tab.Tpo wx/$(DEPDIR)/flmsg-hurricane_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane_tab.cxx' object='wx/flmsg-hurricane_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane_tab.o `test -f 'wx/hurricane_tab.cxx' || echo '$(srcdir)/'`wx/hurricane_tab.cxx wx/flmsg-hurricane_tab.obj: wx/hurricane_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane_tab.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane_tab.Tpo -c -o wx/flmsg-hurricane_tab.obj `if test -f 'wx/hurricane_tab.cxx'; then $(CYGPATH_W) 'wx/hurricane_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane_tab.Tpo wx/$(DEPDIR)/flmsg-hurricane_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane_tab.cxx' object='wx/flmsg-hurricane_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane_tab.obj `if test -f 'wx/hurricane_tab.cxx'; then $(CYGPATH_W) 'wx/hurricane_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane_tab.cxx'; fi` wx/flmsg-hurricane_template.o: wx/hurricane_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane_template.o -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane_template.Tpo -c -o wx/flmsg-hurricane_template.o `test -f 'wx/hurricane_template.cxx' || echo '$(srcdir)/'`wx/hurricane_template.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane_template.Tpo wx/$(DEPDIR)/flmsg-hurricane_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane_template.cxx' object='wx/flmsg-hurricane_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane_template.o `test -f 'wx/hurricane_template.cxx' || echo '$(srcdir)/'`wx/hurricane_template.cxx wx/flmsg-hurricane_template.obj: wx/hurricane_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-hurricane_template.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-hurricane_template.Tpo -c -o wx/flmsg-hurricane_template.obj `if test -f 'wx/hurricane_template.cxx'; then $(CYGPATH_W) 'wx/hurricane_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane_template.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-hurricane_template.Tpo wx/$(DEPDIR)/flmsg-hurricane_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/hurricane_template.cxx' object='wx/flmsg-hurricane_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-hurricane_template.obj `if test -f 'wx/hurricane_template.cxx'; then $(CYGPATH_W) 'wx/hurricane_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/hurricane_template.cxx'; fi` wx/flmsg-severe_wx.o: wx/severe_wx.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx.o -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx.Tpo -c -o wx/flmsg-severe_wx.o `test -f 'wx/severe_wx.cxx' || echo '$(srcdir)/'`wx/severe_wx.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx.Tpo wx/$(DEPDIR)/flmsg-severe_wx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx.cxx' object='wx/flmsg-severe_wx.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx.o `test -f 'wx/severe_wx.cxx' || echo '$(srcdir)/'`wx/severe_wx.cxx wx/flmsg-severe_wx.obj: wx/severe_wx.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx.Tpo -c -o wx/flmsg-severe_wx.obj `if test -f 'wx/severe_wx.cxx'; then $(CYGPATH_W) 'wx/severe_wx.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx.Tpo wx/$(DEPDIR)/flmsg-severe_wx.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx.cxx' object='wx/flmsg-severe_wx.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx.obj `if test -f 'wx/severe_wx.cxx'; then $(CYGPATH_W) 'wx/severe_wx.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx.cxx'; fi` wx/flmsg-severe_wx_tab.o: wx/severe_wx_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx_tab.o -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx_tab.Tpo -c -o wx/flmsg-severe_wx_tab.o `test -f 'wx/severe_wx_tab.cxx' || echo '$(srcdir)/'`wx/severe_wx_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx_tab.Tpo wx/$(DEPDIR)/flmsg-severe_wx_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx_tab.cxx' object='wx/flmsg-severe_wx_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx_tab.o `test -f 'wx/severe_wx_tab.cxx' || echo '$(srcdir)/'`wx/severe_wx_tab.cxx wx/flmsg-severe_wx_tab.obj: wx/severe_wx_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx_tab.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx_tab.Tpo -c -o wx/flmsg-severe_wx_tab.obj `if test -f 'wx/severe_wx_tab.cxx'; then $(CYGPATH_W) 'wx/severe_wx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx_tab.Tpo wx/$(DEPDIR)/flmsg-severe_wx_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx_tab.cxx' object='wx/flmsg-severe_wx_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx_tab.obj `if test -f 'wx/severe_wx_tab.cxx'; then $(CYGPATH_W) 'wx/severe_wx_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx_tab.cxx'; fi` wx/flmsg-severe_wx_template.o: wx/severe_wx_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx_template.o -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx_template.Tpo -c -o wx/flmsg-severe_wx_template.o `test -f 'wx/severe_wx_template.cxx' || echo '$(srcdir)/'`wx/severe_wx_template.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx_template.Tpo wx/$(DEPDIR)/flmsg-severe_wx_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx_template.cxx' object='wx/flmsg-severe_wx_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx_template.o `test -f 'wx/severe_wx_template.cxx' || echo '$(srcdir)/'`wx/severe_wx_template.cxx wx/flmsg-severe_wx_template.obj: wx/severe_wx_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-severe_wx_template.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-severe_wx_template.Tpo -c -o wx/flmsg-severe_wx_template.obj `if test -f 'wx/severe_wx_template.cxx'; then $(CYGPATH_W) 'wx/severe_wx_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx_template.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-severe_wx_template.Tpo wx/$(DEPDIR)/flmsg-severe_wx_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/severe_wx_template.cxx' object='wx/flmsg-severe_wx_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-severe_wx_template.obj `if test -f 'wx/severe_wx_template.cxx'; then $(CYGPATH_W) 'wx/severe_wx_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/severe_wx_template.cxx'; fi` wx/flmsg-wx_strings.o: wx/wx_strings.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-wx_strings.o -MD -MP -MF wx/$(DEPDIR)/flmsg-wx_strings.Tpo -c -o wx/flmsg-wx_strings.o `test -f 'wx/wx_strings.cxx' || echo '$(srcdir)/'`wx/wx_strings.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-wx_strings.Tpo wx/$(DEPDIR)/flmsg-wx_strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/wx_strings.cxx' object='wx/flmsg-wx_strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-wx_strings.o `test -f 'wx/wx_strings.cxx' || echo '$(srcdir)/'`wx/wx_strings.cxx wx/flmsg-wx_strings.obj: wx/wx_strings.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-wx_strings.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-wx_strings.Tpo -c -o wx/flmsg-wx_strings.obj `if test -f 'wx/wx_strings.cxx'; then $(CYGPATH_W) 'wx/wx_strings.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/wx_strings.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-wx_strings.Tpo wx/$(DEPDIR)/flmsg-wx_strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/wx_strings.cxx' object='wx/flmsg-wx_strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-wx_strings.obj `if test -f 'wx/wx_strings.cxx'; then $(CYGPATH_W) 'wx/wx_strings.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/wx_strings.cxx'; fi` wx/flmsg-storm_report.o: wx/storm_report.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report.o -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report.Tpo -c -o wx/flmsg-storm_report.o `test -f 'wx/storm_report.cxx' || echo '$(srcdir)/'`wx/storm_report.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report.Tpo wx/$(DEPDIR)/flmsg-storm_report.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report.cxx' object='wx/flmsg-storm_report.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report.o `test -f 'wx/storm_report.cxx' || echo '$(srcdir)/'`wx/storm_report.cxx wx/flmsg-storm_report.obj: wx/storm_report.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report.Tpo -c -o wx/flmsg-storm_report.obj `if test -f 'wx/storm_report.cxx'; then $(CYGPATH_W) 'wx/storm_report.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report.Tpo wx/$(DEPDIR)/flmsg-storm_report.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report.cxx' object='wx/flmsg-storm_report.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report.obj `if test -f 'wx/storm_report.cxx'; then $(CYGPATH_W) 'wx/storm_report.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report.cxx'; fi` wx/flmsg-storm_report_tab.o: wx/storm_report_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report_tab.o -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report_tab.Tpo -c -o wx/flmsg-storm_report_tab.o `test -f 'wx/storm_report_tab.cxx' || echo '$(srcdir)/'`wx/storm_report_tab.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report_tab.Tpo wx/$(DEPDIR)/flmsg-storm_report_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report_tab.cxx' object='wx/flmsg-storm_report_tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report_tab.o `test -f 'wx/storm_report_tab.cxx' || echo '$(srcdir)/'`wx/storm_report_tab.cxx wx/flmsg-storm_report_tab.obj: wx/storm_report_tab.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report_tab.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report_tab.Tpo -c -o wx/flmsg-storm_report_tab.obj `if test -f 'wx/storm_report_tab.cxx'; then $(CYGPATH_W) 'wx/storm_report_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report_tab.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report_tab.Tpo wx/$(DEPDIR)/flmsg-storm_report_tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report_tab.cxx' object='wx/flmsg-storm_report_tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report_tab.obj `if test -f 'wx/storm_report_tab.cxx'; then $(CYGPATH_W) 'wx/storm_report_tab.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report_tab.cxx'; fi` wx/flmsg-storm_report_template.o: wx/storm_report_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report_template.o -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report_template.Tpo -c -o wx/flmsg-storm_report_template.o `test -f 'wx/storm_report_template.cxx' || echo '$(srcdir)/'`wx/storm_report_template.cxx @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report_template.Tpo wx/$(DEPDIR)/flmsg-storm_report_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report_template.cxx' object='wx/flmsg-storm_report_template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report_template.o `test -f 'wx/storm_report_template.cxx' || echo '$(srcdir)/'`wx/storm_report_template.cxx wx/flmsg-storm_report_template.obj: wx/storm_report_template.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -MT wx/flmsg-storm_report_template.obj -MD -MP -MF wx/$(DEPDIR)/flmsg-storm_report_template.Tpo -c -o wx/flmsg-storm_report_template.obj `if test -f 'wx/storm_report_template.cxx'; then $(CYGPATH_W) 'wx/storm_report_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report_template.cxx'; fi` @am__fastdepCXX_TRUE@ $(am__mv) wx/$(DEPDIR)/flmsg-storm_report_template.Tpo wx/$(DEPDIR)/flmsg-storm_report_template.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='wx/storm_report_template.cxx' object='wx/flmsg-storm_report_template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flmsg_CPPFLAGS) $(CPPFLAGS) $(flmsg_CXXFLAGS) $(CXXFLAGS) -c -o wx/flmsg-storm_report_template.obj `if test -f 'wx/storm_report_template.cxx'; then $(CYGPATH_W) 'wx/storm_report_template.cxx'; else $(CYGPATH_W) '$(srcdir)/wx/storm_report_template.cxx'; fi` .cxx.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f blank-dnd/$(DEPDIR)/$(am__dirstamp) -rm -f blank-dnd/$(am__dirstamp) -rm -f cap/$(DEPDIR)/$(am__dirstamp) -rm -f cap/$(am__dirstamp) -rm -f csv/$(DEPDIR)/$(am__dirstamp) -rm -f csv/$(am__dirstamp) -rm -f custom/$(DEPDIR)/$(am__dirstamp) -rm -f custom/$(am__dirstamp) -rm -f hics/$(DEPDIR)/$(am__dirstamp) -rm -f hics/$(am__dirstamp) -rm -f iaru/$(DEPDIR)/$(am__dirstamp) -rm -f iaru/$(am__dirstamp) -rm -f ics/$(DEPDIR)/$(am__dirstamp) -rm -f ics/$(am__dirstamp) -rm -f lzma/$(DEPDIR)/$(am__dirstamp) -rm -f lzma/$(am__dirstamp) -rm -f mars/$(DEPDIR)/$(am__dirstamp) -rm -f mars/$(am__dirstamp) -rm -f plaintext/$(DEPDIR)/$(am__dirstamp) -rm -f plaintext/$(am__dirstamp) -rm -f radiogram/$(DEPDIR)/$(am__dirstamp) -rm -f radiogram/$(am__dirstamp) -rm -f redx/$(DEPDIR)/$(am__dirstamp) -rm -f redx/$(am__dirstamp) -rm -f transfer/$(DEPDIR)/$(am__dirstamp) -rm -f transfer/$(am__dirstamp) -rm -f utils/$(DEPDIR)/$(am__dirstamp) -rm -f utils/$(am__dirstamp) -rm -f widgets/$(DEPDIR)/$(am__dirstamp) -rm -f widgets/$(am__dirstamp) -rm -f wx/$(DEPDIR)/$(am__dirstamp) -rm -f wx/$(am__dirstamp) -rm -f xmlrpcpp/$(DEPDIR)/$(am__dirstamp) -rm -f xmlrpcpp/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) redx/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) blank-dnd/$(DEPDIR) cap/$(DEPDIR) csv/$(DEPDIR) custom/$(DEPDIR) hics/$(DEPDIR) iaru/$(DEPDIR) ics/$(DEPDIR) lzma/$(DEPDIR) mars/$(DEPDIR) plaintext/$(DEPDIR) radiogram/$(DEPDIR) redx/$(DEPDIR) transfer/$(DEPDIR) utils/$(DEPDIR) widgets/$(DEPDIR) wx/$(DEPDIR) xmlrpcpp/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-local .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-local ctags distclean distclean-compile \ distclean-generic distclean-hdr distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installcheck-binPROGRAMS installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-local .EXPORT_ALL_VARIABLES: nsisinst appbundle @HAVE_WINDRES_TRUE@@MINGW32_TRUE@.rc.o: @HAVE_WINDRES_TRUE@@MINGW32_TRUE@ $(WINDRES) -Iinclude -I../data/win32 $< -O coff $@ install-data-local: if test -f ../data/flmsg.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) ../data/flmsg.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f ../data/flmsg.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) ../data/flmsg.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flmsg.xpm rm -f $(DESTDIR)/$(datadir)/applications/flmsg.desktop # FL_SRC = flmsg_dialog.fl @HAVE_FLUID_TRUE@flgen: $(FL_SRC) @HAVE_FLUID_TRUE@ (cd include; \ @HAVE_FLUID_TRUE@ for f in $(FL_SRC); do \ @HAVE_FLUID_TRUE@ c=$${f%.fl}.cxx; \ @HAVE_FLUID_TRUE@ h=$${f%.fl}.h; \ @HAVE_FLUID_TRUE@ h=$${h##*/}; \ @HAVE_FLUID_TRUE@ $(FLUID) -c -o ../$$c -h $$h ../$$f; \ @HAVE_FLUID_TRUE@ done) @HAVE_NSIS_TRUE@nsisinst: $(bin_PROGRAMS) @HAVE_NSIS_TRUE@ sh ../scripts/mknsisinst.sh "../data" . @DARWIN_TRUE@appbundle: $(bin_PROGRAMS) @DARWIN_TRUE@ sh ../scripts/mkappbundle.sh "../data" . clean-local: -rm -rf $(CLEAN_LOCAL) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/flmsg-rc.rc������������������������������������������������������������������������0000664�0001750�0001750�00000000171�12330516146�012454� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <windows.h> // include for version info constants #include "flmsgrc.h" IDI_ICON ICON DISCARDABLE "flmsg.ico" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/�����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011652� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/status.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000017242�12330516146�013632� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <iostream> #include <fstream> #include <string> #include <FL/Fl_Preferences.H> #include "status.h" #include "config.h" #include "flmsg.h" #include "flmsg_dialog.h" #include "wrap.h" status progStatus = { 50, // int mainX; 50, // int mainY; 5, // int wpl; false, // bool open_on_export; 0, // int UTC // 0: HHMM, 1: HH:MM // 2: HHMMZ, 3: HH:MMZ // 4: HHMM UTC, 5: HH:MM UTC 0, // date format 0: YYYY-MM-DD, 1: MM/DD/YY, 2: DD/MM/YY "", // my_call "", // my_tel "", // my_name "", // my_addr "", // my_city "", // my_email true, // bool sernbr_fname; true, // bool call_fname; false, // bool dt_fname; true, // bool rgrnbr_fname; true, // bool arl_desc; "1", // string sernbr; "1", // string rgnbr false, // bool insert_x; RADIOGRAM, // int tab; "", 72, // charcount true, // autowordwrap "127.0.0.1", // fldigi socket address "7322", // fldigi socket port "127.0.0.1", // fldigi xmlrpc socket address "7362", // fldigi xmlrpc socket port false, // use_compression BASE64, // encoder 0, // selected_mode 0, // index default_state 0, // index default_county "", // swx_default_city; "", // swx_default_location; "", // swx_default_zone; "", // swx_default_profile; true, // change_modem_with_autosend false, // sync_modem_to_fldigi false, // force_compression false // caplocal }; void status::saveLastState() { Fl_Preferences flmsgpref(FLMSG_dir.c_str(), "w1hkj.com", PACKAGE_NAME); int mX = mainwindow->x(); int mY = mainwindow->y(); if (mX >= 0 && mX >= 0) { mainX = mX; mainY = mY; } selected_mode = cbo_modes->index(); flmsgpref.set("version", PACKAGE_VERSION); flmsgpref.set("mainx", mX); flmsgpref.set("mainy", mY); flmsgpref.set("wpl", wpl); flmsgpref.set("open_on_export", open_on_export); flmsgpref.set("utc", UTC); flmsgpref.set("dtformat", dtformat); flmsgpref.set("mycall", my_call.c_str()); flmsgpref.set("mytel", my_tel.c_str()); flmsgpref.set("myname", my_name.c_str()); flmsgpref.set("myaddr", my_addr.c_str()); flmsgpref.set("mycity", my_city.c_str()); flmsgpref.set("myemail", my_email.c_str()); flmsgpref.set("sernbr", sernbr.c_str()); flmsgpref.set("rgnbr", rgnbr.c_str()); flmsgpref.set("sernbr_fname", sernbr_fname); flmsgpref.set("rgnbr_fname", rgnbr_fname); flmsgpref.set("arl_desc", arl_desc); flmsgpref.set("call_fname", call_fname); flmsgpref.set("dt_fname", dt_fname); flmsgpref.set("insert_x", insert_x); flmsgpref.set("charcount", charcount); flmsgpref.set("autowordwrap", autowordwrap); tab = selected_form; flmsgpref.set("preset_tab", tab); flmsgpref.set("mars_roster_file", mars_roster_file.c_str()); flmsgpref.set("socket_address", socket_addr.c_str()); flmsgpref.set("socket_port", socket_port.c_str()); flmsgpref.set("use_compression", use_compression); flmsgpref.set("force_compression", force_compression); flmsgpref.set("encoder", encoder); flmsgpref.set("selected_mode", selected_mode); flmsgpref.set("swx_index_default_state", swx_index_default_state); flmsgpref.set("swx_index_default_county", swx_index_default_county); flmsgpref.set("swx_default_city", swx_default_city.c_str()); flmsgpref.set("swx_default_location", swx_default_location.c_str()); flmsgpref.set("swx_default_zone", swx_default_zone.c_str()); flmsgpref.set("swx_default_profile", swx_default_profile.c_str()); flmsgpref.set("change_modem_with_autosend", change_modem_with_autosend); flmsgpref.set("sync_modem_to_fldigi", sync_modem_to_fldigi); flmsgpref.set("caplocal", caplocal); } void status::loadLastState() { Fl_Preferences flmsgpref(FLMSG_dir.c_str(), "w1hkj.com", PACKAGE_NAME); if (flmsgpref.entryExists("version")) { int i = 0; char *defbuffer; flmsgpref.get("mainx", mainX, mainX); flmsgpref.get("mainy", mainY, mainY); flmsgpref.get("wpl", wpl, wpl); if (flmsgpref.get("open_on_export", i, i)) open_on_export = i; flmsgpref.get("utc", UTC, UTC); flmsgpref.get("dtformat", dtformat, dtformat); flmsgpref.get("mycall", defbuffer, ""); my_call = defbuffer; free(defbuffer); flmsgpref.get("mytel", defbuffer, ""); my_tel = defbuffer; free(defbuffer); flmsgpref.get("myname", defbuffer, ""); my_name = defbuffer; free(defbuffer); flmsgpref.get("myaddr", defbuffer, ""); my_addr = defbuffer; free(defbuffer); flmsgpref.get("mycity", defbuffer, ""); my_city = defbuffer; free(defbuffer); flmsgpref.get("myemail", defbuffer, ""); my_email = defbuffer; free(defbuffer); if (flmsgpref.get("sernbr", defbuffer, "")) sernbr = defbuffer; free(defbuffer); if (flmsgpref.get("rgnbr", defbuffer, "")) rgnbr = defbuffer; free(defbuffer); if (flmsgpref.get("sernbr_fname", i, i)) sernbr_fname = i; if (flmsgpref.get("arl_desc", i, i)) arl_desc = i; if (flmsgpref.get("rgnbr_fname", i, i)) rgnbr_fname = i; if (flmsgpref.get("call_fname", i, i)) call_fname = i; if (flmsgpref.get("dt_fname", i, i)) dt_fname = i; if (flmsgpref.get("insert_x", i, i)) insert_x = i; flmsgpref.get("charcount", charcount, charcount); if (flmsgpref.get("autowordwrap", i, autowordwrap)) autowordwrap = i; flmsgpref.get("preset_tab", tab, tab); flmsgpref.get("mars_roster_file", defbuffer, ""); mars_roster_file = defbuffer; free(defbuffer); if (mars_roster_file.empty()) { mars_roster_file = ICS_dir; mars_roster_file.append("MARS_ROSTER.csv"); } flmsgpref.get("socket_address", defbuffer, socket_addr.c_str()); socket_addr = defbuffer; free(defbuffer); flmsgpref.get("socket_port", defbuffer, socket_port.c_str()); socket_port = defbuffer; free(defbuffer); if (flmsgpref.get("use_compression", i, use_compression)) use_compression = i; if (flmsgpref.get("force_compression", i, force_compression)) force_compression = i; flmsgpref.get("encoder", encoder, encoder); flmsgpref.get("selected_mode", selected_mode, selected_mode); flmsgpref.get("swx_index_default_state", swx_index_default_state, swx_index_default_state); flmsgpref.get("swx_index_default_county", swx_index_default_county, swx_index_default_county); flmsgpref.get("swx_default_city", defbuffer, swx_default_city.c_str()); swx_default_city = defbuffer; free(defbuffer); flmsgpref.get("swx_default_location", defbuffer, swx_default_location.c_str()); swx_default_location = defbuffer; free(defbuffer); flmsgpref.get("swx_default_zone", defbuffer, swx_default_zone.c_str()); swx_default_zone = defbuffer; free(defbuffer); flmsgpref.get("swx_default_profile", defbuffer, swx_default_profile.c_str()); swx_default_profile = defbuffer; free(defbuffer); if (flmsgpref.get("change_modem_with_autosend", i, change_modem_with_autosend)) change_modem_with_autosend = i; if (flmsgpref.get("sync_modem_to_fldigi", i, sync_modem_to_fldigi)) sync_modem_to_fldigi = i; if (flmsgpref.get("caplocal", i, caplocal)) caplocal = i; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/base256.cxx������������������������������������������������������������������0000664�0001750�0001750�00000007643�12330516146�013462� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include "base256.h" void base256::init() { iolen = 0; iocp = 0; ateof = false; linelength = 0; } //---------------------------------------------------------------------- // fldigi uses some control codes to alter the program state // several digital modems suppress some control and high bit set // characters // // this function substitutes a two character sequence for the offending // characters //---------------------------------------------------------------------- void base256::escape(string &in, bool encode) { string out; if (encode) { for( size_t i = 0; i < in.length(); i++) { switch ((in[i] & 0xFF)) { case ':' : out.append("::"); break; case 0x00 : out.append(":0"); break; case 0x01 : out.append(":1"); break; // mt63 case 0x02 : out.append(":2"); break; case 0x03 : out.append(":3"); break; case 0x04 : out.append(":4"); break; case 0x05 : out.append(":5"); break; case 0x06 : out.append(":6"); break; case 0x07 : out.append(":7"); break; case 0x08 : out.append(":8"); break; case 0x09 : out.append(":9"); break; case '\n' : out.append(":A"); break; case '\r' : out.append(":B"); break; case '^' : out.append(":C"); break; case 0x7F : out.append(":D"); break; case 0xFF : out.append(":E"); break; // mt63 default: out += in[i]; } } } else { unsigned char ch = 0; for (size_t i = 0; i < in.length(); i++) { ch = in[i] & 0xFF; if (ch == ':') { i++; ch = in[i] & 0xFF; switch (ch) { case ':' : out += ':'; break; case '0' : out += ' '; out[out.length() - 1] = 0x00; break; case '1' : out += 0x01; break; case '2' : out += 0x02; break; case '3' : out += 0x03; break; case '4' : out += 0x04; break; case '5' : out += 0x05; break; case '6' : out += 0x06; break; case '7' : out += 0x07; break; case '8' : out += 0x08; break; case '9' : out += 0x09; break; case 'A' : out += '\n'; break; case 'B' : out += '\r'; break; case 'C' : out += '^'; break; case 'D' : out += 0x7F; break; case 'E' : out += 0xFF; break; } } else out += ch; } } in = out; } void base256::addlf(string &in) { string out; int len = 0; for (size_t n = 0; n < in.length(); n++) { if (len < LINELEN) {out += in[n]; len++;} else {out += '\n'; out += in[n]; len = 0;} } in.assign(out); } void base256::remlf(string &in) { string out; for (size_t n = 0; n < in.length(); n++) { if (in[n] != '\n') out += in[n]; } in.assign(out); } string base256::encode(string &in) { char insize[20]; snprintf(insize, sizeof(insize), "%d\n", in.length()); output.assign(insize); iocp = 0; ateof = false; string temp (in); escape (temp); addlf(temp); output.append(temp); return output; } string base256::decode(string &in) { size_t nbr = 0; string output = in; size_t p = output.find("\n"); if (p == string::npos) return "ERROR: base256 missing character count"; sscanf(output.substr(0, p).c_str(), "%d", &nbr); output.erase(0, p+1); remlf(output); escape(output, false); return output; } ���������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/debug.cxx��������������������������������������������������������������������0000664�0001750�0001750�00000013264�12330516146�013375� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // debug.cxx // // Copyright (C) 2008, 2012 // Stelios Bounanos, M0GLD, Dave Freese, W1HKJ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <cstdio> #include <cstring> #include <cstdarg> #include <string> #include <iostream> #include <fstream> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <time.h> #include <FL/Fl.H> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Slider.H> #include <FL/Fl_Button.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_Menu_Button.H> #include <FL/Fl_Browser.H> #include "debug.h" #include "icons.h" #include "gettext.h" #include "flmsg.h" using namespace std; #define MAX_LINES 65536 static FILE* wfile; static FILE* rfile; static int rfd; static Fl_Double_Window* window; static Fl_Browser* btext; static string dbg_buffer; debug* debug::inst = 0; debug::level_e debug::level = debug::INFO_LEVEL; uint32_t debug::mask = ~0u; const char* prefix[] = { _("Quiet"), _("Error"), _("Warning"), _("Info"), _("Debug") }; static void slider_cb(Fl_Widget* w, void*); static void clear_cb(Fl_Widget *w, void*); static void save_cb(Fl_Widget *w, void*); static void synctext(void *); void debug::start(const char* filename) { if (debug::inst) return; inst = new debug(filename); window = new Fl_Double_Window(600, 256, _("Event log")); int pad = 2; Fl_Slider* slider = new Fl_Slider(pad, pad, 128, 20, prefix[level]); slider->tooltip(_("Change log level")); slider->align(FL_ALIGN_RIGHT); slider->type(FL_HOR_NICE_SLIDER); slider->range(0.0, LOG_NLEVELS - 1); slider->step(1.0); slider->value(level); slider->callback(slider_cb); Fl_Button* savebtn = new Fl_Button(window->w() - 124, pad, 60, 20, "save"); savebtn->callback(save_cb); Fl_Button* clearbtn = new Fl_Button(window->w() - 60, pad, 60, 20, "clear"); clearbtn->callback(clear_cb); btext = new Fl_Browser(pad, slider->h()+pad, window->w()-2*pad, window->h()-slider->h()-2*pad, 0); btext->textfont(FL_COURIER); window->resizable(btext); dbg_buffer.clear(); window->end(); } void debug::stop(void) { delete inst; inst = 0; delete window; } static char fmt[1024]; static char sztemp[1024]; static string estr = ""; bool debug_in_use = false; void debug::log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; snprintf(fmt, sizeof(fmt), "%c: %s: %s\n", *prefix[level], func, format); while(debug_in_use) MilliSleep(10); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); va_end(args); fprintf(wfile, "%s", sztemp); fflush(wfile); Fl::awake(synctext, 0); MilliSleep(10); } void debug::slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; snprintf(fmt, sizeof(fmt), "%c:%s\n", *prefix[level], format); while(debug_in_use) MilliSleep(10); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); va_end(args); fflush(wfile); Fl::awake(synctext, 0); MilliSleep(10); } void debug::elog(const char* func, const char* srcf, int line, const char* text) { log(ERROR_LEVEL, func, srcf, line, "%s: %s", text, strerror(errno)); } void debug::show(void) { window->show(); } void debug::sync_text(void* arg) { debug_in_use = true; size_t p0 = 0, p1 = estr.find('\n'); while (p1 != string::npos) { btext->insert(1, estr.substr(p0,p1-p0).c_str()); dbg_buffer.append(estr.substr(p0, p1 - p0)).append("\n"); p0 = p1 + 1; p1 = estr.find('\n', p0); } estr = ""; debug_in_use = false; } debug::debug(const char* filename) { if ((wfile = fopen(filename, "w")) == NULL) throw strerror(errno); setvbuf(wfile, (char*)NULL, _IOLBF, 0); if ((rfile = fopen(filename, "r")) == NULL) throw strerror(errno); rfd = fileno(rfile); #ifndef __WIN32__ int f; if ((f = fcntl(rfd, F_GETFL)) == -1) throw strerror(errno); if (fcntl(rfd, F_SETFL, f | O_NONBLOCK) == -1) throw strerror(errno); #endif } debug::~debug() { fclose(wfile); fclose(rfile); } static void synctext(void *d) { debug_in_use = true; size_t p0 = 0, p1 = estr.find('\n'); while (p1 != string::npos) { btext->insert(1, estr.substr(p0,p1-p0).c_str()); p0 = p1 + 1; p1 = estr.find('\n', p0); } estr = ""; debug_in_use = false; } static void slider_cb(Fl_Widget* w, void*) { debug::level = (debug::level_e)((Fl_Slider*)w)->value(); w->label(prefix[debug::level]); w->parent()->redraw(); } static void clear_cb(Fl_Widget* w, void*) { btext->clear(); dbg_buffer.clear(); } static void save_cb(Fl_Widget* w, void*) { if (!btext->size()) return; string filename = FLMSG_dir; filename.append("events.txt"); ofstream out; out.open(filename.c_str(), ios::app); out << dbg_buffer; out.close(); fl_alert2("Saved in %s", filename.c_str()); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/wrap.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000043223�12330516146�013256� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// WRAP - wrap.cxx // // Author: Dave Freese, W1HKJ // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <unistd.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include <math.h> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "pixmaps.h" #include "base64.h" #include "base128.h" #include "base256.h" #include "lzma/LzmaLib.h" #include "status.h" #include "flmsg_config.h" #include "timeops.h" #include "socket.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> #ifdef WIN32 # include <winsock2.h> #else # include <arpa/inet.h> #endif using namespace std; Socket *tcpip = (Socket *)0; Address *localaddr = (Address *)0; const char *wrap_beg = "[WRAP:beg]"; const char *wrap_end = "[WRAP:end]"; const char *wrap_crlf = "[WRAP:crlf]"; const char *wrap_lf = "[WRAP:lf]"; const char *wrap_chksum = "[WRAP:chksum "; const char *b64_start = "[b64:start]"; const char *b64_end = "[b64:end]"; const char *b128_start = "[b128:start]\n"; const char *b128_end = "\n[b128:end]"; const char *b256_start = "[b256:start]\n"; const char *b256_end = "\n[b256:end]"; const char *wrap_fn = "[WRAP:fn "; const char *dashes = "\n====================\n"; //const char *binaryfile[] = { // ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".ico", ".zip", ".gz", ".tgz", ".bz2", 0 }; string test_version = "1.1.23A"; bool old_version = false; Ccrc16 chksum; base64 b64(1); // insert lf for ease of viewing base128 b128; base256 b256; string inptext = ""; string wtext = ""; string check = ""; string wrap_outfilename = ""; string wrap_inpfilename = ""; string wrap_inpshortname = ""; string wrap_outshortname = ""; string wrap_foldername = ""; bool isExtension(const char *s1, const char *s2) { #ifdef WIN32 char *sz1 = new char[strlen(s1) + 1]; char *sz2 = new char[strlen(s2) + 1]; char *p = 0; strcpy(sz1, s1); strcpy(sz2, s2); for (size_t i = 0; i < strlen(sz1); i++) sz1[i] = toupper(sz1[i]); for (size_t i = 0; i < strlen(sz2); i++) sz2[i] = toupper(sz2[i]); p = strstr(sz1, sz2); delete [] sz1; delete [] sz2; return (p != 0); #else const char *p = strcasestr(s1, s2); #endif return (p != 0); } void base64encode(string &inptext) { string outtext; outtext = b64.encode(inptext); inptext = b64_start; inptext.append(outtext); inptext.append(b64_end); } void base128encode(string &inptext) { string outtext; outtext = b128.encode(inptext); inptext = b128_start; inptext.append(outtext); inptext.append(b128_end); } void base256encode(string &inptext) { string outtext = b256.encode(inptext); inptext = b256_start; inptext.append(outtext); inptext.append(b256_end); } // escape chars that cause transmission problems // compabible with flwrap void dress(string &str) { string s = ""; if (str.empty()) return; size_t p = 0; string rpl = ""; unsigned char ch; for (p = 0; p < str.length(); p++) { ch = str[p] & 0xFF; rpl = ch; if (ch == ' ') rpl = " "; else if ( ch == '|') rpl = "||"; else if (ch >= 0x80 && ch < 0xC0) { rpl = "|-"; rpl += (ch - 0x60); } else if (ch >= 0xC0) { rpl = "|"; rpl += (ch - 0xA0); } else if (ch < ' ') { rpl = " "; rpl += (ch + '0'); } s.append(rpl); } str = s; } void strip(string &s) { if (s.empty()) return; size_t p = 0; unsigned char ch; string str = ""; for (p = 0; p < s.length(); p++) { ch = s[p] & 0xFF; if (s.find("|+", p) == p) { ch = (s[p+2] & 0xFF) - 0x20; p += 2; } if (s.find("|-", p) == p) { ch = (s[p+2] & 0xFF) + 0x60; p += 2; } if (s.find("|_", p) == p) { ch = (s[p+2] & 0xFF) + 0xA0; p += 2; } if (s.find("||", p) == p) { ch = '|'; p++; } str += ch; } s = str; } void convert2crlf(string &s) { size_t p = s.find('\n', 0); while (p != string::npos) { s.replace(p, 1, "\r\n"); p = s.find('\n', p + 2); } } bool convert2lf(string &s) { bool converted = false; size_t p = s.find("\r\n", 0); while (p != string::npos) { s.replace(p, 2, "\n"); p = s.find("\r\n", p + 1); converted = true; } return converted; } #define LZMA_STR "\1LZMA" void compress_maybe(string& input, bool file_transfer) { if (!progStatus.use_compression && !file_transfer) return; // allocate 110% of the original size for the output buffer size_t outlen = (size_t)ceil(input.length() * 1.1); unsigned char* buf = new unsigned char[outlen]; size_t plen = LZMA_PROPS_SIZE; unsigned char outprops[LZMA_PROPS_SIZE]; uint32_t origlen = htonl(input.length()); string bufstr; if (progStatus.use_compression || file_transfer) { // replace input with: LZMA_STR + original size (in network byte order) + props + data int r; bufstr.assign(LZMA_STR); if ((r = LzmaCompress( buf, &outlen, (const unsigned char*)input.data(), input.length(), outprops, &plen, 4, 0, -1, -1, -1, -1, -1) ) == SZ_OK) { bufstr.append((const char*)&origlen, sizeof(origlen)); bufstr.append((const char*)&outprops, sizeof(outprops)); bufstr.append((const char*)buf, outlen); if (file_transfer && input.length() < bufstr.length()) bufstr.assign(input); } else { LOG_ERROR("Lzma Compress failed: %s", LZMA_ERRORS[r]); bufstr.assign(input); } if (progStatus.encoder == BASE128) base128encode(bufstr); else if (progStatus.encoder == BASE256) base256encode(bufstr); else base64encode(bufstr); } delete [] buf; if (progStatus.force_compression || file_transfer || bufstr.length() < input.length()) { LOG_INFO("Input size %d, Compressed size %d", (int)input.length(), (int)bufstr.length()); input = bufstr; } return; } void decompress_maybe(string& input) { // input is LZMA_STR + original size (in network byte order) + props + data // if (input.find(LZMA_STR) == string::npos) // return; int encode = BASE64; size_t p0 = string::npos, p1 = string::npos, p2 = string::npos, p3 = string::npos; if ((p0 = p1 = input.find(b64_start)) != string::npos) { p1 += strlen(b64_start); p2 = input.find(b64_end, p1); } else if ((p0 = p1 = input.find(b128_start)) != string::npos) { p1 += strlen(b128_start); p2 = input.find(b128_end, p1); encode = BASE128; } else if ((p0 = p1 = input.find(b256_start)) != string::npos) { p1 += strlen(b256_start); p2 = input.find(b256_end, p1); encode = BASE256; } if (p2 == string::npos) { if (encode == BASE256) LOG_ERROR("%s", "Base 256 decode failed"); else if (encode == BASE128) LOG_ERROR("%s", "Base 128 decode failed"); else if (encode == BASE64) LOG_ERROR("%s", "Base 64 decode failed"); return; } switch (encode) { case BASE128 : p3 = p2 + strlen(b128_end); break; case BASE256 : p3 = p2 + strlen(b256_end); break; case BASE64 : default : p3 = p2 + strlen(b64_end); } string cmpstr = input.substr(p1, p2-p1); switch (encode) { case BASE128 : cmpstr = b128.decode(cmpstr); break; case BASE256 : cmpstr = b256.decode(cmpstr); break; case BASE64 : default: cmpstr = b64.decode(cmpstr); } if (cmpstr.find("ERROR") != string::npos) { LOG_ERROR("%s", cmpstr.c_str()); return; } if (cmpstr.find(LZMA_STR) == string::npos) { input.replace(p0, p3 - p0, cmpstr); return; } const char* in = cmpstr.data(); size_t outlen = ntohl(*reinterpret_cast<const uint32_t*>(in + strlen(LZMA_STR))); if (outlen > 1 << 25) { LOG_ERROR("%s", "Refusing to decompress data (> 32 MiB)"); return; } unsigned char* buf = new unsigned char[outlen]; unsigned char inprops[LZMA_PROPS_SIZE]; memcpy(inprops, in + strlen(LZMA_STR) + sizeof(uint32_t), LZMA_PROPS_SIZE); size_t inlen = cmpstr.length() - strlen(LZMA_STR) - sizeof(uint32_t) - LZMA_PROPS_SIZE; int r; if ((r = LzmaUncompress(buf, &outlen, (const unsigned char*)in + cmpstr.length() - inlen, &inlen, inprops, LZMA_PROPS_SIZE)) != SZ_OK) LOG_ERROR("Lzma Uncompress failed: %s", LZMA_ERRORS[r]); else { LOG_INFO("Decompress: in = %ld, out = %ld", (long int)inlen, (long int)outlen); cmpstr.assign((const char*)buf, outlen); input.replace(p0, p3 - p0, cmpstr); } delete [] buf; } bool wrapfile(bool with_ext) { bool iscrlf = false; if (with_ext) wrap_outfilename.append(WRAP_EXT); wrap_outshortname = fl_filename_name(wrap_outfilename.c_str()); // checksum & data transfer always based on Unix end-of-line char iscrlf = convert2lf(inptext); string originalfilename = wrap_fn; originalfilename.append(wrap_inpshortname); originalfilename += ']'; inptext.insert(0, originalfilename); check = chksum.scrc16(inptext); string ostr(wrap_beg); ostr.append(iscrlf ? wrap_crlf : wrap_lf); ostr.append(inptext).append(wrap_chksum).append(check).append("]"); ostr.append(wrap_end); ofstream wrapstream(wrap_outfilename.c_str(), ios::binary); if (wrapstream) { LOG_INFO("Writing wrapfile: %s", wrap_outfilename.c_str()); wrapstream << ostr; wrapstream.close(); } else { LOG_INFO("Cannot write to: %s", wrap_outfilename.c_str()); errtext = "Cannot open output file"; return false; } return true; } // all of this crlf checking is necessary because the original file may have had crlf pairs // or the OS save may have inserted them into the text (MSDOS) har! bool unwrapfile() { size_t p, p1, p2, p3, p4; string testsum; string inpsum; bool iscrlf = false; p1 = inptext.find(wrap_beg); if (p1 == string::npos) { errtext = "Not a wrap file"; LOG_INFO("%s", errtext.c_str()); return false; } p1 = inptext.find(wrap_crlf); if (p1 != string::npos) { // original text had crlf pairs iscrlf = true; p1 += strlen(wrap_crlf); } else { p1 = inptext.find(wrap_lf); if (p1 == string::npos) { errtext = "Invalid file"; LOG_INFO("%s", errtext.c_str()); return false; } p1 += strlen(wrap_lf); } p2 = inptext.find(wrap_chksum, p1); if (p2 == string::npos) return false; wtext = inptext.substr(p1, p2-p1); // this is the original document p3 = p2 + strlen(wrap_chksum); p4 = inptext.find(']', p3); if (p4 == string::npos) { errtext = "Cannot find checksum in file"; LOG_INFO("%s", errtext.c_str()); return false; } inpsum = inptext.substr(p3, p4-p3); p4 = inptext.find(wrap_end, p4); if (p4 == string::npos) { errtext = "No end tag in file"; LOG_INFO("%s", errtext.c_str()); return false; } testsum = chksum.scrc16(wtext); // if failure see if there are CRLF's in the file if (testsum != inpsum) { LOG_ERROR("%s", "Test for CRLF corrupted file!\n"); p = inptext.find("\r\n"); while (p != string::npos) { inptext.erase(p, 1); p = inptext.find("\r\n"); } p1 = inptext.find(wrap_beg); if (p1 == string::npos) { errtext = "Not a wrap file"; LOG_INFO("%s", errtext.c_str()); return false; } p1 = inptext.find(wrap_crlf); if (p1 != string::npos) { // original text had crlf pairs iscrlf = true; p1 += strlen(wrap_crlf); } else { p1 = inptext.find(wrap_lf); if (p1 == string::npos) { errtext = "Invalid file"; LOG_INFO("%s", errtext.c_str()); return false; } p1 += strlen(wrap_lf); } p2 = inptext.find(wrap_chksum, p1); if (p2 == string::npos) return false; wtext = inptext.substr(p1, p2-p1); // this is the original document p3 = p2 + strlen(wrap_chksum); p4 = inptext.find(']', p3); if (p4 == string::npos) { errtext = "Cannot find checksum in file"; LOG_INFO("%s", errtext.c_str()); return false; } inpsum = inptext.substr(p3, p4-p3); p4 = inptext.find(wrap_end, p4); if (p4 == string::npos) { errtext = "No end tag in file"; LOG_INFO("%s", errtext.c_str()); return false; } testsum = chksum.scrc16(wtext); } if (inpsum != testsum) { errtext = "Checksum failed\n"; errtext.append(inpsum); errtext.append(" in file\n"); errtext.append(testsum); errtext.append(" computed\nFile contents:\n"); errtext.append(wtext); LOG_INFO("%s", errtext.c_str()); return false; } if (wtext.find(wrap_fn) == 0) { size_t p = wtext.find(']'); wrap_outshortname = wtext.substr(0, p); wrap_outshortname.erase(0, strlen(wrap_fn)); wtext.erase(0,p+1); // check for protocol abuse bool t1 = (wrap_outshortname.find('/') != string::npos); bool t2 = (wrap_outshortname.find('\\') != string::npos); bool t3 = (wrap_outshortname == "."); bool t4 = (wrap_outshortname == ".."); bool t5 = (wrap_outshortname.find(":") != string::npos); bool t6 = wrap_outshortname.empty(); if (t1 || t2 || t3 || t4 || t5 || t6) { errtext = "Filename corrupt, possible protocol abuse\n"; if (t1) errtext.append("Filename contains '/' character\n"); if (t2) errtext.append("Filename contains '\\' character\n"); if (t3) errtext.append("Filename contains leading '.' character\n"); if (t4) errtext.append("Filename contains leading '..' string\n"); if (t5) errtext.append("Filename contains MS directory specifier\n"); if (t6) errtext.append("Filename is empty\n"); LOG_INFO("%s", errtext.c_str()); return false; } wrap_outfilename = wrap_foldername; wrap_outfilename.append(wrap_outshortname); } else { p1 = wrap_outfilename.find(WRAP_EXT); if (p1 != string::npos) wrap_outfilename.erase(p1); } if (iscrlf) convert2crlf(wtext); decompress_maybe(wtext); if (old_version) strip(wtext); return true; } void check_version() { size_t p = inptext.find("<flmsg>"); if (p == string::npos) return; p += 7; size_t p1 = inptext.find("\n", p); if (p1 == string::npos) return; if (inptext.substr(p, p1 - p) < test_version) old_version = true; } bool readfile() { old_version = false; char cin; ifstream textfile; textfile.open(wrap_inpfilename.c_str(), ios::binary); if (textfile) { inptext.erase(); while (textfile.get(cin)) inptext += cin; textfile.close(); check_version(); return true; } return false; } bool import_wrapfile( string src_fname, string &extracted_fname, string &extracted_text) { wrap_inpfilename = src_fname; if (readfile()) if (unwrapfile()) { extracted_fname = wrap_outshortname; extracted_text = wtext; return true; } extracted_fname = "badfile"; extracted_text = inptext; return false; } void connect_to_fldigi() { try { if (!localaddr) localaddr = new Address(progStatus.socket_addr.c_str(), progStatus.socket_port.c_str()); if (!tcpip) { tcpip = new Socket(*localaddr); tcpip->set_timeout(0.01); tcpip->connect(); LOG_INFO("Connected to %d", tcpip->fd()); } } catch (const SocketException& e) { LOG_ERROR("Socket error: %d, %s", e.error(), e.what()); delete localaddr; delete tcpip; localaddr = 0; tcpip = 0; throw; } return; } void disconnect_from_fldigi() { if (!tcpip) return; tcpip->close(); delete tcpip; delete localaddr; tcpip = 0; localaddr = 0; } void xfr_via_socket(string basename, string inptext) { bool iscrlf = false; // checksum & data transfer always based on Unix end-of-line char iscrlf = convert2lf(inptext); string payload = wrap_fn; payload.assign(wrap_fn).append(basename).append("]"); payload.append(inptext); check = chksum.scrc16(payload); // socket interface string autosend; autosend.assign("\n\n\n... start\n").append(wrap_beg); autosend.append(iscrlf ? wrap_crlf : wrap_lf); autosend.append(payload); autosend.append(wrap_chksum).append(check).append("]"); autosend.append(wrap_end).append("\n... end\n\n\n"); try { if (!tcpip) connect_to_fldigi(); tcpip->send(autosend.c_str()); } catch (const SocketException& e) { LOG_ERROR("Socket error: %d, %s", e.error(), e.what()); if (tcpip) disconnect_from_fldigi(); return; } LOG_INFO("Sent %s", basename.c_str()); static char szDt[200]; time_t tmptr; tm sTime; time (&tmptr); gmtime_r (&tmptr, &sTime); if (strftime(szDt, sizeof(szDt), "%Y-%m-%d,%H%M", &sTime) == 0) { LOG_ERROR("%s", "strftime conversion error"); return; } string xfrstr = basename; xfrstr.append(",").append(szDt); LOG_INFO("transfered %s", xfrstr.c_str()); string xfrs = ICS_dir; xfrs.append("auto_sent.csv"); ofstream xfr_rec_file(xfrs.c_str(), ios::app); if (xfr_rec_file.fail()) { LOG_ERROR("Could not open %s", xfrs.c_str()); return; } long fsize = xfr_rec_file.tellp(); if (fsize == 0) xfr_rec_file << "FILE_NAME,DATE,GMT" << "\n"; xfr_rec_file << xfrstr << "\n"; xfr_rec_file.close(); return; } void export_wrapfile(string basename, string fname, string data_text, bool with_ext) { wrap_inpshortname = basename; wrap_outfilename = fname; inptext = data_text; wrapfile(with_ext); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/base64.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000007052�12330516146�013371� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "base64.h" void base64::init() { iolen = 0; iocp = 0; ateof = false; linelength = 0; // create the etable for encoding for (int i = 0; i < 9; i++) { etable[i] = 'A' + i; etable[i + 9] = 'J' + i; etable[26 + i] = 'a' + i; etable[26 + i + 9] = 'j' + i; } for (int i = 0; i < 8; i++) { etable[i + 18] = 'S' + i; etable[26 + i + 18] = 's' + i; } for (int i = 0; i < 10; i++) etable[52 + i] = '0' + i; etable[62] = '+'; etable[63] = '/'; // create the dtable for decoding for (int i= 0; i < 255; i++) dtable[i] = 0x80; for (int i = 'A'; i <= 'I'; i++) dtable[i] = 0 + (i - 'A'); for (int i = 'J'; i <= 'R'; i++) dtable[i] = 9 + (i - 'J'); for (int i = 'S'; i <= 'Z'; i++) dtable[i] = 18 + (i - 'S'); for (int i = 'a'; i <= 'i'; i++) dtable[i] = 26 + (i - 'a'); for (int i = 'j'; i <= 'r'; i++) dtable[i] = 35 + (i - 'j'); for (int i = 's'; i <= 'z'; i++) dtable[i] = 44 + (i - 's'); for (int i = '0'; i <= '9'; i++) dtable[i] = 52 + (i - '0'); dtable[(int)'+'] = 62; dtable[(int)'/'] = 63; dtable[(int)'='] = 0; } string base64::encode(string in) { int n; byte igroup[3], ogroup[4]; output = "\n"; iocp = 0; ateof = false; if (crlf) linelength = 0; iolen = in.length(); while (!ateof) { igroup[0] = igroup[1] = igroup[2] = 0; for (n = 0; n < 3; n++) { if (iocp == iolen) { ateof = true; break; } igroup[n] = (byte)in[iocp]; iocp++; } if (n > 0) { ogroup[0] = etable[igroup[0] >> 2]; ogroup[1] = etable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)]; ogroup[2] = etable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)]; ogroup[3] = etable[igroup[2] & 0x3F]; if (n < 3) ogroup[3] = '='; if (n < 2) ogroup[2] = '='; for (int i = 0; i < 4; i++) { if (crlf) if (linelength >= LINELEN) { output += '\n'; linelength = 0; } output += (byte)ogroup[i]; if (crlf) linelength++; } } } if (crlf) output += '\n'; return output; } string base64::decode(string in) { int i; output = ""; iocp = 0; iolen = in.length(); byte c; while (iocp < iolen) { byte a[4], b[4], o[3]; for (i = 0; i < 4; i++) { if (iocp == iolen) { output = "b64 file length error.\n"; return output; } c = in[iocp++]; while (c <= ' ') { if (iocp == iolen) { return output; } c = in[iocp++]; } if (dtable[c] & 0x80) { output = "Illegal character in b64 file.\n"; return output; } a[i] = c; b[i] = (byte)dtable[c]; } o[0] = (b[0] << 2) | (b[1] >> 4); o[1] = (b[1] << 4) | (b[2] >> 2); o[2] = (b[2] << 6) | b[3]; output += o[0]; if (a[2] != '=') { output += o[1]; if (a[3] != '=') output += o[2]; } } return output; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/base128.cxx������������������������������������������������������������������0000664�0001750�0001750�00000013245�12330516146�013453� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include "base128.h" //---------------------------------------------------------------------- // base 128 class //---------------------------------------------------------------------- void base128::init() { iolen = 0; iocp = 0; ateof = false; linelength = 0; } //---------------------------------------------------------------------- // fldigi uses some control codes to alter the program state // several digital modems suppress some control and high bit set // characters // // this function substitutes a two character sequence for the offending // characters //---------------------------------------------------------------------- void base128::escape(string &in, bool encode) { string out; if (encode) { for( size_t i = 0; i < in.length(); i++) { switch ((in[i] & 0xFF)) { case ':' : out.append("::"); break; case 0x00 : out.append(":0"); break; case 0x01 : out.append(":1"); break; // mt63 case 0x02 : out.append(":2"); break; case 0x03 : out.append(":3"); break; case 0x04 : out.append(":4"); break; case 0x05 : out.append(":5"); break; case 0x06 : out.append(":6"); break; case 0x07 : out.append(":7"); break; case 0x08 : out.append(":8"); break; case 0x09 : out.append(":9"); break; case '\n' : out.append(":A"); break; case '\r' : out.append(":B"); break; case '^' : out.append(":C"); break; case 0x7F : out.append(":D"); break; case 0xFF : out.append(":E"); break; // mt63 default: out += in[i]; } } } else { unsigned char ch = 0; for (size_t i = 0; i < in.length(); i++) { ch = in[i] & 0xFF; if (ch == ':') { i++; ch = in[i] & 0xFF; switch (ch) { case ':' : out += ':'; break; case '0' : out += ' '; out[out.length() - 1] = 0x00; break; case '1' : out += 0x01; break; case '2' : out += 0x02; break; case '3' : out += 0x03; break; case '4' : out += 0x04; break; case '5' : out += 0x05; break; case '6' : out += 0x06; break; case '7' : out += 0x07; break; case '8' : out += 0x08; break; case '9' : out += 0x09; break; case 'A' : out += '\n'; break; case 'B' : out += '\r'; break; case 'C' : out += '^'; break; case 'D' : out += 0x7F; break; case 'E' : out += 0xFF; break; } } else out += ch; } } in = out; } void base128::addlf(string &in) { string out; int len = 0; for (size_t n = 0; n < in.length(); n++) { if (len < LINELEN) {out += in[n]; len++;} else {out += '\n'; out += in[n]; len = 0;} } in.assign(out); } void base128::remlf(string &in) { string out; for (size_t n = 0; n < in.length(); n++) { if (in[n] != '\n') out += in[n]; } in.assign(out); } string base128::encode(string &in) { size_t n; byte igroup[7], ogroup[8]; char insize[20]; snprintf(insize, sizeof(insize), "%d\n", in.length()); output.assign(insize); iocp = 0; ateof = false; iolen = in.length(); string temp; while (!ateof) { igroup[0] = igroup[1] = igroup[2] = igroup[3] = igroup[4] = igroup[5] = igroup[6] = 0; for (n = 0; n < 7; n++) { if (iocp == iolen) { ateof = true; break; } igroup[n] = (byte)in[iocp]; iocp++; } if (n > 0) { ogroup[0] = (igroup[0] >> 1) & 0x7F; ogroup[1] = ((igroup[0] << 6) & 0x40) | ((igroup[1] >> 2) & 0x3F); ogroup[2] = ((igroup[1] << 5) & 0x60) | ((igroup[2] >> 3) & 0x1F); ogroup[3] = ((igroup[2] << 4) & 0x70) | ((igroup[3] >> 4) & 0x0F); ogroup[4] = ((igroup[3] << 3) & 0x78) | ((igroup[4] >> 5) & 0x07); ogroup[5] = ((igroup[4] << 2) & 0x7C) | ((igroup[5] >> 6) & 0x03); ogroup[6] = ((igroup[5] << 1) & 0x7E) | ((igroup[6] >> 7) & 0x01); ogroup[7] = (igroup[6] & 0x7F); for (int i = 0; i < 8; i++) temp += (byte)ogroup[i]; } } escape (temp); addlf(temp); output.append(temp); return output; } string base128::decode(string &in) { int i; size_t nbr = 0; string temp = in; size_t p = temp.find("\n"); if (p == string::npos) return "ERROR: b128 missing character count"; sscanf(temp.substr(0, p).c_str(), "%d", &nbr); temp.erase(0, p+1); remlf(temp); escape(temp, false); output.clear(); if (temp.length() % 8) return "ERROR: b128 file length error.\n"; iocp = 0; iolen = temp.length(); byte b[8], o[7]; int k = 0; while (iocp < nbr) { for (i = 0; i < 7; i++) o[i] = 0; for (i = 0; i < 8; i++) b[i] = temp[k + i]; k += 8; o[0] = ((b[0] << 1) & 0xFE) | ((b[1] >> 6) & 0x01); o[1] = ((b[1] << 2) & 0xFC) | ((b[2] >> 5) & 0x03); o[2] = ((b[2] << 3) & 0xF8) | ((b[3] >> 4) & 0x07); o[3] = ((b[3] << 4) & 0xF0) | ((b[4] >> 3) & 0x0F); o[4] = ((b[4] << 5) & 0xE0) | ((b[5] >> 2) & 0x1F); o[5] = ((b[5] << 6) & 0xC0) | ((b[6] >> 1) & 0x3F); o[6] = ((b[6] << 7) & 0x80) | (b[7] & 0x7F); for (i = 0; i < 7; i++) { if (iocp++ < nbr) output += o[i]; } } return output; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/parse_xml.cxx����������������������������������������������������������������0000664�0001750�0001750�00000072136�12330516146�014304� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "config.h" #include "flmsg_config.h" #include <fstream> #include <string> #include <list> #include <cstring> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <FL/filename.H> #include "parse_xml.h" #include "fileselect.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "config.h" #include "status.h" using namespace std; //====================================================================== string strXML; //====================================================================== void trim (string &s) { size_t end = s.length(); while (end && (s[end-1] == ' ' || s[end-1] == '\n')) { s.erase(end-1, 1); end = s.length(); } while (s.length() && (s[0] == ' ' || s[0] == '\n')) { s.erase(0,1); } } struct xmlspec { const char *c; const char *str; }; xmlspec xmlspecial[] = { {"&", "&amp;" }, // must be first substitution {"\'", "&apos;"}, {"\"", "&quot;"}, { 0, 0 }}; void to_xml(string &s) { size_t pos; for (int i = 0; i < 3; i++) { pos = 0; while ((pos = s.find(xmlspecial[i].c, pos)) != string::npos) { s.replace(pos, 1, xmlspecial[i].str); pos += strlen(xmlspecial[i].str); } } } void fm_xml(string &s) { size_t pos = 0; for (int i = 0; i < 3; i++) { pos = 0; while ((pos = s.find(xmlspecial[i].str, pos)) != string::npos) { s.replace(pos, strlen(xmlspecial[i].str), xmlspecial[i].c); pos += strlen(xmlspecial[i].c); } } } xmlspec htmlspecial[] = { {"&", "&amp;" }, // must be first substitution {"\"", "&quot;"}, { 0, 0 }}; void to_html(string &s) { size_t pos; for (int i = 0; i < 2; i++) { pos = 0; while ((pos = s.find(htmlspecial[i].c, pos)) != string::npos) { s.replace(pos, 1, htmlspecial[i].str); pos += strlen(htmlspecial[i].str); } } } void fm_html(string &s) { size_t pos = 0; for (int i = 0; i < 2; i++) { pos = 0; while ((pos = s.find(htmlspecial[i].str, pos)) != string::npos) { s.replace(pos, strlen(htmlspecial[i].str), htmlspecial[i].c); pos += strlen(htmlspecial[i].c); } } } //===================================================================== //generic xml tag parse functions size_t tag_end(size_t p0, string xml) { size_t p1, p2, p3; p1 = p0; string strtag = "</"; p2 = xml.find(">", p0); p3 = xml.find(" ", p0); if (p2 == string::npos) { return p2; } if (p3 < p2) p2 = p3; strtag.append(xml.substr(p1 + 1, p2 - p1 - 1)); strtag.append(">"); p3 = xml.find(strtag, p1); return p3; } size_t next_tag(size_t p0, string xml) { p0 = xml.find("<", p0); return p0; } string get_element(size_t p0, string xml) { size_t p1 = xml.find(">",p0), p2 = tag_end(p0, xml); if (p1 == string::npos || p2 == string::npos) return ""; p1++; p2--; while (p1 < p2 && xml[p1] == ' ') p1++; // skip leading spaces while (p1 < p2 && xml[p2] == ' ') p2--; // skip trailing spaces return xml.substr(p1, p2 - p1 + 1); } int get_int(size_t p0, string xml) { string stemp = get_element(p0, xml); if (stemp.length() == 0) return 0; return atoi(stemp.c_str()); } float get_float(size_t p0, string xml) { string stemp = get_element(p0, xml); if (stemp.length() == 0) return 0; return atof(stemp.c_str()); } bool get_bool( size_t p0, string xml) { string stemp = get_element(p0, xml); if (stemp.length() == 0) return false; if (strcasecmp(stemp.c_str(), "true") == 0) return true; return false; } char get_byte(size_t p0, string xml) { unsigned int val; if (sscanf( get_element(p0, xml).c_str(), "%x", &val ) != 1) return 0; return (val & 0xFF); } string get_bytes(size_t p0, string xml) { unsigned int val; size_t space; string stemp = get_element(p0, xml); string s; while ( stemp.length() ) { if (sscanf( stemp.c_str(), "%x", &val) != 1) { s = ""; return s; } s += (char)(val & 0xFF); space = stemp.find(" "); if (space == string::npos) break; stemp.erase(0, space + 1); } return s; } bool is_int(size_t p0, int &i, string xml) { if (xml.find("<INT", p0) != p0) return false; i = get_int(p0, xml); return true; } bool is_byte(size_t p0, char &ch, string xml) { if (xml.find("<BYTE", p0) != p0) return false; ch = get_byte(p0, xml); return true; } bool is_bytes( size_t p0, string &s, string xml ) { if (xml.find ("<BYTES", p0) != p0) return false; s = get_bytes(p0, xml); return true; } bool is_string( size_t p0, string &s, string xml ) { if (xml.find("<STRING", p0) != p0) return false; s = get_element(p0, xml); return true; } bool is_symbol( size_t p0, string &s, string xml) { if (xml.find("<SYMBOL", p0) != p0) return false; s = get_element(p0, xml); return true; } bool tag_is(size_t &p0, string tag, string xml) { return (xml.find(tag, p0) == p0); } //====================================================================== // ICS213 xml import/export void parse_ics_message(size_t &, string); void parse_ics_version(size_t &, string); void parse_ics_id(size_t &, string); void parse_ics_date(size_t &, string); void parse_ics_name(size_t &, string); void parse_ics_time(size_t &, string); void parse_ics_exercise(size_t &, string); void parse_ics_recipient(size_t &, string); void parse_ics_sender(size_t &, string); void parse_ics_position(size_t &, string); void parse_ics_subject(size_t &, string); void parse_ics_body(size_t &, string); void parse_ics_para(size_t &, string); void parse_ics_reply(size_t &, string); void parse_ics_sender(size_t &, string); void parse_ics_signature(size_t &, string); void parse_ics_header(size_t &, string); TAGS ICS_tags[] = { {"<message", parse_ics_message}, {"<version", parse_ics_version}, {"<id", parse_ics_id}, {"<date", parse_ics_date}, {"<time", parse_ics_time}, {"<exercise", parse_ics_exercise}, {"<recipient", parse_ics_recipient}, {"<sender", parse_ics_sender}, {"<name", parse_ics_name}, {"<position", parse_ics_position}, {"<subject", parse_ics_subject}, {"<body", parse_ics_body}, {"<para", parse_ics_para}, {"<reply", parse_ics_reply}, {"<signature", parse_ics_signature}, {"<?", parse_ics_header}, {0, 0} }; //recipient string ics_xml_to; string ics_xml_p1; //sender string ics_xml_fm; string ics_xml_p2; //subject date time string ics_xml_subj; string ics_xml_d1; string ics_xml_t1; //message body string ics_xml_msg; //preparer string xml_s1; string xml_p3; //reply string xml_reply; string ics_xml_d2; string ics_xml_t2; string ics_xml_s2; string ics_xml_p4; enum PARSE_ICS_MODE {HICS_TO, HICS_FM, HICS_RECIP, HICS_SENDER, HICS_SUBJ, HICS_MSG, HICS_PREP, HICS_REPLY} ics_pmode; void parse_ics_name(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (ics_pmode) { case HICS_TO: case HICS_RECIP: ics_xml_to = contents; break; case HICS_FM: case HICS_SENDER: ics_xml_fm = contents; break; case HICS_MSG: xml_s1 = contents; break; case HICS_REPLY: ics_xml_s2 = contents; break; default : ; } p0 = next_tag(p0 + 1, xml); } void parse_ics_position(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (ics_pmode) { case HICS_TO: case HICS_RECIP: ics_xml_p1 = contents; break; case HICS_FM: case HICS_SENDER: ics_xml_p2 = contents; break; case HICS_MSG: xml_p3 = contents; break; case HICS_REPLY: ics_xml_p4 = contents; break; default : ; } p0 = next_tag(p0 + 1, xml); } void parse_ics_subject(size_t &p0, string xml) { ics_xml_subj = get_element(p0, xml).c_str(); p0 = next_tag(p0 + 1, xml); } void parse_ics_para(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (ics_pmode) { case HICS_MSG: fm_xml(contents); ics_xml_msg.append(contents).append("\n"); break; case HICS_REPLY: fm_xml(contents); xml_reply.append(contents).append("\n"); break; default : ; } p0 = next_tag(p0 + 1, xml); } void parse_ics_date(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (ics_pmode) { case HICS_TO: case HICS_FM: case HICS_SENDER: case HICS_MSG: case HICS_RECIP: ics_xml_d1 = contents; break; case HICS_REPLY: ics_xml_d2 =contents; break; default : ; } p0 = next_tag(p0 + 1, xml); } void parse_ics_time(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (ics_pmode) { case HICS_TO: case HICS_FM: case HICS_SENDER: case HICS_RECIP: ics_xml_t1 = contents; break; case HICS_REPLY: ics_xml_t2 =contents; break; default : ; } p0 = next_tag(p0 + 1, xml); } void parse_ics_exercise(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_ics_recipient(size_t &p0, string xml) { ics_pmode = HICS_RECIP; string recip = get_element(p0, xml); parse_ics(recip); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_ics_sender(size_t &p0, string xml) { ics_pmode = HICS_SENDER; string sender = get_element(p0, xml); parse_ics(sender); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_ics_signature(size_t &p0, string xml) { string sign = get_element(p0, xml); parse_ics(sign); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_ics_body(size_t &p0, string xml) { if (ics_pmode == HICS_TO || ics_pmode == HICS_FM || ics_pmode == HICS_RECIP || ics_pmode == HICS_SENDER) ics_pmode = HICS_MSG; string body = get_element(p0, xml); parse_ics(body); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_ics_version(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_ics_id(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_ics_reply(size_t &p0, string xml) { ics_pmode = HICS_REPLY; string reply = get_element(p0, xml); parse_ics(reply); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_ics_message(size_t &p0, string xml) { ics_pmode = HICS_TO; string message; message = get_element(p0, xml); parse_ics(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_discard(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_ics_header(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } // recursive parser void parse_ics( string xml ) { size_t p0; TAGS *pValid; p0 = next_tag(0, xml); // find the 1st tag while (p0 != string::npos) { pValid = ICS_tags; while (pValid->tag) { if (xml.find(pValid->tag, p0) == p0) { break; } pValid++; } if (pValid->fp) (pValid->fp)(p0, xml); else p0 = next_tag(p0 + 1, xml); // find the next tag } } void clear_ics_xml() { //recipient ics_xml_to.clear(); ics_xml_p1.clear(); //sender ics_xml_fm.clear(); ics_xml_p2.clear(); //subject date time ics_xml_subj.clear(); ics_xml_d1.clear(); ics_xml_t1.clear(); //message body ics_xml_msg.clear(); //preparer xml_s1.clear(); xml_p3.clear(); //reply xml_reply.clear(); ics_xml_d2.clear(); ics_xml_t2.clear(); ics_xml_s2.clear(); ics_xml_p4.clear(); } void transfer_ics_fields() { clear_fields(); txt_213_to->value(ics_xml_to.c_str()); txt_213_p1->value(ics_xml_p1.c_str()); txt_213_fm->value(ics_xml_fm.c_str()); txt_213_p2->value(ics_xml_p2.c_str()); txt_213_subj->value(ics_xml_subj.c_str()); txt_213_d1->value(ics_xml_d1.c_str()); txt_213_t1->value(ics_xml_t1.c_str()); txt_213_msg->addstr(ics_xml_msg.c_str()); txt_213_s1->value(xml_s1.c_str()); txt_213_p3->value(xml_p3.c_str()); txt_213_reply->addstr(xml_reply.c_str()); txt_213_s2->value(ics_xml_s2.c_str()); txt_213_d2->value(ics_xml_d2.c_str()); txt_213_t2->value(ics_xml_t2.c_str()); txt_213_p4->value(ics_xml_p4.c_str()); update_fields(); def_213_filename = ICS_msg_dir; def_213_filename.append("qform"); def_213_filename.append(DATAFILE_EXT); show_filename(def_213_filename); } bool qform_ics_import(string fname) { char *buff; FILE *xmlfile; size_t filesize; int retval; xmlfile = fopen (fname.c_str(), "r"); if (!xmlfile) return false; // determine its size for buffer creation fseek (xmlfile, 0, SEEK_END); filesize = ftell (xmlfile); buff = new char[filesize + 1]; memset(buff, 0, filesize + 1); // read the entire file into the buffer fseek (xmlfile, 0, SEEK_SET); retval = fread (buff, filesize, 1, xmlfile); fclose (xmlfile); if (retval != 1) return false; ics_pmode = HICS_TO; clear_ics_xml(); parse_ics(buff); transfer_ics_fields(); delete [] buff; return true; } //====================================================================== // export ics //====================================================================== const char *export_template = "\ <?xml version=\"1.0\" encoding=\"UTF-8\"?>\ <?xml-stylesheet type=\"text/xsl\" href=\"ICS213.XSL\"?>\ <message>\ <form>ICS-213</form>\ <version></version>\ <id></id>\ <date>?D1?</date>\ <time>?T1?</time>\ <exercise>no</exercise>\ <recipient>\ <name>?S1?</name>\ <position>?P1?</position>\ </recipient>\ <sender>\ <name>?S2?</name>\ <position>?P2?</position>\ </sender>\ <subject>?SB?</subject>\ <body>?MG?</body>\ <signature>\ <name>?S3?</name>\ <position>?P3?</position>\ </signature>\ <reply>\ <id></id>\ <date>?D2?</date>\ <time>?T2?</time>\ <body>?RP?</body>\ <signature>\ <name>?S4?</name>\ <position>?P4?</position>\ </signature>\ </reply>\ </message>\ "; const char *export_line = "<para>LINE</para>"; void qform_ics_export(string fname) { FILE *xmlfile; size_t pos = 0; string qexport = export_template; string lines; update_fields(); qexport.replace( qexport.find("?S1?"), 4, fields[0].f_data); qexport.replace( qexport.find("?P1?"), 4, fields[1].f_data); qexport.replace( qexport.find("?S2?"), 4, fields[2].f_data); qexport.replace( qexport.find("?P2?"), 4, fields[3].f_data); qexport.replace( qexport.find("?D1?"), 4, fields[4].f_data); qexport.replace( qexport.find("?T1?"), 4, fields[5].f_data); qexport.replace( qexport.find("?SB?"), 4, fields[6].f_data); qexport.replace( qexport.find("?S3?"), 4, fields[7].f_data); qexport.replace( qexport.find("?P3?"), 4, fields[8].f_data); qexport.replace( qexport.find("?S4?"), 4, fields[9].f_data); qexport.replace( qexport.find("?P4?"), 4, fields[10].f_data); qexport.replace( qexport.find("?D2?"), 4, fields[11].f_data); qexport.replace( qexport.find("?T2?"), 4, fields[12].f_data); lines = "<para>"; lines.append(fields[13].f_data); lines.append("</para>"); while ((pos = lines.find("\n")) != string::npos) lines.replace(pos, 1, "</para><para>"); to_xml(lines); qexport.replace( qexport.find("?MG?"), 4, lines); lines = "<para>"; lines.append(fields[14].f_data); lines.append("</para>"); while ((pos = lines.find("\n")) != string::npos) lines.replace(pos, 1, "</para><para>"); to_xml(lines); qexport.replace( qexport.find("?RP?"), 4, lines); xmlfile = fopen(fname.c_str(), "w"); if (!xmlfile) return; fwrite( qexport.c_str(), qexport.length(), 1, xmlfile ); fclose(xmlfile); } //====================================================================== // Radiogram xml import void parse_rg_header(size_t &, string); void parse_rg_message(size_t &, string); void parse_rg_version(size_t &, string); void parse_rg_id(size_t &, string); void parse_rg_date(size_t &, string); void parse_rg_time(size_t &, string); void parse_rg_name(size_t &, string); void parse_rg_exercise(size_t &, string); void parse_rg_precedance(size_t &, string); void parse_rg_handling(size_t &, string); void parse_rg_arl(size_t &, string); void parse_rg_check(size_t &, string); void parse_rg_filed(size_t &, string); void parse_rg_origin(size_t &, string); void parse_rg_station(size_t &, string); void parse_rg_place(size_t &, string); void parse_rg_phone(size_t &, string); void parse_rg_address(size_t &, string); void parse_rg_line(size_t &, string); void parse_rg_receivedat(size_t &, string); void parse_rg_body(size_t &, string); void parse_rg_para(size_t &, string); void parse_rg_receivedfrom(size_t &, string); void parse_rg_sentto(size_t &, string); TAGS RG_tags[] = { {"<?", parse_rg_header}, {"<message", parse_rg_message}, {"<version", parse_rg_version}, {"<id", parse_rg_id}, {"<exercise", parse_rg_exercise}, {"<precedance", parse_rg_precedance}, {"<handling", parse_rg_handling}, {"<arl", parse_rg_arl}, {"<check", parse_rg_check}, {"<filed", parse_rg_filed}, {"<date", parse_rg_date}, {"<time", parse_rg_time}, {"<origin", parse_rg_origin}, {"<station", parse_rg_station}, {"<place", parse_rg_place}, {"<phone", parse_rg_phone}, {"<address", parse_rg_address}, {"<line", parse_rg_line}, {"<receivedat", parse_rg_receivedat}, {"<body", parse_rg_body}, {"<para", parse_rg_para}, {"<receivedfrom",parse_rg_receivedfrom}, {"<name", parse_rg_name}, {"<sentto", parse_rg_sentto}, {0, 0} }; string rg_xml_nbr; string rg_xml_prec; string rg_xml_exer; string rg_xml_hx; string rg_xml_d1; string rg_xml_t1; string rg_xml_dt2; string rg_xml_dt3; string rg_xml_to; string rg_xml_rx; string rg_xml_phone; string rg_xml_msg; string rg_xml_station; string rg_xml_place; string rg_xml_signed; string rg_xml_sent_to; string rg_xml_check; string rg_xml_arl; enum PARSE_RG_MODE {FILED, ORIGIN, ADDRESS, RECEIVEDAT, BODY, RECEIVEDFROM, SENTO} rg_pmode; void parse_rg_header(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_rg_message(size_t &p0, string xml) { rg_pmode = FILED; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_version(size_t &p0, string xml) { p0 = next_tag(p0 + 1, xml); } void parse_rg_id(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); rg_xml_nbr = contents; p0 = next_tag(p0 + 1, xml); } void parse_rg_date(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (rg_pmode) { case FILED: rg_xml_d1 = contents; break; case RECEIVEDFROM: rg_xml_dt2 = contents; break; case SENTO: rg_xml_dt3 = contents; break; default : break; } p0 = next_tag(p0 + 1, xml); } void parse_rg_time(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (rg_pmode) { case FILED: rg_xml_t1 = contents; break; default : break; } p0 = next_tag(p0 + 1, xml); } void parse_rg_name(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (rg_pmode) { case RECEIVEDFROM: rg_xml_signed = contents; break; case SENTO: rg_xml_sent_to = contents; break; case FILED: case ORIGIN: case ADDRESS: case BODY: default : break; } p0 = next_tag(p0 + 1, xml); } void parse_rg_exercise(size_t &p0, string xml) { rg_xml_exer = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_precedance(size_t &p0, string xml) { rg_xml_prec = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_handling(size_t &p0, string xml) { rg_xml_hx = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_arl(size_t &p0, string xml) { rg_xml_arl = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_check(size_t &p0, string xml) { rg_xml_check = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_filed(size_t &p0, string xml) { rg_pmode = FILED; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_origin(size_t &p0, string xml) { rg_pmode = ORIGIN; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_station(size_t &p0, string xml) { rg_xml_station = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_place(size_t &p0, string xml) { rg_xml_place = get_element(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_phone(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); rg_xml_phone = contents; p0 = next_tag(p0 + 1, xml); } void parse_rg_address(size_t &p0, string xml) { rg_pmode = ADDRESS; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_line(size_t &p0, string xml) { string contents = get_element(p0, xml).c_str(); switch (rg_pmode) { case RECEIVEDAT: fm_xml(contents); rg_xml_rx.append(contents).append("\n"); break; case ADDRESS: fm_xml(contents); rg_xml_to.append(contents).append("\n"); break; case BODY: fm_xml(contents); rg_xml_msg.append(contents).append("\n"); break; case FILED: case RECEIVEDFROM: case SENTO: case ORIGIN: default : break; } p0 = next_tag(p0 + 1, xml); } void parse_rg_receivedat(size_t &p0, string xml) { rg_pmode = RECEIVEDAT; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_body(size_t &p0, string xml) { rg_pmode = BODY; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_para(size_t &p0, string xml) { string contents = get_element(p0, xml); switch (rg_pmode) { case RECEIVEDAT: fm_xml(contents); rg_xml_rx.append(contents).append("\n"); break; case ADDRESS: fm_xml(contents); rg_xml_to.append(contents).append("\n"); break; case BODY: fm_xml(contents); rg_xml_msg.append(contents).append("\n"); break; case FILED: case RECEIVEDFROM: case SENTO: case ORIGIN: default : break; } p0 = next_tag(p0 + 1, xml); } void parse_rg_receivedfrom(size_t &p0, string xml) { rg_pmode = RECEIVEDFROM; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void parse_rg_sentto(size_t &p0, string xml) { rg_pmode = SENTO; string message; message = get_element(p0, xml); parse_rg(message); p0 = tag_end(p0, xml); p0 = next_tag(p0 + 1, xml); } void clear_rg_xml() { rg_xml_nbr.clear(); rg_xml_prec.clear(); rg_xml_exer.clear(); rg_xml_hx.clear(); rg_xml_d1.clear(); rg_xml_t1.clear(); rg_xml_dt2.clear(); rg_xml_dt3.clear(); rg_xml_to.clear(); rg_xml_rx.clear(); rg_xml_phone.clear(); rg_xml_msg.clear(); rg_xml_station.clear(); rg_xml_place.clear(); rg_xml_signed.clear(); rg_xml_sent_to.clear(); rg_xml_check.clear(); rg_xml_arl.clear(); } void transfer_rgfields() { clear_rgfields(); txt_rg_nbr->value(rg_xml_nbr.c_str()); txt_rg_hx->value(rg_xml_hx.c_str()); txt_rg_d1->value(rg_xml_d1.c_str()); txt_rg_t1->value(rg_xml_t1.c_str()); txt_rg_dt2->value(rg_xml_dt2.c_str()); txt_rg_dt3->value(rg_xml_dt3.c_str()); trim(rg_xml_to); txt_rg_to->value(rg_xml_to.c_str()); txt_rg_phone->value(rg_xml_phone.c_str()); txt_rg_msg->clear(); trim(rg_xml_msg); txt_rg_msg->addstr(rg_xml_msg.c_str()); txt_rg_station->value(rg_xml_station.c_str()); txt_rg_place->value(rg_xml_place.c_str()); txt_rg_sig->value(rg_xml_signed.c_str()); txt_rg_sent_to->value(rg_xml_sent_to.c_str()); if (rg_xml_arl.empty()) txt_rg_check->value(rg_xml_check.c_str()); else { string ck = "ARL "; ck.append(rg_xml_check); txt_rg_check->value(ck.c_str()); } if (rg_xml_exer == "yes") { if (rg_xml_prec.find("ROUTINE") != string::npos) sel_rg_prec->index(4); else if (rg_xml_prec.find("WELFARE") != string::npos) sel_rg_prec->index(5); else if (rg_xml_prec.find("PRIORITY") != string::npos) sel_rg_prec->index(6); else if (rg_xml_prec.find("EMERGENCY") != string::npos) sel_rg_prec->index(7); else sel_rg_prec->value(0); } else { if (rg_xml_prec.find("ROUTINE") != string::npos) sel_rg_prec->index(0); else if (rg_xml_prec.find("WELFARE") != string::npos) sel_rg_prec->index(1); else if (rg_xml_prec.find("PRIORITY") != string::npos) sel_rg_prec->index(2); else if (rg_xml_prec.find("EMERGENCY") != string::npos) sel_rg_prec->index(3); else sel_rg_prec->value(0); } update_fields(); def_213_filename = ICS_msg_dir; def_213_filename.append("qform"); def_213_filename.append(RGFILE_EXT); show_filename(def_213_filename); } void parse_rg(string xml) { size_t p0; TAGS *pValid; p0 = next_tag(0, xml); // find the 1st tag while (p0 != string::npos) { pValid = RG_tags; while (pValid->tag) { if (xml.find(pValid->tag, p0) == p0) { break; } pValid++; } if (pValid->fp) (pValid->fp)(p0, xml); else p0 = next_tag(p0 + 1, xml); // find the next tag } } bool qform_rg_import(string fname) { char *buff; FILE *xmlfile; size_t filesize; int retval; xmlfile = fopen (fname.c_str(), "r"); if (!xmlfile) return false; // determine its size for buffer creation fseek (xmlfile, 0, SEEK_END); filesize = ftell (xmlfile); buff = new char[filesize + 1]; memset(buff, 0, filesize + 1); // read the entire file into the buffer fseek (xmlfile, 0, SEEK_SET); retval = fread (buff, filesize, 1, xmlfile); fclose (xmlfile); if (retval != 1) return false; rg_pmode = FILED; clear_rg_xml(); parse_rg(buff); transfer_rgfields(); delete [] buff; return true; } // export Radiogram const char rg_export_template[] = "\ <?xml version=\"1.0\" encoding=\"UTF-8\"?><?xml-stylesheet type=\"text/xsl\" href=\"Radiogram.XSL\"?>\n\ <message>\n\ <form>Radiogram</form>\n\ <version>1.5.1.0</version>\n\ <exercise>?TEST?</exercise>\n\ <id>?ID?</id>\n\ <precedance>?PR?</precedance>\n\ <handling>?HX?</handling>\n\ <arl>?ARL?</arl>\n\ <check>?CK?</check>\n\ <filed>\n\ <date>?D1?</date>\n\ <time>?T1?</time>\n\ </filed>\n\ <origin>\n\ <station>\n\ ?STA?\n\ </station>\n\ <place>\n\ ?PL?\n\ </place>\n\ </origin>\n\ <phone>?PH?</phone>\n\ <address>\n\ ?AD?\n\ </address>\n\ <receivedat>\n\ ?RA?\n\ </receivedat>\n\ <body>\n\ ?BD?\n\ </body>\n\ <receivedfrom>\n\ <name>?NM?</name>\n\ <date>?D2?</date>\n\ <time>?T2?</time>\n\ </receivedfrom>\n\ <sentto>\n\ <name>\n\ ?ST?\n\ </name>\n\ <date>?D3?</date>\n\ <time>?T3?</time>\n\ </sentto>\n\ </message>\n"; void xml_lines(string &s, const char *ln) { string sln = "</"; sln.append(ln).append(">\n<").append(ln).append(">"); s = string("<").append(ln).append(">").append(s).append("</").append(ln).append(">"); size_t pos = 0; while ((pos = s.find("\n", pos)) != string::npos) { s.replace(pos, 1, sln); pos += 14; } } void qform_rg_export(string fname) { FILE *xmlfile; string qexport = rg_export_template; string lines; int nbr; update_rgfields(); qexport.replace( qexport.find("?ID?"), 4, rgfields[0].f_data); sscanf(rgfields[1].f_data.c_str(), "%d", &nbr); lines = s_prec[nbr]; if (lines.find("TEST ") != string::npos) { qexport.replace( qexport.find("?TEST?"), 6, "yes"); lines.erase(0, 5); } else qexport.replace( qexport.find("?TEST?"), 6, "no"); qexport.replace( qexport.find("?PR?"), 4, lines); qexport.replace( qexport.find("?HX?"), 4, rgfields[2].f_data); qexport.replace( qexport.find("?D1?"), 4, rgfields[3].f_data); qexport.replace( qexport.find("?T1?"), 4, rgfields[4].f_data); lines = rgfields[5].f_data; string tm = ""; string dt = ""; if (lines.length() > 10) { tm = lines.substr(2,5); dt = lines.substr(0,2).append(lines.substr(7,4)); } qexport.replace( qexport.find("?D2?"), 4, dt); qexport.replace( qexport.find("?T2?"), 4, tm); lines = rgfields[5].f_data; tm = ""; dt = ""; if (lines.length() > 10) { tm = lines.substr(2,5); dt = lines.substr(0,2).append(lines.substr(7,4)); } qexport.replace( qexport.find("?D3?"), 4, dt); qexport.replace( qexport.find("?T3?"), 4, tm); if (rgfields[7].f_data.empty()) lines = ""; else { lines = rgfields[7].f_data; xml_lines(lines, "line"); to_xml(lines); } qexport.replace( qexport.find("?AD?"), 4, lines); qexport.replace( qexport.find("?PH?"), 4, rgfields[8].f_data); // message contents if (rgfields[10].f_data.empty()) lines = ""; else { lines = rgfields[10].f_data; xml_lines(lines, "para"); to_xml(lines); } qexport.replace( qexport.find("?BD?"), 4, lines); lines.clear(); lines.append("<line>").append(progStatus.my_call).append("</line>\n"); lines.append("<line>").append(progStatus.my_name).append("</line>\n"); lines.append("<line>").append(progStatus.my_addr).append("</line>\n"); lines.append("<line>").append(progStatus.my_city).append("</line>\n"); lines.append("<line>").append(progStatus.my_tel).append("</line>"); to_xml(lines); qexport.replace( qexport.find("?RA?"), 4, lines); qexport.replace( qexport.find("?NM?"), 4, rgfields[11].f_data); qexport.replace( qexport.find("?STA?"), 5, rgfields[14].f_data); qexport.replace( qexport.find("?PL?"), 4, rgfields[15].f_data); lines = rgfields[18].f_data; xml_lines( lines, "line"); qexport.replace( qexport.find("?ST?"), 4, lines); lines = rgfields[13].f_data; // ck if (lines.find("ARL ") != string::npos) { qexport.replace( qexport.find("?ARL?"), 5, "yes"); lines.erase(0, 4); } else qexport.replace( qexport.find("?ARL?"), 5, "no"); qexport.replace( qexport.find("?CK?"), 4, lines); xmlfile = fopen(fname.c_str(), "w"); if (!xmlfile) return; fwrite( qexport.c_str(), qexport.length(), 1, xmlfile ); fclose(xmlfile); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/ext_string.cxx���������������������������������������������������������������0000664�0001750�0001750�00000003741�12330516146�014474� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include "config.h" #include "ext_string.h" #if !HAVE_STRCASESTR # include <ctype.h> // from git 1.6.1.2 compat/strcasestr.c static char *strcasestr(const char *haystack, const char *needle) { int nlen = strlen(needle); int hlen = strlen(haystack) - nlen + 1; int i; for (i = 0; i < hlen; i++) { int j; for (j = 0; j < nlen; j++) { unsigned char c1 = haystack[i+j]; unsigned char c2 = needle[j]; if (toupper(c1) != toupper(c2)) goto next; } return (char *) haystack + i; next: ; } return NULL; } #endif // !HAVE_STRCASESTR size_t extstring::ufind(std::string needle, size_t pos) { if (pos > length()) return std::string::npos; char *cp = 0; char *np = (char *)&needle[0]; char *hp = (char *)(c_str() + pos); cp = strcasestr(hp, np); //printf("found %s @ %d\n", needle.c_str(), (int)(pos + cp - hp)); if (cp) return pos + (cp - hp); return std::string::npos; } void extstring::ureplace(std::string needle) { size_t p; size_t len = needle.length(); p = ufind(needle, 0); while (p != std::string::npos) { replace(p, len, needle); p = ufind(needle, p + len); } } �������������������������������flmsg-2.0.10/src/utils/threads.cxx������������������������������������������������������������������0000664�0001750�0001750�00000006604�12330516146�013741� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // threads.cxx // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <config.h> #include <stdexcept> #include <string.h> #include <errno.h> #include "threads.h" THREAD_ID_TYPE thread_id_; #include "timeops.h" #ifndef __WIN32__ #if !HAVE_SEM_TIMEDWAIT # include <semaphore.h> # include <time.h> # include <errno.h> # include <unistd.h> int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout) { int r; for (;;) { r = sem_trywait(sem); if (r == 0 || (r == -1 && errno != EAGAIN)) return r; if (abs_timeout->tv_nsec < 0 || abs_timeout->tv_nsec >= 1000000000L) { errno = EINVAL; return -1; } struct timespec now; clock_gettime(CLOCK_REALTIME, &now); if (now == *abs_timeout || now > *abs_timeout) { errno = ETIMEDOUT; return -1; } usleep(100); } } #endif // !HAVE_SEM_TIMEDWAIT #endif // __WIN32__ int sem_timedwait_rel(sem_t* sem, double rel_timeout) { struct timespec t; clock_gettime(CLOCK_REALTIME, &t); t = t + rel_timeout; return sem_timedwait(sem, &t); } int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout) { struct timespec t; clock_gettime(CLOCK_REALTIME, &t); t = t + rel_timeout; return pthread_cond_timedwait(cond, mutex, &t); } #ifndef NDEBUG bool thread_in_list(int id, const int* list) { while (*list != INVALID_TID) if (id == *list++) return true; return false; } #endif #ifdef __linux__ # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif # include <unistd.h> # include <sys/syscall.h> # include "debug.h" void linux_log_tid(void) { LOG_DEBUG(PACKAGE_TARNAME " thread %" PRIdPTR " is LWP %ld", GET_THREAD_ID(), syscall(SYS_gettid)); } #endif // Synchronization objects. guard_lock::guard_lock(pthread_mutex_t* m) : mutex(m) { pthread_mutex_lock(mutex); } guard_lock::~guard_lock(void) { pthread_mutex_unlock(mutex); } syncobj::syncobj() { pthread_mutex_init( & m_mutex, NULL ); pthread_cond_init( & m_cond, NULL ); } syncobj::~syncobj() { pthread_mutex_destroy( & m_mutex ); pthread_cond_destroy( & m_cond ); } void syncobj::signal() { int rc = pthread_cond_signal( &m_cond ); if( rc ) { throw std::runtime_error(strerror(rc)); } } bool syncobj::wait( double seconds ) { int rc = pthread_cond_timedwait_rel( &m_cond, &m_mutex, seconds ); switch( rc ) { case 0 : return true ; default : throw std::runtime_error(strerror(rc)); case ETIMEDOUT: return false ; } } ����������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/mongoose.c�������������������������������������������������������������������0000664�0001750�0001750�00000372745�12516662550�013600� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com> // Copyright (c) 2013-2014 Cesanta Software Limited // All rights reserved // // This library is dual-licensed: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. For the terms of this // license, see <http://www.gnu.org/licenses/>. // // You are free to use this library under the terms of the GNU General // Public License, but WITHOUT ANY WARRANTY; without even the implied // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. // // Alternatively, you can license this library under a commercial // license, as set out in <http://cesanta.com/>. #undef UNICODE // Use ANSI WinAPI functions #undef _UNICODE // Use multibyte encoding on Windows #define _MBCS // Use multibyte encoding on Windows #define _INTEGRAL_MAX_BITS 64 // Enable _stati64() on Windows #define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005+ #undef WIN32_LEAN_AND_MEAN // Let windows.h always include winsock2.h #define _XOPEN_SOURCE 600 // For flockfile() on Linux #define __STDC_FORMAT_MACROS // <inttypes.h> wants this for C++ #define __STDC_LIMIT_MACROS // C++ wants that for INT64_MAX #ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE // Enable fseeko() and ftello() functions #endif #define _FILE_OFFSET_BITS 64 // Enable 64-bit file offsets #ifdef _MSC_VER #pragma warning (disable : 4127) // FD_SET() emits warning, disable it #pragma warning (disable : 4204) // missing c99 support #endif #include <sys/types.h> #include <sys/stat.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <assert.h> #include <errno.h> #include <time.h> #include <ctype.h> #include <stdarg.h> #ifdef _WIN32 #include <windows.h> #include <process.h> // For _beginthread #include <io.h> // For _lseeki64 #include <direct.h> // For _mkdir typedef int socklen_t; #if !defined(__MINGW32__) || !defined(_PID_T_) || defined(_NO_OLDNAMES) typedef HANDLE pid_t; #endif typedef SOCKET sock_t; typedef unsigned char uint8_t; typedef unsigned int uint32_t; typedef unsigned short uint16_t; typedef unsigned __int64 uint64_t; typedef __int64 int64_t; typedef CRITICAL_SECTION mutex_t; typedef struct _stati64 file_stat_t; #pragma comment(lib, "ws2_32.lib") #define snprintf _snprintf #define vsnprintf _vsnprintf #define INT64_FMT "I64d" #ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK #endif #define mutex_init(x) InitializeCriticalSection(x) #define mutex_destroy(x) DeleteCriticalSection(x) #define mutex_lock(x) EnterCriticalSection(x) #define mutex_unlock(x) LeaveCriticalSection(x) #define get_thread_id() ((unsigned long) GetCurrentThreadId()) #ifndef S_ISDIR #define S_ISDIR(x) ((x) & _S_IFDIR) #endif #define sleep(x) Sleep((x) * 1000) #define stat(x, y) mg_stat((x), (y)) #define fopen(x, y) mg_fopen((x), (y)) #define open(x, y) mg_open((x), (y)) #define lseek(x, y, z) _lseeki64((x), (y), (z)) #define mkdir(x, y) _mkdir(x) #define to64(x) _atoi64(x) #define flockfile(x) #define funlockfile(x) #ifndef va_copy #define va_copy(x,y) x = y #endif // MINGW #defines va_copy #ifndef __func__ #define STRX(x) #x #define STR(x) STRX(x) #define __func__ __FILE__ ":" STR(__LINE__) #endif #else #include <dirent.h> #include <inttypes.h> #include <pthread.h> #include <pwd.h> #include <signal.h> #include <unistd.h> #include <netdb.h> #include <arpa/inet.h> // For inet_pton() when MONGOOSE_USE_IPV6 is defined #include <netinet/in.h> #include <sys/socket.h> #include <sys/select.h> #define closesocket(x) close(x) typedef int sock_t; typedef pthread_mutex_t mutex_t; typedef struct stat file_stat_t; #define mutex_init(x) pthread_mutex_init(x, NULL) #define mutex_destroy(x) pthread_mutex_destroy(x) #define mutex_lock(x) pthread_mutex_lock(x) #define mutex_unlock(x) pthread_mutex_unlock(x) #define get_thread_id() ((unsigned long) pthread_self()) #define INVALID_SOCKET ((sock_t) -1) #define INT64_FMT PRId64 #define to64(x) strtoll(x, NULL, 10) #define __cdecl #define O_BINARY 0 #endif #ifdef MONGOOSE_USE_SSL #ifdef __APPLE__ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #include <openssl/ssl.h> #endif #include "mongoose.h" struct ll { struct ll *prev, *next; }; #define LINKED_LIST_INIT(N) ((N)->next = (N)->prev = (N)) #define LINKED_LIST_DECLARE_AND_INIT(H) struct ll H = { &H, &H } #define LINKED_LIST_ENTRY(P,T,N) ((T *)((char *)(P) - offsetof(T, N))) #define LINKED_LIST_IS_EMPTY(N) ((N)->next == (N)) #define LINKED_LIST_FOREACH(H,N,T) \ for (N = (H)->next, T = (N)->next; N != (H); N = (T), T = (N)->next) #define LINKED_LIST_ADD_TO_FRONT(H,N) do { ((H)->next)->prev = (N); \ (N)->next = ((H)->next); (N)->prev = (H); (H)->next = (N); } while (0) #define LINKED_LIST_ADD_TO_TAIL(H,N) do { ((H)->prev)->next = (N); \ (N)->prev = ((H)->prev); (N)->next = (H); (H)->prev = (N); } while (0) #define LINKED_LIST_REMOVE(N) do { ((N)->next)->prev = ((N)->prev); \ ((N)->prev)->next = ((N)->next); LINKED_LIST_INIT(N); } while (0) #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) #define MAX_REQUEST_SIZE 16384 #define IOBUF_SIZE 8192 #define MAX_PATH_SIZE 8192 #define LUA_SCRIPT_PATTERN "**.lp$" #define DEFAULT_CGI_PATTERN "**.cgi$|**.pl$|**.php$" #define CGI_ENVIRONMENT_SIZE 4096 #define MAX_CGI_ENVIR_VARS 64 #define ENV_EXPORT_TO_CGI "MONGOOSE_CGI" #define PASSWORDS_FILE_NAME ".htpasswd" #ifndef MONGOOSE_USE_WEBSOCKET_PING_INTERVAL #define MONGOOSE_USE_WEBSOCKET_PING_INTERVAL 5 #endif // Extra HTTP headers to send in every static file reply #if !defined(MONGOOSE_USE_EXTRA_HTTP_HEADERS) #define MONGOOSE_USE_EXTRA_HTTP_HEADERS "" #endif #ifndef MONGOOSE_USE_POST_SIZE_LIMIT #define MONGOOSE_USE_POST_SIZE_LIMIT 0 #endif #ifndef MONGOOSE_USE_IDLE_TIMEOUT_SECONDS #define MONGOOSE_USE_IDLE_TIMEOUT_SECONDS 30 #endif #ifdef MONGOOSE_ENABLE_DEBUG #define DBG(x) do { printf("%-20s ", __func__); printf x; putchar('\n'); \ fflush(stdout); } while(0) #else #define DBG(x) #endif #ifdef MONGOOSE_NO_FILESYSTEM #define MONGOOSE_NO_AUTH #define MONGOOSE_NO_CGI #define MONGOOSE_NO_DAV #define MONGOOSE_NO_DIRECTORY_LISTING #define MONGOOSE_NO_LOGGING #endif union socket_address { struct sockaddr sa; struct sockaddr_in sin; #ifdef MONGOOSE_USE_IPV6 struct sockaddr_in6 sin6; #endif }; struct vec { const char *ptr; int len; }; // For directory listing and WevDAV support struct dir_entry { struct connection *conn; char *file_name; file_stat_t st; }; // NOTE(lsm): this enum shoulds be in sync with the config_options. enum { ACCESS_CONTROL_LIST, #ifndef MONGOOSE_NO_FILESYSTEM ACCESS_LOG_FILE, #ifndef MONGOOSE_NO_AUTH AUTH_DOMAIN, #endif #ifndef MONGOOSE_NO_CGI CGI_INTERPRETER, CGI_PATTERN, #endif #ifndef MONGOOSE_NO_DAV DAV_AUTH_FILE, #endif DOCUMENT_ROOT, #ifndef MONGOOSE_NO_DIRECTORY_LISTING ENABLE_DIRECTORY_LISTING, #endif #endif EXTRA_MIME_TYPES, #if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH) GLOBAL_AUTH_FILE, #endif HIDE_FILES_PATTERN, #ifndef MONGOOSE_NO_FILESYSTEM INDEX_FILES, #endif LISTENING_PORT, #ifndef _WIN32 RUN_AS_USER, #endif #ifdef MONGOOSE_USE_SSL SSL_CERTIFICATE, #endif URL_REWRITES, NUM_OPTIONS }; static const char *static_config_options[] = { "access_control_list", NULL, #ifndef MONGOOSE_NO_FILESYSTEM "access_log_file", NULL, #ifndef MONGOOSE_NO_AUTH "auth_domain", "mydomain.com", #endif #ifndef MONGOOSE_NO_CGI "cgi_interpreter", NULL, "cgi_pattern", DEFAULT_CGI_PATTERN, #endif #ifndef MONGOOSE_NO_DAV "dav_auth_file", NULL, #endif "document_root", NULL, #ifndef MONGOOSE_NO_DIRECTORY_LISTING "enable_directory_listing", "yes", #endif #endif "extra_mime_types", NULL, #if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_AUTH) "global_auth_file", NULL, #endif "hide_files_patterns", NULL, #ifndef MONGOOSE_NO_FILESYSTEM "index_files","index.html,index.htm,index.cgi,index.php,index.lp", #endif "listening_port", NULL, #ifndef _WIN32 "run_as_user", NULL, #endif #ifdef MONGOOSE_USE_SSL "ssl_certificate", NULL, #endif "url_rewrites", NULL, NULL }; struct mg_server { sock_t listening_sock; union socket_address lsa; // Listening socket address struct ll active_connections; mg_handler_t request_handler; mg_handler_t error_handler; mg_handler_t auth_handler; char *config_options[NUM_OPTIONS]; char local_ip[48]; void *server_data; #ifdef MONGOOSE_USE_SSL SSL_CTX *ssl_ctx; // Server SSL context SSL_CTX *client_ssl_ctx; // Client SSL context #endif sock_t ctl[2]; // Control socketpair. Used to wake up from select() call }; // Expandable IO buffer struct iobuf { char *buf; // Buffer that holds the data int size; // Buffer size int len; // Number of bytes currently in a buffer }; // Local endpoint representation union endpoint { int fd; // Opened regular local file sock_t cgi_sock; // CGI socket void *ssl; // SSL descriptor }; enum endpoint_type { EP_NONE, EP_FILE, EP_CGI, EP_USER, EP_PUT, EP_CLIENT }; enum connection_flags { CONN_CLOSE = 1, // Connection must be closed at the end of the poll CONN_SPOOL_DONE = 2, // All data has been buffered for sending CONN_SSL_HANDS_SHAKEN = 4, // SSL handshake has completed. Only for SSL CONN_HEADERS_SENT = 8, // User callback has sent HTTP headers CONN_BUFFER = 16, // CGI only. Holds data send until CGI prints // all HTTP headers CONN_CONNECTING = 32, // HTTP client is doing non-blocking connect() CONN_LONG_RUNNING = 64 // Long-running URI handlers }; struct connection { struct mg_connection mg_conn; // XXX: Must be first struct ll link; // Linkage to server->active_connections struct mg_server *server; sock_t client_sock; // Connected client struct iobuf local_iobuf; struct iobuf remote_iobuf; union endpoint endpoint; enum endpoint_type endpoint_type; time_t birth_time; time_t last_activity_time; char *path_info; char *request; int64_t num_bytes_sent; // Total number of bytes sent int64_t cl; // Reply content length, for Range support int request_len; // Request length, including last \r\n after last header int flags; // CONN_* flags: CONN_CLOSE, CONN_SPOOL_DONE, etc mg_handler_t handler; // Callback for HTTP client #ifdef MONGOOSE_USE_SSL SSL *ssl; // SSL descriptor #endif }; static void open_local_endpoint(struct connection *conn, int skip_user); static void close_local_endpoint(struct connection *conn); static const struct { const char *extension; size_t ext_len; const char *mime_type; } static_builtin_mime_types[] = { {".html", 5, "text/html"}, {".htm", 4, "text/html"}, {".shtm", 5, "text/html"}, {".shtml", 6, "text/html"}, {".css", 4, "text/css"}, {".js", 3, "application/x-javascript"}, {".ico", 4, "image/x-icon"}, {".gif", 4, "image/gif"}, {".jpg", 4, "image/jpeg"}, {".jpeg", 5, "image/jpeg"}, {".png", 4, "image/png"}, {".svg", 4, "image/svg+xml"}, {".txt", 4, "text/plain"}, {".torrent", 8, "application/x-bittorrent"}, {".wav", 4, "audio/x-wav"}, {".mp3", 4, "audio/x-mp3"}, {".mid", 4, "audio/mid"}, {".m3u", 4, "audio/x-mpegurl"}, {".ogg", 4, "application/ogg"}, {".ram", 4, "audio/x-pn-realaudio"}, {".xml", 4, "text/xml"}, {".json", 5, "text/json"}, {".xslt", 5, "application/xml"}, {".xsl", 4, "application/xml"}, {".ra", 3, "audio/x-pn-realaudio"}, {".doc", 4, "application/msword"}, {".exe", 4, "application/octet-stream"}, {".zip", 4, "application/x-zip-compressed"}, {".xls", 4, "application/excel"}, {".tgz", 4, "application/x-tar-gz"}, {".tar", 4, "application/x-tar"}, {".gz", 3, "application/x-gunzip"}, {".arj", 4, "application/x-arj-compressed"}, {".rar", 4, "application/x-arj-compressed"}, {".rtf", 4, "application/rtf"}, {".pdf", 4, "application/pdf"}, {".swf", 4, "application/x-shockwave-flash"}, {".mpg", 4, "video/mpeg"}, {".webm", 5, "video/webm"}, {".mpeg", 5, "video/mpeg"}, {".mov", 4, "video/quicktime"}, {".mp4", 4, "video/mp4"}, {".m4v", 4, "video/x-m4v"}, {".asf", 4, "video/x-ms-asf"}, {".avi", 4, "video/x-msvideo"}, {".bmp", 4, "image/bmp"}, {".ttf", 4, "application/x-font-ttf"}, {NULL, 0, NULL} }; #ifndef MONGOOSE_NO_THREADS void *mg_start_thread(void *(*f)(void *), void *p) { #ifdef _WIN32 return (void *) _beginthread((void (__cdecl *)(void *)) f, 0, p); #else pthread_t thread_id = (pthread_t) 0; pthread_attr_t attr; (void) pthread_attr_init(&attr); (void) pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); #if MONGOOSE_USE_STACK_SIZE > 1 (void) pthread_attr_setstacksize(&attr, MONGOOSE_USE_STACK_SIZE); #endif pthread_create(&thread_id, &attr, f, p); pthread_attr_destroy(&attr); return (void *) thread_id; #endif } #endif // MONGOOSE_NO_THREADS #ifdef _WIN32 // Encode 'path' which is assumed UTF-8 string, into UNICODE string. // wbuf and wbuf_len is a target buffer and its length. static void to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len) { char buf[MAX_PATH_SIZE * 2], buf2[MAX_PATH_SIZE * 2], *p; strncpy(buf, path, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; // Trim trailing slashes p = buf + strlen(buf) - 1; while ((p > buf) && ((p[0] == '\\') || (p[0] == '/'))) *p-- = '\0'; //change_slashes_to_backslashes(buf); // Convert to Unicode and back. If doubly-converted string does not // match the original, something is fishy, reject. memset(wbuf, 0, wbuf_len * sizeof(wchar_t)); MultiByteToWideChar(CP_UTF8, 0, buf, -1, wbuf, (int) wbuf_len); WideCharToMultiByte(CP_UTF8, 0, wbuf, (int) wbuf_len, buf2, sizeof(buf2), NULL, NULL); if (strcmp(buf, buf2) != 0) { wbuf[0] = L'\0'; } } static int mg_stat(const char *path, file_stat_t *st) { wchar_t wpath[MAX_PATH_SIZE]; to_wchar(path, wpath, ARRAY_SIZE(wpath)); DBG(("[%ls] -> %d", wpath, _wstati64(wpath, st))); return _wstati64(wpath, st); } static FILE *mg_fopen(const char *path, const char *mode) { wchar_t wpath[MAX_PATH_SIZE], wmode[10]; to_wchar(path, wpath, ARRAY_SIZE(wpath)); to_wchar(mode, wmode, ARRAY_SIZE(wmode)); return _wfopen(wpath, wmode); } static int mg_open(const char *path, int flag) { wchar_t wpath[MAX_PATH_SIZE]; to_wchar(path, wpath, ARRAY_SIZE(wpath)); return _wopen(wpath, flag); } #endif static void set_close_on_exec(int fd) { #ifdef _WIN32 (void) SetHandleInformation((HANDLE) fd, HANDLE_FLAG_INHERIT, 0); #else fcntl(fd, F_SETFD, FD_CLOEXEC); #endif } static void set_non_blocking_mode(sock_t sock) { #ifdef _WIN32 unsigned long on = 1; ioctlsocket(sock, FIONBIO, &on); #else int flags = fcntl(sock, F_GETFL, 0); fcntl(sock, F_SETFL, flags | O_NONBLOCK); #endif } // A helper function for traversing a comma separated list of values. // It returns a list pointer shifted to the next value, or NULL if the end // of the list found. // Value is stored in val vector. If value has form "x=y", then eq_val // vector is initialized to point to the "y" part, and val vector length // is adjusted to point only to "x". static const char *next_option(const char *list, struct vec *val, struct vec *eq_val) { if (list == NULL || *list == '\0') { // End of the list list = NULL; } else { val->ptr = list; if ((list = strchr(val->ptr, ',')) != NULL) { // Comma found. Store length and shift the list ptr val->len = list - val->ptr; list++; } else { // This value is the last one list = val->ptr + strlen(val->ptr); val->len = list - val->ptr; } if (eq_val != NULL) { // Value has form "x=y", adjust pointers and lengths // so that val points to "x", and eq_val points to "y". eq_val->len = 0; eq_val->ptr = (const char *) memchr(val->ptr, '=', val->len); if (eq_val->ptr != NULL) { eq_val->ptr++; // Skip over '=' character eq_val->len = val->ptr + val->len - eq_val->ptr; val->len = (eq_val->ptr - val->ptr) - 1; } } } return list; } static int spool(struct iobuf *io, const void *buf, int len) { static const double mult = 1.2; char *p = NULL; int new_len = 0; assert(io->len >= 0); assert(io->len <= io->size); //DBG(("1. %d %d %d", len, io->len, io->size)); if (len <= 0) { } else if ((new_len = io->len + len) < io->size) { memcpy(io->buf + io->len, buf, len); io->len = new_len; } else if ((p = (char *) realloc(io->buf, (int) (new_len * mult))) != NULL) { io->buf = p; memcpy(io->buf + io->len, buf, len); io->len = new_len; io->size = (int) (new_len * mult); } else { len = 0; } //DBG(("%d %d %d", len, io->len, io->size)); return len; } // Like snprintf(), but never returns negative value, or a value // that is larger than a supplied buffer. static int mg_vsnprintf(char *buf, size_t buflen, const char *fmt, va_list ap) { int n; if (buflen < 1) return 0; n = vsnprintf(buf, buflen, fmt, ap); if (n < 0) { n = 0; } else if (n >= (int) buflen) { n = (int) buflen - 1; } buf[n] = '\0'; return n; } static int mg_snprintf(char *buf, size_t buflen, const char *fmt, ...) { va_list ap; int n; va_start(ap, fmt); n = mg_vsnprintf(buf, buflen, fmt, ap); va_end(ap); return n; } // Check whether full request is buffered. Return: // -1 if request is malformed // 0 if request is not yet fully buffered // >0 actual request length, including last \r\n\r\n static int get_request_len(const char *s, int buf_len) { const unsigned char *buf = (unsigned char *) s; int i; for (i = 0; i < buf_len; i++) { // Control characters are not allowed but >=128 are. // Abort scan as soon as one malformed character is found. if (!isprint(buf[i]) && buf[i] != '\r' && buf[i] != '\n' && buf[i] < 128) { return -1; } else if (buf[i] == '\n' && i + 1 < buf_len && buf[i + 1] == '\n') { return i + 2; } else if (buf[i] == '\n' && i + 2 < buf_len && buf[i + 1] == '\r' && buf[i + 2] == '\n') { return i + 3; } } return 0; } // Skip the characters until one of the delimiters characters found. // 0-terminate resulting word. Skip the rest of the delimiters if any. // Advance pointer to buffer to the next word. Return found 0-terminated word. static char *skip(char **buf, const char *delimiters) { char *p, *begin_word, *end_word, *end_delimiters; begin_word = *buf; end_word = begin_word + strcspn(begin_word, delimiters); end_delimiters = end_word + strspn(end_word, delimiters); for (p = end_word; p < end_delimiters; p++) { *p = '\0'; } *buf = end_delimiters; return begin_word; } // Parse HTTP headers from the given buffer, advance buffer to the point // where parsing stopped. static void parse_http_headers(char **buf, struct mg_connection *ri) { size_t i; for (i = 0; i < ARRAY_SIZE(ri->http_headers); i++) { ri->http_headers[i].name = skip(buf, ": "); ri->http_headers[i].value = skip(buf, "\r\n"); if (ri->http_headers[i].name[0] == '\0') break; ri->num_headers = i + 1; } } static const char *status_code_to_str(int status_code) { switch (status_code) { case 200: return "OK"; case 201: return "Created"; case 204: return "No Content"; case 301: return "Moved Permanently"; case 302: return "Found"; case 304: return "Not Modified"; case 400: return "Bad Request"; case 403: return "Forbidden"; case 404: return "Not Found"; case 405: return "Method Not Allowed"; case 409: return "Conflict"; case 411: return "Length Required"; case 413: return "Request Entity Too Large"; case 415: return "Unsupported Media Type"; case 423: return "Locked"; case 500: return "Server Error"; case 501: return "Not Implemented"; default: return "Server Error"; } } static void send_http_error(struct connection *conn, int code, const char *fmt, ...) { const char *message = status_code_to_str(code); const char *rewrites = conn->server->config_options[URL_REWRITES]; char headers[200], body[200]; struct vec a, b; va_list ap; int body_len, headers_len, match_code; conn->mg_conn.status_code = code; // Invoke error handler if it is set if (conn->server->error_handler != NULL && conn->server->error_handler(&conn->mg_conn) == MG_ERROR_PROCESSED) { close_local_endpoint(conn); return; } // Handle error code rewrites while ((rewrites = next_option(rewrites, &a, &b)) != NULL) { if ((match_code = atoi(a.ptr)) > 0 && match_code == code) { conn->mg_conn.status_code = 302; mg_printf(&conn->mg_conn, "HTTP/1.1 %d Moved\r\n" "Location: %.*s?code=%d&orig_uri=%s\r\n\r\n", conn->mg_conn.status_code, b.len, b.ptr, code, conn->mg_conn.uri); close_local_endpoint(conn); return; } } body_len = mg_snprintf(body, sizeof(body), "%d %s\n", code, message); if (fmt != NULL) { va_start(ap, fmt); body_len += mg_vsnprintf(body + body_len, sizeof(body) - body_len, fmt, ap); va_end(ap); } if (code >= 300 && code <= 399) { // 3xx errors do not have body body_len = 0; } headers_len = mg_snprintf(headers, sizeof(headers), "HTTP/1.1 %d %s\r\nContent-Length: %d\r\n" "Content-Type: text/plain\r\n\r\n", code, message, body_len); spool(&conn->remote_iobuf, headers, headers_len); spool(&conn->remote_iobuf, body, body_len); close_local_endpoint(conn); // This will write to the log file } // Print message to buffer. If buffer is large enough to hold the message, // return buffer. If buffer is to small, allocate large enough buffer on heap, // and return allocated buffer. static int alloc_vprintf(char **buf, size_t size, const char *fmt, va_list ap) { va_list ap_copy; int len; // Windows is not standard-compliant, and vsnprintf() returns -1 if // buffer is too small. Also, older versions of msvcrt.dll do not have // _vscprintf(). However, if size is 0, vsnprintf() behaves correctly. // Therefore, we make two passes: on first pass, get required message length. // On second pass, actually print the message. va_copy(ap_copy, ap); len = vsnprintf(NULL, 0, fmt, ap_copy); if (len > (int) size && (size = len + 1) > 0 && (*buf = (char *) malloc(size)) == NULL) { len = -1; // Allocation failed, mark failure } else { va_copy(ap_copy, ap); vsnprintf(*buf, size, fmt, ap_copy); } return len; } static void write_chunk(struct connection *conn, const char *buf, int len) { char chunk_size[50]; int n = mg_snprintf(chunk_size, sizeof(chunk_size), "%X\r\n", len); spool(&conn->remote_iobuf, chunk_size, n); spool(&conn->remote_iobuf, buf, len); spool(&conn->remote_iobuf, "\r\n", 2); } int mg_vprintf(struct mg_connection *conn, const char *fmt, va_list ap, int chunked) { char mem[IOBUF_SIZE], *buf = mem; int len; if ((len = alloc_vprintf(&buf, sizeof(mem), fmt, ap)) > 0) { if (chunked) { write_chunk((struct connection *) conn, buf, len); } else { len = mg_write(conn, buf, (size_t) len); } } if (buf != mem && buf != NULL) { free(buf); } return len; } int mg_printf(struct mg_connection *conn, const char *fmt, ...) { int len; va_list ap; va_start(ap, fmt); len = mg_vprintf(conn, fmt, ap, 0); va_end(ap); return len; } static int mg_socketpair(sock_t sp[2]) { struct sockaddr_in sa; sock_t sock, ret = -1; socklen_t len = sizeof(sa); sp[0] = sp[1] = INVALID_SOCKET; (void) memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_port = htons(0); sa.sin_addr.s_addr = htonl(0x7f000001); if ((sock = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET && !bind(sock, (struct sockaddr *) &sa, len) && !listen(sock, 1) && !getsockname(sock, (struct sockaddr *) &sa, &len) && (sp[0] = socket(AF_INET, SOCK_STREAM, 6)) != -1 && !connect(sp[0], (struct sockaddr *) &sa, len) && (sp[1] = accept(sock,(struct sockaddr *) &sa, &len)) != INVALID_SOCKET) { set_close_on_exec(sp[0]); set_close_on_exec(sp[1]); ret = 0; } else { if (sp[0] != INVALID_SOCKET) closesocket(sp[0]); if (sp[1] != INVALID_SOCKET) closesocket(sp[1]); sp[0] = sp[1] = INVALID_SOCKET; } closesocket(sock); return ret; } static int is_error(int n) { return n == 0 || (n < 0 && errno != EINTR && errno != EINPROGRESS && errno != EAGAIN && errno != EWOULDBLOCK #ifdef _WIN32 && WSAGetLastError() != WSAEINTR && WSAGetLastError() != WSAEWOULDBLOCK #endif ); } static void discard_leading_iobuf_bytes(struct iobuf *io, int n) { if (n >= 0 && n <= io->len) { memmove(io->buf, io->buf + n, io->len - n); io->len -= n; } } #ifndef MONGOOSE_NO_CGI #ifdef _WIN32 struct threadparam { sock_t s; HANDLE hPipe; }; static int wait_until_ready(sock_t sock, int for_read) { fd_set set; FD_ZERO(&set); FD_SET(sock, &set); select(sock + 1, for_read ? &set : 0, for_read ? 0 : &set, 0, 0); return 1; } static void *push_to_stdin(void *arg) { struct threadparam *tp = arg; int n, sent, stop = 0; DWORD k; char buf[IOBUF_SIZE]; while (!stop && wait_until_ready(tp->s, 1) && (n = recv(tp->s, buf, sizeof(buf), 0)) > 0) { if (n == -1 && GetLastError() == WSAEWOULDBLOCK) continue; for (sent = 0; !stop && sent < n; sent += k) { if (!WriteFile(tp->hPipe, buf + sent, n - sent, &k, 0)) stop = 1; } } DBG(("%s", "FORWARED EVERYTHING TO CGI")); CloseHandle(tp->hPipe); free(tp); _endthread(); return NULL; } static void *pull_from_stdout(void *arg) { struct threadparam *tp = arg; int k, stop = 0; DWORD n, sent; char buf[IOBUF_SIZE]; while (!stop && ReadFile(tp->hPipe, buf, sizeof(buf), &n, NULL)) { for (sent = 0; !stop && sent < n; sent += k) { if (wait_until_ready(tp->s, 0) && (k = send(tp->s, buf + sent, n - sent, 0)) <= 0) stop = 1; } } DBG(("%s", "EOF FROM CGI")); CloseHandle(tp->hPipe); shutdown(tp->s, 2); // Without this, IO thread may get truncated data closesocket(tp->s); free(tp); _endthread(); return NULL; } static void spawn_stdio_thread(sock_t sock, HANDLE hPipe, void *(*func)(void *)) { struct threadparam *tp = malloc(sizeof(*tp)); if (tp != NULL) { tp->s = sock; tp->hPipe = hPipe; mg_start_thread(func, tp); } } static void abs_path(const char *utf8_path, char *abs_path, size_t len) { wchar_t buf[MAX_PATH_SIZE], buf2[MAX_PATH_SIZE]; to_wchar(utf8_path, buf, ARRAY_SIZE(buf)); GetFullPathNameW(buf, ARRAY_SIZE(buf2), buf2, NULL); WideCharToMultiByte(CP_UTF8, 0, buf2, wcslen(buf2) + 1, abs_path, len, 0, 0); } static pid_t start_process(char *interp, const char *cmd, const char *env, const char *envp[], const char *dir, sock_t sock) { STARTUPINFOW si = {0}; PROCESS_INFORMATION pi = {0}; HANDLE a[2], b[2], me = GetCurrentProcess(); wchar_t wcmd[MAX_PATH_SIZE], full_dir[MAX_PATH_SIZE]; char buf[MAX_PATH_SIZE], buf4[MAX_PATH_SIZE], buf5[MAX_PATH_SIZE], cmdline[MAX_PATH_SIZE], *p; DWORD flags = DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS; FILE *fp; si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; si.hStdError = GetStdHandle(STD_ERROR_HANDLE); CreatePipe(&a[0], &a[1], NULL, 0); CreatePipe(&b[0], &b[1], NULL, 0); DuplicateHandle(me, a[0], me, &si.hStdInput, 0, TRUE, flags); DuplicateHandle(me, b[1], me, &si.hStdOutput, 0, TRUE, flags); if (interp == NULL && (fp = fopen(cmd, "r")) != NULL) { buf[0] = buf[1] = '\0'; fgets(buf, sizeof(buf), fp); buf[sizeof(buf) - 1] = '\0'; if (buf[0] == '#' && buf[1] == '!') { interp = buf + 2; for (p = interp + strlen(interp); isspace(* (uint8_t *) p) && p > interp; p--) *p = '\0'; } fclose(fp); } if (interp != NULL) { abs_path(interp, buf4, ARRAY_SIZE(buf4)); interp = buf4; } abs_path(dir, buf5, ARRAY_SIZE(buf5)); to_wchar(dir, full_dir, ARRAY_SIZE(full_dir)); mg_snprintf(cmdline, sizeof(cmdline), "%s%s\"%s\"", interp ? interp : "", interp ? " " : "", cmd); to_wchar(cmdline, wcmd, ARRAY_SIZE(wcmd)); if (CreateProcessW(NULL, wcmd, NULL, NULL, TRUE, CREATE_NEW_PROCESS_GROUP, (void *) env, full_dir, &si, &pi) != 0) { spawn_stdio_thread(sock, a[1], push_to_stdin); spawn_stdio_thread(sock, b[0], pull_from_stdout); } else { CloseHandle(a[1]); CloseHandle(b[0]); closesocket(sock); } DBG(("CGI command: [%ls] -> %p", wcmd, pi.hProcess)); CloseHandle(si.hStdOutput); CloseHandle(si.hStdInput); CloseHandle(a[0]); CloseHandle(b[1]); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); return pi.hProcess; } #else static pid_t start_process(const char *interp, const char *cmd, const char *env, const char *envp[], const char *dir, sock_t sock) { char buf[500]; pid_t pid = fork(); (void) env; if (pid == 0) { if (chdir(dir) == -1) { exit(EXIT_FAILURE); } (void) dup2(sock, 0); (void) dup2(sock, 1); closesocket(sock); // After exec, all signal handlers are restored to their default values, // with one exception of SIGCHLD. According to POSIX.1-2001 and Linux's // implementation, SIGCHLD's handler will leave unchanged after exec // if it was set to be ignored. Restore it to default action. signal(SIGCHLD, SIG_DFL); if (interp == NULL) { execle(cmd, cmd, NULL, envp); } else { execle(interp, interp, cmd, NULL, envp); } snprintf(buf, sizeof(buf), "Status: 500\r\n\r\n" "500 Server Error: %s%s%s: %s", interp == NULL ? "" : interp, interp == NULL ? "" : " ", cmd, strerror(errno)); send(1, buf, strlen(buf), 0); exit(EXIT_FAILURE); // exec call failed } return pid; } #endif // _WIN32 // This structure helps to create an environment for the spawned CGI program. // Environment is an array of "VARIABLE=VALUE\0" ASCIIZ strings, // last element must be NULL. // However, on Windows there is a requirement that all these VARIABLE=VALUE\0 // strings must reside in a contiguous buffer. The end of the buffer is // marked by two '\0' characters. // We satisfy both worlds: we create an envp array (which is vars), all // entries are actually pointers inside buf. struct cgi_env_block { struct mg_connection *conn; char buf[CGI_ENVIRONMENT_SIZE]; // Environment buffer const char *vars[MAX_CGI_ENVIR_VARS]; // char *envp[] int len; // Space taken int nvars; // Number of variables in envp[] }; // Append VARIABLE=VALUE\0 string to the buffer, and add a respective // pointer into the vars array. static char *addenv(struct cgi_env_block *block, const char *fmt, ...) { int n, space; char *added; va_list ap; // Calculate how much space is left in the buffer space = sizeof(block->buf) - block->len - 2; assert(space >= 0); // Make a pointer to the free space int the buffer added = block->buf + block->len; // Copy VARIABLE=VALUE\0 string into the free space va_start(ap, fmt); n = mg_vsnprintf(added, (size_t) space, fmt, ap); va_end(ap); // Make sure we do not overflow buffer and the envp array if (n > 0 && n + 1 < space && block->nvars < (int) ARRAY_SIZE(block->vars) - 2) { // Append a pointer to the added string into the envp array block->vars[block->nvars++] = added; // Bump up used length counter. Include \0 terminator block->len += n + 1; } return added; } static void addenv2(struct cgi_env_block *blk, const char *name) { const char *s; if ((s = getenv(name)) != NULL) addenv(blk, "%s=%s", name, s); } static void prepare_cgi_environment(struct connection *conn, const char *prog, struct cgi_env_block *blk) { struct mg_connection *ri = &conn->mg_conn; const char *s, *slash; char *p, **opts = conn->server->config_options; int i; blk->len = blk->nvars = 0; blk->conn = ri; addenv(blk, "SERVER_NAME=%s", opts[AUTH_DOMAIN]); addenv(blk, "SERVER_ROOT=%s", opts[DOCUMENT_ROOT]); addenv(blk, "DOCUMENT_ROOT=%s", opts[DOCUMENT_ROOT]); addenv(blk, "SERVER_SOFTWARE=%s/%s", "Mongoose", MONGOOSE_VERSION); // Prepare the environment block addenv(blk, "%s", "GATEWAY_INTERFACE=CGI/1.1"); addenv(blk, "%s", "SERVER_PROTOCOL=HTTP/1.1"); addenv(blk, "%s", "REDIRECT_STATUS=200"); // For PHP // TODO(lsm): fix this for IPv6 case //addenv(blk, "SERVER_PORT=%d", ri->remote_port); addenv(blk, "REQUEST_METHOD=%s", ri->request_method); addenv(blk, "REMOTE_ADDR=%s", ri->remote_ip); addenv(blk, "REMOTE_PORT=%d", ri->remote_port); addenv(blk, "REQUEST_URI=%s%s%s", ri->uri, ri->query_string == NULL ? "" : "?", ri->query_string == NULL ? "" : ri->query_string); // SCRIPT_NAME if (conn->path_info != NULL) { addenv(blk, "SCRIPT_NAME=%.*s", (int) (strlen(ri->uri) - strlen(conn->path_info)), ri->uri); addenv(blk, "PATH_INFO=%s", conn->path_info); } else { s = strrchr(prog, '/'); slash = strrchr(ri->uri, '/'); addenv(blk, "SCRIPT_NAME=%.*s%s", slash == NULL ? 0 : (int) (slash - ri->uri), ri->uri, s == NULL ? prog : s); } addenv(blk, "SCRIPT_FILENAME=%s", prog); addenv(blk, "PATH_TRANSLATED=%s", prog); #ifdef MONGOOSE_USE_SSL addenv(blk, "HTTPS=%s", conn->ssl != NULL ? "on" : "off"); #else addenv(blk, "HTTPS=%s", "off"); #endif if ((s = mg_get_header(ri, "Content-Type")) != NULL) addenv(blk, "CONTENT_TYPE=%s", s); if (ri->query_string != NULL) addenv(blk, "QUERY_STRING=%s", ri->query_string); if ((s = mg_get_header(ri, "Content-Length")) != NULL) addenv(blk, "CONTENT_LENGTH=%s", s); addenv2(blk, "PATH"); addenv2(blk, "PERLLIB"); addenv2(blk, ENV_EXPORT_TO_CGI); #if defined(_WIN32) addenv2(blk, "COMSPEC"); addenv2(blk, "SYSTEMROOT"); addenv2(blk, "SystemDrive"); addenv2(blk, "ProgramFiles"); addenv2(blk, "ProgramFiles(x86)"); addenv2(blk, "CommonProgramFiles(x86)"); #else addenv2(blk, "LD_LIBRARY_PATH"); #endif // _WIN32 // Add all headers as HTTP_* variables for (i = 0; i < ri->num_headers; i++) { p = addenv(blk, "HTTP_%s=%s", ri->http_headers[i].name, ri->http_headers[i].value); // Convert variable name into uppercase, and change - to _ for (; *p != '=' && *p != '\0'; p++) { if (*p == '-') *p = '_'; *p = (char) toupper(* (unsigned char *) p); } } blk->vars[blk->nvars++] = NULL; blk->buf[blk->len++] = '\0'; assert(blk->nvars < (int) ARRAY_SIZE(blk->vars)); assert(blk->len > 0); assert(blk->len < (int) sizeof(blk->buf)); } static const char cgi_status[] = "HTTP/1.1 200 OK\r\n"; static void open_cgi_endpoint(struct connection *conn, const char *prog) { struct cgi_env_block blk; char dir[MAX_PATH_SIZE], *p; sock_t fds[2]; prepare_cgi_environment(conn, prog, &blk); // CGI must be executed in its own directory. 'dir' must point to the // directory containing executable program, 'p' must point to the // executable program name relative to 'dir'. if ((p = strrchr(prog, '/')) == NULL) { mg_snprintf(dir, sizeof(dir), "%s", "."); } else { mg_snprintf(dir, sizeof(dir), "%.*s", (int) (p - prog), prog); } // Try to create socketpair in a loop until success. mg_socketpair() // can be interrupted by a signal and fail. // TODO(lsm): use sigaction to restart interrupted syscall do { mg_socketpair(fds); } while (fds[0] == INVALID_SOCKET); if (start_process(conn->server->config_options[CGI_INTERPRETER], prog, blk.buf, blk.vars, dir, fds[1]) > 0) { conn->endpoint_type = EP_CGI; conn->endpoint.cgi_sock = fds[0]; spool(&conn->remote_iobuf, cgi_status, sizeof(cgi_status) - 1); conn->mg_conn.status_code = 200; conn->flags |= CONN_BUFFER; } else { closesocket(fds[0]); send_http_error(conn, 500, "start_process(%s) failed", prog); } #ifndef _WIN32 closesocket(fds[1]); // On Windows, CGI stdio thread closes that socket #endif } static void read_from_cgi(struct connection *conn) { struct iobuf *io = &conn->remote_iobuf; char buf[IOBUF_SIZE], buf2[sizeof(buf)], *s = buf2; const char *status = "500"; struct mg_connection c; int len, s_len = sizeof(cgi_status) - 1, n = recv(conn->endpoint.cgi_sock, buf, sizeof(buf), 0); DBG(("%p %d", conn, n)); if (is_error(n)) { close_local_endpoint(conn); } else if (n > 0) { spool(&conn->remote_iobuf, buf, n); if (conn->flags & CONN_BUFFER) { len = get_request_len(io->buf + s_len, io->len - s_len); if (len == 0) return; if (len > 0) { memset(&c, 0, sizeof(c)); memcpy(buf2, io->buf + s_len, len); buf2[len - 1] = '\0'; parse_http_headers(&s, &c); if (mg_get_header(&c, "Location") != NULL) { status = "302"; } else if ((status = (char *) mg_get_header(&c, "Status")) == NULL) { status = "200"; } } memcpy(io->buf + 9, status, 3); conn->mg_conn.status_code = atoi(status); conn->flags &= ~CONN_BUFFER; } } } static void forward_post_data(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; int n = send(conn->endpoint.cgi_sock, io->buf, io->len, 0); discard_leading_iobuf_bytes(io, n); } #endif // !MONGOOSE_NO_CGI const char *mg_open_msg = ""; // 'sa' must be an initialized address to bind to static sock_t open_listening_socket(union socket_address *sa) { socklen_t len = sizeof(*sa); sock_t on = 1, sock = INVALID_SOCKET; int ret1 = 0, ret2 = 0, ret3 = 0; static char message[500]; mg_open_msg = ""; sock = socket(sa->sa.sa_family, SOCK_STREAM, IPPROTO_TCP); if (sock == INVALID_SOCKET) { mg_open_msg = "Cannot open socket"; goto ret_err; } #ifdef __WIN32__ ret1 = setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &on, sizeof(on)); #else ret1 = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)); #endif if (ret1 != 0) { snprintf(message, sizeof(message), "set socket error %d:", ret1); mg_open_msg = message; closesocket(sock); sock = INVALID_SOCKET; goto ret_err; } else { snprintf(message, sizeof(message), "set socket: %d:", ret1); mg_open_msg = message; } ret2 = bind(sock, &sa->sa, sa->sa.sa_family == AF_INET ? sizeof(sa->sin) : sizeof(sa->sa)); if (ret2 != 0) { snprintf(message, sizeof(message), "bind error %d:", ret2); mg_open_msg = message; closesocket(sock); sock = INVALID_SOCKET; goto ret_err; } ret3 = listen(sock, SOMAXCONN); if (ret3 != 0) { snprintf(message, sizeof(message), "listen error %d:", ret2); mg_open_msg = message; closesocket(sock); sock = INVALID_SOCKET; goto ret_err; } // everything passed set_non_blocking_mode(sock); (void) getsockname(sock, &sa->sa, &len); snprintf(message, sizeof(message), "Socket %d, options %d, bind %d, listen %d", sock, ret1, ret2, ret3); mg_open_msg = message; ret_err: return sock; } static char *mg_strdup(const char *str) { char *copy = (char *) malloc(strlen(str) + 1); if (copy != NULL) { strcpy(copy, str); } return copy; } static int isbyte(int n) { return n >= 0 && n <= 255; } static int parse_net(const char *spec, uint32_t *net, uint32_t *mask) { int n, a, b, c, d, slash = 32, len = 0; if ((sscanf(spec, "%d.%d.%d.%d/%d%n", &a, &b, &c, &d, &slash, &n) == 5 || sscanf(spec, "%d.%d.%d.%d%n", &a, &b, &c, &d, &n) == 4) && isbyte(a) && isbyte(b) && isbyte(c) && isbyte(d) && slash >= 0 && slash < 33) { len = n; *net = ((uint32_t)a << 24) | ((uint32_t)b << 16) | ((uint32_t)c << 8) | d; *mask = slash ? 0xffffffffU << (32 - slash) : 0; } return len; } // Verify given socket address against the ACL. // Return -1 if ACL is malformed, 0 if address is disallowed, 1 if allowed. static int check_acl(const char *acl, uint32_t remote_ip) { int allowed, flag; uint32_t net, mask; struct vec vec; // If any ACL is set, deny by default allowed = acl == NULL ? '+' : '-'; while ((acl = next_option(acl, &vec, NULL)) != NULL) { flag = vec.ptr[0]; if ((flag != '+' && flag != '-') || parse_net(&vec.ptr[1], &net, &mask) == 0) { return -1; } if (net == (remote_ip & mask)) { allowed = flag; } } return allowed == '+'; } static void sockaddr_to_string(char *buf, size_t len, const union socket_address *usa) { buf[0] = '\0'; #if defined(MONGOOSE_USE_IPV6) inet_ntop(usa->sa.sa_family, usa->sa.sa_family == AF_INET ? (void *) &usa->sin.sin_addr : (void *) &usa->sin6.sin6_addr, buf, len); #elif defined(_WIN32) // Only Windoze Vista (and newer) have inet_ntop() strncpy(buf, inet_ntoa(usa->sin.sin_addr), len); #else inet_ntop(usa->sa.sa_family, (void *) &usa->sin.sin_addr, buf, len); #endif } static struct connection *accept_new_connection(struct mg_server *server) { union socket_address sa; socklen_t len = sizeof(sa); sock_t sock = INVALID_SOCKET; struct connection *conn = NULL; // NOTE(lsm): on Windows, sock is always > FD_SETSIZE if ((sock = accept(server->listening_sock, &sa.sa, &len)) == INVALID_SOCKET) { } else if (!check_acl(server->config_options[ACCESS_CONTROL_LIST], ntohl(* (uint32_t *) &sa.sin.sin_addr))) { // NOTE(lsm): check_acl doesn't work for IPv6 closesocket(sock); } else if ((conn = (struct connection *) calloc(1, sizeof(*conn))) == NULL) { closesocket(sock); #ifdef MONGOOSE_USE_SSL } else if (server->ssl_ctx != NULL && ((conn->ssl = SSL_new(server->ssl_ctx)) == NULL || SSL_set_fd(conn->ssl, sock) != 1)) { DBG(("SSL error")); closesocket(sock); free(conn); conn = NULL; #endif } else { set_close_on_exec(sock); set_non_blocking_mode(sock); conn->server = server; conn->client_sock = sock; sockaddr_to_string(conn->mg_conn.remote_ip, sizeof(conn->mg_conn.remote_ip), &sa); conn->mg_conn.remote_port = ntohs(sa.sin.sin_port); conn->mg_conn.server_param = server->server_data; conn->mg_conn.local_ip = server->local_ip; conn->mg_conn.local_port = ntohs(server->lsa.sin.sin_port); LINKED_LIST_ADD_TO_FRONT(&server->active_connections, &conn->link); DBG(("added conn %p", conn)); } return conn; } static void close_conn(struct connection *conn) { LINKED_LIST_REMOVE(&conn->link); closesocket(conn->client_sock); close_local_endpoint(conn); DBG(("%p %d %d", conn, conn->flags, conn->endpoint_type)); free(conn->request); // It's OK to free(NULL), ditto below free(conn->path_info); free(conn->remote_iobuf.buf); free(conn->local_iobuf.buf); #ifdef MONGOOSE_USE_SSL if (conn->ssl != NULL) SSL_free(conn->ssl); #endif free(conn); } // Protect against directory disclosure attack by removing '..', // excessive '/' and '\' characters static void remove_double_dots_and_double_slashes(char *s) { char *p = s; while (*s != '\0') { *p++ = *s++; if (s[-1] == '/' || s[-1] == '\\') { // Skip all following slashes, backslashes and double-dots while (s[0] != '\0') { if (s[0] == '/' || s[0] == '\\') { s++; } else if (s[0] == '.' && s[1] == '.') { s += 2; } else { break; } } } } *p = '\0'; } int mg_url_decode(const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded) { int i, j, a, b; #define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W') for (i = j = 0; i < src_len && j < dst_len - 1; i++, j++) { if (src[i] == '%' && i < src_len - 2 && isxdigit(* (const unsigned char *) (src + i + 1)) && isxdigit(* (const unsigned char *) (src + i + 2))) { a = tolower(* (const unsigned char *) (src + i + 1)); b = tolower(* (const unsigned char *) (src + i + 2)); dst[j] = (char) ((HEXTOI(a) << 4) | HEXTOI(b)); i += 2; } else if (is_form_url_encoded && src[i] == '+') { dst[j] = ' '; } else { dst[j] = src[i]; } } dst[j] = '\0'; // Null-terminate the destination return i >= src_len ? j : -1; } static int is_valid_http_method(const char *method) { return !strcmp(method, "GET") || !strcmp(method, "POST") || !strcmp(method, "HEAD") || !strcmp(method, "CONNECT") || !strcmp(method, "PUT") || !strcmp(method, "DELETE") || !strcmp(method, "OPTIONS") || !strcmp(method, "PROPFIND") || !strcmp(method, "MKCOL"); } // Parse HTTP request, fill in mg_request structure. // This function modifies the buffer by NUL-terminating // HTTP request components, header names and header values. // Note that len must point to the last \n of HTTP headers. static int parse_http_message(char *buf, int len, struct mg_connection *ri) { int is_request, n; // Reset the connection. Make sure that we don't touch fields that are // set elsewhere: remote_ip, remote_port, server_param ri->request_method = ri->uri = ri->http_version = ri->query_string = NULL; ri->num_headers = ri->status_code = ri->is_websocket = ri->content_len = 0; buf[len - 1] = '\0'; // RFC says that all initial whitespaces should be ingored while (*buf != '\0' && isspace(* (unsigned char *) buf)) { buf++; } ri->request_method = skip(&buf, " "); ri->uri = skip(&buf, " "); ri->http_version = skip(&buf, "\r\n"); // HTTP message could be either HTTP request or HTTP response, e.g. // "GET / HTTP/1.0 ...." or "HTTP/1.0 200 OK ..." is_request = is_valid_http_method(ri->request_method); if ((is_request && memcmp(ri->http_version, "HTTP/", 5) != 0) || (!is_request && memcmp(ri->request_method, "HTTP/", 5) != 0)) { len = -1; } else { if (is_request) { ri->http_version += 5; } parse_http_headers(&buf, ri); if ((ri->query_string = strchr(ri->uri, '?')) != NULL) { *(char *) ri->query_string++ = '\0'; } n = (int) strlen(ri->uri); mg_url_decode(ri->uri, n, (char *) ri->uri, n + 1, 0); remove_double_dots_and_double_slashes((char *) ri->uri); } return len; } static int lowercase(const char *s) { return tolower(* (const unsigned char *) s); } static int mg_strcasecmp(const char *s1, const char *s2) { int diff; do { diff = lowercase(s1++) - lowercase(s2++); } while (diff == 0 && s1[-1] != '\0'); return diff; } static int mg_strncasecmp(const char *s1, const char *s2, size_t len) { int diff = 0; if (len > 0) do { diff = lowercase(s1++) - lowercase(s2++); } while (diff == 0 && s1[-1] != '\0' && --len > 0); return diff; } // Return HTTP header value, or NULL if not found. const char *mg_get_header(const struct mg_connection *ri, const char *s) { int i; for (i = 0; i < ri->num_headers; i++) if (!mg_strcasecmp(s, ri->http_headers[i].name)) return ri->http_headers[i].value; return NULL; } #ifndef MONGOOSE_NO_FILESYSTEM // Perform case-insensitive match of string against pattern static int match_prefix(const char *pattern, int pattern_len, const char *str) { const char *or_str; int len, res, i = 0, j = 0; if ((or_str = (const char *) memchr(pattern, '|', pattern_len)) != NULL) { res = match_prefix(pattern, or_str - pattern, str); return res > 0 ? res : match_prefix(or_str + 1, (pattern + pattern_len) - (or_str + 1), str); } for (; i < pattern_len; i++, j++) { if (pattern[i] == '?' && str[j] != '\0') { continue; } else if (pattern[i] == '$') { return str[j] == '\0' ? j : -1; } else if (pattern[i] == '*') { i++; if (pattern[i] == '*') { i++; len = (int) strlen(str + j); } else { len = (int) strcspn(str + j, "/"); } if (i == pattern_len) { return j + len; } do { res = match_prefix(pattern + i, pattern_len - i, str + j + len); } while (res == -1 && len-- > 0); return res == -1 ? -1 : j + res + len; } else if (lowercase(&pattern[i]) != lowercase(&str[j])) { return -1; } } return j; } static int must_hide_file(struct connection *conn, const char *path) { const char *pw_pattern = "**" PASSWORDS_FILE_NAME "$"; const char *pattern = conn->server->config_options[HIDE_FILES_PATTERN]; return match_prefix(pw_pattern, strlen(pw_pattern), path) > 0 || (pattern != NULL && match_prefix(pattern, strlen(pattern), path) > 0); } // Return 1 if real file has been found, 0 otherwise static int convert_uri_to_file_name(struct connection *conn, char *buf, size_t buf_len, file_stat_t *st) { struct vec a, b; const char *rewrites = conn->server->config_options[URL_REWRITES]; const char *root = conn->server->config_options[DOCUMENT_ROOT]; #ifndef MONGOOSE_NO_CGI const char *cgi_pat = conn->server->config_options[CGI_PATTERN]; char *p; #endif const char *uri = conn->mg_conn.uri; int match_len; // No filesystem access if (root == NULL) return 0; // Handle URL rewrites mg_snprintf(buf, buf_len, "%s%s", root, uri); while ((rewrites = next_option(rewrites, &a, &b)) != NULL) { if ((match_len = match_prefix(a.ptr, a.len, uri)) > 0) { mg_snprintf(buf, buf_len, "%.*s%s", (int) b.len, b.ptr, uri + match_len); break; } } if (stat(buf, st) == 0) return 1; #ifndef MONGOOSE_NO_CGI // Support PATH_INFO for CGI scripts. for (p = buf + strlen(root) + 2; *p != '\0'; p++) { if (*p == '/') { *p = '\0'; if (match_prefix(cgi_pat, strlen(cgi_pat), buf) > 0 && !stat(buf, st)) { DBG(("!!!! [%s]", buf)); *p = '/'; conn->path_info = mg_strdup(p); *p = '\0'; return 1; } *p = '/'; } } #endif return 0; } #endif // MONGOOSE_NO_FILESYSTEM static int should_keep_alive(const struct mg_connection *conn) { const char *method = conn->request_method; const char *http_version = conn->http_version; const char *header = mg_get_header(conn, "Connection"); return method != NULL && (!strcmp(method, "GET") || ((struct connection *) conn)->endpoint_type == EP_USER) && ((header != NULL && !mg_strcasecmp(header, "keep-alive")) || (header == NULL && http_version && !strcmp(http_version, "1.1"))); } int mg_write(struct mg_connection *c, const void *buf, int len) { return spool(&((struct connection *) c)->remote_iobuf, buf, len); } void mg_send_status(struct mg_connection *c, int status) { if (c->status_code == 0) { c->status_code = status; mg_printf(c, "HTTP/1.1 %d %s\r\n", status, status_code_to_str(status)); } } void mg_send_header(struct mg_connection *c, const char *name, const char *v) { if (c->status_code == 0) { c->status_code = 200; mg_printf(c, "HTTP/1.1 %d %s\r\n", 200, status_code_to_str(200)); } mg_printf(c, "%s: %s\r\n", name, v); } static void terminate_headers(struct mg_connection *c) { struct connection *conn = (struct connection *) c; if (!(conn->flags & CONN_HEADERS_SENT)) { mg_send_header(c, "Transfer-Encoding", "chunked"); mg_write(c, "\r\n", 2); conn->flags |= CONN_HEADERS_SENT; } } void mg_send_data(struct mg_connection *c, const void *data, int data_len) { terminate_headers(c); write_chunk((struct connection *) c, (const char *) data, data_len); } void mg_printf_data(struct mg_connection *c, const char *fmt, ...) { va_list ap; terminate_headers(c); va_start(ap, fmt); mg_vprintf(c, fmt, ap, 1); va_end(ap); } #if !defined(NO_WEBSOCKET) || !defined(MONGOOSE_NO_AUTH) static int is_big_endian(void) { static const int n = 1; return ((char *) &n)[0] == 0; } #endif #ifndef MONGOOSE_NO_WEBSOCKET // START OF SHA-1 code // Copyright(c) By Steve Reid <steve@edmweb.com> #define SHA1HANDSOFF #if defined(__sun) #include "solarisfixes.h" #endif union char64long16 { unsigned char c[64]; uint32_t l[16]; }; #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) static uint32_t blk0(union char64long16 *block, int i) { // Forrest: SHA expect BIG_ENDIAN, swap if LITTLE_ENDIAN if (!is_big_endian()) { block->l[i] = (rol(block->l[i], 24) & 0xFF00FF00) | (rol(block->l[i], 8) & 0x00FF00FF); } return block->l[i]; } #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(block, i)+0x5A827999+rol(v,5);w=rol(w,30); #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); typedef struct { uint32_t state[5]; uint32_t count[2]; unsigned char buffer[64]; } SHA1_CTX; static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) { uint32_t a, b, c, d, e; union char64long16 block[1]; memcpy(block, buffer, 64); a = state[0]; b = state[1]; c = state[2]; d = state[3]; e = state[4]; R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; // Erase working structures. The order of operations is important, // used to ensure that compiler doesn't optimize those out. memset(block, 0, sizeof(block)); a = b = c = d = e = 0; (void) a; (void) b; (void) c; (void) d; (void) e; } static void SHA1Init(SHA1_CTX* context) { context->state[0] = 0x67452301; context->state[1] = 0xEFCDAB89; context->state[2] = 0x98BADCFE; context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; context->count[0] = context->count[1] = 0; } static void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len) { uint32_t i, j; j = context->count[0]; if ((context->count[0] += len << 3) < j) context->count[1]++; context->count[1] += (len>>29); j = (j >> 3) & 63; if ((j + len) > 63) { memcpy(&context->buffer[j], data, (i = 64-j)); SHA1Transform(context->state, context->buffer); for ( ; i + 63 < len; i += 64) { SHA1Transform(context->state, &data[i]); } j = 0; } else i = 0; memcpy(&context->buffer[j], &data[i], len - i); } static void SHA1Final(unsigned char digest[20], SHA1_CTX* context) { unsigned i; unsigned char finalcount[8], c; for (i = 0; i < 8; i++) { finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)] >> ((3-(i & 3)) * 8) ) & 255); } c = 0200; SHA1Update(context, &c, 1); while ((context->count[0] & 504) != 448) { c = 0000; SHA1Update(context, &c, 1); } SHA1Update(context, finalcount, 8); for (i = 0; i < 20; i++) { digest[i] = (unsigned char) ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); } memset(context, '\0', sizeof(*context)); memset(&finalcount, '\0', sizeof(finalcount)); } // END OF SHA1 CODE static void base64_encode(const unsigned char *src, int src_len, char *dst) { static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; int i, j, a, b, c; for (i = j = 0; i < src_len; i += 3) { a = src[i]; b = i + 1 >= src_len ? 0 : src[i + 1]; c = i + 2 >= src_len ? 0 : src[i + 2]; dst[j++] = b64[a >> 2]; dst[j++] = b64[((a & 3) << 4) | (b >> 4)]; if (i + 1 < src_len) { dst[j++] = b64[(b & 15) << 2 | (c >> 6)]; } if (i + 2 < src_len) { dst[j++] = b64[c & 63]; } } while (j % 4 != 0) { dst[j++] = '='; } dst[j++] = '\0'; } static void send_websocket_handshake(struct mg_connection *conn, const char *key) { static const char *magic = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; char buf[500], sha[20], b64_sha[sizeof(sha) * 2]; SHA1_CTX sha_ctx; mg_snprintf(buf, sizeof(buf), "%s%s", key, magic); SHA1Init(&sha_ctx); SHA1Update(&sha_ctx, (unsigned char *) buf, strlen(buf)); SHA1Final((unsigned char *) sha, &sha_ctx); base64_encode((unsigned char *) sha, sizeof(sha), b64_sha); mg_snprintf(buf, sizeof(buf), "%s%s%s", "HTTP/1.1 101 Switching Protocols\r\n" "Upgrade: websocket\r\n" "Connection: Upgrade\r\n" "Sec-WebSocket-Accept: ", b64_sha, "\r\n\r\n"); mg_write(conn, buf, strlen(buf)); } static int deliver_websocket_frame(struct connection *conn) { // Having buf unsigned char * is important, as it is used below in arithmetic unsigned char *buf = (unsigned char *) conn->local_iobuf.buf; int i, len, buf_len = conn->local_iobuf.len, frame_len = 0, mask_len = 0, header_len = 0, data_len = 0, buffered = 0; if (buf_len >= 2) { len = buf[1] & 127; mask_len = buf[1] & 128 ? 4 : 0; if (len < 126 && buf_len >= mask_len) { data_len = len; header_len = 2 + mask_len; } else if (len == 126 && buf_len >= 4 + mask_len) { header_len = 4 + mask_len; data_len = ((((int) buf[2]) << 8) + buf[3]); } else if (buf_len >= 10 + mask_len) { header_len = 10 + mask_len; data_len = (int) (((uint64_t) htonl(* (uint32_t *) &buf[2])) << 32) + htonl(* (uint32_t *) &buf[6]); } } frame_len = header_len + data_len; buffered = frame_len > 0 && frame_len <= buf_len; if (buffered) { conn->mg_conn.content_len = data_len; conn->mg_conn.content = (char *) buf + header_len; conn->mg_conn.wsbits = buf[0]; // Apply mask if necessary if (mask_len > 0) { for (i = 0; i < data_len; i++) { buf[i + header_len] ^= (buf + header_len - mask_len)[i % 4]; } } // Call the handler and remove frame from the iobuf if (conn->server->request_handler(&conn->mg_conn) == MG_CLIENT_CLOSE) { conn->flags |= CONN_SPOOL_DONE; } discard_leading_iobuf_bytes(&conn->local_iobuf, frame_len); } return buffered; } int mg_websocket_write(struct mg_connection* conn, int opcode, const char *data, size_t data_len) { unsigned char *copy; size_t copy_len = 0; int retval = -1; if ((copy = (unsigned char *) malloc(data_len + 10)) == NULL) { return -1; } copy[0] = 0x80 + (opcode & 0x0f); // Frame format: http://tools.ietf.org/html/rfc6455#section-5.2 if (data_len < 126) { // Inline 7-bit length field copy[1] = data_len; memcpy(copy + 2, data, data_len); copy_len = 2 + data_len; } else if (data_len <= 0xFFFF) { // 16-bit length field copy[1] = 126; * (uint16_t *) (copy + 2) = (uint16_t) htons((uint16_t) data_len); memcpy(copy + 4, data, data_len); copy_len = 4 + data_len; } else { // 64-bit length field copy[1] = 127; * (uint32_t *) (copy + 2) = (uint32_t) htonl((uint32_t) ((uint64_t) data_len >> 32)); * (uint32_t *) (copy + 6) = (uint32_t) htonl(data_len & 0xffffffff); memcpy(copy + 10, data, data_len); copy_len = 10 + data_len; } if (copy_len > 0) { retval = mg_write(conn, copy, copy_len); } free(copy); return retval; } static void send_websocket_handshake_if_requested(struct mg_connection *conn) { const char *ver = mg_get_header(conn, "Sec-WebSocket-Version"), *key = mg_get_header(conn, "Sec-WebSocket-Key"); if (ver != NULL && key != NULL) { conn->is_websocket = 1; send_websocket_handshake(conn, key); } } static void ping_idle_websocket_connection(struct connection *conn, time_t t) { if (t - conn->last_activity_time > MONGOOSE_USE_WEBSOCKET_PING_INTERVAL) { mg_websocket_write(&conn->mg_conn, 0x9, "", 0); } } #else #define ping_idle_websocket_connection(conn, t) #endif // !MONGOOSE_NO_WEBSOCKET static void write_terminating_chunk(struct connection *conn) { mg_write(&conn->mg_conn, "0\r\n\r\n", 5); } static int call_request_handler(struct connection *conn) { int result; conn->mg_conn.content = conn->local_iobuf.buf; switch ((result = conn->server->request_handler(&conn->mg_conn))) { case MG_REQUEST_CALL_AGAIN: conn->flags |= CONN_LONG_RUNNING; break; case MG_REQUEST_NOT_PROCESSED: break; default: if (conn->flags & CONN_HEADERS_SENT) { write_terminating_chunk(conn); } close_local_endpoint(conn); break; } return result; } static void callback_http_client_on_connect(struct connection *conn) { int ok = 1, ret; socklen_t len = sizeof(ok); conn->flags &= ~CONN_CONNECTING; ret = getsockopt(conn->client_sock, SOL_SOCKET, SO_ERROR, (char *) &ok, &len); #ifdef MONGOOSE_USE_SSL if (ret == 0 && ok == 0 && conn->ssl != NULL) { int res = SSL_connect(conn->ssl), ssl_err = SSL_get_error(conn->ssl, res); //DBG(("%p res %d %d", conn, res, ssl_err)); if (res == 1) { conn->flags = CONN_SSL_HANDS_SHAKEN; } else if (res == 0 || ssl_err == 2 || ssl_err == 3) { conn->flags |= CONN_CONNECTING; return; // Call us again } else { ok = 1; } } #endif conn->mg_conn.status_code = (ret == 0 && ok == 0) ? MG_CONNECT_SUCCESS : MG_CONNECT_FAILURE; if (conn->handler(&conn->mg_conn) || ok != 0) { conn->flags |= CONN_CLOSE; } } static void write_to_socket(struct connection *conn) { struct iobuf *io = &conn->remote_iobuf; int n = 0; if (conn->endpoint_type == EP_CLIENT && conn->flags & CONN_CONNECTING) { callback_http_client_on_connect(conn); return; } #ifdef MONGOOSE_USE_SSL if (conn->ssl != NULL) { n = SSL_write(conn->ssl, io->buf, io->len); } else #endif { n = send(conn->client_sock, io->buf, io->len, 0); } DBG(("%p Written %d of %d(%d): [%.*s ...]", conn, n, io->len, io->size, io->len < 40 ? io->len : 40, io->buf)); if (is_error(n)) { conn->flags |= CONN_CLOSE; } else if (n > 0) { discard_leading_iobuf_bytes(io, n); conn->num_bytes_sent += n; } if (io->len == 0 && conn->flags & CONN_SPOOL_DONE) { conn->flags |= CONN_CLOSE; } } const char *mg_get_mime_type(const char *path, const char *default_mime_type) { const char *ext; size_t i, path_len; path_len = strlen(path); for (i = 0; static_builtin_mime_types[i].extension != NULL; i++) { ext = path + (path_len - static_builtin_mime_types[i].ext_len); if (path_len > static_builtin_mime_types[i].ext_len && mg_strcasecmp(ext, static_builtin_mime_types[i].extension) == 0) { return static_builtin_mime_types[i].mime_type; } } return default_mime_type; } #ifndef MONGOOSE_NO_FILESYSTEM // Convert month to the month number. Return -1 on error, or month number static int get_month_index(const char *s) { static const char *month_names[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; int i; for (i = 0; i < (int) ARRAY_SIZE(month_names); i++) if (!strcmp(s, month_names[i])) return i; return -1; } static int num_leap_years(int year) { return year / 4 - year / 100 + year / 400; } // Parse UTC date-time string, and return the corresponding time_t value. static time_t parse_date_string(const char *datetime) { static const unsigned short days_before_month[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; char month_str[32]; int second, minute, hour, day, month, year, leap_days, days; time_t result = (time_t) 0; if (((sscanf(datetime, "%d/%3s/%d %d:%d:%d", &day, month_str, &year, &hour, &minute, &second) == 6) || (sscanf(datetime, "%d %3s %d %d:%d:%d", &day, month_str, &year, &hour, &minute, &second) == 6) || (sscanf(datetime, "%*3s, %d %3s %d %d:%d:%d", &day, month_str, &year, &hour, &minute, &second) == 6) || (sscanf(datetime, "%d-%3s-%d %d:%d:%d", &day, month_str, &year, &hour, &minute, &second) == 6)) && year > 1970 && (month = get_month_index(month_str)) != -1) { leap_days = num_leap_years(year) - num_leap_years(1970); year -= 1970; days = year * 365 + days_before_month[month] + (day - 1) + leap_days; result = days * 24 * 3600 + hour * 3600 + minute * 60 + second; } return result; } // Look at the "path" extension and figure what mime type it has. // Store mime type in the vector. static void get_mime_type(const struct mg_server *server, const char *path, struct vec *vec) { struct vec ext_vec, mime_vec; const char *list, *ext; size_t path_len; path_len = strlen(path); // Scan user-defined mime types first, in case user wants to // override default mime types. list = server->config_options[EXTRA_MIME_TYPES]; while ((list = next_option(list, &ext_vec, &mime_vec)) != NULL) { // ext now points to the path suffix ext = path + path_len - ext_vec.len; if (mg_strncasecmp(ext, ext_vec.ptr, ext_vec.len) == 0) { *vec = mime_vec; return; } } vec->ptr = mg_get_mime_type(path, "text/plain"); vec->len = strlen(vec->ptr); } static const char *suggest_connection_header(const struct mg_connection *conn) { return should_keep_alive(conn) ? "keep-alive" : "close"; } static void construct_etag(char *buf, size_t buf_len, const file_stat_t *st) { mg_snprintf(buf, buf_len, "\"%lx.%" INT64_FMT "\"", (unsigned long) st->st_mtime, (int64_t) st->st_size); } // Return True if we should reply 304 Not Modified. static int is_not_modified(const struct connection *conn, const file_stat_t *stp) { char etag[64]; const char *ims = mg_get_header(&conn->mg_conn, "If-Modified-Since"); const char *inm = mg_get_header(&conn->mg_conn, "If-None-Match"); construct_etag(etag, sizeof(etag), stp); return (inm != NULL && !mg_strcasecmp(etag, inm)) || (ims != NULL && stp->st_mtime <= parse_date_string(ims)); } // For given directory path, substitute it to valid index file. // Return 0 if index file has been found, -1 if not found. // If the file is found, it's stats is returned in stp. static int find_index_file(struct connection *conn, char *path, size_t path_len, file_stat_t *stp) { const char *list = conn->server->config_options[INDEX_FILES]; file_stat_t st; struct vec filename_vec; size_t n = strlen(path), found = 0; // The 'path' given to us points to the directory. Remove all trailing // directory separator characters from the end of the path, and // then append single directory separator character. while (n > 0 && path[n - 1] == '/') { n--; } path[n] = '/'; // Traverse index files list. For each entry, append it to the given // path and see if the file exists. If it exists, break the loop while ((list = next_option(list, &filename_vec, NULL)) != NULL) { // Ignore too long entries that may overflow path buffer if (filename_vec.len > (int) (path_len - (n + 2))) continue; // Prepare full path to the index file strncpy(path + n + 1, filename_vec.ptr, filename_vec.len); path[n + 1 + filename_vec.len] = '\0'; //DBG(("[%s]", path)); // Does it exist? if (!stat(path, &st)) { // Yes it does, break the loop *stp = st; found = 1; break; } } // If no index file exists, restore directory path if (!found) { path[n] = '\0'; } return found; } static int parse_range_header(const char *header, int64_t *a, int64_t *b) { return sscanf(header, "bytes=%" INT64_FMT "-%" INT64_FMT, a, b); } static void gmt_time_string(char *buf, size_t buf_len, time_t *t) { strftime(buf, buf_len, "%a, %d %b %Y %H:%M:%S GMT", gmtime(t)); } static void open_file_endpoint(struct connection *conn, const char *path, file_stat_t *st) { char date[64], lm[64], etag[64], range[64], headers[500]; const char *msg = "OK", *hdr; time_t curtime = time(NULL); int64_t r1, r2; struct vec mime_vec; int n; conn->endpoint_type = EP_FILE; set_close_on_exec(conn->endpoint.fd); conn->mg_conn.status_code = 200; get_mime_type(conn->server, path, &mime_vec); conn->cl = st->st_size; range[0] = '\0'; // If Range: header specified, act accordingly r1 = r2 = 0; hdr = mg_get_header(&conn->mg_conn, "Range"); if (hdr != NULL && (n = parse_range_header(hdr, &r1, &r2)) > 0 && r1 >= 0 && r2 >= 0) { conn->mg_conn.status_code = 206; conn->cl = n == 2 ? (r2 > conn->cl ? conn->cl : r2) - r1 + 1: conn->cl - r1; mg_snprintf(range, sizeof(range), "Content-Range: bytes " "%" INT64_FMT "-%" INT64_FMT "/%" INT64_FMT "\r\n", r1, r1 + conn->cl - 1, (int64_t) st->st_size); msg = "Partial Content"; lseek(conn->endpoint.fd, r1, SEEK_SET); } // Prepare Etag, Date, Last-Modified headers. Must be in UTC, according to // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3 gmt_time_string(date, sizeof(date), &curtime); gmt_time_string(lm, sizeof(lm), &st->st_mtime); construct_etag(etag, sizeof(etag), st); n = mg_snprintf(headers, sizeof(headers), "HTTP/1.1 %d %s\r\n" "Date: %s\r\n" "Last-Modified: %s\r\n" "Etag: %s\r\n" "Content-Type: %.*s\r\n" "Content-Length: %" INT64_FMT "\r\n" "Connection: %s\r\n" "Accept-Ranges: bytes\r\n" "%s%s\r\n", conn->mg_conn.status_code, msg, date, lm, etag, (int) mime_vec.len, mime_vec.ptr, conn->cl, suggest_connection_header(&conn->mg_conn), range, MONGOOSE_USE_EXTRA_HTTP_HEADERS); spool(&conn->remote_iobuf, headers, n); if (!strcmp(conn->mg_conn.request_method, "HEAD")) { conn->flags |= CONN_SPOOL_DONE; close(conn->endpoint.fd); conn->endpoint_type = EP_NONE; } } #endif // MONGOOSE_NO_FILESYSTEM static void call_request_handler_if_data_is_buffered(struct connection *conn) { struct iobuf *loc = &conn->local_iobuf; struct mg_connection *c = &conn->mg_conn; #ifndef MONGOOSE_NO_WEBSOCKET if (conn->mg_conn.is_websocket) { do { } while (deliver_websocket_frame(conn)); } else #endif if ((size_t) loc->len >= c->content_len && call_request_handler(conn) == MG_REQUEST_NOT_PROCESSED) { open_local_endpoint(conn, 1); } } #if !defined(MONGOOSE_NO_DIRECTORY_LISTING) || !defined(MONGOOSE_NO_DAV) #ifdef _WIN32 struct dirent { char d_name[MAX_PATH_SIZE]; }; typedef struct DIR { HANDLE handle; WIN32_FIND_DATAW info; struct dirent result; } DIR; // Implementation of POSIX opendir/closedir/readdir for Windows. static DIR *opendir(const char *name) { DIR *dir = NULL; wchar_t wpath[MAX_PATH_SIZE]; DWORD attrs; if (name == NULL) { SetLastError(ERROR_BAD_ARGUMENTS); } else if ((dir = (DIR *) malloc(sizeof(*dir))) == NULL) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); } else { to_wchar(name, wpath, ARRAY_SIZE(wpath)); attrs = GetFileAttributesW(wpath); if (attrs != 0xFFFFFFFF && ((attrs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY)) { (void) wcscat(wpath, L"\\*"); dir->handle = FindFirstFileW(wpath, &dir->info); dir->result.d_name[0] = '\0'; } else { free(dir); dir = NULL; } } return dir; } static int closedir(DIR *dir) { int result = 0; if (dir != NULL) { if (dir->handle != INVALID_HANDLE_VALUE) result = FindClose(dir->handle) ? 0 : -1; free(dir); } else { result = -1; SetLastError(ERROR_BAD_ARGUMENTS); } return result; } static struct dirent *readdir(DIR *dir) { struct dirent *result = 0; if (dir) { if (dir->handle != INVALID_HANDLE_VALUE) { result = &dir->result; (void) WideCharToMultiByte(CP_UTF8, 0, dir->info.cFileName, -1, result->d_name, sizeof(result->d_name), NULL, NULL); if (!FindNextFileW(dir->handle, &dir->info)) { (void) FindClose(dir->handle); dir->handle = INVALID_HANDLE_VALUE; } } else { SetLastError(ERROR_FILE_NOT_FOUND); } } else { SetLastError(ERROR_BAD_ARGUMENTS); } return result; } #endif // _WIN32 POSIX opendir/closedir/readdir implementation static int scan_directory(struct connection *conn, const char *dir, struct dir_entry **arr) { char path[MAX_PATH_SIZE]; struct dir_entry *p; struct dirent *dp; int arr_size = 0, arr_ind = 0, inc = 100; DIR *dirp; *arr = NULL; if ((dirp = (opendir(dir))) == NULL) return 0; while ((dp = readdir(dirp)) != NULL) { // Do not show current dir and hidden files if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..") || must_hide_file(conn, dp->d_name)) { continue; } mg_snprintf(path, sizeof(path), "%s%c%s", dir, '/', dp->d_name); // Resize the array if nesessary if (arr_ind >= arr_size) { if ((p = (struct dir_entry *) realloc(*arr, (inc + arr_size) * sizeof(**arr))) != NULL) { // Memset new chunk to zero, otherwize st_mtime will have garbage which // can make strftime() segfault, see // http://code.google.com/p/mongoose/issues/detail?id=79 memset(p + arr_size, 0, sizeof(**arr) * inc); *arr = p; arr_size += inc; } } if (arr_ind < arr_size) { (*arr)[arr_ind].conn = conn; (*arr)[arr_ind].file_name = strdup(dp->d_name); stat(path, &(*arr)[arr_ind].st); arr_ind++; } } closedir(dirp); return arr_ind; } static void mg_url_encode(const char *src, char *dst, size_t dst_len) { static const char *dont_escape = "._-$,;~()"; static const char *hex = "0123456789abcdef"; const char *end = dst + dst_len - 1; for (; *src != '\0' && dst < end; src++, dst++) { if (isalnum(*(const unsigned char *) src) || strchr(dont_escape, * (const unsigned char *) src) != NULL) { *dst = *src; } else if (dst + 2 < end) { dst[0] = '%'; dst[1] = hex[(* (const unsigned char *) src) >> 4]; dst[2] = hex[(* (const unsigned char *) src) & 0xf]; dst += 2; } } *dst = '\0'; } #endif // !NO_DIRECTORY_LISTING || !MONGOOSE_NO_DAV #ifndef MONGOOSE_NO_DIRECTORY_LISTING static void print_dir_entry(const struct dir_entry *de) { char size[64], mod[64], href[MAX_PATH_SIZE * 3], chunk[MAX_PATH_SIZE * 4]; int64_t fsize = de->st.st_size; int is_dir = S_ISDIR(de->st.st_mode), n; const char *slash = is_dir ? "/" : ""; if (is_dir) { mg_snprintf(size, sizeof(size), "%s", "[DIRECTORY]"); } else { // We use (signed) cast below because MSVC 6 compiler cannot // convert unsigned __int64 to double. if (fsize < 1024) { mg_snprintf(size, sizeof(size), "%d", (int) fsize); } else if (fsize < 0x100000) { mg_snprintf(size, sizeof(size), "%.1fk", (double) fsize / 1024.0); } else if (fsize < 0x40000000) { mg_snprintf(size, sizeof(size), "%.1fM", (double) fsize / 1048576); } else { mg_snprintf(size, sizeof(size), "%.1fG", (double) fsize / 1073741824); } } strftime(mod, sizeof(mod), "%d-%b-%Y %H:%M", localtime(&de->st.st_mtime)); mg_url_encode(de->file_name, href, sizeof(href)); n = mg_snprintf(chunk, sizeof(chunk), "<tr><td><a href=\"%s%s%s\">%s%s</a></td>" "<td>&nbsp;%s</td><td>&nbsp;&nbsp;%s</td></tr>\n", de->conn->mg_conn.uri, href, slash, de->file_name, slash, mod, size); write_chunk((struct connection *) de->conn, chunk, n); } // Sort directory entries by size, or name, or modification time. // On windows, __cdecl specification is needed in case if project is built // with __stdcall convention. qsort always requires __cdels callback. static int __cdecl compare_dir_entries(const void *p1, const void *p2) { const struct dir_entry *a = (const struct dir_entry *) p1, *b = (const struct dir_entry *) p2; const char *qs = a->conn->mg_conn.query_string ? a->conn->mg_conn.query_string : "na"; int cmp_result = 0; if (S_ISDIR(a->st.st_mode) && !S_ISDIR(b->st.st_mode)) { return -1; // Always put directories on top } else if (!S_ISDIR(a->st.st_mode) && S_ISDIR(b->st.st_mode)) { return 1; // Always put directories on top } else if (*qs == 'n') { cmp_result = strcmp(a->file_name, b->file_name); } else if (*qs == 's') { cmp_result = a->st.st_size == b->st.st_size ? 0 : a->st.st_size > b->st.st_size ? 1 : -1; } else if (*qs == 'd') { cmp_result = a->st.st_mtime == b->st.st_mtime ? 0 : a->st.st_mtime > b->st.st_mtime ? 1 : -1; } return qs[1] == 'd' ? -cmp_result : cmp_result; } static void send_directory_listing(struct connection *conn, const char *dir) { char buf[2000]; struct dir_entry *arr = NULL; int i, num_entries, sort_direction = conn->mg_conn.query_string != NULL && conn->mg_conn.query_string[1] == 'd' ? 'a' : 'd'; conn->mg_conn.status_code = 200; mg_snprintf(buf, sizeof(buf), "%s", "HTTP/1.1 200 OK\r\n" "Transfer-Encoding: Chunked\r\n" "Content-Type: text/html; charset=utf-8\r\n\r\n"); spool(&conn->remote_iobuf, buf, strlen(buf)); mg_snprintf(buf, sizeof(buf), "<html><head><title>Index of %s</title>" "<style>th {text-align: left;}</style></head>" "<body><h1>Index of %s</h1><pre><table cellpadding=\"0\">" "<tr><th><a href=\"?n%c\">Name</a></th>" "<th><a href=\"?d%c\">Modified</a></th>" "<th><a href=\"?s%c\">Size</a></th></tr>" "<tr><td colspan=\"3\"><hr></td></tr>", conn->mg_conn.uri, conn->mg_conn.uri, sort_direction, sort_direction, sort_direction); write_chunk(conn, buf, strlen(buf)); num_entries = scan_directory(conn, dir, &arr); qsort(arr, num_entries, sizeof(arr[0]), compare_dir_entries); for (i = 0; i < num_entries; i++) { print_dir_entry(&arr[i]); free(arr[i].file_name); } free(arr); write_terminating_chunk(conn); close_local_endpoint(conn); } #endif // MONGOOSE_NO_DIRECTORY_LISTING #ifndef MONGOOSE_NO_DAV static void print_props(struct connection *conn, const char *uri, file_stat_t *stp) { char mtime[64], buf[MAX_PATH_SIZE + 200]; gmt_time_string(mtime, sizeof(mtime), &stp->st_mtime); mg_snprintf(buf, sizeof(buf), "<d:response>" "<d:href>%s</d:href>" "<d:propstat>" "<d:prop>" "<d:resourcetype>%s</d:resourcetype>" "<d:getcontentlength>%" INT64_FMT "</d:getcontentlength>" "<d:getlastmodified>%s</d:getlastmodified>" "</d:prop>" "<d:status>HTTP/1.1 200 OK</d:status>" "</d:propstat>" "</d:response>\n", uri, S_ISDIR(stp->st_mode) ? "<d:collection/>" : "", (int64_t) stp->st_size, mtime); spool(&conn->remote_iobuf, buf, strlen(buf)); } static void handle_propfind(struct connection *conn, const char *path, file_stat_t *stp) { static const char header[] = "HTTP/1.1 207 Multi-Status\r\n" "Connection: close\r\n" "Content-Type: text/xml; charset=utf-8\r\n\r\n" "<?xml version=\"1.0\" encoding=\"utf-8\"?>" "<d:multistatus xmlns:d='DAV:'>\n"; static const char footer[] = "</d:multistatus>"; const char *depth = mg_get_header(&conn->mg_conn, "Depth"), *list_dir = conn->server->config_options[ENABLE_DIRECTORY_LISTING]; conn->mg_conn.status_code = 207; spool(&conn->remote_iobuf, header, sizeof(header) - 1); // Print properties for the requested resource itself print_props(conn, conn->mg_conn.uri, stp); // If it is a directory, print directory entries too if Depth is not 0 if (S_ISDIR(stp->st_mode) && !mg_strcasecmp(list_dir, "yes") && (depth == NULL || strcmp(depth, "0") != 0)) { struct dir_entry *arr = NULL; int i, num_entries = scan_directory(conn, path, &arr); for (i = 0; i < num_entries; i++) { char buf[MAX_PATH_SIZE], buf2[sizeof(buf) * 3]; struct dir_entry *de = &arr[i]; mg_snprintf(buf, sizeof(buf), "%s%s", de->conn->mg_conn.uri, de->file_name); mg_url_encode(buf, buf2, sizeof(buf2) - 1); print_props(conn, buf, &de->st); } } spool(&conn->remote_iobuf, footer, sizeof(footer) - 1); close_local_endpoint(conn); } static void handle_mkcol(struct connection *conn, const char *path) { int status_code = 500; if (conn->mg_conn.content_len > 0) { status_code = 415; } else if (!mkdir(path, 0755)) { status_code = 201; } else if (errno == EEXIST) { status_code = 405; } else if (errno == EACCES) { status_code = 403; } else if (errno == ENOENT) { status_code = 409; } send_http_error(conn, status_code, NULL); } static int remove_directory(const char *dir) { char path[MAX_PATH_SIZE]; struct dirent *dp; file_stat_t st; DIR *dirp; if ((dirp = opendir(dir)) == NULL) return 0; while ((dp = readdir(dirp)) != NULL) { if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; mg_snprintf(path, sizeof(path), "%s%c%s", dir, '/', dp->d_name); stat(path, &st); if (S_ISDIR(st.st_mode)) { remove_directory(path); } else { remove(path); } } closedir(dirp); rmdir(dir); return 1; } static void handle_delete(struct connection *conn, const char *path) { file_stat_t st; if (stat(path, &st) != 0) { send_http_error(conn, 404, NULL); } else if (S_ISDIR(st.st_mode)) { remove_directory(path); send_http_error(conn, 204, NULL); } else if (!remove(path) == 0) { send_http_error(conn, 204, NULL); } else { send_http_error(conn, 423, NULL); } } // For a given PUT path, create all intermediate subdirectories // for given path. Return 0 if the path itself is a directory, // or -1 on error, 1 if OK. static int put_dir(const char *path) { char buf[MAX_PATH_SIZE]; const char *s, *p; file_stat_t st; // Create intermediate directories if they do not exist for (s = p = path + 1; (p = strchr(s, '/')) != NULL; s = ++p) { if (p - path >= (int) sizeof(buf)) return -1; // Buffer overflow memcpy(buf, path, p - path); buf[p - path] = '\0'; if (stat(buf, &st) != 0 && mkdir(buf, 0755) != 0) return -1; if (p[1] == '\0') return 0; // Path is a directory itself } return 1; } static void handle_put(struct connection *conn, const char *path) { file_stat_t st; const char *range, *cl_hdr = mg_get_header(&conn->mg_conn, "Content-Length"); int64_t r1, r2; int rc; conn->mg_conn.status_code = !stat(path, &st) ? 200 : 201; if ((rc = put_dir(path)) == 0) { mg_printf(&conn->mg_conn, "HTTP/1.1 %d OK\r\n\r\n", conn->mg_conn.status_code); close_local_endpoint(conn); } else if (rc == -1) { send_http_error(conn, 500, "put_dir: %s", strerror(errno)); } else if (cl_hdr == NULL) { send_http_error(conn, 411, NULL); #ifdef _WIN32 //On Windows, open() is a macro with 2 params } else if ((conn->endpoint.fd = open(path, O_RDWR | O_CREAT | O_TRUNC)) < 0) { #else } else if ((conn->endpoint.fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0644)) < 0) { #endif send_http_error(conn, 500, "open(%s): %s", path, strerror(errno)); } else { DBG(("PUT [%s] %d", path, conn->local_iobuf.len)); conn->endpoint_type = EP_PUT; set_close_on_exec(conn->endpoint.fd); range = mg_get_header(&conn->mg_conn, "Content-Range"); conn->cl = to64(cl_hdr); r1 = r2 = 0; if (range != NULL && parse_range_header(range, &r1, &r2) > 0) { conn->mg_conn.status_code = 206; lseek(conn->endpoint.fd, r1, SEEK_SET); conn->cl = r2 > r1 ? r2 - r1 + 1: conn->cl - r1; } mg_printf(&conn->mg_conn, "HTTP/1.1 %d OK\r\nContent-Length: 0\r\n\r\n", conn->mg_conn.status_code); } } static void forward_put_data(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; int n = write(conn->endpoint.fd, io->buf, io->len); if (n > 0) { discard_leading_iobuf_bytes(io, n); conn->cl -= n; if (conn->cl <= 0) { close_local_endpoint(conn); } } } #endif // MONGOOSE_NO_DAV static void send_options(struct connection *conn) { static const char reply[] = "HTTP/1.1 200 OK\r\nAllow: GET, POST, HEAD, " "CONNECT, PUT, DELETE, OPTIONS, PROPFIND, MKCOL\r\nDAV: 1\r\n\r\n"; spool(&conn->remote_iobuf, reply, sizeof(reply) - 1); conn->flags |= CONN_SPOOL_DONE; } #ifndef MONGOOSE_NO_AUTH void mg_send_digest_auth_request(struct mg_connection *c) { struct connection *conn = (struct connection *) c; c->status_code = 401; mg_printf(c, "HTTP/1.1 401 Unauthorized\r\n" "WWW-Authenticate: Digest qop=\"auth\", " "realm=\"%s\", nonce=\"%lu\"\r\n\r\n", conn->server->config_options[AUTH_DOMAIN], (unsigned long) time(NULL)); close_local_endpoint(conn); } // Use the global passwords file, if specified by auth_gpass option, // or search for .htpasswd in the requested directory. static FILE *open_auth_file(struct connection *conn, const char *path) { char name[MAX_PATH_SIZE]; const char *p, *gpass = conn->server->config_options[GLOBAL_AUTH_FILE]; file_stat_t st; FILE *fp = NULL; if (gpass != NULL) { // Use global passwords file fp = fopen(gpass, "r"); } else if (!stat(path, &st) && S_ISDIR(st.st_mode)) { mg_snprintf(name, sizeof(name), "%s%c%s", path, '/', PASSWORDS_FILE_NAME); fp = fopen(name, "r"); } else { // Try to find .htpasswd in requested directory. if ((p = strrchr(path, '/')) == NULL) p = path; mg_snprintf(name, sizeof(name), "%.*s%c%s", (int) (p - path), path, '/', PASSWORDS_FILE_NAME); fp = fopen(name, "r"); } return fp; } #if !defined(HAVE_MD5) && !defined(MONGOOSE_NO_AUTH) typedef struct MD5Context { uint32_t buf[4]; uint32_t bits[2]; unsigned char in[64]; } MD5_CTX; static void byteReverse(unsigned char *buf, unsigned longs) { uint32_t t; // Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN if (is_big_endian()) { do { t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); * (uint32_t *) buf = t; buf += 4; } while (--longs); } } #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) // Start MD5 accumulation. Set bit count to 0 and buffer to mysterious // initialization constants. static void MD5Init(MD5_CTX *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; } static void MD5Transform(uint32_t buf[4], uint32_t const in[16]) { register uint32_t a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } static void MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) { uint32_t t; t = ctx->bits[0]; if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) ctx->bits[1]++; ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; if (t) { unsigned char *p = (unsigned char *) ctx->in + t; t = 64 - t; if (len < t) { memcpy(p, buf, len); return; } memcpy(p, buf, t); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32_t *) ctx->in); buf += t; len -= t; } while (len >= 64) { memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32_t *) ctx->in); buf += 64; len -= 64; } memcpy(ctx->in, buf, len); } static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) { unsigned count; unsigned char *p; uint32_t *a; count = (ctx->bits[0] >> 3) & 0x3F; p = ctx->in + count; *p++ = 0x80; count = 64 - 1 - count; if (count < 8) { memset(p, 0, count); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32_t *) ctx->in); memset(ctx->in, 0, 56); } else { memset(p, 0, count - 8); } byteReverse(ctx->in, 14); a = (uint32_t *)ctx->in; a[14] = ctx->bits[0]; a[15] = ctx->bits[1]; MD5Transform(ctx->buf, (uint32_t *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); memset((char *) ctx, 0, sizeof(*ctx)); } #endif // !HAVE_MD5 // Stringify binary data. Output buffer must be twice as big as input, // because each byte takes 2 bytes in string representation static void bin2str(char *to, const unsigned char *p, size_t len) { static const char *hex = "0123456789abcdef"; for (; len--; p++) { *to++ = hex[p[0] >> 4]; *to++ = hex[p[0] & 0x0f]; } *to = '\0'; } // Return stringified MD5 hash for list of strings. Buffer must be 33 bytes. char *mg_md5(char buf[33], ...) { unsigned char hash[16]; const char *p; va_list ap; MD5_CTX ctx; MD5Init(&ctx); va_start(ap, buf); while ((p = va_arg(ap, const char *)) != NULL) { MD5Update(&ctx, (const unsigned char *) p, (unsigned) strlen(p)); } va_end(ap); MD5Final(hash, &ctx); bin2str(buf, hash, sizeof(hash)); return buf; } // Check the user's password, return 1 if OK static int check_password(const char *method, const char *ha1, const char *uri, const char *nonce, const char *nc, const char *cnonce, const char *qop, const char *response) { char ha2[32 + 1], expected_response[32 + 1]; #if 0 // Check for authentication timeout if ((unsigned long) time(NULL) - (unsigned long) to64(nonce) > 3600) { return 0; } #endif mg_md5(ha2, method, ":", uri, NULL); mg_md5(expected_response, ha1, ":", nonce, ":", nc, ":", cnonce, ":", qop, ":", ha2, NULL); return mg_strcasecmp(response, expected_response) == 0 ? MG_AUTH_OK : MG_AUTH_FAIL; } // Authorize against the opened passwords file. Return 1 if authorized. int mg_authorize_digest(struct mg_connection *c, FILE *fp) { struct connection *conn = (struct connection *) c; const char *hdr; char line[256], f_user[256], ha1[256], f_domain[256], user[100], nonce[100], uri[MAX_REQUEST_SIZE], cnonce[100], resp[100], qop[100], nc[100]; if (c == NULL || fp == NULL) return 0; if ((hdr = mg_get_header(c, "Authorization")) == NULL || mg_strncasecmp(hdr, "Digest ", 7) != 0) return 0; if (!mg_parse_header(hdr, "username", user, sizeof(user))) return 0; if (!mg_parse_header(hdr, "cnonce", cnonce, sizeof(cnonce))) return 0; if (!mg_parse_header(hdr, "response", resp, sizeof(resp))) return 0; if (!mg_parse_header(hdr, "uri", uri, sizeof(uri))) return 0; if (!mg_parse_header(hdr, "qop", qop, sizeof(qop))) return 0; if (!mg_parse_header(hdr, "nc", nc, sizeof(nc))) return 0; if (!mg_parse_header(hdr, "nonce", nonce, sizeof(nonce))) return 0; while (fgets(line, sizeof(line), fp) != NULL) { if (sscanf(line, "%[^:]:%[^:]:%s", f_user, f_domain, ha1) == 3 && !strcmp(user, f_user) && // NOTE(lsm): due to a bug in MSIE, we do not compare URIs !strcmp(conn->server->config_options[AUTH_DOMAIN], f_domain)) return check_password(c->request_method, ha1, uri, nonce, nc, cnonce, qop, resp); } return MG_AUTH_FAIL; } // Return 1 if request is authorised, 0 otherwise. static int is_authorized(struct connection *conn, const char *path) { FILE *fp; int authorized = MG_AUTH_OK; if ((fp = open_auth_file(conn, path)) != NULL) { authorized = mg_authorize_digest(&conn->mg_conn, fp); fclose(fp); } return authorized; } static int is_authorized_for_dav(struct connection *conn) { const char *auth_file = conn->server->config_options[DAV_AUTH_FILE]; FILE *fp; int authorized = MG_AUTH_FAIL; if (auth_file != NULL && (fp = fopen(auth_file, "r")) != NULL) { authorized = mg_authorize_digest(&conn->mg_conn, fp); fclose(fp); } return authorized; } static int is_dav_mutation(const struct connection *conn) { const char *s = conn->mg_conn.request_method; return s && (!strcmp(s, "PUT") || !strcmp(s, "DELETE") || !strcmp(s, "MKCOL")); } #endif // MONGOOSE_NO_AUTH int parse_header(const char *str, int str_len, const char *var_name, char *buf, size_t buf_size) { int ch = ' ', len = 0, n = strlen(var_name); const char *p, *end = str + str_len, *s = NULL; if (buf != NULL && buf_size > 0) buf[0] = '\0'; // Find where variable starts for (s = str; s != NULL && s + n < end; s++) { if ((s == str || s[-1] == ' ' || s[-1] == ',') && s[n] == '=' && !memcmp(s, var_name, n)) break; } if (s != NULL && &s[n + 1] < end) { s += n + 1; if (*s == '"' || *s == '\'') ch = *s++; p = s; while (p < end && p[0] != ch && p[0] != ',' && len < (int) buf_size) { if (p[0] == '\\' && p[1] == ch) p++; buf[len++] = *p++; } if (len >= (int) buf_size || (ch != ' ' && *p != ch)) { len = 0; } else { if (len > 0 && s[len - 1] == ',') len--; if (len > 0 && s[len - 1] == ';') len--; buf[len] = '\0'; } } return len; } int mg_parse_header(const char *s, const char *var_name, char *buf, size_t buf_size) { return parse_header(s, s == NULL ? 0 : strlen(s), var_name, buf, buf_size); } #ifdef MONGOOSE_USE_LUA #include "lua_5.2.1.h" #ifdef _WIN32 static void *mmap(void *addr, int64_t len, int prot, int flags, int fd, int offset) { HANDLE fh = (HANDLE) _get_osfhandle(fd); HANDLE mh = CreateFileMapping(fh, 0, PAGE_READONLY, 0, 0, 0); void *p = MapViewOfFile(mh, FILE_MAP_READ, 0, 0, (size_t) len); CloseHandle(mh); return p; } #define munmap(x, y) UnmapViewOfFile(x) #define MAP_FAILED NULL #define MAP_PRIVATE 0 #define PROT_READ 0 #else #include <sys/mman.h> #endif static void reg_string(struct lua_State *L, const char *name, const char *val) { lua_pushstring(L, name); lua_pushstring(L, val); lua_rawset(L, -3); } static void reg_int(struct lua_State *L, const char *name, int val) { lua_pushstring(L, name); lua_pushinteger(L, val); lua_rawset(L, -3); } static void reg_function(struct lua_State *L, const char *name, lua_CFunction func, struct mg_connection *conn) { lua_pushstring(L, name); lua_pushlightuserdata(L, conn); lua_pushcclosure(L, func, 1); lua_rawset(L, -3); } static int lua_write(lua_State *L) { int i, num_args; const char *str; size_t size; struct mg_connection *conn = (struct mg_connection *) lua_touserdata(L, lua_upvalueindex(1)); num_args = lua_gettop(L); for (i = 1; i <= num_args; i++) { if (lua_isstring(L, i)) { str = lua_tolstring(L, i, &size); mg_write(conn, str, size); } } return 0; } static int lsp_sock_close(lua_State *L) { if (lua_gettop(L) > 0 && lua_istable(L, -1)) { lua_getfield(L, -1, "sock"); closesocket((sock_t) lua_tonumber(L, -1)); } else { return luaL_error(L, "invalid :close() call"); } return 1; } static int lsp_sock_recv(lua_State *L) { char buf[2000]; int n; if (lua_gettop(L) > 0 && lua_istable(L, -1)) { lua_getfield(L, -1, "sock"); n = recv((sock_t) lua_tonumber(L, -1), buf, sizeof(buf), 0); if (n <= 0) { lua_pushnil(L); } else { lua_pushlstring(L, buf, n); } } else { return luaL_error(L, "invalid :close() call"); } return 1; } static int lsp_sock_send(lua_State *L) { const char *buf; size_t len, sent = 0; int n, sock; if (lua_gettop(L) > 1 && lua_istable(L, -2) && lua_isstring(L, -1)) { buf = lua_tolstring(L, -1, &len); lua_getfield(L, -2, "sock"); sock = (int) lua_tonumber(L, -1); while (sent < len) { if ((n = send(sock, buf + sent, len - sent, 0)) <= 0) break; sent += n; } lua_pushnumber(L, sent); } else { return luaL_error(L, "invalid :close() call"); } return 1; } static const struct luaL_Reg luasocket_methods[] = { {"close", lsp_sock_close}, {"send", lsp_sock_send}, {"recv", lsp_sock_recv}, {NULL, NULL} }; static sock_t conn2(const char *host, int port) { struct sockaddr_in sin; struct hostent *he = NULL; sock_t sock = INVALID_SOCKET; if (host != NULL && (he = gethostbyname(host)) != NULL && (sock = socket(PF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET) { set_close_on_exec(sock); sin.sin_family = AF_INET; sin.sin_port = htons((uint16_t) port); sin.sin_addr = * (struct in_addr *) he->h_addr_list[0]; if (connect(sock, (struct sockaddr *) &sin, sizeof(sin)) != 0) { closesocket(sock); sock = INVALID_SOCKET; } } return sock; } static int lsp_connect(lua_State *L) { sock_t sock; if (lua_isstring(L, -2) && lua_isnumber(L, -1)) { sock = conn2(lua_tostring(L, -2), (int) lua_tonumber(L, -1)); if (sock == INVALID_SOCKET) { lua_pushnil(L); } else { lua_newtable(L); reg_int(L, "sock", sock); reg_string(L, "host", lua_tostring(L, -4)); luaL_getmetatable(L, "luasocket"); lua_setmetatable(L, -2); } } else { return luaL_error(L, "connect(host,port): invalid parameter given."); } return 1; } static void prepare_lua_environment(struct mg_connection *ri, lua_State *L) { extern void luaL_openlibs(lua_State *); int i; luaL_openlibs(L); #ifdef MONGOOSE_USE_LUA_SQLITE3 { extern int luaopen_lsqlite3(lua_State *); luaopen_lsqlite3(L); } #endif luaL_newmetatable(L, "luasocket"); lua_pushliteral(L, "__index"); luaL_newlib(L, luasocket_methods); lua_rawset(L, -3); lua_pop(L, 1); lua_register(L, "connect", lsp_connect); if (ri == NULL) return; // Register mg module lua_newtable(L); reg_function(L, "write", lua_write, ri); // Export request_info lua_pushstring(L, "request_info"); lua_newtable(L); reg_string(L, "request_method", ri->request_method); reg_string(L, "uri", ri->uri); reg_string(L, "http_version", ri->http_version); reg_string(L, "query_string", ri->query_string); reg_string(L, "remote_ip", ri->remote_ip); reg_int(L, "remote_port", ri->remote_port); lua_pushstring(L, "content"); lua_pushlstring(L, ri->content == NULL ? "" : ri->content, 0); lua_rawset(L, -3); reg_int(L, "content_len", ri->content_len); reg_int(L, "num_headers", ri->num_headers); lua_pushstring(L, "http_headers"); lua_newtable(L); for (i = 0; i < ri->num_headers; i++) { reg_string(L, ri->http_headers[i].name, ri->http_headers[i].value); } lua_rawset(L, -3); lua_rawset(L, -3); lua_setglobal(L, "mg"); // Register default mg.onerror function (void) luaL_dostring(L, "mg.onerror = function(e) mg.write('\\nLua " "error:\\n', debug.traceback(e, 1)) end"); } static int lua_error_handler(lua_State *L) { const char *error_msg = lua_isstring(L, -1) ? lua_tostring(L, -1) : "?\n"; lua_getglobal(L, "mg"); if (!lua_isnil(L, -1)) { lua_getfield(L, -1, "write"); // call mg.write() lua_pushstring(L, error_msg); lua_pushliteral(L, "\n"); lua_call(L, 2, 0); (void) luaL_dostring(L, "mg.write(debug.traceback(), '\\n')"); } else { printf("Lua error: [%s]\n", error_msg); (void) luaL_dostring(L, "print(debug.traceback(), '\\n')"); } // TODO(lsm): leave the stack balanced return 0; } static void lsp(struct connection *conn, const char *p, int len, lua_State *L) { int i, j, pos = 0; for (i = 0; i < len; i++) { if (p[i] == '<' && p[i + 1] == '?') { for (j = i + 1; j < len ; j++) { if (p[j] == '?' && p[j + 1] == '>') { mg_write(&conn->mg_conn, p + pos, i - pos); if (luaL_loadbuffer(L, p + (i + 2), j - (i + 2), "") == LUA_OK) { lua_pcall(L, 0, LUA_MULTRET, 0); } pos = j + 2; i = pos - 1; break; } } } } if (i > pos) mg_write(&conn->mg_conn, p + pos, i - pos); } static void handle_lsp_request(struct connection *conn, const char *path, file_stat_t *st) { void *p = NULL; lua_State *L = NULL; FILE *fp = NULL; if ((fp = fopen(path, "r")) == NULL || (p = mmap(NULL, st->st_size, PROT_READ, MAP_PRIVATE, fileno(fp), 0)) == MAP_FAILED || (L = luaL_newstate()) == NULL) { send_http_error(conn, 500, "mmap(%s): %s", path, strerror(errno)); } else { // We're not sending HTTP headers here, Lua page must do it. prepare_lua_environment(&conn->mg_conn, L); lua_pushcclosure(L, &lua_error_handler, 0); lua_pushglobaltable(L); lsp(conn, p, (int) st->st_size, L); close_local_endpoint(conn); } if (L != NULL) lua_close(L); if (p != NULL) munmap(p, st->st_size); if (fp != NULL) fclose(fp); } #endif // MONGOOSE_USE_LUA static void open_local_endpoint(struct connection *conn, int skip_user) { #ifndef MONGOOSE_NO_FILESYSTEM static const char lua_pat[] = LUA_SCRIPT_PATTERN; file_stat_t st; char path[MAX_PATH_SIZE]; int exists = 0, is_directory = 0; #ifndef MONGOOSE_NO_CGI const char *cgi_pat = conn->server->config_options[CGI_PATTERN]; #else const char *cgi_pat = DEFAULT_CGI_PATTERN; #endif #ifndef MONGOOSE_NO_DIRECTORY_LISTING const char *dir_lst = conn->server->config_options[ENABLE_DIRECTORY_LISTING]; #else const char *dir_lst = "yes"; #endif #endif #ifndef MONGOOSE_NO_AUTH // Call auth handler if (conn->server->auth_handler != NULL && conn->server->auth_handler(&conn->mg_conn) == MG_AUTH_FAIL) { mg_send_digest_auth_request(&conn->mg_conn); return; } #endif // Call URI handler if one is registered for this URI if (skip_user == 0 && conn->server->request_handler != NULL) { conn->endpoint_type = EP_USER; #if MONGOOSE_USE_POST_SIZE_LIMIT > 1 { const char *cl = mg_get_header(&conn->mg_conn, "Content-Length"); if (!strcmp(conn->mg_conn.request_method, "POST") && (cl == NULL || to64(cl) > MONGOOSE_USE_POST_SIZE_LIMIT)) { send_http_error(conn, 500, "POST size > %zu", (size_t) MONGOOSE_USE_POST_SIZE_LIMIT); } } #endif return; } #ifdef MONGOOSE_NO_FILESYSTEM if (!strcmp(conn->mg_conn.request_method, "OPTIONS")) { send_options(conn); } else { send_http_error(conn, 404, NULL); } #else exists = convert_uri_to_file_name(conn, path, sizeof(path), &st); is_directory = S_ISDIR(st.st_mode); if (!strcmp(conn->mg_conn.request_method, "OPTIONS")) { send_options(conn); } else if (conn->server->config_options[DOCUMENT_ROOT] == NULL) { send_http_error(conn, 404, NULL); #ifndef MONGOOSE_NO_AUTH } else if ((!is_dav_mutation(conn) && !is_authorized(conn, path)) || (is_dav_mutation(conn) && !is_authorized_for_dav(conn))) { mg_send_digest_auth_request(&conn->mg_conn); close_local_endpoint(conn); #endif #ifndef MONGOOSE_NO_DAV } else if (!strcmp(conn->mg_conn.request_method, "PROPFIND")) { handle_propfind(conn, path, &st); } else if (!strcmp(conn->mg_conn.request_method, "MKCOL")) { handle_mkcol(conn, path); } else if (!strcmp(conn->mg_conn.request_method, "DELETE")) { handle_delete(conn, path); } else if (!strcmp(conn->mg_conn.request_method, "PUT")) { handle_put(conn, path); #endif } else if (!exists || must_hide_file(conn, path)) { send_http_error(conn, 404, NULL); } else if (is_directory && conn->mg_conn.uri[strlen(conn->mg_conn.uri) - 1] != '/') { conn->mg_conn.status_code = 301; mg_printf(&conn->mg_conn, "HTTP/1.1 301 Moved Permanently\r\n" "Location: %s/\r\n\r\n", conn->mg_conn.uri); close_local_endpoint(conn); } else if (is_directory && !find_index_file(conn, path, sizeof(path), &st)) { if (!mg_strcasecmp(dir_lst, "yes")) { #ifndef MONGOOSE_NO_DIRECTORY_LISTING send_directory_listing(conn, path); #else send_http_error(conn, 501, NULL); #endif } else { send_http_error(conn, 403, NULL); } } else if (match_prefix(lua_pat, sizeof(lua_pat) - 1, path) > 0) { #ifdef MONGOOSE_USE_LUA handle_lsp_request(conn, path, &st); #else send_http_error(conn, 501, NULL); #endif } else if (match_prefix(cgi_pat, strlen(cgi_pat), path) > 0) { #if !defined(MONGOOSE_NO_CGI) open_cgi_endpoint(conn, path); #else send_http_error(conn, 501, NULL); #endif // !MONGOOSE_NO_CGI } else if (is_not_modified(conn, &st)) { send_http_error(conn, 304, NULL); } else if ((conn->endpoint.fd = open(path, O_RDONLY | O_BINARY)) != -1) { // O_BINARY is required for Windows, otherwise in default text mode // two bytes \r\n will be read as one. open_file_endpoint(conn, path, &st); } else { send_http_error(conn, 404, NULL); } #endif // MONGOOSE_NO_FILESYSTEM } static void send_continue_if_expected(struct connection *conn) { static const char expect_response[] = "HTTP/1.1 100 Continue\r\n\r\n"; const char *expect_hdr = mg_get_header(&conn->mg_conn, "Expect"); if (expect_hdr != NULL && !mg_strcasecmp(expect_hdr, "100-continue")) { spool(&conn->remote_iobuf, expect_response, sizeof(expect_response) - 1); } } static int is_valid_uri(const char *uri) { // Conform to http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 // URI can be an asterisk (*) or should start with slash. return uri[0] == '/' || (uri[0] == '*' && uri[1] == '\0'); } static void try_http_parse_and_set_content_length(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; if (conn->request_len == 0 && (conn->request_len = get_request_len(io->buf, io->len)) > 0) { // If request is buffered in, remove it from the iobuf. This is because // iobuf could be reallocated, and pointers in parsed request could // become invalid. conn->request = (char *) malloc(conn->request_len); memcpy(conn->request, io->buf, conn->request_len); DBG(("%p [%.*s]", conn, conn->request_len, conn->request)); discard_leading_iobuf_bytes(io, conn->request_len); conn->request_len = parse_http_message(conn->request, conn->request_len, &conn->mg_conn); if (conn->request_len > 0) { const char *cl_hdr = mg_get_header(&conn->mg_conn, "Content-Length"); conn->cl = cl_hdr == NULL ? 0 : to64(cl_hdr); conn->mg_conn.content_len = (long int) conn->cl; } } } static void process_request(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; try_http_parse_and_set_content_length(conn); DBG(("%p %d %d %d [%.*s]", conn, conn->request_len, io->len, conn->flags, io->len, io->buf)); if (conn->request_len < 0 || (conn->request_len > 0 && !is_valid_uri(conn->mg_conn.uri))) { send_http_error(conn, 400, NULL); } else if (conn->request_len == 0 && io->len > MAX_REQUEST_SIZE) { send_http_error(conn, 413, NULL); } else if (conn->request_len > 0 && strcmp(conn->mg_conn.http_version, "1.0") != 0 && strcmp(conn->mg_conn.http_version, "1.1") != 0) { send_http_error(conn, 505, NULL); } else if (conn->request_len > 0 && conn->endpoint_type == EP_NONE) { #ifndef MONGOOSE_NO_WEBSOCKET send_websocket_handshake_if_requested(&conn->mg_conn); #endif send_continue_if_expected(conn); open_local_endpoint(conn, 0); } #ifndef MONGOOSE_NO_CGI if (conn->endpoint_type == EP_CGI && io->len > 0) { forward_post_data(conn); } #endif if (conn->endpoint_type == EP_USER) { call_request_handler_if_data_is_buffered(conn); } #ifndef MONGOOSE_NO_DAV if (conn->endpoint_type == EP_PUT && io->len > 0) { forward_put_data(conn); } #endif } static void call_http_client_handler(struct connection *conn, int code) { conn->mg_conn.status_code = code; // For responses without Content-Lengh, use the whole buffer if (conn->cl == 0 && code == MG_DOWNLOAD_SUCCESS) { conn->mg_conn.content_len = conn->local_iobuf.len; } conn->mg_conn.content = conn->local_iobuf.buf; if (conn->handler(&conn->mg_conn) || code == MG_CONNECT_FAILURE || code == MG_DOWNLOAD_FAILURE) { conn->flags |= CONN_CLOSE; } discard_leading_iobuf_bytes(&conn->local_iobuf, conn->mg_conn.content_len); conn->flags = conn->mg_conn.status_code = 0; conn->cl = conn->num_bytes_sent = conn->request_len = 0; free(conn->request); conn->request = NULL; } static void process_response(struct connection *conn) { struct iobuf *io = &conn->local_iobuf; try_http_parse_and_set_content_length(conn); DBG(("%p %d %d [%.*s]", conn, conn->request_len, io->len, io->len > 40 ? 40 : io->len, io->buf)); if (conn->request_len < 0 || (conn->request_len == 0 && io->len > MAX_REQUEST_SIZE)) { call_http_client_handler(conn, MG_DOWNLOAD_FAILURE); } if (io->len >= conn->cl) { call_http_client_handler(conn, MG_DOWNLOAD_SUCCESS); } } static void read_from_socket(struct connection *conn) { char buf[IOBUF_SIZE]; int n = 0; if (conn->endpoint_type == EP_CLIENT && conn->flags & CONN_CONNECTING) { callback_http_client_on_connect(conn); return; } #ifdef MONGOOSE_USE_SSL if (conn->ssl != NULL) { if (conn->flags & CONN_SSL_HANDS_SHAKEN) { n = SSL_read(conn->ssl, buf, sizeof(buf)); } else { if (SSL_accept(conn->ssl) == 1) { conn->flags |= CONN_SSL_HANDS_SHAKEN; } return; } } else #endif { n = recv(conn->client_sock, buf, sizeof(buf), 0); } DBG(("%p %d %d (1)", conn, n, conn->flags)); if (is_error(n)) { if (conn->endpoint_type == EP_CLIENT && conn->local_iobuf.len > 0) { call_http_client_handler(conn, MG_DOWNLOAD_SUCCESS); } conn->flags |= CONN_CLOSE; } else if (n > 0) { spool(&conn->local_iobuf, buf, n); if (conn->endpoint_type == EP_CLIENT) { process_response(conn); } else { process_request(conn); } } DBG(("%p %d %d (2)", conn, n, conn->flags)); } int mg_connect(struct mg_server *server, const char *host, int port, int use_ssl, mg_handler_t handler, void *param) { sock_t sock = INVALID_SOCKET; struct sockaddr_in sin; struct hostent *he = NULL; struct connection *conn = NULL; int connect_ret_val; if (host == NULL || (he = gethostbyname(host)) == NULL || (sock = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) return 0; #ifndef MONGOOSE_USE_SSL if (use_ssl) return 0; #endif sin.sin_family = AF_INET; sin.sin_port = htons((uint16_t) port); sin.sin_addr = * (struct in_addr *) he->h_addr_list[0]; set_non_blocking_mode(sock); connect_ret_val = connect(sock, (struct sockaddr *) &sin, sizeof(sin)); if (is_error(connect_ret_val)) { return 0; } else if ((conn = (struct connection *) calloc(1, sizeof(*conn))) == NULL) { closesocket(sock); return 0; } conn->server = server; conn->client_sock = sock; conn->endpoint_type = EP_CLIENT; conn->handler = handler; conn->mg_conn.server_param = server->server_data; conn->mg_conn.connection_param = param; conn->birth_time = conn->last_activity_time = time(NULL); conn->flags = CONN_CONNECTING; conn->mg_conn.status_code = MG_CONNECT_FAILURE; #ifdef MONGOOSE_USE_SSL if (use_ssl && (conn->ssl = SSL_new(server->client_ssl_ctx)) != NULL) { SSL_set_fd(conn->ssl, sock); } #endif LINKED_LIST_ADD_TO_FRONT(&server->active_connections, &conn->link); DBG(("%p %s:%d", conn, host, port)); return 1; } #ifndef MONGOOSE_NO_LOGGING static void log_header(const struct mg_connection *conn, const char *header, FILE *fp) { const char *header_value; if ((header_value = mg_get_header(conn, header)) == NULL) { (void) fprintf(fp, "%s", " -"); } else { (void) fprintf(fp, " \"%s\"", header_value); } } static void log_access(const struct connection *conn, const char *path) { const struct mg_connection *c = &conn->mg_conn; FILE *fp = (path == NULL) ? NULL : fopen(path, "a+"); char date[64], user[100]; if (fp == NULL) return; strftime(date, sizeof(date), "%d/%b/%Y:%H:%M:%S %z", localtime(&conn->birth_time)); flockfile(fp); mg_parse_header(mg_get_header(&conn->mg_conn, "Authorization"), "username", user, sizeof(user)); fprintf(fp, "%s - %s [%s] \"%s %s HTTP/%s\" %d %" INT64_FMT, c->remote_ip, user[0] == '\0' ? "-" : user, date, c->request_method ? c->request_method : "-", c->uri ? c->uri : "-", c->http_version, c->status_code, conn->num_bytes_sent); log_header(c, "Referer", fp); log_header(c, "User-Agent", fp); fputc('\n', fp); fflush(fp); funlockfile(fp); fclose(fp); } #endif static void close_local_endpoint(struct connection *conn) { struct mg_connection *c = &conn->mg_conn; // Must be done before free() int keep_alive = should_keep_alive(&conn->mg_conn) && (conn->endpoint_type == EP_FILE || conn->endpoint_type == EP_USER); DBG(("%p %d %d %d", conn, conn->endpoint_type, keep_alive, conn->flags)); switch (conn->endpoint_type) { case EP_PUT: close(conn->endpoint.fd); break; case EP_FILE: close(conn->endpoint.fd); break; case EP_CGI: closesocket(conn->endpoint.cgi_sock); break; default: break; } #ifndef MONGOOSE_NO_LOGGING if (c->status_code > 0 && conn->endpoint_type != EP_CLIENT && c->status_code != 400) { log_access(conn, conn->server->config_options[ACCESS_LOG_FILE]); } #endif // Gobble possible POST data sent to the URI handler discard_leading_iobuf_bytes(&conn->local_iobuf, conn->mg_conn.content_len); conn->endpoint_type = EP_NONE; conn->cl = conn->num_bytes_sent = conn->request_len = conn->flags = 0; c->request_method = c->uri = c->http_version = c->query_string = NULL; c->num_headers = c->status_code = c->is_websocket = c->content_len = 0; free(conn->request); conn->request = NULL; if (keep_alive) { process_request(conn); // Can call us recursively if pipelining is used } else { conn->flags |= conn->remote_iobuf.len == 0 ? CONN_CLOSE : CONN_SPOOL_DONE; } } static void transfer_file_data(struct connection *conn) { char buf[IOBUF_SIZE]; int n = read(conn->endpoint.fd, buf, conn->cl < (int64_t) sizeof(buf) ? (int) conn->cl : (int) sizeof(buf)); if (is_error(n)) { close_local_endpoint(conn); } else if (n > 0) { conn->cl -= n; spool(&conn->remote_iobuf, buf, n); if (conn->cl <= 0) { close_local_endpoint(conn); } } } static void execute_iteration(struct mg_server *server) { struct ll *lp, *tmp; struct connection *conn; union { mg_handler_t f; void *p; } msg[2]; recv(server->ctl[1], (void *) msg, sizeof(msg), 0); LINKED_LIST_FOREACH(&server->active_connections, lp, tmp) { conn = LINKED_LIST_ENTRY(lp, struct connection, link); conn->mg_conn.connection_param = msg[1].p; msg[0].f(&conn->mg_conn); } } void add_to_set(sock_t sock, fd_set *set, sock_t *max_fd) { FD_SET(sock, set); if (sock > *max_fd) { *max_fd = sock; } } unsigned int mg_poll_server(struct mg_server *server, int milliseconds) { struct ll *lp, *tmp; struct connection *conn; struct timeval tv; fd_set read_set, write_set; sock_t max_fd = -1; time_t current_time = time(NULL), expire_time = current_time - MONGOOSE_USE_IDLE_TIMEOUT_SECONDS; if (server->listening_sock == INVALID_SOCKET) return 0; FD_ZERO(&read_set); FD_ZERO(&write_set); add_to_set(server->listening_sock, &read_set, &max_fd); add_to_set(server->ctl[1], &read_set, &max_fd); LINKED_LIST_FOREACH(&server->active_connections, lp, tmp) { conn = LINKED_LIST_ENTRY(lp, struct connection, link); add_to_set(conn->client_sock, &read_set, &max_fd); if (conn->endpoint_type == EP_CLIENT && (conn->flags & CONN_CONNECTING)) { add_to_set(conn->client_sock, &write_set, &max_fd); } if (conn->endpoint_type == EP_FILE) { transfer_file_data(conn); } else if (conn->endpoint_type == EP_CGI) { add_to_set(conn->endpoint.cgi_sock, &read_set, &max_fd); } if (conn->remote_iobuf.len > 0 && !(conn->flags & CONN_BUFFER)) { add_to_set(conn->client_sock, &write_set, &max_fd); } else if (conn->flags & CONN_CLOSE) { close_conn(conn); } } tv.tv_sec = milliseconds / 1000; tv.tv_usec = (milliseconds % 1000) * 1000; if (select(max_fd + 1, &read_set, &write_set, NULL, &tv) > 0) { if (FD_ISSET(server->ctl[1], &read_set)) { execute_iteration(server); } // Accept new connections if (FD_ISSET(server->listening_sock, &read_set)) { while ((conn = accept_new_connection(server)) != NULL) { conn->birth_time = conn->last_activity_time = current_time; } } // Read/write from clients LINKED_LIST_FOREACH(&server->active_connections, lp, tmp) { conn = LINKED_LIST_ENTRY(lp, struct connection, link); if (FD_ISSET(conn->client_sock, &read_set)) { conn->last_activity_time = current_time; read_from_socket(conn); } #ifndef MONGOOSE_NO_CGI if (conn->endpoint_type == EP_CGI && FD_ISSET(conn->endpoint.cgi_sock, &read_set)) { read_from_cgi(conn); } #endif if (FD_ISSET(conn->client_sock, &write_set)) { if (conn->endpoint_type == EP_CLIENT && (conn->flags & CONN_CONNECTING)) { read_from_socket(conn); } else if (!(conn->flags & CONN_BUFFER)) { conn->last_activity_time = current_time; write_to_socket(conn); } } } } // Close expired connections and those that need to be closed LINKED_LIST_FOREACH(&server->active_connections, lp, tmp) { conn = LINKED_LIST_ENTRY(lp, struct connection, link); if (conn->mg_conn.is_websocket) { ping_idle_websocket_connection(conn, current_time); } if (conn->flags & CONN_LONG_RUNNING) { conn->mg_conn.wsbits = conn->flags & CONN_CLOSE ? 1 : 0; if (call_request_handler(conn) == MG_REQUEST_PROCESSED) { conn->flags |= CONN_CLOSE; } } if (conn->flags & CONN_CLOSE || conn->last_activity_time < expire_time) { close_conn(conn); } } return (unsigned int) current_time; } void mg_destroy_server(struct mg_server **server) { int i; struct ll *lp, *tmp; if (server != NULL && *server != NULL) { struct mg_server *s = *server; // Do one last poll, see https://github.com/cesanta/mongoose/issues/286 mg_poll_server(s, 0); closesocket(s->listening_sock); closesocket(s->ctl[0]); closesocket(s->ctl[1]); LINKED_LIST_FOREACH(&s->active_connections, lp, tmp) { close_conn(LINKED_LIST_ENTRY(lp, struct connection, link)); } for (i = 0; i < (int) ARRAY_SIZE(s->config_options); i++) { free(s->config_options[i]); // It is OK to free(NULL) } #ifdef MONGOOSE_USE_SSL if (s->ssl_ctx != NULL) SSL_CTX_free((*server)->ssl_ctx); if (s->client_ssl_ctx != NULL) SSL_CTX_free(s->client_ssl_ctx); #endif free(s); *server = NULL; } } // Apply function to all active connections. void mg_iterate_over_connections(struct mg_server *server, mg_handler_t handler, void *param) { // Send closure (function + parameter) to the IO thread to execute union { mg_handler_t f; void *p; } msg[2]; msg[0].f = handler; msg[1].p = param; send(server->ctl[0], (void *) msg, sizeof(msg), 0); } static int get_var(const char *data, size_t data_len, const char *name, char *dst, size_t dst_len) { const char *p, *e, *s; size_t name_len; int len; if (dst == NULL || dst_len == 0) { len = -2; } else if (data == NULL || name == NULL || data_len == 0) { len = -1; dst[0] = '\0'; } else { name_len = strlen(name); e = data + data_len; len = -1; dst[0] = '\0'; // data is "var1=val1&var2=val2...". Find variable first for (p = data; p + name_len < e; p++) { if ((p == data || p[-1] == '&') && p[name_len] == '=' && !mg_strncasecmp(name, p, name_len)) { // Point p to variable value p += name_len + 1; // Point s to the end of the value s = (const char *) memchr(p, '&', (size_t)(e - p)); if (s == NULL) { s = e; } assert(s >= p); // Decode variable into destination buffer len = mg_url_decode(p, (size_t)(s - p), dst, dst_len, 1); // Redirect error code from -1 to -2 (destination buffer too small). if (len == -1) { len = -2; } break; } } } return len; } int mg_get_var(const struct mg_connection *conn, const char *name, char *dst, size_t dst_len) { int len = get_var(conn->query_string, conn->query_string == NULL ? 0 : strlen(conn->query_string), name, dst, dst_len); if (len < 0) { len = get_var(conn->content, conn->content_len, name, dst, dst_len); } return len; } static int get_line_len(const char *buf, int buf_len) { int len = 0; while (len < buf_len && buf[len] != '\n') len++; return buf[len] == '\n' ? len + 1: -1; } int mg_parse_multipart(const char *buf, int buf_len, char *var_name, int var_name_len, char *file_name, int file_name_len, const char **data, int *data_len) { static const char cd[] = "Content-Disposition: "; //struct mg_connection c; int hl, bl, n, ll, pos, cdl = sizeof(cd) - 1; //char *p; if (buf == NULL || buf_len <= 0) return 0; if ((hl = get_request_len(buf, buf_len)) <= 0) return 0; if (buf[0] != '-' || buf[1] != '-' || buf[2] == '\n') return 0; // Get boundary length bl = get_line_len(buf, buf_len); // Loop through headers, fetch variable name and file name var_name[0] = file_name[0] = '\0'; for (n = bl; (ll = get_line_len(buf + n, hl - n)) > 0; n += ll) { if (mg_strncasecmp(cd, buf + n, cdl) == 0) { parse_header(buf + n + cdl, ll - (cdl + 2), "name", var_name, var_name_len); parse_header(buf + n + cdl, ll - (cdl + 2), "filename", file_name, file_name_len); } } // Scan body, search for terminating boundary for (pos = hl; pos + (bl - 2) < buf_len; pos++) { if (buf[pos] == '-' && !memcmp(buf, &buf[pos], bl - 2)) { if (data_len != NULL) *data_len = (pos - 2) - hl; if (data != NULL) *data = buf + hl; return pos; } } return 0; } const char **mg_get_valid_option_names(void) { return static_config_options; } static int get_option_index(const char *name) { int i; for (i = 0; static_config_options[i * 2] != NULL; i++) { if (strcmp(static_config_options[i * 2], name) == 0) { return i; } } return -1; } static void set_default_option_values(char **opts) { const char *value, **all_opts = mg_get_valid_option_names(); int i; for (i = 0; all_opts[i * 2] != NULL; i++) { value = all_opts[i * 2 + 1]; if (opts[i] == NULL && value != NULL) { opts[i] = mg_strdup(value); } } } // Valid listening port spec is: [ip_address:]port, e.g. "80", "127.0.0.1:3128" static int parse_port_string(const char *str, union socket_address *sa) { unsigned int a, b, c, d, port; int len = 0; #ifdef MONGOOSE_USE_IPV6 char buf[100]; #endif // MacOS needs that. If we do not zero it, subsequent bind() will fail. // Also, all-zeroes in the socket address means binding to all addresses // for both IPv4 and IPv6 (INADDR_ANY and IN6ADDR_ANY_INIT). memset(sa, 0, sizeof(*sa)); sa->sin.sin_family = AF_INET; if (sscanf(str, "%u.%u.%u.%u:%u%n", &a, &b, &c, &d, &port, &len) == 5) { // Bind to a specific IPv4 address, e.g. 192.168.1.5:8080 sa->sin.sin_addr.s_addr = htonl((a << 24) | (b << 16) | (c << 8) | d); sa->sin.sin_port = htons((uint16_t) port); #if defined(MONGOOSE_USE_IPV6) } else if (sscanf(str, "[%49[^]]]:%u%n", buf, &port, &len) == 2 && inet_pton(AF_INET6, buf, &sa->sin6.sin6_addr)) { // IPv6 address, e.g. [3ffe:2a00:100:7031::1]:8080 sa->sin6.sin6_family = AF_INET6; sa->sin6.sin6_port = htons((uint16_t) port); #endif } else if (sscanf(str, "%u%n", &port, &len) == 1) { // If only port is specified, bind to IPv4, INADDR_ANY sa->sin.sin_port = htons((uint16_t) port); } else { port = 0; // Parsing failure. Make port invalid. } return port <= 0xffff && str[len] == '\0'; } //const char *mg_set_option(struct mg_server *server, const char *name, int mg_set_option(struct mg_server *server, const char *name, const char *value, char* error_msg) { int ind = get_option_index(name); strcpy(error_msg,"No error"); if (ind < 0) { strcpy(error_msg,"No such option"); } else { if (server->config_options[ind] != NULL) { free(server->config_options[ind]); } server->config_options[ind] = mg_strdup(value); DBG(("%s [%s]", name, value)); if (ind == LISTENING_PORT) { if (server->listening_sock != INVALID_SOCKET) { closesocket(server->listening_sock); } parse_port_string(server->config_options[LISTENING_PORT], &server->lsa); server->listening_sock = open_listening_socket(&server->lsa); if (server->listening_sock == INVALID_SOCKET) { strcpy(error_msg, mg_open_msg); return INVALID_SOCKET; } else { sockaddr_to_string(server->local_ip, sizeof(server->local_ip), &server->lsa); if (!strcmp(value, "0")) { char buf[10]; mg_snprintf(buf, sizeof(buf), "%d", (int) ntohs(server->lsa.sin.sin_port)); free(server->config_options[ind]); server->config_options[ind] = mg_strdup(buf); } return 0; } #ifndef _WIN32 } else if (ind == RUN_AS_USER) { struct passwd *pw; if ((pw = getpwnam(value)) == NULL) { strcpy(error_msg, "Unknown user"); return INVALID_SOCKET; } else if (setgid(pw->pw_gid) != 0) { strcpy(error_msg, "setgid() failed"); return INVALID_SOCKET; } else if (setuid(pw->pw_uid) != 0) { strcpy(error_msg, "setuid() failed"); return INVALID_SOCKET; } return 0; #endif #ifdef MONGOOSE_USE_SSL } else if (ind == SSL_CERTIFICATE) { //SSL_library_init(); if ((server->ssl_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL) { strcpy(error_msg, "SSL_CTX_new() failed"); return INVALID_SOCKET; } else if (SSL_CTX_use_certificate_file(server->ssl_ctx, value, 1) == 0 || SSL_CTX_use_PrivateKey_file(server->ssl_ctx, value, 1) == 0) { strcpy(error_msg, "Cannot load PEM file"); return INVALID_SOCKET; } else { SSL_CTX_use_certificate_chain_file(server->ssl_ctx, value); } return 0; #endif } } return 0; } void mg_set_request_handler(struct mg_server *server, mg_handler_t handler) { server->request_handler = handler; } void mg_set_http_error_handler(struct mg_server *server, mg_handler_t handler) { server->error_handler = handler; } void mg_set_auth_handler(struct mg_server *server, mg_handler_t handler) { server->auth_handler = handler; } void mg_set_listening_socket(struct mg_server *server, int sock) { if (server->listening_sock != INVALID_SOCKET) { closesocket(server->listening_sock); } server->listening_sock = (sock_t) sock; } int mg_get_listening_socket(struct mg_server *server) { return server->listening_sock; } const char *mg_get_option(const struct mg_server *server, const char *name) { const char **opts = (const char **) server->config_options; int i = get_option_index(name); return i == -1 ? NULL : opts[i] == NULL ? "" : opts[i]; } struct mg_server *mg_create_server(void *server_data) { struct mg_server *server = (struct mg_server *) calloc(1, sizeof(*server)); #ifdef _WIN32 WSADATA data; WSAStartup(MAKEWORD(2, 2), &data); #else // Ignore SIGPIPE signal, so if browser cancels the request, it // won't kill the whole process. signal(SIGPIPE, SIG_IGN); #endif LINKED_LIST_INIT(&server->active_connections); // Create control socket pair. Do it in a loop to protect from // interrupted syscalls in mg_socketpair(). do { mg_socketpair(server->ctl); } while (server->ctl[0] == INVALID_SOCKET); #ifdef MONGOOSE_USE_SSL SSL_library_init(); server->client_ssl_ctx = SSL_CTX_new(SSLv23_client_method()); #endif server->server_data = server_data; server->listening_sock = INVALID_SOCKET; set_default_option_values(server->config_options); return server; } ���������������������������flmsg-2.0.10/src/utils/time_table.cxx���������������������������������������������������������������0000664�0001750�0001750�00000662542�12431374743�014434� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ===================================================================== // // time_table.cxx // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013, 2014 // // This file is part of FLAMP and FLMSG. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ===================================================================== // Doxygen /** ******************************************************** \page page_modem_timing_table Modem Timing Table Structure A table and functions to calculate the number of seconds or minutes needed to transmit a string of data. \par char *modem_name The string ID of the modem.<br> Example:<br> 8PSK125, 8PSK250, etc. <br> \par float scale A value used to scale the resulting toble in an attemp to adjust for errors. However, because of the differential errors for each charater and overhead time, it's not recommended for use. \par float overhead Each modem contains a leading and trailing pre/postamble. The time for both a accumulated and stored in this variable. \par table[256] Floating point representation of the amount of time it takes to transmit the character in seconds. Character value range 0 to 255. \verbatim typedef struct { char *mode_name; float scale; float overhead; float table[256]; } MODE_TIME_TABLE; static MODE_TIME_TABLE mode_time_table[] = { { (char *) "8PSK125", 1.0, 2.973000, { 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.042500, 0.058500, 0.058875, 0.058500, 0.058500, 0.042875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.063625, 0.064312, 0.016000, 0.047625, 0.048313, 0.053437, 0.053062, 0.053437, 0.053437, 0.047625, ... },... },... }; \endverbatim ***********************************************************/ #include "debug.h" #include "time_table.h" typedef struct { char *mode_name; float scale; float overhead; float table[256]; } MODE_TIME_TABLE; static MODE_TIME_TABLE mode_time_table[] = { { (char *) "8PSK125", 1.0, 2.973000, { 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.042500, 0.058500, 0.058875, 0.058500, 0.058500, 0.042875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.063625, 0.064312, 0.016000, 0.047625, 0.048313, 0.053437, 0.053062, 0.053437, 0.053437, 0.047625, 0.048313, 0.048000, 0.053062, 0.048313, 0.042500, 0.047625, 0.048313, 0.048000, 0.042500, 0.042875, 0.048000, 0.047625, 0.048313, 0.048000, 0.047625, 0.048313, 0.048000, 0.047625, 0.048313, 0.048000, 0.053062, 0.048313, 0.053437, 0.047625, 0.053437, 0.042500, 0.047625, 0.042875, 0.042500, 0.042500, 0.042875, 0.048000, 0.047625, 0.042875, 0.048000, 0.047625, 0.042875, 0.042500, 0.042500, 0.042875, 0.042500, 0.047625, 0.042875, 0.042500, 0.042500, 0.048313, 0.048000, 0.047625, 0.048313, 0.048000, 0.047625, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.026875, 0.037437, 0.031625, 0.032313, 0.021438, 0.037062, 0.037437, 0.032000, 0.026500, 0.042875, 0.037437, 0.031625, 0.037437, 0.026500, 0.026500, 0.037437, 0.037437, 0.031625, 0.032313, 0.021438, 0.031625, 0.037437, 0.037437, 0.037062, 0.037437, 0.037437, 0.053062, 0.053437, 0.053437, 0.053062, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.064312, 0.064000, 0.063625, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.053437, 0.053437, 0.053062, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500, 0.058875, 0.058500, 0.058500 } }, { (char *) "8PSK250", 1.0, 2.028875, { 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.021438, 0.029437, 0.029437, 0.029437, 0.029437, 0.021438, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.032000, 0.032000, 0.008000, 0.024000, 0.024000, 0.026687, 0.026687, 0.026687, 0.026687, 0.024000, 0.024000, 0.024000, 0.026687, 0.024000, 0.021438, 0.024000, 0.024000, 0.024000, 0.021438, 0.021438, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026687, 0.024000, 0.026687, 0.024000, 0.026687, 0.021438, 0.024000, 0.021438, 0.021438, 0.021438, 0.021438, 0.024000, 0.024000, 0.021438, 0.024000, 0.024000, 0.021438, 0.021438, 0.021438, 0.021438, 0.021438, 0.024000, 0.021438, 0.021438, 0.021438, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.013437, 0.018687, 0.016000, 0.016000, 0.010688, 0.018687, 0.018687, 0.016000, 0.013437, 0.021438, 0.018687, 0.016000, 0.018687, 0.013437, 0.013437, 0.018687, 0.018687, 0.016000, 0.016000, 0.010688, 0.016000, 0.018687, 0.018687, 0.018687, 0.018687, 0.018687, 0.026687, 0.026687, 0.026687, 0.026687, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.026687, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437, 0.029437 } }, { (char *) "8PSK500", 1.0, 1.206000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.010937, 0.010937, 0.010937, 0.010937, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.008937, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.008937, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008937, 0.008937, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008937, 0.008937, 0.008937, 0.008937, 0.008937, 0.008937, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.004938, 0.006938, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.004938, 0.008000, 0.007000, 0.006000, 0.006938, 0.004938, 0.004938, 0.006938, 0.006938, 0.006000, 0.006000, 0.004000, 0.006000, 0.006938, 0.006938, 0.006938, 0.006938, 0.006938, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "8PSK1000", 1.0, 1.089000, { 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.004000, 0.005500, 0.005500, 0.005500, 0.005500, 0.004000, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.006000, 0.006000, 0.001437, 0.004437, 0.004437, 0.005000, 0.005000, 0.005000, 0.005000, 0.004437, 0.004437, 0.004437, 0.005000, 0.004500, 0.004000, 0.004437, 0.004437, 0.004437, 0.004000, 0.004000, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.004437, 0.005000, 0.004500, 0.005000, 0.004437, 0.005000, 0.004000, 0.004437, 0.004000, 0.004000, 0.004000, 0.004000, 0.004437, 0.004437, 0.004000, 0.004500, 0.004500, 0.004000, 0.004000, 0.004000, 0.004000, 0.004000, 0.004437, 0.004000, 0.004000, 0.004000, 0.004500, 0.004500, 0.004500, 0.004500, 0.004500, 0.004500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.002500, 0.003500, 0.003000, 0.003000, 0.002000, 0.003438, 0.003438, 0.003000, 0.002500, 0.004000, 0.003438, 0.003000, 0.003500, 0.002500, 0.002500, 0.003500, 0.003500, 0.003000, 0.003000, 0.002000, 0.003000, 0.003500, 0.003500, 0.003500, 0.003500, 0.003500, 0.005000, 0.005000, 0.005000, 0.005000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437, 0.005437 } }, { (char *) "8PSK1600", 1.0, 0.658750, { 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002000, 0.002750, 0.002750, 0.002687, 0.002750, 0.002000, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.003000, 0.003000, 0.000750, 0.002250, 0.002250, 0.002500, 0.002500, 0.002500, 0.002437, 0.002250, 0.002250, 0.002250, 0.002437, 0.002250, 0.002000, 0.002250, 0.002250, 0.002188, 0.002000, 0.002000, 0.002250, 0.002250, 0.002250, 0.002250, 0.002188, 0.002250, 0.002250, 0.002250, 0.002250, 0.002188, 0.002500, 0.002250, 0.002500, 0.002250, 0.002500, 0.002000, 0.002250, 0.002000, 0.002000, 0.002000, 0.002000, 0.002188, 0.002250, 0.002000, 0.002250, 0.002250, 0.002000, 0.002000, 0.002000, 0.002000, 0.002000, 0.002250, 0.002000, 0.002000, 0.002000, 0.002188, 0.002250, 0.002250, 0.002250, 0.002250, 0.002188, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.001250, 0.001687, 0.001500, 0.001500, 0.001000, 0.001687, 0.001750, 0.001500, 0.001187, 0.002000, 0.001750, 0.001500, 0.001750, 0.001250, 0.001187, 0.001750, 0.001750, 0.001437, 0.001500, 0.001000, 0.001500, 0.001750, 0.001687, 0.001750, 0.001750, 0.001750, 0.002500, 0.002500, 0.002437, 0.002500, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.003000, 0.002938, 0.003000, 0.003000, 0.003000, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002500, 0.002437, 0.002500, 0.002500, 0.002500, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687, 0.002750, 0.002750, 0.002750, 0.002750, 0.002687 } }, { (char *) "BPSK31", 1.0, 2.048000, { 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.224000, 0.384000, 0.384000, 0.224000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.096000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.352000, 0.320000, 0.320000, 0.352000, 0.352000, 0.288000, 0.256000, 0.288000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.320000, 0.352000, 0.352000, 0.288000, 0.352000, 0.384000, 0.384000, 0.288000, 0.320000, 0.320000, 0.320000, 0.288000, 0.320000, 0.320000, 0.352000, 0.288000, 0.352000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.320000, 0.288000, 0.288000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.384000, 0.192000, 0.288000, 0.256000, 0.256000, 0.128000, 0.256000, 0.288000, 0.256000, 0.192000, 0.352000, 0.320000, 0.224000, 0.256000, 0.192000, 0.160000, 0.256000, 0.352000, 0.224000, 0.224000, 0.160000, 0.256000, 0.288000, 0.288000, 0.320000, 0.288000, 0.352000, 0.384000, 0.352000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000 } }, { (char *) "BPSK63", 1.0, 2.048000, { 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.112000, 0.192000, 0.192000, 0.112000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.048000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.176000, 0.160000, 0.160000, 0.176000, 0.176000, 0.144000, 0.128000, 0.144000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.160000, 0.176000, 0.176000, 0.144000, 0.176000, 0.192000, 0.192000, 0.144000, 0.160000, 0.160000, 0.160000, 0.144000, 0.160000, 0.160000, 0.176000, 0.144000, 0.176000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.160000, 0.144000, 0.144000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.192000, 0.096000, 0.144000, 0.128000, 0.128000, 0.064000, 0.128000, 0.144000, 0.128000, 0.096000, 0.176000, 0.160000, 0.112000, 0.128000, 0.096000, 0.080000, 0.128000, 0.176000, 0.112000, 0.112000, 0.080000, 0.128000, 0.144000, 0.144000, 0.160000, 0.144000, 0.176000, 0.192000, 0.176000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000 } }, { (char *) "BPSK63F", 1.0, 4.096000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "BPSK125", 1.0, 2.048000, { 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.056000, 0.096000, 0.096000, 0.056000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.024000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.088000, 0.080000, 0.080000, 0.088000, 0.088000, 0.072000, 0.064000, 0.072000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.080000, 0.088000, 0.088000, 0.072000, 0.088000, 0.096000, 0.096000, 0.072000, 0.080000, 0.080000, 0.080000, 0.072000, 0.080000, 0.080000, 0.088000, 0.072000, 0.088000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.080000, 0.072000, 0.072000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.096000, 0.048000, 0.072000, 0.064000, 0.064000, 0.032000, 0.064000, 0.072000, 0.064000, 0.048000, 0.088000, 0.080000, 0.056000, 0.064000, 0.048000, 0.040000, 0.064000, 0.088000, 0.056000, 0.056000, 0.040000, 0.064000, 0.072000, 0.072000, 0.080000, 0.072000, 0.088000, 0.096000, 0.088000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000 } }, { (char *) "BPSK250", 1.0, 2.048000, { 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.028000, 0.048000, 0.048000, 0.028000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.012000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.044000, 0.040000, 0.040000, 0.044000, 0.044000, 0.036000, 0.032000, 0.036000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.040000, 0.044000, 0.044000, 0.036000, 0.044000, 0.048000, 0.048000, 0.036000, 0.040000, 0.040000, 0.040000, 0.036000, 0.040000, 0.040000, 0.044000, 0.036000, 0.044000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.040000, 0.036000, 0.036000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.048000, 0.024000, 0.036000, 0.032000, 0.032000, 0.016000, 0.032000, 0.036000, 0.032000, 0.024000, 0.044000, 0.040000, 0.028000, 0.032000, 0.024000, 0.020000, 0.032000, 0.044000, 0.028000, 0.028000, 0.020000, 0.032000, 0.036000, 0.036000, 0.040000, 0.036000, 0.044000, 0.048000, 0.044000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000 } }, { (char *) "BPSK500", 1.0, 2.048000, { 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.014000, 0.024000, 0.024000, 0.014000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.006000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.022000, 0.020000, 0.020000, 0.022000, 0.022000, 0.018000, 0.016000, 0.018000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.020000, 0.022000, 0.022000, 0.018000, 0.022000, 0.024000, 0.024000, 0.018000, 0.020000, 0.020000, 0.020000, 0.018000, 0.020000, 0.020000, 0.022000, 0.018000, 0.022000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.020000, 0.018000, 0.018000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.024000, 0.012000, 0.018000, 0.016000, 0.016000, 0.008000, 0.016000, 0.018000, 0.016000, 0.012000, 0.022000, 0.020000, 0.014000, 0.016000, 0.012000, 0.010000, 0.016000, 0.022000, 0.014000, 0.014000, 0.010000, 0.016000, 0.018000, 0.018000, 0.020000, 0.018000, 0.022000, 0.024000, 0.022000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000 } }, { (char *) "BPSK1000", 1.0, 0.256000, { 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.007000, 0.012000, 0.012000, 0.007000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.003000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.011000, 0.010000, 0.010000, 0.011000, 0.011000, 0.009000, 0.008000, 0.009000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.010000, 0.011000, 0.011000, 0.009000, 0.011000, 0.012000, 0.012000, 0.009000, 0.010000, 0.010000, 0.010000, 0.009000, 0.010000, 0.010000, 0.011000, 0.009000, 0.011000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.010000, 0.009000, 0.009000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.012000, 0.006000, 0.009000, 0.008000, 0.008000, 0.004000, 0.008000, 0.009000, 0.008000, 0.006000, 0.011000, 0.010000, 0.007000, 0.008000, 0.006000, 0.005000, 0.008000, 0.011000, 0.007000, 0.007000, 0.005000, 0.008000, 0.009000, 0.009000, 0.010000, 0.009000, 0.011000, 0.012000, 0.011000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000 } }, { (char *) "DOMX22", 1.0, 1.346757, { 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.046440, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.092880, 0.092880, 0.092880, 0.139320, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.092880, 0.139320, 0.092880, 0.139320, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.046440, 0.092880, 0.092880, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.092880, 0.046440, 0.046440, 0.092880, 0.092880, 0.046440, 0.092880, 0.046440, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.092880, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320, 0.139320 } }, { (char *) "DOMX44", 1.0, 0.673379, { 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.023220, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.046440, 0.046440, 0.046440, 0.069660, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.046440, 0.069660, 0.046440, 0.069660, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.023220, 0.046440, 0.046440, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.046440, 0.023220, 0.023220, 0.046440, 0.046440, 0.023220, 0.046440, 0.023220, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.046440, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660, 0.069660 } }, { (char *) "DOMX88", 1.0, 0.336689, { 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.011610, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.023220, 0.023220, 0.023220, 0.034830, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.023220, 0.034830, 0.023220, 0.034830, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.011610, 0.023220, 0.023220, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.023220, 0.011610, 0.011610, 0.023220, 0.023220, 0.011610, 0.023220, 0.011610, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.023220, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830, 0.034830 } }, { (char *) "MFSK16", 1.0, 6.336000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "MFSK22", 1.0, 4.597551, { 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.278639, 0.278639, 0.069660, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.185760, 0.208980, 0.208980, 0.208980, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.232200, 0.208980, 0.232200, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.185760, 0.208980, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.116100, 0.162540, 0.139320, 0.139320, 0.092880, 0.162540, 0.162540, 0.139320, 0.116100, 0.185760, 0.162540, 0.139320, 0.162540, 0.116100, 0.116100, 0.162540, 0.162540, 0.139320, 0.139320, 0.092880, 0.139320, 0.162540, 0.162540, 0.162540, 0.162540, 0.162540, 0.232200, 0.232200, 0.232200, 0.232200, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420 } }, { (char *) "MFSK31", 1.0, 4.214000, { 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.170625, 0.234625, 0.234625, 0.234625, 0.234625, 0.170625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.256000, 0.256000, 0.064000, 0.192000, 0.192000, 0.213250, 0.213250, 0.213250, 0.213250, 0.192000, 0.192000, 0.192000, 0.213250, 0.192000, 0.170625, 0.192000, 0.192000, 0.192000, 0.170625, 0.170625, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.213250, 0.192000, 0.213250, 0.192000, 0.213250, 0.170625, 0.192000, 0.170625, 0.170625, 0.170625, 0.170625, 0.192000, 0.192000, 0.170625, 0.192000, 0.192000, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.192000, 0.170625, 0.170625, 0.170625, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.106625, 0.149250, 0.128000, 0.128000, 0.085250, 0.149250, 0.149250, 0.128000, 0.106625, 0.170625, 0.149250, 0.128000, 0.149250, 0.106625, 0.106625, 0.149250, 0.149250, 0.128000, 0.128000, 0.085250, 0.128000, 0.149250, 0.149250, 0.149250, 0.149250, 0.149250, 0.213250, 0.213250, 0.213250, 0.213250, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.213250, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625, 0.234625 } }, { (char *) "MFSK32", 1.0, 3.168000, { 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.048000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.128000, 0.144000, 0.144000, 0.144000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.160000, 0.144000, 0.160000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.128000, 0.144000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.080000, 0.112000, 0.096000, 0.096000, 0.064000, 0.112000, 0.112000, 0.096000, 0.080000, 0.128000, 0.112000, 0.096000, 0.112000, 0.080000, 0.080000, 0.112000, 0.112000, 0.096000, 0.096000, 0.064000, 0.096000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.160000, 0.160000, 0.160000, 0.160000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000 } }, { (char *) "MFSK64", 1.0, 2.352000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "MFSK64L", 1.0, 20.432000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "MFSK128", 1.0, 1.360000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "MFSK128L", 1.0, 20.216000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "MT63-500L", 1.0, 15.000000, { 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000 } }, { (char *) "MT63-500S", 1.0, 8.600000, { 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000, 0.400000 } }, { (char *) "MT63-1KL", 1.0, 8.500000, { 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000 } }, { (char *) "MT63-1KS", 1.0, 5.300000, { 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000 } }, { (char *) "MT63-2KL", 1.0, 5.300000, { 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000 } }, { (char *) "MT63-2KS", 1.0, 3.700000, { 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000 } }, { (char *) "Olivia-4-250", 1.0, 3.088000, { 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000 } }, { (char *) "Olivia-4-500", 1.0, 2.568000, { 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000 } }, { (char *) "Olivia-8-250", 1.0, 3.446000, { 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250, 1.365250 } }, { (char *) "Olivia-8-500", 1.0, 2.748000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "Olivia-8-1K", 1.0, 2.398000, { 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.170625, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250 } }, { (char *) "Olivia-16-500", 1.0, 4.128000, { 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000, 1.024000 } }, { (char *) "Olivia-16-1K", 1.0, 3.088000, { 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000, 0.512000 } }, { (char *) "Olivia-32-1K", 1.0, 4.812000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "Olivia-64-2K", 1.0, 4.812000, { 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.341250, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625, 0.682625 } }, { (char *) "PSK63RC4", 1.0, 2.048000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "PSK63RC5", 1.0, 6.572750, { 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.051125, 0.070375, 0.070375, 0.070375, 0.070375, 0.051125, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.076750, 0.076750, 0.019125, 0.057500, 0.057500, 0.064000, 0.064000, 0.064000, 0.064000, 0.057500, 0.057500, 0.057500, 0.064000, 0.057500, 0.051125, 0.057500, 0.057500, 0.057500, 0.051125, 0.051125, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.064000, 0.057500, 0.064000, 0.057500, 0.064000, 0.051125, 0.057500, 0.051125, 0.051125, 0.051125, 0.051125, 0.057500, 0.057500, 0.051125, 0.057500, 0.057500, 0.051125, 0.051125, 0.051125, 0.051125, 0.051125, 0.057500, 0.051125, 0.051125, 0.051125, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.057500, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.032000, 0.044750, 0.038375, 0.038375, 0.025500, 0.044750, 0.044750, 0.038375, 0.032000, 0.051125, 0.044750, 0.038375, 0.044750, 0.032000, 0.032000, 0.044750, 0.044750, 0.038375, 0.038375, 0.025500, 0.038375, 0.044750, 0.044750, 0.044750, 0.044750, 0.044750, 0.064000, 0.064000, 0.064000, 0.064000, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.076750, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375, 0.070375 } }, { (char *) "PSK63RC10", 1.0, 3.286375, { 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.038375, 0.038375, 0.009500, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.025500, 0.028750, 0.028750, 0.028750, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.032000, 0.028750, 0.032000, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.025500, 0.028750, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.016000, 0.022375, 0.019125, 0.019125, 0.012750, 0.022375, 0.022375, 0.019125, 0.016000, 0.025500, 0.022375, 0.019125, 0.022375, 0.016000, 0.016000, 0.022375, 0.022375, 0.019125, 0.019125, 0.012750, 0.019125, 0.022375, 0.022375, 0.022375, 0.022375, 0.022375, 0.032000, 0.032000, 0.032000, 0.032000, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125 } }, { (char *) "PSK63RC20", 1.0, 1.651125, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK63RC32", 1.0, 1.024000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK125R", 1.0, 4.096000, { 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.128000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.048000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.128000, 0.144000, 0.144000, 0.144000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.144000, 0.160000, 0.144000, 0.160000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.128000, 0.144000, 0.144000, 0.128000, 0.128000, 0.128000, 0.128000, 0.128000, 0.144000, 0.128000, 0.128000, 0.128000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.144000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.080000, 0.112000, 0.096000, 0.096000, 0.064000, 0.112000, 0.112000, 0.096000, 0.080000, 0.128000, 0.112000, 0.096000, 0.112000, 0.080000, 0.080000, 0.112000, 0.112000, 0.096000, 0.096000, 0.064000, 0.096000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.160000, 0.160000, 0.160000, 0.160000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000 } }, { (char *) "PSK125RC4", 1.0, 4.096000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK125RC5", 1.0, 3.286375, { 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.025500, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.038375, 0.038375, 0.009500, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.025500, 0.028750, 0.028750, 0.028750, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.028750, 0.032000, 0.028750, 0.032000, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.025500, 0.028750, 0.028750, 0.025500, 0.025500, 0.025500, 0.025500, 0.025500, 0.028750, 0.025500, 0.025500, 0.025500, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.028750, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.016000, 0.022375, 0.019125, 0.019125, 0.012750, 0.022375, 0.022375, 0.019125, 0.016000, 0.025500, 0.022375, 0.019125, 0.022375, 0.016000, 0.016000, 0.022375, 0.022375, 0.019125, 0.019125, 0.012750, 0.019125, 0.022375, 0.022375, 0.022375, 0.022375, 0.022375, 0.032000, 0.032000, 0.032000, 0.032000, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.038375, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125, 0.035125 } }, { (char *) "PSK125C12", 1.0, 0.170625, { 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.006625, 0.004625, 0.008000, 0.008000, 0.004625, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.002000, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.008000, 0.007250, 0.006625, 0.006625, 0.007250, 0.007250, 0.006000, 0.005250, 0.006000, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.006625, 0.007250, 0.007250, 0.006000, 0.007250, 0.008000, 0.008000, 0.006000, 0.006625, 0.006625, 0.006625, 0.006000, 0.006625, 0.006625, 0.007250, 0.006000, 0.007250, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.006625, 0.006000, 0.006000, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.008000, 0.004000, 0.006000, 0.005250, 0.005250, 0.002625, 0.005250, 0.006000, 0.005250, 0.004000, 0.007250, 0.006625, 0.004625, 0.005250, 0.004000, 0.003250, 0.005250, 0.007250, 0.004625, 0.004625, 0.003250, 0.005250, 0.006000, 0.006000, 0.006625, 0.006000, 0.007250, 0.008000, 0.007250, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250 } }, { (char *) "PSK125RC10", 1.0, 1.643125, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK125RC12", 1.0, 1.370625, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK125RC16", 1.0, 1.024000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK250R", 1.0, 4.096000, { 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.064000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.024000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.064000, 0.072000, 0.072000, 0.072000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.072000, 0.080000, 0.072000, 0.080000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.064000, 0.072000, 0.072000, 0.064000, 0.064000, 0.064000, 0.064000, 0.064000, 0.072000, 0.064000, 0.064000, 0.064000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.072000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.040000, 0.056000, 0.048000, 0.048000, 0.032000, 0.056000, 0.056000, 0.048000, 0.040000, 0.064000, 0.056000, 0.048000, 0.056000, 0.040000, 0.040000, 0.056000, 0.056000, 0.048000, 0.048000, 0.032000, 0.048000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.080000, 0.080000, 0.080000, 0.080000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000 } }, { (char *) "PSK250C6", 1.0, 0.682625, { 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.006625, 0.004625, 0.008000, 0.008000, 0.004625, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.002000, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.008000, 0.007250, 0.006625, 0.006625, 0.007250, 0.007250, 0.006000, 0.005250, 0.006000, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.006625, 0.007250, 0.007250, 0.006000, 0.007250, 0.008000, 0.008000, 0.006000, 0.006625, 0.006625, 0.006625, 0.006000, 0.006625, 0.006625, 0.007250, 0.006000, 0.007250, 0.007250, 0.006625, 0.006625, 0.006625, 0.006625, 0.006625, 0.007250, 0.006625, 0.006000, 0.006000, 0.007250, 0.007250, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.007250, 0.007250, 0.008000, 0.007250, 0.008000, 0.004000, 0.006000, 0.005250, 0.005250, 0.002625, 0.005250, 0.006000, 0.005250, 0.004000, 0.007250, 0.006625, 0.004625, 0.005250, 0.004000, 0.003250, 0.005250, 0.007250, 0.004625, 0.004625, 0.003250, 0.005250, 0.006000, 0.006000, 0.006625, 0.006000, 0.007250, 0.008000, 0.007250, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.008625, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250 } }, { (char *) "PSK250RC2", 1.0, 4.096000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK250RC3", 1.0, 2.733250, { 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.021250, 0.029250, 0.029250, 0.029250, 0.029250, 0.021250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.032000, 0.032000, 0.008000, 0.024000, 0.024000, 0.026625, 0.026625, 0.026625, 0.026625, 0.024000, 0.024000, 0.024000, 0.026625, 0.024000, 0.021250, 0.024000, 0.024000, 0.024000, 0.021250, 0.021250, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026625, 0.024000, 0.026625, 0.024000, 0.026625, 0.021250, 0.024000, 0.021250, 0.021250, 0.021250, 0.021250, 0.024000, 0.024000, 0.021250, 0.024000, 0.024000, 0.021250, 0.021250, 0.021250, 0.021250, 0.021250, 0.024000, 0.021250, 0.021250, 0.021250, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.013250, 0.018625, 0.016000, 0.016000, 0.010625, 0.018625, 0.018625, 0.016000, 0.013250, 0.021250, 0.018625, 0.016000, 0.018625, 0.013250, 0.013250, 0.018625, 0.018625, 0.016000, 0.016000, 0.010625, 0.016000, 0.018625, 0.018625, 0.018625, 0.018625, 0.018625, 0.026625, 0.026625, 0.026625, 0.026625, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.026625, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250, 0.029250 } }, { (char *) "PSK250RC5", 1.0, 3.278375, { 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.012750, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.019125, 0.019125, 0.004750, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.012750, 0.014375, 0.014375, 0.014375, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.014375, 0.016000, 0.014375, 0.016000, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.012750, 0.014375, 0.014375, 0.012750, 0.012750, 0.012750, 0.012750, 0.012750, 0.014375, 0.012750, 0.012750, 0.012750, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.014375, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.008000, 0.011125, 0.009500, 0.009500, 0.006375, 0.011125, 0.011125, 0.009500, 0.008000, 0.012750, 0.011125, 0.009500, 0.011125, 0.008000, 0.008000, 0.011125, 0.011125, 0.009500, 0.009500, 0.006375, 0.009500, 0.011125, 0.011125, 0.011125, 0.011125, 0.011125, 0.016000, 0.016000, 0.016000, 0.016000, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.019125, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500, 0.017500 } }, { (char *) "PSK250RC6", 1.0, 2.733250, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK250RC7", 1.0, 2.345625, { 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.009125, 0.012500, 0.012500, 0.012500, 0.012500, 0.009125, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.013625, 0.013625, 0.003375, 0.010250, 0.010250, 0.011375, 0.011375, 0.011375, 0.011375, 0.010250, 0.010250, 0.010250, 0.011375, 0.010250, 0.009125, 0.010250, 0.010250, 0.010250, 0.009125, 0.009125, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.011375, 0.010250, 0.011375, 0.010250, 0.011375, 0.009125, 0.010250, 0.009125, 0.009125, 0.009125, 0.009125, 0.010250, 0.010250, 0.009125, 0.010250, 0.010250, 0.009125, 0.009125, 0.009125, 0.009125, 0.009125, 0.010250, 0.009125, 0.009125, 0.009125, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.010250, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.005625, 0.008000, 0.006750, 0.006750, 0.004500, 0.008000, 0.008000, 0.006750, 0.005625, 0.009125, 0.008000, 0.006750, 0.008000, 0.005625, 0.005625, 0.008000, 0.008000, 0.006750, 0.006750, 0.004500, 0.006750, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.011375, 0.011375, 0.011375, 0.011375, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.013625, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.011375, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500 } }, { (char *) "PSK500R", 1.0, 4.096000, { 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.032000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.012000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.032000, 0.036000, 0.036000, 0.036000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.036000, 0.040000, 0.036000, 0.040000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.032000, 0.036000, 0.036000, 0.032000, 0.032000, 0.032000, 0.032000, 0.032000, 0.036000, 0.032000, 0.032000, 0.032000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.036000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.020000, 0.028000, 0.024000, 0.024000, 0.016000, 0.028000, 0.028000, 0.024000, 0.020000, 0.032000, 0.028000, 0.024000, 0.028000, 0.020000, 0.020000, 0.028000, 0.028000, 0.024000, 0.024000, 0.016000, 0.024000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.040000, 0.040000, 0.040000, 0.040000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000 } }, { (char *) "PSK500C2", 1.0, 1.024000, { 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.007000, 0.012000, 0.012000, 0.007000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.003000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.011000, 0.010000, 0.010000, 0.011000, 0.011000, 0.009000, 0.008000, 0.009000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.010000, 0.011000, 0.011000, 0.009000, 0.011000, 0.012000, 0.012000, 0.009000, 0.010000, 0.010000, 0.010000, 0.009000, 0.010000, 0.010000, 0.011000, 0.009000, 0.011000, 0.011000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.010000, 0.009000, 0.009000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.011000, 0.011000, 0.012000, 0.011000, 0.012000, 0.006000, 0.009000, 0.008000, 0.008000, 0.004000, 0.008000, 0.009000, 0.008000, 0.006000, 0.011000, 0.010000, 0.007000, 0.008000, 0.006000, 0.005000, 0.008000, 0.011000, 0.007000, 0.007000, 0.005000, 0.008000, 0.009000, 0.009000, 0.010000, 0.009000, 0.011000, 0.012000, 0.011000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.013000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000 } }, { (char *) "PSK500C4", 1.0, 0.512000, { 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.003500, 0.006000, 0.006000, 0.003500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.001500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.006000, 0.005500, 0.005000, 0.005000, 0.005500, 0.005500, 0.004500, 0.004000, 0.004500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005000, 0.005500, 0.005500, 0.004500, 0.005500, 0.006000, 0.006000, 0.004500, 0.005000, 0.005000, 0.005000, 0.004500, 0.005000, 0.005000, 0.005500, 0.004500, 0.005500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005000, 0.004500, 0.004500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.006000, 0.003000, 0.004500, 0.004000, 0.004000, 0.002000, 0.004000, 0.004500, 0.004000, 0.003000, 0.005500, 0.005000, 0.003500, 0.004000, 0.003000, 0.002500, 0.004000, 0.005500, 0.003500, 0.003500, 0.002500, 0.004000, 0.004500, 0.004500, 0.005000, 0.004500, 0.005500, 0.006000, 0.005500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000 } }, { (char *) "PSK500RC2", 1.0, 4.096000, { 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.006000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.016000, 0.018000, 0.018000, 0.018000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.020000, 0.018000, 0.020000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.016000, 0.018000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.010000, 0.014000, 0.012000, 0.012000, 0.008000, 0.014000, 0.014000, 0.012000, 0.010000, 0.016000, 0.014000, 0.012000, 0.014000, 0.010000, 0.010000, 0.014000, 0.014000, 0.012000, 0.012000, 0.008000, 0.012000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.020000, 0.020000, 0.020000, 0.020000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000 } }, { (char *) "PSK500RC3", 1.0, 2.733250, { 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.010625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.016000, 0.016000, 0.004000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.010625, 0.012000, 0.012000, 0.012000, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.012000, 0.013250, 0.012000, 0.013250, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.010625, 0.012000, 0.012000, 0.010625, 0.010625, 0.010625, 0.010625, 0.010625, 0.012000, 0.010625, 0.010625, 0.010625, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.006625, 0.009250, 0.008000, 0.008000, 0.005250, 0.009250, 0.009250, 0.008000, 0.006625, 0.010625, 0.009250, 0.008000, 0.009250, 0.006625, 0.006625, 0.009250, 0.009250, 0.008000, 0.008000, 0.005250, 0.008000, 0.009250, 0.009250, 0.009250, 0.009250, 0.009250, 0.013250, 0.013250, 0.013250, 0.013250, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.013250, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625, 0.014625 } }, { (char *) "PSK500RC4", 1.0, 2.048000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "PSK800C2", 1.0, 0.640000, { 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.006250, 0.004375, 0.007500, 0.007500, 0.004375, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.001875, 0.006875, 0.006875, 0.006875, 0.006875, 0.007500, 0.007500, 0.006875, 0.006250, 0.006250, 0.006875, 0.006875, 0.005625, 0.005000, 0.005625, 0.006875, 0.006250, 0.006250, 0.006250, 0.006250, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.006250, 0.006875, 0.006875, 0.005625, 0.006875, 0.007500, 0.007500, 0.005625, 0.006250, 0.006250, 0.006250, 0.005625, 0.006250, 0.006250, 0.006875, 0.005625, 0.006875, 0.006875, 0.006250, 0.006250, 0.006250, 0.006250, 0.006250, 0.006875, 0.006250, 0.005625, 0.005625, 0.006875, 0.006875, 0.006875, 0.006875, 0.006875, 0.007500, 0.006875, 0.006875, 0.006875, 0.007500, 0.006875, 0.007500, 0.003750, 0.005625, 0.005000, 0.005000, 0.002500, 0.005000, 0.005625, 0.005000, 0.003750, 0.006875, 0.006250, 0.004375, 0.005000, 0.003750, 0.003125, 0.005000, 0.006875, 0.004375, 0.004375, 0.003125, 0.005000, 0.005625, 0.005625, 0.006250, 0.005625, 0.006875, 0.007500, 0.006875, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.007500, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008125, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750 } }, { (char *) "PSK800RC2", 1.0, 2.560000, { 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.010000, 0.013750, 0.013750, 0.013750, 0.013750, 0.010000, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.015000, 0.015000, 0.003750, 0.011250, 0.011250, 0.012500, 0.012500, 0.012500, 0.012500, 0.011250, 0.011250, 0.011250, 0.012500, 0.011250, 0.010000, 0.011250, 0.011250, 0.011250, 0.010000, 0.010000, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.012500, 0.011250, 0.012500, 0.011250, 0.012500, 0.010000, 0.011250, 0.010000, 0.010000, 0.010000, 0.010000, 0.011250, 0.011250, 0.010000, 0.011250, 0.011250, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011250, 0.010000, 0.010000, 0.010000, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.011250, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.006250, 0.008750, 0.007500, 0.007500, 0.005000, 0.008750, 0.008750, 0.007500, 0.006250, 0.010000, 0.008750, 0.007500, 0.008750, 0.006250, 0.006250, 0.008750, 0.008750, 0.007500, 0.007500, 0.005000, 0.007500, 0.008750, 0.008750, 0.008750, 0.008750, 0.008750, 0.012500, 0.012500, 0.012500, 0.012500, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.015000, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.012500, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750, 0.013750 } }, { (char *) "PSK1000C2", 1.0, 1.024000, { 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.005000, 0.003500, 0.006000, 0.006000, 0.003500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.001500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.006000, 0.005500, 0.005000, 0.005000, 0.005500, 0.005500, 0.004500, 0.004000, 0.004500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005000, 0.005500, 0.005500, 0.004500, 0.005500, 0.006000, 0.006000, 0.004500, 0.005000, 0.005000, 0.005000, 0.004500, 0.005000, 0.005000, 0.005500, 0.004500, 0.005500, 0.005500, 0.005000, 0.005000, 0.005000, 0.005000, 0.005000, 0.005500, 0.005000, 0.004500, 0.004500, 0.005500, 0.005500, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.005500, 0.005500, 0.006000, 0.005500, 0.006000, 0.003000, 0.004500, 0.004000, 0.004000, 0.002000, 0.004000, 0.004500, 0.004000, 0.003000, 0.005500, 0.005000, 0.003500, 0.004000, 0.003000, 0.002500, 0.004000, 0.005500, 0.003500, 0.003500, 0.002500, 0.004000, 0.004500, 0.004500, 0.005000, 0.004500, 0.005500, 0.006000, 0.005500, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006000, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.006500, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000 } }, { (char *) "PSK1000R", 1.0, 2.048000, { 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.016000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.006000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.016000, 0.018000, 0.018000, 0.018000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.018000, 0.020000, 0.018000, 0.020000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.016000, 0.018000, 0.018000, 0.016000, 0.016000, 0.016000, 0.016000, 0.016000, 0.018000, 0.016000, 0.016000, 0.016000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.018000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.010000, 0.014000, 0.012000, 0.012000, 0.008000, 0.014000, 0.014000, 0.012000, 0.010000, 0.016000, 0.014000, 0.012000, 0.014000, 0.010000, 0.010000, 0.014000, 0.014000, 0.012000, 0.012000, 0.008000, 0.012000, 0.014000, 0.014000, 0.014000, 0.014000, 0.014000, 0.020000, 0.020000, 0.020000, 0.020000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000 } }, { (char *) "PSK1000RC2", 1.0, 2.048000, { 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.008000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.012000, 0.012000, 0.003000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.008000, 0.009000, 0.009000, 0.009000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.009000, 0.010000, 0.009000, 0.010000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.008000, 0.009000, 0.009000, 0.008000, 0.008000, 0.008000, 0.008000, 0.008000, 0.009000, 0.008000, 0.008000, 0.008000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.009000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.005000, 0.007000, 0.006000, 0.006000, 0.004000, 0.007000, 0.007000, 0.006000, 0.005000, 0.008000, 0.007000, 0.006000, 0.007000, 0.005000, 0.005000, 0.007000, 0.007000, 0.006000, 0.006000, 0.004000, 0.006000, 0.007000, 0.007000, 0.007000, 0.007000, 0.007000, 0.010000, 0.010000, 0.010000, 0.010000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.012000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.010000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000, 0.011000 } }, { (char *) "QPSK31", 1.0, 3.072000, { 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.224000, 0.384000, 0.384000, 0.224000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.096000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.352000, 0.320000, 0.320000, 0.352000, 0.352000, 0.288000, 0.256000, 0.288000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.320000, 0.352000, 0.352000, 0.288000, 0.352000, 0.384000, 0.384000, 0.288000, 0.320000, 0.320000, 0.320000, 0.288000, 0.320000, 0.320000, 0.352000, 0.288000, 0.352000, 0.352000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.320000, 0.288000, 0.288000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.352000, 0.352000, 0.384000, 0.352000, 0.384000, 0.192000, 0.288000, 0.256000, 0.256000, 0.128000, 0.256000, 0.288000, 0.256000, 0.192000, 0.352000, 0.320000, 0.224000, 0.256000, 0.192000, 0.160000, 0.256000, 0.352000, 0.224000, 0.224000, 0.160000, 0.256000, 0.288000, 0.288000, 0.320000, 0.288000, 0.352000, 0.384000, 0.352000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.416000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000, 0.448000 } }, { (char *) "QPSK63", 1.0, 3.072000, { 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.160000, 0.112000, 0.192000, 0.192000, 0.112000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.048000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.192000, 0.176000, 0.160000, 0.160000, 0.176000, 0.176000, 0.144000, 0.128000, 0.144000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.160000, 0.176000, 0.176000, 0.144000, 0.176000, 0.192000, 0.192000, 0.144000, 0.160000, 0.160000, 0.160000, 0.144000, 0.160000, 0.160000, 0.176000, 0.144000, 0.176000, 0.176000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.176000, 0.160000, 0.144000, 0.144000, 0.176000, 0.176000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.176000, 0.176000, 0.192000, 0.176000, 0.192000, 0.096000, 0.144000, 0.128000, 0.128000, 0.064000, 0.128000, 0.144000, 0.128000, 0.096000, 0.176000, 0.160000, 0.112000, 0.128000, 0.096000, 0.080000, 0.128000, 0.176000, 0.112000, 0.112000, 0.080000, 0.128000, 0.144000, 0.144000, 0.160000, 0.144000, 0.176000, 0.192000, 0.176000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.192000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.208000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000 } }, { (char *) "QPSK125", 1.0, 3.072000, { 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.080000, 0.056000, 0.096000, 0.096000, 0.056000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.024000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.096000, 0.088000, 0.080000, 0.080000, 0.088000, 0.088000, 0.072000, 0.064000, 0.072000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.080000, 0.088000, 0.088000, 0.072000, 0.088000, 0.096000, 0.096000, 0.072000, 0.080000, 0.080000, 0.080000, 0.072000, 0.080000, 0.080000, 0.088000, 0.072000, 0.088000, 0.088000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.088000, 0.080000, 0.072000, 0.072000, 0.088000, 0.088000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.088000, 0.088000, 0.096000, 0.088000, 0.096000, 0.048000, 0.072000, 0.064000, 0.064000, 0.032000, 0.064000, 0.072000, 0.064000, 0.048000, 0.088000, 0.080000, 0.056000, 0.064000, 0.048000, 0.040000, 0.064000, 0.088000, 0.056000, 0.056000, 0.040000, 0.064000, 0.072000, 0.072000, 0.080000, 0.072000, 0.088000, 0.096000, 0.088000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.096000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.104000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000, 0.112000 } }, { (char *) "QPSK250", 1.0, 3.072000, { 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.040000, 0.028000, 0.048000, 0.048000, 0.028000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.012000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.048000, 0.044000, 0.040000, 0.040000, 0.044000, 0.044000, 0.036000, 0.032000, 0.036000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.040000, 0.044000, 0.044000, 0.036000, 0.044000, 0.048000, 0.048000, 0.036000, 0.040000, 0.040000, 0.040000, 0.036000, 0.040000, 0.040000, 0.044000, 0.036000, 0.044000, 0.044000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.044000, 0.040000, 0.036000, 0.036000, 0.044000, 0.044000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.044000, 0.044000, 0.048000, 0.044000, 0.048000, 0.024000, 0.036000, 0.032000, 0.032000, 0.016000, 0.032000, 0.036000, 0.032000, 0.024000, 0.044000, 0.040000, 0.028000, 0.032000, 0.024000, 0.020000, 0.032000, 0.044000, 0.028000, 0.028000, 0.020000, 0.032000, 0.036000, 0.036000, 0.040000, 0.036000, 0.044000, 0.048000, 0.044000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.048000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.052000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000, 0.056000 } }, { (char *) "QPSK500", 1.0, 3.072000, { 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.020000, 0.014000, 0.024000, 0.024000, 0.014000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.006000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.024000, 0.022000, 0.020000, 0.020000, 0.022000, 0.022000, 0.018000, 0.016000, 0.018000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.020000, 0.022000, 0.022000, 0.018000, 0.022000, 0.024000, 0.024000, 0.018000, 0.020000, 0.020000, 0.020000, 0.018000, 0.020000, 0.020000, 0.022000, 0.018000, 0.022000, 0.022000, 0.020000, 0.020000, 0.020000, 0.020000, 0.020000, 0.022000, 0.020000, 0.018000, 0.018000, 0.022000, 0.022000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.022000, 0.022000, 0.024000, 0.022000, 0.024000, 0.012000, 0.018000, 0.016000, 0.016000, 0.008000, 0.016000, 0.018000, 0.016000, 0.012000, 0.022000, 0.020000, 0.014000, 0.016000, 0.012000, 0.010000, 0.016000, 0.022000, 0.014000, 0.014000, 0.010000, 0.016000, 0.018000, 0.018000, 0.020000, 0.018000, 0.022000, 0.024000, 0.022000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.024000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.026000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000, 0.028000 } }, { (char *) "THOR16", 1.0, 4.480000, { 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.256000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.384000, 0.384000, 0.096000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.256000, 0.288000, 0.288000, 0.288000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.288000, 0.320000, 0.288000, 0.320000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.256000, 0.288000, 0.288000, 0.256000, 0.256000, 0.256000, 0.256000, 0.256000, 0.288000, 0.256000, 0.256000, 0.256000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.288000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.160000, 0.224000, 0.192000, 0.192000, 0.128000, 0.224000, 0.224000, 0.192000, 0.160000, 0.256000, 0.224000, 0.192000, 0.224000, 0.160000, 0.160000, 0.224000, 0.224000, 0.192000, 0.192000, 0.128000, 0.192000, 0.224000, 0.224000, 0.224000, 0.224000, 0.224000, 0.320000, 0.320000, 0.320000, 0.320000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.384000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.320000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000, 0.352000 } }, { (char *) "THOR22", 1.0, 3.250794, { 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.185760, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.278639, 0.278639, 0.069660, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.185760, 0.208980, 0.208980, 0.208980, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.208980, 0.232200, 0.208980, 0.232200, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.185760, 0.208980, 0.208980, 0.185760, 0.185760, 0.185760, 0.185760, 0.185760, 0.208980, 0.185760, 0.185760, 0.185760, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.208980, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.116100, 0.162540, 0.139320, 0.139320, 0.092880, 0.162540, 0.162540, 0.139320, 0.116100, 0.185760, 0.162540, 0.139320, 0.162540, 0.116100, 0.116100, 0.162540, 0.162540, 0.139320, 0.139320, 0.092880, 0.139320, 0.162540, 0.162540, 0.162540, 0.162540, 0.162540, 0.232200, 0.232200, 0.232200, 0.232200, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.278639, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.232200, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420, 0.255420 } }, { (char *) "THOR25x4", 1.0, 10.720000, { 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.160000, 0.220000, 0.220000, 0.220000, 0.220000, 0.160000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.240000, 0.240000, 0.060000, 0.180000, 0.180000, 0.200000, 0.200000, 0.200000, 0.200000, 0.180000, 0.180000, 0.180000, 0.200000, 0.180000, 0.160000, 0.180000, 0.180000, 0.180000, 0.160000, 0.160000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.200000, 0.180000, 0.200000, 0.180000, 0.200000, 0.160000, 0.180000, 0.160000, 0.160000, 0.160000, 0.160000, 0.180000, 0.180000, 0.160000, 0.180000, 0.180000, 0.160000, 0.160000, 0.160000, 0.160000, 0.160000, 0.180000, 0.160000, 0.160000, 0.160000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.180000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.100000, 0.140000, 0.120000, 0.120000, 0.080000, 0.140000, 0.140000, 0.120000, 0.100000, 0.160000, 0.140000, 0.120000, 0.140000, 0.100000, 0.100000, 0.140000, 0.140000, 0.120000, 0.120000, 0.080000, 0.120000, 0.140000, 0.140000, 0.140000, 0.140000, 0.140000, 0.200000, 0.200000, 0.200000, 0.200000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.240000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.200000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000, 0.220000 } }, { (char *) "THOR50x1", 1.0, 5.360000, { 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.120000, 0.120000, 0.030000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.080000, 0.090000, 0.090000, 0.090000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.100000, 0.090000, 0.100000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.080000, 0.090000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.050000, 0.070000, 0.060000, 0.060000, 0.040000, 0.070000, 0.070000, 0.060000, 0.050000, 0.080000, 0.070000, 0.060000, 0.070000, 0.050000, 0.050000, 0.070000, 0.070000, 0.060000, 0.060000, 0.040000, 0.060000, 0.070000, 0.070000, 0.070000, 0.070000, 0.070000, 0.100000, 0.100000, 0.100000, 0.100000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000 } }, { (char *) "THOR50x2", 1.0, 5.360000, { 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.080000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.120000, 0.120000, 0.030000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.080000, 0.090000, 0.090000, 0.090000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.090000, 0.100000, 0.090000, 0.100000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.080000, 0.090000, 0.090000, 0.080000, 0.080000, 0.080000, 0.080000, 0.080000, 0.090000, 0.080000, 0.080000, 0.080000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.090000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.050000, 0.070000, 0.060000, 0.060000, 0.040000, 0.070000, 0.070000, 0.060000, 0.050000, 0.080000, 0.070000, 0.060000, 0.070000, 0.050000, 0.050000, 0.070000, 0.070000, 0.060000, 0.060000, 0.040000, 0.060000, 0.070000, 0.070000, 0.070000, 0.070000, 0.070000, 0.100000, 0.100000, 0.100000, 0.100000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.120000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.100000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000, 0.110000 } }, { (char *) "THOR100", 1.0, 2.680000, { 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.040000, 0.055000, 0.055000, 0.055000, 0.055000, 0.040000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.060000, 0.060000, 0.015000, 0.045000, 0.045000, 0.050000, 0.050000, 0.050000, 0.050000, 0.045000, 0.045000, 0.045000, 0.050000, 0.045000, 0.040000, 0.045000, 0.045000, 0.045000, 0.040000, 0.040000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.050000, 0.045000, 0.050000, 0.045000, 0.050000, 0.040000, 0.045000, 0.040000, 0.040000, 0.040000, 0.040000, 0.045000, 0.045000, 0.040000, 0.045000, 0.045000, 0.040000, 0.040000, 0.040000, 0.040000, 0.040000, 0.045000, 0.040000, 0.040000, 0.040000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.045000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.025000, 0.035000, 0.030000, 0.030000, 0.020000, 0.035000, 0.035000, 0.030000, 0.025000, 0.040000, 0.035000, 0.030000, 0.035000, 0.025000, 0.025000, 0.035000, 0.035000, 0.030000, 0.030000, 0.020000, 0.030000, 0.035000, 0.035000, 0.035000, 0.035000, 0.035000, 0.050000, 0.050000, 0.050000, 0.050000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.060000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.050000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000, 0.055000 } } }; static float time_length(MODE_TIME_TABLE *mTable, const char *string, int length); static int str_cnt(char * str, int count_limit); /** ******************************************************** * \brief Determine the length of the string with a count * limitation. * \return signed integer. The number of characters in the * array not to excede count limit. ***********************************************************/ static int str_cnt(char * str, int count_limit) { if(!str || (count_limit < 1)) return 0; int value = 0; for(int index = 0; index < count_limit; index++) { if(str[index] == 0) break; value++; } return value; } /** ******************************************************** * \brief Calulate the time it take to transmit the given * text with the selected modem. ***********************************************************/ static float time_length(MODE_TIME_TABLE *mTable, const char *string, int length) { unsigned int character = 0; float accum = 0.0; while (length > 0) { character = (unsigned int) *string++; character &= 0xFF; accum += mTable->table[character]; length--; } return (accum * mTable->scale); } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C' interface. * \return float Duration in seconds. ***********************************************************/ float seconds_from_c_string(const char *mode, const char *string, int length, float *overhead) { int mode_index = 0; int max_mode_name = 16; int mode_count = sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); static int last_mode = 0; if(!mode || !string || length < 1) return 0.0; if(strncmp(mode, mode_time_table[last_mode].mode_name, max_mode_name) == 0) { if(overhead) { *overhead = mode_time_table[last_mode].overhead; } return time_length(&mode_time_table[last_mode], string, length); } else { for(mode_index = 0; mode_index < mode_count; mode_index++) { if(strncmp((char *) mode, (char *) mode_time_table[mode_index].mode_name, max_mode_name) == 0) { last_mode = mode_index; if(overhead) { *overhead = mode_time_table[last_mode].overhead; } return time_length(&mode_time_table[mode_index], string, length); } } } return 0.0; } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C' interface. * \return float Duration in minutes. ***********************************************************/ float minutes_from_c_string(const char *mode, const char *string, int length, float *overhead) { float time = 0.0; time = seconds_from_c_string(mode, string, length, overhead) / 60.0; if(overhead) *overhead /= 60.0; return time; } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C++' std::string interface. * \return float Duration in seconds. ***********************************************************/ float seconds_from_string(std::string mode, std::string& str, float *overhead) { try { return seconds_from_c_string(mode.c_str(), str.c_str(), str.length(), overhead); } catch ( ... ) { LOG_ERROR("%s", "String Ref Error"); return 0.0; } } /** ******************************************************** * \brief Returns the time it take to transmit the given * text with the selected modem. 'C++' std::string interface. * \return float Duration in minutes. ***********************************************************/ float minutes_from_string(std::string mode, std::string& str, float *overhead) { float time = 0.0; try { time = seconds_from_c_string(mode.c_str(), str.c_str(), str.length(), overhead) / 60.0; if(overhead) *overhead /= 60.0; } catch ( ... ) { LOG_ERROR("%s", "String Ref Error"); return 0.0; } return time; } /** ******************************************************** * \brief Search the modem table for a modem string match. * 'C++' std::string interface. * \return bool Match found = true. ***********************************************************/ bool modem_available(std::string modem) { if(modem.empty()) return false; return modem_available((char *) modem.c_str(), (int) modem.size()); } /** ******************************************************** * \brief Search the modem table for a modem string match. * 'C' interface. * \return bool Match found = true. ***********************************************************/ bool modem_available(char *modem, int search_limit) { if(!modem || (search_limit < 1)) return false; int mode_count = (int) sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); int index = 0; int results = 0; bool found = false; for(index = 0; index < mode_count; index++) { results = strncmp(modem, mode_time_table[index].mode_name, search_limit); if(results == 0) { results = str_cnt(mode_time_table[index].mode_name, 16); if(results == search_limit) { found = true; break; } } } return found; } /** ******************************************************** * \brief Return the number of table entires. * \return integer ***********************************************************/ int mode_table_count(void) { return (int) sizeof(mode_time_table) / sizeof(MODE_TIME_TABLE); } /** ******************************************************** * \brief Return modem ID string at position 'x' in the * Table. * \return char *. ***********************************************************/ char * modem_at_index(int index) { static char modem_name[] = "Bad Index"; int index_limit = mode_table_count(); if(index < 0 || index >= index_limit) return (char *) &modem_name[0]; return (char *) mode_time_table[index].mode_name; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/getsysinfo.c�����������������������������������������������������������������0000664�0001750�0001750�00000026457�12330516146�014131� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Adapted from libgw32c-0.4 */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <windows.h> #define BUFSIZE 80 #define VIDSIZE 13 static const char * vid_cyrix = "CyrixInstead"; static const char * vid_centaur = "CentaurHauls"; static const char * vid_rise = "RiseRiseRise"; static const char * vid_intel = "GenuineIntel"; static const char * vid_amd = "AuthenticAMD"; static const char * vid_tmx86 = "GenuineTMx86"; static const char * vid_geode = "Geode by NSC"; static const char * vid_umc = "UMC UMC UMC "; static const char * vid_amd2 = "AMD ISBETTER"; static const char * vid_amd3 = "DEI "; static const char * vid_amd4 = "NexGenerationAMD"; static const char * vid_nexgen = "NexGenDriven"; #define cpuid(op,a,b,c,d)\ __asm__("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (op)); static void GetVendorID (char *vid) { unsigned long MaxEax, ebx, ecx, edx, zerobyte; cpuid (0, MaxEax, ebx, ecx, edx); memcpy (vid, &ebx, 4); memcpy (vid+4, &edx, 4); memcpy (vid+8, &ecx, 4); zerobyte = 0; memcpy (vid+12, &zerobyte, 1); } BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName) { SYSTEM_INFO sysinf; int family, model, stepping; char VendorId [VIDSIZE+2]; ZeroMemory(&sysinf, sizeof(SYSTEM_INFO)); GetSystemInfo(&sysinf); family = sysinf.wProcessorLevel; model = HIBYTE(sysinf.wProcessorRevision); stepping = LOBYTE(sysinf.wProcessorRevision); switch (sysinf.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_UNKNOWN: strcpy(MachineName, "unknown"); break; case PROCESSOR_ARCHITECTURE_INTEL: strcpy(MachineName, "ix86"); break; case PROCESSOR_ARCHITECTURE_MIPS: strcpy(MachineName, "mips"); break; case PROCESSOR_ARCHITECTURE_ALPHA: strcpy(MachineName, "alpha"); break; case PROCESSOR_ARCHITECTURE_PPC: strcpy(MachineName, "ppc"); break; case PROCESSOR_ARCHITECTURE_IA64: strcpy(MachineName, "IA64"); break; case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: strcpy(MachineName, "IA32 on Win64"); break; case PROCESSOR_ARCHITECTURE_AMD64: strcpy(MachineName, "amd64"); break; case PROCESSOR_ARCHITECTURE_SHX: strcpy(MachineName, "sh"); break; case PROCESSOR_ARCHITECTURE_ARM: strcpy(MachineName, "arm"); break; case PROCESSOR_ARCHITECTURE_ALPHA64: strcpy(MachineName, "alpha64"); break; case PROCESSOR_ARCHITECTURE_MSIL: strcpy(MachineName, "msil"); break; default: strcpy(MachineName, "unknown"); break; } if (sysinf.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) switch(family) { case 3: strcpy(MachineName, "i386"); break; case 4: strcpy(MachineName, "i486"); break; case 5: strcpy(MachineName, "i586"); break; case 6: strcpy(MachineName, "i686"); break; case 7: strcpy(MachineName, "i786"); break; case 15: strcpy(MachineName, "i786"); break; default: strcpy(MachineName, "ix86"); } GetVendorID(VendorId); if (!strcmp(VendorId, vid_cyrix)) strcpy(ProcessorName, "Cyrix"); else if (!strcmp(VendorId, vid_centaur)) strcpy(ProcessorName, "Centaur"); else if (!strcmp(VendorId, vid_rise)) strcpy(ProcessorName, "Rise"); else if (!strcmp(VendorId, vid_intel)) strcpy(ProcessorName, "Intel"); else if (!strcmp(VendorId, vid_amd)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_tmx86)) strcpy(ProcessorName, "Transmeta"); else if (!strcmp(VendorId, vid_geode)) strcpy(ProcessorName, "Geode"); else if (!strcmp(VendorId, vid_umc)) strcpy(ProcessorName, "UMC"); else if (!strcmp(VendorId, vid_amd2)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_amd3)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_amd4)) strcpy(ProcessorName, "AMD"); else if (!strcmp(VendorId, vid_nexgen)) strcpy(ProcessorName, "NexGen"); else strcpy(ProcessorName, "Unknown"); return TRUE; } /* Platform SDK: Windows System Information Adapted from: http://msdn.microsoft.com/library/en-us/sysinfo/base/getting_the_system_version.asp http://www.codeproject.com/system/winvertable.asp Getting the System Version The following example uses the GetVersionEx function to display the version of the currently running operating system. Relying on version information is not the best way to test for a feature. Instead, refer to the documentation for the feature of interest. For more information on common techniques for feature detection, see Operating System Version. If you must require a particular operating system, be sure to use it as a minimum supported version, rather than design the test for the one operating system. This way, your detection code will continue to work on future versions of Windows. */ #undef BUFSIZE #define BUFSIZE 255 BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version) { OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; DWORD BuildNumber; // Try calling GetVersionEx using the OSVERSIONINFOEX structure. // If that fails, try using the OSVERSIONINFO structure. ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); if( !(bOsVersionInfoEx = GetVersionEx ((LPOSVERSIONINFO) &osvi)) ) { // If OSVERSIONINFOEX doesn't work, try OSVERSIONINFO. osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); if (! GetVersionEx ( (LPOSVERSIONINFO) &osvi) ) return FALSE; } BuildNumber = osvi.dwBuildNumber & 0xFFFF; switch (osvi.dwPlatformId) { // Tests for Windows NT product family. case VER_PLATFORM_WIN32_NT: // Test for the product. if ( osvi.dwMajorVersion == 3 && osvi.dwMinorVersion == 51 ) strcpy(OsName, "Microsoft Windows NT 3.51"); else if ( osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows NT 4.0"); else if ( osvi.dwMajorVersion <= 4 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows NT"); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 ) strcpy(OsName, "Microsoft Windows Server&nbsp;2003 family, "); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) strcpy(OsName, "Microsoft Windows XP"); else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) strcpy(OsName, "Microsoft Windows 2000"); if( bOsVersionInfoEx ) { // Use information from GetVersionEx. // Test for the workstation type. if ( osvi.wProductType == VER_NT_WORKSTATION ) { if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) strcat(OsName, " Home Edition" ); else strcat(OsName, " Professional" ); } // Test for the server type. else if ( osvi.wProductType == VER_NT_SERVER) { if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) strcat(OsName, " Datacenter Edition" ); else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) if( osvi.dwMajorVersion == 4 ) strcat(OsName, " Advanced Server" ); else strcat(OsName, " Enterprise Edition" ); else if ( osvi.wSuiteMask == VER_SUITE_BLADE ) strcat(OsName, " Web Edition" ); else strcat(OsName, " Standard Edition" ); } else if( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) { if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) strcat(OsName, " Datacenter Server" ); else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) strcat(OsName, " Advanced Server" ); else strcat(OsName, " Server" ); } else // Windows NT 4.0 { if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) strcat(OsName, "Server 4.0, Enterprise Edition "); else strcat(OsName, "Server 4.0 " ); } } else { // Use the registry on early versions of Windows NT. HKEY hKey; char szProductType[BUFSIZE]; DWORD dwBufLen=BUFSIZE; LONG lRet; lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_QUERY_VALUE, &hKey ); if( lRet != ERROR_SUCCESS ) return FALSE; lRet = RegQueryValueEx( hKey, "ProductType", NULL, NULL, (LPBYTE) szProductType, &dwBufLen); if( (lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE) ) return FALSE; RegCloseKey( hKey ); if ( lstrcmpi( "WINNT", szProductType) == 0 ) strcat(OsName, " Professional" ); if ( lstrcmpi( "LANMANNT", szProductType) == 0 ) strcat(OsName, " Server" ); if ( lstrcmpi( "SERVERNT", szProductType) == 0 ) strcat(OsName, " Advanced Server" ); } // Display version, service pack (if any), and build number. strcat (OsName, " "); strcat (OsName, osvi.szCSDVersion); break; // Test for the Windows 95 product family. case VER_PLATFORM_WIN32_WINDOWS: if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) { strcpy(OsName, "Microsoft Windows 95"); if (BuildNumber > 950 && BuildNumber <= 1080) strcat(OsName, " SP1"); else if (BuildNumber > 1080) strcat(OsName, " OSR2"); /* if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) strcat(OsName, "OSR2 " ); */ } if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) { strcpy(OsName, "Microsoft Windows 98"); if (BuildNumber > 1998 && BuildNumber < 2183) strcat(OsName, " SP1"); else if (BuildNumber >= 2183) strcat(OsName, " SE"); /* if ( osvi.szCSDVersion[1] == 'A' ) strcat(OsName, "SE " ); */ } if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) { strcpy(OsName, "Microsoft Windows Millennium Edition "); } break; } sprintf(Release, "%lu.%lu.%lu", osvi.dwPlatformId, osvi.dwMajorVersion, osvi.dwMinorVersion); sprintf(Version, "%lu", osvi.dwBuildNumber & 0xFFFF); return TRUE; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/socket.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000044635�12330516146�013605� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // socket.cxx // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <sys/types.h> #ifndef __MINGW32__ # include <sys/socket.h> # include <netdb.h> # include <arpa/inet.h> # include <netinet/in.h> # include <sys/time.h> # include <sys/select.h> #else # include "compat.h" #endif #include <unistd.h> #include <fcntl.h> #include <string> #include <sstream> #include <cerrno> #include <cstring> #include <cstdlib> #include <cmath> #include <cstdio> #include "debug.h" #include "socket.h" #if HAVE_GETADDRINFO && !defined(AI_NUMERICSERV) # define AI_NUMERICSERV 0 #endif using namespace std; // // utility functions // #if HAVE_GETADDRINFO static void copy_addrinfo(struct addrinfo** info, const struct addrinfo* src) { struct addrinfo* p = *info; for (const struct addrinfo* rp = src; rp; rp = rp->ai_next) { if (p) { p->ai_next = new struct addrinfo; p = p->ai_next; } else { p = new struct addrinfo; if (!*info) *info = p; } p->ai_flags = rp->ai_flags; p->ai_family = rp->ai_family; p->ai_socktype = rp->ai_socktype; p->ai_protocol = rp->ai_protocol; p->ai_addrlen = rp->ai_addrlen; if (rp->ai_addr) { p->ai_addr = reinterpret_cast<struct sockaddr*>(new struct sockaddr_storage); memcpy(p->ai_addr, rp->ai_addr, rp->ai_addrlen); } else p->ai_addr = NULL; if (rp->ai_canonname) p->ai_canonname = strdup(rp->ai_canonname); else p->ai_canonname = NULL; p->ai_next = NULL; } } static void free_addrinfo(struct addrinfo* ai) { for (struct addrinfo *next, *p = ai; p; p = next) { next = p->ai_next; delete reinterpret_cast<struct sockaddr_storage*>(p->ai_addr); free(p->ai_canonname); delete p; } } #else static void copy_charpp(char*** dst, const char* const* src) { if (src == NULL) { *dst = NULL; return; } size_t n = 0; for (const char* const* s = src; *s; s++) n++; *dst = new char*[n+1]; for (size_t i = 0; i < n; i++) (*dst)[i] = strdup(src[i]); (*dst)[n] = NULL; } static void copy_hostent(struct hostent* dst, const struct hostent* src) { if (src->h_name) dst->h_name = strdup(src->h_name); else dst->h_name = NULL; copy_charpp(&dst->h_aliases, src->h_aliases); dst->h_length = src->h_length; if (src->h_addr_list) { size_t n = 0; for (const char* const* p = src->h_addr_list; *p; p++) n++; dst->h_addr_list = new char*[n+1]; for (size_t i = 0; i < n; i++) { dst->h_addr_list[i] = new char[src->h_length]; memcpy(dst->h_addr_list[i], src->h_addr_list[i], src->h_length); } dst->h_addr_list[n] = NULL; } else dst->h_addr_list = NULL; } static void copy_servent(struct servent* dst, const struct servent* src) { if (src->s_name) dst->s_name = strdup(src->s_name); else dst->s_name = NULL; copy_charpp(&dst->s_aliases, src->s_aliases); dst->s_port = src->s_port; if (src->s_proto) dst->s_proto = strdup(src->s_proto); else dst->s_proto = NULL; } static void free_charpp(char** pp) { if (!pp) return; for (char** p = pp; *p; p++) free(*p); delete [] pp; } static void free_hostent(struct hostent* hp) { free(const_cast<char*>(hp->h_name)); free_charpp(hp->h_aliases); if (hp->h_addr_list) { for (char** p = hp->h_addr_list; *p; p++) delete [] *p; delete [] hp->h_addr_list; } } static void free_servent(struct servent* sp) { free(const_cast<char*>(sp->s_name)); free_charpp(sp->s_aliases); free(sp->s_proto); } #endif // HAVE_GETADDRINFO // // Address class // Address::Address(const char* host, int port, const char* proto_name) : node(host), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif if (node.empty() && port == 0) return; ostringstream s; s << port; service = s.str(); lookup(proto_name); } Address::Address(const char* host, const char* port_name, const char* proto_name) : node(host), service(port_name), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif lookup(proto_name); } Address::Address(const Address& addr) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif *this = addr; } Address::~Address() { #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } #else free_hostent(&host_entry); free_servent(&service_entry); #endif } Address& Address::operator=(const Address& rhs) { if (this == &rhs) return *this; node = rhs.node; service = rhs.service; #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } copy_addrinfo(&info, rhs.info); #else free_hostent(&host_entry); free_servent(&service_entry); copy_hostent(&host_entry, &rhs.host_entry); copy_servent(&service_entry, &rhs.service_entry); addr.ai_protocol = rhs.addr.ai_protocol; addr.ai_socktype = rhs.addr.ai_socktype; #endif copied = true; return *this; } void Address::lookup(const char* proto_name) { int proto; if (!strcasecmp(proto_name, "tcp")) proto = IPPROTO_TCP; else if (!strcasecmp(proto_name, "udp")) proto = IPPROTO_UDP; else { throw SocketException("Bad protocol name"); } #if HAVE_GETADDRINFO struct addrinfo hints; memset(&hints, 0, sizeof(hints)); # ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; # endif hints.ai_family = AF_UNSPEC; hints.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); if (service.find_first_not_of("0123456789") == string::npos) hints.ai_flags |= AI_NUMERICSERV; int r; if ((r = getaddrinfo(node.empty() ? NULL : node.c_str(), service.c_str(), &hints, &info)) < 0) { string errstr = "getaddrinfo: "; errstr.append(node).append(" : ").append(service); throw SocketException(r, errstr.c_str()); } #else // use gethostbyname etc. memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); if (node.empty()) node = "0.0.0.0"; struct hostent* hp; if ((hp = gethostbyname(node.c_str())) == NULL) { #ifdef __WIN32__ string errstr = "gethostbyname: "; errstr.append(node).append(" not found"); throw SocketException(0, errstr.c_str()); #else throw SocketException(hstrerror(HOST_NOT_FOUND)); #endif } copy_hostent(&host_entry, hp); int port; struct servent* sp; if ((sp = getservbyname(service.c_str(), NULL)) == NULL) { // if a service name string could not be looked up by name, it must be numeric if (service.find_first_not_of("0123456789") != string::npos) { throw SocketException("Unknown service name"); } port = htons(atoi(service.c_str())); sp = getservbyport(port, NULL); } if (!sp) service_entry.s_port = port; else copy_servent(&service_entry, sp); memset(&addr, 0, sizeof(addr)); addr.ai_protocol = proto; addr.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); #endif } /// /// Returns the number of addresses available for /// the node and service /// size_t Address::size(void) const { size_t n = 0; #if HAVE_GETADDRINFO if (!info) return 0; for (struct addrinfo* p = info; p; p = p->ai_next) n++; #else if (!host_entry.h_addr_list) return 0; for (char** p = host_entry.h_addr_list; *p; p++) n++; #endif return n; } /// /// Returns an address from the list of those available /// for the node and service /// const addr_info_t* Address::get(size_t n) const { #if HAVE_GETADDRINFO if (!info) return NULL; struct addrinfo* p = info; for (size_t i = 0; i < n; i++) p = p->ai_next; LOG_DEBUG("Found address %s", get_str(p).c_str()); return p; #else if (!host_entry.h_addr_list) return NULL; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr = *(struct in_addr*)host_entry.h_addr_list[n]; saddr.sin_port = service_entry.s_port; addr.ai_family = saddr.sin_family; addr.ai_addrlen = sizeof(saddr); addr.ai_addr = (struct sockaddr*)&saddr; LOG_DEBUG("Found address %s", get_str(&addr).c_str()); return &addr; #endif } /// /// Returns the string representation of an address /// string Address::get_str(const addr_info_t* addr) { if (!addr) return ""; #if HAVE_GETADDRINFO char host[NI_MAXHOST], port[NI_MAXSERV]; memset(host, 0, sizeof(host)); if (getnameinfo(addr->ai_addr, sizeof(struct sockaddr_storage), host, sizeof(host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) == 0) return string("[").append(host).append("]:").append(port); else return ""; #else char* host, port[8]; host = inet_ntoa(((struct sockaddr_in*)addr->ai_addr)->sin_addr); snprintf(port, sizeof(port), "%u", htons(((struct sockaddr_in*)addr->ai_addr)->sin_port)); return string("[").append(host).append("]:").append(port); #endif } // // Socket class // /// Constructs a Socket object and associates the address addr with it. /// This address will be used by subsequent calls to the bind() or connect() /// methods /// /// @param addr An Address object /// Socket::Socket(const Address& addr) { buffer = new char[BUFSIZ]; memset(&timeout, 0, sizeof(timeout)); anum = 0; nonblocking = false; autoclose = true; open(addr); } /// Constructs a Socket object from a file descriptor /// /// @param fd A file descriptor /// Socket::Socket(int fd) : sockfd(fd) { buffer = new char[BUFSIZ]; anum = 0; memset(&timeout, 0, sizeof(timeout)); if (sockfd == -1) return; #ifndef __MINGW32__ int r = fcntl(sockfd, F_GETFL); if (r == -1) throw SocketException(errno, "fcntl"); nonblocking = r & O_NONBLOCK; #else // no way to retrieve nonblocking status on woe32(?!) set_nonblocking(false); #endif autoclose = true; } /// /// Constructs a Socket object by copying another instance /// Socket::Socket(const Socket& s) : sockfd(s.sockfd), address(s.address), anum(s.anum), nonblocking(s.nonblocking), autoclose(true) { buffer = new char[BUFSIZ]; ainfo = address.get(anum); memcpy(&timeout, &s.timeout, sizeof(timeout)); s.set_autoclose(false); } Socket::~Socket() { delete [] buffer; if (autoclose) close(); } Socket& Socket::operator=(const Socket& rhs) { if (this == &rhs) return *this; sockfd = rhs.sockfd; address = rhs.address; anum = rhs.anum; ainfo = address.get(anum); memcpy(&timeout, &rhs.timeout, sizeof(timeout)); nonblocking = rhs.nonblocking; autoclose = rhs.autoclose; rhs.set_autoclose(false); return *this; } /// /// Associates the Socket with an address /// /// This address will be used by subsequent calls to the bind() or connect /// methods. /// /// @params addr An address object /// void Socket::open(const Address& addr) { address = addr; size_t n = address.size(); for (anum = 0; anum < n; anum++) { ainfo = address.get(anum); LOG_DEBUG("Trying %s", address.get_str(ainfo).c_str()); if ((sockfd = socket(ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol)) != -1) break; } if (sockfd == -1) throw SocketException(errno, "socket"); set_close_on_exec(true); } /// /// Shuts down the socket /// void Socket::close(void) { ::close(sockfd); } /// /// Waits for the socket file descriptor to become ready for I/O /// /// @params dir Specifies the I/O direction. 0 is input, 1 is output. /// /// @return True if the file descriptor became ready within the timeout /// period, false otherwise. @see Socket::set_timeout bool Socket::wait(int dir) { fd_set fdset; FD_ZERO(&fdset); FD_SET((unsigned)sockfd, &fdset); struct timeval t = { timeout.tv_sec, timeout.tv_usec }; int r; if (dir == 0) r = select(sockfd + 1, &fdset, NULL, NULL, &t); else if (dir == 1) r = select(sockfd + 1, NULL, &fdset, NULL, &t); else throw SocketException(EINVAL, "Socket::wait"); if (r == -1) throw SocketException(errno, "select"); return r; } /// /// Binds the socket to the address associated with the object /// @see Socket::open /// void Socket::bind(void) { int r = 1; if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&r, sizeof(r)) == -1) perror("setsockopt SO_REUSEADDR"); if (::bind(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "bind"); } /// /// Calls listen(2) on the socket file desriptor /// /// The socket must already have been bound to an address via a call to the bind /// method. /// /// @params backlog The maximum number of pending connections (default SOMAXCONN) /// void Socket::listen(int backlog) { if (::listen(sockfd, backlog) == -1) throw SocketException(errno, "listen"); } /// /// Accepts a connection /// /// The socket must already have been bound to an address via a call to the bind /// method. /// /// @return A Socket instance for the accepted connection /// Socket Socket::accept(void) { listen(); // wait for fd to become readable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) throw SocketException(ETIMEDOUT, "select"); int r; if ((r = ::accept(sockfd, NULL, 0)) == -1) throw SocketException(errno, "accept"); set_close_on_exec(true, r); return Socket(r); } /// /// Accepts a single connection and then closes the listening socket /// @see Socket::accept /// /// @return A Socket instance for the accepted connection /// Socket Socket::accept1(void) { bind(); Socket s = accept(); close(); s.set_close_on_exec(true); return s; } /// /// Connects the socket to the address that is associated with the object /// void Socket::connect(void) { LOG_DEBUG("Connecting to %s", address.get_str(ainfo).c_str()); if (::connect(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "connect"); } /// /// Connects the socket to an address /// /// @param addr The address to connect to /// void Socket::connect(const Address& addr) { close(); open(addr); connect(); } /// /// Sends a buffer /// /// @param buf /// @param len /// /// @return The amount of data that was sent. This may be less than len /// if the socket is non-blocking. /// size_t Socket::send(const void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(1)) return 0; ssize_t r = ::send(sockfd, (const char*)buf, len, 0); if (r == 0) shutdown(sockfd, SHUT_WR); else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "send"); r = 0; } return r; } /// /// Sends a string /// /// @param buf /// /// @return The amount of data that was sent. This may be less than len /// if the socket is non-blocking. /// size_t Socket::send(const string& buf) { return send(buf.data(), buf.length()); } /// /// Receives data into a buffer /// /// @arg buf /// @arg len The maximum number of bytes to write to buf. /// /// @return The amount of data that was received. This may be less than len /// if the socket is non-blocking. size_t Socket::recv(void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) return 0; ssize_t r = ::recv(sockfd, (char*)buf, len, 0); if (r == 0) shutdown(sockfd, SHUT_RD); else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "recv"); r = 0; } return r; } /// /// Receives all available data and appends it to a string. /// /// @arg buf /// /// @return The amount of data that was received. /// size_t Socket::recv(string& buf) { size_t n = 0; ssize_t r; while ((r = recv(buffer, BUFSIZ)) > 0) { buf.reserve(buf.length() + r); buf.append(buffer, r); n += r; } return n; } /// /// Retrieves the socket's receive or send buffer size /// /// @param dir Specifies the I/O direction. 0 is input, 1 is output. /// int Socket::get_bufsize(int dir) { int len; if (::get_bufsize(sockfd, dir, &len) == -1) throw SocketException(errno, "get_bufsize"); return len; } /// /// Sets the socket's receive or send buffer size /// /// @param dir Specifies the I/O direction. 0 is input, 1 is output. /// @param len Specifies the new buffer size /// void Socket::set_bufsize(int dir, int len) { if (::set_bufsize(sockfd, dir, len) == -1) throw SocketException(errno, "set_bufsize"); } /// /// Sets the socket's blocking mode /// /// @param v If true, the socket is set to non-blocking /// void Socket::set_nonblocking(bool v) { if (set_nonblock(sockfd, v) == -1) throw SocketException(errno, "set_nonblock"); nonblocking = v; } /// /// Enables the use of Nagle's algorithm for the socket /// /// @param v If true, Nagle's algorithm is disabled. /// void Socket::set_nodelay(bool v) { if (::set_nodelay(sockfd, v) == -1) throw SocketException(errno, "set_nodelay"); } /// /// Sets the timeout associated with non-blocking operations /// /// @param t /// void Socket::set_timeout(const struct timeval& t) { timeout.tv_sec = t.tv_sec; timeout.tv_usec = t.tv_usec; } void Socket::set_timeout(double t) { timeout.tv_sec = (time_t)floor(t); timeout.tv_usec = (suseconds_t)((t - timeout.tv_sec) * 1e6); } /// /// Sets the socket's autoclose mode. /// /// If autoclose is disabled, the socket file descriptor will not be closed when /// the Socket object is destructed. /// /// @param v If true, the socket will be closed by the destructor /// void Socket::set_autoclose(bool v) const { autoclose = v; } /// /// Sets the socket's close-on-exec flag /// void Socket::set_close_on_exec(bool v, int fd) { if (fd == -1) fd = sockfd; if (set_cloexec(fd, v) == -1) throw SocketException(errno, "set_cloexec"); } /// /// Returns the Socket's file descriptor. /// /// The descriptor should only be used for reading and writing. /// /// @return the socket file descriptor /// int Socket::fd(void) { return sockfd; } ���������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/util.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000016036�12330516146�013264� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ===================================================================== // // util.cxx // // Author: Stelios Buonanos, M0GLD, Dave Freese, W1HKJ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string.h> #include <time.h> #include "config.h" #include "util.h" #ifdef __MINGW32__ # include "compat.h" #endif /* Return the smallest power of 2 not less than n */ uint32_t ceil2(uint32_t n) { --n; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n + 1; } /* Return the largest power of 2 not greater than n */ uint32_t floor2(uint32_t n) { n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n - (n >> 1); } #include <stdlib.h> unsigned long ver2int(const char* version) { unsigned long v; char* p; v = (unsigned long)(strtod(version, &p) * 1e7 + 0.5); while (*p) v += *p++; return v; } #if !HAVE_STRCASESTR # include <ctype.h> // from git 1.6.1.2 compat/strcasestr.c char *strcasestr(const char *haystack, const char *needle) { int nlen = strlen(needle); int hlen = strlen(haystack) - nlen + 1; int i; for (i = 0; i < hlen; i++) { int j; for (j = 0; j < nlen; j++) { unsigned char c1 = haystack[i+j]; unsigned char c2 = needle[j]; if (toupper(c1) != toupper(c2)) goto next; } return (char *) haystack + i; next: ; } return NULL; } #endif // !HAVE_STRCASESTR #if !HAVE_STRLCPY // from git 1.6.1.2 compat/strcasestr.c size_t strlcpy(char *dest, const char *src, size_t size) { size_t ret = strlen(src); if (size) { size_t len = (ret >= size) ? size - 1 : ret; memcpy(dest, src, len); dest[len] = '\0'; } return ret; } #endif // !HAVE_STRLCPY #ifdef __WIN32__ int set_cloexec(int fd, unsigned char v) { return 0; } #else # include <unistd.h> # include <fcntl.h> int set_cloexec(int fd, unsigned char v) { int f = fcntl(fd, F_GETFD); return f == -1 ? f : fcntl(fd, F_SETFD, (v ? f | FD_CLOEXEC : f & ~FD_CLOEXEC)); } #endif // __WIN32__ int set_nonblock(int fd, unsigned char v) { #ifndef __WIN32__ int f = fcntl(fd, F_GETFL); return f == -1 ? f : fcntl(fd, F_SETFL, (v ? f | O_NONBLOCK : f & ~O_NONBLOCK)); #else // __WIN32__ u_long v_ = (u_long)v; errno = 0; if (ioctlsocket(fd, FIONBIO, &v_) == SOCKET_ERROR) { errno = WSAGetLastError(); return -1; } else return 0; #endif // __WIN32__ } #ifndef __WIN32__ # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> # include <netinet/tcp.h> #endif int set_nodelay(int fd, unsigned char v) { int val = v; return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&val, sizeof(val)); } #ifdef __WIN32__ # include <ws2tcpip.h> #endif int get_bufsize(int fd, int dir, int* len) { socklen_t optlen = sizeof(*len); return getsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (char*)len, &optlen); } int set_bufsize(int fd, int dir, int len) { return setsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (const char*)&len, sizeof(len)); } #ifndef __WIN32__ #include <pthread.h> #include <signal.h> #ifndef NSIG # define NSIG 64 #endif static size_t nsig = 0; static struct sigaction* sigact = 0; static pthread_mutex_t sigmutex = PTHREAD_MUTEX_INITIALIZER; #endif void save_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); if (!sigact) sigact = new struct sigaction[NSIG]; for (nsig = 1; nsig <= NSIG; nsig++) if (sigaction(nsig, NULL, &sigact[nsig-1]) == -1) break; pthread_mutex_unlock(&sigmutex); #endif } void restore_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); for (size_t i = 1; i <= nsig; i++) sigaction(i, &sigact[i-1], NULL); delete [] sigact; sigact = 0; nsig = 0; pthread_mutex_unlock(&sigmutex); #endif } uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code) { for (size_t i = 0; i < len; i++) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)buf[i]; return code; } uint32_t simple_hash_str(const unsigned char* str, uint32_t code) { while (*str) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)*str++; return code; } #include <vector> #include <climits> static const char hexsym[] = "0123456789ABCDEF"; static std::vector<char>* hexbuf; const char* str2hex(const unsigned char* str, size_t len) { if (unlikely(len == 0)) return ""; if (unlikely(!hexbuf)) { hexbuf = new std::vector<char>; hexbuf->reserve(192); } if (unlikely(hexbuf->size() < len * 3)) hexbuf->resize(len * 3); char* p = &(*hexbuf)[0]; size_t i; for (i = 0; i < len; i++) { *p++ = hexsym[str[i] >> 4]; *p++ = hexsym[str[i] & 0xF]; *p++ = ' '; } *(p - 1) = '\0'; return &(*hexbuf)[0]; } const char* str2hex(const char* str, size_t len) { return str2hex((const unsigned char*)str, len ? len : strlen(str)); } static std::vector<char>* binbuf; const char* uint2bin(unsigned u, size_t len) { if (unlikely(len == 0)) len = sizeof(u) * CHAR_BIT; if (unlikely(!binbuf)) { binbuf = new std::vector<char>; binbuf->reserve(sizeof(u) * CHAR_BIT); } if (unlikely(binbuf->size() < len + 1)) binbuf->resize(len + 1); for (size_t i = 0; i < len; i++) { (*binbuf)[len - i - 1] = '0' + (u & 1); u >>= 1; } (*binbuf)[len] = '\0'; return &(*binbuf)[0]; } void MilliSleep(long msecs) { #ifndef __WIN32__ struct timespec tv; tv.tv_sec = msecs / 1000; tv.tv_nsec = (msecs - tv.tv_sec * 1000) * 1000000L; nanosleep(&tv, NULL); #else Sleep(msecs); #endif } //====================================================================== void ucase(std::string &s) { for (size_t n = 0; n < s.length(); n++) s[n] = toupper(s[n]); } void strip_spaces(std::string &s) { while (!s.empty() && s[0] == ' ') s.erase(0,1); while (!s.empty() && s[s.length() - 1] == ' ') s.erase(s.length() - 1, 1); } void strip_leading_zeros(std::string &s) { while(!s.empty() && s[0] == '0') s.erase(0,1); } void strip_lfs(std::string &s) { while (!s.empty() && s[0] == '\n') s.erase(0,1); while (!s.empty() && s[s.length() - 1] == '\n') s.erase(s.length() - 1, 1); } std::string wordwrap(std::string &s, int cnt) { static std::string nustr; nustr.clear(); int cntr = 1; char c; for (size_t n = 0; n < s.length(); n++) { c = s[n]; if (c == '\n') {nustr += c; cntr = 1; } else if (c == ' ' && cntr >= cnt) { nustr += '\n'; cntr = 1; } else { nustr += c; cntr++; } } return nustr; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/xml_io.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000012573�12514200112�013563� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <cstdlib> #include <string> #include <vector> #include <queue> #include "flmsg.h" #include "flmsg_dialog.h" #include "xml_io.h" #include "XmlRpc.h" #include "status.h" #include "debug.h" #include "threads.h" using namespace std; using XmlRpc::XmlRpcValue; static bool exit_xmlrpc_flag = false; //static const double TIMEOUT = 1.0; // these are get only static const char* modem_get_name = "modem.get_name"; static const char* modem_get_names = "modem.get_names"; static const char* io_in_use = "io.in_use"; static const char* io_enable_arq = "io.enable_arq"; // these are set only static const char* modem_set_by_name = "modem.set_by_name"; static XmlRpc::XmlRpcClient* client; #define XMLRPC_UPDATE_INTERVAL 500 #define XMLRPC_UPDATE_AFTER_WRITE 2000 //===================================================================== // socket ops //===================================================================== static bool fldigi_online = false; static int update_interval = XMLRPC_UPDATE_INTERVAL; static string xmlcall = ""; void open_xmlrpc() { int server_port = atoi(progStatus.xmlrpc_port.c_str()); client = new XmlRpc::XmlRpcClient(progStatus.xmlrpc_addr.c_str(), server_port ); // XmlRpc::setVerbosity(5); // 0...5 } void close_xmlrpc() { pthread_mutex_lock(&mutex_xmlrpc); delete client; client = NULL; pthread_mutex_unlock(&mutex_xmlrpc); exit_xmlrpc_flag = true; pthread_join(*xmlrpc_thread, 0); } static inline void execute(const char* name, const XmlRpcValue& param, XmlRpcValue& result) { if (client) if (!client->execute(name, param, result)) { //, TIMEOUT)) { throw XmlRpc::XmlRpcException(name); fldigi_online = false; } } // -------------------------------------------------------------------- // send functions // -------------------------------------------------------------------- void send_new_modem() { pthread_mutex_lock(&mutex_xmlrpc); try { XmlRpcValue mode(cbo_modes->value()), res; execute(modem_set_by_name, mode, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s", e.getMessage().c_str()); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; pthread_mutex_unlock(&mutex_xmlrpc); } void enable_arq(void) { pthread_mutex_lock(&mutex_xmlrpc); try { XmlRpcValue res; execute(io_enable_arq, 0, res); } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s", e.getMessage().c_str()); } update_interval = XMLRPC_UPDATE_AFTER_WRITE; pthread_mutex_unlock(&mutex_xmlrpc); } // -------------------------------------------------------------------- // receive functions // -------------------------------------------------------------------- std::string get_io_mode(void) { XmlRpcValue status; XmlRpcValue query; static string response; pthread_mutex_lock(&mutex_xmlrpc); try { execute(io_in_use, query, status); string resp = status; response = resp; } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s", e.getMessage().c_str()); } pthread_mutex_unlock(&mutex_xmlrpc); return response; } static void set_combo(void *str) { if (!progStatus.sync_modem_to_fldigi) return; string s = (char *)str; if (s != cbo_modes->value() && valid_mode_check(s)) { cbo_modes->value(s.c_str()); estimate(); } } static void get_fldigi_modem() { XmlRpcValue status; XmlRpcValue query; static string response; try { execute(modem_get_name, query, status); string resp = status; response = resp; if (!response.empty()) { Fl::awake(set_combo, (void *)response.c_str()); } } catch (...) { // LOG_ERROR("%s", modem_get_name); throw; } } static void get_fldigi_modems() { XmlRpcValue status, query; try { string fldigi_modes(""); execute(modem_get_names, query, status); for (int i = 0; i < status.size(); i++) { fldigi_modes.append((std::string)status[i]).append("|"); } update_cbo_modes(fldigi_modes); fldigi_online = true; } catch (...) { // LOG_ERROR("%s", xmlcall.c_str()); throw; } } void * xmlrpc_loop(void *d) { fldigi_online = false; if(!client) MilliSleep(1000); exit_xmlrpc_flag = false; while(!exit_xmlrpc_flag) { pthread_mutex_lock(&mutex_xmlrpc); try { if(client) { if (fldigi_online) get_fldigi_modem(); else get_fldigi_modems(); } } catch (const XmlRpc::XmlRpcException& e) { // LOG_ERROR("%s", e.getMessage().c_str()); fldigi_online = false; } pthread_mutex_unlock(&mutex_xmlrpc); MilliSleep(update_interval); if (update_interval != XMLRPC_UPDATE_INTERVAL) update_interval = XMLRPC_UPDATE_INTERVAL; } return NULL; } �������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/timeops.cxx������������������������������������������������������������������0000664�0001750�0001750�00000012566�12330516146�013773� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // timeops.cxx // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "timeops.h" #ifdef __MINGW32__ # include "compat.h" #endif #if !HAVE_CLOCK_GETTIME # ifdef __APPLE__ # include <mach/mach_time.h> # endif # if TIME_WITH_SYS_TIME # include <sys/time.h> # endif # include <errno.h> int clock_gettime(clockid_t clock_id, struct timespec* tp) { if (clock_id == CLOCK_REALTIME) { struct timeval t; if (gettimeofday(&t, NULL) != 0) return -1; tp->tv_sec = t.tv_sec; tp->tv_nsec = t.tv_usec * 1000; } else if (clock_id == CLOCK_MONOTONIC) { #if defined(__WOE32__) int32_t msec = GetTickCount(); tp->tv_sec = msec / 1000; tp->tv_nsec = (msec % 1000) * 1000000; #elif defined(__APPLE__) static mach_timebase_info_data_t info = { 0, 0 }; if (info.denom == 0) mach_timebase_info(&info); uint64_t t = mach_absolute_time() * info.numer / info.denom; tp->tv_sec = t / 1000000000; tp->tv_nsec = t % 1000000000; #endif } else { errno = EINVAL; return -1; } return 0; } #endif // !HAVE_CLOCK_GETTIME struct timespec operator+(const struct timespec &t0, const double &t) { struct timespec r; r.tv_sec = t0.tv_sec + static_cast<time_t>(t); r.tv_nsec = t0.tv_nsec + static_cast<long>((t - static_cast<time_t>(t)) * 1e9); if (r.tv_nsec > 1000000000) { r.tv_nsec -= 1000000000; r.tv_sec++; } return r; } struct timespec operator-(const struct timespec &t0, const struct timespec &t1) { struct timespec r = t0; if (r.tv_nsec < t1.tv_nsec) { --r.tv_sec; r.tv_nsec += 1000000000L; } r.tv_sec -= t1.tv_sec; r.tv_nsec -= t1.tv_nsec; return r; } struct timespec& operator-=(struct timespec &t0, const struct timespec &t1) { if (t0.tv_nsec < t1.tv_nsec) { --t0.tv_sec; t0.tv_nsec += 1000000000L; } t0.tv_sec -= t1.tv_sec; t0.tv_nsec -= t1.tv_nsec; return t0; } bool operator>(const struct timespec &t0, const struct timespec &t1) { if (t0.tv_sec == t1.tv_sec) return t0.tv_nsec > t1.tv_nsec; else if (t0.tv_sec > t1.tv_sec) return true; else return false; } bool operator==(const struct timespec &t0, const struct timespec &t1) { return t0.tv_sec == t1.tv_sec && t0.tv_nsec == t1.tv_nsec; } struct timeval operator+(const struct timeval &t0, const double &t) { struct timeval r; r.tv_sec = t0.tv_sec + static_cast<time_t>(t); r.tv_usec = t0.tv_usec + static_cast<suseconds_t>((t - static_cast<time_t>(t)) * 1e9); if (r.tv_usec > 1000000) { r.tv_usec -= 1000000; r.tv_sec++; } return r; } struct timeval operator-(const struct timeval &t0, const struct timeval &t1) { struct timeval r = t0; if (r.tv_usec < t1.tv_usec) { --r.tv_sec; r.tv_usec += 1000000; } r.tv_sec -= t1.tv_sec; r.tv_usec -= t1.tv_usec; return r; } struct timeval& operator-=(struct timeval &t0, const struct timeval &t1) { if (t0.tv_usec < t1.tv_usec) { --t0.tv_sec; t0.tv_usec += 1000000L; } t0.tv_sec -= t1.tv_sec; t0.tv_usec -= t1.tv_usec; return t0; } bool operator>(const struct timeval &t0, const struct timeval &t1) { if (t0.tv_sec == t1.tv_sec) return t0.tv_usec > t1.tv_usec; else if (t0.tv_sec > t1.tv_sec) return true; else return false; } bool operator==(const struct timeval &t0, const struct timeval &t1) { return t0.tv_sec == t1.tv_sec && t0.tv_usec == t1.tv_usec; } #ifndef HAVE_GMTIME_R #include <pthread.h> static pthread_mutex_t gmtime_r_mutex = PTHREAD_MUTEX_INITIALIZER; struct tm *gmtime_r(const time_t *_Time, struct tm *_Tm) { pthread_mutex_lock (&gmtime_r_mutex); struct tm *p = gmtime(_Time); if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm)); pthread_mutex_unlock (&gmtime_r_mutex); return p; } static pthread_mutex_t gmtime_local_mutex = PTHREAD_MUTEX_INITIALIZER; struct tm *localtime_r(const time_t *_Time,struct tm *_Tm) { pthread_mutex_lock (&gmtime_local_mutex); struct tm *p = localtime(_Time); if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm)); pthread_mutex_unlock (&gmtime_local_mutex); return p; } #endif ������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/utils/mingw.c����������������������������������������������������������������������0000664�0001750�0001750�00000017020�12330516146�013042� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // mingw.c // // The following routines were copied from git-1.6.1.2/compat/mingw.c: // git_vsnprintf git_snprintf sleep mingw_getcwd mingw_getenv mingw_rename // // The uname routine was adapted from libgw32c 0.4. // // The rest: // Copyright (C) 2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <ctype.h> #include "compat.h" /* default mode for stdin, stdout and stderr */ unsigned int _CRT_fmode = _O_BINARY; /******************************************************************************/ /* * The size parameter specifies the available space, i.e. includes * the trailing NUL byte; but Windows's vsnprintf expects the * number of characters to write without the trailing NUL. */ #define SNPRINTF_SIZE_CORR 1 #undef vsnprintf int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap) { char *s; int ret = -1; if (maxsize > 0) { ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; /* Windows does not NUL-terminate if result fills buffer */ str[maxsize-1] = 0; } if (ret != -1) return ret; s = NULL; if (maxsize < 128) maxsize = 128; while (ret == -1) { maxsize *= 4; str = realloc(s, maxsize); if (! str) break; s = str; ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; } free(s); return ret; } int git_snprintf(char *str, size_t maxsize, const char *format, ...) { va_list ap; int ret; va_start(ap, format); ret = git_vsnprintf(str, maxsize, format, ap); va_end(ap); return ret; } unsigned sleep(unsigned seconds) { Sleep(seconds*1000); return 0; } #undef getcwd char *mingw_getcwd(char *pointer, int len) { int i; char *ret = getcwd(pointer, len); if (!ret) return ret; for (i = 0; pointer[i]; i++) if (pointer[i] == '\\') pointer[i] = '/'; return ret; } #undef getenv char *mingw_getenv(const char *name) { char *result = getenv(name); if (!result && !strcmp(name, "TMPDIR")) { /* on Windows it is TMP and TEMP */ result = getenv("TMP"); if (!result) result = getenv("TEMP"); } return result; } #undef rename int mingw_rename(const char *pold, const char *pnew) { DWORD attrs; /* * Try native rename() first to get errno right. * It is based on MoveFile(), which cannot overwrite existing files. */ if (!rename(pold, pnew)) return 0; if (errno != EEXIST) return -1; if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* TODO: translate more errors */ if (GetLastError() == ERROR_ACCESS_DENIED && (attrs = GetFileAttributes(pnew)) != INVALID_FILE_ATTRIBUTES) { if (attrs & FILE_ATTRIBUTE_DIRECTORY) { errno = EISDIR; return -1; } if ((attrs & FILE_ATTRIBUTE_READONLY) && SetFileAttributes(pnew, attrs & ~FILE_ATTRIBUTE_READONLY)) { if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* revert file attributes on failure */ SetFileAttributes(pnew, attrs); } } errno = EACCES; return -1; } /******************************************************************************/ __attribute__((constructor)) static void wsa_init(void) { WSADATA wsa; static int wsa_init_ = 0; if (wsa_init_) return; if (WSAStartup(MAKEWORD(2, 2), &wsa)) { fprintf(stderr, "unable to initialize winsock: error %d", WSAGetLastError()); exit(EXIT_FAILURE); } atexit((void(*)(void)) WSACleanup); wsa_init_ = 1; } int socketpair(int family, int type, int protocol, int *sv) { struct sockaddr_in addr; SOCKET sfd; int err, len = sizeof(addr); if (sv == NULL || family != AF_INET || type != SOCK_STREAM || protocol) { WSASetLastError(WSAEINVAL); return SOCKET_ERROR; } sv[0] = sv[1] = INVALID_SOCKET; if ((sfd = socket(family, type, 0)) == INVALID_SOCKET) return SOCKET_ERROR; memset(&addr, 0, sizeof(addr)); addr.sin_family = family; addr.sin_addr.s_addr = inet_addr("127.0.0.1"); addr.sin_port = 0; /* any port */ if ((err = bind(sfd, (const struct sockaddr*)&addr, sizeof(addr))) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } if ((err = getsockname(sfd, (struct sockaddr*)&addr, &len)) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } do { if (listen(sfd, 1) == SOCKET_ERROR) break; if ((sv[0] = WSASocket(family, type, 0, NULL, 0, 0)) == INVALID_SOCKET) break; if (connect(sv[0], (const struct sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) break; if ((sv[1] = accept(sfd, NULL, NULL)) == INVALID_SOCKET) break; closesocket(sfd); return 0; } while (0); /* error */ err = WSAGetLastError(); closesocket(sfd); closesocket(sv[0]); closesocket(sv[1]); WSASetLastError(err); return SOCKET_ERROR; } /******************************************************************************/ int nanosleep(const struct timespec *req, struct timespec *rem) { if (req->tv_nsec < 0 || req->tv_nsec < 0L || req->tv_nsec > 999999999L) { errno = EINVAL; return -1; } Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000L); if (rem) { rem->tv_sec = 0; rem->tv_nsec = 0L; } return 0; } BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version); BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName); int uname(struct utsname *name) { char processor[1024]; if (name == NULL) { errno = EINVAL; return -1; } if (gethostname(name->nodename, sizeof(name->nodename)) < 0) { name->nodename[0] = '\0'; errno = ENOSYS; return -1; } if (!GetOsInfo(name->sysname, name->release, name->version)) { strncpy (name->sysname, "win32", sizeof (name->sysname)); strncpy (name->release, "unknown", sizeof (name->release)); strncpy (name->version, "unknown", sizeof (name->version)); } /* "windows32" is as yet the only universal windows description allowed by config.guess and config.sub */ strncpy(name->sysname, "windows32", sizeof (name->sysname)); if (!GetMachInfo(name->machine, processor)) strncpy(name->machine, "i386", sizeof (name->machine)); return 0; } int getrusage(int who, struct rusage *usage) { FILETIME ct, et, kt, ut; ULARGE_INTEGER uli; if (who != RUSAGE_SELF) { errno = EINVAL; return -1; } if (!usage) { errno = EFAULT; return -1; } if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { errno = ENOENT; return -1; } // FILETIMEs use 100-ns units memcpy(&uli, &kt, sizeof(FILETIME)); usage->ru_stime.tv_sec = uli.QuadPart / 10000000L; usage->ru_stime.tv_usec = uli.QuadPart % 10000000L; memcpy(&uli, &ut, sizeof(FILETIME)); usage->ru_utime.tv_sec = uli.QuadPart / 10000000L; usage->ru_utime.tv_usec = uli.QuadPart % 10000000L; return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�012343� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/dnd_tab.cxx��������������������������������������������������������������0000664�0001750�0001750�00000003531�12330516146�014370� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_dnd = (Fl_Group *)0; Fl_Input *drop_box = (Fl_Input *)0; static void cb_drop_box(Fl_Input*, void*) { drop_box_changed(); } void create_dnd_tab() { tab_dnd = new Fl_Group(0, tab_top, 570, 380); Fl_Box *b = new Fl_Box(50, 50, 470, 80, _( "flmsg data files, wrapped data files and/or\n\ data file text may be imported.")); b->box(FL_FLAT_BOX); b->align(FL_ALIGN_CENTER); drop_box = new Fl_Input(175, 135, 220, 220, _("^Drop Text/File Here^")); drop_box->callback((Fl_Callback*)cb_drop_box); drop_box->box(FL_DOWN_BOX); drop_box->value(""); drop_box->labeltype(FL_NORMAL_LABEL); drop_box->labelfont(0); drop_box->labelsize(16); drop_box->color((Fl_Color)FL_BACKGROUND2_COLOR); drop_box->selection_color((Fl_Color)FL_SELECTION_COLOR); drop_box->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); drop_box->when(FL_WHEN_CHANGED); tab_dnd->end(); tab_dnd->hide(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/blank.cxx����������������������������������������������������������������0000664�0001750�0001750�00000024411�12330516146�014064� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #include "icons.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // blankform fields string blankbuffer; string def_blank_filename = ""; string base_blank_filename = ""; string def_blank_TemplateName = ""; string blank_msg = ":mg:"; string ablank_msg = "<mg:"; string blank_field; bool using_blank_template = false; void clear_blankfields() { blank_field.clear(); } bool check_blankfields() { return (blank_field != txt_blank_msg->buffer()->text()); } void update_blankfields() { blank_field = txt_blank_msg->buffer()->text(); } void clear_blank_form() { clear_blankfields(); txt_blank_msg->clear(); } void update_blankform() { txt_blank_msg->clear(); txt_blank_msg->add(blank_field.c_str()); } void read_blankbuffer(string data) { clear_blankfields(); read_header(data); blank_field = findstr(data, blank_msg); if (blank_field.empty()) blank_field = findstr(data, ablank_msg); // test for old style data file update_blankform(); } void cb_blank_new() { if (check_blankfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_blank_save(); } } clear_blank_form(); clear_header(); def_blank_filename = ICS_msg_dir; def_blank_filename.append("new"BLANKFILE_EXT); show_filename(def_blank_filename); using_blank_template = false; } void cb_blank_import() { fl_alert2("Not implemented"); } void cb_blank_export() { fl_alert2("Not implemented"); } void cb_blank_wrap_import(string wrapfilename, string inpbuffer) { clear_blank_form(); read_blankbuffer(inpbuffer); def_blank_filename = ICS_msg_dir; def_blank_filename.append(wrapfilename); show_filename(def_blank_filename); using_blank_template = false; } int eval_blank_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_blank_filename).append("]"); update_blankfields(); update_header(FROM); evalstr.append(header("<blankform>")); string outbuf = lineout( blank_msg, blank_field ); if (outbuf.empty()) return 0; compress_maybe( outbuf ); evalstr.append( outbuf ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_blank_wrap_export() { if (check_blankfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_blankfields(); if (blank_field.empty()) return; if (base_blank_filename == "new"BLANKFILE_EXT || base_blank_filename == "default"BLANKFILE_EXT) if (!cb_blank_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_blank_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); blankbuffer.assign(header("<blankform>")); string outbuf = lineout( blank_msg, blank_field ); compress_maybe( outbuf ); blankbuffer.append( outbuf ); export_wrapfile(base_blank_filename, wrapfilename, blankbuffer, pext != WRAP_EXT); blankbuffer.assign(header("<blankform>")).append(lineout( blank_msg, blank_field )); write_blank(def_blank_filename); } } void cb_blank_wrap_autosend() { if (check_blankfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_blankfields(); if (blank_field.empty()) return; if (base_blank_filename == "new"BLANKFILE_EXT || base_blank_filename == "default"BLANKFILE_EXT) if (!cb_blank_save_as()) return; update_header(FROM); blankbuffer.assign(header("<blankform>")); string outbuf = lineout( blank_msg, blank_field ); compress_maybe( outbuf ); blankbuffer.append( outbuf ); xfr_via_socket(base_blank_filename, blankbuffer); blankbuffer.assign(header("<blankform>")).append(lineout( blank_msg, blank_field )); write_blank(def_blank_filename); } void cb_blank_load_template() { string def_blank_filename = def_blank_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"BLANKTEMP_EXT, def_blank_filename.c_str()); if (p) { clear_blank_form(); read_data_file(p); def_blank_TemplateName = p; show_filename(def_blank_TemplateName); using_blank_template = true; } } void cb_blank_save_template() { if (!using_blank_template) { cb_blank_save_as_template(); return; } string def_blank_filename = def_blank_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"BLANKTEMP_EXT, def_blank_filename.c_str()); if (p) { update_header(CHANGED); write_blank(p); } } void cb_blank_save_as_template() { string def_blank_filename = def_blank_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"BLANKTEMP_EXT, def_blank_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_blank_TemplateName = p; if (strlen(pext) == 0) def_blank_TemplateName.append(BLANKTEMP_EXT); remove_spaces_from_filename(def_blank_TemplateName); clear_header(); update_header(CHANGED); write_blank(def_blank_TemplateName); show_filename(def_blank_TemplateName); using_blank_template = true; } } void cb_blank_open() { const char *p = FSEL::select(_("Open data file"), "blank form\t*.b2s", def_blank_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_blank_form(); read_data_file(p); using_blank_template = false; def_blank_filename = p; show_filename(def_blank_filename); } void write_blank(string s) { FILE *blankfile = fopen(s.c_str(), "w"); if (!blankfile) return; fwrite(blankbuffer.c_str(), blankbuffer.length(), 1, blankfile); fclose(blankfile); } bool cb_blank_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(".b2s"); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_blank_filename; p = FSEL::saveas(_("Save data file"), "blank form\t*.b2s", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_blank_filename = p; if (strlen(pext) == 0) def_blank_filename.append(".b2s"); remove_spaces_from_filename(def_blank_filename); update_header(NEW); update_blankfields(); blankbuffer.assign(header("<blankform>")); blankbuffer.append( lineout( blank_msg, blank_field ) ); write_blank(def_blank_filename); using_blank_template = false; show_filename(def_blank_filename); return true; } void cb_blank_save() { if (base_blank_filename == "new.b2s" || base_blank_filename == "default.b2s" || using_blank_template == true) { cb_blank_save_as(); return; } if (check_blankfields()) update_header(CHANGED); update_blankfields(); blankbuffer.assign(header("<blankform>")); blankbuffer.append( lineout( blank_msg, blank_field ) ); write_blank(def_blank_filename); using_blank_template = false; } void cb_blank_msg_type() { if (tabs_msg_type->value() == tab_blank ) { show_filename(def_blank_filename); } else { show_filename(def_rg_filename); } } void cb_blank_html() { update_blankfields(); // if (blank_field.empty()) return; string fname_name = fl_filename_name(def_blank_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string blank_name = ICS_dir; string html_text = ""; blank_name.append(fname_name); blank_name.append(".html"); string blankform = blank_html_template; html_text = "<pre><big style= font-family: \"Consolas\", \"Monospace\", \"Courier\";\">"; if (progStatus.autowordwrap) html_text.append(wordwrap(blank_field, progStatus.charcount)); else html_text.append(blank_field); html_text.append("</big></pre>"); replacestr(blankform, blank_msg, html_text); FILE *blankfile = fopen(blank_name.c_str(), "w"); fprintf(blankfile,"%s", blankform.c_str()); fclose(blankfile); open_url(blank_name.c_str()); } void cb_blank_textout() { string blank_name = ICS_dir; blank_name.append("blankform.txt"); update_blankfields(); string blankform = blank_txt_template; replacestr(blankform, blank_msg, blank_field); FILE *blankfile = fopen(blank_name.c_str(), "w"); fprintf(blankfile,"%s", blankform.c_str()); fclose(blankfile); open_url(blank_name.c_str()); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/blank_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000003456�12330516146�014720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_blank = (Fl_Group *)0; FTextEdit *txt_blank_msg = (FTextEdit *)0; static void blank_changed(FTextEdit*, void*) { estimate(); } void create_blank_tab() { tab_blank = new Fl_Group(0, tab_top, 570, 380); tab_blank->align(FL_ALIGN_TOP); txt_blank_msg = new FTextEdit(4, 50, 562, 370); txt_blank_msg->box(FL_DOWN_FRAME); txt_blank_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_blank_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_blank_msg->labeltype(FL_NORMAL_LABEL); txt_blank_msg->labelfont(0); txt_blank_msg->labelsize(14); txt_blank_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_blank_msg->align(FL_ALIGN_TOP_LEFT); txt_blank_msg->callback((Fl_Callback*)blank_changed); txt_blank_msg->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(txt_blank_msg); tab_blank->end(); tab_blank->hide(); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/blank_templates.cxx������������������������������������������������������0000664�0001750�0001750�00000002516�12330516146�016144� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char blank_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title></head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr>\ <td COLSPAN=3 VALIGN=top>:mg:<br>\ </td>\ </tr>\ </table>\ </body></html>"; const char blank_txt_template[] = ":mg:"; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/blank-dnd/baddata_templates.cxx����������������������������������������������������0000664�0001750�0001750�00000002447�12330516146�016440� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char baddata_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title></head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr>\ <td COLSPAN=3 VALIGN=top><txt:<br>\ </td>\ </tr>\ </table>\ </body></html>"; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/cap/�������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�011254� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/cap/cap105_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000032510�12330516146�013524� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "combo.h" Fl_Group *tab_cap105 = (Fl_Group *)0; Fl_Tabs *tabs_cap105 = (Fl_Tabs *)0; Fl_Group *tab_cap105_message = (Fl_Group *)0; Fl_Group *tab_cap105_information = (Fl_Group *)0; Fl_Input2 *cap105_txt_nbr = (Fl_Input2 *)0; Fl_ListBox *cap105_sel_prec = (Fl_ListBox *)0; Fl_Input2 *cap105_txt_dtm = (Fl_Input2 *)0; Fl_Button *cap105_btn_dtm = (Fl_Button *)0; Fl_Input2 *cap105_txt_from = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_to = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_info = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_subj = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_grpcnt = (Fl_Input2 *)0; Fl_Button *cap105_btn_check = (Fl_Button *)0; FTextEdit *cap105_txt_msg = (FTextEdit *)0; Fl_Input2 *cap105_txt_rcvd_fm = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_rcvd_dtm = (Fl_Input2 *)0; Fl_Button *cap105_btn_rcvd_dtm = (Fl_Button *)0; Fl_Input2 *cap105_txt_sent_to = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_sent_dtm = (Fl_Input2 *)0; Fl_Button *cap105_btn_sent_dtm = (Fl_Button *)0; Fl_Input2 *cap105_txt_rcvop = (Fl_Input2 *)0; Fl_Input2 *cap105_txt_sendop = (Fl_Input2 *)0; static void cb_cap105_txt_nbr(Fl_Input2*, void*) { cap105_cb_nbr(cap105_txt_nbr); estimate(); } static void cb_cap105_txt_from(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_from); estimate(); } static void cb_cap105_txt_to(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_to); estimate(); } static void cb_cap105_txt_info(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_info); estimate(); } static void cb_cap105_txt_subj(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_subj); estimate(); } static void cb_cap105_txt_rcvop(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_rcvop); estimate(); } static void cb_cap105_txt_sendop(Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_sendop); estimate(); } static void cb_cap105_txt_rcvd_fm (Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_rcvd_fm); estimate(); } static void cb_cap105_txt_sent_to (Fl_Input2*, void*) { cap105_cb_filter_input(cap105_txt_sent_to); estimate(); } static void cb_cap105_btn_dtm(Fl_Button*, void*) { cap105_cb_set_dtm(); estimate(); } static void cb_cap105_btn_rcvd_dtm(Fl_Button*, void*) { cap105_cb_set_rcvd_dtm(); estimate(); } static void cb_cap105_btn_sent_dtm(Fl_Button*, void*) { cap105_cb_set_sent_dtm(); estimate(); } static void cb_cap105_txt_msg(FTextEdit*, void*) { cap105_btn_check->labelcolor(FL_RED); cap105_btn_check->redraw_label(); estimate(); } static void cb_cap105_btn_check(Fl_Button*, void*) { cap105_cb_check(); } void cap105_changed(Fl_Widget *, void *) { estimate(); } void create_cap105_tab() { int Y = tab_top; tab_cap105 = new Fl_Group(0, Y, 570, 404); tab_cap105->align(FL_ALIGN_TOP); Y += 4; cap105_txt_nbr = new Fl_Input2(80, Y, 80, 22, _("MSG NR:")); cap105_txt_nbr->tooltip(_("* Optional Field\nMessage number at station of origin")); cap105_txt_nbr->box(FL_DOWN_BOX); cap105_txt_nbr->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_nbr->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_nbr->labeltype(FL_NORMAL_LABEL); cap105_txt_nbr->labelfont(0); cap105_txt_nbr->labelsize(14); cap105_txt_nbr->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_nbr->callback((Fl_Callback*)cb_cap105_txt_nbr); cap105_txt_nbr->align(FL_ALIGN_LEFT); cap105_txt_nbr->callback(cap105_changed); cap105_txt_nbr->when(FL_WHEN_CHANGED); Y += 24; cap105_sel_prec = new Fl_ListBox(80, Y, 120, 22, _("PREC")); cap105_sel_prec->tooltip(_("Message Precedence")); cap105_sel_prec->align(FL_ALIGN_LEFT); Y += 24; cap105_txt_dtm = new Fl_Input2(80, Y, 160, 22, _("DTG:")); cap105_txt_dtm->tooltip(_("Date of filing")); cap105_txt_dtm->box(FL_DOWN_BOX); cap105_txt_dtm->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_dtm->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_dtm->labeltype(FL_NORMAL_LABEL); cap105_txt_dtm->labelfont(0); cap105_txt_dtm->labelsize(14); cap105_txt_dtm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_dtm->align(FL_ALIGN_LEFT); cap105_txt_dtm->callback(cap105_changed); cap105_txt_dtm->when(FL_WHEN_CHANGED); cap105_btn_dtm = new Fl_Button(244, Y, 20, 20, _("...")); cap105_btn_dtm->tooltip(_("Today's date time group")); cap105_btn_dtm->callback((Fl_Callback*)cb_cap105_btn_dtm); Y += 24; cap105_txt_from = new Fl_Input2(80, Y, 250, 22, _("FROM:")); cap105_txt_from->tooltip(_("Station call sign / name")); cap105_txt_from->box(FL_DOWN_BOX); cap105_txt_from->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_from->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_from->labeltype(FL_NORMAL_LABEL); cap105_txt_from->labelfont(0); cap105_txt_from->labelsize(14); cap105_txt_from->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_from->callback((Fl_Callback*)cb_cap105_txt_from); cap105_txt_from->align(FL_ALIGN_LEFT); cap105_txt_from->when(FL_WHEN_CHANGED); Y += 24; cap105_txt_to = new Fl_Input2(80, Y, 486, 22, _("TO")); cap105_txt_to->tooltip(_("Addressee")); cap105_txt_to->type(4); cap105_txt_to->box(FL_DOWN_BOX); cap105_txt_to->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_to->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_to->labeltype(FL_NORMAL_LABEL); cap105_txt_to->labelfont(0); cap105_txt_to->labelsize(14); cap105_txt_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_to->callback((Fl_Callback*)cb_cap105_txt_to); cap105_txt_to->align(FL_ALIGN_LEFT); cap105_txt_to->when(FL_WHEN_CHANGED); Y += 24; cap105_txt_info = new Fl_Input2(80, Y, 486, 22, _("INFO:")); cap105_txt_info->tooltip(_("* Optional Field\nInfo addressee(s)")); cap105_txt_info->type(4); cap105_txt_info->box(FL_DOWN_BOX); cap105_txt_info->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_info->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_info->labeltype(FL_NORMAL_LABEL); cap105_txt_info->labelfont(0); cap105_txt_info->labelsize(14); cap105_txt_info->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_info->callback((Fl_Callback*)cb_cap105_txt_info); cap105_txt_info->align(FL_ALIGN_LEFT); cap105_txt_info->when(FL_WHEN_CHANGED); Y += 24; cap105_txt_subj = new Fl_Input2(80, Y, 486, 22, _("SUBJ:")); cap105_txt_subj->tooltip(_("* Optional Field\nMessage subject")); cap105_txt_subj->type(4); cap105_txt_subj->box(FL_DOWN_BOX); cap105_txt_subj->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_subj->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_subj->labeltype(FL_NORMAL_LABEL); cap105_txt_subj->labelfont(0); cap105_txt_subj->labelsize(14); cap105_txt_subj->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_subj->callback((Fl_Callback*)cb_cap105_txt_subj); cap105_txt_subj->align(FL_ALIGN_LEFT); cap105_txt_subj->when(FL_WHEN_CHANGED); Y += 24; cap105_txt_grpcnt = new Fl_Input2(488, Y, 50, 22, _("GROUP COUNT")); cap105_txt_grpcnt->tooltip(_("* Optional Field\n# words in message")); cap105_txt_grpcnt->box(FL_DOWN_BOX); cap105_txt_grpcnt->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_grpcnt->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_grpcnt->labeltype(FL_NORMAL_LABEL); cap105_txt_grpcnt->labelfont(0); cap105_txt_grpcnt->labelsize(14); cap105_txt_grpcnt->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_grpcnt->align(FL_ALIGN_LEFT); cap105_txt_grpcnt->callback(cap105_changed); cap105_txt_grpcnt->when(FL_WHEN_CHANGED); cap105_btn_check = new Fl_Button(544, Y, 22, 22, _("ck")); cap105_btn_check->tooltip(_("* Optional Field\nCompute group count")); cap105_btn_check->callback((Fl_Callback*)cb_cap105_btn_check); Y += 24; cap105_txt_msg = new FTextEdit(4, Y, 562, 118, _("MESSAGE")); cap105_txt_msg->tooltip(_("Message contents")); cap105_txt_msg->box(FL_DOWN_BOX); cap105_txt_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_msg->labeltype(FL_NORMAL_LABEL); cap105_txt_msg->labelfont(0); cap105_txt_msg->labelsize(14); cap105_txt_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_msg->callback((Fl_Callback*)cb_cap105_txt_msg); cap105_txt_msg->align(FL_ALIGN_TOP_LEFT); cap105_txt_msg->callback(cap105_changed); cap105_txt_msg->when(FL_WHEN_CHANGED); Y += 122; cap105_txt_rcvd_fm = new Fl_Input2(60, Y, 220, 22, _("FROM:")); cap105_txt_rcvd_fm->tooltip(_("Call sign of sender")); cap105_txt_rcvd_fm->box(FL_DOWN_BOX); cap105_txt_rcvd_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_rcvd_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_rcvd_fm->labeltype(FL_NORMAL_LABEL); cap105_txt_rcvd_fm->labelfont(0); cap105_txt_rcvd_fm->labelsize(14); cap105_txt_rcvd_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_rcvd_fm->align(FL_ALIGN_LEFT); cap105_txt_rcvd_fm->callback((Fl_Callback*)cb_cap105_txt_rcvd_fm); cap105_txt_rcvd_fm->when(FL_WHEN_CHANGED); cap105_txt_sent_to = new Fl_Input2(336, Y, 220, 22, _("TO:")); cap105_txt_sent_to->tooltip(_("Call sign of sender")); cap105_txt_sent_to->box(FL_DOWN_BOX); cap105_txt_sent_to->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_sent_to->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_sent_to->labeltype(FL_NORMAL_LABEL); cap105_txt_sent_to->labelfont(0); cap105_txt_sent_to->labelsize(14); cap105_txt_sent_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_sent_to->align(FL_ALIGN_LEFT); cap105_txt_sent_to->callback((Fl_Callback*)cb_cap105_txt_sent_to); cap105_txt_sent_to->when(FL_WHEN_CHANGED); Y += 24; cap105_txt_rcvd_dtm = new Fl_Input2(60, Y, 160, 22, _("DTG:")); cap105_txt_rcvd_dtm->tooltip(_("date of receipt")); cap105_txt_rcvd_dtm->box(FL_DOWN_BOX); cap105_txt_rcvd_dtm->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_rcvd_dtm->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_rcvd_dtm->labeltype(FL_NORMAL_LABEL); cap105_txt_rcvd_dtm->labelfont(0); cap105_txt_rcvd_dtm->labelsize(14); cap105_txt_rcvd_dtm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_rcvd_dtm->align(FL_ALIGN_LEFT); cap105_txt_rcvd_dtm->callback(cap105_changed); cap105_txt_rcvd_dtm->when(FL_WHEN_CHANGED); cap105_btn_rcvd_dtm = new Fl_Button(224, Y, 20, 20, _("...")); cap105_btn_rcvd_dtm->tooltip(_("Today's date time group")); cap105_btn_rcvd_dtm->callback((Fl_Callback*)cb_cap105_btn_rcvd_dtm); cap105_txt_sent_dtm = new Fl_Input2(336, Y, 160, 22, _("DTG:")); cap105_txt_sent_dtm->tooltip(_("date of receipt")); cap105_txt_sent_dtm->box(FL_DOWN_BOX); cap105_txt_sent_dtm->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_sent_dtm->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_sent_dtm->labeltype(FL_NORMAL_LABEL); cap105_txt_sent_dtm->labelfont(0); cap105_txt_sent_dtm->labelsize(14); cap105_txt_sent_dtm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_sent_dtm->align(FL_ALIGN_LEFT); cap105_txt_sent_dtm->callback(cap105_changed); cap105_txt_sent_dtm->when(FL_WHEN_CHANGED); cap105_btn_sent_dtm = new Fl_Button(500, Y, 20, 20, _("...")); cap105_btn_sent_dtm->tooltip(_("Today's date time group")); cap105_btn_sent_dtm->callback((Fl_Callback*)cb_cap105_btn_sent_dtm); Y += 24; cap105_txt_rcvop = new Fl_Input2(200, Y, 80, 22, _("RCVG OPERATOR INIT'S:")); cap105_txt_rcvop->tooltip(_("")); cap105_txt_rcvop->box(FL_DOWN_BOX); cap105_txt_rcvop->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_rcvop->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_rcvop->labeltype(FL_NORMAL_LABEL); cap105_txt_rcvop->labelfont(0); cap105_txt_rcvop->labelsize(14); cap105_txt_rcvop->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_rcvop->align(FL_ALIGN_LEFT); cap105_txt_rcvop->callback((Fl_Callback*)cb_cap105_txt_rcvop); cap105_txt_rcvop->when(FL_WHEN_CHANGED); cap105_txt_sendop = new Fl_Input2(476, Y, 80, 22, _("SNDG OPERATOR INIT'S:")); cap105_txt_sendop->tooltip(_("")); cap105_txt_sendop->box(FL_DOWN_BOX); cap105_txt_sendop->color((Fl_Color)FL_BACKGROUND2_COLOR); cap105_txt_sendop->selection_color((Fl_Color)FL_SELECTION_COLOR); cap105_txt_sendop->labeltype(FL_NORMAL_LABEL); cap105_txt_sendop->labelfont(0); cap105_txt_sendop->labelsize(14); cap105_txt_sendop->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); cap105_txt_sendop->align(FL_ALIGN_LEFT); cap105_txt_sendop->callback((Fl_Callback*)cb_cap105_txt_sendop); cap105_txt_sendop->when(FL_WHEN_CHANGED); tab_cap105->end(); tab_cap105->hide(); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/cap/cap105.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000046506�12330516146�012710� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string cap105_base_filename = ""; string cap105_def_filename = ""; string cap105_def_template_name = ""; static string cap105_buffer; // cap105 cap105_fields const char *cap105_s_prec[] = {"ROUTINE","PRIORITY","IMMEDIATE","FLASH"}; const char cap105_prec_items[] = "ROUTINE|PRIORITY|IMMEDIATE|FLASH"; string cap105_nbr = ":msg nbr:"; string cap105_prec = ":prec:"; string cap105_dtm = ":dtm:"; string cap105_from = ":from:"; string cap105_to = ":to:"; string cap105_info = ":info:"; string cap105_subj = ":subj:"; string cap105_grpcnt = ":grpcnt:"; string cap105_msg = ":msgtxt:"; string cap105_rcvd_fm = ":rcvd_fm:"; string cap105_sent_to = ":sent_to:"; string cap105_rcvd_dtm = ":rcvd_dtm:"; string cap105_sent_dtm = ":sent_dtm:"; string cap105_rcvop = ":rcvop:"; string cap105_sendop = ":sendop:"; //struct FIELD { string f_type; string f_data; void **w; char w_type; }; FIELD cap105_fields[] = { { cap105_nbr, "", (void **)&cap105_txt_nbr, 't' }, // 0 { cap105_prec, "", (void **)&cap105_sel_prec, 's' }, // 1 { cap105_dtm, "", (void **)&cap105_txt_dtm, 't' }, // 2 { cap105_from, "", (void **)&cap105_txt_from, 't' }, // 3 { cap105_to, "", (void **)&cap105_txt_to, 't' }, // 4 { cap105_info, "", (void **)&cap105_txt_info, 't' }, // 5 { cap105_subj, "", (void **)&cap105_txt_subj, 't' }, // 6 { cap105_grpcnt, "", (void **)&cap105_txt_grpcnt, 't' }, // 7 { cap105_msg, "", (void **)&cap105_txt_msg, 'e' }, // 8 { cap105_rcvd_fm, "", (void **)&cap105_txt_rcvd_fm, 't' }, // 9 { cap105_sent_to, "", (void **)&cap105_txt_sent_to, 't' }, // 10 { cap105_rcvd_dtm, "", (void **)&cap105_txt_rcvd_dtm, 't' }, // 11 { cap105_sent_dtm, "", (void **)&cap105_txt_sent_dtm, 't' }, // 12 { cap105_rcvop, "", (void **)&cap105_txt_rcvop, 't' }, // 13 { cap105_sendop, "", (void **)&cap105_txt_sendop, 't' }, // 14 }; bool cap105_using_template = false; int cap105_num_fields = sizeof(cap105_fields) / sizeof(FIELD); //====================================================================== void cap105_cb_set_dtm() { cap105_txt_dtm->value(szCAPDateTime()); } void cap105_cb_set_rcvd_dtm() { cap105_txt_rcvd_dtm->value(szCAPDateTime()); } void cap105_cb_set_sent_dtm() { cap105_txt_sent_dtm->value(szCAPDateTime()); } void cap105_cb_nbr(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; string s = inp->value(); for (size_t n = 0; n < s.length(); n++) if (!isdigit(s[n])) s.erase(n,1); strip_leading_zeros(s); inp->value(s.c_str()); } static char valid_input[] = "0123456789/,; ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"; void cap105_cb_filter_input(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; string s = inp->value(); ucase(s); for (size_t n = 0; n < s.length(); n++) if (strchr(valid_input, s[n]) == NULL) s.erase(n,1); inp->value(s.c_str()); } void cap105_clear_fields() { for (int i = 0; i < cap105_num_fields; i++) cap105_fields[i].f_data.clear(); } static string numeric(int n) { static char snum[10]; snprintf(snum, sizeof(snum), "%d", n); return snum; } void cap105_set_choices() { cap105_sel_prec->clear(); cap105_sel_prec->add(cap105_prec_items); cap105_sel_prec->index(0); } bool cap105_check_fields() { for (int i = 0; i < cap105_num_fields; i++) { if (cap105_fields[i].w_type == 'd') { if (cap105_fields[i].f_data != ((Fl_DateInput *)(*cap105_fields[i].w))->value()) return true; } else if (cap105_fields[i].w_type == 't') { if (cap105_fields[i].f_data != ((Fl_Input2 *)(*cap105_fields[i].w))->value()) return true; } else if (cap105_fields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*cap105_fields[i].w))->index(); if (choice >= 0) { if (cap105_fields[i].f_data != numeric(choice)) return true; } } else if (cap105_fields[i].w_type == 'e') { if (cap105_fields[i].f_data != ((FTextEdit *)(*cap105_fields[i].w))->buffer()->text()) return true; } else if (cap105_fields[i].w_type == 'b') { string val = ((Fl_Button *)(*cap105_fields[i].w))->value() ? "T" : "F"; if (cap105_fields[i].f_data != val) return true; } } return false; } void cap105_update_fields() { for (int i = 0; i < cap105_num_fields; i++) { if (cap105_fields[i].w_type == 'd') { cap105_fields[i].f_data = ((Fl_DateInput *)(*cap105_fields[i].w))->value(); } else if (cap105_fields[i].w_type == 't') { cap105_fields[i].f_data = ((Fl_Input2 *)(*cap105_fields[i].w))->value(); } else if (cap105_fields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*cap105_fields[i].w))->index(); if (choice >= 0) { cap105_fields[i].f_data = numeric(choice); } } else if (cap105_fields[i].w_type == 'e') { cap105_fields[i].f_data = ((FTextEdit *)(*cap105_fields[i].w))->buffer()->text(); } else if (cap105_fields[i].w_type == 'b') { string val = ((Fl_Button *)(*cap105_fields[i].w))->value() ? "T" : "F"; cap105_fields[i].f_data = val; } } } void cap105_clear_form() { cap105_clear_fields(); if (progStatus.rgnbr_fname) cap105_txt_nbr->value(progStatus.rgnbr.c_str()); else cap105_txt_nbr->value(""); for (int i = 1; i < cap105_num_fields; i++) if (cap105_fields[i].w_type == 'd') ((Fl_DateInput *)(*cap105_fields[i].w))->value(""); else if (cap105_fields[i].w_type == 't') ((Fl_Input2 *)(*cap105_fields[i].w))->value(""); else if (cap105_fields[i].w_type == 's') ((Fl_ListBox *)(*cap105_fields[i].w))->index(0); else if (cap105_fields[i].w_type == 'e') ((FTextEdit *)(*cap105_fields[i].w))->clear(); else if (cap105_fields[i].w_type == 'b') ((Fl_Button *)(*cap105_fields[i].w))->value(0); cap105_update_fields(); } void cap105_update_form() { for (int i = 0; i < cap105_num_fields; i++) { if (cap105_fields[i].w_type == 'd') ((Fl_DateInput *)(*cap105_fields[i].w))->value(cap105_fields[i].f_data.c_str()); else if (cap105_fields[i].w_type == 't') ((Fl_Input2 *)(*cap105_fields[i].w))->value(cap105_fields[i].f_data.c_str()); else if (cap105_fields[i].w_type == 's') ((Fl_ListBox *)(*cap105_fields[i].w))->index(atoi(cap105_fields[i].f_data.c_str())); else if (cap105_fields[i].w_type == 'e') { ((FTextEdit *)(*cap105_fields[i].w))->clear(); ((FTextEdit *)(*cap105_fields[i].w))->add(cap105_fields[i].f_data.c_str()); } else if (cap105_fields[i].w_type == 'b') ((Fl_Button *)(*cap105_fields[i].w))->value(cap105_fields[i].f_data == "T" ? 1 : 0); } } void cap105_make_buffer(bool compress) { string mbuff; mbuff.clear(); for (int i = 0; i < cap105_num_fields; i++) mbuff.append( lineout( cap105_fields[i].f_type, cap105_fields[i].f_data ) ); if (compress) compress_maybe(mbuff); cap105_buffer.append(mbuff); } void cap105_read_buffer(string data) { clear_fields(); read_header(data); for (int i = 0; i < cap105_num_fields; i++) cap105_fields[i].f_data = findstr(data, cap105_fields[i].f_type); cap105_update_form(); } void cap105_cb_new() { if (cap105_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cap105_cb_save(); } } cap105_update_fields(); cap105_clear_form(); clear_header(); cap105_def_filename = ICS_msg_dir; cap105_def_filename.append("new"CAP105_FILE_EXT); cap105_using_template = false; show_filename(cap105_def_filename); } void cap105_cb_import() { fl_alert2("Not implemented"); } void cap105_cb_export() { fl_alert2("Not implemented"); } void cap105_cb_wrap_import(string wrapfilename, string inpbuffer) { cap105_clear_form(); cap105_read_buffer(inpbuffer); cap105_def_filename = ICS_msg_dir; cap105_def_filename.append(wrapfilename); show_filename(cap105_def_filename); cap105_using_template = false; } int eval_cap105_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(cap105_base_filename).append("]"); cap105_update_fields(); update_header(FROM); evalstr.append(header("<cap105>")); cap105_buffer.clear(); cap105_make_buffer(true); if (cap105_buffer.empty()) return 0; evalstr.append( cap105_buffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cap105_cb_wrap_export() { if (cap105_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } cap105_update_fields(); if (cap105_base_filename == "new"CAP105_FILE_EXT || cap105_base_filename == "default"CAP105_FILE_EXT) if (!cap105_cb_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(cap105_base_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrapped cap105 file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(true); export_wrapfile(cap105_base_filename, wrapfilename, cap105_buffer, pext != WRAP_EXT); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(false); cap105_write(cap105_def_filename); } } void cap105_cb_wrap_autosend() { if (cap105_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } cap105_update_fields(); if (cap105_base_filename == "new"CAP105_FILE_EXT || cap105_base_filename == "default"CAP105_FILE_EXT) if (!cap105_cb_save_as()) return; update_header(FROM); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(true); xfr_via_socket(cap105_base_filename, cap105_buffer); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(false); cap105_write(cap105_def_filename); } void cap105_cb_load_template() { string cap105_def_filename = cap105_def_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"CAP105_TEMP_EXT, cap105_def_filename.c_str()); if (p) { cap105_clear_form(); read_data_file(p); cap105_def_template_name = p; show_filename(cap105_def_template_name); cap105_using_template = true; } } void cap105_cb_save_template() { if (!cap105_using_template) { cap105_cb_save_as_template(); return; } string cap105_def_filename = cap105_def_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"CAP105_TEMP_EXT, cap105_def_filename.c_str()); if (p) { update_header(CHANGED); cap105_update_fields(); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(); cap105_write(p); } } void cap105_cb_save_as_template() { string cap105_def_filename = cap105_def_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"CAP105_TEMP_EXT, cap105_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); cap105_def_template_name = p; if (strlen(pext) == 0) cap105_def_template_name.append(CAP105_TEMP_EXT); remove_spaces_from_filename(cap105_def_template_name); clear_header(); update_header(CHANGED); cap105_update_fields(); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(); cap105_write(cap105_def_template_name); show_filename(cap105_def_template_name); cap105_using_template = true; } } void cap105_cb_open() { const char *p = FSEL::select(_("Open data file"), "cap105\t*"CAP105_FILE_EXT, cap105_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; cap105_clear_form(); read_data_file(p); cap105_using_template = false; cap105_def_filename = p; show_filename(cap105_def_filename); } void cap105_write(string s) { FILE *cap105_file = fopen(s.c_str(), "w"); if (!cap105_file) return; fwrite(cap105_buffer.c_str(), cap105_buffer.length(), 1, cap105_file); fclose(cap105_file); } bool cap105_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(CAP105_FILE_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = cap105_def_filename; p = FSEL::saveas(_("Save data file"), "cap105\t*"CAP105_FILE_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.rgnbr_fname) { int n = atoi(progStatus.rgnbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.rgnbr = szn; txt_rgnbr->value(szn); txt_rgnbr->redraw(); } else if (progStatus.sernbr_fname) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } const char *pext = fl_filename_ext(p); cap105_def_filename = p; if (strlen(pext) == 0) cap105_def_filename.append(CAP105_FILE_EXT); remove_spaces_from_filename(cap105_def_filename); update_header(NEW); cap105_update_fields(); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(); cap105_write(cap105_def_filename); cap105_using_template = false; show_filename(cap105_def_filename); return true; } void cap105_cb_save() { if (cap105_base_filename == "new"CAP105_FILE_EXT || cap105_base_filename == "default"CAP105_FILE_EXT || cap105_using_template == true) { cap105_cb_save_as(); return; } if (cap105_check_fields()) update_header(CHANGED); cap105_update_fields(); cap105_buffer.assign(header("<cap105>")); cap105_make_buffer(); cap105_write(cap105_def_filename); cap105_using_template = false; } /* const char *cap105_punctuation[] = { ". ", " X ", ",", " COMMA ", "?", " QUERY ", "\\", " BACKSLASH ", "://", " COLON SLASH SLASH ", "~", " TILDE ", "_", " UNDERSCORE ", "@", " AT ", "#", " POUNDSIGN ", "\"", " QUOTE ", "\'", "", 0, 0 }; */ void cap105_cb_check() { string temp = cap105_txt_msg->buffer()->text(); if (temp.empty()) { cap105_txt_grpcnt->value(""); cap105_btn_check->labelcolor(FL_BLACK); cap105_btn_check->redraw_label(); return; } // convert to uppercase for (size_t n = 0; n < temp.length(); n++) temp[n] = toupper(temp[n]); // convert tabs to 5 spaces size_t pos = string::npos; while ((pos = temp.find("\t")) != string::npos) temp.replace(pos, 1, " "); // return converted text to editor cap105_txt_msg->clear(); cap105_txt_msg->addstr(temp.c_str()); // compute word count // remove any user inserted end-of-lines while ((pos = temp.find('\n')) != string::npos) temp[pos] = ' '; // only single spaces no trailing spaces, no leading spaces while ((pos = temp.find(" ")) != string::npos) temp.erase(pos,1); while (temp[temp.length() -1] == ' ') temp.erase(temp.length()-1, 1); if (temp[0] == ' ') temp.erase(0,1); // count number of words in textcap105_def_filename int numwords = 0; if (temp.length()) { pos = 0; numwords = 1; while ((pos = temp.find(" ", pos + 1)) != string::npos) numwords++; } /* // no more than 5 words to a line if (numwords > progStatus.wpl) { int wc = numwords; size_t pos = 0; while (wc > progStatus.wpl) { for (int i = 0; i < progStatus.wpl; i++) pos = temp.find(' ', pos + 1); temp[pos] = '\n'; wc -= progStatus.wpl; } } */ char snum[10]; snprintf(snum, sizeof(snum), "%d", numwords); cap105_grpcnt = snum; cap105_txt_grpcnt->value(snum); cap105_update_fields(); cap105_btn_check->labelcolor(FL_BLACK); cap105_btn_check->redraw_label(); } void cap105_cb_html() { string cap105_name; string html_text; size_t nbr; cap105_name = ICS_dir; cap105_name.append("cap105.html"); cap105_update_fields(); cap105_cb_check(); string form = cap105_html_template; string pg = ":pg:"; string pgnr = ":npgs:"; string pgone = "1"; replacestr( form, pg, pgone); replacestr( form, pgnr, pgone); for (int i = 0; i < cap105_num_fields; i++) { if (cap105_fields[i].f_type == cap105_prec) { sscanf(cap105_fields[i].f_data.c_str(), "%d", &nbr); if (nbr >= 0 && nbr < (sizeof(cap105_s_prec) / sizeof(*cap105_s_prec))) html_text = cap105_s_prec[nbr]; else html_text = ""; replacestr( form, cap105_fields[i].f_type, html_text ); } else if (cap105_fields[i].w_type == 'b') { replacestr( form, cap105_fields[i].f_type, cap105_fields[i].f_data == "T" ? yes : no); } else if (cap105_fields[i].w_type == 'e') { string temp = cap105_fields[i].f_data; size_t p = 0; while ( (p = temp.find("\n")) != string::npos) temp.replace(p, 1, "<br>"); replacestr( form, cap105_fields[i].f_type, temp); } else replacestr( form, cap105_fields[i].f_type, cap105_fields[i].f_data ); } string rxstr = ""; rxstr.append(progStatus.my_call).append(" ").append(progStatus.my_tel); rxstr.append("<br>").append(progStatus.my_name); rxstr.append("<br>").append(progStatus.my_addr); rxstr.append("<br>").append(progStatus.my_city); html_text = ":rx:"; replacestr( form, html_text, rxstr); html_text = ":exp:"; string arlmsgs = ""; if (progStatus.arl_desc) arlmsgs = expand_arl(cap105_fields[10].f_data); replacestr( form, html_text, arlmsgs); FILE *cap105_file = fopen(cap105_name.c_str(), "w"); fprintf(cap105_file,"%s", form.c_str()); fclose(cap105_file); open_url(cap105_name.c_str()); } void cap105_cb_textout() { string cap105_name; string lines; string str; int nbr = 0;//, fn; cap105_name = ICS_dir; cap105_name.append("cap105.txt"); cap105_update_fields(); cap105_cb_check(); string form = cap105_txt_template; for (int i = 0; i < cap105_num_fields; i++) { str.clear(); if (cap105_fields[i].f_type == cap105_prec) { sscanf(cap105_fields[i].f_data.c_str(), "%d", &nbr); str = cap105_s_prec[nbr]; if (str.find("EMERGENCY") == string::npos) str = str[0]; replacestr( form, cap105_fields[i].f_type, str); } else { str = cap105_fields[i].f_data; // strip_lfs(str); replacestr( form, cap105_fields[i].f_type, str); } } FILE *cap105_file = fopen(cap105_name.c_str(), "w"); fprintf(cap105_file,"%s", form.c_str()); fclose(cap105_file); open_url(cap105_name.c_str()); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/cap/cap_templates.cxx��������������������������������������������������������������0000664�0001750�0001750�00000133573�12330516146�014541� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char cap105_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\n\ <title>:TITLE:</title>\n\ </head>\n\ <body>\n\ <table cellpadding=\"0\" cellspacing=\"0\" width=\"800\">\n\ <col width=\"90\"><col width=\"10\"><col width=\"250\">\n\ <col width=\"90\"><col width=\"10\"><col width=\"250\">\n\ <tbody>\n\ <tr>\n\ <td colspan=\"6\" style=\"border-style: solid solid none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px; padding: 0in 0.08in;\" valign=\"top\">\n\ <p align=\"center\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ <b>CAP RADIO MESSAGE FORM</b>\n\ </font></font>\n\ </p>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"6\" align= \"right\" style=\"border-style: solid solid none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px; padding: 0in 0.08in;\" valign=\"top\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ Page :pg: of :npgs: Pages\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ <tbody>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: solid none none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ MSG NUMBER: \n\ </font></font>\n\ </td>\n\ <td style=\"border-style: solid none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: solid solid none none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :msg nbr:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ PRECEDENCE:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :prec:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ DTG:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :dtm:</font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ FROM:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :from:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ TO:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :to:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ INFO: \n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :info:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ SUBJ: \n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :subj:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr><td colspan=\"6\" style=\"border-style: none solid none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1pt; padding: 0in 0in 0in 0.08in;\"><br></td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td align=\"right\" style=\"border-style: none none none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 0px 1px; padding: 0in 0in 0in 0in;\" >\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ GROUP COUNT: \n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding-bottom: 0in; padding-left: 0in; padding-right: 0in;\"></td>\n\ <td align=\"left\" colspan=\"4\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 0px 1px 0px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :grpcnt:\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ <tbody>\n\ <tr>\n\ <td colspan=\"6\" style=\"border-style: solid solid none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1pt; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ BREAK\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ <tbody>\n\ <tr valign=\"top\">\n\ <td colspan=\"2\" valign=\"top\" height=\"600px\" style=\"border-style: solid none none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\"></td>\n\ <td align=\"justify\" colspan=\"4\" style=\"border-style: solid solid none none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :msgtxt:\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ <tbody>\n\ <tr>\n\ <td colspan=\"6\" style=\"border-style: solid solid none solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ BREAK\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ <tbody>\n\ <tr>\n\ <td colspan=\"3\" style=\"border-style: solid solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in;\" bgcolor=\"#bfbfbf\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ MESSAGE RECEIVED\n\ </font></font>\n\ </td>\n\ <td colspan=\"3\" style=\"border-style: solid solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\" bgcolor=\"#bfbfbf\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ MESSAGE SENT\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ FROM:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :rcvd_fm:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ TO:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :sent_to:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td style=\"border-style: none none none solid; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ DTG:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :rcvd_dtm:\n\ </font></font>\n\ </td>\n\ <td style=\"border-style: none none none none; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ DTG:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" style=\"border-style: none solid none none; border-color: rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0.08in 0in 0in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ :sent_dtm:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"3\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ RECEIVING OPERATOR INITIALS: :rcvop:\n\ </font></font>\n\ </td>\n\ <td colspan=\"3\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ SENDING OPERATOR INITIALS: :sendop:\n\ </font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <table cellpadding=\"0\" cellspacing=\"0\" width=\"800\">\n\ <col width=\"450\"><col width=\"450\">\n\ <tbody>\n\ <tr>\n\ <font face=\"Arial, serif\">\n\ <td align=\"left\"><b>Flmsg CAP FORM 105</b></td>\n\ </font>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </body>\n\ </html>\n\ "; const char cap105_txt_template[] = "Flmsg CAP RADIO MESSAGE FORM\n\n\ MSG NUMBER: :msg nbr:\n\ PRECEDENCE: :prec:\n\ DTG: :dtm:\n\ FROM: :from:\n\ TO: :to:\n\ INFO: :info:\n\ SUBJ: :subj:\n\ \n\ GROUP COUNT: :grpcnt:\n\ \n\ BREAK\n\n\ :msgtxt:\n\n\ BREAK\n\n\ MESSAGE RECEIVED MESSAGE SENT\n\ FROM: :rcvd_fm: TO: :sent_to:\n\ DTG: :rcvd_dtm: DTG::sent_dtm:\n\ RECEIVING OPERATOR INITIALS: :rcvop: SENDING OPERATOR INITIALS: :sendop:\n\ "; //============================================================================== const char cap110_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\n\ <title>:TITLE:</title>\n\ </head>\n\ <body>\n\ <table cellpadding=\"0\" cellspacing=\"0\" width=\"910\">\n\ <col width=\"90\"><col width=\"40\"><col width=\"12\">\n\ <col width=\"105\"><col width=\"135\"><col width=\"134\">\n\ <col width=\"134\"><col width=\"9\"><col width=\"125\">\n\ <tbody>\n\ <tr>\n\ <td align=\"center\" colspan=\"8\" style=\"border-style: solid solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px; padding: 0in 0.08in;\" valign=\"top\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ <b>Communications Log</b>\n\ </font></font>\n\ </td>\n\ <td align=\"left\" style=\"border-style: solid solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10) -moz-use-text-color; border-width: 1px 1px 1px; padding: 0in 0.08in;\" valign=\"top\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">\n\ Page 1 of 1 Pages\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr valign=\"top\">\n\ <td colspan=\"2\" align=\"left\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ MISSION NUMBER<br><font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:mnbr:\n\ </font></font>\n\ </td>\n\ <td colspan=\"6\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ STATION FUNCTIONAL DESIGNATOR OR LOCATION<br><font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:sta:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ DATE<br><font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:date:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ DESIGNATOR / SOURCE\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" align=\"left\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ A<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_a:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ B<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_b:\n\ </font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ C<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_c:\n\ </font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ D<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_d:\n\ </font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ E<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_e:\n\ </font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">\n\ F<br>\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:ds_f:\n\ </font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">TIME</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">CALL</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">CH REF</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 9pt;\">REMARKS</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[0]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[0]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[0]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[0]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[1]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[1]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[1]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[1]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[2]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[2]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[2]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[2]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[3]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[3]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[3]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[3]:</font></font>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[4]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[4]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[4]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[4]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[5]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[5]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[5]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[5]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[6]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[6]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[6]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[6]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[7]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[7]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[7]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[7]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[8]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[8]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[8]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[8]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[9]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[9]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[9]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[9]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[10]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[10]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[10]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[10]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[11]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[11]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[11]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[11]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[12]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[12]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[12]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[12]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[13]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[13]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[13]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[13]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[14]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[14]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[14]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[14]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[15]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[15]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[15]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[15]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[16]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[16]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[16]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[16]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[17]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[17]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[17]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[17]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[18]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[18]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[18]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[18]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[19]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[19]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[19]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[19]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[20]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[20]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[20]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[20]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[21]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[21]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[21]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[21]:</font></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid solid; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:time[22]:</font></font>\n\ </td>\n\ <td colspan=\"2\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:call[22]:</font></font>\n\ </td>\n\ <td colspan=\"1\" align=\"center\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:chref[22]:</font></font>\n\ </td>\n\ <td colspan=\"5\" align=\"left\" style=\"border-style: none solid solid none; border-color: rgb(0, 0, 10) rgb(0, 0, 10); border-width: 1px 1px 1px 1px; padding: 0in 0in 0in 0.08in;\">\n\ <font face=\"Arial, serif\"><font style=\"font-size: 11pt;\">:rem[22]:</font></font>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <table cellpadding=\"0\" cellspacing=\"0\" width=\"910\">\n\ <col width=\"450\"><col width=\"460\">\n\ <tbody>\n\ <tr>\n\ <font face=\"Arial, serif\">\n\ <td align=\"left\"><b>Flmsg CAP FORM 110</b></td>\n\ </font>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </body>\n\ </html>\n\ "; const char cap110_text_template[] = "Flmsg CAP Communications Report\n\n\ Mission number....:mnbr:\n\ Station...........:sta:\n\ Date..............:date:\n\ Desig/Src A.......:ds_a:\n\ Desig/Src B.......:ds_b:\n\ Desig/Src C.......:ds_c:\n\ Desig/Src D.......:ds_d:\n\ Desig/Src E.......:ds_e:\n\ Desig/Src F.......:ds_f:\n\n\ :logdata:"; �������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/cap/cap110_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000030660�12330516146�013524� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_cap110 = (Fl_Group *)0; Fl_Tabs *tab_cap110_type = (Fl_Tabs *)0; Fl_Input2 *txt_110_mission_nbr = (Fl_Input2 *)0; Fl_Input2 *txt_110_station = (Fl_Input2 *)0; Fl_Input2 *txt_110_date = (Fl_Input2 *)0; Fl_Button *btn_110_date = (Fl_Button *)0; Fl_Group *desig_src = (Fl_Group *)0; Fl_Input2 *txt_110_ds_a = (Fl_Input2 *)0; Fl_Input2 *txt_110_ds_b = (Fl_Input2 *)0; Fl_Input2 *txt_110_ds_c = (Fl_Input2 *)0; Fl_Input2 *txt_110_ds_d = (Fl_Input2 *)0; Fl_Input2 *txt_110_ds_e = (Fl_Input2 *)0; Fl_Input2 *txt_110_ds_f = (Fl_Input2 *)0; Fl_Input2 *txt_110_comm_time[23] = {(Fl_Input2 *)0}; Fl_Button *btn_110_comm_time[23] = {(Fl_Button *)0}; Fl_Input2 *txt_110_comm_call[23] = {(Fl_Input2 *)0}; Fl_Input2 *txt_110_comm_chref[23] = {(Fl_Input2 *)0}; Fl_Input2 *txt_110_comm_rem[23] = {(Fl_Input2 *)0}; int cap_bptr[23] = {\ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, \ 10,11,12,13,14,15,16,17,18,19, \ 20,21,22 }; void cap110_changed(Fl_Widget *w, void *) { Fl_Input2 *inp = (Fl_Input2 *)w; string s = inp->value(); int len = s.length(); int maxlen = 1000; if (inp == txt_110_mission_nbr) maxlen = 14; else if (inp == txt_110_station) maxlen = 48; else if (inp == txt_110_ds_a) maxlen = 12; else if (inp == txt_110_ds_b) maxlen = 12; else if (inp == txt_110_ds_c) maxlen = 12; else if (inp == txt_110_ds_d) maxlen = 12; else if (inp == txt_110_ds_e) maxlen = 12; else if (inp == txt_110_ds_f) maxlen = 12; else for (int i = 0; i < 23; i++) { if (inp == txt_110_comm_chref[i]) { maxlen = 6; break; } if (inp == txt_110_comm_call[i]) { maxlen = 10; break; } if (inp == txt_110_comm_time[i]) { maxlen = 8; break; } if (inp == txt_110_comm_rem[i]) { maxlen = 53; break; } } if (len > maxlen) { s.erase(len-1); inp->value(s.c_str()); } estimate(); } void cb_110_comm_time_changed(Fl_Widget *w, void *d) { int p = *(int *)d; txt_110_comm_time[p]->value(szTime(progStatus.UTC) ); cap110_changed(txt_110_comm_time[p], d); } void create_cap110_tab() { int Y = tab_top; tab_cap110 = new Fl_Group(0, Y, 570, 404); tab_cap110->align(FL_ALIGN_TOP); Y += 24; txt_110_mission_nbr = new Fl_Input2(5, Y, 110, 24, _("Mission #")); txt_110_mission_nbr->tooltip(_("")); txt_110_mission_nbr->box(FL_DOWN_BOX); txt_110_mission_nbr->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_mission_nbr->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_mission_nbr->labeltype(FL_NORMAL_LABEL); txt_110_mission_nbr->labelfont(0); txt_110_mission_nbr->labelsize(13); txt_110_mission_nbr->textsize(11); txt_110_mission_nbr->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_mission_nbr->align(FL_ALIGN_TOP_LEFT); txt_110_mission_nbr->callback(cap110_changed); txt_110_mission_nbr->when(FL_WHEN_CHANGED); txt_110_station = new Fl_Input2(117, Y, 350, 24, _("Station Functional Desc.")); txt_110_station->tooltip(_("")); txt_110_station->box(FL_DOWN_BOX); txt_110_station->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_station->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_station->labeltype(FL_NORMAL_LABEL); txt_110_station->labelfont(0); txt_110_station->labelsize(13); txt_110_station->textsize(11); txt_110_station->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_station->align(FL_ALIGN_TOP_LEFT); txt_110_station->callback(cap110_changed); txt_110_station->when(FL_WHEN_CHANGED); txt_110_date = new Fl_Input2(469, Y, 70, 24, _("Date")); txt_110_date->tooltip(_("Report date")); txt_110_date->box(FL_DOWN_BOX); txt_110_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_date->labeltype(FL_NORMAL_LABEL); txt_110_date->labelfont(0); txt_110_date->labelsize(13); txt_110_date->textsize(11); txt_110_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_date->align(FL_ALIGN_TOP_LEFT); txt_110_date->callback(cap110_changed); txt_110_date->when(FL_WHEN_CHANGED); btn_110_date = new Fl_Button(542, Y, 20, 20, _("...")); btn_110_date->tooltip(_("Set today")); btn_110_date->callback((Fl_Callback*)cap110_set_date); Y += 30; desig_src = new Fl_Group(2, Y, 566, 60, _("DESIGNATOR/SOURCE")); { desig_src->box(FL_FLAT_BOX); desig_src->align (FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_TOP); desig_src->labelfont(0); desig_src->labelsize(13); Y += 34; txt_110_ds_a = new Fl_Input2(10, Y, 90, 24, _("A")); txt_110_ds_a->tooltip(_("Designator/Source A")); txt_110_ds_a->box(FL_DOWN_BOX); txt_110_ds_a->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_a->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_a->labeltype(FL_NORMAL_LABEL); txt_110_ds_a->labelfont(0); txt_110_ds_a->labelsize(13); txt_110_ds_a->textsize(11); txt_110_ds_a->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_a->align(FL_ALIGN_TOP_LEFT); txt_110_ds_a->callback(cap110_changed); txt_110_ds_a->when(FL_WHEN_CHANGED); txt_110_ds_b = new Fl_Input2(102, Y, 90, 24, _("B")); txt_110_ds_b->tooltip(_("Designator/Source B")); txt_110_ds_b->box(FL_DOWN_BOX); txt_110_ds_b->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_b->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_b->labeltype(FL_NORMAL_LABEL); txt_110_ds_b->labelfont(0); txt_110_ds_b->labelsize(13); txt_110_ds_b->textsize(11); txt_110_ds_b->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_b->align(FL_ALIGN_TOP_LEFT); txt_110_ds_b->callback(cap110_changed); txt_110_ds_b->when(FL_WHEN_CHANGED); txt_110_ds_c = new Fl_Input2(194, Y, 90, 24, _("C")); txt_110_ds_c->tooltip(_("Designator/Source C")); txt_110_ds_c->box(FL_DOWN_BOX); txt_110_ds_c->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_c->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_c->labeltype(FL_NORMAL_LABEL); txt_110_ds_c->labelfont(0); txt_110_ds_c->labelsize(13); txt_110_ds_c->textsize(11); txt_110_ds_c->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_c->align(FL_ALIGN_TOP_LEFT); txt_110_ds_c->callback(cap110_changed); txt_110_ds_c->when(FL_WHEN_CHANGED); txt_110_ds_d = new Fl_Input2(286, Y, 90, 24, _("D")); txt_110_ds_d->tooltip(_("Designator/Source D")); txt_110_ds_d->box(FL_DOWN_BOX); txt_110_ds_d->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_d->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_d->labeltype(FL_NORMAL_LABEL); txt_110_ds_d->labelfont(0); txt_110_ds_d->labelsize(13); txt_110_ds_d->textsize(11); txt_110_ds_d->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_d->align(FL_ALIGN_TOP_LEFT); txt_110_ds_d->callback(cap110_changed); txt_110_ds_d->when(FL_WHEN_CHANGED); txt_110_ds_e = new Fl_Input2(378, Y, 90, 24, _("E")); txt_110_ds_e->tooltip(_("Designator/Source E")); txt_110_ds_e->box(FL_DOWN_BOX); txt_110_ds_e->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_e->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_e->labeltype(FL_NORMAL_LABEL); txt_110_ds_e->labelfont(0); txt_110_ds_e->labelsize(13); txt_110_ds_e->textsize(11); txt_110_ds_e->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_e->align(FL_ALIGN_TOP_LEFT); txt_110_ds_e->callback(cap110_changed); txt_110_ds_e->when(FL_WHEN_CHANGED); txt_110_ds_f = new Fl_Input2(470, Y, 90, 24, _("F")); txt_110_ds_f->tooltip(_("Designator/Source F")); txt_110_ds_f->box(FL_DOWN_BOX); txt_110_ds_f->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_ds_f->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_ds_f->labeltype(FL_NORMAL_LABEL); txt_110_ds_f->labelfont(0); txt_110_ds_f->labelsize(13); txt_110_ds_f->textsize(11); txt_110_ds_f->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_ds_f->align(FL_ALIGN_TOP_LEFT); txt_110_ds_f->callback(cap110_changed); txt_110_ds_f->when(FL_WHEN_CHANGED); desig_src->end(); } Y += 36; { Fl_Box* o = new Fl_Box(2, Y, 85, 20, _("TIME")); o->box(FL_BORDER_FRAME); o->labelsize(13); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(87, Y, 75, 20, _("CALL")); o->box(FL_BORDER_FRAME); o->labelsize(13); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(162, Y, 50, 20, _("CH REF")); o->box(FL_BORDER_FRAME); o->labelsize(13); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(212, Y, 340, 20, _("REMARKS")); o->box(FL_BORDER_FRAME); o->labelsize(13); o->color((Fl_Color)215); } // Fl_Box* o { Y += 22; Fl_Scroll* o = new Fl_Scroll(2, Y, 566, 240); o->type(2); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 23; i++) { txt_110_comm_time[i] = new Fl_Input2(2, Y + i*22, 65, 22); txt_110_comm_time[i]->tooltip(_("")); txt_110_comm_time[i]->box(FL_DOWN_BOX); txt_110_comm_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_comm_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_comm_time[i]->labeltype(FL_NORMAL_LABEL); txt_110_comm_time[i]->labelfont(0); txt_110_comm_time[i]->labelsize(13); txt_110_comm_time[i]->textsize(11); txt_110_comm_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_comm_time[i]->align(FL_ALIGN_CENTER); txt_110_comm_time[i]->callback(cap110_changed); txt_110_comm_time[i]->when(FL_WHEN_CHANGED); btn_110_comm_time[i] = new Fl_Button(67, Y + i*22, 20, 20, _("..")); btn_110_comm_time[i]->tooltip(_("Set time now")); btn_110_comm_time[i]->callback( cb_110_comm_time_changed, (void *)&cap_bptr[i]); txt_110_comm_call[i] = new Fl_Input2(87, Y + i*22, 75, 22, ""); txt_110_comm_call[i]->tooltip(_("")); txt_110_comm_call[i]->box(FL_DOWN_BOX); txt_110_comm_call[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_comm_call[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_comm_call[i]->labeltype(FL_NORMAL_LABEL); txt_110_comm_call[i]->labelfont(0); txt_110_comm_call[i]->labelsize(13); txt_110_comm_call[i]->textsize(11); txt_110_comm_call[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_comm_call[i]->align(FL_ALIGN_CENTER); txt_110_comm_call[i]->callback(cap110_changed); txt_110_comm_call[i]->when(FL_WHEN_CHANGED); txt_110_comm_chref[i] = new Fl_Input2(162, Y + i*22, 50, 22); txt_110_comm_chref[i]->tooltip(_("")); txt_110_comm_chref[i]->box(FL_DOWN_BOX); txt_110_comm_chref[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_comm_chref[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_comm_chref[i]->labeltype(FL_NORMAL_LABEL); txt_110_comm_chref[i]->labelfont(0); txt_110_comm_chref[i]->labelsize(13); txt_110_comm_chref[i]->textsize(11); txt_110_comm_chref[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_comm_chref[i]->align(FL_ALIGN_CENTER); txt_110_comm_chref[i]->callback(cap110_changed); txt_110_comm_chref[i]->when(FL_WHEN_CHANGED); txt_110_comm_rem[i] = new Fl_Input2(212, Y + i*22, 340, 22); txt_110_comm_rem[i]->tooltip(_("")); txt_110_comm_rem[i]->box(FL_DOWN_BOX); txt_110_comm_rem[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_110_comm_rem[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_110_comm_rem[i]->labeltype(FL_NORMAL_LABEL); txt_110_comm_rem[i]->labelfont(0); txt_110_comm_rem[i]->labelsize(13); txt_110_comm_rem[i]->textsize(11); txt_110_comm_rem[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_110_comm_rem[i]->align(FL_ALIGN_CENTER); txt_110_comm_rem[i]->callback(cap110_changed); txt_110_comm_rem[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Scroll* o tab_cap110->end(); tab_cap110->hide(); } ��������������������������������������������������������������������������������flmsg-2.0.10/src/cap/cap110.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000043037�12330516146�012700� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 110 field variables and template variables // --------------------------------------------------------------------- string cap110_mission_nbr = ":mnbr:"; string cap110_station = ":sta:"; string cap110_date = ":date:"; string cap110_ds_a = ":ds_a:"; string cap110_ds_b = ":ds_b:"; string cap110_ds_c = ":ds_c:"; string cap110_ds_d = ":ds_d:"; string cap110_ds_e = ":ds_e:"; string cap110_ds_f = ":ds_f:"; string cap110_comm_time = ":time[n]:"; // 23 string cap110_comm_chref = ":chref[n]:"; // 23 string cap110_comm_call = ":call[n]:"; // 23 string cap110_comm_rem = ":rem[n]:"; // 23 string s110_mission_nbr; string s110_station; string s110_date; string s110_ds_a; string s110_ds_b; string s110_ds_c; string s110_ds_d; string s110_ds_e; string s110_ds_f; string s110_comm_time[23]; string s110_comm_call[23]; string s110_comm_chref[23]; string s110_comm_rem[23]; // ===================================================================== string buff_c110; string cap110_def_filename= ""; string cap110_base_filename = ""; string cap110_def_template_name = ""; bool using_cap110_template = false; void cap110_set_date() { string date = szCAPDateTime(); date.erase(2,6); txt_110_date->value(date.c_str()); } void clear_110fields() { s110_mission_nbr.clear(); s110_station.clear(); s110_date.clear(); s110_ds_a.clear(); s110_ds_b.clear(); s110_ds_c.clear(); s110_ds_d.clear(); s110_ds_e.clear(); s110_ds_f.clear(); for (int i = 0; i < 23; i++) { s110_comm_time[i].clear(); s110_comm_call[i].clear(); s110_comm_chref[i].clear(); s110_comm_rem[i].clear(); } } bool check_110fields() { if (s110_mission_nbr != txt_110_mission_nbr->value()) return true; if (s110_station != txt_110_station->value()) return true; if (s110_date != txt_110_date->value()) return true; if (s110_ds_a != txt_110_ds_a->value()) return true; if (s110_ds_b != txt_110_ds_b->value()) return true; if (s110_ds_c != txt_110_ds_c->value()) return true; if (s110_ds_d != txt_110_ds_d->value()) return true; if (s110_ds_e != txt_110_ds_e->value()) return true; if (s110_ds_f != txt_110_ds_f->value()) return true; for (int i = 0; i < 23; i++) { if (s110_comm_time[i] != txt_110_comm_time[i]->value()) return true; if (s110_comm_call[i] != txt_110_comm_call[i]->value()) return true; if (s110_comm_chref[i] != txt_110_comm_chref[i]->value()) return true; if (s110_comm_rem[i] != txt_110_comm_rem[i]->value()) return true; } return false; } void update_110fields() { s110_mission_nbr = txt_110_mission_nbr->value(); s110_station = txt_110_station->value(); s110_date = txt_110_date->value(); s110_ds_a = txt_110_ds_a->value(); s110_ds_b = txt_110_ds_b->value(); s110_ds_c = txt_110_ds_c->value(); s110_ds_d = txt_110_ds_d->value(); s110_ds_e = txt_110_ds_e->value(); s110_ds_f = txt_110_ds_f->value(); for (int i = 0; i < 23; i++) { s110_comm_time[i] = txt_110_comm_time[i]->value(); s110_comm_call[i] = txt_110_comm_call[i]->value(); s110_comm_chref[i] = txt_110_comm_chref[i]->value(); s110_comm_rem[i] = txt_110_comm_rem[i]->value(); } } void update_110form() { txt_110_mission_nbr->value(s110_mission_nbr.c_str()); txt_110_station->value(s110_station.c_str()); txt_110_date->value(s110_date.c_str()); txt_110_ds_a->value(s110_ds_a.c_str()); txt_110_ds_b->value(s110_ds_b.c_str()); txt_110_ds_c->value(s110_ds_c.c_str()); txt_110_ds_d->value(s110_ds_d.c_str()); txt_110_ds_e->value(s110_ds_e.c_str()); txt_110_ds_f->value(s110_ds_f.c_str()); for (int i = 0; i < 23; i++) { txt_110_comm_time[i]->value(s110_comm_time[i].c_str()); txt_110_comm_call[i]->value(s110_comm_call[i].c_str()); txt_110_comm_chref[i]->value(s110_comm_chref[i].c_str()); txt_110_comm_rem[i]->value(s110_comm_rem[i].c_str()); } } void clear_110_form() { clear_110fields(); update_110form(); } string &cap110_nn(string & subst, int n) { static string garbage = "#$^*!"; static string ics; ics.clear(); ics = subst; size_t pos = ics.find("["); if (pos == string::npos) return garbage; pos++; if (n < 10) ics[pos] = '0' + n; else { ics[pos] = n > 19 ? '2' : '1'; ics[pos+1] = '0' + n % 10; ics[pos+2] = ']'; ics += ':'; } return ics; } void make_buff_c110(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( cap110_mission_nbr, s110_mission_nbr ) ); mbuff.append( lineout( cap110_station, s110_station ) ); mbuff.append( lineout( cap110_date, s110_date ) ); mbuff.append( lineout( cap110_ds_a, s110_ds_a ) ); mbuff.append( lineout( cap110_ds_b, s110_ds_b ) ); mbuff.append( lineout( cap110_ds_c, s110_ds_c ) ); mbuff.append( lineout( cap110_ds_d, s110_ds_d ) ); mbuff.append( lineout( cap110_ds_e, s110_ds_e ) ); mbuff.append( lineout( cap110_ds_f, s110_ds_f ) ); for (int i = 0; i < 23; i++) { mbuff.append( lineout( cap110_nn( cap110_comm_time, i ), s110_comm_time[i] ) ); mbuff.append( lineout( cap110_nn( cap110_comm_call, i ), s110_comm_call[i] ) ); mbuff.append( lineout( cap110_nn( cap110_comm_chref, i ), s110_comm_chref[i] ) ); mbuff.append( lineout( cap110_nn( cap110_comm_rem, i ), s110_comm_rem[i] ) ); } if (compress) compress_maybe(mbuff); buff_c110.append(mbuff); } void read_c110_buffer(string data) { clear_110fields(); read_header(data); s110_mission_nbr = findstr( data, cap110_mission_nbr ); s110_station = findstr( data, cap110_station ); s110_date = findstr( data, cap110_date ); s110_ds_a = findstr( data, cap110_ds_a ); s110_ds_b = findstr( data, cap110_ds_b ); s110_ds_c = findstr( data, cap110_ds_c ); s110_ds_d = findstr( data, cap110_ds_d ); s110_ds_e = findstr( data, cap110_ds_e ); s110_ds_f = findstr( data, cap110_ds_f ); for (int i = 0; i < 23; i++) { s110_comm_time[i] = findstr( data, cap110_nn( cap110_comm_time, i ) ); s110_comm_call[i] = findstr( data, cap110_nn( cap110_comm_call, i ) ); s110_comm_chref[i] = findstr( data, cap110_nn( cap110_comm_chref, i ) ); s110_comm_rem[i] = findstr( data, cap110_nn( cap110_comm_rem, i ) ); } update_110form(); } void cap110_cb_load_template(string data) { clear_110fields(); read_header(data); s110_mission_nbr = findstr( data, cap110_mission_nbr ); s110_station = findstr( data, cap110_station ); s110_date = findstr( data, cap110_date ); s110_ds_a = findstr( data, cap110_ds_a ); s110_ds_b = findstr( data, cap110_ds_b ); s110_ds_c = findstr( data, cap110_ds_c ); s110_ds_d = findstr( data, cap110_ds_d ); s110_ds_e = findstr( data, cap110_ds_e ); s110_ds_f = findstr( data, cap110_ds_f ); for (int i = 0; i < 23; i++) { s110_comm_time[i] = findstr( data, cap110_nn( cap110_comm_time, i ) ); s110_comm_call[i] = findstr( data, cap110_nn( cap110_comm_call, i ) ); s110_comm_chref[i] = findstr( data, cap110_nn( cap110_comm_chref, i ) ); s110_comm_rem[i] = findstr( data, cap110_nn( cap110_comm_rem, i ) ); } update_110form(); } void cap110_cb_new() { if (check_110fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cap110_cb_save(); } } clear_110_form(); clear_header(); cap110_def_filename= ICS_msg_dir; cap110_def_filename.append("new"CAP110_FILE_EXT); show_filename(cap110_def_filename); using_cap110_template = false; } void cap110_cb_import() { fl_alert2("Not implemented"); } void cap110_cb_export() { fl_alert2("Not implemented"); } void cap110_cb_wrap_import(string wrapfilename, string inpbuffer) { clear_110_form(); cap110_cb_load_template(inpbuffer); cap110_def_filename= ICS_msg_dir; cap110_def_filename.append(wrapfilename); show_filename(cap110_def_filename); using_cap110_template = false; } int eval_cap110_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(cap110_base_filename).append("]"); update_110fields(); update_header(FROM); evalstr.append(header("<cap110>")); buff_c110.clear(); make_buff_c110(true); if (buff_c110.empty()) return 0; compress_maybe( buff_c110 ); evalstr.append( buff_c110 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cap110_cb_wrap_export() { if (check_110fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_110fields(); if (cap110_base_filename == "new"CAP110_FILE_EXT || cap110_base_filename == "default"CAP110_FILE_EXT) if (!cap110_cb_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(cap110_base_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff_c110.assign(header("<cap110>")); make_buff_c110(true); export_wrapfile(cap110_base_filename, wrapfilename, buff_c110, pext != ".wrap"); write_110(cap110_def_filename); } } void cap110_cb_wrap_autosend() { if (check_110fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_110fields(); if (cap110_base_filename == "new"CAP110_FILE_EXT || cap110_base_filename == "default"CAP110_FILE_EXT) cap110_cb_save_as(); update_header(FROM); buff_c110.assign(header("<cap110>")); make_buff_c110(true); xfr_via_socket(cap110_base_filename, buff_c110); write_110(cap110_def_filename); } void cap110_cb_load_template() { string cap110_def_filename= cap110_def_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"CAP110_TEMP_EXT, cap110_def_filename.c_str()); if (p) { clear_110_form(); read_data_file(p); cap110_def_template_name = p; show_filename(cap110_def_template_name); using_cap110_template = true; } } void cap110_cb_save_template() { if (!using_cap110_template) { cap110_cb_save_as_template(); return; } string cap110_def_filename= cap110_def_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"CAP110_TEMP_EXT, cap110_def_filename.c_str()); if (p) { update_header(CHANGED); buff_c110.assign(header("<cap110>")); make_buff_c110(); write_110(p); } } void cap110_cb_save_as_template() { string cap110_def_filename= cap110_def_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"CAP110_TEMP_EXT, cap110_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); cap110_def_template_name = p; if (strlen(pext) == 0) cap110_def_template_name.append(CAP110_TEMP_EXT); remove_spaces_from_filename(cap110_def_template_name); clear_header(); update_header(CHANGED); buff_c110.assign(header("<cap110>")); make_buff_c110(); write_110(cap110_def_template_name); show_filename(cap110_def_template_name); using_cap110_template = true; } } void cap110_cb_open() { const char *p = FSEL::select(_("Open data file"), "CAP-110\t*"CAP110_FILE_EXT, cap110_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_110_form(); read_data_file(p); using_cap110_template = false; cap110_def_filename= p; show_filename(cap110_def_filename); } void write_110(string s) { FILE *file110 = fopen(s.c_str(), "w"); if (!file110) return; fwrite(buff_c110.c_str(), buff_c110.length(), 1, file110); fclose(file110); } bool cap110_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(CAP110_FILE_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = cap110_def_filename; p = FSEL::saveas(_("Save data file"), "CAP-110\t*"CAP110_FILE_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); cap110_def_filename= p; if (strlen(pext) == 0) cap110_def_filename.append(CAP110_FILE_EXT); remove_spaces_from_filename(cap110_def_filename); update_110fields(); update_header(NEW); buff_c110.assign(header("<cap110>")); make_buff_c110(); write_110(cap110_def_filename); using_cap110_template = false; show_filename(cap110_def_filename); return true; } void cap110_cb_save() { if (cap110_base_filename == "new"CAP110_FILE_EXT || cap110_base_filename == "default"CAP110_FILE_EXT || using_cap110_template == true) { cap110_cb_save_as(); return; } if (check_110fields()) update_header(CHANGED); update_110fields(); buff_c110.assign(header("<cap110>")); make_buff_c110(); write_110(cap110_def_filename); using_cap110_template = false; } void cap110_cb_html() { string fname_name = fl_filename_name(cap110_def_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string cap110_fname = ICS_dir; cap110_fname.append(fname_name); cap110_fname.append(".html"); string html_text = ""; string empty = "<br>"; update_110fields(); string form110 = cap110_html_template; replacestr(form110, TITLE, fname_name); replacestr(form110, cap110_mission_nbr, s110_mission_nbr ); replacestr(form110, cap110_station, s110_station ); replacestr(form110, cap110_date, s110_date ); replacestr(form110, cap110_ds_a, s110_ds_a ); replacestr(form110, cap110_ds_b, s110_ds_b ); replacestr(form110, cap110_ds_c, s110_ds_c ); replacestr(form110, cap110_ds_d, s110_ds_d ); replacestr(form110, cap110_ds_e, s110_ds_e ); replacestr(form110, cap110_ds_f, s110_ds_f ); for (int i = 0; i < 23; i++) { replacestr(form110, cap110_nn( cap110_comm_time, i ), s110_comm_time[i].empty() ? empty : s110_comm_time[i] ); replacestr(form110, cap110_nn( cap110_comm_call, i ), s110_comm_call[i].empty() ? empty : s110_comm_call[i] ); replacestr(form110, cap110_nn( cap110_comm_chref, i ), s110_comm_chref[i].empty() ? empty : s110_comm_chref[i] ); replacestr(form110, cap110_nn( cap110_comm_rem, i ), s110_comm_rem[i].empty() ? empty : s110_comm_rem[i] ); } FILE *file110 = fopen(cap110_fname.c_str(), "w"); fprintf(file110,"%s", form110.c_str()); fclose(file110); open_url(cap110_fname.c_str()); } void cap110_cb_msg_type() { if (tabs_msg_type->value() == tab_cap110 ) show_filename(cap110_def_filename); } void cap110_cb_textout() { string cap110_fname = ICS_dir; cap110_fname.append("cap110.txt"); update_110fields(); string form110 = cap110_text_template; replacestr(form110, cap110_mission_nbr, s110_mission_nbr ); replacestr(form110, cap110_station, s110_station ); replacestr(form110, cap110_date, s110_date ); replacestr(form110, cap110_ds_a, s110_ds_a ); replacestr(form110, cap110_ds_b, s110_ds_b ); replacestr(form110, cap110_ds_c, s110_ds_c ); replacestr(form110, cap110_ds_d, s110_ds_d ); replacestr(form110, cap110_ds_e, s110_ds_e ); replacestr(form110, cap110_ds_f, s110_ds_f ); string logdata; string lgdata = ":logdata:"; const char *fmt = "%-7s|%-12s|%-15s|%s\n"; char tempstr[200]; snprintf(tempstr, sizeof(tempstr), fmt, "TIME", "CALL", "CH REF", "REMARKS"); logdata = tempstr; for (int i = 0; i < 23; i++) { if (!s110_comm_time[i].empty() || !s110_comm_call[i].empty() || !s110_comm_chref[i].empty() || !s110_comm_rem[i].empty() ) { snprintf(tempstr, sizeof(tempstr), fmt, s110_comm_time[i].c_str(), s110_comm_call[i].c_str(), s110_comm_chref[i].c_str(), s110_comm_rem[i].c_str()); logdata.append(tempstr); } } replacestr(form110, lgdata, logdata); FILE *file110 = fopen(cap110_fname.c_str(), "w"); fprintf(file110,"%s", form110.c_str()); fclose(file110); open_url(cap110_fname.c_str()); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/���������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�012160� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/flinput2.cxx���������������������������������������������������������������0000664�0001750�0001750�00000012052�12431375020�014346� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ===================================================================== // // flinput2.cxx // // Author: Stelios Buononos, M0GLD // Copyright: 2010 // // This file is part of flmsg. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is // copyright under the GNU General Public License. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ===================================================================== #include "config.h" #include <cctype> #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Widget.H> #include <FL/Fl_Input.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_Tooltip.H> #include "icons.h" #include "flinput2.h" #include "gettext.h" #include "util.h" enum { OP_UNDO, OP_CUT, OP_COPY, OP_PASTE, OP_DELETE, OP_CLEAR, OP_SELECT_ALL }; static Fl_Menu_Item cmenu[] = { { icons::make_icon_label(_("Undo"), edit_undo_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Delete"), trash_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { 0 } }; static bool cmenu_init = false; Fl_Input2::Fl_Input2(int x, int y, int w, int h, const char* l) : Fl_Input(x, y, w, h, l) { if (!cmenu_init) { for (size_t i = 0; i < sizeof(cmenu)/sizeof(*cmenu) - 1; i++) if (cmenu[i].labeltype() == _FL_MULTI_LABEL) icons::set_icon_label(&cmenu[i]); cmenu_init = true; } } int Fl_Input2::handle(int event) { switch (event) { case FL_KEYBOARD: { int b = Fl::event_key(); int p = position(); // stop the move-to-next-field madness, we have Tab for that! if (unlikely((b == FL_Left && p == 0) || (b == FL_Right && p == size()) || (b == FL_Up && line_start(p) == 0) || (b == FL_Down && line_end(p) == size()))) return 1; else if (unlikely(Fl::event_state() & (FL_ALT | FL_META))) { switch (b) { case 'c': { // capitalise if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; if (p == size()) return 1; char c = toupper(*(value() + p)); replace(p, p + 1, &c, 1); position(word_end(p)); } return 1; case 'u': case 'l': { // upper/lower case if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; int n = word_end(p) - p; if (n == 0) return 1; char* s = new char[n]; memcpy(s, value() + p, n); if (b == 'u') for (int i = 0; i < n; i++) s[i] = toupper(s[i]); else for (int i = 0; i < n; i++) s[i] = tolower(s[i]); replace(p, p + n, s, n); position(p + n); delete [] s; return 1; } default: break; } } } return Fl_Input::handle(event); case FL_MOUSEWHEEL: { if (!((type() & (FL_MULTILINE_INPUT | FL_MULTILINE_OUTPUT)) && Fl::event_inside(this))) return Fl_Input::handle(event); int d; if (!((d = Fl::event_dy()) || (d = Fl::event_dx()))) return Fl_Input::handle(event); if (Fl::focus() != this) take_focus(); up_down_position(d + (d > 0 ? line_end(position()) : line_start(position()))); return 1; } case FL_PUSH: if (Fl::event_button() == FL_RIGHT_MOUSE) break; // fall through default: return Fl_Input::handle(event); } bool sel = position() != mark(), ro = readonly(); icons::set_active(&cmenu[OP_UNDO], !ro); icons::set_active(&cmenu[OP_CUT], !ro && sel); icons::set_active(&cmenu[OP_COPY], sel); icons::set_active(&cmenu[OP_PASTE], !ro); icons::set_active(&cmenu[OP_DELETE], !ro && sel); icons::set_active(&cmenu[OP_CLEAR], !ro && size()); icons::set_active(&cmenu[OP_SELECT_ALL], size()); take_focus(); window()->cursor(FL_CURSOR_DEFAULT); int t = Fl_Tooltip::enabled(); Fl_Tooltip::disable(); const Fl_Menu_Item* m = cmenu->popup(Fl::event_x(), Fl::event_y()); Fl_Tooltip::enable(t); if (!m) return 1; switch (m - cmenu) { case OP_UNDO: undo(); break; case OP_CUT: cut(); copy_cuts(); break; case OP_COPY: copy(1); break; case OP_PASTE: Fl::paste(*this, 1); break; case OP_DELETE: cut(); break; case OP_CLEAR: cut(0, size()); break; case OP_SELECT_ALL: position(0, size()); break; } return 1; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Native_File_Chooser_FLTK.cxx��������������������������������������������0000664�0001750�0001750�00000023263�12330516146�017725� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser_FLTK.cxx -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // API changes + filter improvements by Nathan Vander Wilt 2005 // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #define FLTK1 #ifdef FLTK1 // // FLTK1 // #include <FL/Fl_Native_File_Chooser.H> #define FNFC_CLASS Fl_Native_File_Chooser #define FNFC_CTOR Fl_Native_File_Chooser #define FLTK_CHOOSER_SINGLE Fl_File_Chooser::SINGLE #define FLTK_CHOOSER_DIRECTORY Fl_File_Chooser::DIRECTORY #define FLTK_CHOOSER_MULTI Fl_File_Chooser::MULTI #define FLTK_CHOOSER_CREATE Fl_File_Chooser::CREATE #else // // FLTK2 // #include <fltk/NativeFileChooser.h> #include <fltk/run.h> #define FNFC_CTOR NativeFileChooser #define FNFC_CLASS fltk::FNFC_CTOR #define FLTK_CHOOSER_SINGLE fltk::FileChooser::SINGLE #define FLTK_CHOOSER_DIRECTORY fltk::FileChooser::DIRECTORY #define FLTK_CHOOSER_MULTI fltk::FileChooser::MULTI #define FLTK_CHOOSER_CREATE fltk::FileChooser::CREATE #endif #include "flnfc_common.cxx" #include <sys/stat.h> // CTOR FNFC_CLASS::FNFC_CTOR(int val) { static int init = 0; // 'first time' initialize flag if ( init == 0 ) { // Initialize when instanced for first time load_system_icons(); init = 1; } _btype = val; _options = NO_OPTIONS; _filter = NULL; _filtvalue = 0; _parsedfilt = NULL; _preset_file = NULL; _prevvalue = NULL; _directory = NULL; _errmsg = NULL; #ifdef FLTK1 file_chooser = new Fl_File_Chooser(NULL, NULL, 0, NULL); #else file_chooser = new fltk::FileChooser(NULL, NULL, 0, NULL); #endif type(val); // do this after file_chooser created _nfilters = 0; } // DTOR FNFC_CLASS::~FNFC_CTOR() { delete file_chooser; _filter = strfree(_filter); _parsedfilt = strfree(_parsedfilt); _preset_file = strfree(_preset_file); _prevvalue = strfree(_prevvalue); _directory = strfree(_directory); _errmsg = strfree(_errmsg); } // PRIVATE: SET ERROR MESSAGE void FNFC_CLASS::errmsg(const char *msg) { _errmsg = strfree(_errmsg); _errmsg = strnew(msg); } // PRIVATE: translate Native types to Fl_File_Chooser types int FNFC_CLASS::type_fl_file(int val) { switch (val) { case BROWSE_FILE: return(FLTK_CHOOSER_SINGLE); case BROWSE_DIRECTORY: return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_DIRECTORY); case BROWSE_MULTI_FILE: return(FLTK_CHOOSER_MULTI); case BROWSE_MULTI_DIRECTORY: return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI); case BROWSE_SAVE_FILE: return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_CREATE); case BROWSE_SAVE_DIRECTORY: return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI | FLTK_CHOOSER_CREATE); default: return(FLTK_CHOOSER_SINGLE); } } void FNFC_CLASS::type(int val) { _btype = val; file_chooser->type(type_fl_file(val)); } int FNFC_CLASS::type() const { return(_btype); } // SET OPTIONS void FNFC_CLASS::options(int val) { _options = val; } // GET OPTIONS int FNFC_CLASS::options() const { return(_options); } // Show chooser, blocks until done. // RETURNS: // 0 - user picked a file // 1 - user cancelled // -1 - failed; errmsg() has reason // int FNFC_CLASS::show() { // FILTER if ( _parsedfilt ) { file_chooser->filter(_parsedfilt); } // FILTER VALUE // Set this /after/ setting the filter // file_chooser->filter_value(_filtvalue); // DIRECTORY if ( _directory && _directory[0] ) { file_chooser->directory(_directory); } else { file_chooser->directory(_prevvalue); } // PRESET FILE if ( _preset_file ) { file_chooser->value(_preset_file); } // OPTIONS: PREVIEW file_chooser->preview( (options() & PREVIEW) ? 1 : 0); // OPTIONS: NEW FOLDER if ( options() & NEW_FOLDER ) file_chooser->type(file_chooser->type() | FLTK_CHOOSER_CREATE); // on // SHOW file_chooser->show(); #ifdef FLTK1 // FLTK1: BLOCK WHILE BROWSER SHOWN while ( file_chooser->shown() ) { Fl::wait(); } #else // FLTK2: BLOCK WHILE BROWSER SHOWN while ( file_chooser->visible() ) { fltk::wait(); } #endif if ( file_chooser->value() && file_chooser->value()[0] ) { _prevvalue = strfree(_prevvalue); _prevvalue = strnew(file_chooser->value()); _filtvalue = file_chooser->filter_value(); // update filter value // HANDLE SHOWING 'SaveAs' CONFIRM if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) { struct stat buf; if ( stat(file_chooser->value(), &buf) != -1 ) { if ( buf.st_mode & S_IFREG ) { // Regular file + exists? if ( exist_dialog() == 0 ) { return(1); } } } } } if ( file_chooser->count() ) return(0); else return(1); } // RETURN ERROR MESSAGE const char *FNFC_CLASS::errmsg() const { return(_errmsg ? _errmsg : "No error"); } // GET FILENAME const char* FNFC_CLASS::filename() const { if ( file_chooser->count() > 0 ) return(file_chooser->value()); return(""); } // GET FILENAME FROM LIST OF FILENAMES const char* FNFC_CLASS::filename(int i) const { if ( i < file_chooser->count() ) return(file_chooser->value(i+1)); // convert fltk 1 based to our 0 based return(""); } // SET TITLE // Can be NULL if no title desired. // void FNFC_CLASS::title(const char *val) { file_chooser->label(val); } // GET TITLE // Can return NULL if none set. // const char *FNFC_CLASS::title() const { return(file_chooser->label()); } // SET FILTER // Can be NULL if no filter needed // void FNFC_CLASS::filter(const char *val) { _filter = strfree(_filter); _filter = strnew(val); parse_filter(); } // GET FILTER const char *FNFC_CLASS::filter() const { return(_filter); } // SET SELECTED FILTER void FNFC_CLASS::filter_value(int val) { _filtvalue = val; } // RETURN SELECTED FILTER int FNFC_CLASS::filter_value() const { return(_filtvalue); } // GET TOTAL FILENAMES CHOSEN int FNFC_CLASS::count() const { return(file_chooser->count()); } // PRESET PATHNAME // Can be NULL if no preset is desired. // void FNFC_CLASS::directory(const char *val) { _directory = strfree(_directory); _directory = strnew(val); } // GET PRESET PATHNAME // Can return NULL if none set. // const char *FNFC_CLASS::directory() const { return(_directory); } // Convert our filter format to fltk's chooser format // FROM TO (FLTK) // ------------------------- -------------------------- // "*.cxx" "*.cxx Files(*.cxx)" // "C Files\t*.{cxx,h}" "C Files(*.{cxx,h})" // "C Files\t*.{cxx,h}\nText Files\t*.txt" "C Files(*.{cxx,h})\tText Files(*.txt)" // // Returns a modified version of the filter that the caller is responsible // for freeing with strfree(). // void FNFC_CLASS::parse_filter() { _parsedfilt = strfree(_parsedfilt); // clear previous parsed filter (if any) _nfilters = 0; char *in = _filter; if ( !in ) return; int has_name = strchr(in, '\t') ? 1 : 0; char mode = has_name ? 'n' : 'w'; // parse mode: n=title, w=wildcard char wildcard[1024] = ""; // parsed wildcard char name[1024] = ""; // Parse filter user specified for ( ; 1; in++ ) { /*** DEBUG printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n", *in, mode, name, wildcard); ***/ switch (*in) { // FINISHED PARSING NAME? case '\t': if ( mode != 'n' ) goto regchar; mode = 'w'; break; // ESCAPE NEXT CHAR case '\\': ++in; goto regchar; // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS? case '\r': case '\n': case '\0': // APPEND NEW FILTER TO LIST if ( wildcard[0] ) { // OUT: "name(wild)\tname(wild)" char comp[2048]; snprintf(comp, sizeof(comp), "%s%.511s(%.511s)", ((_parsedfilt)?"\t":""), name, wildcard); _parsedfilt = strapp(_parsedfilt, comp); _nfilters++; //DEBUG printf("DEBUG: PARSED FILT NOW <%s>\n", _parsedfilt); } // RESET wildcard[0] = name[0] = '\0'; mode = strchr(in, '\t') ? 'n' : 'w'; // DONE? if ( *in == '\0' ) return; // done else continue; // not done yet, more filters // Parse all other chars default: // handle all non-special chars regchar: // handle regular char switch ( mode ) { case 'n': chrcat(name, *in); continue; case 'w': chrcat(wildcard, *in); continue; } break; } } //NOTREACHED } // SET PRESET FILENAME void FNFC_CLASS::preset_file(const char* val) { _preset_file = strfree(_preset_file); _preset_file = strnew(val); } // GET PRESET FILENAME const char* FNFC_CLASS::preset_file() const { return(_preset_file); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/icons.cxx������������������������������������������������������������������0000664�0001750�0001750�00000015060�12431375020�013720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // icons.cxx // // Copyright (C) 2008 // Stelios Bounanos, M0GLD // // This file is part of flmsg. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ===================================================================== // ---------------------------------------------------------------------------- #include <config.h> #include "flmsg_config.h" #include "icons.h" #include "util.h" #include <FL/Fl.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_Widget.H> #include <FL/Fl_Group.H> #if USE_IMAGE_LABELS # include <map> # include <cassert> # include <cstring> # include <FL/Fl_Multi_Label.H> # include <FL/Fl_Image.H> # include <FL/Fl_Pixmap.H> #endif using namespace std; namespace icons { #if USE_IMAGE_LABELS typedef map<Fl_Multi_Label*, Fl_Image**> imap_t; static imap_t* imap = 0; #endif #define FL_EMPTY_LABEL FL_FREE_LABELTYPE static void draw_empty(const Fl_Label*, int, int, int, int, Fl_Align) { } static void measure_empty(const Fl_Label*, int& w, int& h) { w = h = 0; } // The following functions create image+text menu item labels. // You've had too much FLTK if you already know how to do that. // Return a multi_label pointer, cast to a string, for `text' and // `pixmap'. This goes into the label pointer of a widget or menu // item. The text label is copied if we are using multi labels. You must // call set_icon_label on the widget or menu item before its draw() // function is called for the first time. // // A NULL pixmap means that the caller wants an empty, transparent, icon. const char* make_icon_label(const char* text, const char** pixmap) { #if USE_IMAGE_LABELS static imap_t* imap_ = 0; if (unlikely(!imap_)) { imap = imap_ = new imap_t; Fl::set_labeltype(FL_EMPTY_LABEL, draw_empty, measure_empty); } // Create a multi label and associate it with an Fl_Image* array Fl_Multi_Label* mlabel = new Fl_Multi_Label; Fl_Image** images = new Fl_Image*[2]; images[0] = new Fl_Pixmap(pixmap ? pixmap : clear_row_icon); images[1] = 0; // we create this on demand // set_icon_label_ will set mlabel->labela later mlabel->typea = _FL_IMAGE_LABEL; if (!text) text = ""; size_t len = strlen(text); char* s = new char[len + 2]; s[0] = ' '; memcpy(s + 1, text, len + 1); mlabel->labelb = s; mlabel->typeb = FL_NORMAL_LABEL; (*imap)[mlabel] = images; return (const char*)mlabel; #else return text; #endif } #if USE_IMAGE_LABELS // Find the item's label, which should be something that was returned by // make_icon_label, and set the active or inactive image. template <typename T> void set_icon_label_(T* item) { imap_t::iterator j = imap->find((Fl_Multi_Label*)(item->label())); if (j == imap->end()) return; Fl_Multi_Label* mlabel = j->first; Fl_Image** images = j->second; unsigned char i = !item->active(); if (!images[i]) { // create inactive version of other image images[i] = images[!i]->copy(); images[i]->inactive(); } if (mlabel->typea == _FL_IMAGE_LABEL) mlabel->labela = (const char*)images[i]; else mlabel->labelb = (const char*)images[i]; item->image(images[i]); mlabel->label(item); item->labeltype(_FL_MULTI_LABEL); } #endif void set_icon_label(Fl_Menu_Item* item) { #if USE_IMAGE_LABELS set_icon_label_(item); #else // this isn't needed but it simplifies fldigi's UI setup code if (item->labeltype() == _FL_MULTI_LABEL) item->labeltype(FL_NORMAL_LABEL); #endif } void set_icon_label(Fl_Widget* w) { #if USE_IMAGE_LABELS set_icon_label_(w); w->image(0); #else if (w->labeltype() == _FL_MULTI_LABEL) w->labeltype(FL_NORMAL_LABEL); #endif } void toggle_icon_labels(void) { #if USE_IMAGE_LABELS for (imap_t::iterator i = imap->begin(); i != imap->end(); ++i) { // swap sublabels const char* l = i->first->labela; i->first->labela = i->first->labelb; i->first->labelb = l; if (i->first->typea == _FL_IMAGE_LABEL) { i->first->typea = FL_NORMAL_LABEL; i->first->typeb = FL_EMPTY_LABEL; i->first->labela++; } else { i->first->typea = _FL_IMAGE_LABEL; i->first->typeb = FL_NORMAL_LABEL; i->first->labelb--; } } #endif } template <typename T> const char* get_icon_label_text_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == _FL_MULTI_LABEL) { imap_t::iterator i = imap->find((Fl_Multi_Label*)(item->label())); if (i == imap->end()) return 0; if (i->first->typeb == FL_NORMAL_LABEL) return i->first->labelb + 1; else // disabled icons return i->first->labela; } else #endif return item->label(); } const char* get_icon_label_text(Fl_Menu_Item* item) { return get_icon_label_text_(item); } const char* get_icon_label_text(Fl_Widget* w) { return get_icon_label_text_(w); } template <typename T> void free_icon_label_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == FL_NORMAL_LABEL) { delete [] item->label(); item->label(0); return; } imap_t::iterator i = imap->find((Fl_Multi_Label*)item->label()); if (i == imap->end()) return; item->label(0); // delete the images delete i->second[0]; delete i->second[1]; delete [] i->second; // delete the multi label delete [] ((i->first->typeb == FL_NORMAL_LABEL) ? i->first->labelb : i->first->labela-1); delete i->first; imap->erase(i); #endif } void free_icon_label(Fl_Menu_Item* item) { free_icon_label_(item); } void free_icon_label(Fl_Widget* w) { free_icon_label_(w); } template <typename T> void set_active_(T* t, bool v) { if (v) t->activate(); else t->deactivate(); if (t->labeltype() == _FL_MULTI_LABEL) set_icon_label(t); } void set_active(Fl_Menu_Item* item, bool v) { set_active_(item, v); } void set_active(Fl_Widget* w, bool v) { set_active_(w, v); } static Fl_Image* msg_icon; void set_message_icon(const char** pixmap) { if (msg_icon && msg_icon->data() == pixmap) return; delete msg_icon; Fl_Widget* msg = fl_message_icon(); msg->label(""); msg->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE); msg->color(msg->parent()->color()); msg->box(FL_NO_BOX); msg->image(msg_icon = new Fl_Pixmap(pixmap)); } } // icons ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Buffer_mod_1_3.cxx�������������������������������������������������0000664�0001750�0001750�00000131452�12330516146�016754� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Buffer_mod.cxx 8040 2010-12-15 17:38:39Z manolo $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <FL/fl_utf8.h> #include "missing_strings.h" #include <ctype.h> #include <FL/Fl.H> #include <FL/fl_ask.H> #include "Fl_Text_Buffer_mod.H" /* This file is based on a port of NEdit to FLTK many years ago. NEdit at that point was already stretched beyond the task it was designed for which explains why the source code is sometimes pretty convoluted. It still is a very useful widget for FLTK, and we are thankful that the nedit team allowed us to integrate their code. With the introduction of Unicode and UTF-8, Fl_Text_... has to go into a whole new generation of code. Originally designed for monospaced fonts only, many features make less sense in the multibyte and multiwidth world of UTF-8. Columns are a good example. There is simply no such thing. The new Fl_Text_... widget converts columns to pixels by multiplying them with the average character width for a given font. Rectangular selections were rarely used (if at all) and make little sense when using variable width fonts. They have been removed. Using multiple spaces to emulate tab stops has been replaced by pixel counting routines. They are slower, but give the expected result for proportional fonts. And constantly recalculating character widths is just much too expensive. Lines of text are now subdivided into blocks of text which are measured at once instead of individual characters. */ #ifndef min static int max(int i1, int i2) { return i1 >= i2 ? i1 : i2; } static int min(int i1, int i2) { return i1 <= i2 ? i1 : i2; } #endif static char *undobuffer; static int undobufferlength; static Fl_Text_Buffer_mod *undowidget; static int undoat; // points after insertion static int undocut; // number of characters deleted there static int undoinsert; // number of characters inserted static int undoyankcut; // length of valid contents of buffer, even if undocut=0 /* Resize the undo buffer to match at least the requested size. */ static void undobuffersize(int n) { if (n > undobufferlength) { if (undobuffer) { do { undobufferlength *= 2; } while (undobufferlength < n); undobuffer = (char *) realloc(undobuffer, undobufferlength); } else { undobufferlength = n + 9; undobuffer = (char *) malloc(undobufferlength); } } } static void def_transcoding_warning_action(Fl_Text_Buffer_mod *text) { fl_alert("%s", text->file_encoding_warning_message); } /* Initialize all variables. */ Fl_Text_Buffer_mod::Fl_Text_Buffer_mod(int requestedSize, int preferredGapSize) { mLength = 0; mPreferredGapSize = preferredGapSize; mBuf = (char *) malloc(requestedSize + mPreferredGapSize); mGapStart = 0; mGapEnd = mPreferredGapSize; mTabDist = 8; mPrimary.mSelected = 0; mPrimary.mStart = mPrimary.mEnd = 0; mSecondary.mSelected = 0; mSecondary.mStart = mSecondary.mEnd = 0; mHighlight.mSelected = 0; mHighlight.mStart = mHighlight.mEnd = 0; mModifyProcs = NULL; mCbArgs = NULL; mNModifyProcs = 0; mNPredeleteProcs = 0; mPredeleteProcs = NULL; mPredeleteCbArgs = NULL; mCursorPosHint = 0; mCanUndo = 1; input_file_was_transcoded = 0; transcoding_warning_action = def_transcoding_warning_action; } /* Free all resources. */ Fl_Text_Buffer_mod::~Fl_Text_Buffer_mod() { free(mBuf); if (mNModifyProcs != 0) { delete[]mModifyProcs; delete[]mCbArgs; } if (mNPredeleteProcs != 0) { delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; } } /* This function copies verbose whatever is in front and after the gap into a single buffer. */ char *Fl_Text_Buffer_mod::text() const { char *t = (char *) malloc(mLength + 1); memcpy(t, mBuf, mGapStart); memcpy(t+mGapStart, mBuf+mGapEnd, mLength - mGapStart); t[mLength] = '\0'; return t; } /* Set the text buffer to a new string. */ void Fl_Text_Buffer_mod::text(const char *t) { IS_UTF8_ALIGNED(t) call_predelete_callbacks(0, length()); /* Save information for redisplay, and get rid of the old buffer */ const char *deletedText = text(); int deletedLength = mLength; free((void *) mBuf); /* Start a new buffer with a gap of mPreferredGapSize at the end */ int insertedLength = strlen(t); mBuf = (char *) malloc(insertedLength + mPreferredGapSize); mLength = insertedLength; mGapStart = insertedLength; mGapEnd = mGapStart + mPreferredGapSize; memcpy(mBuf, t, insertedLength); /* Zero all of the existing selections */ update_selections(0, deletedLength, 0); /* Call the saved display routine(s) to update the screen */ call_modify_callbacks(0, deletedLength, insertedLength, 0, deletedText); free((void *) deletedText); } /* Creates a range of text to a new buffer and copies verbose from around the gap. */ char *Fl_Text_Buffer_mod::text_range(int start, int end) const { IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) char *s = NULL; /* Make sure start and end are ok, and allocate memory for returned string. If start is bad, return "", if end is bad, adjust it. */ if (start < 0 || start > mLength) { s = (char *) malloc(1); s[0] = '\0'; return s; } if (end < start) { int temp = start; start = end; end = temp; } if (end > mLength) end = mLength; int copiedLength = end - start; s = (char *) malloc(copiedLength + 1); /* Copy the text from the buffer to the returned string */ if (end <= mGapStart) { memcpy(s, mBuf + start, copiedLength); } else if (start >= mGapStart) { memcpy(s, mBuf + start + (mGapEnd - mGapStart), copiedLength); } else { int part1Length = mGapStart - start; memcpy(s, mBuf + start, part1Length); memcpy(s + part1Length, mBuf + mGapEnd, copiedLength - part1Length); } s[copiedLength] = '\0'; return s; } /* Return a UCS-4 character at the given index. Pos must be at a character boundary. */ unsigned int Fl_Text_Buffer_mod::char_at(int pos) const { if (pos < 0 || pos >= mLength) return '\0'; IS_UTF8_ALIGNED2(this, (pos)) const char *src = address(pos); return fl_utf8decode(src, 0, 0); } /* Return the raw byte at the given index. This function ignores all unicode encoding. */ char Fl_Text_Buffer_mod::byte_at(int pos) const { if (pos < 0 || pos >= mLength) return '\0'; const char *src = address(pos); return *src; } /* Insert some text at the given index. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::insert(int pos, const char *text) { IS_UTF8_ALIGNED2(this, (pos)) IS_UTF8_ALIGNED(text) /* check if there is actually any text */ if (!text || !*text) return; /* if pos is not contiguous to existing text, make it */ if (pos > mLength) pos = mLength; if (pos < 0) pos = 0; /* Even if nothing is deleted, we must call these callbacks */ call_predelete_callbacks(pos, 0); /* insert and redisplay */ int nInserted = insert_(pos, text); mCursorPosHint = pos + nInserted; IS_UTF8_ALIGNED2(this, (mCursorPosHint)) call_modify_callbacks(pos, 0, nInserted, 0, NULL); } /* Replace a range of text with new text. Start and end must be at a character boundary. */ void Fl_Text_Buffer_mod::replace(int start, int end, const char *text) { // Range check... if (!text) return; if (start < 0) start = 0; if (end > mLength) end = mLength; IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) IS_UTF8_ALIGNED(text) call_predelete_callbacks(start, end - start); const char *deletedText = text_range(start, end); remove_(start, end); int nInserted = insert_(start, text); mCursorPosHint = start + nInserted; call_modify_callbacks(start, end - start, nInserted, 0, deletedText); free((void *) deletedText); } /* Remove a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::remove(int start, int end) { /* Make sure the arguments make sense */ if (start > end) { int temp = start; start = end; end = temp; } if (start > mLength) start = mLength; if (start < 0) start = 0; if (end > mLength) end = mLength; if (end < 0) end = 0; IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) if (start == end) return; call_predelete_callbacks(start, end - start); /* Remove and redisplay */ const char *deletedText = text_range(start, end); remove_(start, end); mCursorPosHint = start; call_modify_callbacks(start, end - start, 0, 0, deletedText); free((void *) deletedText); } /* Copy a range of text from another text buffer. fromStart, fromEnd, and toPos must be at a character boundary. */ void Fl_Text_Buffer_mod::copy(Fl_Text_Buffer_mod * fromBuf, int fromStart, int fromEnd, int toPos) { IS_UTF8_ALIGNED2(fromBuf, fromStart) IS_UTF8_ALIGNED2(fromBuf, fromEnd) IS_UTF8_ALIGNED2(this, (toPos)) int copiedLength = fromEnd - fromStart; /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of mPreferredGapSize */ if (copiedLength > mGapEnd - mGapStart) reallocate_with_gap(toPos, copiedLength + mPreferredGapSize); else if (toPos != mGapStart) move_gap(toPos); /* Insert the new text (toPos now corresponds to the start of the gap) */ if (fromEnd <= fromBuf->mGapStart) { memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], copiedLength); } else if (fromStart >= fromBuf->mGapStart) { memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart + (fromBuf->mGapEnd - fromBuf->mGapStart)], copiedLength); } else { int part1Length = fromBuf->mGapStart - fromStart; memcpy(&mBuf[toPos], &fromBuf->mBuf[fromStart], part1Length); memcpy(&mBuf[toPos + part1Length], &fromBuf->mBuf[fromBuf->mGapEnd], copiedLength - part1Length); } mGapStart += copiedLength; mLength += copiedLength; update_selections(toPos, 0, copiedLength); } /* Take the previous changes and undo them. Return the previous cursor position in cursorPos. Returns 1 if the undo was applied. CursorPos will be at a character boundary. */ int Fl_Text_Buffer_mod::undo(int *cursorPos) { if (undowidget != this || (!undocut && !undoinsert && !mCanUndo)) return 0; int ilen = undocut; int xlen = undoinsert; int b = undoat - xlen; if (xlen && undoyankcut && !ilen) { ilen = undoyankcut; } if (xlen && ilen) { undobuffersize(ilen + 1); undobuffer[ilen] = 0; char *tmp = strdup(undobuffer); replace(b, undoat, tmp); if (cursorPos) *cursorPos = mCursorPosHint; free(tmp); } else if (xlen) { remove(b, undoat); if (cursorPos) *cursorPos = mCursorPosHint; } else if (ilen) { undobuffersize(ilen + 1); undobuffer[ilen] = 0; insert(undoat, undobuffer); if (cursorPos) *cursorPos = mCursorPosHint; undoyankcut = 0; } return 1; } /* Set a flag if undo function will work. */ void Fl_Text_Buffer_mod::canUndo(char flag) { mCanUndo = flag; // disabling undo also clears the last undo operation! if (!mCanUndo && undowidget==this) undowidget = 0; } /* Change the tab width. This will cause a couple of callbacks and a complete redisplay. Matt: I am not entirely sure why we need to trigger callbacks because tabs are only a graphical hint, not changing any text at all, but I leave this in here for back compatibility. */ void Fl_Text_Buffer_mod::tab_distance(int tabDist) { /* First call the pre-delete callbacks with the previous tab setting still active. */ call_predelete_callbacks(0, mLength); /* Change the tab setting */ mTabDist = tabDist; /* Force any display routines to redisplay everything (unfortunately, this means copying the whole buffer contents to provide "deletedText" */ const char *deletedText = text(); call_modify_callbacks(0, mLength, mLength, 0, deletedText); free((void *) deletedText); } /* Select a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::select(int start, int end) { IS_UTF8_ALIGNED2(this, (start)) IS_UTF8_ALIGNED2(this, (end)) Fl_Text_Selection_mod oldSelection = mPrimary; mPrimary.set(start, end); redisplay_selection(&oldSelection, &mPrimary); } /* Clear the primary selection. */ void Fl_Text_Buffer_mod::unselect() { Fl_Text_Selection_mod oldSelection = mPrimary; mPrimary.mSelected = 0; redisplay_selection(&oldSelection, &mPrimary); } /* Return the primary selection range. */ int Fl_Text_Buffer_mod::selection_position(int *start, int *end) { return mPrimary.position(start, end); } /* Return a copy of the selected text. */ char *Fl_Text_Buffer_mod::selection_text() { return selection_text_(&mPrimary); } /* Remove the selected text. */ void Fl_Text_Buffer_mod::remove_selection() { remove_selection_(&mPrimary); } /* Replace the selected text. */ void Fl_Text_Buffer_mod::replace_selection(const char *text) { replace_selection_(&mPrimary, text); } /* Select text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::secondary_select(int start, int end) { Fl_Text_Selection_mod oldSelection = mSecondary; mSecondary.set(start, end); redisplay_selection(&oldSelection, &mSecondary); } /* Deselect text. */ void Fl_Text_Buffer_mod::secondary_unselect() { Fl_Text_Selection_mod oldSelection = mSecondary; mSecondary.mSelected = 0; redisplay_selection(&oldSelection, &mSecondary); } /* Return the selected range. */ int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end) { return mSecondary.position(start, end); } /* Return a copy of the text in this selection. */ char *Fl_Text_Buffer_mod::secondary_selection_text() { return selection_text_(&mSecondary); } /* Remove the selected text. */ void Fl_Text_Buffer_mod::remove_secondary_selection() { remove_selection_(&mSecondary); } /* Replace selected text. */ void Fl_Text_Buffer_mod::replace_secondary_selection(const char *text) { replace_selection_(&mSecondary, text); } /* Highlight a range of text. Start and End must be at a character boundary. */ void Fl_Text_Buffer_mod::highlight(int start, int end) { Fl_Text_Selection_mod oldSelection = mHighlight; mHighlight.set(start, end); redisplay_selection(&oldSelection, &mHighlight); } /* Remove text highlighting. */ void Fl_Text_Buffer_mod::unhighlight() { Fl_Text_Selection_mod oldSelection = mHighlight; mHighlight.mSelected = 0; redisplay_selection(&oldSelection, &mHighlight); } /* Return position of highlight. */ int Fl_Text_Buffer_mod::highlight_position(int *start, int *end) { return mHighlight.position(start, end); } /* Return a copy of highlighted text. */ char *Fl_Text_Buffer_mod::highlight_text() { return selection_text_(&mHighlight); } /* Add a callback that is called whenever text is modified. */ void Fl_Text_Buffer_mod::add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) { Fl_Text_Modify_Cb *newModifyProcs = new Fl_Text_Modify_Cb[mNModifyProcs + 1]; void **newCBArgs = new void *[mNModifyProcs + 1]; for (int i = 0; i < mNModifyProcs; i++) { newModifyProcs[i + 1] = mModifyProcs[i]; newCBArgs[i + 1] = mCbArgs[i]; } if (mNModifyProcs != 0) { delete[]mModifyProcs; delete[]mCbArgs; } newModifyProcs[0] = bufModifiedCB; newCBArgs[0] = cbArg; mNModifyProcs++; mModifyProcs = newModifyProcs; mCbArgs = newCBArgs; } /* Remove a callback. */ void Fl_Text_Buffer_mod::remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) { int i, toRemove = -1; /* find the matching callback to remove */ for (i = 0; i < mNModifyProcs; i++) { if (mModifyProcs[i] == bufModifiedCB && mCbArgs[i] == cbArg) { toRemove = i; break; } } if (toRemove == -1) { Fl::error ("Fl_Text_Buffer_mod::remove_modify_callback(): Can't find modify CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNModifyProcs--; if (mNModifyProcs == 0) { mNModifyProcs = 0; delete[]mModifyProcs; mModifyProcs = NULL; delete[]mCbArgs; mCbArgs = NULL; return; } Fl_Text_Modify_Cb *newModifyProcs = new Fl_Text_Modify_Cb[mNModifyProcs]; void **newCBArgs = new void *[mNModifyProcs]; /* copy out the remaining members and free the old lists */ for (i = 0; i < toRemove; i++) { newModifyProcs[i] = mModifyProcs[i]; newCBArgs[i] = mCbArgs[i]; } for (; i < mNModifyProcs; i++) { newModifyProcs[i] = mModifyProcs[i + 1]; newCBArgs[i] = mCbArgs[i + 1]; } delete[]mModifyProcs; delete[]mCbArgs; mModifyProcs = newModifyProcs; mCbArgs = newCBArgs; } /* Add a callback that is called before deleting text. */ void Fl_Text_Buffer_mod::add_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { Fl_Text_Predelete_Cb *newPreDeleteProcs = new Fl_Text_Predelete_Cb[mNPredeleteProcs + 1]; void **newCBArgs = new void *[mNPredeleteProcs + 1]; for (int i = 0; i < mNPredeleteProcs; i++) { newPreDeleteProcs[i + 1] = mPredeleteProcs[i]; newCBArgs[i + 1] = mPredeleteCbArgs[i]; } if (!mNPredeleteProcs != 0) { delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; } newPreDeleteProcs[0] = bufPreDeleteCB; newCBArgs[0] = cbArg; mNPredeleteProcs++; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } /* Remove a callback. */ void Fl_Text_Buffer_mod::remove_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { int i, toRemove = -1; /* find the matching callback to remove */ for (i = 0; i < mNPredeleteProcs; i++) { if (mPredeleteProcs[i] == bufPreDeleteCB && mPredeleteCbArgs[i] == cbArg) { toRemove = i; break; } } if (toRemove == -1) { Fl::error ("Fl_Text_Buffer_mod::remove_predelete_callback(): Can't find pre-delete CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNPredeleteProcs--; if (mNPredeleteProcs == 0) { mNPredeleteProcs = 0; delete[]mPredeleteProcs; mPredeleteProcs = NULL; delete[]mPredeleteCbArgs; mPredeleteCbArgs = NULL; return; } Fl_Text_Predelete_Cb *newPreDeleteProcs = new Fl_Text_Predelete_Cb[mNPredeleteProcs]; void **newCBArgs = new void *[mNPredeleteProcs]; /* copy out the remaining members and free the old lists */ for (i = 0; i < toRemove; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i]; newCBArgs[i] = mPredeleteCbArgs[i]; } for (; i < mNPredeleteProcs; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i + 1]; newCBArgs[i] = mPredeleteCbArgs[i + 1]; } delete[]mPredeleteProcs; delete[]mPredeleteCbArgs; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } /* Return a copy of the line that contains a given index. Pos must be at a character boundary. */ char *Fl_Text_Buffer_mod::line_text(int pos) const { return text_range(line_start(pos), line_end(pos)); } /* Find the beginning of the line. */ int Fl_Text_Buffer_mod::line_start(int pos) const { if (!findchar_backward(pos, '\n', &pos)) return 0; return pos + 1; } /* Find the end of the line. */ int Fl_Text_Buffer_mod::line_end(int pos) const { if (!findchar_forward(pos, '\n', &pos)) pos = mLength; return pos; } /* Find the beginning of a word. NOT UNICODE SAFE. */ int Fl_Text_Buffer_mod::word_start(int pos) const { // FIXME: character is ucs-4 while (pos>0 && (isalnum(char_at(pos)) || char_at(pos) == '_')) { pos = prev_char(pos); } // FIXME: character is ucs-4 if (!(isalnum(char_at(pos)) || char_at(pos) == '_')) pos = next_char(pos); return pos; } /* ** Search backwards in buffer for characters in "searchChars", starting ** with the character BEFORE "startPos", returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_backward( int startPos, const char *searchChars, int *foundPos ) { int pos = startPos; const char *c; char ch = 0; if ( startPos == 0 ) { *foundPos = 0; return 0; } while ( pos > 0 ) { ch = char_at(pos); for ( c = searchChars; *c != '\0'; c++ ) { if ( ch == *c ) { *foundPos = pos; return 1; } } pos = prev_char(pos); } *foundPos = 0; return 0; } /* Find the end of a word. NOT UNICODE SAFE. */ int Fl_Text_Buffer_mod::word_end(int pos) const { // FIXME: character is ucs-4 while (pos < length() && (isalnum(char_at(pos)) || char_at(pos) == '_')) { pos = next_char(pos); } return pos; } /* ** Search forwards in buffer for characters in "searchChars", starting ** with the character "startPos", and returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_forward( int startPos, const char *searchChars, int *foundPos ) { int pos = startPos; const char *c; char ch = 0; while ( pos < length() ) { ch = char_at(pos); for ( c = searchChars; *c != '\0'; c++ ) { if ( ch == *c ) { *foundPos = pos; return 1; } } pos = next_char(pos); } *foundPos = length(); return 0; } /* Count the number of characters between two positions. */ int Fl_Text_Buffer_mod::count_displayed_characters(int lineStartPos, int targetPos) const { IS_UTF8_ALIGNED2(this, (lineStartPos)) IS_UTF8_ALIGNED2(this, (targetPos)) int charCount = 0; int pos = lineStartPos; while (pos < targetPos) { pos = next_char(pos); charCount++; } return charCount; } /* Skip ahead a number of characters from a given index. This function breaks early if it encounters a newline character. */ int Fl_Text_Buffer_mod::skip_displayed_characters(int lineStartPos, int nChars) { IS_UTF8_ALIGNED2(this, (lineStartPos)) int pos = lineStartPos; for (int charCount = 0; charCount < nChars && pos < mLength; charCount++) { unsigned int c = char_at(pos); if (c == '\n') return pos; pos = next_char(pos); } return pos; } /* Count the number of newline characters between start and end. startPos and endPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::count_lines(int startPos, int endPos) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED2(this, (endPos)) int gapLen = mGapEnd - mGapStart; int lineCount = 0; int pos = startPos; while (pos < mGapStart) { if (pos == endPos) return lineCount; if (mBuf[pos++] == '\n') lineCount++; } while (pos < mLength) { if (pos == endPos) return lineCount; if (mBuf[pos++ + gapLen] == '\n') lineCount++; } return lineCount; } /* Skip to the first character, n lines ahead. StartPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::skip_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(this, (startPos)) if (nLines == 0) return startPos; int gapLen = mGapEnd - mGapStart; int pos = startPos; int lineCount = 0; while (pos < mGapStart) { if (mBuf[pos++] == '\n') { lineCount++; if (lineCount == nLines) { IS_UTF8_ALIGNED2(this, (pos)) return pos; } } } while (pos < mLength) { if (mBuf[pos++ + gapLen] == '\n') { lineCount++; if (lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos)) return pos; } } } IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Skip to the first character, n lines back. StartPos must be at a character boundary. This function is optimized for speed by not using UTF-8 calls. */ int Fl_Text_Buffer_mod::rewind_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(this, (startPos)) int pos = startPos - 1; if (pos <= 0) return 0; int gapLen = mGapEnd - mGapStart; int lineCount = -1; while (pos >= mGapStart) { if (mBuf[pos + gapLen] == '\n') { if (++lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos+1)) return pos + 1; } } pos--; } while (pos >= 0) { if (mBuf[pos] == '\n') { if (++lineCount >= nLines) { IS_UTF8_ALIGNED2(this, (pos+1)) return pos + 1; } } pos--; } return 0; } /* Find a matching string in the buffer. */ int Fl_Text_Buffer_mod::search_forward(int startPos, const char *searchString, int *foundPos, int matchCase) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED(searchString) if (!searchString) return 0; int bp; const char *sp; if (matchCase) { while (startPos < length()) { bp = startPos; sp = searchString; for (;;) { char c = *sp; // we reached the end of the "needle", so we found the string! if (!c) { *foundPos = startPos; return 1; } int l = fl_utf8len1(c); if (memcmp(sp, address(bp), l)) break; sp += l; bp += l; } startPos = next_char(startPos); } } else { while (startPos < length()) { bp = startPos; sp = searchString; for (;;) { // we reached the end of the "needle", so we found the string! if (!*sp) { *foundPos = startPos; return 1; } int l; unsigned int b = char_at(bp); unsigned int s = fl_utf8decode(sp, 0, &l); if (fl_tolower(b)!=fl_tolower(s)) break; sp += l; bp = next_char(bp); } startPos = next_char(startPos); } } return 0; } int Fl_Text_Buffer_mod::search_backward(int startPos, const char *searchString, int *foundPos, int matchCase) const { IS_UTF8_ALIGNED2(this, (startPos)) IS_UTF8_ALIGNED(searchString) if (!searchString) return 0; int bp; const char *sp; if (matchCase) { while (startPos >= 0) { bp = startPos; sp = searchString; for (;;) { char c = *sp; // we reached the end of the "needle", so we found the string! if (!c) { *foundPos = startPos; return 1; } int l = fl_utf8len1(c); if (memcmp(sp, address(bp), l)) break; sp += l; bp += l; } startPos = prev_char(startPos); } } else { while (startPos >= 0) { bp = startPos; sp = searchString; for (;;) { // we reached the end of the "needle", so we found the string! if (!*sp) { *foundPos = startPos; return 1; } int l; unsigned int b = char_at(bp); unsigned int s = fl_utf8decode(sp, 0, &l); if (fl_tolower(b)!=fl_tolower(s)) break; sp += l; bp = next_char(bp); } startPos = prev_char(startPos); } } return 0; } /* Insert a string into the buffer. Pos must be at a character boundary. Text must be a correct UTF-8 string. */ int Fl_Text_Buffer_mod::insert_(int pos, const char *text) { if (!text || !*text) return 0; int insertedLength = strlen(text); /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of mPreferredGapSize */ if (insertedLength > mGapEnd - mGapStart) reallocate_with_gap(pos, insertedLength + mPreferredGapSize); else if (pos != mGapStart) move_gap(pos); /* Insert the new text (pos now corresponds to the start of the gap) */ memcpy(&mBuf[pos], text, insertedLength); mGapStart += insertedLength; mLength += insertedLength; update_selections(pos, 0, insertedLength); if (mCanUndo) { if (undowidget == this && undoat == pos && undoinsert) { undoinsert += insertedLength; } else { undoinsert = insertedLength; undoyankcut = (undoat == pos) ? undocut : 0; } undoat = pos + insertedLength; undocut = 0; undowidget = this; } return insertedLength; } /* Remove a string from the buffer. Unicode safe. Start and end must be at a character boundary. */ void Fl_Text_Buffer_mod::remove_(int start, int end) { /* if the gap is not contiguous to the area to remove, move it there */ if (mCanUndo) { if (undowidget == this && undoat == end && undocut) { undobuffersize(undocut + end - start + 1); memmove(undobuffer + end - start, undobuffer, undocut); undocut += end - start; } else { undocut = end - start; undobuffersize(undocut); } undoat = start; undoinsert = 0; undoyankcut = 0; undowidget = this; } if (start > mGapStart) { if (mCanUndo) memcpy(undobuffer, mBuf + (mGapEnd - mGapStart) + start, end - start); move_gap(start); } else if (end < mGapStart) { if (mCanUndo) memcpy(undobuffer, mBuf + start, end - start); move_gap(end); } else { int prelen = mGapStart - start; if (mCanUndo) { memcpy(undobuffer, mBuf + start, prelen); memcpy(undobuffer + prelen, mBuf + mGapEnd, end - start - prelen); } } /* expand the gap to encompass the deleted characters */ mGapEnd += end - mGapStart; mGapStart -= mGapStart - start; /* update the length */ mLength -= end - start; /* fix up any selections which might be affected by the change */ update_selections(start, end - start, 0); } /* simple setter. Unicode safe. Start and end must be at a character boundary. */ void Fl_Text_Selection_mod::set(int startpos, int endpos) { mSelected = startpos != endpos; mStart = min(startpos, endpos); mEnd = max(startpos, endpos); } /* simple getter. Unicode safe. Start and end will be at a character boundary. */ int Fl_Text_Selection_mod::position(int *startpos, int *endpos) const { if (!mSelected) return 0; *startpos = mStart; *endpos = mEnd; return 1; } /* Return if a position is inside the selected area. Unicode safe. Pos must be at a character boundary. */ int Fl_Text_Selection_mod::includes(int pos) const { return (selected() && pos >= start() && pos < end() ); } /* Return a duplicate of the selected text, or an empty string. Unicode safe. */ char *Fl_Text_Buffer_mod::selection_text_(Fl_Text_Selection_mod * sel) const { int start, end; /* If there's no selection, return an allocated empty string */ if (!sel->position(&start, &end)) { char *s = (char *) malloc(1); *s = '\0'; return s; } /* Return the selected range */ return text_range(start, end); } /* Remove the selected text. Unicode safe. */ void Fl_Text_Buffer_mod::remove_selection_(Fl_Text_Selection_mod * sel) { int start, end; if (!sel->position(&start, &end)) return; remove(start, end); //undoyankcut = undocut; } /* Replace selection with text. Unicode safe. */ void Fl_Text_Buffer_mod::replace_selection_(Fl_Text_Selection_mod * sel, const char *text) { Fl_Text_Selection_mod oldSelection = *sel; /* If there's no selection, return */ int start, end; if (!sel->position(&start, &end)) return; /* Do the appropriate type of replace */ replace(start, end, text); /* Unselect (happens automatically in BufReplace, but BufReplaceRect can't detect when the contents of a selection goes away) */ sel->mSelected = 0; redisplay_selection(&oldSelection, sel); } /* Call all callbacks. Unicode safe. */ void Fl_Text_Buffer_mod::call_modify_callbacks(int pos, int nDeleted, int nInserted, int nRestyled, const char *deletedText) const { IS_UTF8_ALIGNED2(this, pos) for (int i = 0; i < mNModifyProcs; i++) (*mModifyProcs[i]) (pos, nInserted, nDeleted, nRestyled, deletedText, mCbArgs[i]); } /* Call all callbacks. Unicode safe. */ void Fl_Text_Buffer_mod::call_predelete_callbacks(int pos, int nDeleted) const { for (int i = 0; i < mNPredeleteProcs; i++) (*mPredeleteProcs[i]) (pos, nDeleted, mPredeleteCbArgs[i]); } /* Redisplay a new selected area. Unicode safe. */ void Fl_Text_Buffer_mod::redisplay_selection(Fl_Text_Selection_mod * oldSelection, Fl_Text_Selection_mod * newSelection) const { int oldStart, oldEnd, newStart, newEnd, ch1Start, ch1End, ch2Start, ch2End; /* If either selection is rectangular, add an additional character to the end of the selection to request the redraw routines to wipe out the parts of the selection beyond the end of the line */ oldStart = oldSelection->mStart; newStart = newSelection->mStart; oldEnd = oldSelection->mEnd; newEnd = newSelection->mEnd; /* If the old or new selection is unselected, just redisplay the single area that is (was) selected and return */ if (!oldSelection->mSelected && !newSelection->mSelected) return; if (!oldSelection->mSelected) { call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL); return; } if (!newSelection->mSelected) { call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL); return; } /* If the selections are non-contiguous, do two separate updates and return */ if (oldEnd < newStart || newEnd < oldStart) { call_modify_callbacks(oldStart, 0, 0, oldEnd - oldStart, NULL); call_modify_callbacks(newStart, 0, 0, newEnd - newStart, NULL); return; } /* Otherwise, separate into 3 separate regions: ch1, and ch2 (the two changed areas), and the unchanged area of their intersection, and update only the changed area(s) */ ch1Start = min(oldStart, newStart); ch2End = max(oldEnd, newEnd); ch1End = max(oldStart, newStart); ch2Start = min(oldEnd, newEnd); if (ch1Start != ch1End) call_modify_callbacks(ch1Start, 0, 0, ch1End - ch1Start, NULL); if (ch2Start != ch2End) call_modify_callbacks(ch2Start, 0, 0, ch2End - ch2Start, NULL); } /* Move the gap around without changing buffer content. Unicode safe. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::move_gap(int pos) { int gapLen = mGapEnd - mGapStart; if (pos > mGapStart) memmove(&mBuf[mGapStart], &mBuf[mGapEnd], pos - mGapStart); else memmove(&mBuf[pos + gapLen], &mBuf[pos], mGapStart - pos); mGapEnd += pos - mGapStart; mGapStart += pos - mGapStart; } /* Create a larger gap. Unicode safe. Start must be at a character boundary. */ void Fl_Text_Buffer_mod::reallocate_with_gap(int newGapStart, int newGapLen) { char *newBuf = (char *) malloc(mLength + newGapLen); int newGapEnd = newGapStart + newGapLen; if (newGapStart <= mGapStart) { memcpy(newBuf, mBuf, newGapStart); memcpy(&newBuf[newGapEnd], &mBuf[newGapStart], mGapStart - newGapStart); memcpy(&newBuf[newGapEnd + mGapStart - newGapStart], &mBuf[mGapEnd], mLength - mGapStart); } else { /* newGapStart > mGapStart */ memcpy(newBuf, mBuf, mGapStart); memcpy(&newBuf[mGapStart], &mBuf[mGapEnd], newGapStart - mGapStart); memcpy(&newBuf[newGapEnd], &mBuf[mGapEnd + newGapStart - mGapStart], mLength - newGapStart); } free((void *) mBuf); mBuf = newBuf; mGapStart = newGapStart; mGapEnd = newGapEnd; } /* Update selection range if characters were inserted. Unicode safe. Pos must be at a character boundary. */ void Fl_Text_Buffer_mod::update_selections(int pos, int nDeleted, int nInserted) { mPrimary.update(pos, nDeleted, nInserted); mSecondary.update(pos, nDeleted, nInserted); mHighlight.update(pos, nDeleted, nInserted); } // unicode safe, assuming the arguments are on character boundaries void Fl_Text_Selection_mod::update(int pos, int nDeleted, int nInserted) { if (!mSelected || pos > mEnd) return; if (pos + nDeleted <= mStart) { mStart += nInserted - nDeleted; mEnd += nInserted - nDeleted; } else if (pos <= mStart && pos + nDeleted >= mEnd) { mStart = pos; mEnd = pos; mSelected = 0; } else if (pos <= mStart && pos + nDeleted < mEnd) { mStart = pos; mEnd = nInserted + mEnd - nDeleted; } else if (pos < mEnd) { mEnd += nInserted - nDeleted; if (mEnd <= mStart) mSelected = 0; } } /* Find a UCS-4 character. StartPos must be at a character boundary, searchChar is UCS-4 encoded. */ int Fl_Text_Buffer_mod::findchar_forward(int startPos, unsigned searchChar, int *foundPos) const { if (startPos >= mLength) { *foundPos = mLength; return 0; } if (startPos<0) startPos = 0; for ( ; startPos<mLength; startPos = next_char(startPos)) { if (searchChar == char_at(startPos)) { *foundPos = startPos; return 1; } } *foundPos = mLength; return 0; } /* Find a UCS-4 character. StartPos must be at a character boundary, searchChar is UCS-4 encoded. */ int Fl_Text_Buffer_mod::findchar_backward(int startPos, unsigned int searchChar, int *foundPos) const { if (startPos <= 0) { *foundPos = 0; return 0; } if (startPos > mLength) startPos = mLength; for (startPos = prev_char(startPos); startPos>=0; startPos = prev_char(startPos)) { if (searchChar == char_at(startPos)) { *foundPos = startPos; return 1; } } *foundPos = 0; return 0; } //#define EXAMPLE_ENCODING // shows how to process any encoding for which a decoding function exists #ifdef EXAMPLE_ENCODING // returns the UCS equivalent of *p in CP1252 and advances p by 1 unsigned cp1252toucs(char* &p) { // Codes 0x80..0x9f from the Microsoft CP1252 character set, translated // to Unicode static unsigned cp1252[32] = { 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x017d, 0x008f, 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x017e, 0x0178 }; unsigned char uc = *(unsigned char*)p; p++; return (uc < 0x80 || uc >= 0xa0 ? uc : cp1252[uc - 0x80]); } // returns the UCS equivalent of *p in UTF-16 and advances p by 2 (or more for surrogates) unsigned utf16toucs(char* &p) { union { #if WORDS_BIGENDIAN struct { unsigned char a, b;} chars; #else struct { unsigned char b, a;} chars; #endif U16 short_val; } u; u.chars.a = *(unsigned char*)p++; u.chars.b = *(unsigned char*)p++; return u.short_val; } // filter that produces, from an input stream fed by reading from fp, // a UTF-8-encoded output stream written in buffer. // Input can be any (e.g., 8-bit, UTF-16) encoding. // Output is true UTF-8. // p_trf points to a function that transforms encoded byte(s) into one UCS // and that increases the pointer by the adequate quantity static int general_input_filter(char *buffer, int buflen, char *line, int sline, char* &endline, unsigned (*p_trf)(char* &), FILE *fp) { char *p, *q, multibyte[5]; int lq, r, offset; p = endline = line; q = buffer; while (q < buffer + buflen) { if (p >= endline) { r = fread(line, 1, sline, fp); endline = line + r; if (r == 0) return q - buffer; p = line; } if (q + 4 /*max width of utf-8 char*/ > buffer + buflen) { memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } lq = fl_utf8encode( p_trf(p), multibyte ); memcpy(q, multibyte, lq); q += lq; } memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } #endif // EXAMPLE_ENCODING /* filter that produces, from an input stream fed by reading from fp, a UTF-8-encoded output stream written in buffer. Input can be UTF-8. If it is not, it is decoded with CP1252. Output is UTF-8. *input_was_changed is set to true if the input was not strict UTF-8 so output differs from input. */ static int utf8_input_filter(char *buffer, int buflen, char *line, int sline, char* &endline, FILE *fp, int *input_was_changed) { char *p, *q, multibyte[5]; int l, lp, lq, r; unsigned u; p = endline = line; q = buffer; while (q < buffer + buflen) { if (p >= endline) { r = fread(line, 1, sline, fp); endline = line + r; if (r == 0) return q - buffer; p = line; } l = fl_utf8len1(*p); if (p + l > endline) { memmove(line, p, endline - p); endline -= (p - line); r = fread(endline, 1, sline - (endline - line), fp); endline += r; p = line; if (endline - line < l) break; } while ( l > 0) { u = fl_utf8decode(p, p+l, &lp); lq = fl_utf8encode(u, multibyte); if (lp != l || lq != l) *input_was_changed = true; if (q + lq > buffer + buflen) { memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } memcpy(q, multibyte, lq); q += lq; p += lp; l -= lp; } } memmove(line, p, endline - p); endline -= (p - line); return q - buffer; } const char *Fl_Text_Buffer_mod::file_encoding_warning_message = "Displayed text contains the UTF-8 transcoding\n" "of the input file which was not UTF-8 encoded.\n" "Some changes may have occurred."; /* Insert text from a file. Input file can be of various encodings according to what input fiter is used. utf8_input_filter accepts UTF-8 or CP1252 as input encoding. Output is always UTF-8. */ int Fl_Text_Buffer_mod::insertfile(const char *file, int pos, int buflen) { FILE *fp; if (!(fp = fl_fopen(file, "r"))) return 1; char *buffer = new char[buflen + 1]; char *endline, line[100]; int l; input_file_was_transcoded = false; endline = line; while (true) { #ifdef EXAMPLE_ENCODING // example of 16-bit encoding: UTF-16 l = general_input_filter(buffer, buflen, line, sizeof(line), endline, utf16toucs, // use cp1252toucs to read CP1252-encoded files fp); input_file_was_transcoded = true; #else l = utf8_input_filter(buffer, buflen, line, sizeof(line), endline, fp, &input_file_was_transcoded); #endif if (l == 0) break; buffer[l] = 0; insert(pos, buffer); pos += l; } int e = ferror(fp) ? 2 : 0; fclose(fp); delete[]buffer; if ( (!e) && input_file_was_transcoded && transcoding_warning_action) { transcoding_warning_action(this); } return e; } /* Write text to file. Unicode safe. */ int Fl_Text_Buffer_mod::outputfile(const char *file, int start, int end, int buflen) { FILE *fp; if (!(fp = fl_fopen(file, "w"))) return 1; for (int n; (n = min(end - start, buflen)); start += n) { const char *p = text_range(start, start + n); int r = fwrite(p, 1, n, fp); free((void *) p); if (r != n) break; } int e = ferror(fp) ? 2 : 0; fclose(fp); return e; } /* Return the previous character position. Unicode safe. */ int Fl_Text_Buffer_mod::prev_char_clipped(int pos) const { if (pos<=0) return 0; IS_UTF8_ALIGNED2(this, (pos)) char c; do { pos--; if (pos==0) return 0; c = byte_at(pos); } while ( (c&0xc0) == 0x80); IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Return the previous character position. Returns -1 if the beginning of the buffer is reached. */ int Fl_Text_Buffer_mod::prev_char(int pos) const { if (pos==0) return -1; return prev_char_clipped(pos); } /* Return the next character position. Returns length() if the end of the buffer is reached. */ int Fl_Text_Buffer_mod::next_char(int pos) const { IS_UTF8_ALIGNED2(this, (pos)) int n = fl_utf8len1(byte_at(pos)); pos += n; if (pos>=mLength) return mLength; IS_UTF8_ALIGNED2(this, (pos)) return pos; } /* Return the next character position. If the end of the buffer is reached, it returns the current position. */ int Fl_Text_Buffer_mod::next_char_clipped(int pos) const { return next_char(pos); } /* Align an index to the current UTF-8 boundary. */ int Fl_Text_Buffer_mod::utf8_align(int pos) const { char c = byte_at(pos); while ( (c&0xc0) == 0x80) { pos--; c = byte_at(pos); } return pos; } // // End of "$Id: Fl_Text_Buffer_mod.cxx 8040 2010-12-15 17:38:39Z manolo $". // ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/pixmaps_tango.cxx����������������������������������������������������������0000664�0001750�0001750�00000323155�12330516146�015471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> // This file contains pixmap versions of icons from the Tango Icon Library // (version 0.8.90) at http://tango.freedesktop.org/Tango_Icon_Library // which was released into the Public Domain. This file was prepared by // Kamal Mostafa <kamal@whence.com>, and is likewise released into the // Public Domain. // These #define's map the (new) Tango icon names (named after their source // files) to the pixmap identifier names used throughout the fldigi source: #define tango_x_office_address_book address_book_icon #define tango_applications_system applications_system_icon #define tango_internet_group_chat chat_icon #define tango_dialog_information dialog_information_icon #define tango_edit_clear edit_clear_icon #define tango_edit_copy edit_copy_icon #define tango_edit_cut edit_cut_icon #define tango_edit_paste edit_paste_icon #define tango_edit_select_all edit_select_all_icon #define tango_edit_undo edit_undo_icon #define tango_emblem_system emblems_system_icon #define tango_application_x_executable executable_icon #define tango_document_open file_open_icon #define tango_folder_open folder_open_icon #define tango_help_browser help_browser_icon #define tango_image_x_generic image_icon #define tango_go_previous left_arrow_icon #define tango_system_log_out log_out_icon #define tango_list_remove minus_icon #define tango_multimedia_player multimedia_player_icon #define tango_internet_web_browser net_icon #define tango_list_add plus_icon #define tango_preferences_desktop_font preferences_desktop_font_icon #define tango_process_stop process_stop_icon #define tango_view_refresh refresh_icon #define tango_go_next right_arrow_icon #define tango_document_save_as save_as_icon #define tango_document_save save_icon #define tango_system_shutdown shutdown_icon #define tango_start_here start_here_icon #define tango_system_software_update system_software_update_icon #define tango_system_users system_users_icon #define tango_accessories_text_editor text_editor_icon #define tango_text_x_generic text_icon #define tango_x_office_calendar time_icon #define tango_user_trash trash_icon #define tango_utilities_system_monitor utilities_system_monitor_icon #define tango_utilities_terminal utilities_terminal_icon #define tango48_dialog_information dialog_information_48_icon #define tango48_dialog_warning dialog_warning_48_icon // --------------------------------------------------------------------- // Tango icons // --------------------------------------------------------------------- /* mimetypes/x-office-address-book.png */ /* XPM */ const char *tango_x_office_address_book[] = { /* width height ncolors chars_per_pixel */ "16 16 125 2", /* colors */ " c #000000", " . c #C0D2E4", " X c #ACC3DA", " o c #A78AB1", " O c #9DB029", " + c #C3CFE0", " @ c #9AA5C5", " # c #D8E4F1", " $ c #A7BFD8", " % c #D7E4F0", " & c #99A7C7", " * c #A9B8D0", " = c #D2DEEB", " - c #ABB0BE", " ; c #A887AE", " : c #9CA2C3", " > c #AC80A8", " , c #CBD8E7", " < c #A789B0", " 1 c #617296", " 2 c #AB82AA", " 3 c #C3D0E2", " 4 c #AA84AC", " 5 c #B7CBE0", " 6 c #A9B3CF", " 7 c #8290AC", " 8 c #7E8CA8", " 9 c #ACB1BE", " 0 c #95B1CF", " q c #CEDBE9", " w c #99A580", " e c #7E8CAB", " r c #AAACC9", " t c #B5B5B6", " y c #A491B6", " u c #7B8AA8", " i c #7A88A7", " p c #9BA3C4", " a c #727E0A", " s c #DEDEDE", " d c #AB92B6", " f c #8F9FB8", " g c #96AECC", " h c #B1C0D6", " j c #AA83AB", " k c #A2AB7B", " l c #FCE94F", " z c #808DA9", " x c #C7D7E8", " c c #8F9E86", " v c #95B0CE", " b c #CC0000", " n c #A5BDD7", " m c #A8B8D0", " M c #D1DEEB", " N c #D0DCEA", " B c #CFDCE9", " V c #CEDAE8", " C c #A8AEBC", " Z c #A889AF", " A c #AC80A9", " S c #9BA2C3", " D c #CFDCEC", " F c #9DB7D2", " G c #6F6384", " H c #5A7AA4", " J c #A78BB1", " K c #67837F", " L c #9AA4C5", " P c #AFBAC9", " I c #B9CBE0", " U c #B4B9C4", " Y c #9E9DBF", " T c #BCC8D9", " R c #828EAA", " E c #95AFCD", " W c #9FABC3", " Q c #D7E3F0", " ! c #D3DFEC", " ~ c #A9B9D0", " ^ c #9D9FC1", " / c #B4C9DE", " ( c #AFB5C2", " ) c #ABB1BE", " _ c #EDD400", " ` c #C1C1C3", " ' c #9CA1C3", " ] c #698373", " [ c #A7ADBD", " { c #A9C1D9", " } c #A8BFD8", " | c #A9ACB8", ". c #AA85AC", ".. c #9D9EC0", ".X c #B7CAE0", ".o c #818FAB", ".O c #808DAA", ".+ c #AC8BB1", ".@ c #A987AE", ".# c #8B96AE", ".$ c #CFDCEA", ".% c #6C7CA0", ".& c #785977", ".* c #A889B0", ".= c #AC82AA", ".- c #DDDDDD", ".; c #CCDAEA", ".: c #9AA6C6", ".> c #BACDE2", "., c #B8CBE0", ".< c #9E9DC0", ".1 c #8390AC", ".2 c #EF2929", ".3 c #C6D6E7", ".4 c #95AFCE", ".5 c #A58DB3", ".6 c #A986AD", ".7 c #BFCCE0", ".8 c #A9B9D1", ".9 c #CFDBE9", ".0 c #B9B9B9", ".q c #CEDBE8", ".w c #B7B7B7", ".e c #CBD7E5", ".r c None", /* pixels */ ".r H H H H H H H H H H H H H.r.r", " H.% =.3.> / n n $ $ } } F c _.r", " H T N 3 D { L < A. .< 0 X c l _", " H +.$ h.; 6 4 p.4 & ; S X w l _", " H.e B m.; d ^ Y 2 j & o X k l _", " H M.9 m.;.= g 4...6 E A X ] O a", " H Q q *.; A E A '.@ : Z X ] O a", " H #.q ~.;.+ L y.*.5 4.: X K O a", " H #.q.8.; r ; & v 0 0 0 X G.2 b", " H % V.7.; { @ J >.6 0 0 X G.2 b", " H Q ! D x ..X 5 5.,.,., I G.2 b", " H , e R z 8 i u.o 7.1.O 1.& b.r", " H W t.w.w.w.w.w.w.w.0 P H H.r.r", " H f `.-.-.-.-.- s s s U H H.r.r", " H H.# [ ( - - ) ) 9 9 C | H.r.r", ".r H H H H H H H H H H H H H.r.r" }; /* categories/applications-system.png */ /* XPM */ const char *tango_applications_system[] = { /* width height ncolors chars_per_pixel */ "16 16 19 1", /* colors */ " c #000000", ". c #7CA1CF", "X c #497CBA", "o c #3F638F", "O c #6490C7", "+ c #467ABA", "@ c #395578", "# c #436FA5", "$ c #BCCDE3", "% c #5682B7", "& c #86A7D2", "* c #82A5D1", "= c #4C7FBD", "- c #426B9C", "; c #5686C3", ": c #9DB8DA", "> c #457ABE", ", c #8FAED5", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<>>><<<<<<<", "<<<>><>$><>><<<<", "<<>$&>O:O>&$><<<", "<<>&:::::::&><<<", "<<<>:.+;+*:><<<<", "<>>O:+-<oX:O>><<", "<>$::;<<<;::$><<", "<>>O:=%<#+:O>><<", "<<<>$.=;+,:><<<<", "<<>&:::::::&><<<", "<<>$&>O:O>&$><<<", "<<<>><>$><>><<<<", "<<<<<<>>><<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* apps/internet-group-chat.png */ /* XPM */ const char *tango_internet_group_chat[] = { /* width height ncolors chars_per_pixel */ "16 16 23 1", /* colors */ " c #000000", ". c #9D9D9D", "X c #F2F2F2", "o c #F0F0F0", "O c #EEEEEE", "+ c #ECECEC", "@ c #EAEAEA", "# c #2D2D2D", "$ c #767774", "% c #888A85", "& c #858682", "* c #797A76", "= c #C6C6C4", "- c #FFFFFF", "; c #F1F1F1", ": c #EFEFEF", "> c #EDEDED", ", c #EBEBEB", "< c #E9E9E9", "1 c #343434", "2 c #2A2A2A", "3 c #868884", "4 c None", /* pixels */ "4444%%%%%%%%%%%4", "444%-----------%", "444%-,@<<<<<<<-%", "4%%%%%%%%%%%=<-%", "%-----------%<-%", "%-<<<<<<<@,-%@-%", "%-<<<<<@,++-%,-%", "%-<<<<@,+>O-%--%", "%-<<@,+>O::-%-%4", "%-@,++>O:o;-%-%4", "%-,+>O::o;X-%%%4", "%--O:-------%4%4", "4%-:-%%%%%%%.444", "4%--%44444444444", "4%%%444444444444", "4%44444444444444" }; /* status/dialog-information.png */ /* XPM */ const char *tango_dialog_information[] = { /* width height ncolors chars_per_pixel */ "16 16 127 2", /* colors */ " c #000000", " . c #394B7A", " X c #E8EFF4", " o c #4A577A", " O c #CBD9E8", " + c #40507A", " @ c #E3E6BA", " # c #F5F8FA", " $ c #80805C", " % c #C8D7E8", " & c #C5D5E5", " * c #3B4C78", " = c #3A4A77", " - c #D4E0ED", " ; c #C1CCD7", " : c #E0E9F2", " > c #546083", " , c #394A79", " < c #EBF0F6", " 1 c #475780", " 2 c #EBEDC1", " 3 c #46557F", " 4 c #F7F9FB", " 5 c #C5D2E1", " 6 c #5988B9", " 7 c #3D4D76", " 8 c #D9E3EE", " 9 c #495985", " 0 c #595942", " q c #B5C7DB", " w c #586383", " e c #9BAEC8", " r c #A9C0D9", " t c #3C4D78", " y c #F3F7FA", " u c #3B4B77", " i c #5382B6", " p c #D3DFEB", " a c #EDEFF4", " s c #E2EAF3", " d c #393936", " f c #5E8DBA", " g c #F5F8CA", " h c #A5BED8", " j c #616471", " k c #384977", " l c #EEF3F8", " z c #D0DDEB", " x c #CEDBE9", " c c #4F5873", " v c #FAFCFD", " b c #779DC5", " n c #485883", " m c #E8EFF5", " M c #ABB198", " N c #B5C6DA", " B c #E2E7EF", " V c #AAC1D9", " C c #3E4E79", " Z c #E0E5ED", " A c #DDDFAB", " S c #435177", " D c #8C9BB8", " F c #C3D3E4", " G c #98A4BD", " H c #B5CAE0", " J c #D0D5E0", " K c #DFE7F2", " L c #DEE7F1", " P c #91AECD", " I c #384A79", " U c #41517B", " Y c #8A8B66", " T c #E0E6EC", " R c #5E5E3E", " E c #B9C4D6", " W c #5E6880", " Q c #8D9CB8", " ! c #3A4B77", " ~ c #EFF3F7", " ^ c #9AA5BE", " / c #FCFCFD", " ( c #A6AC98", " ) c #789DC4", " _ c #C1D2E4", " ` c #F3F6C9", " ' c #3A4B7A", " ] c #C0D0E3", " [ c #384978", " { c #87A8CC", " } c #ECF1F7", " | c #4B7EB2", ". c #45547E", ".. c #CCD9E8", ".X c #D3D5B0", ".o c #3D4C76", ".O c #D8E2ED", ".+ c #4A5A86", ".@ c #D4E0EC", ".# c #5281B5", ".$ c #7E90B2", ".% c #FFFFFF", ".& c #A7AD98", ".* c #608EBC", ".= c #C2D3E4", ".- c #464646", ".; c #4B5B83", ".: c #EBF0F5", ".> c #FAFBFD", "., c #A4ADC3", ".< c #303030", ".1 c #C9D6E7", ".2 c #C7D6E5", ".3 c #F4F7FA", ".4 c #C2D0E0", ".5 c #D6E1ED", ".6 c #9DB9D6", ".7 c #7E91B1", ".8 c #B7C2D5", ".9 c #59627C", ".0 c #A6BED8", ".q c #A8AA84", ".w c #D2DAE2", ".e c #DFE8F2", ".r c #5C89BA", ".t c #5B89B9", ".y c None", /* pixels */ ".y.y.y.y.y u = [ I !.o.y.y.y.y.y", ".y.y.y.y *., a / 4 B ^ C.y.y.y.y", ".y.y.y t J # X s 8 p.O E U.y.y.y", ".y.y 7., # ~.3 <.e -.= & Q S.y.y", ".y.y + a m y v } K z _ ) 5 3.y.y", ".y.y ,.> : l.%.%.%.% ;.y x ..y.y", ".y.y '.3.5 L.%.: T.w P.y.1 ..y.y", ".y.y. Z O %.% ] H.6.y.* q n.y.y", ".y.y o G.@.0.% h {.y | V.7 >.y.y", ".y.y.y 1.8 F b.%.y f r e 9.y.y.y", ".y.y.y.y 1 D.4...2 N.$.+.y.y.y.y", ".y.y.y.y.y w.; (.& M W.y.y.y.y.y", ".y.y.y.y.y.y R 2 g A R.y.y.y.y.y", ".y.y.y.y.y.y R $.q Y R.y.y.y.y.y", ".y.y.y.y.y.y R @ `.X R.y.y.y.y.y", ".y.y.y.y.y.y.y d.-.<.y.y.y.y.y.y" }; /* actions/edit-clear.png */ /* XPM */ const char *tango_edit_clear[] = { /* width height ncolors chars_per_pixel */ "16 16 113 2", /* colors */ " c #E7D75B", " . c #EED723", " X c #AB1B0D", " o c #C86D33", " O c #BBA529", " + c #FDEC6D", " @ c #C5B536", " # c #DCC407", " $ c #EDDA46", " % c #A08E01", " & c #9F8E00", " * c #CDBD41", " = c #E8DA6C", " - c #D7B162", " ; c #E6D656", " : c #E1D35B", " > c #CCBD43", " , c #FDE952", " < c #E7D018", " 1 c #9C8800", " 2 c #C6B633", " 3 c #C5B432", " 4 c #BC7A0F", " 5 c #FDEA5F", " 6 c #CFC149", " 7 c #A29009", " 8 c #A19008", " 9 c #FDEB6C", " 0 c #D2C34F", " q c #DCC610", " w c #AE9E1B", " e c #F8EA88", " r c #AB6D0B", " t c #C17D10", " y c #F3E365", " u c #B2760B", " i c #9E8D01", " p c #E4D249", " a c #ECDC68", " s c #E7D96D", " d c #BB4A28", " f c #9F8F05", " g c #F6D861", " h c #9A8500", " j c #FDEC6B", " k c #FDEB61", " l c #EBDD77", " z c #804E01", " x c #DAC203", " c c #9F8E01", " v c #AB9B1A", " b c #E2D467", " n c #9F8E04", " m c #EADC72", " M c #A12400", " N c #B8381D", " B c #876400", " V c #FDEA63", " C c #DDCF5E", " Z c #FDEF84", " A c #A08F01", " S c #9F8D00", " D c #D8C84F", " F c #E3CB11", " G c #A96B0A", " H c #C6B530", " J c #BEAE32", " K c #FDEE7D", " L c #B2720C", " P c #9C8B00", " I c #9C7F00", " U c #A6690A", " Y c #FDEF8A", " T c #E5D44E", " R c #B06917", " E c #F3DB2A", " W c #DCC510", " Q c #FBED8B", " ! c #A18801", " ~ c #D6C856", " ^ c #7B4A00", " / c #FBEA84", " ( c #FFFFFF", " ) c #9D8C00", " _ c #FCE53C", " ` c #A03600", " ' c #E4D34C", " ] c #DCCD58", " [ c #DFCA26", " { c #784800", " } c #EBDE77", " | c #B1A01D", ". c #C0B02F", ".. c #DBC304", ".X c #F6DE2F", ".o c #AD4213", ".O c #E7D85F", ".+ c #A59411", ".@ c #FBE437", ".# c #7C4B00", ".$ c #9F8D01", ".% c #9E8D00", ".& c #E5CD14", ".* c #FBE544", ".= c #DCC615", ".- c #FDE63C", ".; c #865203", ".: c #845201", ".> c #A08F05", "., c #CDBE45", ".< c #794900", ".1 c #8A6900", ".2 c None", /* pixels */ ".2.# ^.2.2.2.2.2.2.2.2.2.2.2.2.2", " ^ U r ^.2.2.2.2.2.2.2.2.2.2.2.2", " ^ L t G ^.2 P.2.2.2.2.2.2.2.2.2", ".2.; 4 t.: h P.2.2.2.2.2.2.2.2.2", ".2 ^ z u ! J |.2.2.2.2.2.2.2.2.2", ".2.2 B 1 * } R ` A.2.2.2.2.2.2.2", ".2.2 i D a o X - m > 7 c.2.2.2.2", ".2.2.% O d N g V 9 K e., f &.2.2", ".2.2.2 M.o / j Z + ,.* y l 6 w )", ".2.2.2.2. Y 5 k ,.- E < q p b.$", ".2.2.2.2.+ Q _.@.X ..&.. x ; 2 &", ".2.2.2.2 % C $ < F # x x ' ] n.2", ".2.2.2.2.2 v = W x x.= ~.>.2.2", ".2.2.2.2.2 & @.O [ T s 3.%.2.2.2", ".2.2.2.2.2.2.% 0 : H 8 S.2.2.2.2", ".2.2.2.2.2.2.2 ).%.%.2.2.2.2.2.2" }; /* actions/edit-copy.png */ /* XPM */ const char *tango_edit_copy[] = { /* width height ncolors chars_per_pixel */ "16 16 44 1", /* colors */ " c #000000", ". c #E3E4E2", "X c #9A9B97", "o c #8D8F8A", "O c #898B86", "+ c #C8C8C7", "@ c #C6C6C5", "# c #C4C4C3", "$ c #8F908B", "% c #FEFEFE", "& c #FAFAFA", "* c #F4F4F4", "= c #F2F2F2", "- c #EEEEEE", "; c #ECECEC", ": c #EAEAEA", "> c #8E9189", ", c #D4D4D4", "< c #C3C4C3", "1 c #F7F7F6", "2 c #F3F3F2", "3 c #EFEFEE", "4 c #EDEDEC", "5 c #E3E3E2", "6 c #989A95", "7 c #8C8E89", "8 c #8A8C87", "9 c #888A85", "0 c #C7C7C6", "q c #FFFFFF", "w c #FBFBFB", "e c #F9F9F9", "r c #F3F3F3", "t c #EBEBEB", "y c #989A96", "u c #FEFEFD", "i c #FCFCFB", "p c #FAFAF9", "a c #F8F8F7", "s c #F6F6F5", "d c #F4F4F3", "f c #F0F0EF", "g c #EEEEED", "h c None", /* pixels */ "hhhhhhhhhhhhhhhh", "hhhhhhhhhhhhhhhh", "hhhhhhhhhhhhhhhh", "hhhhX9999999999o", "hhhh8qqqqqqqqqq9", "hhhhOqffffffffq9", "hhhh8qf000000fq9", "hhhhOqffffffffq9", "hhhh8qf00000ffq9", "hhhhOqfffffff&r9", "hhhh8qf00000-1<9", "hhhh8qfffff77779", "hhhhOuffff&6&a.9", "hhhhOpfff&&6&599", "hhhhO*1siw,y.9hh", "hhhh7O9999999hhh" }; /* actions/edit-cut.png */ /* XPM */ const char *tango_edit_cut[] = { /* width height ncolors chars_per_pixel */ "16 16 94 2", /* colors */ " c #000000", " . c #AA0909", " X c #A80707", " o c #959792", " O c #939590", " + c #91938E", " @ c #AB0D0D", " # c #90918D", " $ c #8F918C", " % c #A90B0B", " & c #8D8F8A", " * c #8B8D88", " = c #CB1F1F", " - c #9C2F2C", " ; c #B3B2AF", " : c #C01514", " > c #A80403", " , c #A70202", " < c #AB1313", " 1 c #AA0808", " 2 c #A80606", " 3 c #E1E1DF", " 4 c #AE1919", " 5 c #B70F0E", " 6 c #CE1E1E", " 7 c #A90A0A", " 8 c #D2D3D0", " 9 c #AA0E0E", " 0 c #DB2727", " q c #F5F6F5", " w c #AE1818", " e c #EFF0EF", " r c #D01F1F", " t c #CE1D1D", " y c #CD1D1C", " u c #898984", " i c #CCCEC9", " p c #C6C8C3", " a c #AA0D0D", " s c #B8BAB5", " d c #AB1111", " f c #B6B8B3", " g c #B5B6B2", " h c #F7F7F6", " j c #D42222", " k c #AAACA7", " l c #A60202", " z c #D22020", " x c #B80D0D", " c c #9FA09C", " v c #A70606", " b c #9A9C97", " n c #92948F", " m c #C91A1A", " M c #AA0C0C", " N c #8E908B", " B c #8C8E89", " V c #8A8C87", " C c #AB1010", " Z c #D62323", " A c #A80303", " S c #A60101", " D c #A90707", " F c #AF1A1A", " G c #A40502", " H c #AB1616", " J c #DBDCD9", " K c #CD1D1D", " L c #CA1B1A", " P c #AA0B0B", " I c #D2D4D0", " U c #CDCECB", " Y c #C5C6C3", " T c #C01513", " R c #B5B6B3", " E c #F7F7F7", " W c #AD1717", " Q c #D12020", " ! c #A34A45", " ~ c #B50B0B", " ^ c #A60606", " / c #A00A00", " ( c #C71A19", " ) c #BABBB7", " _ c #B3B5B0", " ` c #AEAFAB", " ' c #D52323", " ] c #D32121", " [ c #A8A9A5", " { c #D11F1F", " } c #AB1414", " | c #CF1D1D", ". c #E7E8E6", ".. c None", /* pixels */ "........ * O........ * $........", "...... N E *........ # 8 $......", "...... * I e n...... k p &......", "...... & _ h *.... N i ` *......", "........ * J e + B f U *........", "........ & g E * c R s *........", ".......... * 3 q b [ *..........", ".......... & ). k N V..........", "............ u Y ; -............", "........ w H ^ ! l ( W w........", "...... D z 6 5 G > m Q = 7......", ".... 2 r A : S.... y T A K v....", ".. } '.... t 7.... A L.... Q }..", ".. @ |.. ~ ] M.... . Z x.. { d..", ".. < 0 r t X........ 1 j | t <..", ".... 9 C H............ a P %...." }; /* actions/edit-paste.png */ /* XPM */ const char *tango_edit_paste[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #000000", ". c #6A6C68", "X c #666864", "o c #C68827", "O c #6E4602", "+ c #6D4401", "@ c #C08424", "# c #7F7F7C", "$ c #EFEFED", "% c #EDEDEB", "& c #EBEBE9", "* c #E9E9E7", "= c #E7E7E5", "- c #676964", "; c #DBDBD9", ": c #B2B4B4", "> c #6E6C64", ", c #CCCDCA", "< c #6B4301", "1 c #FEFEFE", "2 c #F2F2F2", "3 c #EDEEED", "4 c #BA7F23", "5 c #D8D8D5", "6 c #E0E0E0", "7 c #A77D3B", "8 c #5C5C5B", "9 c #6C4401", "0 c #C1C2BE", "q c #B9BAB6", "w c #6B4403", "e c #B37B22", "r c #EFEFEE", "t c #EDEDEC", "y c #EBEBEA", "u c #C58726", "i c #97978A", "p c #6E4502", "a c #80807D", "s c #7E7E7B", "d c #ECECEA", "f c #EAEAE8", "g c #716F64", "h c #E8E8E6", "j c #706D63", "k c #DADAD8", "l c #6F4602", "z c #B97F23", "x c #B3B5B5", "c c #6E6D64", "v c #CDCECB", "b c #A17C40", "n c #5E5E5E", "m c #5C5C5C", "M c #6A4200", "N c #C28628", "B c #FFFFFF", "V c #E7E7E4", "C c #F1F1F1", "Z c #D9D9D6", "A c #B1B2B2", "S c #C58727", "D c #5F5F5E", "F c #959589", "G c #6C4301", "H c #6B4300", "J c #B9B9B6", "K c #B8B9B5", "L c #FEFEFD", "P c #B7B7B4", "I c #736F64", "U c #BBBBBB", "Y c #F0F0EF", "T c #EEEEED", "R c #A47E3E", "E c #A37C3D", "W c #ECECEB", "Q c #706D64", "! c None", /* pixels */ "!!!!!DmmmmD!!!!!", "!!+9w8FiiF8w99!!", "!+@RQn#aasn>bzG!", "!logC6UUUU62cSM!", "!loXBYYYYYYB-NM!", "!luXBYxxxxrB-NM!", "!luXBYYYY$%B-NM!", "!OuXBYxx:AfB-NM!", "!OuXBYrtyf;B-NM!", "!OuXBTW&*k,B-NM!", "!OuXBdfhvqKB-NM!", "!puXB*=ZJBBB-NM!", "!puXBV50PBB-SNM!", "!puj3111rL-SSSM!", "!G47I.....EEEe<!", "!!G9999999999<!!" }; /* actions/edit-select-all.png */ /* XPM */ const char *tango_edit_select_all[] = { /* width height ncolors chars_per_pixel */ "16 16 38 1", /* colors */ " c #000000", ". c #B3C9E1", "X c #B1C7DF", "o c #AFC5DD", "O c #ADC3DB", "+ c #ABC1D9", "@ c #8D8F8A", "# c #A9BFD7", "$ c #8B8D88", "% c #8197AF", "& c #FEFEFE", "* c #FCFCFC", "= c #FAFAFA", "- c #F8F8F8", "; c #F6F6F6", ": c #F4F4F4", "> c #F2F2F2", ", c #F0F0F0", "< c #EEEEEE", "1 c #ECECEC", "2 c #8B8D89", "3 c #B2C8E0", "4 c #B0C6DE", "5 c #AEC4DC", "6 c #ACC2DA", "7 c #AAC0D8", "8 c #8C8E89", "9 c #A8BED6", "0 c #888A85", "q c #8298B0", "w c #FFFFFF", "e c #FDFDFD", "r c #FBFBFB", "t c #F9F9F9", "y c #F7F7F7", "u c #F5F5F5", "i c #EBEBEB", "p c None", /* pixels */ "p20000000000008p", "p0e&&ee**rr==t$p", "p0e9##77+++++-$p", "p0&#%%%%6%%%6-$p", "p0e7%%%%OOOOO-$p", "p0e7%%%%O555i-$p", "p0*+%%%%5%%o1-$p", "p0*66O5oo444<-$p", "p0*6O5oo44XX,-$p", "p0r6%%%%%%%3>y$p", "p0rO5o44 3 .:y$p", "p0=O5o4X3 u;;y$p", "p0tOqqqq3 y-yy$p", "p0tO5o4X3 yt-y$p", "p0------ - ---$p", "p8000000000000@p" }; /* actions/edit-undo.png */ /* XPM */ const char *tango_edit_undo[] = { /* width height ncolors chars_per_pixel */ "16 16 70 1", /* colors */ " c #000000", ". c #F3E56A", "X c #F4DF2C", "o c #F1DB29", "O c #F9EA69", "+ c #DFC80A", "@ c #BB9F15", "# c #F6E131", "$ c #EBDC6F", "% c #C4A000", "& c #EFE276", "* c #D6C004", "= c #C19E00", "- c #BBA11B", "; c #EEE16E", ": c #FAEC73", "> c #BCA015", ", c #F8E232", "< c #DAC304", "1 c #F5E02F", "2 c #C1A313", "3 c #7D7905", "4 c #FAEB6F", "5 c #DFC90F", "6 c #BEA113", "7 c #ECD936", "8 c #E3CD16", "9 c #BF9D00", "0 c #C1A319", "q c #DBC443", "w c #C8AC02", "e c #BCA114", "r c #F7DD05", "t c #FBED76", "y c #DFC80B", "u c #FBED79", "i c #B99900", "p c #7C7A06", "a c #D8C207", "s c #E9DA5D", "d c #CBAA0E", "f c #F7E86E", "g c #F2E469", "h c #E8D21D", "j c #C0A41A", "k c #F7E232", "l c #FBF3AD", "z c #C1A314", "x c #F6E769", "c c #FBE425", "v c #C5AB1B", "b c #C4A71A", "n c #C0A623", "m c #E1CD40", "M c #C2A611", "N c #BDA116", "B c #C2A211", "V c #FAE320", "C c #BFA31B", "Z c #EADB66", "A c #C3A618", "S c #F7E86C", "D c #F2E788", "F c #E3CE41", "G c #F5E66D", "H c #F6E02F", "J c #D8C543", "K c #7E7905", "L c #C4A901", "P c None", /* pixels */ "PPPPPP%PPPPPPPPP", "PPPPP%%PPPPPPPPP", "PPPP%l%PPPPPPPPP", "PPP%lc%%6@-PPPPP", "PP%l#V:4fSezPPPP", "P%lHko1o87xF2PPP", "%lH,kk1ohhh7mNPP", "P%u,X***hhhy.v>P", "PP%t<tOOOOr+a$CP", "PPP%tt%%%%L;5gjP", "PPPP%t%PPPP%G&0P", "PPPPP%%PPPPPwDBP", "PPPPPP%PPPPPdsnP", "PPPPPPPPPPPPqJPP", "PPPPPPPPPPPPZMPP", "PPPPPPPPPPPPPPPP" }; /* emblems/emblem-system.png */ /* XPM */ const char *tango_emblem_system[] = { /* width height ncolors chars_per_pixel */ "16 16 19 1", /* colors */ " c #000000", ". c #C7CAC3", "X c #8F918C", "o c #8D8F8A", "O c #B8BAB4", "+ c #888A84", "@ c #A2A3A0", "# c #898B87", "$ c #777975", "% c #71736F", "& c #D3D7CF", "* c #676965", "= c #555753", "- c #888A85", "; c #BDBFB9", ": c #EEEEEC", "> c #979993", ", c #C0C0BE", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<---<<<<<<<", "<<<--<-:-<--<<<<", "<<-:,-@&@-,:-<<<", "<<-,&&&&&&&,-<<<", "<<<-&O+>+;&-<<<<", "<--@&+%<*#&@--<<", "<-:&&><<<>&&:-<<", "<--@&oX<$+&@--<<", "<<<-:Oo>+.&-<<<<", "<<-,&&&&&&&,-<<<", "<<-:,-@&@-,:-<<<", "<<<--<-:-<--<<<<", "<<<<<<---<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* mimetypes/application-x-executable.png */ /* XPM */ const char *tango_application_x_executable[] = { /* width height ncolors chars_per_pixel */ "16 16 70 1", /* colors */ " c #000000", ". c #9BABC3", "X c #8790B6", "o c #ADB8CE", "O c #ABB6CC", "+ c #5F7A9F", "@ c #7F90B1", "# c #A5B2C9", "$ c #A4B2C8", "% c #9197BC", "& c #9FAEC6", "* c #8991B7", "= c #AFB9CF", "- c #AEB9CE", "; c #BFC4D8", ": c #7382AB", "> c #95A2BF", ", c #949ABE", "< c #7D89B1", "1 c #7C89B0", "2 c #8D9EBA", "3 c #8E9CBB", "4 c #A0AFC6", "5 c #B0BACF", "6 c #9D9FC3", "7 c #C1C5D9", "8 c #7483AB", "9 c #99A3C2", "0 c #858EB5", "q c #AAB6CC", "w c #8F9BBB", "e c #9099BC", "r c #A2AEC7", "t c #A1AAC6", "y c #7786AD", "u c #8895B7", "i c #ACB7CD", "p c #7182AA", "a c #566F99", "s c #7A87AF", "d c #ACB0CC", "f c #8394B4", "g c #A8B4CB", "h c #A7B4CA", "j c #A7B2CA", "k c #50688F", "l c #A5B0C8", "z c #C8CADD", "x c #546C96", "c c #7C8EB0", "v c #7C8CB0", "b c #7B88AF", "n c #8D9FBA", "m c #7A88AE", "M c #B2BBD1", "N c #B1BBD0", "B c #516A96", "V c #7584AC", "C c #364878", "Z c #858FB5", "A c #98A2C1", "S c #ABB5CD", "D c #A9B5CB", "F c #A9B3CB", "G c #A7B1C9", "H c #486490", "J c #A3B1C8", "K c #B3BCD1", "L c #C3C7DA", "P c None", /* pixels */ "PPPPPPPCPPPPPPPP", "PPPPPPCLCPPPPPPP", "PPPPPCL.+CPPPPPP", "PPPPCL&4nHCPPPPP", "PPPCLJ$#2BaCPPPP", "PPCLhgDqcf@aCPPP", "PCLOio-rv>FpaCPP", "CL=5NMj3SKy:VaCP", "PCLGlwu8t9b<aCPP", "PPCLms1A;eZaCPPP", "PPPCL0X*7,aCPPPP", "PPPPCL%dzaCPPPPP", "PPPPPCL6aCPPPPPP", "PPPPPPCaCPPPPPPP", "PPPPPPPCPPPPPPPP", "PPPPPPPPPPPPPPPP" }; /* actions/document-open.png */ /* XPM */ const char *tango_document_open[] = { /* width height ncolors chars_per_pixel */ "16 16 139 2", /* colors */ " c #85ABD5", " . c #7E8896", " X c #406CA5", " o c #A9A9A9", " O c #3767A6", " + c #A5A5A5", " @ c #3565A4", " # c #C3D6EA", " $ c #A2A3A2", " % c #5B5C59", " & c #A1A1A1", " * c #5A5C58", " = c #565854", " - c #9C9D9C", " ; c #9B9B9B", " : c #999999", " > c #969796", " , c #BFD2E9", " < c #7EA7D4", " 1 c #98B9DD", " 2 c #BBD2E8", " 3 c #797979", " 4 c #737373", " 5 c #3768A5", " 6 c #3666A4", " 7 c #C5D7EB", " 8 c #5689C0", " 9 c #85ACD7", " 0 c #9FA09E", " q c #656565", " w c #5F5F5F", " e c #C1D5EA", " r c #5B5B5B", " t c #555555", " y c #7FA8D4", " u c #515151", " i c #FEFEFE", " p c #FCFCFC", " a c #8AAFD8", " s c #494949", " d c #FAFAFA", " f c #95B8DC", " g c #EAEAEA", " h c #E8E8E8", " j c #E6E6E6", " k c #E2E2E2", " l c #E0E0E0", " z c #DEDEDE", " x c #77A2D2", " c c #DCDCDC", " v c #3667A6", " b c #DADADA", " n c #3465A4", " m c #5B5E5A", " M c #D2D2D2", " N c #81A9D5", " B c #D0D0D0", " V c #4B7EB7", " C c #3265A5", " Z c #8BB0D8", " A c #C4C4C4", " S c #96B7DC", " D c #3968A5", " F c #B0B0B0", " G c #B9D0E7", " H c #AEAEAE", " J c #ACACAC", " K c #AAAAAA", " L c #79A3D3", " P c #92B5DB", " I c #A6A6A6", " U c #5F615D", " Y c #3666A5", " T c #3566A4", " R c #5D5F5B", " E c #5B5D59", " W c #595B57", " Q c #D5D5D4", " ! c #575955", " ~ c #83AAD6", " ^ c #82AAD5", " / c #555753", " ( c #9BBADD", " ) c #C0D5EA", " _ c #C1C1C0", " ` c #7A7A7A", " ' c #787878", " ] c #3767A5", " [ c #A5A5A4", " { c #6E6E6E", " } c #5B5C58", " | c #5588BF", ". c #6A6A6A", ".. c #9C9D9B", ".X c #3567A6", ".o c #8FB2DA", ".O c #8EB2D9", ".+ c #939392", ".@ c #3465A5", ".# c #C1D6EA", ".$ c #565656", ".% c #B1C9E4", ".& c #4C4C4C", ".* c #FDFDFD", ".= c #FBFBFB", ".- c #484848", ".; c #F9F9F9", ".: c #F7F7F7", ".> c #7BA5D3", "., c #95B7DC", ".< c #94B5DB", ".1 c #3868A5", ".2 c #EBEBEB", ".3 c #E9E9E9", ".4 c #E7E7E7", ".5 c #E5E5E5", ".6 c #E3E3E3", ".7 c #B8CEE7", ".8 c #DFDFDF", ".9 c #DDDDDD", ".0 c #3566A5", ".q c #3466A4", ".w c #D9D9D9", ".e c #D3D3D3", ".r c #D0D1D0", ".t c #9ABADD", ".y c #CFCFCF", ".u c #CDCDCD", ".i c #C9C9C9", ".p c #C7C7C7", ".a c #C5C5C5", ".s c #A5C1E1", ".d c #7DA6D4", ".f c #BDBDBD", ".g c #95B6DB", ".h c #B7B7B7", ".j c #454A51", ".k c #B3B3B3", ".l c None", /* pixels */ ".l.l.l.l = ! = ! ! W * U.l.l.l.l", " ` 3 3 3 =.:.; d.=.= p $ }.l.l.l", " '.i.p A / b.e.e M.y.u i.+ m.l.l", " 4.a F J / c - - - - Q i.* > E.l", " { _ J K = k.8 z z.9 l.3.5 B R.l", ". .f o + = j 0.......9.6.6.r E.l", " q.h I & !.2 g g.3.3 h h.4.w %.l", " w.k X.1.1 5 Y Y.0 T T T n n n O", " r H.0 ) ) ) ) ) ) e.#.#.#.# 2.@", ".$ o T # P P P P P P P P P f G.q", " u [ 6 7 1 1 1 1 1 1 1 1 1.,.7.0", ".& & ] , (.t.t.t.t.t.t S.o Z.%.0", ".- ;.1.s.O a 9 ~ N < L x x.>.g.X", " s : D.< ^.d.d.d.d.d.d.d.d y Y", ".- . D | 8 8 8 8 8 8 8 8 8 8 V v", ".j n n n n n n n n n n n n n @.l" }; /* status/folder-open.png */ /* XPM */ const char *tango_folder_open[] = { /* width height ncolors chars_per_pixel */ "16 16 123 2", /* colors */ " c #000000", " . c #ADADAD", " X c #ABABAB", " o c #A9A9A9", " O c #92B6DB", " + c #92B4DB", " @ c #A7A7A7", " # c #3667A5", " $ c #A5A5A5", " % c #A3A3A3", " & c #A1A1A1", " * c #9F9F9F", " = c #9DBDDF", " - c #9D9D9D", " ; c #9B9B9B", " : c #B5CDE6", " > c #999999", " , c #7EA7D4", " < c #3968A4", " 1 c #484849", " 2 c #797979", " 3 c #757575", " 4 c #94B7DC", " 5 c #737373", " 6 c #93B5DB", " 7 c #6D6D6D", " 8 c #86AED8", " 9 c #6B6B6B", " 0 c #B7CEE7", " q c #656565", " w c #5F5F5F", " e c #C1D5EA", " r c #5B5B5B", " t c #7FA8D4", " y c #515151", " u c #B1CAE4", " i c #4779B4", " p c #494949", " a c #A2BFDF", " s c #86ABD4", " d c #95B8DC", " f c #AEC8E4", " g c #4971A5", " h c #B8CFE7", " j c #3567A5", " k c #4F79AE", " l c #3465A4", " z c #81A9D5", " x c #9BBBDE", " c c #3C6AA5", " v c #CACACA", " b c #C8C8C8", " n c #8CB0D9", " m c #C4C4C4", " M c #C0C0C0", " N c #BABABA", " B c #3968A5", " V c #3766A3", " C c #88AED8", " Z c #B2B2B2", " A c #B0B0B0", " S c #AEAEAE", " D c #ACACAC", " F c #AAAAAA", " G c #92B5DB", " H c #3868A7", " J c #A6A6A6", " K c #3666A5", " L c #A4A4A4", " P c #C4D7EB", " I c #A0A0A0", " U c #9E9E9E", " Y c #82AAD5", " T c #9C9C9C", " R c #9A9A9A", " E c #406DA8", " W c #6A7F99", " Q c #8EB3DA", " ! c #C1C1C0", " ~ c #808080", " ^ c #7A7A7A", " / c #787878", " ( c #454F5D", " ) c #747474", " _ c #94B6DC", " ` c #93B6DB", " ' c #A5A5A4", " ] c #598CC3", " [ c #6E6E6E", " { c #3463A2", " } c #6C6C6C", " | c #6A6A6A", ". c #84ABD6", ".. c #B7CFE7", ".X c #606060", ".o c #608FC3", ".O c #3465A5", ".+ c #565656", ".@ c #B3CBE6", ".# c #8F949B", ".$ c #FFFFFF", ".% c #4C4C4C", ".& c #8BB0D9", ".* c #484848", ".= c #688FBD", ".- c #3868A5", ".; c #85ACD6", ".: c #B7CEE6", ".> c #68809F", "., c #91B5DB", ".< c #3768A7", ".1 c #3566A5", ".2 c #B4CCE6", ".3 c #C9C9C9", ".4 c #8DB1DA", ".5 c #C7C7C7", ".6 c #C5C5C5", ".7 c #BED3E9", ".8 c #BDBDBD", ".9 c #5C8EC4", ".0 c #B7B7B7", ".q c #B3B3B3", ".w c None", /* pixels */ ".w.w.w.w.w.w.w.w.w.w.w.w.w.w.w.w", " ^ 2 2 2 2 2 2.w.w.w.w.w.w.w.w.w", " /.3.5.6 m m Z 3.w.w.w.w.w.w.w.w", " 5.6 A . X F F ^ 7 } 9 9 | [.w.w", " [ ! D F @ $ L o N.6 b v M q.w.w", " |.8 o J % & I * * I & % % w.w.w", " q.0 J % I - T ; R ; T U U r.w.w", " w.q % g B B B B B B B B B V K.<", " r S I.-.2 0 0...:.:.:.:.:.: u.O", ".+ o U <.7 O., G O O O O ` d.@.1", " y ' T c e 4 4 4 4 4 4 4 Q 8 :.1", ".% & ; E P x x x x x _.& C.4 h.1", ".* ;.# k f 6 + n.; t , , , Y a #", " p >.>.= =.& Y z z z z z z. s H", " 1 W B.o.9 ] ] ] ] ] ] ] ] ] i j", " ( l l l l l l l l l l l l l l.w" }; /* apps/help-browser.png */ /* XPM */ const char *tango_help_browser[] = { /* width height ncolors chars_per_pixel */ "16 16 153 2", /* colors */ " c #7497C1", " . c #D6DEE9", " X c #466DA1", " o c #8BA5C7", " O c #2F5891", " + c #E6EBF2", " @ c #E4E9F0", " # c #4B6E9F", " $ c #8CA2C1", " % c #6B8FBB", " & c #567CAD", " * c #5278A9", " = c #829DC1", " - c #AABAD1", " ; c #EDF0F5", " : c #FDFDFE", " > c #6387B6", " , c #4B72A5", " < c #345D95", " 1 c #6482AD", " 2 c #335B94", " 3 c #617EAA", " 4 c #BAC9DD", " 5 c #CDDAE9", " 6 c #E8ECF3", " 7 c #2E558F", " 8 c #2D558E", " 9 c #E6EAF1", " 0 c #C8D4E4", " q c #7296C1", " w c #C2CEDE", " e c #4D6FA0", " r c #A0B9D7", " t c #5A7FB0", " y c #728FB7", " u c #5B7AA7", " i c #2A538E", " p c #7999C1", " a c #F2F5F9", " s c #F0F3F7", " d c #365C93", " f c #BDCADC", " g c #FEFEFE", " h c #597AA8", " j c #6D8BB5", " k c #6B89B3", " l c #6987B1", " z c #6286B4", " x c #4D73A6", " c c #386098", " v c #214B88", " b c #6381AB", " n c #EDF1F7", " m c #315891", " M c #E9EDF3", " N c #6C8DB7", " B c #2D5690", " V c #86A1C3", " C c #5C7BA7", " Z c #9BB2D1", " A c #C9D7E7", " S c #6C88B0", " D c #6587B3", " F c #BDC9DB", " G c #547AAC", " H c #3B639A", " J c #6B88B2", " K c #244E8A", " L c #234C89", " P c #224C88", " I c #8FA8C8", " U c #6582AC", " Y c #CBD6E5", " T c #6085B4", " R c #94A9C6", " E c #5E83B2", " W c #325B94", " Q c #E5EAF1", " ! c #3B6096", " ~ c #C0CCDD", " ^ c #8CA1C1", " / c #6A8EBA", " ( c #5978A6", " ) c #5878A5", " _ c #3C649A", " ` c #264F8B", " ' c #254F8A", " ] c #94ADCC", " [ c #6284B2", " { c #F1F5F9", " } c #F0F3F8", " | c #EFF3F7", ". c #A9B9D0", ".. c #496FA3", ".X c #345C95", ".o c #335C94", ".O c #E8EDF3", ".+ c #B7C6DA", ".@ c #E7EBF2", ".# c #2C548D", ".$ c #A6B9D3", ".% c #7093BF", ".& c #42699F", ".* c #40679D", ".= c #5176A7", ".- c #27508B", ".; c #6A86AF", ".: c #ADBCD3", ".> c #F1F4F8", "., c #7594BD", ".< c #EFF2F6", ".1 c #A0B5D0", ".2 c #FFFFFF", ".3 c #678BB9", ".4 c #9BAFCB", ".5 c #6589B7", ".6 c #4C72A5", ".7 c #204A87", ".8 c #6482AC", ".9 c #A7B8D0", ".0 c #E9EEF3", ".q c #2F578F", ".w c #2D558D", ".e c #CAD6E5", ".r c #F9FBFC", ".t c #C6D2E1", ".y c #7396C1", ".u c #90A5C3", ".i c #6F92BD", ".p c #456CA1", ".a c #9FB7D5", ".s c #436A9F", ".d c #5D7CA8", ".f c #718DB5", ".g c #E3E8F0", ".h c #385E94", ".j c #9DB7D6", ".k c #D1DBE8", ".l c #47699C", ".z c #A0B4CF", ".x c #3A6299", ".c c #254F8B", ".v c #386097", ".b c #234D89", ".n c #224B88", ".m c #EFF3F8", ".M c #7191BB", ".N c #EBEFF4", ".B c #89A1C2", ".V c #CCD7E6", ".C c #FBFCFD", ".Z c #789BC5", ".A c None", /* pixels */ ".A.A.A.A.A.7.7.7.7.7.7.A.A.A.A.A", ".A.A.A.A.# ^ F.N.N F $.#.A.A.A.A", ".A.A.7 u.g. U ! ! U - @ C.7.A.A", ".A.A 3.@ (.l w s 9.9 e 1.O.d.A.A", ".A 8 Q ).7 S : ..<.2 f c k +.w.A", ".7.u. .7.7 # e W h.2.C X.s.+ R.7", ".7 ~ U.7.- B.X.x.B.2 6 , x V.t L", ".7 ; d ' B < H j.r g = G & N | v", ".7 ;.h i 2.x.&.O.2.1 t E T., }.n", ".7 ~.; O.v.*.= 0.e z >.3 / Z.V K", ".7.u.:.o _.p * I ].5 %.%.y A.z v", ".A 8 + l.*.. [.2.2.i q.Z.j n.q.A", ".A.A b.0 y.6 D.2.2 .Z r { J.A.A", ".A.A.7.8 M 4 o.M p.a 5.m.f `.A.A", ".A.A.A.A 7.4 Y.> a.k.$ m.A.A.A.A", ".A.A.A.A.A.7.b P P.c v.A.A.A.A.A" }; /* mimetypes/image-x-generic.png */ /* XPM */ const char *tango_image_x_generic[] = { /* width height ncolors chars_per_pixel */ "16 16 87 1", /* colors */ " c #6583AF", ". c #95A8C7", "X c #6381AD", "o c #617FAB", "O c #A5B5D0", "+ c #738EB6", "@ c #3F516F", "# c #384151", "$ c #3D4F6D", "% c #5B7BA8", "& c #45546E", "* c #7A8698", "= c #5475A4", "- c #98ABC9", "; c #67758F", ": c #A8B8D2", "> c #9CA7B9", ", c #839ABE", "< c #6180AD", "1 c #D1DCB1", "2 c #8691A3", "3 c #A4B8A9", "4 c #515151", "5 c #FEFEFE", "6 c #485773", "7 c #E2EBBE", "8 c #5778A6", "9 c #9AACCA", "0 c #7D899D", "q c #F6F6F6", "w c #9EA8BA", "e c #7892B9", "r c #A8B7D1", "t c #374762", "y c #818A9A", "u c #93A6C6", "i c #A2B3CE", "p c #8099BD", "a c #FFFFFE", "s c #405374", "d c #889EC1", "f c #869CBF", "g c #455672", "h c #435470", "j c #96A9C8", "k c #A6B6D1", "l c #33476A", "z c #FEFEF9", "x c #3D4E6D", "c c #888A85", "v c #3B4C6B", "b c #B6C5B2", "n c #8CA1C1", "m c #6D89B3", "M c #415474", "N c #C4D1AF", "B c #EEF3CB", "V c #475773", "C c #818DA2", "Z c #2F4262", "A c #DCE5B9", "S c #384C6E", "D c #A7B7D1", "F c #7590B7", "G c #34486A", "H c #9DAFC7", "J c #5072A3", "K c #6884AA", "L c #233659", "P c #8FA6AF", "I c #FDFDFD", "U c #6986B1", "Y c #819AB8", "T c #9FA9BB", "R c #9EA9BA", "E c #5F7EAA", "W c #B3C2B7", "Q c #728DB6", "! c #A1B3C3", "~ c #FCFDEE", "^ c #8EA3C4", "/ c #F7FADF", "( c #495973", ") c #C5D1B1", "_ c #3D5071", "` c #718DA7", "' c None", /* pixels */ "cccccccccccccccc", "c55555555555555c", "cI*tttttttttt*qc", "c5@oXK`E%8==Jtqc", "cIh+PAB3mU <tqc", "cIgpNza7YeFFQtqc", "cIV^b/~1ndff,tqc", "cI69HW)!-j0.utqc", "cI(r::rDkO42itqc", "cI&TTTTRw>44ytqc", "cItx$$xvZL44#tqc", "cItMs_SGl4444tqc", "cItC;;;;;;;;;tqc", "cI*tttttttttt*qc", "c5qqqqqqqqqqqqIc", "cccccccccccccccc" }; /* actions/go-previous.png */ /* XPM */ const char *tango_go_previous[] = { /* width height ncolors chars_per_pixel */ "16 16 99 2", /* colors */ " c #65A827", " . c #6EC915", " X c #C6DEAE", " o c #C2DCAA", " O c #52891E", " + c #3B7504", " @ c #CAE0B5", " # c #7CC833", " $ c #67C111", " % c #AACF88", " & c #97DA54", " * c #97BD72", " = c #6BA236", " - c #A0C37E", " ; c #55A409", " : c #61B70E", " > c #A9D480", " , c #60B50D", " < c #87B65B", " 1 c #3C7604", " 2 c #C7DFB1", " 3 c #9DC477", " 4 c #87BB54", " 5 c #3A7405", " 6 c #82B74F", " 7 c #A5DC6E", " 8 c #457C13", " 9 c #88BB58", " 0 c #60A420", " q c #B8D69B", " w c #90BF63", " e c #B3D296", " r c #3D7904", " t c #A6CF7F", " y c #C5DEAE", " u c #8DC459", " i c #96CA65", " p c #3A7304", " a c #59AC0B", " s c #598B29", " d c #578927", " f c #41790E", " g c #ACD881", " h c #5EA31D", " j c #70AD35", " k c #6EA23D", " l c #7FB947", " z c #C4DDAC", " x c #7AB742", " c c #4E9A06", " v c #3B7604", " b c #4D8419", " n c #3B7404", " m c #A5D576", " M c #A3CA7E", " N c #5AAD0B", " B c #AEDB82", " V c #65B519", " C c #A9D77D", " Z c #5A8C2C", " A c #7DA855", " S c #8BBD5C", " D c #61B60E", " F c #71B035", " G c #7BB642", " H c #66AF20", " J c #BFDAA6", " K c #75B23C", " L c #B0DE83", " P c #3F790A", " I c #A7CD84", " U c #FFFFFF", " Y c #A5C982", " T c #80B64D", " R c #5D8D2E", " E c #7FA956", " W c #56A609", " Q c #8ABC5A", " ! c #89BC59", " ~ c #87BA57", " ^ c #91C064", " / c #68A92B", " ( c #BDD9A3", " ) c #519E07", " _ c #5EB30D", " ` c #94C26A", " ' c #C8DFB1", " ] c #A3D572", " [ c #69C211", " { c #66AC22", " } c #3A7404", " | c #5CAD0E", ". c #7DB549", ".. c #58A90A", ".X c #437A10", ".o c #62AF17", ".O c #85B954", ".+ c #B5D497", ".@ c None", /* pixels */ ".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@", ".@.@.@.@.@.@.@.@ n s p.@.@.@.@.@", ".@.@.@.@.@.@.@ } E ' p.@.@.@.@.@", ".@.@.@.@.@.@.X - ( @ p.@.@.@.@.@", ".@.@.@.@ n R e % ^ 2 v p p p p }", ".@.@.@ 5 A.+ ` ~ S z y X y z o p", ".@.@ 8 * I T. 6.O 9 ! Q ! 9 J p", " + Z Y w j K G l x F h 0 / q p", " + d 3 4 { H.o | a.. ; ) c c M p", ".@.@ f < i V , : D _ N W ) c M p", ".@.@.@ + k m # [ $ B g > t M M p", ".@.@.@.@ v O ] & . L r p p p p }", ".@.@.@.@.@.@ P u 7 L p.@.@.@.@.@", ".@.@.@.@.@.@.@ 1 = C p.@.@.@.@.@", ".@.@.@.@.@.@.@.@ v b p.@.@.@.@.@", ".@.@.@.@.@.@.@.@.@.@ +.@.@.@.@.@" }; /* actions/system-log-out.png */ /* XPM */ const char *tango_system_log_out[] = { /* width height ncolors chars_per_pixel */ "16 16 186 2", /* colors */ " c #E26E6E", " . c #D94141", " X c #E5E6E4", " o c #ECE3E1", " O c #AFAFAF", " + c #ADADAD", " @ c #ABABAB", " # c #A9A9A9", " $ c #A7A7A7", " % c #E88E8E", " & c #A5A5A5", " * c #A3A3A3", " = c #5C5E5A", " - c #A1A1A1", " ; c #A20E0E", " : c #585A56", " > c #9D9D9D", " , c #565854", " < c #D23D3D", " 1 c #999999", " 2 c #979797", " 3 c #959595", " 4 c #939393", " 5 c #AC1111", " 6 c #919191", " 7 c #8F8F8F", " 8 c #8D8D8D", " 9 c #8B8B8B", " 0 c #898989", " q c #EA9696", " w c #E16969", " e c #F1F1EF", " r c #858585", " t c #A50000", " y c #EFEFED", " u c #645F5E", " i c #7F7F7F", " p c #EB9A9A", " a c #797979", " s c #A60404", " d c #757575", " f c #A11616", " g c #E88D8D", " h c #6F6F6F", " j c #D9DBD7", " k c #A61111", " l c #D7D9D5", " z c #656565", " x c #D23C3C", " c c #989897", " v c #DB4848", " b c #D21B1B", " n c #5D5D5D", " m c #C7C9C5", " M c #C6C9C4", " N c #595959", " B c #B02121", " V c #898A88", " C c #EA9595", " Z c #CF0E0E", " A c #878886", " S c #EDD4D3", " D c #FAFAFA", " F c #E78888", " G c #A60303", " H c #CD6161", " J c #686A67", " K c #D32525", " L c #9A9B98", " P c #D73636", " I c #D79292", " U c #929390", " Y c #8A6464", " T c #C6C8C3", " R c #B12221", " E c #8D8F8B", " W c #DD5656", " Q c #B51B1B", " ! c #C42D2D", " ~ c #D0D2D0", " ^ c #F3F1EF", " / c #D63838", " ( c #7F817D", " ) c #FBFBFA", " _ c #D52D2D", " ` c #BEBEBE", " ' c #F3F3F2", " ] c #BABABA", " [ c #737571", " { c #EFEFEE", " } c #DB4D4D", " | c #AC1515", ". c #C46C6B", ".. c #E4E5E3", ".X c #686966", ".o c #656763", ".O c #DC5151", ".+ c #646562", ".@ c #AAAAAA", ".# c #C58886", ".$ c #61635F", ".% c #CE0808", ".& c #A6A6A6", ".* c #5F615D", ".= c #A4A4A4", ".- c #A2A2A2", ".; c #5B5D59", ".: c #C5C7C1", ".> c #A0A0A0", "., c #595B57", ".< c #9E9E9E", ".1 c #575955", ".2 c #9C9C9C", ".3 c #555753", ".4 c #9A9A9A", ".5 c #989898", ".6 c #969696", ".7 c #949494", ".8 c #BC2424", ".9 c #929292", ".0 c #867979", ".q c #8C8C8C", ".w c #F4F4F2", ".e c #888888", ".r c #868686", ".t c #858685", ".y c #F0F0EE", ".u c #DB4C4C", ".i c #BC3E3E", ".p c #828282", ".a c #808080", ".s c #7E7E7E", ".d c #767676", ".f c #707070", ".g c #7E6A6A", ".h c #6E6E6E", ".j c #D8DAD6", ".k c #C53636", ".l c #A2A3A1", ".z c #6C6C6C", ".x c #AC2524", ".c c #D6D8D4", ".v c #AA0B0B", ".b c #D4D6D2", ".n c #B01E1E", ".m c #686868", ".M c #646464", ".N c #DA9696", ".B c #606060", ".V c #B72828", ".C c #A51413", ".Z c #D11A1A", ".A c #C3C6C1", ".S c #8B7373", ".D c #BC3030", ".F c #FFFFFF", ".G c #FBFBFB", ".H c #F9F9F9", ".J c #D43A3A", ".K c #ECA7A7", ".L c #C76565", ".P c #696B68", ".I c #C6C9C3", ".U c #A90C0C", ".Y c #BEC1BB", ".T c #CE0C0C", ".R c #D33535", ".E c #DB4A4A", ".W c #C45151", ".Q c #C3C3C3", ".! c #F8F8F7", ".~ c #F6F6F5", ".^ c #BB4948", "./ c #CF1010", ".( c #F4F4F3", ".) c #BDBDBD", "._ c #BBBBBB", ".` c #B64543", ".' c #A50101", ".] c #EDEEEC", ".[ c #D26565", ".{ c #B93C3C", ".} c #6D6E6B", ".| c #A28988", "X c #D55E5E", "X. c None", /* pixels */ ".;.3.3.3.3.3.3.3 , =.+.X J.o.}X.", ".3.& r a.h z n N y e.(.~.~.] (X.", ".3 +.q i d.z.M.B y '.! ).G.H LX.", ".3 ] 3 0.s d.h.m {.w.H I.i D.lX.", ".3._ >.7 0 i.d.f.y ^.L.W | S.|X.", ".3.).> 2 7.r.s.d o.{ H.K.D.V R.'", ".3 `.-.4 6.e.a.g B.[ F % C q p.'", ".3 `.=.2 4 9 Y kX w v.E.u } g G", ".3 ` $.<.6 8 f.k W _ K.Z./ b s", ".3 ` # -.5 7.S ; ! P.%.T.T Z.O.'", ".3 `.@ *.4.9 0.0.x.8 / ..J x < t", ".3 `.@ & > 3 7.p u.^ Q.R s.n.C.v", ".3 `.@ # - 1 h V ~... 5.U X AX.", ".3 ` @ O.t E m.b l.j j.#.`.c [X.", ".3.Q c U.Y.A T.I M M M M M.:.$X.", ".;.P ,.1 : : : :.,.,.,.,., :.*X." }; /* actions/list-remove.png */ /* XPM */ const char *tango_list_remove[] = { /* width height ncolors chars_per_pixel */ "16 16 20 1", /* colors */ " c #000000", ". c #7DA6D7", "X c #86ADD9", "o c #9FBEE0", "O c #B6CCE6", "+ c #83AAD8", "@ c #BBD1E7", "# c #7FA8D7", "$ c #94B6DB", "% c #3465A4", "& c #95B7DB", "* c #B5CCE6", "= c #B4CCE5", "- c #92B4DA", "; c #B6CDE6", ": c #B7CEE6", "> c #90B3DA", ", c #C0D3E8", "< c #BCD1E7", "1 c None", /* pixels */ "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "11%%%%%%%%%%%%11", "11%,@<::::;*O%11", "11%=&$->X+#.o%11", "11%%%%%%%%%%%%11", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111", "1111111111111111" }; /* devices/multimedia-player.png */ /* XPM */ const char *tango_multimedia_player[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #666864", ". c #626460", "X c #858782", "o c #80817D", "O c #7E7F7B", "+ c #7D7F7A", "@ c #7C7D79", "# c #7B7D78", "$ c #CBCFAC", "% c #7A7B77", "& c #696B66", "* c #CBD0A5", "= c #676964", "- c #C9D0A3", "; c #A4A6A3", ": c #D1D6AE", "> c #5B5B58", ", c #BDC58D", "< c #B2B796", "1 c #C3C996", "2 c #8A8C89", "3 c #B8B9B6", "4 c #A5A7A3", "5 c #989996", "6 c #C3C79F", "7 c #BFC59B", "8 c #C5C9A4", "9 c #838581", "0 c #7C7D7A", "q c #AEAEAB", "w c #A8AAA5", "e c #6E6F6C", "r c #A2A49F", "t c #BEC496", "y c #969893", "u c #92948F", "i c #91928E", "p c #BBC096", "a c #555753", "s c #535551", "d c #888A85", "f c #80827D", "g c #B8BCAA", "h c #CFD4B0", "j c #7E807B", "k c #7C7E79", "l c #7A7C77", "z c #787A75", "x c #747671", "c c #70726D", "v c #6E706B", "b c #6C6E69", "n c #6A6C67", "m c #686A65", "M c #9B9D9A", "N c #939592", "B c #C3CA96", "V c #B6B6B4", "C c #B4B5A8", "Z c #BBC291", "A c #ADAEAB", "S c #A5A6A3", "D c #A4A6A2", "F c #9FA09D", "G c #696968", "H c #B8BCA8", "J c #B3BC78", "K c #B6BAA6", "L c #898A87", "P c #C4CAA3", "I c #C5CB9A", "U c #B9B9B6", "Y c #C9CEAB", "T c #787A76", "R c #767874", "E c #BBC286", "W c #747672", "Q c #A6A7A3", "! c None", /* pixels */ "saaaaaaaaaaaaaaa", "aRQQQ444444S;DRa", "a5i%%%@@@@@Ood5a", "a5N<68Y$P7tZh25a", "a5rpBI-*1,EJ:y5a", "a5uCgHHHHHHKKX5a", "a5vbbnbvbnnbnn5a", "a5&=m==&m==&=m5a", "a5zqMwAWxWc>. 5a", "a5L3DVU+++TG0e5a", "a5+++++++++9fj5a", "a5kkkkkkkkkkkk5a", "a5#F#F########5a", "a5llllllllllll5a", "aR555555555555Ra", "aaaaaaaaaaaaaaaa" }; /* apps/internet-web-browser.png */ /* XPM */ const char *tango_internet_web_browser[] = { /* width height ncolors chars_per_pixel */ "16 16 167 2", /* colors */ " c #000000", " . c #56719D", " X c #6984A9", " o c #DCE1E5", " O c #F1F2F3", " + c #8BA7C7", " @ c #84A6CA", " # c #DFEFFF", " $ c #93B6DC", " % c #EDEEEF", " & c #5A79A4", " * c #5979A3", " = c #5877A2", " - c #BCC4CC", " ; c #B1C0D5", " : c #E3E4E5", " > c #5685B7", " , c #B1CEEC", " < c #627CA5", " 1 c #B3C1D0", " 2 c #F0F4F8", " 3 c #B5BEC8", " 4 c #CCDDEF", " 5 c #DBDEE0", " 6 c #7591B4", " 7 c #759FCB", " 8 c #BED4EB", " 9 c #F8F9F9", " 0 c #B7C2CD", " q c #BECFE1", " w c #BCCDDF", " e c #5B7AA4", " r c #B5C5D8", " t c #5978A2", " y c #93ABC7", " u c #C6CFD8", " i c #D4DDE9", " p c #A3B8D0", " a c #A0B4CD", " s c #BEC7D0", " d c #CAD5DF", " f c #5988BC", " g c #E0E3E4", " h c #DFE1E3", " j c #83A7CE", " k c #637FA8", " l c #617FA6", " z c #FEFEFE", " x c #D7D9DB", " c c #DCE4ED", " v c #F6F6F6", " b c #5E7DA6", " n c #628FC1", " m c #CCD9E7", " M c #E6EBF0", " N c #C0C6CE", " B c #57759F", " V c #DBE4EF", " C c #E2E2E2", " Z c #80A7D1", " A c #E0E0E0", " S c #B7C8DC", " D c #B1C2D6", " F c #DCE3E9", " G c #6B96C6", " H c #7A95B7", " J c #BABFC4", " K c #A9BCD1", " L c #D9E1E9", " P c #CED0D1", " I c #6983A6", " U c #C8CFD5", " Y c #7591B5", " T c #9DA6AE", " R c #6D90B7", " E c #D2E5F9", " W c #819ABA", " Q c #DEE2E7", " ! c #D6DFE9", " ~ c #A3B6CE", " ^ c #DAEAFA", " / c #CFD9E2", " ( c #5A7AA4", " ) c #5C8ABD", " _ c #A2BDDA", " ` c #D5DFEB", " ' c #A5B7C9", " ] c #CCD7E2", " [ c #C3D2E3", " { c #5686BA", " } c #E3F1FF", " | c #C8CED4", ". c #E2EFFE", ".. c #7792B6", ".X c #516994", ".o c #9BB2CC", ".O c #9AB0CB", ".+ c #839BBB", ".@ c #C9E1F9", ".# c #F4F4F5", ".$ c #CED1D3", ".% c #E0EFFF", ".& c #4F80B6", ".* c #CEDBEA", ".= c #5D7DA6", ".- c #5A79A3", ".; c #5877A1", ".: c #E0E5EB", ".> c #94ACC8", "., c #7E97B9", ".< c #6C96C5", ".1 c #BECBDA", ".2 c #E6EBF4", ".3 c #DAEBFC", ".4 c #D4E5F6", ".5 c #E4E6E8", ".6 c #E2E4E6", ".7 c #9CBDE0", ".8 c #6380A8", ".9 c #C7CDD2", ".0 c #ACCAE9", ".q c #BBC9DA", ".w c #9DB3CD", ".e c #5E7AA3", ".r c #FDFDFD", ".t c #BCD7F2", ".y c #FBFBFB", ".u c #5A769F", ".i c #F9F9F9", ".p c #58749D", ".a c #AABED3", ".s c #F5F5F5", ".d c #E1F0FF", ".f c #EFEFEF", ".g c #BECAD6", ".h c #BCC8D4", ".j c #5876A0", ".k c #719BC9", ".l c #B5D1EE", ".z c #B8BFC6", ".x c #576F95", ".c c #D5DFE9", ".v c #DEEEFF", ".b c #B8C9DD", ".n c #627BA3", ".m c #101221", ".M c #AEB5BC", ".N c #AFBFD4", ".B c #4B6189", ".V c #D3D3D3", ".C c #D1D1D1", ".Z c #7994B6", ".A c #DCDDDF", ".S c #B4C7DC", ".D c #9FB4CE", ".F c #A4B5C9", ".G c #9CB2CB", ".H c #708AAD", ".J c #CCE3FA", ".K c #ABBDD3", ".L c #B3CCE8", ".P c #E2F1FF", ".I c #617FA8", ".U c #DEEDFB", ".Y c #D5E8FC", ".T c #5977A0", ".R c None", /* pixels */ ".R.R.R.R.R.j e ( t =.R.R.R.R.R.R", ".R.R.R.e.+.q c.2 ` D., *.R.R.R.R", ".R.R l ;.: / J.1 8.g L ~.-.R.R.R", ".R X.N Q.$. .U.4.h N 5 M a (.R.R", ".n W 2 : d.P } ^ u x.#.y.c.Z.R.R", ".H r g 4.%.d.d.3.9 s.F 3.5 p (.R", ".8 i.a.J.v # #.*.r z.r.6.A w (.R", " e V.0.t.@.Y E U z z z.i.M [ (.R", " b m 0 |.L.l , K 9 O z.f P.b (.R", " k.K o z h _.7 $ @ +.s C T.w (.R", " < H ! z z % j Z 7.< A.V ' Y.R.R", ".R.I.G F v.z.k G n f.C -.> (.R.R", ".R.R.=.O ] R ) {.& > 1 y *.R.R.R", ".R.R.R I...D S q.S.o 6.T.R.R.R.R", ".R.R.R.R.x.u.- & t.p.R.R.R.R.R.R", ".R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R" }; /* actions/list-add.png */ /* XPM */ const char *tango_list_add[] = { /* width height ncolors chars_per_pixel */ "16 16 20 1", /* colors */ " c #000000", ". c #7DA6D7", "X c #86ADD9", "o c #9FBEE0", "O c #B6CCE6", "+ c #83AAD8", "@ c #BBD1E7", "# c #7FA8D7", "$ c #94B6DB", "% c #3465A4", "& c #95B7DB", "* c #B5CCE6", "= c #B4CCE5", "- c #92B4DA", "; c #B6CDE6", ": c #B7CEE6", "> c #90B3DA", ", c #C0D3E8", "< c #BCD1E7", "1 c None", /* pixels */ "1111111111111111", "1111111111111111", "111111%%%%111111", "111111%::%111111", "111111%::%111111", "111111%::%111111", "11%%%%%::%%%%%11", "11%,@<::::;*O%11", "11%=&$->X+#.o%11", "11%%%%%XX%%%%%11", "111111%:X%111111", "111111%:X%111111", "111111%::%111111", "111111%%%%111111", "1111111111111111", "1111111111111111" }; /* apps/preferences-desktop-font.png */ /* XPM */ const char *tango_preferences_desktop_font[] = { /* width height ncolors chars_per_pixel */ "16 16 79 1", /* colors */ " c #000000", ". c #B1B1B1", "X c #ADADAD", "o c #A7A7A7", "O c #797979", "+ c #EAEBEB", "@ c #E9E9EA", "# c #E8E9E9", "$ c #5F5F5F", "% c #4D4D4D", "& c #4B4B4B", "* c #FCFCFC", "= c #494949", "- c #FAFAFA", "; c #474747", ": c #F8F8F8", "> c #F6F6F6", ", c #F4F4F4", "< c #F2F2F2", "1 c #F0F0F0", "2 c #EEEEEE", "3 c #ECECEC", "4 c #E8E8E8", "5 c #E6E6E6", "6 c #E5E6E5", "7 c #E4E4E4", "8 c #E2E2E2", "9 c #2F2F2F", "0 c #CECECE", "q c #050505", "w c #EAE9E9", "e c #010101", "r c #E8E7E7", "t c #E7E7E6", "y c #8A8C87", "u c #888A85", "i c #828282", "p c #7C7C7C", "a c #767676", "s c #747474", "d c #E4E4E5", "f c #666666", "g c #626262", "h c #565656", "j c #FFFFFF", "k c #FDFDFD", "l c #4A4A4A", "z c #FBFBFB", "x c #484848", "c c #F9F9F9", "v c #F7F7F7", "b c #F5F5F5", "n c #F3F3F3", "m c #F1F1F1", "M c #EFEFEF", "N c #EDEDED", "B c #ECEDEC", "V c #ECEBEC", "C c #EBEBEB", "Z c #EAEBEA", "A c #E9E9E9", "S c #E6E7E6", "D c #343434", "F c #E4E5E4", "G c #E4E3E4", "H c #E3E3E3", "J c #2E2E2E", "K c #2C2C2C", "L c #DBDBDB", "P c #222222", "I c #D3D3D3", "U c #202020", "Y c #BFBFBF", "T c #B8B9B8", "R c #060606", "E c #ECECEB", "W c #040404", "Q c #EBEAEA", "! c None", /* pixels */ "!uuuuuuuuuuuuuu!", "ujjjjjjjjjjjjjju", "ujHoi99H5555HHku", "ujH8L09H4A44HHku", "ujH.9s95S56dGHku", "ujH9IY9AAw#r5Fzu", "uj7999T&9BV+Atzu", "uj53N2M;K1M2E@:u", "uj4NM1mxUD eg<>u", "ujwM1<nx a<f .Mu", "ujZ1<nb=qncL pMu", "ujCmn,>=RmzI aMu", "uj+<,>vl Ov$ XMu", "ujQ<,>:hJPW %vMu", "uj******--->>>Mu", "!uuuuuuuuuuuuuu!" }; /* actions/process-stop.png */ /* XPM */ const char *tango_process_stop[] = { /* width height ncolors chars_per_pixel */ "16 16 136 2", /* colors */ " c #000000", " . c #BF0000", " X c #EB4C4C", " o c #F68888", " O c #D89292", " + c #E8BCBC", " @ c #FCF7F7", " # c #EF6A6A", " $ c #DB3C3C", " % c #ED4747", " & c #DF2C2C", " * c #B22424", " = c #B82323", " - c #D75F5F", " ; c #D52F2F", " : c #F58383", " > c #C41B1B", " , c #B41F1F", " < c #F26969", " 1 c #C10101", " 2 c #CC0F0F", " 3 c #E4AAAA", " 4 c #E9A5A5", " 5 c #F68787", " 6 c #D22F2F", " 7 c #C70000", " 8 c #BF1919", " 9 c #F78B8B", " 0 c #E6A5A5", " q c #D13131", " w c #DF2B2B", " e c #BF0505", " r c #D85C5C", " t c #CF2F2F", " y c #BD0303", " u c #E83737", " i c #E6E0E0", " p c #C92929", " a c #FEFEFE", " s c #880000", " d c #CC2F2F", " f c #DB4141", " g c #C10000", " h c #E6ABAB", " j c #E6D9D9", " k c #DA6464", " l c #ECECEC", " z c #EA3F3F", " x c #E8E8E8", " c c #D75757", " v c #DACDCD", " b c #EB4343", " n c #D85B5B", " m c #ED5252", " M c #BD0202", " N c #D31111", " B c #BC1818", " V c #E6DFDF", " C c #E63434", " Z c #B32626", " A c #AF2222", " S c #DB4040", " D c #B41D1D", " F c #EC6161", " G c #EF5A5A", " H c #890303", " J c #D65F5F", " K c #ED6565", " L c #D85A5A", " P c #D65858", " I c #DA3B3B", " U c #E39696", " Y c #E5A5A5", " T c #BE0505", " R c #CE2F2F", " E c #C30000", " W c #D01010", " Q c #E73737", " ! c #B01818", " ~ c #D21F1F", " ^ c #890202", " / c #CB0101", " ( c #870000", " ) c #E83B3B", " _ c #CE2828", " ` c #F17575", " ' c #EE6868", " ] c #BD0000", " [ c #F3EDED", " { c #F68A8A", " } c #DB5F5F", " | c #C70303", ". c #B12222", ".. c #BE0404", ".X c #D75B5B", ".o c #E5DFDF", ".O c #E94545", ".+ c #C71D1D", ".@ c #B72121", ".# c #F9F9F9", ".$ c #DC4242", ".% c #B11B1B", ".& c #F1F1F1", ".* c #9E3333", ".= c #EDEDED", ".- c #F58585", ".; c #F38383", ".: c #DFDFDF", ".> c #DA6767", "., c #DBDBDB", ".< c #F68989", ".1 c #D23131", ".2 c #A43F3F", ".3 c #D02F2F", ".4 c #C50000", ".5 c #D93B3B", ".6 c #D53737", ".7 c #DE9292", ".8 c #DF2D2D", ".9 c #F06F6F", ".0 c #890000", ".q c #C51A1A", ".w c #B11A1A", ".e c #D63B3B", ".r c #D52323", ".t c #EC4A4A", ".y c #E2DEDE", ".u c #D89999", ".i c #DEACAC", ".p c #B82424", ".a c #D76060", ".s c #D53030", ".d c #DAD6D6", ".f c #880202", ".g c #860000", ".h c None", /* pixels */ ".h.h.h.h.0.g.g.g.g.g.g.0.h.h.h.h", ".h.h.h.0 A o 9 9 { 5 : =.0.h.h.h", ".h.h.0. .;.$ ; ; ; ; $ ` ,.0.h.h", ".h.0 *.;.$.6 ; ; ; ;.6 I.9.%.0.h", ".0 Z.; f c v - ; ; r j }.5 # !.0", ".f.< S ; O.,.d.a L i.= Y 6.e '.f", " H o ; ;.s.u.:.y V l h.1.3 R K ^", " H o ; ; ;.s.i x l + q t R d F ^", " H o ; ; ; n V l.& [ k R d p.O ^", " H.- ; ;.X.o l 3 0.# @.>.q M u ^", ".f <.r ~.7 l 3.3 _ 4 a U ] y C ^", ".0.p G N / P |.4 E 1 J M.. w.+ (", ".h.0.@ m W 7.4 E g . ] T & > s.h", ".h.h.0 D X 2 E g . ] e.8 8 s.h.h", ".h.h.h.0.w.t % b z ) Q B s.h.h.h", ".h.h.h.h.0.g.g.g.g.g.g s.h.h.h.h" }; /* actions/view-refresh.png */ /* XPM */ const char *tango_view_refresh[] = { /* width height ncolors chars_per_pixel */ "16 16 100 2", /* colors */ " c #9DBDDC", " . c #6990C0", " X c #3767A6", " o c #3667A5", " O c #3565A4", " + c #DDE8F3", " @ c #8AACD3", " # c #99B9DB", " $ c #B4CBE5", " % c #D8E4F1", " & c #5783BB", " * c #537FB7", " = c #4B77AF", " - c #A0BEDE", " ; c #3868A6", " : c #3768A5", " > c #4C79B3", " , c #769DCF", " < c #5580B5", " 1 c #97B6D8", " 2 c #8FACD0", " 3 c #E4ECF5", " 4 c #4E7AB1", " 5 c #C8D8EA", " 6 c #4C78AF", " 7 c #8FB0D3", " 8 c #6D94C2", " 9 c #6891C7", " 0 c #3C6BA9", " q c #3A69A7", " w c #3969A6", " e c #C6D8EB", " r c #4774AD", " t c #C1D2E6", " y c #6890C0", " u c #CDDBEB", " i c #3465A4", " p c #6188B9", " a c #DBE6F2", " s c #BFD2E7", " d c #84A6CE", " f c #E5EDF5", " g c #C9D9EA", " h c #8FADD2", " j c #A1BEDD", " k c #3A6AA6", " l c #E2EBF5", " z c #88A7CE", " x c #3768A6", " c c #95B2D4", " v c #3566A4", " b c #C4D7EB", " n c #4371AB", " m c #A1BBD9", " M c #E7EEF6", " N c #BFD3E9", " B c #5F87B9", " V c #7298C5", " C c #5D85B7", " Z c #6C95C9", " A c #82A5CE", " S c #9CB7D7", " D c #C9DAEC", " F c #E3ECF5", " G c #4C78B0", " H c #8EAED3", " J c #4F7CB6", " K c #3969A7", " L c #3869A6", " P c #3767A5", " I c #A8C2DF", " U c #93B1D4", " Y c #4170AB", " T c #CCDDEE", " R c #B0C9E3", " E c #E5EDF6", " W c #E4EDF5", " Q c #FFFFFF", " ! c #4D79B0", " ~ c #C7D7E9", " ^ c #4C77AF", " / c #5B84B7", " ( c #D5E2F0", " ) c #3C6CA9", " _ c #3A6AA7", " ` c #E0E9F4", " ' c #A8C1DE", " ] c #8CADD3", " [ c #B4CAE3", " { c #3566A5", " } c #7299CD", " | c #88ABD2", ". c #CCDCED", ".. c #E6EEF6", ".X c #BCD1E7", ".o c #7EA4D5", ".O c #3D6DA9", ".+ c #3C6BA8", ".@ c #3B6BA7", ".# c None", /* pixels */ ".#.#.#.# q _ o K _.#.#.#.#.#.#.#", ".#.#.# ; y 7 I ' U B P.#.#.# i.#", ".#.# w ] j $ N T ( s = o n v.#", ".# K . V.+ v _ C m % a + z 5 _.#", ".# ; Y ) _.#.#.# L p u l.... _.#", ".# O _ 9 P.#.#.#.#.# v ~ e F k.#", ".# i.#.#.#.#.#.#.# ; 2 M a.. k.#", ".#.#.#.#.#.#.#.# i i r ^ ^ 6 i.#", ".# i i i i i i i.#.#.#.#.#.#.#.#", ".# i f E 3 S x.#.#.#.#.#.#.# i.#", ".# v.. b g i.#.#.#.#.# { Z * i.#", ".# P.. F W t ! L.#.#.# 0 J _ :.#", ".# ; % c ` +. h G { w w.O G _.#", ".# P / o 4 [ D.X R - | A H ;.#.#", ".# i o.#.# X < d 1 # @ 8 ;.#.#.#", ".# i.#.#.#.#.# _ L v _.@.#.#.#.#" }; /* actions/go-next.png */ /* XPM */ const char *tango_go_next[] = { /* width height ncolors chars_per_pixel */ "16 16 101 2", /* colors */ " c #8BBB5D", " . c #78B63D", " X c #9CD267", " o c #A7D17F", " O c #B7D49C", " + c #6EAC33", " @ c #C3DCAB", " # c #9EC976", " $ c #C2DCAA", " % c #66B817", " & c #8AC255", " * c #CBE0B6", " = c #3B7504", " - c #5AAC0B", " ; c #66BF10", " : c #5F8F31", " > c #5E8F30", " , c #82AB5A", " < c #6FBA26", " 1 c #9CC37A", " 2 c #54A408", " 3 c #89C350", " 4 c #61B70E", " 5 c #BBD99F", " 6 c #6CBF1C", " 7 c #C0DBA7", " 8 c #74AF3B", " 9 c #4F9C06", " 0 c #3C7804", " q c #3C7604", " w c #4D8418", " e c #A4CC7E", " r c #8BC158", " t c #AFD48C", " y c #CEE3BB", " u c #3A7405", " i c #598C2A", " p c #467C14", " a c #B1D291", " s c #88BB58", " d c #ABD781", " f c #A4C684", " g c #91C164", " h c #5FB20E", " j c #C7DEB0", " k c #C6DEAF", " l c #40790A", " z c #3A7304", " x c #568926", " c c #9BCA6D", " v c #81AB5A", " b c #52A007", " n c #A5D773", " m c #C5DDAD", " M c #4E9A06", " N c #3B7604", " B c #3B7404", " V c #A3CA7E", " C c #427A0E", " Z c #80BE44", " A c #8BBD5C", " S c #64BA11", " D c #AAD581", " F c #82BE49", " G c #92D352", " H c #6BAC2F", " J c #538B1E", " K c #A8DA78", " L c #5BAE0B", " P c #6CBA1F", " I c #8DC25A", " U c #FFFFFF", " Y c #8CBE5C", " T c #8BBC5B", " R c #ABD681", " E c #62B90E", " W c #B9D79C", " Q c #71A63E", " ! c #A0D56C", " ~ c #68A92B", " ^ c #9DC873", " / c #BDD9A3", " ( c #99C46F", " ) c #5EB30D", " _ c #7FCB34", " ` c #8CC358", " ' c #CBE1B7", " ] c #3A7404", " [ c #8DC15C", " { c #57A709", " } c #437A10", " | c #64BC0F", ". c #88C44D", ".. c #AACE89", ".X c #85B954", ".o c #84C249", ".O c #A6D37B", ".+ c #8FC161", ".@ c #6AA136", ".# c #8DC655", ".$ c None", /* pixels */ ".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$", ".$.$.$.$.$ z i ].$.$.$.$.$.$.$.$", ".$.$.$.$.$ z ' , ].$.$.$.$.$.$.$", ".$.$.$.$.$ z y @ f }.$.$.$.$.$.$", " ] z z z z N * ( a O : B.$.$.$.$", " z 7 $ m k j j g.+ ^ 5 v u.$.$.$", " z /.X s T A Y [ I & ` t 1 p.$.$", " z W 8 + ~ H . F 3. .o Z c.. > =", " z V M M M b { L h % P <.# # x =", " z V M M 9 2 - ) E | 6 X C.$.$", " z V V V e o D 4 ; _ K Q N.$.$.$", " ] z z z z 0 R S G n J q.$.$.$.$", ".$.$.$.$.$ z d ! r l.$.$.$.$.$.$", ".$.$.$.$.$ z.O.@ q.$.$.$.$.$.$.$", ".$.$.$.$.$ z w N.$.$.$.$.$.$.$.$", ".$.$.$.$.$ =.$.$.$.$.$.$.$.$.$.$" }; /* actions/document-save-as.png */ /* XPM */ const char *tango_document_save_as[] = { /* width height ncolors chars_per_pixel */ "16 16 101 2", /* colors */ " c #000000", " . c #739FC0", " X c #6C8577", " o c #81ADD1", " O c #DFE2DE", " + c #DCDCDB", " @ c #8FB3CE", " # c #96BBD8", " $ c #4A7180", " % c #95A9AF", " & c #B7B8B6", " * c #4E6A7D", " = c #3D698A", " - c #AFB0AE", " ; c #AEB0AD", " : c #ACCBE3", " > c #ABCBE2", " , c #EDEDEE", " < c #E9E9EA", " 1 c #A2A4A1", " 2 c #6B716E", " 3 c #9BC2DF", " 4 c #38678B", " 5 c #6E99B6", " 6 c #FCFCFC", " 7 c #FAFAFA", " 8 c #6B7F88", " 9 c #F4F4F4", " 0 c #F3F4F3", " q c #F2F2F2", " w c #CED4C8", " e c #F0F0F0", " r c #EFEEEF", " t c #EEEEEE", " y c #EDEEED", " u c #ECECEC", " i c #627075", " p c #3F6C8E", " a c #719FBF", " s c #E4E4E4", " d c #79A7CA", " f c #DCDCDC", " g c #DBDCDB", " h c #C9D6DD", " j c #DDE1D6", " k c #D5DFE5", " l c #AEB0AE", " z c #44789F", " x c #5186AF", " c c #7798B0", " v c #ACBCC3", " b c #DCDBDB", " n c #C5DBEC", " m c #3D6B8E", " M c #58787A", " N c #C1D9EB", " B c #6A7F5A", " V c #3B6B8F", " C c #9EBFD9", " Z c #E2E6DD", " A c #9AAEB4", " S c #ABC8DF", " D c #6E706B", " F c #92A6AC", " G c #EEEEEF", " H c #EDEEEE", " J c #427092", " K c #EBECEC", " L c #688BA0", " P c #D0DFEF", " I c #6296BB", " U c #DBDCDC", " Y c #72756B", " T c #92B7D3", " R c #667173", " E c #98BFDC", " W c #FFFFFF", " Q c #FDFDFD", " ! c #FCFBFC", " ~ c #F9F9F9", " ^ c #F7F7F7", " / c #AFB0AD", " ( c #F3F3F3", " ) c #F1F1F1", " _ c #41749A", " ` c #EFEFEF", " ' c #EEEFEE", " ] c #CACFC4", " [ c #EDEDED", " { c #EAE9EA", " } c #A3A4A1", " | c #C5CBBF", ". c #4A6D85", ".. c #436E88", ".X c #E3E3E3", ".o c #DCDBDC", ".O c #5892BD", ".+ c #B1CEE6", ".@ c #4D7991", ".# c #547D9B", ".$ c None", /* pixels */ ".$.$.$ 4 4 4 = $ M.$.$.$.$.$.$.$", ".$.$.$.+ P n 3 L...$.$.$.$.$.$.$", " 8 R i. _ z C N x * D D D D D D", " 2 Z W j h 5 4 > T.# k W W W 9 D", " Y Q t [ O c 4 d @ m v , H y 0 D", " D ! K 4 4 4 4 d.O 4 4 4 4 u ( D", " D 7 < ] 4 E a a a . # 4 % { q D", " D ~ 7 s | 4 E . . S 4 F s 9 ) D", " D ~ t 7 s | 4 : E V F s 7 t ) D", " D ^.X t 7 7 w p 4 A 7 6 t.X e D", " D } 1 } } } } } } } } } } } } D", " D f b + f.o +.o f g U + U f D", " D ` / l - ; / / / / r ' G r D", " D W & & & & & & & & W W W W D", " D W W W W W W W W W W W W W D", " D D D D D D D D D D D D D D D D" }; /* actions/document-save.png */ /* XPM */ const char *tango_document_save[] = { /* width height ncolors chars_per_pixel */ "16 16 114 2", /* colors */ " c #000000", " . c #739FC0", " X c #AFAFAF", " o c #6C8577", " O c #81ADD1", " + c #DFE2DE", " @ c #A9A9A9", " # c #A8A7A8", " $ c #8FB3CE", " % c #9F9F9F", " & c #96BBD8", " * c #4A7180", " = c #95A9AF", " - c #B7B6B6", " ; c #4E6A7D", " : c #3D698A", " > c #AAAAA9", " , c #ACCBE3", " < c #ABCBE2", " 1 c #EDEDEE", " 2 c #E9E9EA", " 3 c #6B716E", " 4 c #9BC2DF", " 5 c #38678B", " 6 c #6E99B6", " 7 c #FEFEFE", " 8 c #FCFCFC", " 9 c #FAFAFA", " 0 c #6B7F88", " q c #F4F4F4", " w c #F3F4F3", " e c #F2F2F2", " r c #CED4C8", " t c #F0F0F0", " y c #EEEEEE", " u c #EDEEED", " i c #ECECEC", " p c #627075", " a c #3F6C8E", " s c #719FBF", " d c #E4E4E4", " f c #79A7CA", " g c #DCDCDC", " h c #D6D6D6", " j c #C9D6DD", " k c #D2D2D2", " l c #D0D0D0", " z c #CECECE", " x c #DDE1D6", " c c #CACACA", " v c #C8C8C8", " b c #C4C4C4", " n c #C2C2C2", " m c #BCBCBC", " M c #D5DFE5", " N c #B4B4B4", " B c #44789F", " V c #5186AF", " C c #7798B0", " Z c #ACBCC3", " A c #C5DBEC", " S c #3D6B8E", " D c #58787A", " F c #C1D9EB", " G c #6A7F5A", " H c #3B6B8F", " J c #9EBFD9", " K c #E2E6DD", " L c #9AAEB4", " P c #ABC8DF", " I c #6E706B", " U c #92A6AC", " Y c #A8A7A7", " T c #EDEEEE", " R c #427092", " E c #EBECEC", " W c #688BA0", " Q c #D0DFEF", " ! c #6296BB", " ~ c #72756B", " ^ c #92B7D3", " / c #667173", " ( c #98BFDC", " ) c #FFFFFF", " _ c #FDFDFD", " ` c #FCFBFC", " ' c #F9F9F9", " ] c #F7F7F7", " [ c #F3F3F3", " { c #F1F1F1", " } c #41749A", " | c #CACFC4", ". c #EDEDED", ".. c #EBEBEB", ".X c #EAE9EA", ".o c #C5CBBF", ".O c #4A6D85", ".+ c #436E88", ".@ c #E3E3E3", ".# c #DDDDDD", ".$ c #D5D5D5", ".% c #D1D1D1", ".& c #CFCFCF", ".* c #CDCDCD", ".= c #CBCBCB", ".- c #C9C9C9", ".; c #5892BD", ".: c #C5C5C5", ".> c #C3C3C3", "., c #B1CEE6", ".< c #4D7991", ".1 c #B9B9B9", ".2 c #547D9B", ".3 c None", /* pixels */ ".3.3.3 5 5 5 : * D.3.3.3.3.3.3.3", ".3.3.3., Q A 4 W.+.3.3.3.3.3.3.3", " 0 / p.O } B J F V ; I I I I I I", " 3 K ) x j 6 5 < ^.2 M ) ) ) q I", " ~ _ y. + C 5 f $ S Z 1 T u w I", " I ` E 5 5 5 5 f.; 5 5 5 5 i [ I", " I 9 2 | 5 ( s s s . & 5 =.X e I", " I ' 9 d.o 5 ( . . P 5 U d q { I", " I ' y 9 d.o 5 , ( H U d 9 y { I", " I ].@ y 9 9 r a 5 L 9 8 y.@ t I", " I 7 ) ) ) ) ) ) ) q q.....@ t I", " I z.-.-.-.-.:.-.-.:.:.:.:.: h I", " I z.: % X m b v l @ k @ k.1 c I", " I.*.> > N n b v.= #.% Y.% - c I", " I.# g g g.$.$.&.&.&.&.&.&.& c I", " I I I I I I I I I I I I I I I I" }; /* actions/system-shutdown.png */ /* XPM */ const char *tango_system_shutdown[] = { /* width height ncolors chars_per_pixel */ "16 16 66 1", /* colors */ " c #ABABAB", ". c #A9A9A9", "X c #8F8F8F", "o c #858585", "O c #7D7D7D", "+ c #6F6F6F", "@ c #6D6D6D", "# c #656565", "$ c #616161", "% c #5F5F5F", "& c #555555", "* c #515151", "= c #F6F6F6", "- c #F4F4F4", "; c #F0F0F0", ": c #EEEEEE", "> c #ECECEC", ", c #EAEAEA", "< c #E8E8E8", "1 c #E6E6E6", "2 c #E4E4E4", "3 c #E2E2E2", "4 c #E0E0E0", "5 c #2D2D2D", "6 c #DEDEDE", "7 c #2B2B2B", "8 c #272727", "9 c #D8D8D8", "0 c #D4D4D4", "q c #D2D2D2", "w c #CCCCCC", "e c #C2C2C2", "r c #BCBCBC", "t c #A6A6A6", "y c #A2A2A2", "u c #A0A0A0", "i c #888A85", "p c #8E8E8E", "a c #848484", "s c #808080", "d c #7A7A7A", "f c #6C6C6C", "g c #606060", "h c #F7F7F7", "j c #F5F5F5", "k c #F3F3F3", "l c #F1F1F1", "z c #EFEFEF", "x c #EDEDED", "c c #EBEBEB", "v c #E9E9E9", "b c #E7E7E7", "n c #E5E5E5", "m c #E3E3E3", "M c #E1E1E1", "N c #DFDFDF", "B c #282828", "V c #C9C9C9", "C c #C7C7C7", "Z c #C5C5C5", "A c #C3C3C3", "S c #C1C1C1", "D c #BBBBBB", "F c #B9B9B9", "G c #B3B3B3", "H c None", /* pixels */ "HiiiiiiiiiiiiiiH", "immmmmmmmmmmmmmi", "i3mz=hhhhhhh=1mi", "imz=jjjjjjjjjk2i", "in-kkwaooop;kkbi", "i1-ll*****B3ll<i", "i<kzz&OssX84z:vi", "iv;xxgtuGr74xx,i", "i,zcc#.FAV5Mc,>i", "ix,22dC>>m%22m:i", "i:<33O6jjj+63Mzi", "iz144oyeeDO946;i", "iz,66wf@$f q6Nli", "izlcMM6rSZV0M;li", "illlllllllllllli", "HiiiiiiiiiiiiiiH" }; /* places/start-here.png */ /* XPM */ const char *tango_start_here[] = { /* width height ncolors chars_per_pixel */ "16 16 53 1", /* colors */ " c #6593C6", ". c #5080B8", "X c #3869A7", "o c #3667A5", "O c #2F5F9E", "+ c #4474AF", "@ c #4272AD", "# c #234E8B", "$ c #214C89", "% c #204A88", "& c #507FB7", "* c #3A6AA8", "= c #295694", "- c #3868A6", "; c #5E8CC1", ": c #214B88", "> c #25518F", ", c #2C5B99", "< c #3667A6", "1 c #3465A4", "2 c #4070AC", "3 c #25508E", "4 c #24508D", "5 c #6492C5", "6 c #2A5896", "7 c #4E7DB6", "8 c #3768A6", "9 c #3566A4", "0 c #3162A0", "q c #30609F", "w c #729FCF", "e c #5B8ABF", "r c #4575B0", "t c #244F8C", "y c #214B89", "u c #204B88", "i c #6895C8", "p c #6795C7", "a c #5180B8", "s c #285593", "d c #31619F", "f c #2F5F9D", "g c #5D8BC0", "h c #FFFFFF", "j c #6B98CA", "k c #6996C8", "l c #5483BA", "z c #204A87", "x c #3D6EAA", "c c #2D5C9A", "v c #3566A5", "b c #234F8C", "n c None", /* pixels */ "nnnnnnnnnn%z:nnn", "nno9-nnnnn#d6unn", "nnxkl<nnnuq11bnn", "nopww2nnnu111=zn", "nowww.9nn4111cyn", "n@www;Xnz=1110zn", "1awwwjvnn=111qun", "n&wwwionn3111,yn", "n+wwweXnn$111snn", "n*www7nnnzzzzznn", "n11111nnnnnnnnnn", "nnnnnnnnnzzzzznn", "nv1111nnn:c1f:nn", "n-gw58nnnntO>unn", "nn2 ronnnnzzunnn", "nnvv<nnnnnnnnnnn" }; /* apps/system-software-update.png */ /* XPM */ const char *tango_system_software_update[] = { /* width height ncolors chars_per_pixel */ "16 16 170 2", /* colors */ " c #000000", " . c #56719D", " X c #DCE1E5", " o c #F1F2F3", " O c #8BA7C7", " + c #84A6CA", " @ c #DFEFFF", " # c #93B6DC", " $ c #EDEEEF", " % c #774861", " & c #5A79A4", " * c #5979A3", " = c #5877A2", " - c #BCC4CC", " ; c #E3E4E5", " : c #5685B7", " > c #B1CEEC", " , c #607AA3", " < c #B3C1D0", " 1 c #B5BEC8", " 2 c #5B6D94", " 3 c #5A6B93", " 4 c #CCDDEF", " 5 c #DBDEE0", " 6 c #7591B4", " 7 c #759FCB", " 8 c #BED4EB", " 9 c #F8F9F9", " 0 c #B7C2CD", " q c #BECFE1", " w c #BCCDDF", " e c #506A96", " r c #5978A2", " t c #93ABC7", " y c #B4BCCD", " u c #C6CFD8", " i c #A3B8D0", " p c #843345", " a c #A0B4CD", " s c #516790", " d c #BEC7D0", " f c #CAD5DF", " g c #5988BC", " h c #DFE1E3", " j c #83A7CE", " k c #AFB8CB", " l c #FEFEFE", " z c #D7D9DB", " x c #5C77A1", " c c #DCE4ED", " v c #F6F6F6", " b c #6B7B9F", " n c #628FC1", " m c #E6EBF0", " M c #C0C6CE", " N c #768BAD", " B c #E2E2E2", " V c #80A7D1", " C c #E0E0E0", " Z c #B7C8DC", " A c #B1C2D6", " S c #DCE3E9", " D c #6B96C6", " F c #705472", " G c #9E080B", " H c #7A95B7", " J c #656588", " K c #4E648F", " L c #6F5674", " P c #BABFC4", " I c #A9BCD1", " U c #D9E1E9", " Y c #CED0D1", " T c #6983A6", " R c #C8CFD5", " E c #8593B1", " W c #546E98", " Q c #A40000", " ! c #D9DCDF", " ~ c #9DA6AE", " ^ c #6D90B7", " / c #686284", " ( c #991116", " ) c #D2E5F9", " _ c #ADB9CE", " ` c #D6DFE9", " ' c #A3B6CE", " ] c #DAEAFA", " [ c #CFD9E2", " { c #5A7AA4", " } c #5C8ABD", " | c #A2BDDA", ". c #597199", ".. c #D5DFEB", ".X c #A5B7C9", ".o c #CCD7E2", ".O c #C3D2E3", ".+ c #5686BA", ".@ c #E3F1FF", ".# c #C8CED4", ".$ c #E2EFFE", ".% c #7792B6", ".& c #516994", ".* c #9BB2CC", ".= c #9AB0CB", ".- c #9EADC5", ".; c #C9E1F9", ".: c #F4F4F5", ".> c #CED1D3", "., c #E0EFFF", ".< c #4F80B6", ".1 c #CEDBEA", ".2 c #405583", ".3 c #5D7DA6", ".4 c #5A79A3", ".5 c #94ACC8", ".6 c #7E97B9", ".7 c #6C96C5", ".8 c #BECBDA", ".9 c #C4CAD6", ".0 c #E6EBF4", ".q c #DAEBFC", ".w c #D4E5F6", ".e c #E4E6E8", ".r c #E2E4E6", ".t c #9CBDE0", ".y c #6E5471", ".u c #95A7C2", ".i c #C7CDD2", ".p c #ACCAE9", ".a c #9DB3CD", ".s c #FDFDFD", ".d c #BCD7F2", ".f c #FBFBFB", ".g c #5A769F", ".h c #F9F9F9", ".j c #58749D", ".k c #AABED3", ".l c #F5F5F5", ".z c #E1F0FF", ".x c #EFEFEF", ".c c #BECAD6", ".v c #BCC8D4", ".b c #719BC9", ".n c #B5D1EE", ".m c #B8BFC6", ".M c #364878", ".N c #576F95", ".B c #D5DFE9", ".V c #DEEEFF", ".C c #B8C9DD", ".Z c #101221", ".A c #AEB5BC", ".S c #4B6189", ".D c #D3D3D3", ".F c #D1D1D1", ".G c #7994B6", ".H c #DCDDDF", ".J c #931821", ".K c #B4C7DC", ".L c #9FB4CE", ".P c #A4B5C9", ".I c #9CB2CB", ".U c #CCE3FA", ".Y c #B3CCE8", ".T c #E2F1FF", ".R c #617FA8", ".E c #DEEDFB", ".W c #D5E8FC", ".Q c None", /* pixels */ ".Q.M.M.M.M.M.M.M r =.Q.Q.Q.Q.Q.Q", ".Q.Q.M.M.M b c.0.. A.6 *.Q.Q.Q.Q", ".Q.Q W 3 y [ P.8 8.c U '.4.Q.Q.Q", ".Q. 3.9.>.$.E.w.v M 5 m a {.Q.Q", " K.M k ; f.T.@ ] u z.:.f.B.G.Q.Q", " s 2 ! 4.,.z.z.q.i d.P 1.e i {.Q", ".2 E.k.U.V @ @.1.s l.s.r.H w /.Q", ".M _.p.d.;.W ) R l l l.h.A.O F.Q", " e.- 0.#.Y.n > I 9 o l.x Y.C L.Q", " x.u X l h |.t # + O.l B ~.a p Q", " , H ` l l $ j V 7.7 C.D.X N ( Q", ".Q.R.I S v.m.b D n g.F -.5 % Q.Q", ".Q.Q.3.=.o ^ }.+.< : < t J G.Q.Q", ".Q.Q.Q T.%.L Z q.K.* 6.y G.Q.Q.Q", ".Q.Q.Q.Q.N.g.4 & r.j.J Q Q Q.Q.Q", ".Q.Q.Q.Q.Q.Q.Q.Q Q Q Q Q Q Q Q.Q" }; /* apps/system-users.png */ /* XPM */ const char *tango_system_users[] = { /* width height ncolors chars_per_pixel */ "16 16 147 2", /* colors */ " c #000000", " . c #F3BE71", " X c #ECBD74", " o c #4071AF", " O c #E6AA4D", " + c #868F41", " @ c #4A78B2", " # c #7E6040", " $ c #AF7D2E", " % c #E3A340", " & c #3263A1", " * c #547FB5", " = c #905841", " - c #616519", " ; c #797F37", " : c #B99355", " > c #6C3F3B", " , c #E3A23C", " < c #EBAA5B", " 1 c #4172AF", " 2 c #F6CB8A", " 3 c #E5A255", " 4 c #D1A55F", " 5 c #C0934B", " 6 c #6D4A0A", " 7 c #9F5203", " 8 c #6A692B", " 9 c #8BA6C9", " 0 c #D08F4A", " q c #723C51", " w c #3E558E", " e c #E3A256", " r c #F3C680", " t c #5C3B59", " y c #3466A5", " u c #895443", " i c #C2893C", " p c #6087B9", " a c #5A3464", " s c #C16710", " d c #3568A9", " f c #DDA053", " g c #AF8033", " h c #BC8E43", " j c #ECB868", " k c #C29142", " l c #8B6B58", " z c #8E5105", " x c #5A85B9", " c c #614D7E", " v c #687214", " b c #90563F", " n c #DAAE6D", " m c #D8994A", " M c #5F86B7", " N c #E6A251", " B c #645370", " V c #E0992A", " C c #D6DBE3", " Z c #E5A746", " A c #3467A7", " S c #E09B2D", " D c #BF6C10", " F c #767B35", " G c #829FC5", " H c #32629E", " J c #B78940", " K c #616B09", " L c #F1BD6F", " P c #864F06", " I c #5E83B2", " U c #386DB1", " Y c #3D538B", " T c #C77D28", " R c #485F99", " E c #3364A2", " W c #3264A1", " Q c #E1A23E", " ! c #6F7131", " ~ c #955104", " ^ c #6D712F", " / c #E8AA5C", " ( c #B88530", " ) c #624F0D", " _ c #C16404", " ` c #BA5C11", " ' c #E5AE5C", " ] c #D9AC64", " [ c #DDAB5E", " { c #815107", " } c #AA7722", " | c #A9A3B9", ". c #F9C780", ".. c #A0B6D1", ".X c #C4680A", ".o c #6B8BB4", ".O c #8DA7C8", ".+ c #B68134", ".@ c #C38F44", ".# c #E2B369", ".$ c #596921", ".% c #465440", ".& c #CC5E01", ".* c #C49A52", ".= c #6A6A2B", ".- c #CC5E04", ".; c #B98633", ".: c #5C3566", ".> c #DCA552", "., c #A35403", ".< c #55315F", ".1 c #4576B2", ".2 c #965435", ".3 c #B4C1D3", ".4 c #EFC075", ".5 c #885106", ".6 c #366BAD", ".7 c #BC7625", ".8 c #32629F", ".9 c #30609D", ".0 c #EBBC74", ".q c #5680B5", ".w c #DF8E3A", ".e c #D56402", ".r c #3466A4", ".t c #3364A3", ".y c #CB9A51", ".u c #685D14", ".i c #6E771D", ".p c #3B6EAE", ".a c #815330", ".s c #B0B6CB", ".d c #4F649A", ".f c #C99C66", ".g c #3568A8", ".h c #9E5807", ".j c #B85410", ".k c #E6AD54", ".l c #5981B4", ".z c #844240", ".x c #366AAC", ".c c #D16604", ".v c #A6ACC4", ".b c #CF9D51", ".n c #F0CE99", ".m c #CD5C00", ".M c None", /* pixels */ ".M.M.M.M P ~ z.,.M.M.M.M.M.M.M.M", ".M.M.M.c m 4.b.@ 7.M.M.M.M.M.M.M", ".M.M.h f.* 5.;.7 s.m.&.m.M.M.M.M", ".M.M.5.y h : T.X N 2 . /.m.M.M.M", ".M.M { k ( J D < r.0 O.4.w.m.M.M", ".M.M ) i g }.e. X.n.k , '.m.M.M", ".M.M >.a.+ $ _ L Z.# S Q.>.m.M.M", ".M.% ^ - # 6.u 3 j V % ] 0.j.M.M", ".% F.i + + 8 q = e [ n.f b.z.M.M", ".% F v +.=.: 9 B l.- `.2 u p.:.:", ".% F v v.:.O.x U.s c |.v.g W p.:", ".% F.$ K t p A.6.. C x G y.9.p.:", ".% F ; !.: M.t A d.3.l.r & &.p.:", ".M.%.%.%.: I.t w E.o & H Y.8.p.:", ".M.M.M.M.:.q *.d @ o o o R 1.1.:", ".M.M.M.M.<.:.:.:.:.:.:.:.:.:.: a" }; /* apps/accessories-text-editor.png */ /* XPM */ const char *tango_accessories_text_editor[] = { /* width height ncolors chars_per_pixel */ "16 16 52 1", /* colors */ " c #000000", ". c #B1B1B1", "X c #705B39", "o c #9D9D9D", "O c #C89F64", "+ c #C4A000", "@ c #8F8F8F", "# c #A08457", "$ c #CFAD71", "% c #D2AC6A", "& c #757575", "* c #EBB13D", "= c #717171", "- c #A48757", "; c #636363", ": c #A08356", "> c #EEEEEE", ", c #ECECEC", "< c #EAEAEA", "1 c #EEEAC6", "2 c #EDE6C5", "3 c #DADADA", "4 c #D6D6D6", "5 c #CCCCCC", "6 c #CACACA", "7 c #C2AB8A", "8 c #C4C4C4", "9 c #BCBCBC", "0 c #B8B8B8", "q c #B2B2B2", "w c #AEAEAE", "e c #F9E8C6", "r c #EDE5C4", "t c #4C4226", "y c #A18355", "u c #888A85", "i c #8C8C8C", "p c #868686", "a c #6B5736", "s c #FFFFFF", "d c #EBEBEB", "f c #E9E9E9", "g c #A38555", "h c #CFAA69", "j c #CEA668", "k c #EFEBC7", "l c #DBDBDB", "z c #D3D3D3", "x c #CBCBCB", "c c #8F5902", "v c #B7B7B7", "b c None", /* pixels */ "bbbbbbbbbbbbbbbb", "bbb+b+b+b+b+bbbb", "bb+e+e+e+e+e+bbb", "bu+*+*+*+*+*+ccb", "bud+9+0+0+0+c1$c", "bus,,,,,,,zck%yc", "busl55555vck%-cb", "bus,,,,,zc1h:cbb", "busl555vc2j#cubb", "bus,,,dcrO-c=ubb", "busl5x&X7gc@pubb", "bus,,fctaco4wubb", "buslx8 c;i63qubb", "bus,d<<fd<d,qubb", "bu>qqqqqqq.qqubb", "buuuuuuuuuuuuubb" }; /* mimetypes/text-x-generic.png */ /* XPM */ const char *tango_text_x_generic[] = { /* width height ncolors chars_per_pixel */ "16 16 22 1", /* colors */ " c #000000", ". c #EDEDE5", "X c #999999", "o c #959595", "O c #818181", "+ c #F2F2F2", "@ c #F0F0F0", "# c #EEEEEE", "$ c #ECECEC", "% c #EAEAEA", "& c #EDEDE6", "* c #C8C8C8", "= c #C6C6C6", "- c #C4C4C4", "; c #FFFFFF", ": c #F1F1F1", "> c #EFEFEF", ", c #EDEDED", "< c #EBEBEB", "1 c #C7C7C7", "2 c #C5C5C5", "3 c None", /* pixels */ "XOOOOOOOOOOOO333", "O;;;;;;;;;;;;O33", "O;$%%<<<$$,@;O33", "O;%-22====1@;O33", "O;%<<$$$,,#@;O33", "O;<2======1@;O33", "O;<<$$,,.$#@;O33", "O;<====##&#@;O33", "O;$$,,##>>>@;O33", "O;$===11***@;O33", "O;$,##>>@:::;O33", "O;,=11***::+;O33", "O;,,#>>@@:++;O33", "O;;;;;;;;;;;;O33", "oOOOOOOOOOOOOo33", "3333333333333333" }; /* mimetypes/x-office-calendar.png */ /* XPM */ const char *tango_x_office_calendar[] = { /* width height ncolors chars_per_pixel */ "16 16 61 1", /* colors */ " c #000000", ". c #686A66", "X c #646662", "o c #818485", "O c #CACAC9", "+ c #C3C4C2", "@ c #959798", "# c #C2C4C4", "$ c #9B9C9A", "% c #4D5254", "& c #3B4042", "* c #393E40", "= c #C9C9CA", "- c #B0B1AE", "; c #AAABA8", ": c #EEEEEE", "> c #ECECEC", ", c #E6E6E6", "< c #E4E4E4", "1 c #E2E2E2", "2 c #E0E0E0", "3 c #939591", "4 c #D6D6D6", "5 c #D2D2D2", "6 c #CDCECD", "7 c #C8C8C8", "8 c #FBFBFA", "9 c #E3E3E2", "0 c #636561", "q c #61635F", "w c #B0B2B3", "e c #555753", "r c #898C86", "t c #888A85", "y c #4A5052", "u c #A0A2A3", "i c #7C7E79", "p c #C2C3C1", "a c #404648", "s c #383E40", "d c #B8B9B7", "f c #C8C9CA", "g c #32383A", "h c #2E3436", "j c #4C5153", "k c #414748", "l c #FFFFFF", "z c #FDFDFD", "x c #C5C6C6", "c c #F3F3F3", "v c #F1F1F1", "b c #E9E9E9", "n c #E7E7E7", "m c #E3E3E3", "M c #E1E1E1", "N c #DFDFDF", "B c #D9D9D9", "V c #CECFCE", "C c #CACBCA", "Z c #6E706C", "A c None", /* pixels */ "AAttAAAtAAAtAAAA", "AtttttttttttttAA", "tlt+llt4zzt4zltA", "tlt3,,tt9,tt,ltA", "tl4B,,44<,444ltA", "il,<fo1jawnn,liA", "il:,%hN@7y,,VliA", "il:,NhN#ku,,OliA", ".l,,NhNg=x,6pl.A", ".l,,NhN&*s,6pl.A", "0l,mm2mMMM5cz80A", "Xl,b>:v,VCdc-$XA", "Xlllllllllll;ZXA", "0qqqqqqqqqqqqqXA", "AhteeeeeeeeeehAA", "AhhhhhhhhhhhhhAA" }; /* places/user-trash.png */ /* XPM */ const char *tango_user_trash[] = { /* width height ncolors chars_per_pixel */ "16 16 135 2", /* colors */ " c #000000", " . c #6A6C68", " X c #D6DBC8", " o c #686A66", " O c #CCD29D", " + c #D3D8BB", " @ c #5E605C", " # c #A9B260", " $ c #959E49", " % c #BCC662", " & c #8A915C", " * c #CDD2A1", " = c #AAB264", " - c #5D6329", " ; c #BAC36D", " : c #B1B4AD", " > c #7F865E", " , c #6B6D68", " < c #545B23", " 1 c #D4D9BB", " 2 c #989A94", " 3 c #D2D7B9", " 4 c #61635E", " 5 c #B5BB82", " 6 c #C3CA89", " 7 c #A0A956", " 8 c #CCD19F", " 9 c #C8CEA5", " 0 c #A8AD75", " q c #A1A76E", " w c #BDC765", " e c #909946", " r c #D1D793", " t c #98A247", " y c #666D2D", " u c #B8BE84", " i c #BDC675", " p c #939A59", " a c #494D4C", " s c #81893A", " d c #8C9548", " f c #646663", " g c #4E541F", " h c #B2B881", " j c #B6BBA6", " k c #9FA46B", " l c #A5AE49", " z c #D0D691", " x c #788134", " c c #9AA252", " v c #8C9162", " b c #929C4A", " n c #ACB27E", " m c #545B21", " M c #797B77", " N c #757773", " B c #737571", " V c #737B32", " C c #6D6F6B", " Z c #CAD184", " A c #C7CC8B", " S c #919A4C", " D c #8A9259", " F c #B8C065", " G c #767B77", " H c #D4D9BC", " J c #636561", " K c #D3D9BB", " L c #61682A", " P c #879042", " I c #6F7731", " U c #969F4A", " Y c #BDC763", " T c #BBC561", " R c #9FA956", " E c #7A8235", " W c #B5C051", " Q c #A9B259", " ! c #ADB17E", " ~ c #787A75", " ^ c #798237", " / c #BCC286", " ( c #B8C257", " ) c #CDD590", " _ c #B7BE81", " ` c #70726D", " ' c #575E26", " ] c #535A22", " [ c #686A65", " { c #666863", " } c #62645F", " | c #C4CB9E", ". c #A7AF67", ".. c #A9AD94", ".X c #5C5E59", ".o c #BCC661", ".O c #A8B154", ".+ c #8B9348", ".@ c #CBD09E", ".# c #4C521E", ".$ c #8B943E", ".% c #A5AC72", ".& c #AEB75D", ".* c #ADB75C", ".= c #AAB263", ".- c #565D21", ".; c #A6AF55", ".: c #B2BB64", ".> c #767F33", "., c #CCD28E", ".< c #B2BD50", ".1 c #C3CA99", ".2 c #5B6129", ".3 c #96A04F", ".4 c #888E69", ".5 c #C9D181", ".6 c #BBC469", ".7 c #BBC55F", ".8 c #B9C35D", ".9 c #899245", ".0 c #6C732F", ".q c #BFC687", ".w c #B3BD5A", ".e c #A3AB72", ".r c #B3BE50", ".t c #98A150", ".y c #C7D07E", ".u c #9CA64D", ".i c #727470", ".p c #DBE0D7", ".a c #70726E", ".s c #C9D18D", ".d c #ADB757", ".f c #949D4F", ".g c None", /* pixels */ ".g.g.g.g.g.g.g.g.g.g.g.g.g.g.g.g", ".g.g < < < < < < < < < < < <.g.g", ".g >.p.p.p.p.p.p.p.p.p.p.p.p.4.g", " <.p G.X @ 4 J { o , C `.i :.p <", " <.p a } f [ . C.a B N ~ M 2.p <", " < j.p.p.p.p.p.p.p.p.p.p.p.p.. <", " < < p E x.> V I.0 y L -.2 ' < ]", ".g <.y W W.r l.; = t.$ s ^ D <.g", ".g <.y W W.< F X X.@ 7 $ d & <.g", ".g <.5 W W O ;.: 8 * R c.f k <.g", ".g < Z (.o 1 X.* Q # _.t S.% <.g", ".g < z w Y K i.& 9.= 3.3.+ 0 <.g", ".g < r % T.6 *.1 H +. b.9.e <.g", ".g < ).7.8.w.d.O |.u U e P q <.g", ".g < !.,.s A 6.q / u 5 h n v <.g", ".g.g < < < < < < < < < < < <.g.g" }; /* apps/utilities-system-monitor.png */ /* XPM */ const char *tango_utilities_system_monitor[] = { /* width height ncolors chars_per_pixel */ "16 16 116 2", /* colors */ " c #000000", " . c #8199BA", " X c #DEE0DD", " o c #EDEAB0", " O c #F6F8FB", " + c #F5F8FA", " @ c #316696", " # c #4280AD", " $ c #407EAB", " % c #316A99", " & c #7D7D7A", " * c #2F6697", " = c #F1F6F9", " - c #2C6294", " ; c #3772A2", " : c #BFCFA0", " > c #97B893", " , c #E7E8B0", " < c #E4E5E2", " 1 c #E2E3E0", " 2 c #DFE1DD", " 3 c #BBC774", " 4 c #265987", " 5 c #D7D9D5", " 6 c #D5D7D3", " 7 c #4D8DB7", " 8 c #98C0D9", " 9 c #CCCFCA", " 0 c #EEE788", " q c #4D8FBA", " w c #D7E5EF", " e c #3D79A7", " r c #3D77A7", " t c #4A8DB7", " y c #7792B5", " u c #FEFEFE", " i c #F9FAF9", " p c #B6C496", " a c #829B7A", " s c #90AF8B", " d c #89A584", " f c #85A180", " g c #E9F1F6", " h c #C9CCC6", " j c #5294BE", " k c #346A9A", " l c #D8E6EF", " z c #316697", " x c #4D8EB9", " c c #D6E4ED", " v c #2C6292", " b c #3A74A3", " n c #4584B1", " m c #346E9D", " M c #B4B6B1", " N c #316A9A", " B c #F9F9F8", " V c #EFF4F8", " C c #F4F5F3", " Z c #8CAA86", " A c #89A483", " S c #87A481", " D c #E5E7E4", " F c #829C7C", " G c #2C5D8E", " H c #DCDDDB", " J c #5495BF", " K c #BAD1E1", " L c #4887B3", " P c #7E7E7B", " I c #3D7BA8", " U c #F0F5F8", " Y c #BECE9F", " T c #DBDCD9", " R c #DADCD8", " E c #D3D6D1", " W c #D0D2CE", " Q c #2C6090", " ! c #CBCEC9", " ~ c #4280AC", " ^ c #488AB5", " / c #3772A1", " ( c #FFFFFF", " ) c #34709E", " _ c #4284AF", " ` c #346E9E", " ' c #316C9B", " ] c #FAFBFA", " [ c #96B691", " { c #F8F9F8", " } c #3D7CAA", " | c #94B48F", ". c #F6F7F6", ".. c #93B28E", ".X c #849E7C", ".o c #204A87", ".O c #91B08C", ".+ c #90AE8B", ".@ c #8EAC89", ".# c #8BAA86", ".$ c #D5DBA7", ".% c #D3D9A5", ".& c #85A280", ".* c #D6E3ED", ".= c #3D77A6", ".- c #4587B1", ".; c #4283AE", ".: c #B4B7B1", ".> c #96B590", "., c #F0F5F9", ".< c #EEEEED", ".1 c #8BA785", ".2 c #BACA9C", ".3 c #E9EAE8", ".4 c #B7C699", ".5 c None", /* pixels */ " P P P P P P P P P P P P P P P &", " P B { ( ( ( ( ( ( ( ( u ] ] ] P", " P B y.o.o.o.o.o.o.o.o.o.o y H P", " P u.o 4 G - a F ' N % @ v.o D P", " P u.o Q z.X o.& b b ; ) k.o 1 P", " P u.o * ` p V.4.1 } I.= /.o X P", " P u.o m S.% K c.@ n.; $ e.o T P", " P u.o f d.*.2 w.O 3 s.@.#.o 5 P", " P u.o + O.$.O l Y 0 =., U.o E P", " P u.o A Z.+.. : g 8 |.O.@.o W P", " P u.o r # L x [ , >.> 7 n.o 9 P", " P u.o.= ~.- t | J j q ^ _.o h P", " P B ..o.o.o.o.o.o.o.o.o.o y M P", " P B. i C.<.3 < 2 R 6 W !.:.: P", " P P P P P P P P P P P P P P P &", ".5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5" }; /* apps/utilities-terminal.png */ /* XPM */ const char *tango_utilities_terminal[] = { /* width height ncolors chars_per_pixel */ "16 16 163 2", /* colors */ " c #000000", " . c #A0A19D", " X c #8E9F74", " o c #8C9D72", " O c #9A9B97", " + c #989995", " @ c #DDDEDC", " # c #849074", " $ c #939590", " % c #D7D8D6", " & c #8F918C", " * c #374525", " = c #8D8F8A", " - c #CDCECC", " ; c #81837E", " : c #E0E3DB", " > c #ACBC94", " , c #0A0B09", " < c #090908", " 1 c #657C41", " 2 c #AABA92", " 3 c #192011", " 4 c #070706", " 5 c #4F6332", " 6 c #ECEDEA", " 7 c #A5B68D", " 8 c #B2B4B1", " 9 c #DBDBD9", " 0 c #29331D", " q c #26311A", " w c #91928D", " e c #D7D7D5", " r c #364423", " t c #555952", " y c #46572C", " u c #8B8C87", " i c #7E807A", " p c #7D8079", " a c #6A7559", " s c #0F100D", " d c #C0C1BE", " f c #787C74", " g c #777A73", " h c #747870", " j c #A9B990", " k c #6A6E66", " l c #B0B1AE", " z c #D3D6CD", " x c #B1BF9B", " c c #646860", " v c #5F625B", " b c #29341C", " n c #28341B", " m c #828E70", " M c #92958D", " N c #27321A", " B c #374523", " V c #8C8F87", " C c #46562B", " Z c #888B83", " A c #989996", " S c #DDDEDD", " D c #4E5E36", " F c #D7D8D7", " G c #A8B88E", " H c #A3A69D", " J c #B4B6B1", " K c #AFBE98", " L c #F2F3F1", " P c #747772", " I c #768560", " U c #536537", " Y c #182011", " T c #060706", " R c #3C4C27", " E c #4E6132", " W c #3B4A26", " Q c #4C5A3A", " ! c #273119", " ~ c #020302", " ^ c #808D6D", " / c #343633", " ( c #90A076", " ) c #CFD3CB", " _ c #DDDDDC", " ` c #969893", " ' c #616A55", " ] c #4C563D", " [ c #94A27D", " { c #D6D7D5", " } c #8A8C87", " | c #657152", ". c #647151", ".. c #CCCDCB", ".X c #848681", ".o c #131412", ".O c #A2B387", ".+ c #0D0E0C", ".@ c #0B0C0A", ".# c #080807", ".$ c #070806", ".% c #758954", ".& c #4F6232", ".* c #D9DED4", ".= c #7F8C6B", ".- c #2F312D", ".; c #636660", ".: c #73825F", ".> c #27321B", "., c #5A5E57", ".< c #364523", ".1 c #364323", ".2 c #545851", ".3 c #878983", ".4 c #868782", ".5 c #616E4D", ".6 c #82857E", ".7 c #81837D", ".8 c #7E817A", ".9 c #7D7F79", ".0 c #797D75", ".q c #7A846C", ".w c #767972", ".e c #6F736B", ".r c #A3A69E", ".t c #7E8B69", ".y c #7C8967", ".u c #9DA098", ".i c #798764", ".p c #656961", ".a c #999C94", ".s c #CED1C8", ".d c #99A38A", ".f c #62655E", ".g c #979A92", ".h c #859869", ".j c #29351C", ".k c #3B4A27", ".l c #28331B", ".z c #27311A", ".x c #92A279", ".c c #8D9088", ".v c #878A82", ".b c #97A681", ".n c #83867E", ".m c #95A47F", ".M c #232423", ".N c #737D64", ".B c #B7B9B4", ".V c #A4B58A", ".C c #A2A59C", ".Z c #7B8865", ".A c #697850", ".S c #AEBD97", ".D c #CDD2C6", ".F c #181F11", ".G c #060606", ".H c #849071", ".J c #3C4B27", ".K c #28321A", ".L c #273019", ".P c #010201", ".I c None", /* pixels */ ".I.u.a M.c Z.n.8.0 h.e k.p.f.,.I", " H J e S @ _ _ _ _ _ _ 9.. 8 P t", " H { /.#.#.#.#.#.#.#.# 4 4.- A t", ".C F s x K.S > 2 j G 7.V.O O.2", ".C F.+ #.H m ^.=.t.y.Z.i I `.2", ".C F.@.b.m [.x ( X o.h.% 1 $.2", ".C F , a.*.q |. .5 D C C y w.2", ".C F <.:.d :.D.A U E.&.& 5 =.2", ".C F.$ ] ' ) z *.1 r r.< B }.2", ".C F 4 Q.s.N.k W W W.J.J R .3.2", ".C F 4 0.z.L ! L L L 6.K.K .X.2", ".C F T q N.>.>.l.l n b b.j .7.2", ".C F.G.F.F.F.F.F.F.F Y 3 3 i.2", " H %.M ~.P.P.P.P.P.P.P.P.P.o.w t", ".r.B - d l . + $ & u.4 ;.9 g.; t", ".I.u.g M V.v.6 p f h.e k c v.,.I" }; /* XPM */ const char *tango48_dialog_information[] = { /* width height ncolors chars_per_pixel */ "48 48 678 2", /* colors */ " c #000000", " . c #626674", " X c #8C895B", " o c #BACDE8", " O c #7F8697", " + c #B8CDE6", " @ c #DCE1E5", " # c #D1DFEE", " $ c #9BB9DA", " % c #ACAA77", " & c #D0DDED", " * c #F0F0F2", " = c #B4CBE2", " - c #CFDDEC", " ; c #C9CDCF", " : c #A9A9A9", " > c #B4C9E2", " , c #7DA3CD", " < c #C5C7A0", " 1 c #D8DAAC", " 2 c #A7A472", " 3 c #C6D6ED", " 4 c #ABC2E3", " 5 c #C5D4EC", " 6 c #717168", " 7 c #8EAED7", " 8 c #C3D4EA", " 9 c #BDC4CD", " 0 c #BCBEA1", " q c #F7FAFC", " w c #DCE6F2", " e c #DDE4F3", " r c #A2AEC3", " t c #626677", " y c #505037", " u c #C0D2E7", " i c #616676", " p c #DBE4F1", " a c #BFD2E6", " s c #868997", " d c #89ACD2", " f c #D9E4EF", " g c #88ACD1", " h c #85A7D8", " j c #848795", " k c #63636E", " l c #A4A686", " z c #4A4A31", " x c #DFE0E1", " c c #B4C9E5", " v c #EEF0F3", " b c #EAEDF9", " n c #7EA3D1", " m c #B3C9E4", " M c #4B4B28", " N c #C6CDCF", " B c #CCDBEC", " V c #CBDBEB", " C c #CBD9EB", " Z c #AFC7E0", " A c #CAD9EA", " S c #E4EDF3", " D c #EBEDBB", " F c #AEC5DF", " G c #1A1A0F", " H c #9EB1CC", " J c #E9EBB9", " K c #C4C698", " L c #DBDC9E", " P c #A7C0E2", " I c #E7E9B7", " U c #C2C496", " Y c #686841", " T c #A8A862", " R c #8BACD7", " E c #A0A499", " W c #8D8D8D", " Q c #F4F7C7", " ! c #D7E4F0", " ~ c #9EA497", " ^ c #626570", " / c #D7E2F0", " ( c #E5E7E0", " ) c #D6E2EF", " _ c #F0F4F8", " ` c #9FBCDA", " ' c #9FBADA", " ] c #B6C9EA", " [ c #83A8CF", " { c #4D4D2D", " } c #73767A", " | c #A7ABAD", ". c #799ED9", ".. c #DBDEE0", ".X c #ECEEF4", ".o c #B7BA8B", ".O c #E4EDF6", ".+ c #C8D9EB", ".@ c #84887A", ".# c #57573A", ".$ c #C7D9EA", ".% c #E2EBF4", ".& c #C7D7EA", ".* c #C6D7E9", ".= c #8FB1D4", ".- c #AAC3DE", ".; c #C5D5E8", ".: c #8FAFD4", ".> c #656976", "., c #B9C4CF", ".< c #7098D0", ".1 c #636774", ".2 c #C0C2C2", ".3 c #616572", ".4 c #606371", ".5 c #D5E0F1", ".6 c #9EBADC", ".7 c #777777", ".8 c #D2E0EE", ".9 c #D1DEED", ".0 c #B6CAE3", ".q c #7FA4CE", ".w c #F8FADB", ".e c #B2B7BE", ".r c #727C93", ".t c #C8CDC3", ".y c #CBD6E7", ".u c #B5B782", ".i c #A7BEE8", ".p c #8FAFD7", ".a c #C4D5EA", ".s c #DEE9F3", ".d c #7098D3", ".f c #6D6D6D", ".g c #DDE7F2", ".h c #A7C1DE", ".j c #C2D3E8", ".k c #DDE5F2", ".l c #F7F9FB", ".z c #C1D3E7", ".x c #8BADD3", ".c c #616775", ".v c #3F3F22", ".b c #616575", ".n c #606574", ".m c #9C9C70", ".M c #A3A359", ".N c #4B4B31", ".B c #515123", ".V c #F0F1F4", ".C c #D5D7BF", ".Z c #CEDEED", ".A c #4C4C28", ".S c #CDDCEC", ".D c #CCDAEB", ".F c #ECEDF0", ".G c #B0C8E0", ".H c #CBDAEA", ".J c #7AA2CC", ".K c #95B4D6", ".L c #6B6E78", ".P c #98AED9", ".I c #C6D5EF", ".U c #79A0CB", ".Y c #B2C5D8", ".T c #6F98D5", ".R c #5B5B5B", ".E c #BABFA1", ".W c #ABAC5A", ".Q c #7099CC", ".! c #595959", ".~ c #DAE5F2", ".^ c #86A8DB", "./ c #D9E5F1", ".( c #ABBCDB", ".) c #A3BFDD", "._ c #BDD1E6", ".` c #D8E3F0", ".' c #A2BDDC", ".] c #80A3DF", ".[ c #D7E3EF", ".{ c #A1BDDB", ".} c #F1F5F8", ".| c #606042", "X c #555555", "X. c #D6E1EE", "XX c #91927C", "Xo c #F2F4C4", "XO c #686A61", "X+ c #F1F4C3", "X@ c #535353", "X# c #83A7CE", "X$ c #555580", "X% c #858459", "X& c #7A9FD9", "X* c #CDCE99", "X= c #7D8290", "X- c #D2D5BF", "X; c #EBEEBD", "X: c #84854E", "X> c #C9DAEB", "X, c #C9D8EB", "X< c #929494", "X1 c #C8D8EA", "X2 c #696C79", "X3 c #464625", "X4 c #C7D8E9", "X5 c #E2EAF3", "X6 c #91B2D5", "X7 c #ACC4DF", "X8 c #C0C2A0", "X9 c #C6D6E8", "X0 c #759ECA", "Xq c #474747", "Xw c #636673", "Xe c #626672", "Xr c #96977A", "Xt c #A8A85A", "Xy c #616471", "Xu c #EFF5F9", "Xi c #BEBE8A", "Xp c #9CB9D9", "Xa c #B7CBE3", "Xs c #D4D68F", "Xd c #81A5CF", "Xf c #9BB9D8", "Xg c #80A5CE", "Xh c #F0F0F0", "Xj c #555744", "Xk c #BFC3AC", "Xl c #A4AFA2", "Xz c #AFC6E5", "Xx c #96AEDD", "Xc c #686C7B", "Xv c #676C7A", "Xb c #A6AC9A", "Xn c #DCDFCF", "Xm c #C4D6E9", "XM c #D9DBA1", "XN c #DDE8F1", "XB c #636876", "XV c #C1D4E6", "XC c #8BAED2", "XZ c #C1D2E6", "XA c #626675", "XS c #9FB8E9", "XD c #DBE4EF", "XF c #A1A495", "XG c #52512D", "XH c #313131", "XJ c #75744C", "XK c #6C7282", "XL c #EBF1F8", "XP c #CFDFED", "XI c #DADFE4", "XU c #CFDDED", "XY c #CEDDEC", "XT c #98B7D8", "XR c #B3C9E2", "XE c #97B7D7", "XW c #CDDBEB", "XQ c #96B5D6", "X! c #494924", "X~ c #749CCF", "X^ c #81837C", "X/ c #BCC6CD", "X( c #626878", "X) c #DBE6F2", "X_ c #C6CBB9", "X` c #BFD2E7", "X' c #DFE5EC", "X] c #A4BEDD", "X[ c #BED2E6", "X{ c #A3BEDC", "X} c #D8E4EF", "X| c #51512F", "o c #B9CBEB", "o. c #828594", "oX c #F1F3C2", "oo c #EAEDFA", "oO c #DDDFAB", "o+ c #E6EDF6", "o@ c #5D5E34", "o# c #CBD9EC", "o$ c #CAD9EB", "o% c #EBEDBC", "o& c #AEC7E0", "o* c #B6B688", "o= c #C9D9EA", "o- c #8DABE4", "o; c #AEC5E0", "o: c #C8D9E9", "o> c #E6EAEC", "o, c #E5E8EB", "o< c #C0C3CA", "o1 c #646773", "o2 c #9EB9E4", "o3 c #626571", "o4 c #BFC4BF", "o5 c #C0C0C0", "o6 c #60656F", "o7 c #D5E2EF", "o8 c #9FBCDB", "o9 c #D4E0EE", "o0 c #C9CFD6", "oq c #C5CCDC", "ow c #9EBADA", "oe c #D7DFE7", "or c #9BB8D7", "ot c #848785", "oy c #AEBCC2", "ou c #7E8289", "oi c #BAB985", "op c #95ADDB", "oa c #E3E9F6", "os c #E2E9F5", "od c #C6D7EA", "of c #303018", "og c #B2BAB2", "oh c #E0E9F3", "oj c #6C7995", "ok c #AAC3DF", "ol c #DFE9F2", "oz c #879AC0", "ox c #7D817E", "oc c #C4D5E8", "ov c #DEE9F1", "ob c #AAB0BE", "on c #C3D5E7", "om c #DEE7F1", "oM c #85A7DF", "oN c #626774", "oB c #B0B0B0", "oV c #616573", "oC c #616373", "oZ c #D5E0F2", "oA c #EDEECE", "oS c #9AB5E3", "oD c #D1E0EE", "oF c #72747D", "oG c #B6CCE4", "oH c #D1DEEE", "oJ c #D0DEED", "oK c #CFDEEC", "oL c #B3B595", "oP c #CFDCEC", "oI c #8F94A0", "oU c #B3CAE1", "oY c #B4B461", "oT c #98B6D7", "oR c #B2CAE0", "oE c #B3C8E1", "oW c #D8DCE1", "oQ c #57573E", "o! c #A1A276", "o~ c #DEE9F4", "o^ c #D5D7A9", "o/ c #F3F4D7", "o( c #DCE7F2", "o) c #8999BB", "o_ c #626777", "o` c #BFD1E6", "o' c #89ABD2", "o] c #51522E", "o[ c #64646F", "o{ c #A2BDDA", "o} c #DCE4E8", "o| c #9C9C9C", "O c #9FB6E1", "O. c #ECEEFB", "OX c #808491", "Oo c #C4C7AC", "OO c #EEF1F3", "O+ c #4C4C29", "O@ c #A0B3D8", "O# c #D8DCE4", "O$ c #C3C9D6", "O% c #C9CB9D", "O& c #CCDCEC", "O* c #686D80", "O= c #CCDAEC", "O- c #CBDAEB", "O; c #9B9E87", "O: c #CADAEA", "O> c #E5ECF4", "O, c #94B4D6", "O< c #AFC6E0", "O1 c #919266", "O2 c #94B2D6", "O3 c #E4EAF3", "O4 c #5B5B31", "O5 c #78A0CB", "O6 c #59592F", "O7 c #E3E6F2", "O8 c #E6E8B6", "O9 c #C8CBB3", "O0 c #F2F5FA", "Oq c #61666F", "Ow c #F1F5F9", "Oe c #D6E1EF", "Or c #9CB8E1", "Ot c #D5E1EE", "Oy c #9FBBDA", "Ou c #CCD1CE", "Oi c #E9EEFB", "Op c #CDCE9A", "Oa c #BDBC87", "Os c #E8ECFA", "Od c #878B7D", "Of c #769DD6", "Og c #CACA97", "Oh c #C9D8EC", "Oj c #C8D8EB", "Ok c #C7D8EA", "Ol c #949162", "Oz c #C8C895", "Ox c #E1EAF3", "Oc c #595932", "Ov c #C6D6E9", "Ob c #E0EAF2", "On c #9B9B80", "Om c #BBC3D1", "OM c #8FB0D4", "ON c #666677", "OB c #424222", "OV c #646875", "OC c #8DAED2", "OZ c #919480", "OA c #616472", "OS c #D3E1EF", "OD c #646436", "OF c #D4DDF0", "OG c #D2DFEE", "OH c #EDF1F8", "OJ c #D1DFED", "OK c #99976A", "OL c #B6CBE3", "OP c #D0DDEC", "OI c #9AB7D8", "OU c #CFDDEB", "OY c #7BA0D4", "OT c #A8B09D", "OR c #759BD8", "OE c #8890A2", "OW c #C6C9CB", "OQ c #8EADE0", "O! c #98ADD6", "O~ c #9FA4A8", "O^ c #7D8AAB", "O/ c #F4F5D7", "O( c #DEE8F3", "O) c #ABBEE2", "O_ c #DDE8F2", "O` c #7E8BA2", "O' c #F2F3D5", "O] c #636877", "O[ c #C1D4E7", "O{ c #626876", "O} c #F6FAFA", "O| c #C1D2E7", "+ c #626676", "+. c #DBE6F0", "+X c #9FB8EA", "+o c #8AAED2", "+O c #626276", "++ c #686868", "+@ c #8B895C", "+# c #3C3C1F", "+$ c #828592", "+% c #888559", "+& c #B1B9CA", "+* c #EAF1F8", "+= c #4D4D29", "+- c #CEDDED", "+; c #606035", "+: c #B9C8DF", "+> c #CDDBEC", "+, c #CCDBEB", "+< c #CBDBEA", "+1 c #666C7D", "+2 c #94B3D5", "+3 c #6B6A43", "+4 c #E8EAEC", "+5 c #E2E9F0", "+6 c #626879", "+7 c #93A9D4", "+8 c #DAE6F2", "+9 c #535332", "+0 c #8C8B60", "+q c #585858", "+w c #5D6874", "+e c #292916", "+r c #D8E4F0", "+t c #F4F7C6", "+y c #BDD0E6", "+u c #9B9972", "+i c #65643D", "+p c #3C3C22", "+a c #BCD0E5", "+s c #565656", "+d c #636370", "+f c #61656E", "+g c #D6E2EE", "+h c #85A8D0", "+j c #BACEE3", "+k c #80A5D5", "+l c #E8EDF9", "+z c #B8BA8B", "+x c #505050", "+c c #CDD9EF", "+v c #6C6F7C", "+b c #8CA2C3", "+n c #E7EBF8", "+m c #B4B9BC", "+M c #CAD9EC", "+N c #FFFFFF", "+B c #AFC5E2", "+V c #C9D9EB", "+C c #C8D9EA", "+Z c #B1B38E", "+A c #939460", "+S c #E2EBF3", "+D c #92B1D6", "+F c #ACC5DF", "+G c #C7D7E9", "+H c #E2E9F3", "+J c #B8C3D7", "+K c #D6D8DA", "+L c #90B1D4", "+P c #80804A", "+I c #CFD5DD", "+U c #56562E", "+Y c #464646", "+T c #7A7D79", "+R c #636373", "+E c #616571", "+W c #606370", "+Q c #B9CEE5", "+! c #D4E0EF", "+~ c #DEE2E5", "+^ c #83A8D1", "+/ c #9EBADB", "+( c #D3E0EE", "+) c #EEF2F8", "+_ c #798499", "+` c #9DBADA", "+' c #D2E0ED", "+] c #96B2E7", "+[ c #B6CCE2", "+{ c #71747A", "+} c #909074", "+| c #80A4CE", "@ c #7CA1D4", "@. c #E6EBFA", "@X c #B4B45F", "@o c #474729", "@O c #99B2D6", "@+ c #ACC3E2", "@@ c #E0E9F4", "@# c #E5EAEF", "@$ c #D6D9A8", "@% c #C4D5E9", "@& c #A1A074", "@* c #F9FBFC", "@= c #C3D5E8", "@- c #646977", "@; c #DDE7F1", "@: c #A7C1DD", "@> c #C2D3E7", "@, c #636776", "@< c #719BC9", "@1 c #8CADD3", "@2 c #626775", "@3 c #8D9AB3", "@4 c #C1CFE6", "@5 c #A1BAE1", "@6 c #F4F5F7", "@7 c #64646D", "@8 c #EDEECF", "@9 c #9A9A6D", "@0 c #B8CCE7", "@q c #F2F3F5", "@w c #D1DEEF", "@e c #4E4E29", "@r c #C7CBD8", "@t c #D0DEEE", "@y c #CFDEED", "@u c #ACAFA3", "@i c #99B6D9", "@p c #6A6F80", "@a c #CEDCEC", "@s c #EAECF7", "@d c #CDDCEB", "@f c #2C2C2C", "@g c #759CDA", "@h c #7CA2CD", "@j c #BCC6D7", "@k c #B3B6B7", "@l c #8199C8", "@z c #BCC5CD", "@x c #DEE5F5", "@c c #C2C4C9", "@v c #626778", "@b c #DBE7F2", "@n c #616777", "@m c #DBE5F2", "@M c #DAE5F1", "@N c #AABED9", "@B c #F5F8C6", "@V c #BED1E6", "@C c #D9E3F0", "@Z c #646470", "@A c #BDCFE5", "@S c #B0C0CB", "@D c #BBCFE3", "@F c #F1F4C2", "@G c #DFE1E2", "@H c #D0DCF1", "@J c #EFF1F5", "@K c #E8F2F8", "@L c #EFF2C0", "@P c #1C1C1C", "@I c #DDDFE0", "@U c #DEE0AC", "@Y c #E8EEF8", "@T c #D6D8B8", "@R c #CCDCED", "@E c #1A1A1A", "@W c #92A2BE", "@Q c #B2C4E4", "@! c #E6ECF6", "@~ c #B0C6E2", "@^ c #CADAEB", "@/ c #CFDBE6", "@( c #CAD8EB", "@) c #AEC6E0", "@_ c #C8D8E9", "@` c #DCE5F6", "@' c #6F778B", "@] c #F2F7FB", "@[ c #F3F6C7", "@{ c #D6E3F0", "@} c #626471", "@| c #B2BCD0", "# c #D6E1F0", "#. c #626271", "#X c #E0E3E6", "#o c #D5E1EF", "#O c #6B7387", "#+ c #D4E1EE", "#@ c #98B3E8", "## c #EFF3F8", "#$ c #515128", "#% c #9EBBDA", "#& c #B9CDE4", "#* c #9B996A", "#= c #B8CDE3", "#- c #D3DFED", "#; c #CED09C", "#: c #CCCFCF", "#> c #6B707D", "#, c #ADC3EC", "#< c #B9B9B9", "#1 c #CAD8EE", "#2 c #686C7A", "#3 c #E2EAF5", "#4 c #ACC4E1", "#5 c #AFB28E", "#6 c #C6D6EA", "#7 c #C5D6E9", "#8 c #B1C1DC", "#9 c #C4D6E8", "#0 c #DFE8F2", "#q c #A9C2DE", "#w c #8DAED3", "#e c #C2D4E6", "#r c #DDE6F0", "#t c None", /* pixels */ "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.b+6o_oVoVo_+6.c#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@n#Oo)O@O) ]o @Q.(@W@'@n#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@2O*O!#,oS.^@ X~X~ n R P.I#8XK@2#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXAO^.iOQ.d+k.p+/o;oG+F.'@1X0.6+c@3XA#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t+1+7XS. h c.*.&X1Ok.&+GOv.;o`.: [ 5+:@p#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t iopo-X& 4#6X4.$X1o=+CX1X1+GX9oc@AXdO5@+@4+ #t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t+ @l#@OR oodOk.&o=o= A@^o$@^o=Ok#7@=X7 ,.U 3 H+ #t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#toj+X@gXz.a.*+GX1 C@^ B B B VO:o=@_X9.z+h.q+h@`+_#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t .Xx.]Or 8Xm#7X4+VO-O=XW@a.S@d+>.D A.&#7XQ+^+|owOF.1#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t.r+].T@0O[@%X4+C@^+,oPoK &.9XU+-@aO&X,Ok.{ d+h+|@HOE#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#tX(ozoMOYX`.j#9.*X>XWXY &oJoD.8OJ.9OP -.So: $OMXC+h@~+JO{#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t@v.POf 7@VO[#7X1.H@a@yOJ#-o9#+OtOtOGoJXU.*XTO,.=+o+D e@,#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#tXAO .<+Lo`@>#6+VO-@y ##-#o )@{ / /# .8 # u 'orO,OMo'OsoN#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t.1o2.QX# a@=.* A.S@t+(#o /@C@M./ fX}X.OU@).)OyOIO2OC@..>#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#toV@5@<O5+aonOv@^@a+'+!.`@M w@bo(@;@M+r@Do&.-.)#%oTX6OiXw#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t t@O@h.Jow@=.&O- &+(Oe./X)XN.sol.gO_O:#&oU Z#qX{XpX]@x@2#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#tX(+b.x ,+hXaX4 B.9+(.[+.O(Obos+H.~X,O[X[+joUo;@:o8 +.yO]#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#tO`@iXg gO,.Goc.l _Ox#r#0O(+8+'#t#toW x._#=oRX7.)#1+&Xe#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#tXc@No'XC+2XfX{##.}@*@6@#X'o}O# @+4 *o>@=+y+[O<ok@.o.#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t O+B#w.K+`.hoH+)XZXD vOO.VXh.F+~@qO>#tXV+QXRoZO$XB#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t@2 r#4XE `#q.0Xu+<#t#t#t#t#t#t#t q#t#tXmX[Oh+n#>#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#tXv@| mo{X7 =oh p#t#t#t#t#t#tOwO0#t#t#t@wooOX#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#2@joE FOLXP+5#t#t#t#t#t#t@J#t#t#t#tO.+$#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX=o#o;+[#e+I#t#t#t#t#t#t+K#t#t#toa@r#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t@-oq >#&O[@z 9#t#t#t#t#t#t#t#t#t+l j#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tobO|#&XV.,O~#t#t#t#tX<#t#t#t#t b+v#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t s.5.Y@SoyoxXboL#5On 6#t#t#t#3O7o1#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tOVOmX/XlOT.@OZ.EX8Xr+}+Z l E@soI#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX2o0 Nog ~OdXkOoO; 0@T.C@Go<OV#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXj.L.eXIOu.tX_O9X-Xn (.X |+f#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tOD T+Tou+m ;..o,@I#:@koFXO {#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t+U.MXs <XFot+{o1 }X^XX+u X+=#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.AX:XMO'XoX+o% IoOOpOaOK+3O+#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t+;@XoA+N.w@B@F J@UOz.m+0+i.A#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tO6Xt LO/@[+tX;o^ Uo*oi 2+@+=#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t M+PXMo/X+X+ DO8oOX*Oa#*XJO+#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#to@oY@8+N.w@BoX J@UOg@&@9Olo]#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tO4.W LO/ Q@B@L 1 K+zXi %+%XG#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX3Oc+A.u#;@$O%.oo!O1X% Y@e#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.v.NoQ.|+9X|.# y z+##t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t.R#<o5oB W+s#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tX@.7 :o|+++x#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#tXq.!+q+Y#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t", "#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t#t" }; /* XPM */ const char *tango48_dialog_warning[] = { /* width height ncolors chars_per_pixel */ "48 48 307 2", /* colors */ " c #000000", " . c #BB1D1D", " X c #E6CECE", " o c #D94141", " O c #D01414", " + c #CF2A2A", " @ c #DBACAC", " # c #DF6161", " $ c #CD0707", " % c #A5A5A5", " & c #110000", " * c #DA4545", " = c #DCD1D1", " - c #D55757", " ; c #D46D6D", " : c #A30505", " > c #999999", " , c #E06565", " < c #D73838", " 1 c #979797", " 2 c #DBC6C6", " 3 c #9F0101", " 4 c #D21C1C", " 5 c #DFD7D7", " 6 c #CA3535", " 7 c #940000", " 8 c #DA5F5F", " 9 c #D85D5D", " 0 c #8D8D8D", " q c #800000", " w c #B31B1B", " e c #D02727", " r c #D83C3C", " t c #CF0F0F", " y c #C02B2B", " u c #C84040", " i c #D43838", " p c #A50000", " a c #7F7F7F", " s c #910000", " d c #DE5C5C", " f c #D52F2F", " g c #CC0202", " h c #7D7D7D", " j c #D94040", " k c #D01313", " l c #DCB6B6", " z c #ECE0E0", " x c #CE1111", " c c #777777", " v c #690000", " b c #DFDDDD", " n c #A20000", " m c #DF6060", " M c #D63333", " N c #CD0606", " B c #B72525", " V c #B52323", " C c #D02D2D", " Z c #E16F6F", " A c #D75858", " S c #676767", " D c #BE2F2F", " F c #636363", " G c #E4C4C4", " H c #E06464", " J c #D73737", " K c #CE0A0A", " L c #A10202", " P c #D53535", " I c #9F0000", " U c #C53939", " Y c #AC1010", " T c #D13131", " R c #5B5B5B", " E c #A80C0C", " W c #E1B7B7", " Q c #C42E2E", " ! c #DB5555", " ~ c #A40808", " ^ c #CF0E0E", " / c #4F4F4F", " ( c #BC2626", " ) c #DB6262", " _ c #9C0000", " ` c #4B4B4B", " ' c #DE5B5B", " ] c #D52E2E", " [ c #CC0101", " { c #D78C8C", " } c #474747", " | c #B21C1C", ". c #434343", ".. c #D85555", ".X c #E06A6A", ".o c #D88383", ".O c #DF8080", ".+ c #E1DEDE", ".@ c #F0F0F0", ".# c #D56969", ".$ c #D45151", ".% c #DB4E4E", ".& c #AC1616", ".* c #EEEEEE", ".= c #D13737", ".- c #ECECEC", ".; c #990000", ".: c #CE1D1D", ".> c #DF5F5F", "., c #D63232", ".< c #CD0505", ".1 c #DAC0C0", ".2 c #EAEAEA", ".3 c #E8E8E8", ".4 c #AB0B0B", ".5 c #DED1D1", ".6 c #850000", ".7 c #E6E6E6", ".8 c #E16E6E", ".9 c #E4E4E4", ".0 c #E2E2E2", ".q c #D9B5B5", ".w c #E0E0E0", ".e c #BC2C2C", ".r c #AA0000", ".t c #DEDEDE", ".y c #D03939", ".u c #D84E4E", ".i c #CE0909", ".p c #A10101", ".a c #B01313", ".s c #DCDCDC", ".d c #EEE7E7", ".f c #D01818", ".g c #CE1616", ".h c #A80B0B", ".j c #DD5656", ".k c #D83A3A", ".l c #CD0B0B", ".z c #A00303", ".x c #E9D8D8", ".c c #DD6363", ".v c #D34C4C", ".b c #171717", ".n c #C12020", ".m c #0D0000", ".M c #C6C6C6", ".N c #D52D2D", ".B c #CC0000", ".V c #D24141", ".C c #DA5656", ".Z c #E06969", ".A c #D65252", ".S c #E1DDDD", ".D c #DB4D4D", ".F c #D22020", ".G c #D24E4E", ".H c #AA1313", ".J c #DF5E5E", ".K c #CD0404", ".L c #CE4A4A", ".P c #010101", ".I c #DC7272", ".U c #B31F1F", ".Y c #DC5151", ".T c #D32424", ".R c #AD1919", ".E c #DFC7C7", ".W c #D23A3A", ".Q c #BA2929", ".! c #D15050", ".~ c #E06262", ".^ c #D73535", "./ c #A10000", ".( c #CE1515", ".) c #DD5555", "._ c #D42828", ".` c #FF0000", ".' c #D45656", ".] c #989898", ".[ c #CD0A0A", ".{ c #A00202", ".} c #CD3838", ".| c #9E0000", "X c #D46363", "X. c #DB6060", "XX c #DA4848", "Xo c #D11B1B", "XO c #DDBEBE", "X+ c #D14949", "X@ c #A90E0E", "X# c #C73232", "X$ c #DE5959", "X% c #A70C0C", "X& c #8C8C8C", "X* c #DD9D9D", "X= c #DBC9C9", "X- c #DB4C4C", "X; c #D21F1F", "X: c #AA1212", "X> c #DA9090", "X, c #808080", "X< c #D04B4B", "X1 c #DF5D5D", "X2 c #D63030", "X3 c #CD0303", "X4 c #E16C6C", "X5 c #DF6A6A", "X6 c #CD1010", "X7 c #E2E0E0", "X8 c #DC5050", "X9 c #747474", "X0 c #D35151", "Xq c #BA2828", "Xw c #D96464", "Xe c #CC0505", "Xr c #6E6E6E", "Xt c #D33030", "Xy c #D35E5E", "Xu c #D94343", "Xi c #686868", "Xp c #D65757", "Xa c #DD5454", "Xs c #D42727", "Xd c #A60707", "Xf c #D33D3D", "Xg c #DB5252", "Xh c #A40505", "Xj c #B31717", "Xk c #A20303", "Xl c #A00101", "Xz c #D11A1A", "Xx c #5A5A5A", "Xc c #DE5858", "Xv c #D52B2B", "Xb c #CF2525", "Xn c #AE1515", "Xm c #DFABAB", "XM c #D44E4E", "XN c #DC6363", "XB c #FFFFFF", "XV c #DB4B4B", "XC c #D21E1E", "XZ c #CF3232", "XA c #B72121", "XS c #DABDBD", "XD c #BE1E1E", "XF c #D83E3E", "XG c #DCCCCC", "XH c #424242", "XJ c #D75454", "XK c #DF6969", "XL c #CD0F0F", "XP c #D78282", "XI c #D43A3A", "XU c #DC4F4F", "XY c #EFEFEF", "XT c #A30000", "XR c #EDEDED", "XE c #EBEBEB", "XW c #D53131", "XQ c #E9E9E9", "X! c #8F0000", "X~ c #090000", "X^ c #D67777", "X/ c #B42121", "X( c #E7E7E7", "X) c #D94242", "X_ c #D01515", "X` c #E5E5E5", "X' c #B71A1A", "X] c #E3E3E3", "X[ c #DD5353", "X{ c #E1E1E1", "X} c #DFDFDF", "X| c #A20202", "o c #DDDDDD", "o. c #A00000", "oX c #D54B4B", "oo c #C31F1F", "oO c #DA4646", "o+ c #D11919", "o@ c #D95C5C", "o# c #C03333", "o$ c #DAA2A2", "o% c #D3D3D3", "o& c #A50808", "o* c #E06666", "o= c #D99797", "o- c #181818", "o; c #9D0000", "o: c #DB4A4A", "o> c #C7C7C7", "o, c #DDD6D6", "o< c #CC4545", "o1 c #D25858", "o2 c #E16A6A", "o3 c #D83D3D", "o4 c #C02C2C", "o5 c #DD6666", "o6 c #D32121", "o7 c #AD1616", "o8 c #DEDADA", "o9 c #CF1D1D", "o0 c #CC0303", "oq c #D67676", "ow c None", /* pixels */ "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowow./././ nowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowow nX/ 8XNXq nowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowX% Z._X;X4X@owowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowXT.L o.B.B <X+./owowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowow.H.8 N.B.B.K HXnowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowow n.!.^.B.B.B.B.NXM./owowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowow.Ro2X3.BXZ.y.B [X1 wowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowow n - ].B g.q.1Xe.B.T.A./owowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowow.U , [.B.G.so Xy.B.BXaXAowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowo. 9Xs.Bo0XSo o X=.[.BXo...powowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowow B.>.B.Bo1o o o .t.#.B.Bo: (o.owowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowow.p ).F.B $ 2o o .t.t.5XL.B O.CX|owowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowow.eXc.B.BX o o .t.tX}X}oq.B.B j y./owowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowXko5Xz.B.lXGo .t.tX}X}X} 5.(.B ^ !Xhowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowo.o#.Y.B.B ;o .t.tX}X}X}.w.w.o.B.B < Q./owowowowowowowowowowowowowow", "owowowowowowowowowowowowowow :XK O.BX6 =.t.t 1 h h.].wX{.So9.B.iXgo&owowowowowowowowowowowowowow", "owowowowowowowowowowowowow./ Uo:.B.BX^.t.tX}XH . X{X{.0X>.B.B fX#./owowowowowowowowowowowowow", "owowowowowowowowowowowowow ~X5 t.B.go,.tX}X} / /X{.0.0X7 e.B N.%.howowowowowowowowowowowowow", "owowowowowowowowowowowow n uXu.B.BXP.tX}X}.wXx R.0.0.0X]X*.B.BXs 6./owowowowowowowowowowowow", "owowowowowowowowowowowow E.X K.B.:o8X}X}.w.w S Xi.0.0X].9.9 T.BX3XX Yowowowowowowowowowowowow", "owowowowowowowowowowow no< r.B.B {X}X}.w.w.wX9 X9X]X].9.9X`Xm.B.B.F.}./owowowowowowowowowowow", "owowowowowowowowowowowX:.Z $.BXb bX}.w.w.wX{ a X,X].9.9X`X`.7Xf.B [X).aowowowowowowowowowowow", "owowowowowowowowowow./X<.^.B.Bo=X}.w.w.wX{X{X& 0.9.9X`X`.7.7 W.B.Bo+.y./owowowowowowowowowow", "owowowowowowowowowow.&o*.K.B CX}.w.w.wX{X{.0.] >.9X`X`.7.7X(X(oX.B.B.kXjowowowowowowowowowow", "owowowowowowowowow./X0 ].B.Bo$.w.w.wX{X{.0.0 % %X`X`.7.7X(X(.3 Go0.B k.W.powowowowowowowowow", "owowowowowowowowow | # g.B.=.w.w.wX{X{.0.0X].M F Fo>X`.7.7X(X(.3XQXQ A.B.B MX'o.owowowowowowowow", "owowowowowowowow./XpXs.B.B @.w.wX{X{.0.0X]X].9.Mo>X`.7.7X(X(.3XQXQ.2 X N.B ^XI Lowowowowowowowow", "owowowowowowowow V d [.B.V.w.wX{X{.0.0X]X].9Xr .PX9.7X(.3.3XQXQ.2.2XEXw.B.BXv ../owowowowowowow", "owowowowowowow.po@o6.B [ l.wX{X{.0.0X]X].9.9.b o-X(.3.3XQXQ.2.2XEXE.x.[.B.i iXkowowowowowowow", "owowowowowowow.Q.).B.B.v.wX{X{.0.0X]X].9.9X` ` }.3.3XQXQ.2.2XEXE.-.-.I.B.B.TXD nowowowowowow", "owowowowowowX|X.Xo.Bo0XOX{X{.0.0X]X].9.9X`X`o% c co%.3XQXQ.2.2XEXE.-.-XR z x.B N P :owowowowowow", "owowowowow./ DXU.B.B.'X{X{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*.O.B.BXC.n./owowowowow", "owowowowowXk.cX_.B N.EX{.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XY.d.f.BX3XWXdowowowowow", "owowowow 7o4X-.B.B C.+.0.0X]X].9.9X`X`.7X(X(.3.3XQXQ.2.2XEXE.-XRXR.*.*XYXY.@.u.B.BXzooo.owowowow", "owowowow.| A 4.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.KXto.owowowow", "owowowow _.$ f.<.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B g t +o.owowowow", "owowowow qo7XJ.~ , # m.JX1 'X$Xc.j.)X[.YX8XU.DXVo:XXoO *XuX) jXFo3 r.k < J.^ M.,X2 +.4 sowowowow", "owowowowow.6o; I 3.z.z.z.z.z.z.z.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{.{XlXlXl 3 I IX!owowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow", "owowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowowow" }; // --------------------------------------------------------------------- // end of Tango icons // --------------------------------------------------------------------- �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Native_File_Chooser.cxx�������������������������������������������������0000664�0001750�0001750�00000003017�12330516146�017100� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser.cxx -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 // Use Windows' chooser # if defined(__WIN32__) || defined(__CYGWIN__) # include "Fl_Native_File_Chooser_WIN32.cxx" # endif // Use Apple's chooser # ifdef __APPLE__ # include "Fl_Native_File_Chooser_MAC.cxx" # endif // All else falls back to FLTK's own chooser # if ! defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) # include "Fl_Native_File_Chooser_FLTK.cxx" # endif #else # ifdef __WIN32__ # include "Fl_Native_File_Chooser_WIN32.cxx" # endif #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/flslider2.cxx��������������������������������������������������������������0000664�0001750�0001750�00000004720�12330516146�014500� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // flslider2.cxx // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <FL/Fl.H> #include "util.h" #include "flslider2.h" inline static int handle_scroll(Fl_Valuator* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; if (!dynamic_cast<Fl_Value_Input*>(w) && !dynamic_cast<Fl_Counter*>(w) && !(w->type() & FL_HOR_SLIDER)) d = -d; w->value(w->clamp(w->increment(w->value(), static_cast<int>(-d)))); w->do_callback(); } return 1; } int Fl_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Slider::handle(event); } int Fl_Value_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Slider::handle(event); } int Fl_Counter2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Counter::handle(event); } int Fl_Value_Input2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Input::handle(event); } inline static int handle_scroll(Fl_Spinner* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; d = w->value() - d * w->step(); w->value(WCLAMP(d, w->minimum(), w->maximum())); w->do_callback(); } return 1; } int Fl_Spinner2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Spinner::handle(event); } ������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Display_mod_1_3.cxx������������������������������������������������0000664�0001750�0001750�00000376435�12330516146�017164� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Display_mod.cxx 8808 2011-06-16 13:31:25Z manolo $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <FL/fl_utf8.h> #include "missing_strings.h" #include <limits.h> #include <ctype.h> #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Printer.H> #include "Fl_Text_Buffer_mod.H" #include "Fl_Text_Display_mod.H" #undef min #undef max // Text area margins. Left & right margins should be at least 3 so that // there is some room for the overhanging parts of the cursor! const int Fl_Text_Display_mod::DEFAULT_TOP_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_BOTTOM_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_LEFT_MARGIN = 3; const int Fl_Text_Display_mod::DEFAULT_RIGHT_MARGIN = 3; //#define TOP_MARGIN 1 //#define BOTTOM_MARGIN 1 //#define LEFT_MARGIN 3 //#define RIGHT_MARGIN 3 #define NO_HINT -1 /* Masks for text drawing methods. These are or'd together to form an integer which describes what drawing calls to use to draw a string */ #define FILL_MASK 0x0100 #define SECONDARY_MASK 0x0200 #define PRIMARY_MASK 0x0400 #define HIGHLIGHT_MASK 0x0800 #define BG_ONLY_MASK 0x1000 #define TEXT_ONLY_MASK 0x2000 #define STYLE_LOOKUP_MASK 0xff /* Maximum displayable line length (how many characters will fit across the widest window). This amount of memory is temporarily allocated from the stack in the draw_vline() method for drawing strings */ #define MAX_DISP_LINE_LEN 1000 static int max( int i1, int i2 ); static int min( int i1, int i2 ); static int countlines( const char *string ); /* The variables below are used in a timer event to allow smooth scrolling of the text area when the pointer has left the area. */ static int scroll_direction = 0; static int scroll_amount = 0; static int scroll_y = 0; static int scroll_x = 0; // CET - FIXME #define TMPFONTWIDTH 6 /** \brief Creates a new text display widget. \param X, Y, W, H position and size of widget \param l label text, defaults to none */ Fl_Text_Display_mod::Fl_Text_Display_mod(int X, int Y, int W, int H, const char* l) : Fl_Group(X, Y, W, H, l) { int i; TOP_MARGIN = DEFAULT_TOP_MARGIN; BOTTOM_MARGIN = DEFAULT_BOTTOM_MARGIN; LEFT_MARGIN = DEFAULT_LEFT_MARGIN; RIGHT_MARGIN = DEFAULT_RIGHT_MARGIN; mMaxsize = 0; damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; dragPos = dragging = 0; dragType = DRAG_CHAR; display_insert_position_hint = 0; shortcut_ = 0; color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR); box(FL_DOWN_FRAME); textsize(FL_NORMAL_SIZE); textcolor(FL_FOREGROUND_COLOR); textfont(FL_HELVETICA); set_flag(SHORTCUT_LABEL); text_area.x = 0; text_area.y = 0; text_area.w = 0; text_area.h = 0; mVScrollBar = new Fl_Scrollbar(0,0,1,1); mVScrollBar->callback((Fl_Callback*)v_scrollbar_cb, this); mHScrollBar = new Fl_Scrollbar(0,0,1,1); mHScrollBar->callback((Fl_Callback*)h_scrollbar_cb, this); mHScrollBar->type(FL_HORIZONTAL); end(); scrollbar_width(Fl::scrollbar_size()); scrollbar_align(FL_ALIGN_BOTTOM_RIGHT); mCursorOn = 0; mCursorPos = 0; mCursorOldY = -100; mCursorToHint = NO_HINT; mCursorStyle = NORMAL_CURSOR; mCursorPreferredXPos = -1; mBuffer = 0; mFirstChar = 0; mLastChar = 0; mNBufferLines = 0; mTopLineNum = mTopLineNumHint = 1; mAbsTopLineNum = 1; mNeedAbsTopLineNum = 0; mHorizOffset = mHorizOffsetHint = 0; mCursor_color = FL_FOREGROUND_COLOR; mStyleBuffer = 0; mStyleTable = 0; mNStyles = 0; mNVisibleLines = 1; mLineStarts = new int[mNVisibleLines]; mLineStarts[0] = 0; for (i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1; mSuppressResync = 0; mNLinesDeleted = 0; mModifyingTabDistance = 0; mUnfinishedStyle = 0; mUnfinishedHighlightCB = 0; mHighlightCBArg = 0; mLineNumLeft = mLineNumWidth = 0; mContinuousWrap = 0; mFastDisplay = 0; s_text.clear(); s_style.clear(); mWrapMarginPix = 0; mSuppressResync = mNLinesDeleted = mModifyingTabDistance = 0; } /** Free a text display and release its associated memory. Note, the text BUFFER that the text display displays is a separate entity and is not freed, nor are the style buffer or style table. */ Fl_Text_Display_mod::~Fl_Text_Display_mod() { if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } //df // if (mBuffer) { // mBuffer->remove_modify_callback(buffer_modified_cb, this); // mBuffer->remove_predelete_callback(buffer_predelete_cb, this); // } if (mLineStarts) delete[] mLineStarts; } /** Attach a text buffer to display, replacing the current buffer (if any) \param buf attach this text buffer */ void Fl_Text_Display_mod::buffer( Fl_Text_Buffer_mod *buf ) { /* If the text display is already displaying a buffer, clear it off of the display and remove our callback from it */ if ( buf == mBuffer) return; if ( mBuffer != 0 ) { // we must provide a copy of the buffer that we are deleting! char *deletedText = mBuffer->text(); buffer_modified_cb( 0, 0, mBuffer->length(), 0, deletedText, this ); free(deletedText); mNBufferLines = 0; mBuffer->remove_modify_callback( buffer_modified_cb, this ); mBuffer->remove_predelete_callback( buffer_predelete_cb, this ); } /* Add the buffer to the display, and attach a callback to the buffer for receiving modification information when the buffer contents change */ mBuffer = buf; if (mBuffer) { mBuffer->add_modify_callback( buffer_modified_cb, this ); mBuffer->add_predelete_callback( buffer_predelete_cb, this ); /* Update the display */ buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); } /* Resize the widget to update the screen... */ resize(x(), y(), w(), h()); } /** \brief Attach (or remove) highlight information in text display and redisplay. Highlighting information consists of a style buffer which parallels the normal text buffer, but codes font and color information for the display; a style table which translates style buffer codes (indexed by buffer character - 'A') into fonts and colors; and a callback mechanism for as-needed highlighting, triggered by a style buffer entry of "unfinishedStyle". Style buffer can trigger additional redisplay during a normal buffer modification if the buffer contains a primary Fl_Text_Selection (see extendRangeForStyleMods for more information on this protocol). Style buffers, tables and their associated memory are managed by the caller. Styles are ranged from 65 ('A') to 126. \param styleBuffer this buffer works in parallel to the text buffer. For every character in the text buffer, the stye buffer has a byte at the same offset that contains an index into an array of possible styles. \param styleTable a list of styles indexed by the style buffer \param nStyles number of styles in the style table \param unfinishedStyle if this style is found, the callback below is called \param unfinishedHighlightCB if a character with an unfinished style is found, this callback will be called \param cbArg and optional argument for the callback above, usually a pointer to the Text Display. */ void Fl_Text_Display_mod::highlight_data(Fl_Text_Buffer_mod *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg ) { mStyleBuffer = styleBuffer; mStyleTable = styleTable; mNStyles = nStyles; mUnfinishedStyle = unfinishedStyle; mUnfinishedHighlightCB = unfinishedHighlightCB; mHighlightCBArg = cbArg; mColumnScale = 0; mStyleBuffer->canUndo(0); damage(FL_DAMAGE_EXPOSE); } /** \brief Find the longest line of all visible lines. \return the width of the longest visible line in pixels */ int Fl_Text_Display_mod::longest_vline() const { int longest = 0; for (int i = 0; i < mNVisibleLines; i++) longest = max(longest, measure_vline(i)); return longest; } /** \brief Change the size of the displayed text area. Calling this function will trigger a recalculation of all lines visible and of all scrollbar sizes. \param X, Y, W, H new position and size of this widget */ void Fl_Text_Display_mod::resize(int X, int Y, int W, int H) { #ifdef DEBUG printf("Fl_Text_Display_mod::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H); #endif // DEBUG const int oldWidth = w(); #ifdef DEBUG printf(" oldWidth=%d, mContinuousWrap=%d, mWrapMargin=%d\n", oldWidth, mContinuousWrap, mWrapMargin); #endif // DEBUG Fl_Widget::resize(X,Y,W,H); if (!buffer()) return; X += Fl::box_dx(box()); Y += Fl::box_dy(box()); W -= Fl::box_dw(box()); H -= Fl::box_dh(box()); text_area.x = X+LEFT_MARGIN; text_area.y = Y+TOP_MARGIN; text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN - (mVScrollBar->visible() ? scrollbar_width() : 0); text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN - (mHScrollBar->visible() ? scrollbar_width() : 0); int i; /* Find the new maximum font height for this text display */ for (i = 0, mMaxsize = fl_height(textfont(), textsize()); i < mNStyles; i++) mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size)); // did we have scrollbars initially? unsigned int hscrollbarvisible = mHScrollBar->visible(); unsigned int vscrollbarvisible = mVScrollBar->visible(); // try without scrollbars first mVScrollBar->clear_visible(); mHScrollBar->clear_visible(); for (int again = 1; again;) { again = 0; /* In continuous wrap mode, a change in width affects the total number of lines in the buffer, and can leave the top line number incorrect, and the top character no longer pointing at a valid line start */ if (!mFastDisplay && mContinuousWrap && !mWrapMarginPix && W!=oldWidth) { int oldFirstChar = mFirstChar; mNBufferLines = count_lines(0, buffer()->length(), true); mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true)+1; absolute_top_line_number(oldFirstChar); #ifdef DEBUG printf(" mNBufferLines=%d\n", mNBufferLines); #endif // DEBUG } /* reallocate and update the line starts array, which may have changed size and / or contents. */ int nvlines = (text_area.h + mMaxsize - 1) / mMaxsize; if (nvlines < 1) nvlines = 1; if (mNVisibleLines != nvlines) { mNVisibleLines = nvlines; if (mLineStarts) delete[] mLineStarts; mLineStarts = new int [mNVisibleLines]; } calc_line_starts(0, mNVisibleLines); calc_last_char(); // figure the scrollbars if (scrollbar_width()) { /* Decide if the vertical scrollbar needs to be visible */ // always display vertical scroll bar // if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && // mNBufferLines >= mNVisibleLines - 1) { mVScrollBar->set_visible(); if (scrollbar_align() & FL_ALIGN_LEFT) { text_area.x = X+scrollbar_width()+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN - scrollbar_width(); mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } else { text_area.x = X+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN; mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } } /* Decide if the horizontal scrollbar needs to be visible. If there is a vertical scrollbar, a horizontal is always created too. This is because the alternatives are unattractive: * Dynamically creating a horizontal scrollbar based on the currently visible lines is what the original nedit does, but it always wastes space for the scrollbar even when it's not used. Since the FLTK widget dynamically allocates the space for the scrollbar and rearranges the widget to make room for it, this would create a very visually displeasing "bounce" effect when the vertical scrollbar is dragged. Trust me, I tried it and it looks really bad. * The other alternative would be to keep track of what the longest line in the entire buffer is and base the scrollbar on that. I didn't do this because I didn't see any easy way to do that using the nedit code and this could involve a lengthy calculation for large buffers. If an efficient and non-costly way of doing this can be found, this might be a way to go. */ /* WAS: Suggestion: Try turning the horizontal scrollbar on when you first see a line that is too wide in the window, but then don't turn it off (ie mix both of your solutions). */ if (!mFastDisplay && !mContinuousWrap && scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM) && (mVScrollBar->visible() || longest_vline() > text_area.w)) { if (!mHScrollBar->visible()) { mHScrollBar->set_visible(); again = 1; // loop again to see if we now need vert. & recalc sizes } if (scrollbar_align() & FL_ALIGN_TOP) { text_area.y = Y + scrollbar_width()+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } else { text_area.y = Y+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y+H-scrollbar_width(), text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } } } } // user request to change viewport if (mTopLineNumHint != mTopLineNum || mHorizOffsetHint != mHorizOffset) scroll_(mTopLineNumHint, mHorizOffsetHint); // everything will fit in the viewport if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0) { scroll_(1, mHorizOffset); /* if empty lines become visible, there may be an opportunity to display more text by scrolling down */ } else { while ( mNVisibleLines>=2 && (mLineStarts[mNVisibleLines-2]==-1) && scroll_(mTopLineNum-1, mHorizOffset)) { } } // user request to display insert position if (display_insert_position_hint) display_insert(); // in case horizontal offset is now greater than longest line int maxhoffset = max(0, longest_vline()-text_area.w); if (mHorizOffset > maxhoffset) scroll_(mTopLineNumHint, maxhoffset); mTopLineNumHint = mTopLineNum; mHorizOffsetHint = mHorizOffset; display_insert_position_hint = 0; if ((!mFastDisplay && mContinuousWrap) || hscrollbarvisible != mHScrollBar->visible() || vscrollbarvisible != mVScrollBar->visible()) redraw(); update_v_scrollbar(); update_h_scrollbar(); } /** \brief Refresh a rectangle of the text display. \param left, top are in coordinates of the text drawing window. \param width, height size in pixels */ void Fl_Text_Display_mod::draw_text( int left, int top, int width, int height ) { int fontHeight, firstLine, lastLine, line; /* find the line number range of the display */ fontHeight = mMaxsize ? mMaxsize : textsize_; firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight; lastLine = ( top + height - text_area.y ) / fontHeight + 1; fl_push_clip( left, top, width, height ); /* draw the lines */ for ( line = firstLine; line <= lastLine; line++ ) draw_vline( line, left, left + width, 0, INT_MAX ); /* draw the line numbers if exposed area includes them */ if (mLineNumWidth != 0 && left <= mLineNumLeft + mLineNumWidth) draw_line_numbers(false); fl_pop_clip(); } /** \brief Marks text from start to end as needing a redraw. This function will trigger a damage event and later a redraw of parts of the widget. \param startpos index of first character needing redraw \param endpos index after last character needing redraw */ void Fl_Text_Display_mod::redisplay_range(int startpos, int endpos) { IS_UTF8_ALIGNED2(buffer(), startpos) IS_UTF8_ALIGNED2(buffer(), endpos) if (damage_range1_start == -1 && damage_range1_end == -1) { damage_range1_start = startpos; damage_range1_end = endpos; } else if ((startpos >= damage_range1_start && startpos <= damage_range1_end) || (endpos >= damage_range1_start && endpos <= damage_range1_end)) { damage_range1_start = min(damage_range1_start, startpos); damage_range1_end = max(damage_range1_end, endpos); } else if (damage_range2_start == -1 && damage_range2_end == -1) { damage_range2_start = startpos; damage_range2_end = endpos; } else { damage_range2_start = min(damage_range2_start, startpos); damage_range2_end = max(damage_range2_end, endpos); } damage(FL_DAMAGE_SCROLL); } /** \brief Draw a range of text. Refresh all of the text between buffer positions \p startpos and \p endpos not including the character at the position \p endpos. If \p endpos points beyond the end of the buffer, refresh the whole display after \p startpos, including blank lines which are not technically part of any range of characters. \param startpos index of first character to draw \param endpos index after last character to draw */ void Fl_Text_Display_mod::draw_range(int startpos, int endpos) { startpos = buffer()->utf8_align(startpos); endpos = buffer()->utf8_align(endpos); int i, startLine, lastLine, startIndex, endIndex; /* If the range is outside of the displayed text, just return */ if ( endpos < mFirstChar || ( startpos > mLastChar && !empty_vlines() ) ) return; /* Clean up the starting and ending values */ if ( startpos < 0 ) startpos = 0; if ( startpos > mBuffer->length() ) startpos = mBuffer->length(); if ( endpos < 0 ) endpos = 0; if ( endpos > mBuffer->length() ) endpos = mBuffer->length(); /* Get the starting and ending lines */ if ( startpos < mFirstChar ) startpos = mFirstChar; if ( !position_to_line( startpos, &startLine ) ) startLine = mNVisibleLines - 1; if ( endpos >= mLastChar ) { lastLine = mNVisibleLines - 1; } else { if ( !position_to_line( endpos, &lastLine ) ) { /* shouldn't happen */ lastLine = mNVisibleLines - 1; } } /* Get the starting and ending positions within the lines */ startIndex = mLineStarts[ startLine ] == -1 ? 0 : startpos - mLineStarts[ startLine ]; if ( endpos >= mLastChar ) endIndex = INT_MAX; else if ( mLineStarts[ lastLine ] == -1 ) endIndex = 0; else endIndex = endpos - mLineStarts[ lastLine ]; /* If the starting and ending lines are the same, redisplay the single line between "start" and "end" */ if ( startLine == lastLine ) { draw_vline( startLine, 0, INT_MAX, startIndex, endIndex ); return; } /* Redisplay the first line from "start" */ draw_vline( startLine, 0, INT_MAX, startIndex, INT_MAX ); /* Redisplay the lines in between at their full width */ for ( i = startLine + 1; i < lastLine; i++ ) draw_vline( i, 0, INT_MAX, 0, INT_MAX ); /* Redisplay the last line to "end" */ draw_vline( lastLine, 0, INT_MAX, 0, endIndex ); } /** \brief Sets the position of the text insertion cursor for text display. Move the insertion cursor in front of the character at \p newPos. This function may trigger a redraw. \param newPos new caret position */ void Fl_Text_Display_mod::insert_position( int newPos ) { IS_UTF8_ALIGNED2(buffer(), newPos) /* make sure new position is ok, do nothing if it hasn't changed */ if ( newPos == mCursorPos ) return; if ( newPos < 0 ) newPos = 0; if ( newPos > mBuffer->length() ) newPos = mBuffer->length(); /* cursor movement cancels vertical cursor motion column */ mCursorPreferredXPos = -1; /* erase the cursor at its previous position */ redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); mCursorPos = newPos; /* draw cursor at its new position */ redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); } /** \brief Shows the text cursor. This function may trigger a redraw. \param b show(1) or hide(0) the text cursor (caret). */ void Fl_Text_Display_mod::show_cursor(int b) { mCursorOn = b; redisplay_range(buffer()->prev_char_clipped(mCursorPos), buffer()->next_char(mCursorPos)); } /** \brief Sets the text cursor style. Sets the text cursor style to one of the following: \li Fl_Text_Display_mod::NORMAL_CURSOR - Shows an I beam. \li Fl_Text_Display_mod::CARET_CURSOR - Shows a caret under the text. \li Fl_Text_Display_mod::DIM_CURSOR - Shows a dimmed I beam. \li Fl_Text_Display_mod::BLOCK_CURSOR - Shows an unfilled box around the current character. \li Fl_Text_Display_mod::HEAVY_CURSOR - Shows a thick I beam. This call also switches the cursor on and may trigger a redraw. \param style new cursor style */ void Fl_Text_Display_mod::cursor_style(int style) { mCursorStyle = style; if (mCursorOn) show_cursor(); } /** \brief Set the new text wrap mode. If \p wrap mode is not zero, this call enables automatic word wrapping at column \p wrapMargin. Word-wrapping does not change the text buffer itself, only the way the text is displayed. Different Text Displays can have different wrap modes, even if they share the same Text Buffer. \param wrap new wrap mode is WRAP_NONE (don't wrap text at all), WRAP_AT_COLUMN (wrap text at the given text column), WRAP_AT_PIXEL (wrap text at a pixel position), or WRAP_AT_BOUNDS (wrap text so that it fits into the widget width) \param wrapMargin in WRAP_AT_COLUMN mode, text will wrap at the n'th character. For variable width fonts, an average character width is calculated. The column width is calculated using the current textfont or the first style when this function is called. If the font size changes, this function must be called again. In WRAP_AT_PIXEL mode, this is the pixel position. \todo we need new wrap modes to wrap at the window edge and based on pixel width or average character width. */ void Fl_Text_Display_mod::wrap_mode(int wrap, int wrapMargin) { switch (wrap) { case WRAP_NONE: mWrapMarginPix = 0; mContinuousWrap = 0; break; case WRAP_AT_COLUMN: default: mWrapMarginPix = int(col_to_x(wrapMargin)); mContinuousWrap = 1; break; case WRAP_AT_PIXEL: mWrapMarginPix = wrapMargin; mContinuousWrap = 1; break; case WRAP_AT_BOUNDS: mWrapMarginPix = 0; mContinuousWrap = 1; break; } if (buffer()) { /* wrapping can change the total number of lines, re-count */ mNBufferLines = count_lines(0, buffer()->length(), true); /* changing wrap margins or changing from wrapped mode to non-wrapped can leave the character at the top no longer at a line start, and/or change the line number */ mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true) + 1; reset_absolute_top_line_number(); /* update the line starts array */ calc_line_starts(0, mNVisibleLines); calc_last_char(); } else { // No buffer, so just clear the state info for later... mNBufferLines = 0; mFirstChar = 0; mTopLineNum = 1; mAbsTopLineNum = 0; } resize(x(), y(), w(), h()); } /** \brief Inserts "text" at the current cursor location. This has the same effect as inserting the text into the buffer using BufInsert and then moving the insert position after the newly inserted text, except that it's optimized to do less redrawing. \param text new text in UTF-8 encoding. */ void Fl_Text_Display_mod::insert(const char* text) { IS_UTF8_ALIGNED2(buffer(), mCursorPos) IS_UTF8_ALIGNED(text) int pos = mCursorPos; mCursorToHint = pos + strlen( text ); mBuffer->insert( pos, text ); mCursorToHint = NO_HINT; } /** \brief Replaces text at the current insert position. \param text new text in UTF-8 encoding \todo Unicode? Find out exactly what we do here and simplify. */ void Fl_Text_Display_mod::overstrike(const char* text) { IS_UTF8_ALIGNED2(buffer(), mCursorPos) IS_UTF8_ALIGNED(text) int startPos = mCursorPos; Fl_Text_Buffer_mod *buf = mBuffer; int lineStart = buf->line_start( startPos ); int textLen = strlen( text ); int i, p, endPos, indent, startIndent, endIndent; const char *c; unsigned int ch; char *paddedText = NULL; /* determine how many displayed character positions are covered */ startIndent = mBuffer->count_displayed_characters( lineStart, startPos ); indent = startIndent; for ( c = text; *c != '\0'; c += fl_utf8len1(*c) ) indent++; endIndent = indent; /* find which characters to remove, and if necessary generate additional padding to make up for removed control characters at the end */ indent = startIndent; for ( p = startPos; ; p=buffer()->next_char(p) ) { if ( p == buf->length() ) break; ch = buf->char_at( p ); if ( ch == '\n' ) break; indent++; if ( indent == endIndent ) { p++; break; } else if ( indent > endIndent ) { if ( ch != '\t' ) { p++; paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ]; strcpy( paddedText, text ); for ( i = 0; i < indent - endIndent; i++ ) paddedText[ textLen + i ] = ' '; paddedText[ textLen + i ] = '\0'; } break; } } endPos = p; mCursorToHint = startPos + textLen; buf->replace( startPos, endPos, paddedText == NULL ? text : paddedText ); mCursorToHint = NO_HINT; if ( paddedText != NULL ) delete [] paddedText; } /** \brief Convert a character index into a pixel position. Translate a buffer text position to the XY location where the top left of the cursor would be positioned to point to that character. Returns 0 if the position is not displayed because it is \e \b vertically out of view. If the position is horizontally out of view, returns the X coordinate where the position would be if it were visible. \param pos character index \param[out] X, Y pixel position of character on screen \return 0 if character vertically out of view, X position otherwise */ int Fl_Text_Display_mod::position_to_xy( int pos, int* X, int* Y ) const { IS_UTF8_ALIGNED2(buffer(), pos) int lineStartPos, fontHeight, lineLen; int visLineNum; /* If position is not displayed, return false */ if (pos < mFirstChar || (pos > mLastChar && !empty_vlines())) { return 0; } /* Calculate Y coordinate */ if (!position_to_line(pos, &visLineNum)) { return 0; } if (visLineNum < 0 || visLineNum > mNBufferLines) { return 0; } fontHeight = mMaxsize; *Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line. If the position is beyond the end of the buffer and should be at the first position on the first empty line, don't try to get or scan the text */ lineStartPos = mLineStarts[visLineNum]; if ( lineStartPos == -1 ) { *X = text_area.x - mHorizOffset; return 1; } lineLen = vline_length( visLineNum ); *X = text_area.x + handle_vline(GET_WIDTH, lineStartPos, pos-lineStartPos, 0, 0, 0, 0, 0, 0) - mHorizOffset; return 1; } /** \brief Find the line and column number of position \p pos. This only works for displayed lines. If the line is not displayed, the function returns 0 (without the mLineStarts array it could turn in to very long calculation involving scanning large amounts of text in the buffer). If continuous wrap mode is on, returns the absolute line number (as opposed to the wrapped line number which is used for scrolling). \param pos character index \param[out] lineNum absolute (unwrapped) line number \param[out] column character offset to the beginning of the line \return 0 if \p pos is off screen, line number otherwise \todo a column number makes little sense in the UTF-8/variable font width environment. We will have to further define what exactly we want to return. Please check the functions that call this particular function. */ int Fl_Text_Display_mod::position_to_linecol( int pos, int* lineNum, int* column ) const { IS_UTF8_ALIGNED2(buffer(), pos) int retVal; /* In continuous wrap mode, the absolute (non-wrapped) line count is maintained separately, as needed. Only return it if we're actually keeping track of it and pos is in the displayed text */ if (!mFastDisplay && mContinuousWrap) { if (!maintaining_absolute_top_line_number() || pos < mFirstChar || pos > mLastChar) return 0; *lineNum = mAbsTopLineNum + buffer()->count_lines(mFirstChar, pos); *column = buffer()->count_displayed_characters(buffer()->line_start(pos), pos); return 1; } retVal = position_to_line( pos, lineNum ); if ( retVal ) { *column = mBuffer->count_displayed_characters( mLineStarts[ *lineNum ], pos ); *lineNum += mTopLineNum; } return retVal; } /** \brief Check if a pixel position is within the primary selection. \param X, Y pixel position to test \return 1 if position (X, Y) is inside of the primary Fl_Text_Selection */ int Fl_Text_Display_mod::in_selection( int X, int Y ) const { int pos = xy_to_position( X, Y, CHARACTER_POS ); IS_UTF8_ALIGNED2(buffer(), pos) Fl_Text_Buffer_mod *buf = mBuffer; return buf->primary_selection()->includes(pos); } /** \brief Nobody knows what this function does. Correct a column number based on an unconstrained position (as returned by TextDXYToUnconstrainedPosition) to be relative to the last actual newline in the buffer before the row and column position given, rather than the last line start created by line wrapping. This is an adapter for rectangular selections and code written before continuous wrap mode, which thinks that the unconstrained column is the number of characters from the last newline. Obviously this is time consuming, because it invloves character re-counting. \param row \param column \return something unknown \todo What does this do and how is it useful? Column numbers mean little in this context. Which functions depend on this one? \todo Unicode? */ int Fl_Text_Display_mod::wrapped_column(int row, int column) const { int lineStart, dispLineStart; if (mFastDisplay || !mContinuousWrap || row < 0 || row > mNVisibleLines) return column; dispLineStart = mLineStarts[row]; if (dispLineStart == -1) return column; lineStart = buffer()->line_start(dispLineStart); return column + buffer()->count_displayed_characters(lineStart, dispLineStart); } /** \brief Nobody knows what this function does. Correct a row number from an unconstrained position (as returned by TextDXYToUnconstrainedPosition) to a straight number of newlines from the top line of the display. Because rectangular selections are based on newlines, rather than display wrapping, and anywhere a rectangular selection needs a row, it needs it in terms of un-wrapped lines. \param row \return something unknown \todo What does this do and how is it useful? Column numbers mean little in this context. Which functions depend on this one? */ int Fl_Text_Display_mod::wrapped_row(int row) const { if (mFastDisplay || !mContinuousWrap || row < 0 || row > mNVisibleLines) return row; return buffer()->count_lines(mFirstChar, mLineStarts[row]); } /** \brief Scroll the display to bring insertion cursor into view. Note: it would be nice to be able to do this without counting lines twice (scroll_() counts them too) and/or to count from the most efficient starting point, but the efficiency of this routine is not as important to the overall performance of the text display. \todo Unicode? */ void Fl_Text_Display_mod::display_insert() { int hOffset, topLine, X, Y; hOffset = mHorizOffset; topLine = mTopLineNum; if (insert_position() < mFirstChar) { topLine -= count_lines(insert_position(), mFirstChar, false); } else if (mNVisibleLines>=2 && mLineStarts[mNVisibleLines-2] != -1) { int lastChar = line_end(mLineStarts[mNVisibleLines-2],true); if (insert_position() >= lastChar) topLine += count_lines(lastChar - (wrap_uses_character(mLastChar) ? 0 : 1), insert_position(), false); } /* Find the new setting for horizontal offset (this is a bit ungraceful). If the line is visible, just use PositionToXY to get the position to scroll to, otherwise, do the vertical scrolling first, then the horizontal */ if (!position_to_xy( mCursorPos, &X, &Y )) { scroll_(topLine, hOffset); if (!position_to_xy( mCursorPos, &X, &Y )) { #ifdef DEBUG printf ("*** display_insert/position_to_xy # GIVE UP !\n"); fflush(stdout); #endif // DEBUG return; /* Give up, it's not worth it (but why does it fail?) */ } } if (X > text_area.x + text_area.w) hOffset += X-(text_area.x + text_area.w); else if (X < text_area.x) hOffset += X-text_area.x; /* Do the scroll */ if (topLine != mTopLineNum || hOffset != mHorizOffset) scroll_(topLine, hOffset); } /** \brief Scrolls the text buffer to show the current insert position. This function triggers a complete recalculation, ending in a call to Fl_Text_Display_mod::display_insert() */ void Fl_Text_Display_mod::show_insert_position() { display_insert_position_hint = 1; resize(x(), y(), w(), h()); } /* Cursor movement functions */ /** \brief Moves the current insert position right one character. \return 1 if the cursor moved, 0 if the end of the text was reached */ int Fl_Text_Display_mod::move_right() { if ( mCursorPos >= mBuffer->length() ) return 0; int p = insert_position(); int q = buffer()->next_char(p); insert_position(q); return 1; } /** \brief Moves the current insert position left one character. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_left() { if ( mCursorPos <= 0 ) return 0; int p = insert_position(); int q = buffer()->prev_char_clipped(p); insert_position(q); return 1; } /** \brief Moves the current insert position up one line. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_up() { int lineStartPos, xPos, prevLineStartPos, newPos, visLineNum; /* Find the position of the start of the line. Use the line starts array if possible */ if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } if ( lineStartPos == 0 ) return 0; /* Decide what column to move to, if there's a preferred column use that */ if (mCursorPreferredXPos >= 0) xPos = mCursorPreferredXPos; else xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 0, 0, 0, 0, 0, INT_MAX); /* count forward from the start of the previous line to reach the column */ if ( visLineNum != -1 && visLineNum != 0 ) prevLineStartPos = mLineStarts[ visLineNum - 1 ]; else prevLineStartPos = rewind_lines( lineStartPos, 1 ); int lineEnd = line_end(prevLineStartPos, true); newPos = handle_vline(FIND_INDEX_FROM_ZERO, prevLineStartPos, lineEnd-prevLineStartPos, 0, 0, 0, 0, 0, xPos); /* move the cursor */ insert_position( newPos ); /* if a preferred column wasn't aleady established, establish it */ mCursorPreferredXPos = xPos; return 1; } /** \brief Moves the current insert position down one line. \return 1 if the cursor moved, 0 if the beginning of the text was reached */ int Fl_Text_Display_mod::move_down() { int lineStartPos, xPos, newPos, visLineNum; if ( mCursorPos == mBuffer->length() ) return 0; if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } if (mCursorPreferredXPos >= 0) { xPos = mCursorPreferredXPos; } else { xPos = handle_vline(GET_WIDTH, lineStartPos, mCursorPos-lineStartPos, 0, 0, 0, 0, 0, INT_MAX); } int nextLineStartPos = skip_lines( lineStartPos, 1, true ); int lineEnd = line_end(nextLineStartPos, true); newPos = handle_vline(FIND_INDEX_FROM_ZERO, nextLineStartPos, lineEnd-nextLineStartPos, 0, 0, 0, 0, 0, xPos); insert_position( newPos ); mCursorPreferredXPos = xPos; return 1; } /** \brief Count the number of lines between two positions. Same as BufCountLines, but takes into account wrapping if wrapping is turned on. If the caller knows that \p startPos is at a line start, it can pass \p startPosIsLineStart as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. \param startPos index to first character \param endPos index after last character \param startPosIsLineStart avoid scanning back to the line start \return number of lines */ int Fl_Text_Display_mod::count_lines(int startPos, int endPos, bool startPosIsLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) IS_UTF8_ALIGNED2(buffer(), endPos) int retLines, retPos, retLineStart, retLineEnd; #ifdef DEBUG printf("Fl_Text_Display_mod::count_lines(startPos=%d, endPos=%d, startPosIsLineStart=%d\n", startPos, endPos, startPosIsLineStart); #endif // DEBUG /* If we're not wrapping use simple (and more efficient) BufCountLines */ if (mFastDisplay || !mContinuousWrap) return buffer()->count_lines(startPos, endPos); wrapped_line_counter(buffer(), startPos, endPos, INT_MAX, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); #ifdef DEBUG printf(" # after WLC: retPos=%d, retLines=%d, retLineStart=%d, retLineEnd=%d\n", retPos, retLines, retLineStart, retLineEnd); #endif // DEBUG return retLines; } /** \brief Skip a number of lines forward. Same as BufCountForwardNLines, but takes into account line breaks when wrapping is turned on. If the caller knows that startPos is at a line start, it can pass "startPosIsLineStart" as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. \param startPos index to starting character \param nLines number of lines to skip ahead \param startPosIsLineStart avoid scanning back to the line start \return new position as index */ int Fl_Text_Display_mod::skip_lines(int startPos, int nLines, bool startPosIsLineStart) { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retPos, retLineStart, retLineEnd; /* if we're not wrapping use more efficient BufCountForwardNLines */ if (mFastDisplay || !mContinuousWrap) return buffer()->skip_lines(startPos, nLines); /* wrappedLineCounter can't handle the 0 lines case */ if (nLines == 0) return startPos; /* use the common line counting routine to count forward */ wrapped_line_counter(buffer(), startPos, buffer()->length(), nLines, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retPos) return retPos; } /** \brief Returns the end of a line. Same as BufEndOfLine, but takes into account line breaks when wrapping is turned on. If the caller knows that \p startPos is at a line start, it can pass "startPosIsLineStart" as True to make the call more efficient by avoiding the additional step of scanning back to the last newline. Note that the definition of the end of a line is less clear when continuous wrap is on. With continuous wrap off, it's just a pointer to the newline that ends the line. When it's on, it's the character beyond the last \b displayable character on the line, where a whitespace character which has been "converted" to a newline for wrapping is not considered displayable. Also note that a line can be wrapped at a non-whitespace character if the line had no whitespace. In this case, this routine returns a pointer to the start of the next line. This is also consistent with the model used by visLineLength. \param startPos index to starting character \param startPosIsLineStart avoid scanning back to the line start \return new position as index */ int Fl_Text_Display_mod::line_end(int startPos, bool startPosIsLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping use more efficient BufEndOfLine */ if (mFastDisplay || !mContinuousWrap) return buffer()->line_end(startPos); if (startPos == buffer()->length()) return startPos; wrapped_line_counter(buffer(), startPos, buffer()->length(), 1, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retLineEnd) return retLineEnd; } /** \brief Return the beginning of a line. Same as BufStartOfLine, but returns the character after last wrap point rather than the last newline. \param pos index to starting character \return new position as index */ int Fl_Text_Display_mod::line_start(int pos) const { IS_UTF8_ALIGNED2(buffer(), pos) int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufStartOfLine */ if (mFastDisplay || !mContinuousWrap) return buffer()->line_start(pos); wrapped_line_counter(buffer(), buffer()->line_start(pos), pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); IS_UTF8_ALIGNED2(buffer(), retLineStart) return retLineStart; } /** \brief Skip a number of lines back. Same as BufCountBackwardNLines, but takes into account line breaks when wrapping is turned on. \param startPos index to starting character \param nLines number of lines to skip back \return new position as index */ int Fl_Text_Display_mod::rewind_lines(int startPos, int nLines) { IS_UTF8_ALIGNED2(buffer(), startPos) Fl_Text_Buffer_mod *buf = buffer(); int pos, lineStart, retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufCountBackwardNLines */ if (mFastDisplay || !mContinuousWrap) return buf->rewind_lines(startPos, nLines); pos = startPos; for (;;) { lineStart = buf->line_start(pos); wrapped_line_counter(buf, lineStart, pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd, false); if (retLines > nLines) return skip_lines(lineStart, retLines-nLines, true); nLines -= retLines; pos = lineStart - 1; if (pos < 0) return 0; nLines -= 1; } } static inline int fl_isseparator(unsigned int c) { // FIXME: this does not take UCS-4 encoding into account return c != '$' && c != '_' && (isspace(c) || ispunct(c)); } /** \brief Moves the current insert position right one word. */ void Fl_Text_Display_mod::next_word() { int pos = insert_position(); while (pos < buffer()->length() && !fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } while (pos < buffer()->length() && fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } insert_position( pos ); } /** \brief Moves the current insert position left one word. */ void Fl_Text_Display_mod::previous_word() { int pos = insert_position(); if (pos==0) return; pos = buffer()->prev_char(pos); while (pos && fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->prev_char(pos); } while (pos && !fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->prev_char(pos); } if (fl_isseparator(buffer()->char_at(pos))) { pos = buffer()->next_char(pos); } insert_position( pos ); } /** \brief This is called before any characters are deleted. Callback attached to the text buffer to receive delete information before the modifications are actually made. \param pos starting index of deletion \param nDeleted number of bytes we will delete (must be UTF-8 aligned!) \param cbArg "this" pointer for static callback function */ void Fl_Text_Display_mod::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) { Fl_Text_Display_mod *textD = (Fl_Text_Display_mod *)cbArg; if (textD->mContinuousWrap && !textD->mFastDisplay) { /* Note: we must perform this measurement, even if there is not a single character deleted; the number of "deleted" lines is the number of visual lines spanned by the real line in which the modification takes place. Also, a modification of the tab distance requires the same kind of calculations in advance, even if the font width is "fixed", because when the width of the tab characters changes, the layout of the text may be completely different. */ IS_UTF8_ALIGNED2(textD->buffer(), pos) textD->measure_deleted_lines(pos, nDeleted); } else { textD->mSuppressResync = 0; /* Probably not needed, but just in case */ } } /** \brief This is called whenever the buffer is modified. Callback attached to the text buffer to receive modification information \param pos starting index of modification \param nInserted number of bytes we inserted (must be UTF-8 aligned!) \param nDeleted number of bytes deleted (must be UTF-8 aligned!) \param nRestyled ?? \param deletedText this is what was removed, must not be NULL if nDeleted is set \param cbArg "this" pointer for static callback function */ void Fl_Text_Display_mod::buffer_modified_cb( int pos, int nInserted, int nDeleted, int nRestyled, const char *deletedText, void *cbArg ) { int linesInserted, linesDeleted, startDispPos, endDispPos; Fl_Text_Display_mod *textD = ( Fl_Text_Display_mod * ) cbArg; Fl_Text_Buffer_mod *buf = textD->mBuffer; int oldFirstChar = textD->mFirstChar; int scrolled, origCursorPos = textD->mCursorPos; int wrapModStart = 0, wrapModEnd = 0; IS_UTF8_ALIGNED2(buf, pos) IS_UTF8_ALIGNED2(buf, oldFirstChar) /* buffer modification cancels vertical cursor motion column */ if ( nInserted != 0 || nDeleted != 0 ) textD->mCursorPreferredXPos = -1; /* Count the number of lines inserted and deleted, and in the case of continuous wrap mode, how much has changed */ if (textD->mContinuousWrap && !textD->mFastDisplay) { textD->find_wrap_range(deletedText, pos, nInserted, nDeleted, &wrapModStart, &wrapModEnd, &linesInserted, &linesDeleted); } else { linesInserted = nInserted == 0 ? 0 : buf->count_lines( pos, pos + nInserted ); linesDeleted = nDeleted == 0 ? 0 : countlines( deletedText ); } /* Update the line starts and mTopLineNum */ if ( nInserted != 0 || nDeleted != 0 ) { if (textD->mContinuousWrap && !textD->mFastDisplay) { textD->update_line_starts( wrapModStart, wrapModEnd-wrapModStart, nDeleted + pos-wrapModStart + (wrapModEnd-(pos+nInserted)), linesInserted, linesDeleted, &scrolled ); } else { textD->update_line_starts( pos, nInserted, nDeleted, linesInserted, linesDeleted, &scrolled ); } } else scrolled = 0; /* If we're counting non-wrapped lines as well, maintain the absolute (non-wrapped) line number of the text displayed */ if (textD->maintaining_absolute_top_line_number() && (nInserted != 0 || nDeleted != 0)) { if (deletedText && (pos + nDeleted < oldFirstChar)) textD->mAbsTopLineNum += buf->count_lines(pos, pos + nInserted) - countlines(deletedText); else if (pos < oldFirstChar) textD->reset_absolute_top_line_number(); } /* Update the line count for the whole buffer */ textD->mNBufferLines += linesInserted - linesDeleted; /* Update the cursor position */ if ( textD->mCursorToHint != NO_HINT ) { textD->mCursorPos = textD->mCursorToHint; textD->mCursorToHint = NO_HINT; } else if ( textD->mCursorPos > pos ) { if ( textD->mCursorPos < pos + nDeleted ) textD->mCursorPos = pos; else textD->mCursorPos += nInserted - nDeleted; } // refigure scrollbars & stuff textD->resize(textD->x(), textD->y(), textD->w(), textD->h()); // don't need to do anything else if not visible? if (!textD->visible_r()) return; /* If the changes caused scrolling, re-paint everything and we're done. */ if ( scrolled ) { textD->damage(FL_DAMAGE_EXPOSE); if ( textD->mStyleBuffer ) /* See comments in extendRangeForStyleMods */ textD->mStyleBuffer->primary_selection()->selected(0); return; } /* If the changes didn't cause scrolling, decide the range of characters that need to be re-painted. Also if the cursor position moved, be sure that the redisplay range covers the old cursor position so the old cursor gets erased, and erase the bits of the cursor which extend beyond the left and right edges of the text. */ startDispPos = (textD->mContinuousWrap && !textD->mFastDisplay) ? wrapModStart : pos; IS_UTF8_ALIGNED2(buf, startDispPos) if ( origCursorPos == startDispPos && textD->mCursorPos != startDispPos ) startDispPos = min( startDispPos, buf->prev_char_clipped(origCursorPos) ); IS_UTF8_ALIGNED2(buf, startDispPos) if ( linesInserted == linesDeleted ) { if ( nInserted == 0 && nDeleted == 0 ) endDispPos = pos + nRestyled; else { endDispPos = textD->mContinuousWrap ? wrapModEnd : buf->line_end( pos + nInserted ) + 1; if (textD->mContinuousWrap && !textD->mFastDisplay) endDispPos = wrapModEnd; else endDispPos = buf->next_char(buf->line_end( pos + nInserted )); // CET - FIXME if ( origCursorPos >= startDispPos && // ( origCursorPos <= endDispPos || endDispPos == buf->length() ) ) } if (linesInserted > 1) textD->draw_line_numbers(false); } else { endDispPos = buf->next_char(textD->mLastChar); // CET - FIXME if ( origCursorPos >= pos ) /* If more than one line is inserted/deleted, a line break may have been inserted or removed in between, and the line numbers may have changed. If only one line is altered, line numbers cannot be affected (the insertion or removal of a line break always results in at least two lines being redrawn). */ textD->draw_line_numbers(false); } IS_UTF8_ALIGNED2(buf, startDispPos) IS_UTF8_ALIGNED2(buf, endDispPos) /* If there is a style buffer, check if the modification caused additional changes that need to be redisplayed. (Redisplaying separately would cause double-redraw on almost every modification involving styled text). Extend the redraw range to incorporate style changes */ if ( textD->mStyleBuffer ) textD->extend_range_for_styles( &startDispPos, &endDispPos ); IS_UTF8_ALIGNED2(buf, startDispPos) IS_UTF8_ALIGNED2(buf, endDispPos) /* Redisplay computed range */ textD->redisplay_range( startDispPos, endDispPos ); } /** \brief Line numbering stuff, currently unused. In continuous wrap mode, internal line numbers are calculated after wrapping. A separate non-wrapped line count is maintained when line numbering is turned on. There is some performance cost to maintaining this line count, so normally absolute line numbers are not tracked if line numbering is off. This routine allows callers to specify that they still want this line count maintained (for use via TextDPosToLineAndCol). More specifically, this allows the line number reported in the statistics line to be calibrated in absolute lines, rather than post-wrapped lines. */ void Fl_Text_Display_mod::maintain_absolute_top_line_number(int state) { mNeedAbsTopLineNum = state; reset_absolute_top_line_number(); } /** \brief Line numbering stuff, currently unused. Returns the absolute (non-wrapped) line number of the first line displayed. Returns 0 if the absolute top line number is not being maintained. */ int Fl_Text_Display_mod::get_absolute_top_line_number() const { if (mFastDisplay || !mContinuousWrap) return mTopLineNum; if (maintaining_absolute_top_line_number()) return mAbsTopLineNum; return 0; } /** \brief Line numbering stuff, currently unused. Re-calculate absolute top line number for a change in scroll position. */ void Fl_Text_Display_mod::absolute_top_line_number(int oldFirstChar) { if (maintaining_absolute_top_line_number()) { if (mFirstChar < oldFirstChar) mAbsTopLineNum -= buffer()->count_lines(mFirstChar, oldFirstChar); else mAbsTopLineNum += buffer()->count_lines(oldFirstChar, mFirstChar); } } /** \brief Line numbering stuff, currently unused. Return true if a separate absolute top line number is being maintained (for displaying line numbers or showing in the statistics line). */ int Fl_Text_Display_mod::maintaining_absolute_top_line_number() const { return (!mFastDisplay && mContinuousWrap && (mLineNumWidth != 0 || mNeedAbsTopLineNum)); } /** \brief Line numbering stuff, probably unused. Count lines from the beginning of the buffer to reestablish the absolute (non-wrapped) top line number. If mode is not continuous wrap, or the number is not being maintained, does nothing. */ void Fl_Text_Display_mod::reset_absolute_top_line_number() { mAbsTopLineNum = 1; absolute_top_line_number(0); } /** \brief Convert a position index into a line number offset. Find the line number of position \p pos relative to the first line of displayed text. Returns 0 if the line is not displayed. \param pos ?? \param[out] lineNum ?? \return ?? \todo What does this do? */ int Fl_Text_Display_mod::position_to_line( int pos, int *lineNum ) const { IS_UTF8_ALIGNED2(buffer(), pos) int i; *lineNum = 0; if ( pos < mFirstChar ) return 0; if ( pos > mLastChar ) { if ( empty_vlines() ) { if ( mLastChar < mBuffer->length() ) { if ( !position_to_line( mLastChar, lineNum ) ) { Fl::error("Fl_Text_Display_mod::position_to_line(): Consistency check ptvl failed"); return 0; } return ++( *lineNum ) <= mNVisibleLines - 1; } else { position_to_line( buffer()->prev_char_clipped(mLastChar), lineNum ); return 1; } } return 0; } for ( i = mNVisibleLines - 1; i >= 0; i-- ) { if ( mLineStarts[ i ] != -1 && pos >= mLineStarts[ i ] ) { *lineNum = i; return 1; } } return 0; /* probably never be reached */ } /** Universal pixel machine. We use a single function that handles all line layout, measuring, and drawing \li draw a text range \li return the width of a text range in pixels \li return the index of a character that is at a pixel position \param[in] mode DRAW_LINE, GET_WIDTH, FIND_INDEX \param[in] lineStartPos index of first character \param[in] lineLen size of string in bytes \param[in] leftChar, rightChar \param[in] Y drawing position \param[in] bottomClip, leftClip, rightClip stop work when we reach the clipped area. rightClip is the X position that we search in FIND_INDEX. \retval DRAW_LINE index of last drawn character \retval GET_WIDTH width in pixels of text segment if we would draw it \retval FIND_INDEX index of character at given x position in window coordinates \retval FIND_INDEX_FROM_ZERO index of character at given x position without scrolling and widget offsets \todo we need to handle hidden hyphens and tabs here! \todo we handle all styles and selections \todo we must provide code to get pixel positions of the middle of a character as well */ int Fl_Text_Display_mod::handle_vline( int mode, int lineStartPos, int lineLen, int leftChar, int rightChar, int Y, int bottomClip, int leftClip, int rightClip) const { IS_UTF8_ALIGNED2(buffer(), lineStartPos) // FIXME: we need to allow two modes for FIND_INDEX: one on the edge of the // FIXME: character for selection, and one on the character center for cursors. int i, X, startX, startIndex, style, charStyle; char *lineStr; if ( lineStartPos == -1 ) { lineStr = NULL; } else { lineStr = mBuffer->text_range( lineStartPos, lineStartPos + lineLen ); } if (mode==GET_WIDTH) { X = 0; } else if (mode==FIND_INDEX_FROM_ZERO) { X = 0; mode = FIND_INDEX; } else { X = text_area.x - mHorizOffset; } startX = X; startIndex = 0; if (!lineStr) { // just clear the background if (mode==DRAW_LINE) { style = position_style(lineStartPos, lineLen, -1); draw_string( style|BG_ONLY_MASK, text_area.x, Y, text_area.x+text_area.w, lineStr, lineLen ); } if (mode==FIND_INDEX) { IS_UTF8_ALIGNED2(buffer(), lineStartPos) return lineStartPos; } return 0; } char currChar = 0, prevChar = 0; // draw the line style = position_style(lineStartPos, lineLen, 0); for (i=0; i<lineLen; ) { currChar = lineStr[i]; // one byte is enough to handele tabs and other cases int len = fl_utf8len1(currChar); if (len<=0) len = 1; // OUCH! charStyle = position_style(lineStartPos, lineLen, i); if (charStyle!=style || currChar=='\t' || prevChar=='\t') { // draw a segment whenever the style changes or a Tab is found int w = 0; if (prevChar=='\t') { // draw a single Tab space int tab = (int)col_to_x(mBuffer->tab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 ); if (mode==FIND_INDEX && startX+w>rightClip) { // find x pos inside block free(lineStr); return lineStartPos + startIndex; } } else { // draw a text segment w = int( string_width( lineStr+startIndex, i-startIndex, style ) ); if (mode==DRAW_LINE) draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex ); if (mode==FIND_INDEX && startX+w>rightClip) { // find x pos inside block int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di)) return lineStartPos + startIndex + di; } } style = charStyle; startX += w; startIndex = i; } i += len; prevChar = currChar; } int w = 0; if (currChar=='\t') { // draw a single Tab space int tab = (int)col_to_x(mBuffer->tab_distance()); int xAbs = (mode==GET_WIDTH) ? startX : startX+mHorizOffset-text_area.x; w = (((xAbs/tab)+1)*tab) - xAbs; if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, startX+w, 0, 0 ); if (mode==FIND_INDEX) { // find x pos inside block free(lineStr); return lineStartPos + startIndex + ( rightClip-startX>w ? 1 : 0 ); } } else { w = int( string_width( lineStr+startIndex, i-startIndex, style ) ); if (mode==DRAW_LINE) draw_string( style, startX, Y, startX+w, lineStr+startIndex, i-startIndex ); if (mode==FIND_INDEX) { // find x pos inside block int di = find_x(lineStr+startIndex, i-startIndex, style, rightClip-startX); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+startIndex+di)) return lineStartPos + startIndex + di; } } if (mode==GET_WIDTH) { free(lineStr); return startX+w; } // clear the rest of the line startX += w; style = position_style(lineStartPos, lineLen, i); if (mode==DRAW_LINE) draw_string( style|BG_ONLY_MASK, startX, Y, text_area.x+text_area.w, lineStr, lineLen ); free(lineStr); IS_UTF8_ALIGNED2(buffer(), (lineStartPos+lineLen)) return lineStartPos + lineLen; } /** \brief Find the index of the character that lies at the given x position. \param s UTF-8 text string \param len length of string \param style index into style lookup table \param x position in pixels \return index into buffer */ int Fl_Text_Display_mod::find_x(const char *s, int len, int style, int x) const { IS_UTF8_ALIGNED(s) // TODO: use binary search which may be quicker. int i = 0; while (i<len) { int cl = fl_utf8len1(s[i]); int w = int( string_width(s, i+cl, style) ); if (w>x) return i; i += cl; } return len; } /** \brief Draw a single line of text. Draw the text on a single line represented by \p visLineNum (the number of lines down from the top of the display), limited by \p leftClip and \p rightClip window coordinates and \p leftCharIndex and \p rightCharIndex character positions (not including the character at position \p rightCharIndex). \param visLineNum index of line in the visible line number lookup \param leftClip, rightClip pixel position of clipped area \param leftCharIndex, rightCharIndex index into line of segment that we want to draw */ void Fl_Text_Display_mod::draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex) { int Y, lineStartPos, lineLen, fontHeight; // printf("draw_vline(visLineNum=%d, leftClip=%d, rightClip=%d, leftCharIndex=%d, rightCharIndex=%d)\n", // visLineNum, leftClip, rightClip, leftCharIndex, rightCharIndex); // printf("nNVisibleLines=%d\n", mNVisibleLines); /* If line is not displayed, skip it */ if ( visLineNum < 0 || visLineNum >= mNVisibleLines ) return; /* Calculate Y coordinate of the string to draw */ fontHeight = mMaxsize; Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line to display */ lineStartPos = mLineStarts[ visLineNum ]; if ( lineStartPos == -1 ) { lineLen = 0; } else { lineLen = vline_length( visLineNum ); } /* Shrink the clipping range to the active display area */ leftClip = max( text_area.x, leftClip ); rightClip = min( rightClip, text_area.x + text_area.w ); handle_vline(DRAW_LINE, lineStartPos, lineLen, leftCharIndex, rightCharIndex, Y, Y+fontHeight, leftClip, rightClip); return; } /** \brief Draw a text segment in a single style. Draw a string or blank area according to parameter \p style, using the appropriate colors and drawing method for that style, with top left corner at \p X, \p Y. If style says to draw text, use \p string as source of characters, and draw \p nChars, if style is FILL, erase rectangle where text would have drawn from \p X to \p toX and from \p Y to the maximum y extent of the current font(s). \param style index into style lookup table \param X, Y drawing origin \param toX rightmost position if this is a fill operation \param string text if this is a drawing operation \param nChars number of characters to draw */ void Fl_Text_Display_mod::draw_string(int style, int X, int Y, int toX, const char *string, int nChars) const { IS_UTF8_ALIGNED(string) const Style_Table_Entry * styleRec; /* Draw blank area rather than text, if that was the request */ if ( style & FILL_MASK ) { if (style & TEXT_ONLY_MASK) return; clear_rect( style, X, Y, toX - X, mMaxsize ); return; } /* Set font, color, and gc depending on style. For normal text, GCs for normal drawing, or drawing within a Fl_Text_Selection or highlight are pre-allocated and pre-configured. For syntax highlighting, GCs are configured here, on the fly. */ Fl_Font font = textfont(); int fsize = textsize(); Fl_Color foreground; Fl_Color background; if ( style & STYLE_LOOKUP_MASK ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; styleRec = mStyleTable + si; font = styleRec->font; fsize = styleRec->size; if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.4f); } else if (style & HIGHLIGHT_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f); else background = fl_color_average(color(), selection_color(), 0.6f); } else background = color(); foreground = fl_contrast(styleRec->color, background); } else if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.4f); foreground = fl_contrast(textcolor(), background); } else if (style & HIGHLIGHT_MASK) { if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f); else background = fl_color_average(color(), selection_color(), 0.6f); foreground = fl_contrast(textcolor(), background); } else { foreground = textcolor(); background = color(); } if (!(style & TEXT_ONLY_MASK)) { fl_color( background ); fl_rectf( X, Y, toX - X, mMaxsize ); } if (!(style & BG_ONLY_MASK)) { fl_color( foreground ); fl_font( font, fsize ); #if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // makes sure antialiased ÄÖÜ do not leak on line above fl_push_clip(X, Y, toX - X, mMaxsize); #endif fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); #if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT fl_pop_clip(); #endif } // CET - FIXME /* If any space around the character remains unfilled (due to use of different sized fonts for highlighting), fill in above or below to erase previously drawn characters */ /* if (fs->ascent < mAscent) clear_rect( style, X, Y, toX - X, mAscent - fs->ascent); if (fs->descent < mDescent) clear_rect( style, X, Y + mAscent + fs->descent, toX - x, mDescent - fs->descent); */ /* Underline if style is secondary Fl_Text_Selection */ /* if (style & SECONDARY_MASK) XDrawLine(XtDisplay(mW), XtWindow(mW), gc, x, y + mAscent, toX - 1, Y + fs->ascent); */ } /** \brief Clear a rectangle with the appropriate background color for \p style. \param style index into style table \param X, Y, width, height size and position of background area */ void Fl_Text_Display_mod::clear_rect(int style, int X, int Y, int width, int height) const { /* A width of zero means "clear to end of window" to XClearArea */ if ( width == 0 ) return; if (style & PRIMARY_MASK) { if (Fl::focus()==(Fl_Widget*)this) { fl_color(selection_color()); } else { fl_color(fl_color_average(color(), selection_color(), 0.4f)); } } else if (style & HIGHLIGHT_MASK) { if (Fl::focus()==(Fl_Widget*)this) { fl_color(fl_color_average(color(), selection_color(), 0.5f)); } else { fl_color(fl_color_average(color(), selection_color(), 0.6f)); } } else { fl_color( color() ); } fl_rectf( X, Y, width, height ); } /** \brief Draw a cursor with top center at \p X, \p Y. \param X, Y cursor position in pixels */ void Fl_Text_Display_mod::draw_cursor( int X, int Y ) { typedef struct { int x1, y1, x2, y2; } Segment; Segment segs[ 5 ]; int left, right, cursorWidth, midY; // int fontWidth = mFontStruct->min_bounds.width, nSegs = 0; int fontWidth = TMPFONTWIDTH; // CET - FIXME int nSegs = 0; int fontHeight = mMaxsize; int bot = Y + fontHeight - 1; if ( X < text_area.x - 1 || X > text_area.x + text_area.w ) return; /* For cursors other than the block, make them around 2/3 of a character width, rounded to an even number of pixels so that X will draw an odd number centered on the stem at x. */ cursorWidth = 4; //(fontWidth/3) * 2; left = X - cursorWidth / 2; right = left + cursorWidth; /* Create segments and draw cursor */ if ( mCursorStyle == CARET_CURSOR ) { midY = bot - fontHeight / 5; segs[ 0 ].x1 = left; segs[ 0 ].y1 = bot; segs[ 0 ].x2 = X; segs[ 0 ].y2 = midY; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = midY - 1; segs[ 3 ].x1 = X; segs[ 3 ].y1 = midY - 1; segs[ 3 ].x2 = right; segs[ 3 ].y2 = bot; nSegs = 4; } else if ( mCursorStyle == NORMAL_CURSOR ) { segs[ 0 ].x1 = left; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = right; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == HEAVY_CURSOR ) { segs[ 0 ].x1 = X - 1; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X - 1; segs[ 0 ].y2 = bot; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = X + 1; segs[ 2 ].y1 = Y; segs[ 2 ].x2 = X + 1; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = left; segs[ 3 ].y1 = Y; segs[ 3 ].x2 = right; segs[ 3 ].y2 = Y; segs[ 4 ].x1 = left; segs[ 4 ].y1 = bot; segs[ 4 ].x2 = right; segs[ 4 ].y2 = bot; nSegs = 5; } else if ( mCursorStyle == DIM_CURSOR ) { midY = Y + fontHeight / 2; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = X; segs[ 1 ].y2 = midY; segs[ 2 ].x1 = X; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == BLOCK_CURSOR ) { right = X + fontWidth; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = right; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y; nSegs = 4; } fl_color( mCursor_color ); for ( int k = 0; k < nSegs; k++ ) { fl_line( segs[ k ].x1, segs[ k ].y1, segs[ k ].x2, segs[ k ].y2 ); } } /** \brief Find the correct style for a character. Determine the drawing method to use to draw a specific character from "buf". \p lineStartPos gives the character index where the line begins, \p lineIndex, the number of characters past the beginning of the line, and \p lineIndex the number of displayed characters past the beginning of the line. Passing \p lineStartPos of -1 returns the drawing style for "no text". Why not just: position_style(pos)? Because style applies to blank areas of the window beyond the text boundaries, and because this routine must also decide whether a position is inside of a rectangular Fl_Text_Selection, and do so efficiently, without re-counting character positions from the start of the line. Note that style is a somewhat incorrect name, drawing method would be more appropriate. \param lineStartPos beginning of this line \param lineLen number of bytes in line \param lineIndex position of character within line \return style for the given character */ int Fl_Text_Display_mod::position_style( int lineStartPos, int lineLen, int lineIndex) const { IS_UTF8_ALIGNED2(buffer(), lineStartPos) Fl_Text_Buffer_mod * buf = mBuffer; Fl_Text_Buffer_mod *styleBuf = mStyleBuffer; int pos, style = 0; if ( lineStartPos == -1 || buf == NULL ) return FILL_MASK; pos = lineStartPos + min( lineIndex, lineLen ); if ( lineIndex >= lineLen ) style = FILL_MASK; else if ( styleBuf != NULL ) { style = ( unsigned char ) styleBuf->byte_at( pos ); if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)( pos, mHighlightCBArg); style = (unsigned char) styleBuf->byte_at( pos); } } if (buf->primary_selection()->includes(pos)) style |= PRIMARY_MASK; if (buf->highlight_selection()->includes(pos)) style |= HIGHLIGHT_MASK; if (buf->secondary_selection()->includes(pos)) style |= SECONDARY_MASK; return style; } /** \brief Find the width of a string in the font of a particular style. \param string the text \param length number of bytes in string \param style index into style table \return width of text segment in pixels */ double Fl_Text_Display_mod::string_width( const char *string, int length, int style ) const { IS_UTF8_ALIGNED(string) Fl_Font font; Fl_Fontsize fsize; if ( mNStyles && (style & STYLE_LOOKUP_MASK) ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; font = mStyleTable[si].font; fsize = mStyleTable[si].size; } else { font = textfont(); fsize = textsize(); } fl_font( font, fsize ); return fl_width( string, length ); } /** \brief Translate a pixel position into a character index. Translate window coordinates to the nearest (insert cursor or character cell) text position. The parameter \p posType specifies how to interpret the position: CURSOR_POS means translate the coordinates to the nearest cursor position, and CHARACTER_POS means return the position of the character closest to (\p X, \p Y). \param X, Y pixel position \param posType CURSOR_POS or CHARACTER_POS \return index into text buffer */ int Fl_Text_Display_mod::xy_to_position( int X, int Y, int posType ) const { int lineStart, lineLen, fontHeight; int visLineNum; /* Find the visible line number corresponding to the Y coordinate */ fontHeight = mMaxsize; visLineNum = ( Y - text_area.y ) / fontHeight; if ( visLineNum < 0 ) return mFirstChar; if ( visLineNum >= mNVisibleLines ) visLineNum = mNVisibleLines - 1; /* Find the position at the start of the line */ lineStart = mLineStarts[ visLineNum ]; /* If the line start was empty, return the last position in the buffer */ if ( lineStart == -1 ) return mBuffer->length(); /* Get the line text and its length */ lineLen = vline_length( visLineNum ); return handle_vline(FIND_INDEX, lineStart, lineLen, 0, 0, 0, 0, text_area.x, X); } /** \brief Translate pixel coordinates into row and column. Translate window coordinates to the nearest row and column number for positioning the cursor. This, of course, makes no sense when the font is proportional, since there are no absolute columns. The parameter posType specifies how to interpret the position: CURSOR_POS means translate the coordinates to the nearest position between characters, and CHARACTER_POS means translate the position to the nearest character cell. \param X, Y pixel coordinates \param[out] row, column neares row and column \param posType CURSOR_POS or CHARACTER_POS */ void Fl_Text_Display_mod::xy_to_rowcol( int X, int Y, int *row, int *column, int posType ) const { int fontHeight = mMaxsize; int fontWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Find the visible line number corresponding to the Y coordinate */ *row = ( Y - text_area.y ) / fontHeight; if ( *row < 0 ) *row = 0; if ( *row >= mNVisibleLines ) *row = mNVisibleLines - 1; *column = ( ( X - text_area.x ) + mHorizOffset + ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth; if ( *column < 0 ) * column = 0; } /** \brief Offset line start counters for a new vertical scroll position. Offset the line starts array, mTopLineNum, mFirstChar and lastChar, for a new vertical scroll position given by newTopLineNum. If any currently displayed lines will still be visible, salvage the line starts values, otherwise, count lines from the nearest known line start (start or end of buffer, or the closest value in the mLineStarts array) \param newTopLineNum index into buffer */ void Fl_Text_Display_mod::offset_line_starts( int newTopLineNum ) { int oldTopLineNum = mTopLineNum; int oldFirstChar = mFirstChar; int lineDelta = newTopLineNum - oldTopLineNum; int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int i, lastLineNum; Fl_Text_Buffer_mod *buf = mBuffer; /* If there was no offset, nothing needs to be changed */ if ( lineDelta == 0 ) return; /* Find the new value for mFirstChar by counting lines from the nearest known line start (start or end of buffer, or the closest value in the lineStarts array) */ lastLineNum = oldTopLineNum + nVisLines - 1; if ( newTopLineNum < oldTopLineNum && newTopLineNum < -lineDelta ) { mFirstChar = skip_lines( 0, newTopLineNum - 1, true ); } else if ( newTopLineNum < oldTopLineNum ) { mFirstChar = rewind_lines( mFirstChar, -lineDelta ); } else if ( newTopLineNum < lastLineNum ) { mFirstChar = lineStarts[ newTopLineNum - oldTopLineNum ]; } else if ( newTopLineNum - lastLineNum < mNBufferLines - newTopLineNum ) { mFirstChar = skip_lines( lineStarts[ nVisLines - 1 ], newTopLineNum - lastLineNum, true ); } else { mFirstChar = rewind_lines( buf->length(), mNBufferLines - newTopLineNum + 1 ); } /* Fill in the line starts array */ if ( lineDelta < 0 && -lineDelta < nVisLines ) { for ( i = nVisLines - 1; i >= -lineDelta; i-- ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( 0, -lineDelta ); } else if ( lineDelta > 0 && lineDelta < nVisLines ) { for ( i = 0; i < nVisLines - lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( nVisLines - lineDelta, nVisLines - 1 ); } else calc_line_starts( 0, nVisLines ); /* Set lastChar and mTopLineNum */ calc_last_char(); mTopLineNum = newTopLineNum; /* If we're numbering lines or being asked to maintain an absolute line number, re-calculate the absolute line number */ absolute_top_line_number(oldFirstChar); } /** \brief Update line start arrays and variables. Update the line starts array, mTopLineNum, mFirstChar and lastChar for this text display after a modification to the text buffer, given by the position \p pos where the change began, and the numbers of characters and lines inserted and deleted. \param pos index into buffer of recent changes \param charsInserted number of bytes(!) inserted \param charsDeleted number of bytes(!) deleted \param linesInserted number of lines \param linesDeleted number of lines \param[out] scrolled set to 1 if the text display needs to be scrolled */ void Fl_Text_Display_mod::update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled ) { IS_UTF8_ALIGNED2(buffer(), pos) int *lineStarts = mLineStarts; int i, lineOfPos, lineOfEnd, nVisLines = mNVisibleLines; int charDelta = charsInserted - charsDeleted; int lineDelta = linesInserted - linesDeleted; /* If all of the changes were before the displayed text, the display doesn't change, just update the top line num and offset the line start entries and first and last characters */ if ( pos + charsDeleted < mFirstChar ) { mTopLineNum += lineDelta; for ( i = 0; i < nVisLines && lineStarts[i] != -1; i++ ) lineStarts[ i ] += charDelta; mFirstChar += charDelta; mLastChar += charDelta; *scrolled = 0; return; } /* The change began before the beginning of the displayed text, but part or all of the displayed text was deleted */ if ( pos < mFirstChar ) { /* If some text remains in the window, anchor on that */ if ( position_to_line( pos + charsDeleted, &lineOfEnd ) && ++lineOfEnd < nVisLines && lineStarts[ lineOfEnd ] != -1 ) { mTopLineNum = max( 1, mTopLineNum + lineDelta ); mFirstChar = rewind_lines(lineStarts[ lineOfEnd ] + charDelta, lineOfEnd ); /* Otherwise anchor on original line number and recount everything */ } else { if ( mTopLineNum > mNBufferLines + lineDelta ) { mTopLineNum = 1; mFirstChar = 0; } else mFirstChar = skip_lines( 0, mTopLineNum - 1, true ); } calc_line_starts( 0, nVisLines - 1 ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 1; return; } /* If the change was in the middle of the displayed text (it usually is), salvage as much of the line starts array as possible by moving and offsetting the entries after the changed area, and re-counting the added lines or the lines beyond the salvaged part of the line starts array */ if ( pos <= mLastChar ) { /* find line on which the change began */ position_to_line( pos, &lineOfPos ); /* salvage line starts after the changed area */ if ( lineDelta == 0 ) { for ( i = lineOfPos + 1; i < nVisLines && lineStarts[ i ] != -1; i++ ) lineStarts[ i ] += charDelta; } else if ( lineDelta > 0 ) { for ( i = nVisLines - 1; i >= lineOfPos + lineDelta + 1; i-- ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } else /* (lineDelta < 0) */ { for ( i = max( 0, lineOfPos + 1 ); i < nVisLines + lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } /* fill in the missing line starts */ if ( linesInserted >= 0 ) calc_line_starts( lineOfPos + 1, lineOfPos + linesInserted ); if ( lineDelta < 0 ) calc_line_starts( nVisLines + lineDelta, nVisLines ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 0; return; } /* Change was past the end of the displayed text, but displayable by virtue of being an insert at the end of the buffer into visible blank lines */ if ( empty_vlines() ) { position_to_line( pos, &lineOfPos ); calc_line_starts( lineOfPos, lineOfPos + linesInserted ); calc_last_char(); *scrolled = 0; return; } /* Change was beyond the end of the buffer and not visible, do nothing */ *scrolled = 0; } /** \brief Update the line start arrays. Scan through the text in the "textD"'s buffer and recalculate the line starts array values beginning at index "startLine" and continuing through (including) "endLine". It assumes that the line starts entry preceding "startLine" (or mFirstChar if startLine is 0) is good, and re-counts newlines to fill in the requested entries. Out of range values for "startLine" and "endLine" are acceptable. \param startLine, endLine range of lines to scan as line numbers */ void Fl_Text_Display_mod::calc_line_starts( int startLine, int endLine ) { int startPos, bufLen = mBuffer->length(); int line, lineEnd, nextLineStart, nVis = mNVisibleLines; int *lineStarts = mLineStarts; /* Clean up (possibly) messy input parameters */ if ( endLine < 0 ) endLine = 0; if ( endLine >= nVis ) endLine = nVis - 1; if ( startLine < 0 ) startLine = 0; if ( startLine >= nVis ) startLine = nVis - 1; if ( startLine > endLine ) return; /* Find the last known good line number -> position mapping */ if ( startLine == 0 ) { lineStarts[ 0 ] = mFirstChar; startLine = 1; } startPos = lineStarts[ startLine - 1 ]; /* If the starting position is already past the end of the text, fill in -1's (means no text on line) and return */ if ( startPos == -1 ) { for ( line = startLine; line <= endLine; line++ ) lineStarts[ line ] = -1; return; } /* Loop searching for ends of lines and storing the positions of the start of the next line in lineStarts */ for ( line = startLine; line <= endLine; line++ ) { find_line_end(startPos, true, &lineEnd, &nextLineStart); startPos = nextLineStart; if ( startPos >= bufLen ) { /* If the buffer ends with a newline or line break, put buf->length() in the next line start position (instead of a -1 which is the normal marker for an empty line) to indicate that the cursor may safely be displayed there */ if ( line == 0 || ( lineStarts[ line - 1 ] != bufLen && lineEnd != nextLineStart ) ) { lineStarts[ line ] = bufLen; line++; } break; } lineStarts[ line ] = startPos; } /* Set any entries beyond the end of the text to -1 */ for ( ; line <= endLine; line++ ) lineStarts[ line ] = -1; } /** \brief Update last display character index. Given a Fl_Text_Display_mod with a complete, up-to-date lineStarts array, update the lastChar entry to point to the last buffer position displayed. */ void Fl_Text_Display_mod::calc_last_char() { int i; for (i = mNVisibleLines - 1; i >= 0 && mLineStarts[i] == -1; i--) ; mLastChar = i < 0 ? 0 : line_end(mLineStarts[i], true); } /** \brief Scrolls the current buffer to start at the specified line and column. \param topLineNum top line number \param horizOffset column number \todo Column numbers make little sense here. */ void Fl_Text_Display_mod::scroll(int topLineNum, int horizOffset) { mTopLineNumHint = topLineNum; mHorizOffsetHint = horizOffset; resize(x(), y(), w(), h()); } /** \brief Scrolls the current buffer to start at the specified line and column. \param topLineNum top line number \param horizOffset in pixels \return 0 if nothing changed, 1 if we scrolled */ int Fl_Text_Display_mod::scroll_(int topLineNum, int horizOffset) { /* Limit the requested scroll position to allowable values */ if (topLineNum > mNBufferLines + 3 - mNVisibleLines) topLineNum = mNBufferLines + 3 - mNVisibleLines; if (topLineNum < 1) topLineNum = 1; if (horizOffset > longest_vline() - text_area.w) horizOffset = longest_vline() - text_area.w; if (horizOffset < 0) horizOffset = 0; /* Do nothing if scroll position hasn't actually changed or there's no window to draw in yet */ if (mHorizOffset == horizOffset && mTopLineNum == topLineNum) return 0; /* If the vertical scroll position has changed, update the line starts array and related counters in the text display */ offset_line_starts(topLineNum); /* Just setting mHorizOffset is enough information for redisplay */ mHorizOffset = horizOffset; // redraw all text damage(FL_DAMAGE_EXPOSE); return 1; } /** \brief Update vertical scrollbar. Update the minimum, maximum, slider size, page increment, and value for vertical scrollbar. */ void Fl_Text_Display_mod::update_v_scrollbar() { /* The vertical scrollbar value and slider size directly represent the top line number, and the number of visible lines respectively. The scroll bar maximum value is chosen to generally represent the size of the whole buffer, with minor adjustments to keep the scrollbar widget happy */ #ifdef DEBUG printf("Fl_Text_Display_mod::update_v_scrollbar():\n" " mTopLineNum=%d, mNVisibleLines=%d, mNBufferLines=%d\n", mTopLineNum, mNVisibleLines, mNBufferLines); #endif // DEBUG mVScrollBar->value(mTopLineNum, mNVisibleLines, 1, mNBufferLines + 2); mVScrollBar->linesize(3); } /** \brief Update vertical scrollbar. Update the minimum, maximum, slider size, page increment, and value for the horizontal scrollbar. */ void Fl_Text_Display_mod::update_h_scrollbar() { int sliderMax = max(longest_vline(), text_area.w + mHorizOffset); mHScrollBar->value( mHorizOffset, text_area.w, 0, sliderMax ); } /** \brief Callbacks for drag or valueChanged on scrollbars. */ void Fl_Text_Display_mod::v_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mTopLineNum) return; textD->scroll(b->value(), textD->mHorizOffset); } /** \brief Callbacks for drag or valueChanged on scrollbars. */ void Fl_Text_Display_mod::h_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mHorizOffset) return; textD->scroll(textD->mTopLineNum, b->value()); } /** \brief Refresh the line number area. If clearAll is False, writes only over the character cell areas. Setting clearAll to True will clear out any stray marks outside of the character cell area, which might have been left from before a resize or font change. This function is not used. */ void Fl_Text_Display_mod::draw_line_numbers(bool /*clearAll*/) { #if 0 int y, line, visLine, nCols, lineStart; char lineNumString[12]; int lineHeight = mMaxsize ? mMaxsize : textsize_; int charWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is not yet realized */ if (mLineNumWidth == 0 || visible_r()) return; /* GC is allocated on demand, since not everyone will use line numbering */ if (textD->lineNumGC == NULL) { XGCValues values; values.foreground = textD->lineNumFGPixel; values.background = textD->bgPixel; values.font = textD->fontStruct->fid; textD->lineNumGC = XtGetGC(textD->w, GCFont| GCForeground | GCBackground, &values); } /* Erase the previous contents of the line number area, if requested */ if (clearAll) XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, textD->top, textD->lineNumWidth, textD->height, False); /* Draw the line numbers, aligned to the text */ nCols = min(11, textD->lineNumWidth / charWidth); y = textD->top; line = getAbsTopLineNum(textD); for (visLine=0; visLine < textD->nVisibleLines; visLine++) { lineStart = textD->lineStarts[visLine]; if (lineStart != -1 && (lineStart==0 || BufGetCharacter(textD->buffer, lineStart-1)=='\n')) { sprintf(lineNumString, "%*d", nCols, line); XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumGC, textD->lineNumLeft, y + textD->ascent, lineNumString, strlen(lineNumString)); line++; } else { XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, y, textD->lineNumWidth, textD->ascent + textD->descent, False); if (visLine == 0) line++; } y += lineHeight; } #endif } static int max( int i1, int i2 ) { return i1 >= i2 ? i1 : i2; } static int min( int i1, int i2 ) { return i1 <= i2 ? i1 : i2; } /** Count the number of newlines in a null-terminated text string; */ static int countlines( const char *string ) { IS_UTF8_ALIGNED(string) const char * c; int lineCount = 0; if (!string) return 0; for ( c = string; *c != '\0'; c++ ) if ( *c == '\n' ) lineCount++; return lineCount; } /** \brief Returns the width in pixels of the displayed line pointed to by "visLineNum". \param visLineNum index into visible lines array \return width of line in pixels */ int Fl_Text_Display_mod::measure_vline( int visLineNum ) const { int lineLen = vline_length( visLineNum ); int lineStartPos = mLineStarts[ visLineNum ]; if (lineStartPos < 0 || lineLen == 0) return 0; return handle_vline(GET_WIDTH, lineStartPos, lineLen, 0, 0, 0, 0, 0, 0); } /** \brief Return true if there are lines visible with no corresponding buffer text. \return 1 if there are empty lines */ int Fl_Text_Display_mod::empty_vlines() const { return (mNVisibleLines > 0) && (mLineStarts[ mNVisibleLines - 1 ] == -1); } /** \brief Count number of bytes in a visible line. Return the length of a line (number of bytes) by examining entries in the line starts array rather than by scanning for newlines. \param visLineNum index of line in visible line array \return number of bytes in this line */ int Fl_Text_Display_mod::vline_length( int visLineNum ) const { int nextLineStart, lineStartPos; if (visLineNum < 0 || visLineNum >= mNVisibleLines) return (0); lineStartPos = mLineStarts[ visLineNum ]; if ( lineStartPos == -1 ) return 0; if ( visLineNum + 1 >= mNVisibleLines ) return mLastChar - lineStartPos; nextLineStart = mLineStarts[ visLineNum + 1 ]; if ( nextLineStart == -1 ) return mLastChar - lineStartPos; int nextLineStartMinus1 = buffer()->prev_char(nextLineStart); if (wrap_uses_character(nextLineStartMinus1)) return nextLineStartMinus1 - lineStartPos; return nextLineStart - lineStartPos; } /** \brief Wrapping calculations. When continuous wrap is on, and the user inserts or deletes characters, wrapping can happen before and beyond the changed position. This routine finds the extent of the changes, and counts the deleted and inserted lines over that range. It also attempts to minimize the size of the range to what has to be counted and re-displayed, so the results can be useful both for delimiting where the line starts need to be recalculated, and for deciding what part of the text to redisplay. \param deletedText \param pos \param nInserted \param nDeleted \param modRangeStart \param modRangeEnd \param linesInserted \param linesDeleted */ void Fl_Text_Display_mod::find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted) { IS_UTF8_ALIGNED(deletedText) IS_UTF8_ALIGNED2(buffer(), pos) int length, retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod *deletedTextBuf, *buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, countTo, lineStart, adjLineStart, i; int visLineNum = 0, nLines = 0; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) { if (lineStarts[i] != -1 && pos >= lineStarts[i]) { break; } } if (i > 0) { countFrom = lineStarts[i-1]; visLineNum = i-1; } else { countFrom = buf->line_start(pos); } } else { countFrom = buf->line_start(pos); } IS_UTF8_ALIGNED2(buf, countFrom) /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; *modRangeStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { countTo = buf->length(); *modRangeEnd = countTo; if (retPos != retLineEnd) nLines++; break; } else { lineStart = retPos; } nLines++; if (lineStart > pos + nInserted && buf->char_at(buf->prev_char(lineStart)) == '\n') { countTo = lineStart; *modRangeEnd = lineStart; break; } /* Don't try to resync in continuous wrap mode with non-fixed font sizes; it would result in a chicken-and-egg dependency between the calculations for the inserted and the deleted lines. If we're in that mode, the number of deleted lines is calculated in advance, without resynchronization, so we shouldn't resynchronize for the inserted lines either. */ if (mSuppressResync) continue; /* check for synchronization with the original line starts array before pos, if so, the modified range can begin later */ if (lineStart <= pos) { while (visLineNum<nVisLines && lineStarts[visLineNum] < lineStart) visLineNum++; if (visLineNum < nVisLines && lineStarts[visLineNum] == lineStart) { countFrom = lineStart; nLines = 0; if (visLineNum+1 < nVisLines && lineStarts[visLineNum+1] != -1) *modRangeStart = min(pos, buf->prev_char(lineStarts[visLineNum+1])); else *modRangeStart = countFrom; } else *modRangeStart = min(*modRangeStart, buf->prev_char(lineStart)); } /* check for synchronization with the original line starts array after pos, if so, the modified range can end early */ else if (lineStart > pos + nInserted) { adjLineStart = lineStart - nInserted + nDeleted; while (visLineNum<nVisLines && lineStarts[visLineNum]<adjLineStart) visLineNum++; if (visLineNum < nVisLines && lineStarts[visLineNum] != -1 && lineStarts[visLineNum] == adjLineStart) { countTo = line_end(lineStart, true); *modRangeEnd = lineStart; break; } } } *linesInserted = nLines; /* Count deleted lines between countFrom and countTo as the text existed before the modification (that is, as if the text between pos and pos+nInserted were replaced by "deletedText"). This extra context is necessary because wrapping can occur outside of the modified region as a result of adding or deleting text in the region. This is done by creating a textBuffer containing the deleted text and the necessary additional context, and calling the wrappedLineCounter on it. NOTE: This must not be done in continuous wrap mode when the font width is not fixed. In that case, the calculation would try to access style information that is no longer available (deleted text), or out of date (updated highlighting), possibly leading to completely wrong calculations and/or even crashes eventually. (This is not theoretical; it really happened.) In that case, the calculation of the number of deleted lines has happened before the buffer was modified (only in that case, because resynchronization of the line starts is impossible in that case, which makes the whole calculation less efficient). */ if (mSuppressResync) { *linesDeleted = mNLinesDeleted; mSuppressResync = 0; return; } length = (pos-countFrom) + nDeleted +(countTo-(pos+nInserted)); deletedTextBuf = new Fl_Text_Buffer_mod(length); deletedTextBuf->copy(buffer(), countFrom, pos, 0); if (nDeleted != 0) deletedTextBuf->insert(pos-countFrom, deletedText); deletedTextBuf->copy(buffer(), pos+nInserted, countTo, pos-countFrom+nDeleted); /* Note that we need to take into account an offset for the style buffer: the deletedTextBuf can be out of sync with the style buffer. */ wrapped_line_counter(deletedTextBuf, 0, length, INT_MAX, true, countFrom, &retPos, &retLines, &retLineStart, &retLineEnd, false); delete deletedTextBuf; *linesDeleted = retLines; mSuppressResync = 0; } /** \brief Wrapping calculations. This is a stripped-down version of the findWrapRange() function above, intended to be used to calculate the number of "deleted" lines during a buffer modification. It is called _before_ the modification takes place. This function should only be called in continuous wrap mode with a non-fixed font width. In that case, it is impossible to calculate the number of deleted lines, because the necessary style information is no longer available _after_ the modification. In other cases, we can still perform the calculation afterwards (possibly even more efficiently). \param pos \param nDeleted */ void Fl_Text_Display_mod::measure_deleted_lines(int pos, int nDeleted) { IS_UTF8_ALIGNED2(buffer(), pos) int retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod *buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, lineStart; int visLineNum = 0, nLines = 0, i; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) if (lineStarts[i] != -1 && pos >= lineStarts[i]) break; if (i > 0) { countFrom = lineStarts[i-1]; visLineNum = i-1; } else countFrom = buf->line_start(pos); } else countFrom = buf->line_start(pos); /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { if (retPos != retLineEnd) nLines++; break; } else lineStart = retPos; nLines++; if (lineStart > pos + nDeleted && buf->char_at(lineStart-1) == '\n') { break; } /* Unlike in the findWrapRange() function above, we don't try to resync with the line starts, because we don't know the length of the inserted text yet, nor the updated style information. Because of that, we also shouldn't resync with the line starts after the modification either, because we must perform the calculations for the deleted and inserted lines in the same way. This can result in some unnecessary recalculation and redrawing overhead, and therefore we should only use this two-phase mode of calculation when it's really needed (continuous wrap + variable font width). */ } mNLinesDeleted = nLines; mSuppressResync = 1; } /** \brief Wrapping calculations. Count forward from startPos to either maxPos or maxLines (whichever is reached first), and return all relevant positions and line count. The provided textBuffer may differ from the actual text buffer of the widget. In that case it must be a (partial) copy of the actual text buffer and the styleBufOffset argument must indicate the starting position of the copy, to take into account the correct style information. \param buf \param startPos \param maxPos \param maxLines \param startPosIsLineStart \param styleBufOffset \param[out] retPos Position where counting ended. When counting lines, the position returned is the start of the line "maxLines" lines beyond "startPos". \param[out] retLines Number of line breaks counted \param[out] retLineStart Start of the line where counting ended \param[out] retLineEnd End position of the last line traversed \param[out] countLastLineMissingNewLine */ void Fl_Text_Display_mod::wrapped_line_counter(Fl_Text_Buffer_mod *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine) const { IS_UTF8_ALIGNED2(buf, startPos) IS_UTF8_ALIGNED2(buf, maxPos) int lineStart, newLineStart = 0, b, p, colNum, wrapMarginPix; int i, foundBreak; double width; int nLines = 0; unsigned int c; /* Set the wrap margin to the wrap column or the view width */ if (mWrapMarginPix != 0) { wrapMarginPix = mWrapMarginPix; } else { wrapMarginPix = text_area.w; } /* Find the start of the line if the start pos is not marked as a line start. */ if (startPosIsLineStart) lineStart = startPos; else lineStart = line_start(startPos); /* ** Loop until position exceeds maxPos or line count exceeds maxLines. ** (actually, continues beyond maxPos to end of line containing maxPos, ** in case later characters cause a word wrap back before maxPos) */ colNum = 0; width = 0; for (p=lineStart; p<buf->length(); p=buf->next_char(p)) { c = buf->char_at(p); // UCS-4 /* If the character was a newline, count the line and start over, otherwise, add it to the width and column counts */ if (c == '\n') { if (p >= maxPos) { *retPos = maxPos; *retLines = nLines; *retLineStart = lineStart; *retLineEnd = maxPos; return; } nLines++; int p1 = buf->next_char(p); if (nLines >= maxLines) { *retPos = p1; *retLines = nLines; *retLineStart = p1; *retLineEnd = p; return; } lineStart = p1; colNum = 0; width = 0; } else { const char *s = buf->address(p); colNum++; // FIXME: it is not a good idea to simply add character widths because on // some platforms, the width is a floating point value and depends on the // previous character as well. width += measure_proportional_character(s, (int)width, p+styleBufOffset); } /* If character exceeded wrap margin, find the break point and wrap there */ if (width > wrapMarginPix) { foundBreak = false; for (b=p; b>=lineStart; b=buf->prev_char(b)) { c = buf->char_at(b); if (c == '\t' || c == ' ') { newLineStart = buf->next_char(b); colNum = 0; width = 0; int iMax = buf->next_char(p); for (i=buf->next_char(b); i<iMax; i = buf->next_char(i)) { width += measure_proportional_character(buf->address(i), (int)width, i+styleBufOffset); colNum++; } foundBreak = true; break; } } if (!foundBreak) { /* no whitespace, just break at margin */ newLineStart = max(p, buf->next_char(lineStart)); const char *s = buf->address(b); colNum++; width = measure_proportional_character(s, 0, p+styleBufOffset); } if (p >= maxPos) { *retPos = maxPos; *retLines = maxPos < newLineStart ? nLines : nLines + 1; *retLineStart = maxPos < newLineStart ? lineStart : newLineStart; *retLineEnd = maxPos; return; } nLines++; if (nLines >= maxLines) { *retPos = foundBreak ? buf->next_char(b) : max(p, buf->next_char(lineStart)); *retLines = nLines; *retLineStart = lineStart; *retLineEnd = foundBreak ? b : p; return; } lineStart = newLineStart; } } /* reached end of buffer before reaching pos or line target */ *retPos = buf->length(); *retLines = nLines; if (countLastLineMissingNewLine && colNum > 0) *retLines = buf->next_char(*retLines); *retLineStart = lineStart; *retLineEnd = buf->length(); } /** \brief Wrapping calculations. Measure the width in pixels of the first character of string "s" at a particular column "colNum" and buffer position "pos". This is for measuring characters in proportional or mixed-width highlighting fonts. A note about proportional and mixed-width fonts: the mixed width and proportional font code in nedit does not get much use in general editing, because nedit doesn't allow per-language-mode fonts, and editing programs in a proportional font is usually a bad idea, so very few users would choose a proportional font as a default. There are still probably mixed- width syntax highlighting cases where things don't redraw properly for insertion/deletion, though static display and wrapping and resizing should now be solid because they are now used for online help display. \param s text string \param xPix x pixel position needed for calculating tab widths \param pos offset within string \return width of character in pixels */ double Fl_Text_Display_mod::measure_proportional_character(const char *s, int xPix, int pos) const { IS_UTF8_ALIGNED(s) if (*s=='\t') { int tab = (int)col_to_x(mBuffer->tab_distance()); return (((xPix/tab)+1)*tab) - xPix; } int charLen = fl_utf8len1(*s), style = 0; if (mStyleBuffer) { style = mStyleBuffer->byte_at(pos); } return string_width(s, charLen, style); } /** \brief Finds both the end of the current line and the start of the next line. Why? In continuous wrap mode, if you need to know both, figuring out one from the other can be expensive or error prone. The problem comes when there's a trailing space or tab just before the end of the buffer. To translate an end of line value to or from the next lines start value, you need to know whether the trailing space or tab is being used as a line break or just a normal character, and to find that out would otherwise require counting all the way back to the beginning of the line. \param startPos \param startPosIsLineStart \param[out] lineEnd \param[out] nextLineStart */ void Fl_Text_Display_mod::find_line_end(int startPos, bool startPosIsLineStart, int *lineEnd, int *nextLineStart) const { IS_UTF8_ALIGNED2(buffer(), startPos) int retLines, retLineStart; /* if we're not wrapping use more efficient BufEndOfLine */ if (mFastDisplay || !mContinuousWrap) { int le = buffer()->line_end(startPos); int ls = buffer()->next_char(le); *lineEnd = le; *nextLineStart = min(buffer()->length(), ls); return; } /* use the wrapped line counter routine to count forward one line */ wrapped_line_counter(buffer(), startPos, buffer()->length(), 1, startPosIsLineStart, 0, nextLineStart, &retLines, &retLineStart, lineEnd); } /** \brief Check if the line break is caused by a \\n or by line wrapping. Line breaks in continuous wrap mode usually happen at newlines or whitespace. This line-terminating character is not included in line width measurements and has a special status as a non-visible character. However, lines with no whitespace are wrapped without the benefit of a line terminating character, and this distinction causes endless trouble with all of the text display code which was originally written without continuous wrap mode and always expects to wrap at a newline character. Given the position of the end of the line, as returned by TextDEndOfLine or BufEndOfLine, this returns true if there is a line terminating character, and false if there's not. On the last character in the buffer, this function can't tell for certain whether a trailing space was used as a wrap point, and just guesses that it wasn't. So if an exact accounting is necessary, don't use this function. \param lineEndPos index of character where the line wraps \return 1 if a \\n character causes the line wrap */ int Fl_Text_Display_mod::wrap_uses_character(int lineEndPos) const { IS_UTF8_ALIGNED2(buffer(), lineEndPos) unsigned int c; if (mFastDisplay || !mContinuousWrap || lineEndPos == buffer()->length()) return 1; c = buffer()->char_at(lineEndPos); return c == '\n' || ((c == '\t' || c == ' ') && lineEndPos + 1 < buffer()->length()); } /** \brief I don't know what this does! Extend the range of a redraw request (from *start to *end) with additional redraw requests resulting from changes to the attached style buffer (which contains auxiliary information for coloring or styling text). \param startpos ?? \param endpos ?? \todo Unicode? */ void Fl_Text_Display_mod::extend_range_for_styles( int *startpos, int *endpos ) { IS_UTF8_ALIGNED2(buffer(), (*startpos)) IS_UTF8_ALIGNED2(buffer(), (*endpos)) Fl_Text_Selection_mod * sel = mStyleBuffer->primary_selection(); int extended = 0; /* The peculiar protocol used here is that modifications to the style buffer are marked by selecting them with the buffer's primary Fl_Text_Selection. The style buffer is usually modified in response to a modify callback on the text buffer BEFORE Fl_Text_Display_mod.c's modify callback, so that it can keep the style buffer in step with the text buffer. The style-update callback can't just call for a redraw, because Fl_Text_Display_mod hasn't processed the original text changes yet. Anyhow, to minimize redrawing and to avoid the complexity of scheduling redraws later, this simple protocol tells the text display's buffer modify callback to extend its redraw range to show the text color/and font changes as well. */ if ( sel->selected() ) { if ( sel->start() < *startpos ) { *startpos = sel->start(); // somewhere while deleting, alignment is lost. We do this just to be sure. *startpos = buffer()->utf8_align(*startpos); IS_UTF8_ALIGNED2(buffer(), (*startpos)) extended = 1; } if ( sel->end() > *endpos ) { *endpos = sel->end(); *endpos = buffer()->utf8_align(*endpos); IS_UTF8_ALIGNED2(buffer(), (*endpos)) extended = 1; } } /* If the Fl_Text_Selection was extended due to a style change, and some of the fonts don't match in spacing, extend redraw area to end of line to redraw characters exposed by possible font size changes */ if ( extended ) *endpos = mBuffer->line_end( *endpos ) + 1; IS_UTF8_ALIGNED2(buffer(), (*endpos)) } /** \brief Draw the widget. This function tries to limit drawing to smaller areas if possible. */ void Fl_Text_Display_mod::draw(void) { // don't even try if there is no associated text buffer! if (!buffer()) { draw_box(); return; } fl_push_clip(x(),y(),w(),h()); // prevent drawing outside widget area // draw the non-text, non-scrollbar areas. if (damage() & FL_DAMAGE_ALL) { // printf("drawing all (box = %d)\n", box()); if (Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id) { // if to printer, draw the background fl_rectf(text_area.x, text_area.y, text_area.w, text_area.h, color() ); } // draw the box() int W = w(), H = h(); draw_box(box(), x(), y(), W, H, color()); if (mHScrollBar->visible()) W -= scrollbar_width(); if (mVScrollBar->visible()) H -= scrollbar_width(); // left margin fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN, LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // right margin fl_rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN, RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // top margin fl_rectf(text_area.x, text_area.y-TOP_MARGIN, text_area.w, TOP_MARGIN, color()); // bottom margin fl_rectf(text_area.x, text_area.y+text_area.h, text_area.w, BOTTOM_MARGIN, color()); // draw that little box in the corner of the scrollbars if (mVScrollBar->visible() && mHScrollBar->visible()) fl_rectf(mVScrollBar->x(), mHScrollBar->y(), mVScrollBar->w(), mHScrollBar->h(), FL_GRAY); // blank the previous cursor protrusions } else if (damage() & (FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)) { // printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY); // CET - FIXME - save old cursor position instead and just draw side needed? fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); fl_rectf(text_area.x-LEFT_MARGIN, mCursorOldY, LEFT_MARGIN, mMaxsize, color()); fl_rectf(text_area.x+text_area.w, mCursorOldY, RIGHT_MARGIN, mMaxsize, color()); fl_pop_clip(); } // draw the scrollbars if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_CHILD)) { mVScrollBar->damage(FL_DAMAGE_ALL); mHScrollBar->damage(FL_DAMAGE_ALL); } update_child(*mVScrollBar); update_child(*mHScrollBar); // draw all of the text if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_EXPOSE)) { //printf("drawing all text\n"); int X, Y, W, H; if (fl_clip_box(text_area.x, text_area.y, text_area.w, text_area.h, X, Y, W, H)) { // Draw text using the intersected clipping box... // (this sets the clipping internally) draw_text(X, Y, W, H); } else { // Draw the whole area... draw_text(text_area.x, text_area.y, text_area.w, text_area.h); } } else if (damage() & FL_DAMAGE_SCROLL) { // draw some lines of text fl_push_clip(text_area.x, text_area.y, text_area.w, text_area.h); //printf("drawing text from %d to %d\n", damage_range1_start, damage_range1_end); draw_range(damage_range1_start, damage_range1_end); if (damage_range2_end != -1) { //printf("drawing text from %d to %d\n", damage_range2_start, damage_range2_end); draw_range(damage_range2_start, damage_range2_end); } damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; fl_pop_clip(); } // draw the text cursor if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && !buffer()->primary_selection()->selected() && mCursorOn && Fl::focus() == (Fl_Widget*)this ) { fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); int X, Y; if (position_to_xy(mCursorPos, &X, &Y)) draw_cursor(X, Y); // else puts("position_to_xy() failed - unable to draw cursor!"); //printf("drew cursor at pos: %d (%d,%d)\n", mCursorPos, X, Y); mCursorOldY = Y; fl_pop_clip(); } fl_pop_clip(); } // this processes drag events due to mouse for Fl_Text_Display_mod and // also drags due to cursor movement with shift held down for // Fl_Text_Editor_mod void fl_text_drag_me(int pos, Fl_Text_Display_mod* d) { if (d->dragType == Fl_Text_Display_mod::DRAG_CHAR) { if (pos >= d->dragPos) { d->buffer()->select(d->dragPos, pos); } else { d->buffer()->select(pos, d->dragPos); } d->insert_position(pos); } else if (d->dragType == Fl_Text_Display_mod::DRAG_WORD) { if (pos >= d->dragPos) { d->insert_position(d->word_end(pos)); d->buffer()->select(d->word_start(d->dragPos), d->word_end(pos)); } else { d->insert_position(d->word_start(pos)); d->buffer()->select(d->word_start(pos), d->word_end(d->dragPos)); } } else if (d->dragType == Fl_Text_Display_mod::DRAG_LINE) { if (pos >= d->dragPos) { d->insert_position(d->buffer()->line_end(pos)+1); d->buffer()->select(d->buffer()->line_start(d->dragPos), d->buffer()->line_end(pos)+1); } else { d->insert_position(d->buffer()->line_start(pos)); d->buffer()->select(d->buffer()->line_start(pos), d->buffer()->line_end(d->dragPos)+1); } } } /** \brief Timer callback for scroll events. This timer event scrolls the text view proportionally to how far the mouse pointer has left the text area. This allows for smooth scrolling without "wiggeling" the mouse. */ void Fl_Text_Display_mod::scroll_timer_cb(void *user_data) { Fl_Text_Display_mod *w = (Fl_Text_Display_mod*)user_data; int pos; switch (scroll_direction) { case 1: // mouse is to the right, scroll left w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x + w->text_area.w, scroll_y, CURSOR_POS); break; case 2: // mouse is to the left, scroll right w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x, scroll_y, CURSOR_POS); break; case 3: // mouse is above, scroll down w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y, CURSOR_POS); break; case 4: // mouse is below, scroll up w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y + w->text_area.h, CURSOR_POS); break; default: return; } fl_text_drag_me(pos, w); Fl::repeat_timeout(.1, scroll_timer_cb, user_data); } /** \brief Event handling. */ int Fl_Text_Display_mod::handle(int event) { if (!buffer()) return 0; // This isn't very elegant! if (!Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) && !dragging && event != FL_LEAVE && event != FL_ENTER && event != FL_MOVE && event != FL_FOCUS && event != FL_UNFOCUS && event != FL_KEYBOARD && event != FL_KEYUP) { return Fl_Group::handle(event); } switch (event) { case FL_ENTER: case FL_MOVE: if (active_r()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_LEAVE: case FL_HIDE: if (active_r() && window()) { window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_PUSH: { if (active_r() && window()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); } if (Fl::focus() != this) { Fl::focus(this); handle(FL_FOCUS); } if (Fl_Group::handle(event)) return 1; if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG); dragging = 1; int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); dragPos = pos; if (buffer()->primary_selection()->includes(pos)) { dragType = DRAG_START_DND; return 1; } dragType = Fl::event_clicks(); if (dragType == DRAG_CHAR) { buffer()->unselect(); // Fl::copy("", 0, 0); /* removed for STR 2668 */ } else if (dragType == DRAG_WORD) { buffer()->select(word_start(pos), word_end(pos)); dragPos = word_start(pos); } if (buffer()->primary_selection()->selected()) insert_position(buffer()->primary_selection()->end()); else insert_position(pos); show_insert_position(); return 1; } case FL_DRAG: { if (dragType==DRAG_NONE) return 1; if (dragType==DRAG_START_DND) { if (!Fl::event_is_click() && Fl::dnd_text_ops()) { const char* copy = buffer()->selection_text(); Fl::dnd(); free((void*)copy); } return 1; } int X = Fl::event_x(), Y = Fl::event_y(), pos = insert_position(); // if we leave the text_area, we start a timer event // that will take care of scrolling and selecting if (Y < text_area.y) { scroll_x = X; scroll_amount = (Y - text_area.y) / 5 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 3; } else if (Y >= text_area.y+text_area.h) { scroll_x = X; scroll_amount = (Y - text_area.y - text_area.h) / 5 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 4; } else if (X < text_area.x) { scroll_y = Y; scroll_amount = (X - text_area.x) / 2 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 2; } else if (X >= text_area.x+text_area.w) { scroll_y = Y; scroll_amount = (X - text_area.x - text_area.w) / 2 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 1; } else { if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } pos = xy_to_position(X, Y, CURSOR_POS); pos = buffer()->next_char(pos); } fl_text_drag_me(pos, this); return 1; } case FL_RELEASE: { if (Fl::event_is_click() && (! Fl::event_clicks()) && buffer()->primary_selection()->includes(dragPos) && !(Fl::event_state()&FL_SHIFT) ) { buffer()->unselect(); // clicking in the selection: unselect and move cursor insert_position(dragPos); return 1; } else if (Fl::event_clicks() == DRAG_LINE && Fl::event_button() == FL_LEFT_MOUSE) { buffer()->select(buffer()->line_start(dragPos), buffer()->next_char(buffer()->line_end(dragPos))); dragPos = line_start(dragPos); dragType = DRAG_CHAR; } else { dragging = 0; if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } // convert from WORD or LINE selection to CHAR /*if (insert_position() >= dragPos) dragPos = buffer()->primary_selection()->start(); else dragPos = buffer()->primary_selection()->end();*/ dragType = DRAG_CHAR; } const char* copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } case FL_MOUSEWHEEL: if (Fl::event_dy()) return mVScrollBar->handle(event); else return mHScrollBar->handle(event); case FL_UNFOCUS: if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT); case FL_FOCUS: if (buffer()->selected()) { int start, end; if (buffer()->selection_position(&start, &end)) redisplay_range(start, end); } if (buffer()->secondary_selected()) { int start, end; if (buffer()->secondary_selection_position(&start, &end)) redisplay_range(start, end); } if (buffer()->highlight()) { int start, end; if (buffer()->highlight_position(&start, &end)) redisplay_range(start, end); } return 1; case FL_KEYBOARD: // Copy? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='c') { if (!buffer()->selected()) return 1; const char *copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); return 1; } // Select all ? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='a') { buffer()->select(0,buffer()->length()); const char *copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } if (mVScrollBar->handle(event)) return 1; if (mHScrollBar->handle(event)) return 1; break; case FL_SHORTCUT: if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) return 0; if (Fl::visible_focus() && handle(FL_FOCUS)) { Fl::focus(this); return 1; } break; } return 0; } /* Convert an x pixel position into a column number. */ double Fl_Text_Display_mod::x_to_col(double y) const { if (!mColumnScale) { mColumnScale = string_width("Mitg", 4, 'A') / 4.0; } return (y/mColumnScale)+0.5; } /** Convert a column number into an x pixel position. */ double Fl_Text_Display_mod::col_to_x(double col) const { if (!mColumnScale) { // recalculate column scale value x_to_col(0); } return col*mColumnScale; } // // End of "$Id: Fl_Text_Display_mod.cxx 8808 2011-06-16 13:31:25Z manolo $". // �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/fileselect.cxx�������������������������������������������������������������0000664�0001750�0001750�00000021422�12453506331�014730� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // fileselect.cxx -- file selector front end // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // Dave Freese, 2015 // // This file is part of fldigi. // // Fldigi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with fldigi. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string> #include <cstdlib> #include <libgen.h> #include <FL/fl_ask.H> #include <FL/Fl_Native_File_Chooser.H> #include <FL/filename.H> #include "config.h" #include "fileselect.h" #include "debug.h" /** \class Fl_Native_File_Chooser This class lets an FLTK application easily and consistently access the operating system's native file chooser. Some operating systems have very complex and specific file choosers that many users want access to specifically, instead of FLTK's default file chooser(s). In cases where there is no native file browser, FLTK's own file browser is used instead. To use this widget correctly, use the following include in your code: \code #include <FL/Fl_Native_File_Chooser.H> \endcode Do not include the other Fl_Native_File_Choser_XXX.H files in your code; those are platform specific files that will be included automatically depending on your build platform. The following example shows how to pick a single file: \code // Create and post the local native file chooser #include <FL/Fl_Native_File_Chooser.H> [..] Fl_Native_File_Chooser fnfc; fnfc.title("Pick a file"); fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE); fnfc.filter("Text\t*.txt\n" "C Files\t*.{cxx,h,c}"); fnfc.directory("/var/tmp"); // default directory to use // Show native chooser switch ( fnfc.show() ) { case -1: printf("ERROR: %s\n", fnfc.errmsg()); break; // ERROR case 1: printf("CANCEL\n"); break; // CANCEL default: printf("PICKED: %s\n", fnfc.filename()); break; // FILE CHOSEN } \endcode <B>Platform Specific Caveats</B> - Under X windows, it's best if you call Fl_File_Icon::load_system_icons() at the start of main(), to enable the nicer looking file browser widgets. Use the static public attributes of class Fl_File_Chooser to localize the browser. - Some operating systems support certain OS specific options; see Fl_Native_File_Chooser::options() for a list. \image html Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms." \image latex Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms" width=14cm enum Type { BROWSE_FILE = 0, ///< browse files (lets user choose one file) BROWSE_DIRECTORY, ///< browse directories (lets user choose one directory) BROWSE_MULTI_FILE, ///< browse files (lets user choose multiple files) BROWSE_MULTI_DIRECTORY, ///< browse directories (lets user choose multiple directories) BROWSE_SAVE_FILE, ///< browse to save a file BROWSE_SAVE_DIRECTORY ///< browse to save a directory }; enum Option { NO_OPTIONS = 0x0000, ///< no options enabled SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog (if supported) NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported) PREVIEW = 0x0004 ///< enable preview mode }; IMPORTANT NOTICE: The filter type must be terminated with a '\n' on OS X or the application crashes with a Bus timeout */ using namespace std; namespace FSEL { void create(void) {}; void destroy(void) {}; string filename, stitle, sfilter, sdef, sdirectory; char dirbuf[FL_PATH_MAX + 1] = ""; char msg[400]; /* void pfile (const char *dir, const char *fname, const char *filt) { char fn[FL_PATH_MAX+1]; #ifdef __WIN32__ fl_filename_expand(fn, sizeof(fn) -1, "$USERPROFILE/"); #else fl_filename_expand(fn, sizeof(fn) -1, "$HOME/"); #endif strcat(fn, "pfile.txt"); FILE *f = fopen(fn, "a"); fprintf(f,"\ dir: %s\n\ file: %s\n\ filter: %s\n", dir, fname, filt); fclose(f); } */ void dosfname(string &s) { for (size_t i = 0; i < s.length(); i++) if (s[i] == '/') s[i] = '\\'; } const char* select(const char* title, const char* filter, const char* def, int* fsel) { if (strlen(dirbuf) == 0) { #ifdef __WIN32__ fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); #else fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/"); #endif } size_t p = 0; Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); sdirectory.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) { sdef.assign(def); sdirectory.assign(def); p = sdirectory.rfind(fl_filename_name(sdef.c_str())); sdirectory.erase(p); } if (sdirectory.empty()) { sdirectory.assign(dirbuf); } if (sdef.empty()) { sdef.assign(sdirectory); sdef.append("temp"); } if (!sfilter.empty()) { if (sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; native.filter(sfilter.c_str()); } native.title(stitle.c_str()); #if __WIN32__ dosfname(sdef); dosfname(sdirectory); #endif if (!sdef.empty()) native.preset_file(sdef.c_str()); if (!sdirectory.empty()) native.directory(sdirectory.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_FILE); native.options(Fl_Native_File_Chooser::PREVIEW); // pfile(sdirectory.c_str(), sdef.c_str(), sfilter.c_str()); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); // Error fall through case 1: return 0; break; default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } if (fsel) *fsel = native.filter_value(); return filename.c_str(); } const char* saveas(const char* title, const char* filter, const char* def, int* fsel) { if (strlen(dirbuf) == 0) { #ifdef __WIN32__ fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); #else fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/"); #endif } size_t p = 0; Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); sdirectory.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) { sdef.assign(def); sdirectory.assign(def); p = sdirectory.rfind(fl_filename_name(sdef.c_str())); sdirectory.erase(p); } if (sdirectory.empty()) { sdirectory.assign(dirbuf); } if (sdef.empty()) { sdef.assign(sdirectory); sdef.append("temp"); } if (!sfilter.empty()) { if (sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; native.filter(sfilter.c_str()); } native.title(stitle.c_str()); #if __WIN32__ dosfname(sdef); dosfname(sdirectory); #endif if (!sdef.empty()) native.preset_file(sdef.c_str()); if (!sdirectory.empty()) native.directory(sdirectory.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_SAVE_FILE); native.options(Fl_Native_File_Chooser::NEW_FOLDER || Fl_Native_File_Chooser::SAVEAS_CONFIRM); // pfile(sdirectory.c_str(), sdef.c_str(), sfilter.c_str()); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); break; // ERROR case 1: break; // CANCEL default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } if (fsel) *fsel = native.filter_value(); return filename.c_str(); } const char* dir_select(const char* title, const char* filter, const char* def) { Fl_Native_File_Chooser native; stitle.clear(); sfilter.clear(); sdef.clear(); if (title) stitle.assign(title); if (filter) sfilter.assign(filter); if (def) sdef.assign(def); if (!sfilter.empty() && sfilter[sfilter.length()-1] != '\n') sfilter += '\n'; if (!stitle.empty()) native.title(stitle.c_str()); native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY); if (!sfilter.empty()) native.filter(sfilter.c_str()); native.options(Fl_Native_File_Chooser::NO_OPTIONS); #if __WIN32__ dosfname(sdef); #endif if (!sdef.empty()) { native.directory(sdef.c_str()); sdirectory = sdef; } else sdirectory.clear(); filename.clear(); switch ( native.show() ) { case -1: LOG_ERROR("ERROR: %s\n", native.errmsg()); break; // ERROR case 1: break; // CANCEL default: if ( native.filename() ) { filename = native.filename(); } else { filename = ""; } break; } return filename.c_str(); } } // FSEL ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Native_File_Chooser_MAC.cxx���������������������������������������������0000664�0001750�0001750�00000056157�12330516146�017575� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser_MAC.cxx -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // FLTK2/MAC port by Greg Ercolano 2007. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "flnfc_common.cxx" // strnew/strfree/strapp/chrcat #define FLTK1 #ifdef FLTK1 // // FLTK1 // #include <FL/Fl.H> #include <FL/Fl_Native_File_Chooser.H> #include <FL/filename.H> #define FNFC_CLASS Fl_Native_File_Chooser #define FNFC_CTOR Fl_Native_File_Chooser #else // // FLTK2 // #include <fltk/NativeFileChooser.h> #include <fltk/run.h> #include <fltk/filename.h> #define FNFC_CTOR NativeFileChooser #define FNFC_CLASS fltk::FNFC_CTOR #define fl_filename_match filename_match // fltk1 name -> fltk2 name #define fl_filename_isdir filename_isdir // fltk1 name -> fltk2 name #endif // TRY TO CONVERT AN AEDesc TO AN FSSpec // As per Apple Technical Q&A QA1274 // eg: http://developer.apple.com/qa/qa2001/qa1274.html // Returns 'noErr' if OK, // or an 'OSX result code' on error. // static int AEDescToFSSpec(const AEDesc* desc, FSSpec* fsspec) { OSStatus err = noErr; AEDesc coerceDesc; // If AEDesc isn't already an FSSpec, convert it to one if ( desc->descriptorType != typeFSS ) { if ( ( err = AECoerceDesc(desc, typeFSS, &coerceDesc) ) == noErr ) { // Get FSSpec out of AEDesc err = AEGetDescData(&coerceDesc, fsspec, sizeof(FSSpec)); AEDisposeDesc(&coerceDesc); } } else { err = AEGetDescData(desc, fsspec, sizeof(FSSpec)); } return( err ); } // CONVERT AN FSSpec TO A PATHNAME static void FSSpecToPath(const FSSpec &spec, char *buff, int bufflen) { FSRef fsRef; FSpMakeFSRef(&spec, &fsRef); FSRefMakePath(&fsRef, (UInt8*)buff, bufflen); } // CONVERT REGULAR PATH -> FSSpec // If file does not exist, expect fnfErr. // Returns 'noErr' if OK, // or an 'OSX result code' on error. // static OSStatus PathToFSSpec(const char *path, FSSpec &spec) { OSStatus err; FSRef ref; if ((err = FSPathMakeRef((const UInt8*)path, &ref, NULL)) != noErr) { return(err); } // FSRef -> FSSpec if ((err = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, NULL)) != noErr) { return(err); } return(noErr); } // NAVREPLY: CTOR FNFC_CLASS::NavReply::NavReply() { _valid_reply = 0; } // NAVREPLY: DTOR FNFC_CLASS::NavReply::~NavReply() { if ( _valid_reply ) { NavDisposeReply(&_reply); } } // GET REPLY FROM THE NAV* DIALOG int FNFC_CLASS::NavReply::get_reply(NavDialogRef& ref) { if ( _valid_reply ) { NavDisposeReply(&_reply); // dispose of previous _valid_reply = 0; } if ( ref == NULL || NavDialogGetReply(ref, &_reply) != noErr ) { return(-1); } _valid_reply = 1; return(0); } // RETURN THE BASENAME USER WANTS TO 'Save As' int FNFC_CLASS::NavReply::get_saveas_basename(char *s, int slen) { if (CFStringGetCString(_reply.saveFileName, s, slen-1, kCFStringEncodingUTF8) == false) { s[0] = '\0'; return(-1); } return(0); } // RETURN THE DIRECTORY NAME // Returns 0 on success, -1 on error. // int FNFC_CLASS::NavReply::get_dirname(char *s, int slen) { FSSpec fsspec; if ( AEDescToFSSpec(&_reply.selection, &fsspec) != noErr ) { // Conversion failed? Return empty name s[0] = 0; return(-1); } FSSpecToPath(fsspec, s, slen); return(0); } // RETURN MULTIPLE DIRECTORIES // Returns: 0 on success with pathnames[] containing pathnames selected, // -1 on error // int FNFC_CLASS::NavReply::get_pathnames(char **&pathnames, int& tpathnames) { // How many items selected? long count = 0; if ( AECountItems(&_reply.selection, &count) != noErr ) { return(-1); } // Allocate space for that many pathnames pathnames = new char*[count]; memset((void*)pathnames, 0, count*sizeof(char*)); tpathnames = count; // Walk list of pathnames selected for (short index=1; index<=count; index++) { AEKeyword keyWord; AEDesc desc; if (AEGetNthDesc(&_reply.selection, index, typeFSS, &keyWord, &desc) != noErr) { pathnames[index-1] = strnew(""); continue; } FSSpec fsspec; if (AEGetDescData(&desc, &fsspec, sizeof(FSSpec)) != noErr ) { pathnames[index-1] = strnew(""); continue; } char s[4096]; FSSpecToPath(fsspec, s, sizeof(s)-1); pathnames[index-1] = strnew(s); AEDisposeDesc(&desc); } return(0); } // FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS void FNFC_CLASS::clear_pathnames() { if ( _pathnames ) { while ( --_tpathnames >= 0 ) { _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]); } delete [] _pathnames; _pathnames = NULL; } _tpathnames = 0; } // SET A SINGLE PATHNAME void FNFC_CLASS::set_single_pathname(const char *s) { clear_pathnames(); _pathnames = new char*[1]; _pathnames[0] = strnew(s); _tpathnames = 1; } // GET THE 'Save As' FILENAME // Returns -1 on error, errmsg() has reason, filename == "". // 0 if OK, filename() has filename chosen. // int FNFC_CLASS::get_saveas_basename(NavDialogRef& ref) { if ( ref == NULL ) { errmsg("get_saveas_basename: ref is NULL"); return(-1); } NavReply reply; OSStatus err; if ((err = reply.get_reply(ref)) != noErr ) { errmsg("NavReply::get_reply() failed"); clear_pathnames(); return(-1); } char pathname[4096] = ""; // Directory name.. // -2 leaves room to append '/' // if ( reply.get_dirname(pathname, sizeof(pathname)-2) < 0 ) { clear_pathnames(); errmsg("NavReply::get_dirname() failed"); return(-1); } // Append '/' int len = strlen(pathname); pathname[len++] = '/'; pathname[len] = '\0'; // Basename.. if ( reply.get_saveas_basename(pathname+len, sizeof(pathname)-len) < 0 ) { clear_pathnames(); errmsg("NavReply::get_saveas_basename() failed"); return(-1); } set_single_pathname(pathname); return(0); } // GET (POTENTIALLY) MULTIPLE FILENAMES // Returns: // -1 -- error, errmsg() has reason, filename == "" // 0 -- OK, pathnames()/filename() has pathname(s) chosen // int FNFC_CLASS::get_pathnames(NavDialogRef& ref) { if ( ref == NULL ) { errmsg("get_saveas_basename: ref is NULL"); return(-1); } NavReply reply; OSStatus err; if ((err = reply.get_reply(ref)) != noErr ) { errmsg("NavReply::get_reply() failed"); clear_pathnames(); return(-1); } // First, clear pathnames array of any previous contents clear_pathnames(); if ( reply.get_pathnames(_pathnames, _tpathnames) < 0 ) { clear_pathnames(); errmsg("NavReply::get_dirname() failed"); return(-1); } return(0); } // NAV CALLBACK EVENT HANDLER void FNFC_CLASS::event_handler( NavEventCallbackMessage callBackSelector, NavCBRecPtr cbparm, void *data) { OSStatus err; FNFC_CLASS *nfb = (FNFC_CLASS*)data; switch (callBackSelector) { case kNavCBStart: if ( nfb->directory() || nfb->preset_file() ) { const char *pathname = nfb->directory() ? nfb->directory() : nfb->preset_file(); FSSpec spec; if ( ( err = PathToFSSpec(pathname, spec) ) != noErr ) { fprintf(stderr, "PathToFSSpec(%s) failed: err=%d\n", pathname, (int)err); break; } AEDesc desc; if ((err = AECreateDesc(typeFSS, &spec, sizeof(FSSpec), &desc)) != noErr) { fprintf(stderr, "AECreateDesc() failed: err=%d\n", (int)err); } if ((err = NavCustomControl(cbparm->context, kNavCtlSetLocation, &desc)) != noErr) { fprintf(stderr, "NavCustomControl() failed: err=%d\n", (int)err); } AEDisposeDesc(&desc); } if ( nfb->_btype == BROWSE_SAVE_FILE && nfb->preset_file() ) { CFStringRef namestr = CFStringCreateWithCString(NULL, nfb->preset_file(), kCFStringEncodingASCII); NavDialogSetSaveFileName(cbparm->context, namestr); CFRelease(namestr); } NavCustomControl(cbparm->context, kNavCtlSetActionState, &nfb->_keepstate ); // Select the right filter in pop-up menu if ( nfb->_filt_value == nfb->_filt_total ) { // Select All Documents NavPopupMenuItem kAll = kNavAllFiles; NavCustomControl(cbparm->context, kNavCtlSelectAllType, &kAll); } else if (nfb->_filt_value < nfb->_filt_total) { // Select custom filter nfb->_tempitem.version = kNavMenuItemSpecVersion; nfb->_tempitem.menuCreator = 'extn'; nfb->_tempitem.menuType = nfb->_filt_value; *nfb->_tempitem.menuItemName = '\0'; // needed on 10.3+ NavCustomControl(cbparm->context, kNavCtlSelectCustomType, &(nfb->_tempitem)); } break; case kNavCBPopupMenuSelect: NavMenuItemSpecPtr ptr; // they really buried this one! ptr = (NavMenuItemSpecPtr)cbparm->eventData.eventDataParms.param; if ( ptr->menuCreator ) { // Gets index to filter ( menuCreator = 'extn' ) nfb->_filt_value = ptr->menuType; } else { // All docs filter selected ( menuCreator = '\0\0\0\0' ) nfb->_filt_value = nfb->_filt_total; } break; case kNavCBSelectEntry: NavActionState astate; switch ( nfb->_btype ) { // these don't need selection override case BROWSE_MULTI_FILE: case BROWSE_MULTI_DIRECTORY: case BROWSE_SAVE_FILE: break; // These need to allow only one item, so disable // Open button if user tries to select multiple files case BROWSE_SAVE_DIRECTORY: case BROWSE_DIRECTORY: case BROWSE_FILE: SInt32 selectcount; AECountItems((AEDescList*)cbparm-> eventData.eventDataParms.param, &selectcount); if ( selectcount > 1 ) { NavCustomControl(cbparm->context, kNavCtlSetSelection, NULL); astate = nfb->_keepstate | kNavDontOpenState | kNavDontChooseState; NavCustomControl(cbparm->context, kNavCtlSetActionState, &astate ); } else { astate= nfb->_keepstate | kNavNormalState; NavCustomControl(cbparm->context, kNavCtlSetActionState, &astate ); } break; } break; } } // CONSTRUCTOR FNFC_CLASS::FNFC_CTOR(int val) { _btype = val; NavGetDefaultDialogCreationOptions(&_opts); _opts.optionFlags |= kNavDontConfirmReplacement; // no confirms for "save as" _options = NO_OPTIONS; _ref = NULL; memset(&_tempitem, 0, sizeof(_tempitem)); _pathnames = NULL; _tpathnames = 0; _title = NULL; _filter = NULL; _filt_names = NULL; memset(_filt_patt, 0, sizeof(char*) * MAXFILTERS); _filt_total = 0; _filt_value = 0; _directory = NULL; _preset_file = NULL; _errmsg = NULL; _keepstate = kNavNormalState; } // DESTRUCTOR FNFC_CLASS::~FNFC_CTOR() { // _opts // nothing to manage if (_ref) { NavDialogDispose(_ref); _ref = NULL; } // _options // nothing to manage // _keepstate // nothing to manage // _tempitem // nothing to manage clear_pathnames(); _directory = strfree(_directory); _title = strfree(_title); _preset_file = strfree(_preset_file); _filter = strfree(_filter); //_filt_names // managed by clear_filters() //_filt_patt[i] // managed by clear_filters() //_filt_total // managed by clear_filters() clear_filters(); //_filt_value // nothing to manage _errmsg = strfree(_errmsg); } // SET THE TYPE OF BROWSER void FNFC_CLASS::type(int val) { _btype = val; } // GET TYPE OF BROWSER int FNFC_CLASS::type() const { return(_btype); } // SET OPTIONS void FNFC_CLASS::options(int val) { _options = val; } // GET OPTIONS int FNFC_CLASS::options() const { return(_options); } // SHOW THE BROWSER WINDOW // Returns: // 0 - user picked a file // 1 - user cancelled // -1 - failed; errmsg() has reason // int FNFC_CLASS::show() { // Make sure fltk interface updates before posting our dialog #ifdef FLTK1 Fl::flush(); #else fltk::flush(); #endif // BROWSER TITLE CFStringRef cfs_title; cfs_title = CFStringCreateWithCString(NULL, _title ? _title : "No Title", kCFStringEncodingASCII); _opts.windowTitle = cfs_title; _keepstate = kNavNormalState; // BROWSER FILTERS CFArrayRef filter_array = NULL; { // One or more filters specified? if ( _filt_total ) { // NAMES -> CFArrayRef CFStringRef tab = CFSTR("\t"); CFStringRef tmp_cfs; tmp_cfs = CFStringCreateWithCString(NULL, _filt_names, kCFStringEncodingASCII); filter_array = CFStringCreateArrayBySeparatingStrings( NULL, tmp_cfs, tab); CFRelease(tmp_cfs); CFRelease(tab); _opts.popupExtension = filter_array; _opts.optionFlags |= kNavAllFilesInPopup; } else { filter_array = NULL; _opts.popupExtension = NULL; _opts.optionFlags |= kNavAllFilesInPopup; } } // HANDLE OPTIONS WE SUPPORT if ( _options & SAVEAS_CONFIRM ) { _opts.optionFlags &= ~kNavDontConfirmReplacement; // enables confirm } else { _opts.optionFlags |= kNavDontConfirmReplacement; // disables confirm } // POST BROWSER int err = post(); // RELEASE _FILT_ARR if ( filter_array ) CFRelease(filter_array); filter_array = NULL; _opts.popupExtension = NULL; _filt_total = 0; // RELEASE TITLE if ( cfs_title ) CFRelease(cfs_title); cfs_title = NULL; return(err); } // POST BROWSER // Internal use only. // Assumes '_opts' has been initialized. // // Returns: // 0 - user picked a file // 1 - user cancelled // -1 - failed; errmsg() has reason // int FNFC_CLASS::post() { // INITIALIZE BROWSER OSStatus err; if ( _filt_total == 0 ) { // Make sure they match _filt_value = 0; // TBD: move to someplace more logical? } switch (_btype) { case BROWSE_FILE: case BROWSE_MULTI_FILE: //_keepstate = kNavDontNewFolderState; // Prompt user for one or more files if ((err = NavCreateGetFileDialog( &_opts, // options 0, // file types event_handler, // event handler 0, // preview callback filter_proc_cb, // filter callback (void*)this, // callback data &_ref)) != noErr ) { // dialog ref errmsg("NavCreateGetFileDialog: failed"); return(-1); } break; case BROWSE_DIRECTORY: case BROWSE_MULTI_DIRECTORY: _keepstate = kNavDontNewFolderState; //FALLTHROUGH case BROWSE_SAVE_DIRECTORY: // Prompts user for one or more files or folders if ((err = NavCreateChooseFolderDialog( &_opts, // options event_handler, // event callback 0, // filter callback (void*)this, // callback data &_ref)) != noErr ) { // dialog ref errmsg("NavCreateChooseFolderDialog: failed"); return(-1); } break; case BROWSE_SAVE_FILE: // Prompt user for filename to 'save as' if ((err = NavCreatePutFileDialog( &_opts, // options 0, // file types 0, // file creator event_handler, // event handler (void*)this, // callback data &_ref)) != noErr ) { // dialog ref errmsg("NavCreatePutFileDialog: failed"); return(-1); } break; } // SHOW THE DIALOG if ( ( err = NavDialogRun(_ref) ) != 0 ) { char msg[80]; sprintf(msg, "NavDialogRun: failed (err=%d)", (int)err); errmsg(msg); return(-1); } // WHAT ACTION DID USER CHOOSE? NavUserAction act = NavDialogGetUserAction(_ref); if ( act == kNavUserActionNone ) { errmsg("Nothing happened yet (dialog still open)"); return(-1); } else if ( act == kNavUserActionCancel ) { // user chose 'cancel' return(1); } else if ( act == kNavUserActionSaveAs ) { // user chose 'save as' return(get_saveas_basename(_ref)); } // TOO MANY FILES CHOSEN? int ret = get_pathnames(_ref); if ( _btype == BROWSE_FILE && ret == 0 && _tpathnames != 1 ) { char msg[80]; sprintf(msg, "Expected only one file to be chosen.. you chose %d.", (int)_tpathnames); errmsg(msg); return(-1); } return(err); } // SET ERROR MESSAGE // Internal use only. // void FNFC_CLASS::errmsg(const char *msg) { _errmsg = strfree(_errmsg); _errmsg = strnew(msg); } // RETURN ERROR MESSAGE const char *FNFC_CLASS::errmsg() const { return(_errmsg ? _errmsg : "No error"); } // GET FILENAME const char* FNFC_CLASS::filename() const { if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]); return(""); } // GET FILENAME FROM LIST OF FILENAMES const char* FNFC_CLASS::filename(int i) const { if ( _pathnames && i < _tpathnames ) return(_pathnames[i]); return(""); } // GET TOTAL FILENAMES CHOSEN int FNFC_CLASS::count() const { return(_tpathnames); } // PRESET PATHNAME // Value can be NULL for none. // void FNFC_CLASS::directory(const char *val) { _directory = strfree(_directory); _directory = strnew(val); } // GET PRESET PATHNAME // Returned value can be NULL if none set. // const char* FNFC_CLASS::directory() const { return(_directory); } // SET TITLE // Value can be NULL if no title desired. // void FNFC_CLASS::title(const char *val) { _title = strfree(_title); _title = strnew(val); } // GET TITLE // Returned value can be NULL if none set. // const char *FNFC_CLASS::title() const { return(_title); } // SET FILTER // Can be NULL if no filter needed // void FNFC_CLASS::filter(const char *val) { _filter = strfree(_filter); _filter = strnew(val); // Parse filter user specified // IN: _filter = "C Files\t*.{cxx,h}\nText Files\t*.txt" // OUT: _filt_names = "C Files\tText Files" // _filt_patt[0] = "*.{cxx,h}" // _filt_patt[1] = "*.txt" // _filt_total = 2 // parse_filter(_filter); } // GET FILTER // Returned value can be NULL if none set. // const char *FNFC_CLASS::filter() const { return(_filter); } // CLEAR ALL FILTERS // Internal use only. // void FNFC_CLASS::clear_filters() { _filt_names = strfree(_filt_names); for (int i=0; i<_filt_total; i++) { _filt_patt[i] = strfree(_filt_patt[i]); } _filt_total = 0; } // PARSE USER'S FILTER SPEC // Parses user specified filter ('in'), // breaks out into _filt_patt[], _filt_names, and _filt_total. // // Handles: // IN: OUT:_filt_names OUT: _filt_patt // ------------------------------------ ------------------ --------------- // "*.{ma,mb}" "*.{ma,mb} Files" "*.{ma,mb}" // "*.[abc]" "*.[abc] Files" "*.[abc]" // "*.txt" "*.txt Files" "*.c" // "C Files\t*.[ch]" "C Files" "*.[ch]" // "C Files\t*.[ch]\nText Files\t*.cxx" "C Files" "*.[ch]" // // Parsing Mode: // IN:"C Files\t*.{cxx,h}" // ||||||| ||||||||| // mode: nnnnnnn wwwwwwwww // \_____/ \_______/ // Name Wildcard // void FNFC_CLASS::parse_filter(const char *in) { clear_filters(); if ( ! in ) return; int has_name = strchr(in, '\t') ? 1 : 0; char mode = has_name ? 'n' : 'w'; // parse mode: n=title, w=wildcard char wildcard[1024] = ""; // parsed wildcard char name[1024] = ""; // Parse filter user specified for ( ; 1; in++ ) { //// DEBUG //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n", //// *in, mode, name, wildcard); switch (*in) { // FINISHED PARSING NAME? case '\t': if ( mode != 'n' ) goto regchar; mode = 'w'; break; // ESCAPE NEXT CHAR case '\\': ++in; goto regchar; // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS? case '\r': case '\n': case '\0': // TITLE // If user didn't specify a name, make one // if ( name[0] == '\0' ) { sprintf(name, "%.*s Files", (int)sizeof(name)-10, wildcard); } // APPEND NEW FILTER TO LIST if ( wildcard[0] ) { // Add to filtername list // Tab delimit if more than one. We later break // tab delimited string into CFArray with // CFStringCreateArrayBySeparatingStrings() // if ( _filt_total ) { _filt_names = strapp(_filt_names, "\t"); } _filt_names = strapp(_filt_names, name); // Add filter to the pattern array _filt_patt[_filt_total++] = strnew(wildcard); } // RESET wildcard[0] = name[0] = '\0'; mode = strchr(in, '\t') ? 'n' : 'w'; // DONE? if ( *in == '\0' ) return; // done else continue; // not done yet, more filters // Parse all other chars default: // handle all non-special chars regchar: // handle regular char switch ( mode ) { case 'n': chrcat(name, *in); continue; case 'w': chrcat(wildcard, *in); continue; } break; } } //NOTREACHED } // STATIC: FILTER CALLBACK Boolean FNFC_CLASS::filter_proc_cb(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode) { return((FNFC_CLASS*)callBackUD)->filter_proc_cb2( theItem, info, callBackUD, filterMode); } // FILTER CALLBACK // Return true if match, // false if no match. // Boolean FNFC_CLASS::filter_proc_cb2(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode) { // All files chosen or no filters if ( _filt_value == _filt_total ) return(true); FSSpec fsspec; char pathname[4096]; // On fail, filter should return true by default if ( AEDescToFSSpec(theItem, &fsspec) != noErr ) { return(true); } FSSpecToPath(fsspec, pathname, sizeof(pathname)-1); if ( fl_filename_isdir(pathname) ) return(true); if ( fl_filename_match(pathname, _filt_patt[_filt_value]) ) return(true); else return(false); } // SET PRESET FILE // Value can be NULL for none. // void FNFC_CLASS::preset_file(const char* val) { _preset_file = strfree(_preset_file); _preset_file = strnew(val); } // PRESET FILE // Returned value can be NULL if none set. // const char* FNFC_CLASS::preset_file() { return(_preset_file); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Display_mod.cxx����������������������������������������������������0000664�0001750�0001750�00000002134�12330516146�016500� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Display_mod_1_1.cxx" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Display_mod_1_3.cxx" #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/font_browser.cxx�����������������������������������������������������������0000664�0001750�0001750�00000021354�12330516146�015325� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Font_Browser.cpp v 0.0.3 2007-04-21 // // for the Fast Light Tool Kit (FLTK) 1.1.x . // // David Freese, w1hkj@w1hkj.com // based on similar widget by Mariwan Jalal // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <string> #include <cstdlib> #include <cstring> #include <cstdio> #include <stdint.h> #include <FL/Fl.H> #include <FL/Fl_Color_Chooser.H> #include <FL/fl_draw.H> #include "font_browser.h" #include "flslider2.h" #include "gettext.h" using namespace std; Font_Browser* font_browser; // Font Color selected void Font_Browser::ColorSelect() { unsigned char r, g, b; Fl::get_color(fontcolor, r, g, b); if (fl_color_chooser(_("Font color"), r, g, b) == 0) return; fontcolor = fl_rgb_color(r, g, b); btn_Color->color(fontcolor); } void Font_Browser::fb_callback(Fl_Widget* w, void* arg) { Font_Browser* fb = reinterpret_cast<Font_Browser*>(arg); if (w == fb->btn_Cancel) fb->hide(); else if (w == fb->btn_OK) { if (fb->callback_) (*fb->callback_)(fb, fb->data_); } else if (w == fb->btn_Color) fb->ColorSelect(); else if (w == fb->lst_Font) fb->FontNameSelect(); else { if (w == fb->lst_Size) fb->txt_Size->value(strtol(fb->lst_Size->text(fb->lst_Size->value()), NULL, 10)); fb->fontsize = static_cast<int>(fb->txt_Size->value()); } fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor); } // Sort the font list void Font_Browser::FontSort() { int size = lst_Font->size(); for ( int t = 1; t <= size - 1; t++ ) for ( int r = t+1; r <= size; r++ ) if ( strcasecmp(lst_Font->text(t), lst_Font->text(r)) > 0 ) lst_Font->swap(t,r); } // Font Name changed callback void Font_Browser::FontNameSelect() { int fn = lst_Font->value(); if (!fn) return; fontnbr = (Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(fn)); // get sizes and fill browser; skip first element if it is zero lst_Size->clear(); int nsizes, *sizes; char buf[4]; nsizes = Fl::get_font_sizes(fontnbr, sizes); // for (int i = !*sizes; i < nsizes; i++) if ((size_t)snprintf(buf, sizeof(buf), "%d", sizes[i]) < sizeof(buf)) lst_Size->add(buf, (void*)sizes[i]); // scalable font with no suggested sizes if (!lst_Size->size()) { for (int i = 1; i <= 48; i++) { snprintf(buf, sizeof(buf), "%d", i); lst_Size->add(buf, (void*)i); } } fontSize(fontsize); } Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl ) : Fl_Window(x, y, w, h, lbl) { lst_Font = new Fl_Browser(5, 15, 280, 125, _("Font:")); lst_Font->align(FL_ALIGN_TOP_LEFT); lst_Font->type(FL_HOLD_BROWSER); lst_Font->callback(fb_callback, this); txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:")); txt_Size->align(FL_ALIGN_TOP_LEFT); txt_Size->range(1.0, 48.0); txt_Size->step(1.0); txt_Size->callback(fb_callback, this); lst_Size = new Fl_Browser(290, 40, 50, 100); lst_Size->type(FL_HOLD_BROWSER); lst_Size->callback(fb_callback, this); btn_OK = new Fl_Return_Button(345, 40, 80, 25, _("&OK")); btn_OK->shortcut(0x8006f); btn_OK->callback(fb_callback, this); btn_Cancel = new Fl_Button(345, 70, 80, 25, _("Cancel")); btn_Cancel->labelsize(12); btn_Cancel->callback(fb_callback, this); btn_Color = new Fl_Button(345, 100, 80, 25, _("Color")); btn_Color->down_box(FL_BORDER_BOX); btn_Color->color(FL_FOREGROUND_COLOR); btn_Color->callback(fb_callback, this); box_Example = new Preview_Box(5, 145, 420, 75, _("That crazy fox jumped over the dog again!\n" "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n" "!\"#$%&'()*+,-./:;<=>?@@[\\]^_`{|}~")); box_Example->box(FL_DOWN_BOX); box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE); resizable(box_Example); set_modal(); end(); // Initializations this->callback_ = 0; // Initialize Widgets callback this->data_ = 0; // And the data numfonts = Fl::set_fonts(0); // Nr of fonts available on the server const char* name; for(int i = 0; i < numfonts; i++) { name = Fl::get_font_name((Fl_Font)i); if (isalpha(*name)) lst_Font->add(name, (void *)i); } FontSort(); fontnbr = FL_HELVETICA;; fontsize = FL_NORMAL_SIZE; // Font Size to be used fontcolor = FL_FOREGROUND_COLOR; filter = ALL_TYPES; lst_Font->value(1); FontNameSelect(); //! Fl::focus(lst_Font); xclass(PACKAGE_NAME); } void Font_Browser::fontNumber(Fl_Font n) { fontnbr = n; lst_Font->value(1); int s = lst_Font->size(); for (int i = 1; i < s; i++ ) { if ((Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(i)) == n) { lst_Font->value(i); FontNameSelect(); break; } } } void Font_Browser::fontSize(int s) { fontsize = s; int n = lst_Size->size(); for (int i = 1; i < n; i++) { if ((intptr_t)lst_Size->data(i) == fontsize) { lst_Size->value(i); break; } } txt_Size->value(s); } void Font_Browser::fontColor(Fl_Color c) { btn_Color->color(fontcolor = c); box_Example->SetFont(fontnbr, fontsize, fontcolor); box_Example->redraw(); } void Font_Browser::fontName(const char* n) { int s = lst_Font->size(); for (int i = 1; i < s; i++) { if (!strcmp(lst_Font->text(i), n)) { lst_Font->value(i); FontNameSelect(); } } } bool Font_Browser::fixed_width(Fl_Font f) { fl_font(f, FL_NORMAL_SIZE); return fl_width('X') == fl_width('i'); } #include <vector> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Progress.H> class Progress_Window : public Fl_Double_Window { public: Progress_Window(float min = 0.0f, float max = 100.0f, const char* l = 0) : Fl_Double_Window(200, 34), ps(5, 5, 190, 24, l) { end(); range(min, max); ps.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); ps.selection_color(FL_SELECTION_COLOR); set_modal(); callback(nop); if (l && *l) { fl_font(FL_HELVETICA, FL_NORMAL_SIZE); int s = (int)(fl_width(l) + fl_width('W')); if (s > ps.w()) { ps.size(s, ps.h()); size(ps.w() + 10, h()); } } position(Fl::event_x_root() - w() / 2, Fl::event_y_root() - h()); xclass(PACKAGE_TARNAME); show(); } void range(float min, float max) { ps.minimum(min); ps.maximum(max); } void value(float val) { ps.value(val); } static void nop(Fl_Widget*, void*) { } private: Fl_Progress ps; }; void Font_Browser::fontFilter(filter_t filter) { if (this->filter == filter) return; int s = lst_Font->size(); static vector<bool> fixed; if (fixed.empty()) { Progress_Window pw(1, s, _("Reading fonts...")); fixed.resize(s); for (int i = 1; i < s; i++) { fixed[i] = fixed_width((Fl_Font)(intptr_t)(lst_Font->data(i))); pw.value(i); Fl::check(); } } switch (this->filter = filter) { case FIXED_WIDTH: for (int i = 1; i < s; i++) { if (fixed[i]) lst_Font->show(i); else lst_Font->hide(i); } break; case VARIABLE_WIDTH: for (int i = 1; i < s; i++) { if (!fixed[i]) lst_Font->show(i); else lst_Font->hide(i); } break; case ALL_TYPES: for (int i = 1; i < s; i++) lst_Font->show(i); break; } lst_Font->topline(lst_Font->value()); } ////////////////////////////////////////////////////////////////////// Preview_Box::Preview_Box(int x, int y, int w, int h, const char* l) : Fl_Widget(x, y, w, h, l) { fontName = 1; fontSize = FL_NORMAL_SIZE; box(FL_DOWN_BOX); color(FL_BACKGROUND2_COLOR); fontColor = FL_FOREGROUND_COLOR; } void Preview_Box::draw() { draw_box(); fl_font((Fl_Font)fontName, fontSize); fl_color(fontColor); fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align()); } void Preview_Box::SetFont(int fontname, int fontsize, Fl_Color c) { fontName = fontname; fontSize = fontsize; fontColor = c; redraw(); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Editor_mod_1_3.cxx�������������������������������������������������0000664�0001750�0001750�00000056230�12330516146�016771� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Editor_mod.cxx 8034 2010-12-15 12:21:55Z AlbrechtS $" // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include "missing_strings.h" #include <ctype.h> #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/fl_ask.H> #include "Fl_Text_Editor_mod.H" #include "debug.h" /* Keyboard Control Matrix key\modifier plain Ctrl Alt Meta left 1/1 13/9 0/13 0/9 right 2/2 14/10 0/14 0/10 up 3/19 21/7 0/15 0/17 down 4/20 22/8 0/16 0/18 home 9/5 17/0 0/0 0/0 end 10/6 18/0 0/0 0/0 page up 11/7 23/0 0/11 0/0 page down 12/8 24/0 0/12 0/0 (FLTK action / OS X action) (adding the shift key extends the selection, all other combinations are no-op) 0: no-op 1: move cursor to the left, at line beginning wrap to end of prev line, at doc start no-op 2: move cursor to the right, at line end move to beginning of the next line, at doc end no-op 3: move cursor up, at doc top no-op 4: move cursor down, at doc bottom no-op 5: scroll display to top of text (cursor unchanged) 6: scroll display to end of text (cursor unchanged) 7: scroll text down one page (cursor unchanged) 8: scroll text up one page (cursor unchanged) 9: move cursor to beginning of line 10: move cursor to end of line 11: move cursor up one page and scroll down 12: move cursor down one page and scroll up 13: move to the beginning of the word or the previous word 14: move to the end of the word or the next word 15: if start of line: start of prev line, else start of this line 16: if end of line: end of next line, else end of this line 17: move cursor to the beginning of the document 18: move cursor to the end of the document 19: move cursor up, at doc top: home, at doc start: no-op) 20: move cursor down, at doc bot: end, at doc end: no-op) 21: scroll text down one line (cursor unchanged) 22: scroll text up one line (cursor unchanged) 23: move cursor to the beginning of the top of the screen 24: move cursor to the beginning of the bottom of the window */ /** The constructor creates a new text editor widget.*/ Fl_Text_Editor_mod::Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l) : Fl_Text_Display_mod(X, Y, W, H, l) { mCursorOn = 1; insert_mode_ = 1; key_bindings = 0; // handle the default key bindings add_default_key_bindings(&key_bindings); // handle everything else default_key_function(kf_default); } #ifndef FL_DOXYGEN Fl_Text_Editor_mod::Key_Binding* Fl_Text_Editor_mod::global_key_bindings = 0; #endif // These are the default key bindings every widget should start with static struct { int key; int state; Fl_Text_Editor_mod::Key_Func func; } default_key_bindings[] = { { FL_Escape, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_ignore }, { FL_Enter, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_KP_Enter, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_BackSpace, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_backspace }, { FL_Insert, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_insert }, { FL_Delete, Fl_Text_Editor_mod_ANY_STATE, Fl_Text_Editor_mod::kf_delete }, { FL_Home, 0, Fl_Text_Editor_mod::kf_move }, { FL_End, 0, Fl_Text_Editor_mod::kf_move }, { FL_Left, 0, Fl_Text_Editor_mod::kf_move }, { FL_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Right, 0, Fl_Text_Editor_mod::kf_move }, { FL_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Home, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_End, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Left, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Right, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Home, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_End, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Left, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Right, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Home, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_End, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Left, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Right, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, //{ FL_Clear, 0, Fl_Text_Editor_mod::delete_to_eol }, { 'z', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { '/', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { FL_Home, FL_SHIFT, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_CTRL, Fl_Text_Editor_mod::kf_cut }, { FL_Delete, FL_SHIFT, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { FL_Insert, FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_CTRL, Fl_Text_Editor_mod::kf_paste }, { FL_Insert, FL_SHIFT, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_CTRL, Fl_Text_Editor_mod::kf_select_all }, #ifdef __APPLE__ // Define CMD+key accelerators... { 'z', FL_COMMAND, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_COMMAND, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_COMMAND, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_COMMAND, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_COMMAND, Fl_Text_Editor_mod::kf_select_all }, { FL_Left, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Right, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Up, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Down, FL_COMMAND, Fl_Text_Editor_mod::kf_meta_move }, { FL_Left, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Right, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Up, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, { FL_Down, FL_COMMAND|FL_SHIFT, Fl_Text_Editor_mod::kf_m_s_move }, #endif // __APPLE__ { 0, 0, 0 } }; /** Adds all of the default editor key bindings to the specified key binding list.*/ void Fl_Text_Editor_mod::add_default_key_bindings(Key_Binding** list) { for (int i = 0; default_key_bindings[i].key; i++) { add_key_binding(default_key_bindings[i].key, default_key_bindings[i].state, default_key_bindings[i].func, list); } } /** Returns the function associated with a key binding.*/ Fl_Text_Editor_mod::Key_Func Fl_Text_Editor_mod::bound_key_function(int key, int state, Key_Binding* list) { Key_Binding* cur; if (!list) return 0; for (cur = list; cur; cur = cur->next) if (cur->key == key) if (cur->state == Fl_Text_Editor_mod_ANY_STATE || cur->state == state) break; if (!cur) return 0; return cur->function; } /** Removes all of the key bindings associated with the text editor or list.*/ void Fl_Text_Editor_mod::remove_all_key_bindings(Key_Binding** list) { Key_Binding *cur, *next; for (cur = *list; cur; cur = next) { next = cur->next; delete cur; } *list = 0; } /** Removes the key binding associated with the key "key" of state "state" */ void Fl_Text_Editor_mod::remove_key_binding(int key, int state, Key_Binding** list) { Key_Binding *cur, *last = 0; for (cur = *list; cur; last = cur, cur = cur->next) if (cur->key == key && cur->state == state) break; if (!cur) return; if (last) last->next = cur->next; else *list = cur->next; delete cur; } /** Adds a key of state "state" with the function "function" */ void Fl_Text_Editor_mod::add_key_binding(int key, int state, Key_Func function, Key_Binding** list) { Key_Binding* kb = new Key_Binding; kb->key = key; kb->state = state; kb->function = function; kb->next = *list; *list = kb; } //////////////////////////////////////////////////////////////// static void kill_selection(Fl_Text_Editor_mod* e) { if (e->buffer()->selected()) { e->insert_position(e->buffer()->primary_selection()->start()); e->buffer()->remove_selection(); } } /** Inserts the text associated with the key */ int Fl_Text_Editor_mod::kf_default(int c, Fl_Text_Editor_mod* e) { // FIXME: this function is a mess! Fix this! if (!c || (!isprint(c) && c != '\t')) return 0; char s[2] = "\0"; s[0] = (char)c; kill_selection(e); if (e->insert_mode()) e->insert(s); else e->overstrike(s); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Ignores the keypress */ int Fl_Text_Editor_mod::kf_ignore(int, Fl_Text_Editor_mod*) { return 0; // don't handle } /** Does a backspace in the current buffer.*/ int Fl_Text_Editor_mod::kf_backspace(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected() && e->move_left()) { int p1 = e->insert_position(); int p2 = e->buffer()->next_char(p1); e->buffer()->select(p1, p2); } kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Inserts a newline at the current cursor position */ int Fl_Text_Editor_mod::kf_enter(int, Fl_Text_Editor_mod* e) { kill_selection(e); e->insert("\n"); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } extern void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); /** Moves the text cursor in the direction indicated by key c.*/ int Fl_Text_Editor_mod::kf_move(int c, Fl_Text_Editor_mod* e) { int i; int selected = e->buffer()->selected(); if (!selected) e->dragPos = e->insert_position(); e->buffer()->unselect(); Fl::copy("", 0, 0); switch (c) { case FL_Home: e->insert_position(e->buffer()->line_start(e->insert_position())); break; case FL_End: e->insert_position(e->buffer()->line_end(e->insert_position())); break; case FL_Left: e->move_left(); break; case FL_Right: e->move_right(); break; case FL_Up: e->move_up(); break; case FL_Down: e->move_down(); break; case FL_Page_Up: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_up(); break; case FL_Page_Down: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_down(); break; } e->show_insert_position(); return 1; } /** Extends the current selection in the direction of key c.*/ int Fl_Text_Editor_mod::kf_shift_move(int c, Fl_Text_Editor_mod* e) { kf_move(c, e); fl_text_drag_me(e->insert_position(), e); char *copy = e->buffer()->selection_text(); if (copy) { Fl::copy(copy, strlen(copy), 0); free(copy); } return 1; } /** Moves the current text cursor in the direction indicated by control key */ int Fl_Text_Editor_mod::kf_ctrl_move(int c, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->dragPos = e->insert_position(); if (c != FL_Up && c != FL_Down) { e->buffer()->unselect(); Fl::copy("", 0, 0); e->show_insert_position(); } switch (c) { case FL_Home: e->insert_position(0); e->scroll(0, 0); break; case FL_End: e->insert_position(e->buffer()->length()); e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: e->previous_word(); break; case FL_Right: e->next_word(); break; case FL_Up: e->scroll(e->mTopLineNum-1, e->mHorizOffset); break; case FL_Down: e->scroll(e->mTopLineNum+1, e->mHorizOffset); break; case FL_Page_Up: e->insert_position(e->mLineStarts[0]); break; case FL_Page_Down: e->insert_position(e->mLineStarts[e->mNVisibleLines-2]); break; } return 1; } /** Moves the current text cursor in the direction indicated by meta key */ int Fl_Text_Editor_mod::kf_meta_move(int c, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->dragPos = e->insert_position(); if (c != FL_Up && c != FL_Down) { e->buffer()->unselect(); Fl::copy("", 0, 0); e->show_insert_position(); } switch (c) { case FL_Up: // top of buffer e->insert_position(0); e->scroll(0, 0); break; case FL_Down: // end of buffer e->insert_position(e->buffer()->length()); e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: // beginning of line kf_move(FL_Home, e); break; case FL_Right: // end of line kf_move(FL_End, e); break; } return 1; } /** Extends the current selection in the direction indicated by meta key c. */ int Fl_Text_Editor_mod::kf_m_s_move(int c, Fl_Text_Editor_mod* e) { kf_meta_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } /** Extends the current selection in the direction indicated by control key c. */ int Fl_Text_Editor_mod::kf_c_s_move(int c, Fl_Text_Editor_mod* e) { kf_ctrl_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } /** Moves the text cursor to the beginning of the current line.*/ int Fl_Text_Editor_mod::kf_home(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Home, e); } /** Moves the text cursor to the end of the current line.*/ int Fl_Text_Editor_mod::kf_end(int, Fl_Text_Editor_mod* e) { return kf_move(FL_End, e); } /** Moves the text cursor one character to the left.*/ int Fl_Text_Editor_mod::kf_left(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Left, e); } /** Moves the text cursor one line up.*/ int Fl_Text_Editor_mod::kf_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Up, e); } /** Moves the text cursor one character to the right.*/ int Fl_Text_Editor_mod::kf_right(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Right, e); } /** Moves the text cursor one line down.*/ int Fl_Text_Editor_mod::kf_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Down, e); } /** Moves the text cursor up one page.*/ int Fl_Text_Editor_mod::kf_page_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Up, e); } /** Moves the text cursor down one page.*/ int Fl_Text_Editor_mod::kf_page_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Down, e); } /** Toggles the insert mode in the text editor.*/ int Fl_Text_Editor_mod::kf_insert(int, Fl_Text_Editor_mod* e) { e->insert_mode(e->insert_mode() ? 0 : 1); return 1; } /** Does a delete of selected text or the current character in the current buffer.*/ int Fl_Text_Editor_mod::kf_delete(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) { int p1 = e->insert_position(); int p2 = e->buffer()->next_char(p1); e->buffer()->select(p1, p2); } kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Does a copy of selected text or the current character in the current buffer.*/ int Fl_Text_Editor_mod::kf_copy(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) return 1; const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); e->show_insert_position(); return 1; } /** Does a cut of selected text in the current buffer.*/ int Fl_Text_Editor_mod::kf_cut(int c, Fl_Text_Editor_mod* e) { kf_copy(c, e); kill_selection(e); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Does a paste of selected text in the current buffer.*/ int Fl_Text_Editor_mod::kf_paste(int, Fl_Text_Editor_mod* e) { kill_selection(e); Fl::paste(*e, 1); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } /** Selects all text in the current buffer.*/ int Fl_Text_Editor_mod::kf_select_all(int, Fl_Text_Editor_mod* e) { e->buffer()->select(0, e->buffer()->length()); const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } /** Undo last edit in the current buffer. Also deselect previous selection. */ int Fl_Text_Editor_mod::kf_undo(int , Fl_Text_Editor_mod* e) { e->buffer()->unselect(); Fl::copy("", 0, 0); int crsr; int ret = e->buffer()->undo(&crsr); e->insert_position(crsr); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return ret; } /** Handles a key press in the editor */ int Fl_Text_Editor_mod::handle_key() { // Call FLTK's rules to try to turn this into a printing character. // This uses the right-hand ctrl key as a "compose prefix" and returns // the changes that should be made to the text, as a number of // bytes to delete and a string to insert: int del = 0; int key = Fl::event_key(), state = Fl::event_state();//, c = Fl::event_text()[0]; if (key == FL_Caps_Lock) return 0; if (Fl::compose(del)) { if (del) { int dp = insert_position(), di = del; while (di--) dp = buffer()->prev_char_clipped(dp); buffer()->select(dp, insert_position()); } kill_selection(this); if (Fl::event_length()) { if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); } show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } state &= FL_SHIFT|FL_CTRL|FL_ALT|FL_META; // only care about these states Key_Func f; f = bound_key_function(key, state, global_key_bindings); if (!f && key_bindings) f = bound_key_function(key, state, key_bindings); if (f) return f(key, this); if (default_key_function_ && !state) return default_key_function_(key, this); return 0; } /** does or does not a callback according to changed() and when() settings */ void Fl_Text_Editor_mod::maybe_do_callback() { if (changed() || (when()&FL_WHEN_NOT_CHANGED)) do_callback(); } int Fl_Text_Editor_mod::handle(int event) { static int dndCursorPos; if (!buffer()) return 0; switch (event) { case FL_FOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... Fl::focus(this); return 1; case FL_UNFOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... case FL_HIDE: if (when() & FL_WHEN_RELEASE) maybe_do_callback(); return 1; case FL_KEYBOARD: if (active_r() && window() && this == Fl::belowmouse()) window()->cursor(FL_CURSOR_NONE); return handle_key(); case FL_PASTE: if (!Fl::event_text()) { fl_beep(); return 1; } buffer()->remove_selection(); if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; case FL_ENTER: // MRS: WIN32 only? Need to test! // case FL_MOVE: show_cursor(mCursorOn); return 1; case FL_PUSH: if (Fl::event_button() == 2) { // don't let the text_display see this event if (Fl_Group::handle(event)) return 1; dragType = DRAG_NONE; if(buffer()->selected()) { buffer()->unselect(); } int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); insert_position(pos); Fl::paste(*this, 0); Fl::focus(this); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } break; case FL_SHORTCUT: if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) return 0; if (Fl::visible_focus() && handle(FL_FOCUS)) { Fl::focus(this); return 1; } break; // Handle drag'n'drop attempt by the user. This is a simplified // implementation which allows dnd operations onto the scroll bars. case FL_DND_ENTER: // save the current cursor position if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this); show_cursor(mCursorOn); dndCursorPos = insert_position(); /* fall through */ case FL_DND_DRAG: // show a temporary insertion cursor insert_position(xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS)); return 1; case FL_DND_LEAVE: // restore original cursor insert_position(dndCursorPos); return 1; case FL_DND_RELEASE: // keep insertion cursor and wait for the FL_PASTE event buffer()->unselect(); // FL_PASTE must not destroy current selection! return 1; } return Fl_Text_Display_mod::handle(event); } // // End of "$Id: Fl_Text_Editor_mod.cxx 8034 2010-12-15 12:21:55Z AlbrechtS $". // ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Buffer_mod_1_1.cxx�������������������������������������������������0000664�0001750�0001750�00000237324�12330516146�016757� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Buffer.cxx 6011 2008-01-04 20:32:37Z matt $" // // Copyright 2001-2005 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include "missing_strings.h" #include <ctype.h> #include <FL/Fl.H> #include "Fl_Text_Buffer_mod.H" #define PREFERRED_GAP_SIZE 1024 /* Initial size for the buffer gap (empty space in the buffer where text might be inserted if the user is typing sequential chars ) */ static void histogramCharacters( const char *string, int length, char hist[ 256 ], int init ); static void subsChars( char *string, int length, char fromChar, char toChar ); static char chooseNullSubsChar( char hist[ 256 ] ); static void insertColInLine( const char *line, char *insLine, int column, int insWidth, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ); static void deleteRectFromLine( const char *line, int rectStart, int rectEnd, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ); static void overlayRectInLine( const char *line, char *insLine, int rectStart, int rectEnd, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ); static void addPadding( char *string, int startIndent, int toIndent, int tabDist, int useTabs, char nullSubsChar, int *charsAdded ); static char *copyLine( const char* text, int *lineLen ); static int countLines( const char *string ); static int textWidth( const char *text, int tabDist, char nullSubsChar ); static char *realignTabs( const char *text, int origIndent, int newIndent, int tabDist, int useTabs, char nullSubsChar, int *newLength ); static char *expandTabs( const char *text, int startIndent, int tabDist, char nullSubsChar, int *newLen ); static char *unexpandTabs( char *text, int startIndent, int tabDist, char nullSubsChar, int *newLen ); static int max( int i1, int i2 ); static int min( int i1, int i2 ); static const char *ControlCodeTable[ 32 ] = { "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "nl", "vt", "np", "cr", "so", "si", "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us"}; static char* undobuffer; static int undobufferlength; static Fl_Text_Buffer_mod* undowidget; static int undoat; // points after insertion static int undocut; // number of characters deleted there static int undoinsert; // number of characters inserted static int undoyankcut; // length of valid contents of buffer, even if undocut=0 static void undobuffersize(int n) { if (n > undobufferlength) { if (undobuffer) { do {undobufferlength *= 2;} while (undobufferlength < n); undobuffer = (char*)realloc(undobuffer, undobufferlength); } else { undobufferlength = n+9; undobuffer = (char*)malloc(undobufferlength); } } } /* ** Create an empty text buffer of a pre-determined size (use this to ** avoid unnecessary re-allocation if you know exactly how much the buffer ** will need to hold */ Fl_Text_Buffer_mod::Fl_Text_Buffer_mod( int requestedSize ) { mLength = 0; mBuf = (char *)malloc( requestedSize + PREFERRED_GAP_SIZE ); mGapStart = 0; mGapEnd = PREFERRED_GAP_SIZE; mTabDist = 8; mUseTabs = 1; mPrimary.mSelected = 0; mPrimary.mRectangular = 0; mPrimary.mStart = mPrimary.mEnd = 0; mSecondary.mSelected = 0; mSecondary.mStart = mSecondary.mEnd = 0; mSecondary.mRectangular = 0; mHighlight.mSelected = 0; mHighlight.mStart = mHighlight.mEnd = 0; mHighlight.mRectangular = 0; mNodifyProcs = NULL; mCbArgs = NULL; mNModifyProcs = 0; mNPredeleteProcs = 0; mPredeleteProcs = NULL; mPredeleteCbArgs = NULL; mCursorPosHint = 0; mNullSubsChar = '\0'; mCanUndo = 1; #ifdef PURIFY { int i; for (i = mGapStart; i < mGapEnd; i++) mBuf[ i ] = '.'; } #endif } /* ** Free a text buffer */ Fl_Text_Buffer_mod::~Fl_Text_Buffer_mod() { free( mBuf ); if ( mNModifyProcs != 0 ) { delete[] mNodifyProcs; delete[] mCbArgs; } if ( mNPredeleteProcs != 0 ) { delete[] mPredeleteProcs; delete[] mPredeleteCbArgs; } } /* ** Get the entire contents of a text buffer. Memory is allocated to contain ** the returned string, which the caller must free. */ char * Fl_Text_Buffer_mod::text() { char *t; t = (char *)malloc( mLength + 1 ); memcpy( t, mBuf, mGapStart ); memcpy( &t[ mGapStart ], &mBuf[ mGapEnd ], mLength - mGapStart ); t[ mLength ] = '\0'; return t; } /* ** Replace the entire contents of the text buffer */ void Fl_Text_Buffer_mod::text( const char *t ) { int insertedLength, deletedLength; const char *deletedText; call_predelete_callbacks(0, length()); /* Save information for redisplay, and get rid of the old buffer */ deletedText = text(); deletedLength = mLength; free( (void *)mBuf ); /* Start a new buffer with a gap of PREFERRED_GAP_SIZE in the center */ insertedLength = strlen( t ); mBuf = (char *)malloc( insertedLength + PREFERRED_GAP_SIZE ); mLength = insertedLength; mGapStart = insertedLength / 2; mGapEnd = mGapStart + PREFERRED_GAP_SIZE; memcpy( mBuf, t, mGapStart ); memcpy( &mBuf[ mGapEnd ], &t[ mGapStart ], insertedLength - mGapStart ); #ifdef PURIFY { int i; for ( i = mGapStart; i < mGapEnd; i++ ) mBuf[ i ] = '.'; } #endif /* Zero all of the existing selections */ update_selections( 0, deletedLength, 0 ); /* Call the saved display routine(s) to update the screen */ call_modify_callbacks( 0, deletedLength, insertedLength, 0, deletedText ); free( (void *)deletedText ); } /* ** Return a copy of the text between "start" and "end" character positions ** from text buffer "buf". Positions start at 0, and the range does not ** include the character pointed to by "end" */ char * Fl_Text_Buffer_mod::text_range( int start, int end ) { char * s; int copiedLength, part1Length; /* Make sure start and end are ok, and allocate memory for returned string. If start is bad, return "", if end is bad, adjust it. */ if ( start < 0 || start > mLength ) { s = (char *)malloc( 1 ); s[ 0 ] = '\0'; return s; } if ( end < start ) { int temp = start; start = end; end = temp; } if ( end > mLength ) end = mLength; copiedLength = end - start; s = (char *)malloc( copiedLength + 1 ); /* Copy the text from the buffer to the returned string */ if ( end <= mGapStart ) { memcpy( s, &mBuf[ start ], copiedLength ); } else if ( start >= mGapStart ) { memcpy( s, &mBuf[ start + ( mGapEnd - mGapStart ) ], copiedLength ); } else { part1Length = mGapStart - start; memcpy( s, &mBuf[ start ], part1Length ); memcpy( &s[ part1Length ], &mBuf[ mGapEnd ], copiedLength - part1Length ); } s[ copiedLength ] = '\0'; return s; } /* ** Return the character at buffer position "pos". Positions start at 0. */ char Fl_Text_Buffer_mod::character( int pos ) { if ( pos < 0 || pos >= mLength ) return '\0'; if ( pos < mGapStart ) return mBuf[ pos ]; else return mBuf[ pos + mGapEnd - mGapStart ]; } /* ** Insert null-terminated string "text" at position "pos" in "buf" */ void Fl_Text_Buffer_mod::insert( int pos, const char *s ) { int nInserted; /* if pos is not contiguous to existing text, make it */ if ( pos > mLength ) pos = mLength; if ( pos < 0 ) pos = 0; /* Even if nothing is deleted, we must call these callbacks */ call_predelete_callbacks( pos, 0 ); /* insert and redisplay */ nInserted = insert_( pos, s ); mCursorPosHint = pos + nInserted; call_modify_callbacks( pos, 0, nInserted, 0, NULL ); } /* ** Delete the characters between "start" and "end", and insert the ** null-terminated string "text" in their place in in "buf" */ void Fl_Text_Buffer_mod::replace( int start, int end, const char *s ) { const char * deletedText; int nInserted; // Range check... if (!s) return; if (start < 0) start = 0; if (end < 0) end = 0; if (end > mLength) end = mLength; call_predelete_callbacks( start, end-start ); deletedText = text_range( start, end ); remove_( start, end ); //undoyankcut = undocut; nInserted = insert_( start, s ); mCursorPosHint = start + nInserted; call_modify_callbacks( start, end - start, nInserted, 0, deletedText ); free( (void *)deletedText ); } void Fl_Text_Buffer_mod::remove( int start, int end ) { const char * deletedText; /* Make sure the arguments make sense */ if ( start > end ) { int temp = start; start = end; end = temp; } if ( start > mLength ) start = mLength; if ( start < 0 ) start = 0; if ( end > mLength ) end = mLength; if ( end < 0 ) end = 0; if (start == end) return; call_predelete_callbacks( start, end-start ); /* Remove and redisplay */ deletedText = text_range( start, end ); remove_( start, end ); mCursorPosHint = start; call_modify_callbacks( start, end - start, 0, 0, deletedText ); free( (void *)deletedText ); } void Fl_Text_Buffer_mod::copy( Fl_Text_Buffer_mod *fromBuf, int fromStart, int fromEnd, int toPos ) { int copiedLength = fromEnd - fromStart; int part1Length; /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of PREFERRED_GAP_SIZE */ if ( copiedLength > mGapEnd - mGapStart ) reallocate_with_gap( toPos, copiedLength + PREFERRED_GAP_SIZE ); else if ( toPos != mGapStart ) move_gap( toPos ); /* Insert the new text (toPos now corresponds to the start of the gap) */ if ( fromEnd <= fromBuf->mGapStart ) { memcpy( &mBuf[ toPos ], &fromBuf->mBuf[ fromStart ], copiedLength ); } else if ( fromStart >= fromBuf->mGapStart ) { memcpy( &mBuf[ toPos ], &fromBuf->mBuf[ fromStart + ( fromBuf->mGapEnd - fromBuf->mGapStart ) ], copiedLength ); } else { part1Length = fromBuf->mGapStart - fromStart; memcpy( &mBuf[ toPos ], &fromBuf->mBuf[ fromStart ], part1Length ); memcpy( &mBuf[ toPos + part1Length ], &fromBuf->mBuf[ fromBuf->mGapEnd ], copiedLength - part1Length ); } mGapStart += copiedLength; mLength += copiedLength; update_selections( toPos, 0, copiedLength ); } /* ** remove text according to the undo variables or insert text ** from the undo buffer */ int Fl_Text_Buffer_mod::undo(int *cursorPos) { if (undowidget != this || (!undocut && !undoinsert && !mCanUndo)) return 0; int ilen = undocut; int xlen = undoinsert; int b = undoat-xlen; if (xlen && undoyankcut && !ilen) { ilen = undoyankcut; } if (xlen && ilen) { undobuffersize(ilen+1); undobuffer[ilen] = 0; char *tmp = strdup(undobuffer); replace(b, undoat, tmp); if (cursorPos) *cursorPos = mCursorPosHint; free(tmp); } else if (xlen) { remove(b, undoat); if (cursorPos) *cursorPos = mCursorPosHint; } else if (ilen) { undobuffersize(ilen+1); undobuffer[ilen] = 0; insert(undoat, undobuffer); if (cursorPos) *cursorPos = mCursorPosHint; undoyankcut = 0; } return 1; } /* ** let the undo system know if we can undo changes */ void Fl_Text_Buffer_mod::canUndo(char flag) { mCanUndo = flag; } /* ** Insert "text" columnwise into buffer starting at displayed character ** position "column" on the line beginning at "startPos". Opens a rectangular ** space the width and height of "text", by moving all text to the right of ** "column" right. If charsInserted and charsDeleted are not NULL, the ** number of characters inserted and deleted in the operation (beginning ** at startPos) are returned in these arguments */ void Fl_Text_Buffer_mod::insert_column( int column, int startPos, const char *s, int *charsInserted, int *charsDeleted ) { int nLines, lineStartPos, nDeleted, insertDeleted, nInserted; const char *deletedText; nLines = countLines( s ); lineStartPos = line_start( startPos ); nDeleted = line_end( skip_lines( startPos, nLines ) ) - lineStartPos; call_predelete_callbacks( lineStartPos, nDeleted ); deletedText = text_range( lineStartPos, lineStartPos + nDeleted ); insert_column_( column, lineStartPos, s, &insertDeleted, &nInserted, &mCursorPosHint ); if ( nDeleted != insertDeleted ) Fl::error("Fl_Text_Buffer_mod::insert_column(): internal consistency check ins1 failed"); call_modify_callbacks( lineStartPos, nDeleted, nInserted, 0, deletedText ); free( (void *) deletedText ); if ( charsInserted != NULL ) * charsInserted = nInserted; if ( charsDeleted != NULL ) * charsDeleted = nDeleted; } /* ** Overlay "text" between displayed character positions "rectStart" and ** "rectEnd" on the line beginning at "startPos". If charsInserted and ** charsDeleted are not NULL, the number of characters inserted and deleted ** in the operation (beginning at startPos) are returned in these arguments. */ void Fl_Text_Buffer_mod::overlay_rectangular( int startPos, int rectStart, int rectEnd, const char *s, int *charsInserted, int *charsDeleted ) { int nLines, lineStartPos, nDeleted, insertDeleted, nInserted; const char *deletedText; nLines = countLines( s ); lineStartPos = line_start( startPos ); nDeleted = line_end( skip_lines( startPos, nLines ) ) - lineStartPos; call_predelete_callbacks( lineStartPos, nDeleted ); deletedText = text_range( lineStartPos, lineStartPos + nDeleted ); overlay_rectangular_( lineStartPos, rectStart, rectEnd, s, &insertDeleted, &nInserted, &mCursorPosHint ); if ( nDeleted != insertDeleted ) Fl::error("Fl_Text_Buffer_mod::overlay_rectangle(): internal consistency check ovly1 failed"); call_modify_callbacks( lineStartPos, nDeleted, nInserted, 0, deletedText ); free( (void *) deletedText ); if ( charsInserted != NULL ) * charsInserted = nInserted; if ( charsDeleted != NULL ) * charsDeleted = nDeleted; } /* ** Replace a rectangular area in buf, given by "start", "end", "rectStart", ** and "rectEnd", with "text". If "text" is vertically longer than the ** rectangle, add extra lines to make room for it. */ void Fl_Text_Buffer_mod::replace_rectangular( int start, int end, int rectStart, int rectEnd, const char *s ) { char *insPtr; const char *deletedText; char *insText = (char *)""; int i, nInsertedLines, nDeletedLines, insLen, hint; int insertDeleted, insertInserted, deleteInserted; int linesPadded = 0; /* Make sure start and end refer to complete lines, since the columnar delete and insert operations will replace whole lines */ start = line_start( start ); end = line_end( end ); call_predelete_callbacks( start, end-start ); /* If more lines will be deleted than inserted, pad the inserted text with newlines to make it as long as the number of deleted lines. This will indent all of the text to the right of the rectangle to the same column. If more lines will be inserted than deleted, insert extra lines in the buffer at the end of the rectangle to make room for the additional lines in "text" */ nInsertedLines = countLines( s ); nDeletedLines = count_lines( start, end ); if ( nInsertedLines < nDeletedLines ) { insLen = strlen( s ); insText = (char *)malloc( insLen + nDeletedLines - nInsertedLines + 1 ); strcpy( insText, s ); insPtr = insText + insLen; for ( i = 0; i < nDeletedLines - nInsertedLines; i++ ) *insPtr++ = '\n'; *insPtr = '\0'; } else if ( nDeletedLines < nInsertedLines ) { linesPadded = nInsertedLines - nDeletedLines; for ( i = 0; i < linesPadded; i++ ) insert_( end, "\n" ); } /* else nDeletedLines == nInsertedLines; */ /* Save a copy of the text which will be modified for the modify CBs */ deletedText = text_range( start, end ); /* Delete then insert */ remove_rectangular_( start, end, rectStart, rectEnd, &deleteInserted, &hint ); insert_column_( rectStart, start, insText, &insertDeleted, &insertInserted, &mCursorPosHint ); /* Figure out how many chars were inserted and call modify callbacks */ if ( insertDeleted != deleteInserted + linesPadded ) Fl::error("Fl_Text_Buffer_mod::replace_rectangular(): internal consistency check repl1 failed"); call_modify_callbacks( start, end - start, insertInserted, 0, deletedText ); free( (void *) deletedText ); if ( nInsertedLines < nDeletedLines ) free( (void *) insText ); } /* ** Remove a rectangular swath of characters between character positions start ** and end and horizontal displayed-character offsets rectStart and rectEnd. */ void Fl_Text_Buffer_mod::remove_rectangular( int start, int end, int rectStart, int rectEnd ) { const char * deletedText; int nInserted; start = line_start( start ); end = line_end( end ); call_predelete_callbacks( start, end-start ); deletedText = text_range( start, end ); remove_rectangular_( start, end, rectStart, rectEnd, &nInserted, &mCursorPosHint ); call_modify_callbacks( start, end - start, nInserted, 0, deletedText ); free( (void *) deletedText ); } /* ** Clear a rectangular "hole" out of the buffer between character positions ** start and end and horizontal displayed-character offsets rectStart and ** rectEnd. */ void Fl_Text_Buffer_mod::clear_rectangular( int start, int end, int rectStart, int rectEnd ) { int i, nLines; char *newlineString; nLines = count_lines( start, end ); newlineString = (char *)malloc( nLines + 1 ); for ( i = 0; i < nLines; i++ ) newlineString[ i ] = '\n'; newlineString[ i ] = '\0'; overlay_rectangular( start, rectStart, rectEnd, newlineString, NULL, NULL ); free( (void *) newlineString ); } char * Fl_Text_Buffer_mod::text_in_rectangle( int start, int end, int rectStart, int rectEnd ) { int lineStart, selLeft, selRight, len; char *textOut, *outPtr, *retabbedStr; const char *textIn; start = line_start( start ); end = line_end( end ); textOut = (char *)malloc( ( end - start ) + 1 ); lineStart = start; outPtr = textOut; while ( lineStart <= end ) { rectangular_selection_boundaries( lineStart, rectStart, rectEnd, &selLeft, &selRight ); textIn = text_range( selLeft, selRight ); len = selRight - selLeft; memcpy( outPtr, textIn, len ); free( (void *) textIn ); outPtr += len; lineStart = line_end( selRight ) + 1; *outPtr++ = '\n'; } if ( outPtr != textOut ) outPtr--; /* don't leave trailing newline */ *outPtr = '\0'; /* If necessary, realign the tabs in the selection as if the text were positioned at the left margin */ retabbedStr = realignTabs( textOut, rectStart, 0, mTabDist, mUseTabs, mNullSubsChar, &len ); free( (void *) textOut ); return retabbedStr; } /* ** Set the hardware tab distance used by all displays for this buffer, ** and used in computing offsets for rectangular selection operations. */ void Fl_Text_Buffer_mod::tab_distance( int tabDist ) { const char * deletedText; /* First call the pre-delete callbacks with the previous tab setting still active. */ call_predelete_callbacks( 0, mLength ); /* Change the tab setting */ mTabDist = tabDist; /* Force any display routines to redisplay everything (unfortunately, this means copying the whole buffer contents to provide "deletedText" */ deletedText = text(); call_modify_callbacks( 0, mLength, mLength, 0, deletedText ); free( (void *) deletedText ); } void Fl_Text_Buffer_mod::select( int start, int end ) { Fl_Text_Selection oldSelection = mPrimary; mPrimary.set( start, end ); redisplay_selection( &oldSelection, &mPrimary ); } void Fl_Text_Buffer_mod::unselect() { Fl_Text_Selection oldSelection = mPrimary; mPrimary.mSelected = 0; redisplay_selection( &oldSelection, &mPrimary ); } void Fl_Text_Buffer_mod::select_rectangular( int start, int end, int rectStart, int rectEnd ) { Fl_Text_Selection oldSelection = mPrimary; mPrimary.set_rectangular( start, end, rectStart, rectEnd ); redisplay_selection( &oldSelection, &mPrimary ); } int Fl_Text_Buffer_mod::selection_position( int *start, int *end ) { return mPrimary.position( start, end ); } int Fl_Text_Buffer_mod::selection_position( int *start, int *end, int *isRect, int *rectStart, int *rectEnd ) { return mPrimary.position( start, end, isRect, rectStart, rectEnd ); } char * Fl_Text_Buffer_mod::selection_text() { return selection_text_( &mPrimary ); } void Fl_Text_Buffer_mod::remove_selection() { remove_selection_( &mPrimary ); } void Fl_Text_Buffer_mod::replace_selection( const char *s ) { replace_selection_( &mPrimary, s ); } void Fl_Text_Buffer_mod::secondary_select( int start, int end ) { Fl_Text_Selection oldSelection = mSecondary; mSecondary.set( start, end ); redisplay_selection( &oldSelection, &mSecondary ); } void Fl_Text_Buffer_mod::secondary_unselect() { Fl_Text_Selection oldSelection = mSecondary; mSecondary.mSelected = 0; redisplay_selection( &oldSelection, &mSecondary ); } void Fl_Text_Buffer_mod::secondary_select_rectangular( int start, int end, int rectStart, int rectEnd ) { Fl_Text_Selection oldSelection = mSecondary; mSecondary.set_rectangular( start, end, rectStart, rectEnd ); redisplay_selection( &oldSelection, &mSecondary ); } int Fl_Text_Buffer_mod::secondary_selection_position( int *start, int *end ) { return mSecondary.position( start, end ); } int Fl_Text_Buffer_mod::secondary_selection_position( int *start, int *end, int *isRect, int *rectStart, int *rectEnd ) { return mSecondary.position( start, end, isRect, rectStart, rectEnd ); } char * Fl_Text_Buffer_mod::secondary_selection_text() { return selection_text_( &mSecondary ); } void Fl_Text_Buffer_mod::remove_secondary_selection() { remove_selection_( &mSecondary ); } void Fl_Text_Buffer_mod::replace_secondary_selection( const char *s ) { replace_selection_( &mSecondary, s ); } void Fl_Text_Buffer_mod::highlight( int start, int end ) { Fl_Text_Selection oldSelection = mHighlight; mHighlight.set( start, end ); redisplay_selection( &oldSelection, &mHighlight ); } void Fl_Text_Buffer_mod::unhighlight() { Fl_Text_Selection oldSelection = mHighlight; mHighlight.mSelected = 0; redisplay_selection( &oldSelection, &mHighlight ); } void Fl_Text_Buffer_mod::highlight_rectangular( int start, int end, int rectStart, int rectEnd ) { Fl_Text_Selection oldSelection = mHighlight; mHighlight.set_rectangular( start, end, rectStart, rectEnd ); redisplay_selection( &oldSelection, &mHighlight ); } int Fl_Text_Buffer_mod::highlight_position( int *start, int *end ) { return mHighlight.position( start, end ); } int Fl_Text_Buffer_mod::highlight_position( int *start, int *end, int *isRect, int *rectStart, int *rectEnd ) { return mHighlight.position( start, end, isRect, rectStart, rectEnd ); } char * Fl_Text_Buffer_mod::highlight_text() { return selection_text_( &mHighlight ); } /* ** Add a callback routine to be called when the buffer is modified */ void Fl_Text_Buffer_mod::add_modify_callback( Fl_Text_Modify_Cb bufModifiedCB, void *cbArg ) { Fl_Text_Modify_Cb * newModifyProcs; void **newCBArgs; int i; newModifyProcs = new Fl_Text_Modify_Cb [ mNModifyProcs + 1 ]; newCBArgs = new void * [ mNModifyProcs + 1 ]; for ( i = 0; i < mNModifyProcs; i++ ) { newModifyProcs[ i + 1 ] = mNodifyProcs[ i ]; newCBArgs[ i + 1 ] = mCbArgs[ i ]; } if ( mNModifyProcs != 0 ) { delete [] mNodifyProcs; delete [] mCbArgs; } newModifyProcs[ 0 ] = bufModifiedCB; newCBArgs[ 0 ] = cbArg; mNModifyProcs++; mNodifyProcs = newModifyProcs; mCbArgs = newCBArgs; } void Fl_Text_Buffer_mod::remove_modify_callback( Fl_Text_Modify_Cb bufModifiedCB, void *cbArg ) { int i, toRemove = -1; Fl_Text_Modify_Cb *newModifyProcs; void **newCBArgs; /* find the matching callback to remove */ for ( i = 0; i < mNModifyProcs; i++ ) { if ( mNodifyProcs[ i ] == bufModifiedCB && mCbArgs[ i ] == cbArg ) { toRemove = i; break; } } if ( toRemove == -1 ) { Fl::error("Fl_Text_Buffer_mod::remove_modify_callback(): Can't find modify CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNModifyProcs--; if ( mNModifyProcs == 0 ) { mNModifyProcs = 0; delete[] mNodifyProcs; mNodifyProcs = NULL; delete[] mCbArgs; mCbArgs = NULL; return; } newModifyProcs = new Fl_Text_Modify_Cb [ mNModifyProcs ]; newCBArgs = new void * [ mNModifyProcs ]; /* copy out the remaining members and free the old lists */ for ( i = 0; i < toRemove; i++ ) { newModifyProcs[ i ] = mNodifyProcs[ i ]; newCBArgs[ i ] = mCbArgs[ i ]; } for ( ; i < mNModifyProcs; i++ ) { newModifyProcs[ i ] = mNodifyProcs[ i + 1 ]; newCBArgs[ i ] = mCbArgs[ i + 1 ]; } delete[] mNodifyProcs; delete[] mCbArgs; mNodifyProcs = newModifyProcs; mCbArgs = newCBArgs; } /* ** Add a callback routine to be called before text is deleted from the buffer. */ void Fl_Text_Buffer_mod::add_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { Fl_Text_Predelete_Cb *newPreDeleteProcs; void **newCBArgs; int i; newPreDeleteProcs = new Fl_Text_Predelete_Cb[ mNPredeleteProcs + 1 ]; newCBArgs = new void * [ mNPredeleteProcs + 1 ]; for ( i = 0; i < mNPredeleteProcs; i++ ) { newPreDeleteProcs[i + 1] = mPredeleteProcs[i]; newCBArgs[i + 1] = mPredeleteCbArgs[i]; } if (! mNPredeleteProcs != 0) { delete [] mPredeleteProcs; delete [] mPredeleteCbArgs; } newPreDeleteProcs[0] = bufPreDeleteCB; newCBArgs[0] = cbArg; mNPredeleteProcs++; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } void Fl_Text_Buffer_mod::remove_predelete_callback( Fl_Text_Predelete_Cb bufPreDeleteCB, void *cbArg) { int i, toRemove = -1; Fl_Text_Predelete_Cb *newPreDeleteProcs; void **newCBArgs; /* find the matching callback to remove */ for ( i = 0; i < mNPredeleteProcs; i++) { if (mPredeleteProcs[i] == bufPreDeleteCB && mPredeleteCbArgs[i] == cbArg) { toRemove = i; break; } } if (toRemove == -1) { Fl::error("Fl_Text_Buffer_mod::remove_predelete_callback(): Can't find pre-delete CB to remove"); return; } /* Allocate new lists for remaining callback procs and args (if any are left) */ mNPredeleteProcs--; if (mNPredeleteProcs == 0) { mNPredeleteProcs = 0; delete[] mPredeleteProcs; mPredeleteProcs = NULL; delete[] mPredeleteCbArgs; mPredeleteCbArgs = NULL; return; } newPreDeleteProcs = new Fl_Text_Predelete_Cb [ mNPredeleteProcs ]; newCBArgs = new void * [ mNPredeleteProcs ]; /* copy out the remaining members and free the old lists */ for ( i = 0; i < toRemove; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i]; newCBArgs[i] = mPredeleteCbArgs[i]; } for ( ; i < mNPredeleteProcs; i++) { newPreDeleteProcs[i] = mPredeleteProcs[i+1]; newCBArgs[i] = mPredeleteCbArgs[i+1]; } delete[] mPredeleteProcs; delete[] mPredeleteCbArgs; mPredeleteProcs = newPreDeleteProcs; mPredeleteCbArgs = newCBArgs; } /* ** Return the text from the entire line containing position "pos" */ char * Fl_Text_Buffer_mod::line_text( int pos ) { return text_range( line_start( pos ), line_end( pos ) ); } /* ** Find the position of the start of the line containing position "pos" */ int Fl_Text_Buffer_mod::line_start( int pos ) { if ( !findchar_backward( pos, '\n', &pos ) ) return 0; return pos + 1; } /* ** Find the position of the end of the line containing position "pos" ** (which is either a pointer to the newline character ending the line, ** or a pointer to one character beyond the end of the buffer) */ int Fl_Text_Buffer_mod::line_end( int pos ) { if ( !findchar_forward( pos, '\n', &pos ) ) pos = mLength; return pos; } int Fl_Text_Buffer_mod::word_start( int pos ) { while ( pos && ( isalnum( character( pos ) ) || character( pos ) == '_' ) ) { pos--; } if ( !( isalnum( character( pos ) ) || character( pos ) == '_' ) ) pos++; return pos; } int Fl_Text_Buffer_mod::word_end( int pos ) { while (pos < length() && (isalnum(character(pos)) || character(pos) == '_' )) { pos++; } return pos; } /* ** Get a character from the text buffer expanded into it's screen ** representation (which may be several characters for a tab or a ** control code). Returns the number of characters written to "outStr". ** "indent" is the number of characters from the start of the line ** for figuring tabs. Output string is guranteed to be shorter or ** equal in length to FL_TEXT_MAX_EXP_CHAR_LEN */ int Fl_Text_Buffer_mod::expand_character( int pos, int indent, char *outStr ) { return expand_character( character( pos ), indent, outStr, mTabDist, mNullSubsChar ); } /* ** Expand a single character from the text buffer into it's screen ** representation (which may be several characters for a tab or a ** control code). Returns the number of characters added to "outStr". ** "indent" is the number of characters from the start of the line ** for figuring tabs. Output string is guranteed to be shorter or ** equal in length to FL_TEXT_MAX_EXP_CHAR_LEN */ int Fl_Text_Buffer_mod::expand_character( char c, int indent, char *outStr, int tabDist, char nullSubsChar ) { int i, nSpaces; /* Convert tabs to spaces */ if ( c == '\t' ) { nSpaces = tabDist - ( indent % tabDist ); for ( i = 0; i < nSpaces; i++ ) outStr[ i ] = ' '; return nSpaces; } /* Convert control codes to readable character sequences */ /*... is this safe with international character sets? */ if ( ( ( unsigned char ) c ) <= 31 ) { sprintf( outStr, "<%s>", ControlCodeTable[ ( unsigned char ) c ] ); return strlen( outStr ); } else if ( c == 127 ) { sprintf( outStr, "<del>" ); return 5; } else if ( c == nullSubsChar ) { sprintf( outStr, "<nul>" ); return 5; } /* Otherwise, just return the character */ *outStr = c; return 1; } /* ** Return the length in displayed characters of character "c" expanded ** for display (as discussed above in BufGetExpandedChar). If the ** buffer for which the character width is being measured is doing null ** substitution, nullSubsChar should be passed as that character (or nul ** to ignore). */ int Fl_Text_Buffer_mod::character_width( char c, int indent, int tabDist, char nullSubsChar ) { /* Note, this code must parallel that in Fl_Text_Buffer_mod::ExpandCharacter */ if ( c == '\t' ) return tabDist - ( indent % tabDist ); else if ( ( ( unsigned char ) c ) <= 31 ) return strlen( ControlCodeTable[ ( unsigned char ) c ] ) + 2; else if ( c == 127 ) return 5; else if ( c == nullSubsChar ) return 5; return 1; } /* ** Count the number of displayed characters between buffer position ** "lineStartPos" and "targetPos". (displayed characters are the characters ** shown on the screen to represent characters in the buffer, where tabs and ** control characters are expanded) */ int Fl_Text_Buffer_mod::count_displayed_characters( int lineStartPos, int targetPos ) { int pos, charCount = 0; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; pos = lineStartPos; while ( pos < targetPos ) charCount += expand_character( pos++, charCount, expandedChar ); return charCount; } /* ** Count forward from buffer position "startPos" in displayed characters ** (displayed characters are the characters shown on the screen to represent ** characters in the buffer, where tabs and control characters are expanded) */ int Fl_Text_Buffer_mod::skip_displayed_characters( int lineStartPos, int nChars ) { int pos, charCount = 0; char c; pos = lineStartPos; while ( charCount < nChars && pos < mLength ) { c = character( pos ); if ( c == '\n' ) return pos; charCount += character_width( c, charCount, mTabDist, mNullSubsChar ); pos++; } return pos; } /* ** Count the number of newlines between startPos and endPos in buffer "buf". ** The character at position "endPos" is not counted. */ int Fl_Text_Buffer_mod::count_lines( int startPos, int endPos ) { int pos, gapLen = mGapEnd - mGapStart; int lineCount = 0; pos = startPos; while ( pos < mGapStart ) { if ( pos == endPos ) return lineCount; if ( mBuf[ pos++ ] == '\n' ) lineCount++; } while ( pos < mLength ) { if ( pos == endPos ) return lineCount; if ( mBuf[ pos++ + gapLen ] == '\n' ) lineCount++; } return lineCount; } /* ** Find the first character of the line "nLines" forward from "startPos" ** in "buf" and return its position */ int Fl_Text_Buffer_mod::skip_lines( int startPos, int nLines ) { int pos, gapLen = mGapEnd - mGapStart; int lineCount = 0; if ( nLines == 0 ) return startPos; pos = startPos; while ( pos < mGapStart ) { if ( mBuf[ pos++ ] == '\n' ) { lineCount++; if ( lineCount == nLines ) return pos; } } while ( pos < mLength ) { if ( mBuf[ pos++ + gapLen ] == '\n' ) { lineCount++; if ( lineCount >= nLines ) return pos; } } return pos; } /* ** Find the position of the first character of the line "nLines" backwards ** from "startPos" (not counting the character pointed to by "startpos" if ** that is a newline) in "buf". nLines == 0 means find the beginning of ** the line */ int Fl_Text_Buffer_mod::rewind_lines( int startPos, int nLines ) { int pos, gapLen = mGapEnd - mGapStart; int lineCount = -1; pos = startPos - 1; if ( pos <= 0 ) return 0; while ( pos >= mGapStart ) { if ( mBuf[ pos + gapLen ] == '\n' ) { if ( ++lineCount >= nLines ) return pos + 1; } pos--; } while ( pos >= 0 ) { if ( mBuf[ pos ] == '\n' ) { if ( ++lineCount >= nLines ) return pos + 1; } pos--; } return 0; } /* ** Search forwards in buffer for string "searchString", starting with the ** character "startPos", and returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::search_forward( int startPos, const char *searchString, int *foundPos, int matchCase ) { if (!searchString) return 0; int bp; const char* sp; while (startPos < length()) { bp = startPos; sp = searchString; do { if (!*sp) { *foundPos = startPos; return 1; } } while ((matchCase ? character(bp++) == *sp++ : toupper(character(bp++)) == toupper(*sp++)) && bp < length()); startPos++; } return 0; } /* ** Search backwards in buffer for string "searchString", starting with the ** character BEFORE "startPos", returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::search_backward( int startPos, const char *searchString, int *foundPos, int matchCase ) { if (!searchString) return 0; int bp; const char* sp; while (startPos > 0) { bp = startPos-1; sp = searchString+strlen(searchString)-1; do { if (sp < searchString) { *foundPos = bp+1; return 1; } } while ((matchCase ? character(bp--) == *sp-- : toupper(character(bp--)) == toupper(*sp--)) && bp >= 0); startPos--; } return 0; } /* ** Search forwards in buffer for characters in "searchChars", starting ** with the character "startPos", and returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_forward( int startPos, const char *searchChars, int *foundPos ) { int pos, gapLen = mGapEnd - mGapStart; const char *c; pos = startPos; while ( pos < mGapStart ) { for ( c = searchChars; *c != '\0'; c++ ) { if ( mBuf[ pos ] == *c ) { *foundPos = pos; return 1; } } pos++; } while ( pos < mLength ) { for ( c = searchChars; *c != '\0'; c++ ) { if ( mBuf[ pos + gapLen ] == *c ) { *foundPos = pos; return 1; } } pos++; } *foundPos = mLength; return 0; } /* ** Search backwards in buffer for characters in "searchChars", starting ** with the character BEFORE "startPos", returning the result in "foundPos" ** returns 1 if found, 0 if not. */ int Fl_Text_Buffer_mod::findchars_backward( int startPos, const char *searchChars, int *foundPos ) { int pos, gapLen = mGapEnd - mGapStart; const char *c; if ( startPos == 0 ) { *foundPos = 0; return 0; } pos = startPos == 0 ? 0 : startPos - 1; while ( pos >= mGapStart ) { for ( c = searchChars; *c != '\0'; c++ ) { if ( mBuf[ pos + gapLen ] == *c ) { *foundPos = pos; return 1; } } pos--; } while ( pos >= 0 ) { for ( c = searchChars; *c != '\0'; c++ ) { if ( mBuf[ pos ] == *c ) { *foundPos = pos; return 1; } } pos--; } *foundPos = 0; return 0; } /* ** A horrible design flaw in NEdit (from the very start, before we knew that ** NEdit would become so popular), is that it uses C NULL terminated strings ** to hold text. This means editing text containing NUL characters is not ** possible without special consideration. Here is the special consideration. ** The routines below maintain a special substitution-character which stands ** in for a null, and translates strings an buffers back and forth from/to ** the substituted form, figure out what to substitute, and figure out ** when we're in over our heads and no translation is possible. */ /* ** The primary routine for integrating new text into a text buffer with ** substitution of another character for ascii nuls. This substitutes null ** characters in the string in preparation for being copied or replaced ** into the buffer, and if neccessary, adjusts the buffer as well, in the ** event that the string contains the character it is currently using for ** substitution. Returns 0, if substitution is no longer possible ** because all non-printable characters are already in use. */ int Fl_Text_Buffer_mod::substitute_null_characters( char *string, int len ) { char histogram[ 256 ]; /* Find out what characters the string contains */ histogramCharacters( string, len, histogram, 1 ); /* Does the string contain the null-substitute character? If so, re- histogram the buffer text to find a character which is ok in both the string and the buffer, and change the buffer's null-substitution character. If none can be found, give up and return 0 */ if ( histogram[ ( unsigned char ) mNullSubsChar ] != 0 ) { char * bufString; char newSubsChar; bufString = (char*)text(); histogramCharacters( bufString, mLength, histogram, 0 ); newSubsChar = chooseNullSubsChar( histogram ); if ( newSubsChar == '\0' ) return 0; subsChars( bufString, mLength, mNullSubsChar, newSubsChar ); remove_( 0, mLength ); insert_( 0, bufString ); free( (void *) bufString ); mNullSubsChar = newSubsChar; } /* If the string contains null characters, substitute them with the buffer's null substitution character */ if ( histogram[ 0 ] != 0 ) subsChars( string, len, '\0', mNullSubsChar ); return 1; } /* ** Convert strings obtained from buffers which contain null characters, which ** have been substituted for by a special substitution character, back to ** a null-containing string. There is no time penalty for calling this ** routine if no substitution has been done. */ void Fl_Text_Buffer_mod::unsubstitute_null_characters( char *string ) { register char * c, subsChar = mNullSubsChar; if ( subsChar == '\0' ) return; for ( c = string; *c != '\0'; c++ ) if ( *c == subsChar ) * c = '\0'; } /* ** Create a pseudo-histogram of the characters in a string (don't actually ** count, because we don't want overflow, just mark the character's presence ** with a 1). If init is true, initialize the histogram before acumulating. ** if not, add the new data to an existing histogram. */ static void histogramCharacters( const char *string, int length, char hist[ 256 ], int init ) { int i; const char *c; if ( init ) for ( i = 0; i < 256; i++ ) hist[ i ] = 0; for ( c = string; c < &string[ length ]; c++ ) hist[ *( ( unsigned char * ) c ) ] |= 1; } /* ** Substitute fromChar with toChar in string. */ static void subsChars( char *string, int length, char fromChar, char toChar ) { char * c; for ( c = string; c < &string[ length ]; c++ ) if ( *c == fromChar ) * c = toChar; } /* ** Search through ascii control characters in histogram in order of least ** likelihood of use, find an unused character to use as a stand-in for a ** null. If the character set is full (no available characters outside of ** the printable set, return the null character. */ static char chooseNullSubsChar( char hist[ 256 ] ) { #define N_REPLACEMENTS 25 static unsigned char replacements[ N_REPLACEMENTS ] = {1, 2, 3, 4, 5, 6, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 11, 7}; int i; for ( i = 0; i < N_REPLACEMENTS; i++ ) if ( hist[ replacements[ i ] ] == 0 ) return replacements[ i ]; return '\0'; } /* ** Internal (non-redisplaying) version of BufInsert. Returns the length of ** text inserted (this is just strlen(text), however this calculation can be ** expensive and the length will be required by any caller who will continue ** on to call redisplay). pos must be contiguous with the existing text in ** the buffer (i.e. not past the end). */ int Fl_Text_Buffer_mod::insert_( int pos, const char *s ) { int insertedLength = strlen( s ); /* Prepare the buffer to receive the new text. If the new text fits in the current buffer, just move the gap (if necessary) to where the text should be inserted. If the new text is too large, reallocate the buffer with a gap large enough to accomodate the new text and a gap of PREFERRED_GAP_SIZE */ if ( insertedLength > mGapEnd - mGapStart ) reallocate_with_gap( pos, insertedLength + PREFERRED_GAP_SIZE ); else if ( pos != mGapStart ) move_gap( pos ); /* Insert the new text (pos now corresponds to the start of the gap) */ memcpy( &mBuf[ pos ], s, insertedLength ); mGapStart += insertedLength; mLength += insertedLength; update_selections( pos, 0, insertedLength ); if (mCanUndo) { if ( undowidget==this && undoat==pos && undoinsert ) { undoinsert += insertedLength; } else { undoinsert = insertedLength; undoyankcut = (undoat==pos) ? undocut : 0 ; } undoat = pos+insertedLength; undocut = 0; undowidget = this; } return insertedLength; } /* ** Internal (non-redisplaying) version of BufRemove. Removes the contents ** of the buffer between start and end (and moves the gap to the site of ** the delete). */ void Fl_Text_Buffer_mod::remove_( int start, int end ) { /* if the gap is not contiguous to the area to remove, move it there */ if (mCanUndo) { if ( undowidget==this && undoat==end && undocut ) { undobuffersize( undocut+end-start+1 ); memmove( undobuffer+end-start, undobuffer, undocut ); undocut += end-start; } else { undocut = end-start; undobuffersize(undocut); } undoat = start; undoinsert = 0; undoyankcut = 0; undowidget = this; } if ( start > mGapStart ) { if (mCanUndo) memcpy( undobuffer, mBuf+(mGapEnd-mGapStart)+start, end-start ); move_gap( start ); } else if ( end < mGapStart ) { if (mCanUndo) memcpy( undobuffer, mBuf+start, end-start ); move_gap( end ); } else { int prelen = mGapStart - start; if (mCanUndo) { memcpy( undobuffer, mBuf+start, prelen ); memcpy( undobuffer+prelen, mBuf+mGapEnd, end-start-prelen); } } /* expand the gap to encompass the deleted characters */ mGapEnd += end - mGapStart; mGapStart -= mGapStart - start; /* update the length */ mLength -= end - start; /* fix up any selections which might be affected by the change */ update_selections( start, end - start, 0 ); } /* ** Insert a column of text without calling the modify callbacks. Note that ** in some pathological cases, inserting can actually decrease the size of ** the buffer because of spaces being coalesced into tabs. "nDeleted" and ** "nInserted" return the number of characters deleted and inserted beginning ** at the start of the line containing "startPos". "endPos" returns buffer ** position of the lower left edge of the inserted column (as a hint for ** routines which need to set a cursor position). */ void Fl_Text_Buffer_mod::insert_column_( int column, int startPos, const char *insText, int *nDeleted, int *nInserted, int *endPos ) { int nLines, start, end, insWidth, lineStart, lineEnd; int expReplLen, expInsLen, len, endOffset; char *c, *outStr, *outPtr, *expText, *insLine; const char *line; const char *replText; const char *insPtr; if ( column < 0 ) column = 0; /* Allocate a buffer for the replacement string large enough to hold possibly expanded tabs in both the inserted text and the replaced area, as well as per line: 1) an additional 2*FL_TEXT_MAX_EXP_CHAR_LEN characters for padding where tabs and control characters cross the column of the selection, 2) up to "column" additional spaces per line for padding out to the position of "column", 3) padding up to the width of the inserted text if that must be padded to align the text beyond the inserted column. (Space for additional newlines if the inserted text extends beyond the end of the buffer is counted with the length of insText) */ start = line_start( startPos ); nLines = countLines( insText ) + 1; insWidth = textWidth( insText, mTabDist, mNullSubsChar ); end = line_end( skip_lines( start, nLines - 1 ) ); replText = text_range( start, end ); expText = expandTabs( replText, 0, mTabDist, mNullSubsChar, &expReplLen ); free( (void *) replText ); free( (void *) expText ); expText = expandTabs( insText, 0, mTabDist, mNullSubsChar, &expInsLen ); free( (void *) expText ); outStr = (char *)malloc( expReplLen + expInsLen + nLines * ( column + insWidth + FL_TEXT_MAX_EXP_CHAR_LEN ) + 1 ); /* Loop over all lines in the buffer between start and end removing the text between rectStart and rectEnd and padding appropriately. Trim trailing space from line (whitespace at the ends of lines otherwise tends to multiply, since additional padding is added to maintain it */ outPtr = outStr; lineStart = start; insPtr = insText; for (;;) { lineEnd = line_end( lineStart ); line = text_range( lineStart, lineEnd ); insLine = copyLine( insPtr, &len ); insPtr += len; insertColInLine( line, insLine, column, insWidth, mTabDist, mUseTabs, mNullSubsChar, outPtr, &len, &endOffset ); free( (void *) line ); free( (void *) insLine ); for ( c = outPtr + len - 1; c > outPtr && isspace( *c ); c-- ) len--; outPtr += len; *outPtr++ = '\n'; lineStart = lineEnd < mLength ? lineEnd + 1 : mLength; if ( *insPtr == '\0' ) break; insPtr++; } if ( outPtr != outStr ) outPtr--; /* trim back off extra newline */ *outPtr = '\0'; /* replace the text between start and end with the new stuff */ remove_( start, end ); insert_( start, outStr ); *nInserted = outPtr - outStr; *nDeleted = end - start; *endPos = start + ( outPtr - outStr ) - len + endOffset; free( (void *) outStr ); } /* ** Delete a rectangle of text without calling the modify callbacks. Returns ** the number of characters replacing those between start and end. Note that ** in some pathological cases, deleting can actually increase the size of ** the buffer because of tab expansions. "endPos" returns the buffer position ** of the point in the last line where the text was removed (as a hint for ** routines which need to position the cursor after a delete operation) */ void Fl_Text_Buffer_mod::remove_rectangular_( int start, int end, int rectStart, int rectEnd, int *replaceLen, int *endPos ) { int nLines, lineStart, lineEnd, len, endOffset; char *outStr, *outPtr, *expText; const char *s, *line; /* allocate a buffer for the replacement string large enough to hold possibly expanded tabs as well as an additional FL_TEXT_MAX_EXP_CHAR_LEN * 2 characters per line for padding where tabs and control characters cross the edges of the selection */ start = line_start( start ); end = line_end( end ); nLines = count_lines( start, end ) + 1; s = text_range( start, end ); expText = expandTabs( s, 0, mTabDist, mNullSubsChar, &len ); free( (void *) s ); free( (void *) expText ); outStr = (char *)malloc( len + nLines * FL_TEXT_MAX_EXP_CHAR_LEN * 2 + 1 ); /* loop over all lines in the buffer between start and end removing the text between rectStart and rectEnd and padding appropriately */ lineStart = start; outPtr = outStr; endOffset = 0; while ( lineStart <= mLength && lineStart <= end ) { lineEnd = line_end( lineStart ); line = text_range( lineStart, lineEnd ); deleteRectFromLine( line, rectStart, rectEnd, mTabDist, mUseTabs, mNullSubsChar, outPtr, &len, &endOffset ); free( (void *) line ); outPtr += len; *outPtr++ = '\n'; lineStart = lineEnd + 1; } if ( outPtr != outStr ) outPtr--; /* trim back off extra newline */ *outPtr = '\0'; /* replace the text between start and end with the newly created string */ remove_( start, end ); insert_( start, outStr ); *replaceLen = outPtr - outStr; *endPos = start + ( outPtr - outStr ) - len + endOffset; free( (void *) outStr ); } /* ** Overlay a rectangular area of text without calling the modify callbacks. ** "nDeleted" and "nInserted" return the number of characters deleted and ** inserted beginning at the start of the line containing "startPos". ** "endPos" returns buffer position of the lower left edge of the inserted ** column (as a hint for routines which need to set a cursor position). */ void Fl_Text_Buffer_mod::overlay_rectangular_(int startPos, int rectStart, int rectEnd, const char *insText, int *nDeleted, int *nInserted, int *endPos ) { int nLines, start, end, lineStart, lineEnd; int expInsLen, len, endOffset; char *c, *outStr, *outPtr, *expText, *insLine; const char *line; const char *insPtr; /* Allocate a buffer for the replacement string large enough to hold possibly expanded tabs in the inserted text, as well as per line: 1) an additional 2*FL_TEXT_MAX_EXP_CHAR_LEN characters for padding where tabs and control characters cross the column of the selection, 2) up to "column" additional spaces per line for padding out to the position of "column", 3) padding up to the width of the inserted text if that must be padded to align the text beyond the inserted column. (Space for additional newlines if the inserted text extends beyond the end of the buffer is counted with the length of insText) */ start = line_start( startPos ); nLines = countLines( insText ) + 1; end = line_end( skip_lines( start, nLines - 1 ) ); expText = expandTabs( insText, 0, mTabDist, mNullSubsChar, &expInsLen ); free( (void *) expText ); outStr = (char *)malloc( end - start + expInsLen + nLines * ( rectEnd + FL_TEXT_MAX_EXP_CHAR_LEN ) + 1 ); /* Loop over all lines in the buffer between start and end overlaying the text between rectStart and rectEnd and padding appropriately. Trim trailing space from line (whitespace at the ends of lines otherwise tends to multiply, since additional padding is added to maintain it */ outPtr = outStr; lineStart = start; insPtr = insText; for (;;) { lineEnd = line_end( lineStart ); line = text_range( lineStart, lineEnd ); insLine = copyLine( insPtr, &len ); insPtr += len; overlayRectInLine( line, insLine, rectStart, rectEnd, mTabDist, mUseTabs, mNullSubsChar, outPtr, &len, &endOffset ); free( (void *) line ); free( (void *) insLine ); for ( c = outPtr + len - 1; c > outPtr && isspace( *c ); c-- ) len--; outPtr += len; *outPtr++ = '\n'; lineStart = lineEnd < mLength ? lineEnd + 1 : mLength; if ( *insPtr == '\0' ) break; insPtr++; } if ( outPtr != outStr ) outPtr--; /* trim back off extra newline */ *outPtr = '\0'; /* replace the text between start and end with the new stuff */ remove_( start, end ); insert_( start, outStr ); *nInserted = outPtr - outStr; *nDeleted = end - start; *endPos = start + ( outPtr - outStr ) - len + endOffset; free( (void *) outStr ); } /* ** Insert characters from single-line string "insLine" in single-line string ** "line" at "column", leaving "insWidth" space before continuing line. ** "outLen" returns the number of characters written to "outStr", "endOffset" ** returns the number of characters from the beginning of the string to ** the right edge of the inserted text (as a hint for routines which need ** to position the cursor). */ static void insertColInLine( const char *line, char *insLine, int column, int insWidth, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ) { char * c, *outPtr, *retabbedStr; const char *linePtr; int indent, toIndent, len, postColIndent; /* copy the line up to "column" */ outPtr = outStr; indent = 0; for ( linePtr = line; *linePtr != '\0'; linePtr++ ) { len = Fl_Text_Buffer_mod::character_width( *linePtr, indent, tabDist, nullSubsChar ); if ( indent + len > column ) break; indent += len; *outPtr++ = *linePtr; } /* If "column" falls in the middle of a character, and the character is a tab, leave it off and leave the indent short and it will get padded later. If it's a control character, insert it and adjust indent accordingly. */ if ( indent < column && *linePtr != '\0' ) { postColIndent = indent + len; if ( *linePtr == '\t' ) linePtr++; else { *outPtr++ = *linePtr++; indent += len; } } else postColIndent = indent; /* If there's no text after the column and no text to insert, that's all */ if ( *insLine == '\0' && *linePtr == '\0' ) { *outLen = *endOffset = outPtr - outStr; return; } /* pad out to column if text is too short */ if ( indent < column ) { addPadding( outPtr, indent, column, tabDist, useTabs, nullSubsChar, &len ); outPtr += len; indent = column; } /* Copy the text from "insLine" (if any), recalculating the tabs as if the inserted string began at column 0 to its new column destination */ if ( *insLine != '\0' ) { retabbedStr = realignTabs( insLine, 0, indent, tabDist, useTabs, nullSubsChar, &len ); for ( c = retabbedStr; *c != '\0'; c++ ) { *outPtr++ = *c; len = Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); indent += len; } free( (void *) retabbedStr ); } /* If the original line did not extend past "column", that's all */ if ( *linePtr == '\0' ) { *outLen = *endOffset = outPtr - outStr; return; } /* Pad out to column + width of inserted text + (additional original offset due to non-breaking character at column) */ toIndent = column + insWidth + postColIndent - column; addPadding( outPtr, indent, toIndent, tabDist, useTabs, nullSubsChar, &len ); outPtr += len; indent = toIndent; /* realign tabs for text beyond "column" and write it out */ retabbedStr = realignTabs( linePtr, postColIndent, indent, tabDist, useTabs, nullSubsChar, &len ); strcpy( outPtr, retabbedStr ); free( (void *) retabbedStr ); *endOffset = outPtr - outStr; *outLen = ( outPtr - outStr ) + len; } /* ** Remove characters in single-line string "line" between displayed positions ** "rectStart" and "rectEnd", and write the result to "outStr", which is ** assumed to be large enough to hold the returned string. Note that in ** certain cases, it is possible for the string to get longer due to ** expansion of tabs. "endOffset" returns the number of characters from ** the beginning of the string to the point where the characters were ** deleted (as a hint for routines which need to position the cursor). */ static void deleteRectFromLine( const char *line, int rectStart, int rectEnd, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ) { int indent, preRectIndent, postRectIndent, len; const char *c; char *retabbedStr, *outPtr; /* copy the line up to rectStart */ outPtr = outStr; indent = 0; for ( c = line; *c != '\0'; c++ ) { if ( indent > rectStart ) break; len = Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); if ( indent + len > rectStart && ( indent == rectStart || *c == '\t' ) ) break; indent += len; *outPtr++ = *c; } preRectIndent = indent; /* skip the characters between rectStart and rectEnd */ for ( ; *c != '\0' && indent < rectEnd; c++ ) indent += Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); postRectIndent = indent; /* If the line ended before rectEnd, there's nothing more to do */ if ( *c == '\0' ) { *outPtr = '\0'; *outLen = *endOffset = outPtr - outStr; return; } /* fill in any space left by removed tabs or control characters which straddled the boundaries */ indent = max( rectStart + postRectIndent - rectEnd, preRectIndent ); addPadding( outPtr, preRectIndent, indent, tabDist, useTabs, nullSubsChar, &len ); outPtr += len; /* Copy the rest of the line. If the indentation has changed, preserve the position of non-whitespace characters by converting tabs to spaces, then back to tabs with the correct offset */ retabbedStr = realignTabs( c, postRectIndent, indent, tabDist, useTabs, nullSubsChar, &len ); strcpy( outPtr, retabbedStr ); free( (void *) retabbedStr ); *endOffset = outPtr - outStr; *outLen = ( outPtr - outStr ) + len; } /* ** Overlay characters from single-line string "insLine" on single-line string ** "line" between displayed character offsets "rectStart" and "rectEnd". ** "outLen" returns the number of characters written to "outStr", "endOffset" ** returns the number of characters from the beginning of the string to ** the right edge of the inserted text (as a hint for routines which need ** to position the cursor). */ static void overlayRectInLine( const char *line, char *insLine, int rectStart, int rectEnd, int tabDist, int useTabs, char nullSubsChar, char *outStr, int *outLen, int *endOffset ) { char * c, *outPtr, *retabbedStr; int inIndent, outIndent, len, postRectIndent; const char *linePtr; /* copy the line up to "rectStart" */ outPtr = outStr; inIndent = outIndent = 0; for ( linePtr = line; *linePtr != '\0'; linePtr++ ) { len = Fl_Text_Buffer_mod::character_width( *linePtr, inIndent, tabDist, nullSubsChar ); if ( inIndent + len > rectStart ) break; inIndent += len; outIndent += len; *outPtr++ = *linePtr; } /* If "rectStart" falls in the middle of a character, and the character is a tab, leave it off and leave the outIndent short and it will get padded later. If it's a control character, insert it and adjust outIndent accordingly. */ if ( inIndent < rectStart && *linePtr != '\0' ) { if ( *linePtr == '\t' ) { linePtr++; inIndent += len; } else { *outPtr++ = *linePtr++; outIndent += len; inIndent += len; } } /* skip the characters between rectStart and rectEnd */ postRectIndent = rectEnd; for ( ; *linePtr != '\0'; linePtr++ ) { inIndent += Fl_Text_Buffer_mod::character_width( *linePtr, inIndent, tabDist, nullSubsChar ); if ( inIndent >= rectEnd ) { linePtr++; postRectIndent = inIndent; break; } } /* If there's no text after rectStart and no text to insert, that's all */ if ( *insLine == '\0' && *linePtr == '\0' ) { *outLen = *endOffset = outPtr - outStr; return; } /* pad out to rectStart if text is too short */ if ( outIndent < rectStart ) { addPadding( outPtr, outIndent, rectStart, tabDist, useTabs, nullSubsChar, &len ); outPtr += len; } outIndent = rectStart; /* Copy the text from "insLine" (if any), recalculating the tabs as if the inserted string began at column 0 to its new column destination */ if ( *insLine != '\0' ) { retabbedStr = realignTabs( insLine, 0, rectStart, tabDist, useTabs, nullSubsChar, &len ); for ( c = retabbedStr; *c != '\0'; c++ ) { *outPtr++ = *c; len = Fl_Text_Buffer_mod::character_width( *c, outIndent, tabDist, nullSubsChar ); outIndent += len; } free( (void *) retabbedStr ); } /* If the original line did not extend past "rectStart", that's all */ if ( *linePtr == '\0' ) { *outLen = *endOffset = outPtr - outStr; return; } /* Pad out to rectEnd + (additional original offset due to non-breaking character at right boundary) */ addPadding( outPtr, outIndent, postRectIndent, tabDist, useTabs, nullSubsChar, &len ); outPtr += len; outIndent = postRectIndent; /* copy the text beyond "rectEnd" */ strcpy( outPtr, linePtr ); *endOffset = outPtr - outStr; *outLen = ( outPtr - outStr ) + strlen( linePtr ); } char * Fl_Text_Buffer_mod::selection_text_( Fl_Text_Selection *sel ) { int start, end, isRect, rectStart, rectEnd; char *s; /* If there's no selection, return an allocated empty string */ if ( !sel->position( &start, &end, &isRect, &rectStart, &rectEnd ) ) { s = (char *)malloc( 1 ); *s = '\0'; return s; } /* If the selection is not rectangular, return the selected range */ if ( isRect ) return text_in_rectangle( start, end, rectStart, rectEnd ); else return text_range( start, end ); } void Fl_Text_Buffer_mod::remove_selection_( Fl_Text_Selection *sel ) { int start, end; int isRect, rectStart, rectEnd; if ( !sel->position( &start, &end, &isRect, &rectStart, &rectEnd ) ) return; if ( isRect ) remove_rectangular( start, end, rectStart, rectEnd ); else { remove( start, end ); //undoyankcut = undocut; } } void Fl_Text_Buffer_mod::replace_selection_( Fl_Text_Selection *sel, const char *s ) { int start, end, isRect, rectStart, rectEnd; Fl_Text_Selection oldSelection = *sel; /* If there's no selection, return */ if ( !sel->position( &start, &end, &isRect, &rectStart, &rectEnd ) ) return; /* Do the appropriate type of replace */ if ( isRect ) replace_rectangular( start, end, rectStart, rectEnd, s ); else replace( start, end, s ); /* Unselect (happens automatically in BufReplace, but BufReplaceRect can't detect when the contents of a selection goes away) */ sel->mSelected = 0; redisplay_selection( &oldSelection, sel ); } static void addPadding( char *string, int startIndent, int toIndent, int tabDist, int useTabs, char nullSubsChar, int *charsAdded ) { char * outPtr; int len, indent; indent = startIndent; outPtr = string; if ( useTabs ) { while ( indent < toIndent ) { len = Fl_Text_Buffer_mod::character_width( '\t', indent, tabDist, nullSubsChar ); if ( len > 1 && indent + len <= toIndent ) { *outPtr++ = '\t'; indent += len; } else { *outPtr++ = ' '; indent++; } } } else { while ( indent < toIndent ) { *outPtr++ = ' '; indent++; } } *charsAdded = outPtr - string; } /* ** Call the stored modify callback procedure(s) for this buffer to update the ** changed area(s) on the screen and any other listeners. */ void Fl_Text_Buffer_mod::call_modify_callbacks( int pos, int nDeleted, int nInserted, int nRestyled, const char *deletedText ) { int i; for ( i = 0; i < mNModifyProcs; i++ ) ( *mNodifyProcs[ i ] ) ( pos, nInserted, nDeleted, nRestyled, deletedText, mCbArgs[ i ] ); } /* ** Call the stored pre-delete callback procedure(s) for this buffer to update ** the changed area(s) on the screen and any other listeners. */ void Fl_Text_Buffer_mod::call_predelete_callbacks(int pos, int nDeleted) { int i; for (i=0; i<mNPredeleteProcs; i++) (*mPredeleteProcs[i])(pos, nDeleted, mPredeleteCbArgs[i]); } /* ** Call the stored redisplay procedure(s) for this buffer to update the ** screen for a change in a selection. */ void Fl_Text_Buffer_mod::redisplay_selection( Fl_Text_Selection *oldSelection, Fl_Text_Selection *newSelection ) { int oldStart, oldEnd, newStart, newEnd, ch1Start, ch1End, ch2Start, ch2End; /* If either selection is rectangular, add an additional character to the end of the selection to request the redraw routines to wipe out the parts of the selection beyond the end of the line */ oldStart = oldSelection->mStart; newStart = newSelection->mStart; oldEnd = oldSelection->mEnd; newEnd = newSelection->mEnd; if ( oldSelection->mRectangular ) oldEnd++; if ( newSelection->mRectangular ) newEnd++; /* If the old or new selection is unselected, just redisplay the single area that is (was) selected and return */ if ( !oldSelection->mSelected && !newSelection->mSelected ) return; if ( !oldSelection->mSelected ) { call_modify_callbacks( newStart, 0, 0, newEnd - newStart, NULL ); return; } if ( !newSelection->mSelected ) { call_modify_callbacks( oldStart, 0, 0, oldEnd - oldStart, NULL ); return; } /* If the selection changed from normal to rectangular or visa versa, or if a rectangular selection changed boundaries, redisplay everything */ if ( ( oldSelection->mRectangular && !newSelection->mRectangular ) || ( !oldSelection->mRectangular && newSelection->mRectangular ) || ( oldSelection->mRectangular && ( ( oldSelection->mRectStart != newSelection->mRectStart ) || ( oldSelection->mRectEnd != newSelection->mRectEnd ) ) ) ) { call_modify_callbacks( min( oldStart, newStart ), 0, 0, max( oldEnd, newEnd ) - min( oldStart, newStart ), NULL ); return; } /* If the selections are non-contiguous, do two separate updates and return */ if ( oldEnd < newStart || newEnd < oldStart ) { call_modify_callbacks( oldStart, 0, 0, oldEnd - oldStart, NULL ); call_modify_callbacks( newStart, 0, 0, newEnd - newStart, NULL ); return; } /* Otherwise, separate into 3 separate regions: ch1, and ch2 (the two changed areas), and the unchanged area of their intersection, and update only the changed area(s) */ ch1Start = min( oldStart, newStart ); ch2End = max( oldEnd, newEnd ); ch1End = max( oldStart, newStart ); ch2Start = min( oldEnd, newEnd ); if ( ch1Start != ch1End ) call_modify_callbacks( ch1Start, 0, 0, ch1End - ch1Start, NULL ); if ( ch2Start != ch2End ) call_modify_callbacks( ch2Start, 0, 0, ch2End - ch2Start, NULL ); } void Fl_Text_Buffer_mod::move_gap( int pos ) { int gapLen = mGapEnd - mGapStart; if ( pos > mGapStart ) memmove( &mBuf[ mGapStart ], &mBuf[ mGapEnd ], pos - mGapStart ); else memmove( &mBuf[ pos + gapLen ], &mBuf[ pos ], mGapStart - pos ); mGapEnd += pos - mGapStart; mGapStart += pos - mGapStart; } /* ** reallocate the text storage in "buf" to have a gap starting at "newGapStart" ** and a gap size of "newGapLen", preserving the buffer's current contents. */ void Fl_Text_Buffer_mod::reallocate_with_gap( int newGapStart, int newGapLen ) { char * newBuf; int newGapEnd; newBuf = (char *)malloc( mLength + newGapLen ); newGapEnd = newGapStart + newGapLen; if ( newGapStart <= mGapStart ) { memcpy( newBuf, mBuf, newGapStart ); memcpy( &newBuf[ newGapEnd ], &mBuf[ newGapStart ], mGapStart - newGapStart ); memcpy( &newBuf[ newGapEnd + mGapStart - newGapStart ], &mBuf[ mGapEnd ], mLength - mGapStart ); } else { /* newGapStart > mGapStart */ memcpy( newBuf, mBuf, mGapStart ); memcpy( &newBuf[ mGapStart ], &mBuf[ mGapEnd ], newGapStart - mGapStart ); memcpy( &newBuf[ newGapEnd ], &mBuf[ mGapEnd + newGapStart - mGapStart ], mLength - newGapStart ); } free( (void *) mBuf ); mBuf = newBuf; mGapStart = newGapStart; mGapEnd = newGapEnd; #ifdef PURIFY {int i; for ( i = mGapStart; i < mGapEnd; i++ ) mBuf[ i ] = '.'; } #endif } /* ** Update all of the selections in "buf" for changes in the buffer's text */ void Fl_Text_Buffer_mod::update_selections( int pos, int nDeleted, int nInserted ) { mPrimary.update( pos, nDeleted, nInserted ); mSecondary.update( pos, nDeleted, nInserted ); mHighlight.update( pos, nDeleted, nInserted ); } /* ** Search forwards in buffer "buf" for character "searchChar", starting ** with the character "startPos", and returning the result in "foundPos" ** returns 1 if found, 0 if not. (The difference between this and ** BufSearchForward is that it's optimized for single characters. The ** overall performance of the text widget is dependent on its ability to ** count lines quickly, hence searching for a single character: newline) */ int Fl_Text_Buffer_mod::findchar_forward( int startPos, char searchChar, int *foundPos ) { int pos, gapLen = mGapEnd - mGapStart; if (startPos < 0 || startPos >= mLength) { *foundPos = mLength; return 0; } pos = startPos; while ( pos < mGapStart ) { if ( mBuf[ pos ] == searchChar ) { *foundPos = pos; return 1; } pos++; } while ( pos < mLength ) { if ( mBuf[ pos + gapLen ] == searchChar ) { *foundPos = pos; return 1; } pos++; } *foundPos = mLength; return 0; } /* ** Search backwards in buffer "buf" for character "searchChar", starting ** with the character BEFORE "startPos", returning the result in "foundPos" ** returns 1 if found, 0 if not. (The difference between this and ** BufSearchBackward is that it's optimized for single characters. The ** overall performance of the text widget is dependent on its ability to ** count lines quickly, hence searching for a single character: newline) */ int Fl_Text_Buffer_mod::findchar_backward( int startPos, char searchChar, int *foundPos ) { int pos, gapLen = mGapEnd - mGapStart; if ( startPos <= 0 || startPos > mLength ) { *foundPos = 0; return 0; } pos = startPos - 1; while ( pos >= mGapStart ) { if ( mBuf[ pos + gapLen ] == searchChar ) { *foundPos = pos; return 1; } pos--; } while ( pos >= 0 ) { if ( mBuf[ pos ] == searchChar ) { *foundPos = pos; return 1; } pos--; } *foundPos = 0; return 0; } /* ** Copy from "text" to end up to but not including newline (or end of "text") ** and return the copy as the function value, and the length of the line in ** "lineLen" */ static char *copyLine( const char *text, int *lineLen ) { int len = 0; const char *c; char *outStr; for ( c = text; *c != '\0' && *c != '\n'; c++ ) len++; outStr = (char *)malloc( len + 1 ); strlcpy( outStr, text, len + 1); *lineLen = len; return outStr; } /* ** Count the number of newlines in a null-terminated text string; */ static int countLines( const char *string ) { const char * c; int lineCount = 0; for ( c = string; *c != '\0'; c++ ) if ( *c == '\n' ) lineCount++; return lineCount; } /* ** Measure the width in displayed characters of string "text" */ static int textWidth( const char *text, int tabDist, char nullSubsChar ) { int width = 0, maxWidth = 0; const char *c; for ( c = text; *c != '\0'; c++ ) { if ( *c == '\n' ) { if ( width > maxWidth ) maxWidth = width; width = 0; } else width += Fl_Text_Buffer_mod::character_width( *c, width, tabDist, nullSubsChar ); } if ( width > maxWidth ) return width; return maxWidth; } /* ** Find the first and last character position in a line within a rectangular ** selection (for copying). Includes tabs which cross rectStart, but not ** control characters which do so. Leaves off tabs which cross rectEnd. ** ** Technically, the calling routine should convert tab characters which ** cross the right boundary of the selection to spaces which line up with ** the edge of the selection. Unfortunately, the additional memory ** management required in the parent routine to allow for the changes ** in string size is not worth all the extra work just for a couple of ** shifted characters, so if a tab protrudes, just lop it off and hope ** that there are other characters in the selection to establish the right ** margin for subsequent columnar pastes of this data. */ void Fl_Text_Buffer_mod::rectangular_selection_boundaries( int lineStartPos, int rectStart, int rectEnd, int *selStart, int *selEnd ) { int pos, width, indent = 0; char c; /* find the start of the selection */ for ( pos = lineStartPos; pos < mLength; pos++ ) { c = character( pos ); if ( c == '\n' ) break; width = Fl_Text_Buffer_mod::character_width( c, indent, mTabDist, mNullSubsChar ); if ( indent + width > rectStart ) { if ( indent != rectStart && c != '\t' ) { pos++; indent += width; } break; } indent += width; } *selStart = pos; /* find the end */ for ( ; pos < mLength; pos++ ) { c = character( pos ); if ( c == '\n' ) break; width = Fl_Text_Buffer_mod::character_width( c, indent, mTabDist, mNullSubsChar ); indent += width; if ( indent > rectEnd ) { if ( indent - width != rectEnd && c != '\t' ) pos++; break; } } *selEnd = pos; } /* ** Adjust the space and tab characters from string "text" so that non-white ** characters remain stationary when the text is shifted from starting at ** "origIndent" to starting at "newIndent". Returns an allocated string ** which must be freed by the caller with XtFree. */ static char *realignTabs( const char *text, int origIndent, int newIndent, int tabDist, int useTabs, char nullSubsChar, int *newLength ) { char * expStr, *outStr; int len; /* If the tabs settings are the same, retain original tabs */ if ( origIndent % tabDist == newIndent % tabDist ) { len = strlen( text ); outStr = (char *)malloc( len + 1 ); strcpy( outStr, text ); *newLength = len; return outStr; } /* If the tab settings are not the same, brutally convert tabs to spaces, then back to tabs in the new position */ expStr = expandTabs( text, origIndent, tabDist, nullSubsChar, &len ); if ( !useTabs ) { *newLength = len; return expStr; } outStr = unexpandTabs( expStr, newIndent, tabDist, nullSubsChar, newLength ); free( (void *) expStr ); return outStr; } /* ** Expand tabs to spaces for a block of text. The additional parameter ** "startIndent" if nonzero, indicates that the text is a rectangular selection ** beginning at column "startIndent" */ static char *expandTabs( const char *text, int startIndent, int tabDist, char nullSubsChar, int *newLen ) { char * outStr, *outPtr; const char *c; int indent, len, outLen = 0; /* rehearse the expansion to figure out length for output string */ indent = startIndent; for ( c = text; *c != '\0'; c++ ) { if ( *c == '\t' ) { len = Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); outLen += len; indent += len; } else if ( *c == '\n' ) { indent = startIndent; outLen++; } else { indent += Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); outLen++; } } /* do the expansion */ outStr = (char *)malloc( outLen + 1 ); outPtr = outStr; indent = startIndent; for ( c = text; *c != '\0'; c++ ) { if ( *c == '\t' ) { len = Fl_Text_Buffer_mod::expand_character( *c, indent, outPtr, tabDist, nullSubsChar ); outPtr += len; indent += len; } else if ( *c == '\n' ) { indent = startIndent; *outPtr++ = *c; } else { indent += Fl_Text_Buffer_mod::character_width( *c, indent, tabDist, nullSubsChar ); *outPtr++ = *c; } } outStr[ outLen ] = '\0'; *newLen = outLen; return outStr; } /* ** Convert sequences of spaces into tabs. The threshold for conversion is ** when 3 or more spaces can be converted into a single tab, this avoids ** converting double spaces after a period withing a block of text. */ static char *unexpandTabs( char *text, int startIndent, int tabDist, char nullSubsChar, int *newLen ) { char * outStr, *outPtr, *c, expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; int indent, len; outStr = (char *)malloc( strlen( text ) + 1 ); outPtr = outStr; indent = startIndent; for ( c = text; *c != '\0'; ) { if ( *c == ' ' ) { len = Fl_Text_Buffer_mod::expand_character( '\t', indent, expandedChar, tabDist, nullSubsChar ); if ( len >= 3 && !strncmp( c, expandedChar, len ) ) { c += len; *outPtr++ = '\t'; indent += len; } else { *outPtr++ = *c++; indent++; } } else if ( *c == '\n' ) { indent = startIndent; *outPtr++ = *c++; } else { *outPtr++ = *c++; indent++; } } *outPtr = '\0'; *newLen = outPtr - outStr; return outStr; } static int max( int i1, int i2 ) { return i1 >= i2 ? i1 : i2; } static int min( int i1, int i2 ) { return i1 <= i2 ? i1 : i2; } int Fl_Text_Buffer_mod::insertfile(const char *file, int pos, int buflen) { FILE *fp; int r; if (!(fp = fopen(file, "r"))) return 1; char *buffer = new char[buflen]; for (; (r = fread(buffer, 1, buflen - 1, fp)) > 0; pos += r) { buffer[r] = (char)0; insert(pos, buffer); } int e = ferror(fp) ? 2 : 0; fclose(fp); delete[] buffer; return e; } int Fl_Text_Buffer_mod::outputfile(const char *file, int start, int end, int buflen) { FILE *fp; if (!(fp = fopen(file, "w"))) return 1; for (int n; (n = min(end - start, buflen)); start += n) { const char *p = text_range(start, start + n); int r = fwrite(p, 1, n, fp); free((void *)p); if (r != n) break; } int e = ferror(fp) ? 2 : 0; fclose(fp); return e; } // // End of "$Id: Fl_Text_Buffer.cxx 6011 2008-01-04 20:32:37Z matt $". // ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/missing_strings.c����������������������������������������������������������0000664�0001750�0001750�00000005160�12431375020�015447� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * "$Id: flstring.c 4288 2005-04-16 00:13:17Z mike $" * * missing BSD string functions for the Fast Light Tool Kit (FLTK). * version < 1.3.2 * * Copyright 1998-2005 by Bill Spitzak and others. */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "missing_strings.h" // versions of FLTK < 1.3.2 do not contain fl_string #if (FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 ) || \ (FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 && FLMSG_FLTK_API_PATCH < 1) /* * 'fl_strlcat()' - Safely concatenate two strings. */ size_t /* O - Length of string */ fl_strlcat(char *dst, /* O - Destination string */ const char *src, /* I - Source string */ size_t size) { /* I - Size of destination string buffer */ size_t srclen; /* Length of source string */ size_t dstlen; /* Length of destination string */ /* * Figure out how much room is left... */ dstlen = strlen(dst); size -= dstlen + 1; if (!size) return (dstlen); /* No room, return immediately... */ /* * Figure out how much room is needed... */ srclen = strlen(src); /* * Copy the appropriate amount... */ if (srclen > size) srclen = size; memcpy(dst + dstlen, src, srclen); dst[dstlen + srclen] = '\0'; return (dstlen + srclen); } /* * 'fl_strlcpy()' - Safely copy two strings. */ size_t /* O - Length of string */ fl_strlcpy(char *dst, /* O - Destination string */ const char *src, /* I - Source string */ size_t size) { /* I - Size of destination string buffer */ size_t srclen; /* Length of source string */ /* * Figure out how much room is needed... */ size --; srclen = strlen(src); /* * Copy the appropriate amount... */ if (srclen > size) srclen = size; memcpy(dst, src, srclen); dst[srclen] = '\0'; return (srclen); } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Buffer_mod.cxx�����������������������������������������������������0000664�0001750�0001750�00000002132�12330516146�016302� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Buffer_mod_1_1.cxx" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Buffer_mod_1_3.cxx" #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/FTextView.cxx��������������������������������������������������������������0000664�0001750�0001750�00000057763�12431375020�014512� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // FTextView.cxx // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // // Copyright (C) 2008-2009 // Dave Freese, W1HKJ // // This file is part of flmsg. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ---------------------------------------------------------------------------- #include <config.h> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <sys/stat.h> #include <map> #include <fstream> #include <sstream> #include <algorithm> #include <iomanip> #include <string> #include <FL/Fl_Tooltip.H> #include "flmisc.h" #include "fileselect.h" #include "font_browser.h" #include "ascii.h" #include "icons.h" #include "gettext.h" #include "FTextView.h" #include "debug.h" using namespace std; /// FTextBase constructor. /// Word wrapping is enabled by default at column 80, but see \c reset_wrap_col. /// @param x /// @param y /// @param w /// @param h /// @param l #if flmsg_FLTK_API_MAJOR == 1 && flmsg_FLTK_API_MINOR < 3 FTextBase::FTextBase(int x, int y, int w, int h, const char *l) : Fl_Text_Editor_mod(x, y, w, h, l), wrap(true), wrap_col(80), max_lines(0), scroll_hint(false) #else FTextBase::FTextBase(int x, int y, int w, int h, const char *l) : Fl_Text_Editor_mod(x, y, w, h, l), wrap(WRAP_AT_BOUNDS), wrap_col(80), max_lines(0), scroll_hint(false) #endif { oldw = oldh = olds = -1; oldf = (Fl_Font)-1; textfont(FL_COURIER); textsize(FL_NORMAL_SIZE); textcolor(FL_FOREGROUND_COLOR); tbuf = new Fl_Text_Buffer_mod; sbuf = new Fl_Text_Buffer_mod; buffer(tbuf); highlight_data(sbuf, styles, NATTR, FTEXT_DEF, 0, 0); cursor_style(Fl_Text_Editor_mod::NORMAL_CURSOR); restore_wrap = wrap; // Do we want narrower scrollbars? The default width is 16. scrollbar_width((int)floor(scrollbar_width() * 7.0/8.0)); reset_styles(SET_FONT | SET_SIZE | SET_COLOR); read_cb = NULL; } void FTextBase::clear() { tbuf->text(""); sbuf->text(""); set_word_wrap(restore_wrap); } int FTextBase::handle(int event) { if (event == FL_MOUSEWHEEL && !Fl::event_inside(this)) return 1; // Fl_Text_Editor::handle() calls window()->cursor(FL_CURSOR_DONE) when // it receives an FL_KEYBOARD event, which crashes some buggy X drivers // (e.g. Intel on the Asus Eee PC). Call handle_key directly to work // around this problem. if (event == FL_KEYBOARD) return Fl_Text_Editor_mod::handle_key(); else return Fl_Text_Editor_mod::handle(event); } /// @see FTextRX::add /// /// @param s /// @param attr /// void FTextBase::add(const char *s, int attr) { // handle the text attribute first int n = strlen(s); char a[n + 1]; memset(a, FTEXT_DEF + attr, n); a[n] = '\0'; sbuf->replace(insert_position(), insert_position() + n, a); insert(s); } /// @see FTextBase::add /// /// @param s /// @param attr /// void FTextBase::add(unsigned char c, int attr) { char s[] = { static_cast<char>(FTEXT_DEF + attr), '\0' }; sbuf->replace(insert_position(), insert_position() + 1, s); s[0] = c; insert(s); } void FTextBase::set_word_wrap(bool b) { #if flmsg_FLTK_API_MAJOR == 1 && flmsg_FLTK_API_MINOR < 3 if ((wrap = b)) wrap_mode(true, 0); else wrap_mode(false, 0); show_insert_position(); #else if ((wrap = b)) wrap_mode(WRAP_AT_BOUNDS, 0); else wrap_mode(WRAP_NONE, 0); show_insert_position(); #endif } void FTextBase::setFont(Fl_Font f, int attr) { set_style(attr, f, textsize(), textcolor(), SET_FONT); } void FTextBase::setFontSize(int s, int attr) { set_style(attr, textfont(), s, textcolor(), SET_SIZE); } void FTextBase::setFontColor(Fl_Color c, int attr) { set_style(attr, textfont(), textsize(), c, SET_COLOR); } /// Resizes the text widget. /// The real work is done by \c Fl_Text_Editor_mod::resize or, if \c HSCROLLBAR_KLUDGE /// is defined, a version of that code modified so that no horizontal /// scrollbars are displayed when word wrapping. /// /// @param X /// @param Y /// @param W /// @param H /// void FTextBase::resize(int X, int Y, int W, int H) { bool need_wrap_reset = false; bool need_margin_reset = false; if (unlikely(text_area.w != oldw)) { oldw = text_area.w; need_wrap_reset = true; } if (unlikely(text_area.h != oldh)) { oldh = text_area.h; need_margin_reset = true; } if (unlikely(textfont() != oldf || textsize() != olds)) { oldf = textfont(); olds = textsize(); need_wrap_reset = need_margin_reset = true; } if (need_wrap_reset) reset_wrap_col(); #if flmsg_FLTK_API_MAJOR == 1 && flmsg_FLTK_API_MINOR == 3 TOP_MARGIN = DEFAULT_TOP_MARGIN; int r = H - Fl::box_dh(box()) - TOP_MARGIN - BOTTOM_MARGIN; if (mHScrollBar->visible()) r -= scrollbar_width(); int msize = mMaxsize ? mMaxsize : textsize(); if (!msize) msize = 1; //printf("H %d, textsize %d, lines %d, extra %d\n", r, msize, r / msize, r % msize); if (r %= msize) TOP_MARGIN += r; #else if (need_margin_reset && textsize() > 0) { TOP_MARGIN = DEFAULT_TOP_MARGIN; int r = H - Fl::box_dh(box()) - TOP_MARGIN - BOTTOM_MARGIN; if (mHScrollBar->visible()) r -= scrollbar_width(); if (r %= textsize()) TOP_MARGIN += r; } #endif if (scroll_hint) { mTopLineNumHint = mNBufferLines; mHorizOffsetHint = 0; // display_insert_position_hint = 1; scroll_hint = false; } bool hscroll_visible = mHScrollBar->visible(); Fl_Text_Editor_mod::resize(X, Y, W, H); if (hscroll_visible != mHScrollBar->visible()) oldh = 0; // reset margins next time } /// Checks the new widget height. /// This is registered with Fl_Tile_check and then called with horizontal /// and vertical size increments every time the Fl_Tile boundary is moved. /// /// @param arg The callback argument; should be a pointer to a FTextBase object /// @param xd The horizontal increment (ignored) /// @param yd The vertical increment /// /// @return True if the widget is visible, and the new text area height would be /// a multiple of the font height. /// bool FTextBase::wheight_mult_tsize(void *arg, int, int yd) { FTextBase *v = reinterpret_cast<FTextBase *>(arg); if (!v->visible()) return true; return v->mMaxsize > 0 && (v->text_area.h + yd) % v->mMaxsize == 0; } /// Changes text style attributes /// /// @param attr The attribute name to change, or \c NATTR to change all styles. /// @param f The new font /// @param s The new font size /// @param c The new font color /// @param set One or more (OR'd together) SET operations; @see set_style_op_e /// void FTextBase::set_style(int attr, Fl_Font f, int s, Fl_Color c, int set) { int start, end; if (attr == NATTR) { // update all styles start = 0; end = NATTR; if (set & SET_FONT) Fl_Text_Display_mod::textfont(f); if (set & SET_SIZE) textsize(s); if (set & SET_COLOR) textcolor(c); } else { start = attr; end = start + 1; } for (int i = start; i < end; i++) { styles[i].attr = 0; if (set & SET_FONT) styles[i].font = f; if (set & SET_SIZE) styles[i].size = s; if (set & SET_COLOR) styles[i].color = c; if (i == SKIP) // clickable styles always same as SKIP for now for (int j = CLICK_START; j < NATTR; j++) memcpy(&styles[j], &styles[i], sizeof(styles[j])); } if (set & SET_COLOR) mCursor_color = styles[0].color; resize(x(), y(), w(), h()); // to redraw and recalculate the wrap column } /// Reads a file and inserts its contents. /// /// @return 0 on success, -1 on error int FTextBase::readFile(const char* fn) { set_word_wrap(restore_wrap); if ( !(fn || (fn = FSEL::select(_("Insert text"), "Text\t*.txt"))) ) return -1; int ret = 0, pos = insert_position(); #ifdef __WOE32__ FILE* tfile = fopen(fn, "rt"); #else FILE* tfile = fopen(fn, "r"); #endif if (!tfile) return -1; char buf[BUFSIZ+1]; std::string newbuf; size_t p; memset(buf, 0, BUFSIZ+1); if (pos == tbuf->length()) { // optimise for append while (fgets(buf, sizeof(buf), tfile)) { newbuf = buf; tbuf->append(newbuf.c_str()); memset(buf, 0, BUFSIZ+1); } if (ferror(tfile)) ret = -1; pos = tbuf->length(); } else { while (fgets(buf, sizeof(buf), tfile)) { newbuf = buf; p = 0; while ((p = newbuf.find('^',p)) != string::npos) { newbuf.insert(p, "^"); p += 2; } tbuf->insert(pos, newbuf.c_str()); pos += strlen(buf); memset(buf, 0, BUFSIZ+1); } if (ferror(tfile)) ret = -1; } fclose(tfile); insert_position(pos); show_insert_position(); if (read_cb) (read_cb)(fn); return ret; } /// Writes all buffer text out to a file. /// /// void FTextBase::saveFile(void) { const char *fn = FSEL::saveas(_("Save text as"), "Text\t*.txt"); if (fn) { #ifdef __WOE32__ ofstream tfile(fn); if (!tfile) return; char *p1, *p2, *text = tbuf->text(); for (p1 = p2 = text; *p1; p1 = p2) { while (*p2 != '\0' && *p2 != '\n') p2++; if (*p2 == '\n') { *p2 = '\0'; tfile << p1 << "\r\n"; p2++; } else tfile << p1; } free(text); #else tbuf->outputfile(fn, 0, tbuf->length()); #endif } } /// Returns a character string containing the selected word, if any, /// or the word at (\a x, \a y) relative to the widget's \c x() and \c y(). /// If \a ontext is true, this function will return text only if the /// mouse cursor position is inside the text range. /// /// @param x /// @param y /// /// @return The selection, or the word text at (x,y). <b>Must be freed by the caller</b>. /// char* FTextBase::get_word(int x, int y, const char* nwchars, bool ontext) { int p = xy_to_position(x + this->x(), y + this->y(), Fl_Text_Display_mod::CURSOR_POS); int start, end; if (tbuf->selected()) { if (ontext && tbuf->selection_position(&start, &end) && (p < start || p >= end)) return 0; else return tbuf->selection_text(); } string nonword = nwchars; nonword.append(" \t\n"); if (!tbuf->findchars_backward(p, nonword.c_str(), &start)) start = 0; else start++; if (!tbuf->findchars_forward(p, nonword.c_str(), &end)) end = tbuf->length(); //#endif if (ontext && (p < start || p >= end)) return 0; else return tbuf->text_range(start, end); } /// Initialised the menu pointed to by \c context_menu. The menu items' user_data /// field is used to store the initialisation flag. void FTextBase::init_context_menu(void) { for (int i = 0; i < context_menu->size() - 1; i++) { if (context_menu[i].user_data() == 0 && context_menu[i].labeltype() == _FL_MULTI_LABEL) { icons::set_icon_label(&context_menu[i]); context_menu[i].user_data(this); } } } /// Displays the menu pointed to by \c context_menu and calls the menu function; /// @see call_cb. /// void FTextBase::show_context_menu(void) { const Fl_Menu_Item *m; int xpos = Fl::event_x(); int ypos = Fl::event_y(); popx = xpos - x(); popy = ypos - y(); window()->cursor(FL_CURSOR_DEFAULT); m = context_menu->popup(xpos, ypos, 0, 0, 0); if (m) menu_cb(m - context_menu); } /// Recalculates the wrap margin when the font is changed or the widget resized. /// Line wrapping works with proportional fonts but may be very slow. /// int FTextBase::reset_wrap_col(void) { if (!wrap || text_area.w == 0) return wrap_col; int old_wrap_col = wrap_col; if (Font_Browser::fixed_width(textfont())) { fl_font(textfont(), textsize()); wrap_col = (int)floorf(text_area.w / fl_width('X')); } else // use slower (but accurate) wrapping for variable width fonts wrap_col = 0; // wrap_mode triggers a resize; don't call it if wrap_col hasn't changed if (old_wrap_col != wrap_col) wrap_mode(wrap, wrap_col); return old_wrap_col; } void FTextBase::reset_styles(int set) { set_style(NATTR, FL_COURIER, FL_NORMAL_SIZE, FL_FOREGROUND_COLOR, set); set_style(XMIT, FL_COURIER, FL_NORMAL_SIZE, FL_RED, set); set_style(CTRL, FL_COURIER, FL_NORMAL_SIZE, FL_DARK_GREEN, set); set_style(SKIP, FL_COURIER, FL_NORMAL_SIZE, FL_BLUE, set); set_style(ALTR, FL_COURIER, FL_NORMAL_SIZE, FL_DARK_MAGENTA, set); } // ---------------------------------------------------------------------------- Fl_Menu_Item FTextView::menu[] = { { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Save as..."), save_as_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL }, { 0 } }; /// FTextView constructor. /// We remove \c Fl_Text_Display_mod::buffer_modified_cb from the list of callbacks /// because we want to scroll depending on the visibility of the last line; @see /// changed_cb. /// @param x /// @param y /// @param w /// @param h /// @param l FTextView::FTextView(int x, int y, int w, int h, const char *l) : FTextBase(x, y, w, h, l), quick_entry(false) { tbuf->remove_modify_callback(buffer_modified_cb, this); tbuf->add_modify_callback(changed_cb, this); tbuf->canUndo(0); // disable some keybindings that are not allowed in FTextView buffers change_keybindings(); context_menu = menu; init_context_menu(); } /// Handles fltk events for this widget. /// We only care about mouse presses (to display the popup menu and prevent /// pasting) and keyboard events (to make sure no text can be inserted). /// Everything else is passed to the base class handle(). /// /// @param event /// /// @return /// int FTextView::handle(int event) { switch (event) { case FL_PUSH: if (!Fl::event_inside(this)) break; if (Fl::event_button() == FL_RIGHT_MOUSE) { handle_context_menu(); return 1; } break; case FL_DRAG: if (Fl::event_button() != FL_LEFT_MOUSE) return 1; break; // catch some text-modifying events that are not handled by kf_* functions case FL_KEYBOARD: int k; if (Fl::compose(k)) return 1; k = Fl::event_key(); if (k == FL_BackSpace) return 1; else if (k == FL_Tab) return Fl_Widget::handle(event); } return FTextBase::handle(event); } void FTextView::handle_context_menu(void) { icons::set_active(&menu[VIEW_MENU_COPY], tbuf->selected()); icons::set_active(&menu[VIEW_MENU_CLEAR], tbuf->length()); icons::set_active(&menu[VIEW_MENU_SELECT_ALL], tbuf->length()); icons::set_active(&menu[VIEW_MENU_SAVE], tbuf->length()); if (wrap) menu[VIEW_MENU_WRAP].set(); else menu[VIEW_MENU_WRAP].clear(); show_context_menu(); } /// The context menu handler /// /// @param val /// void FTextView::menu_cb(size_t item) { switch (item) { case VIEW_MENU_COPY: kf_copy(Fl::event_key(), this); break; case VIEW_MENU_CLEAR: clear(); break; case VIEW_MENU_SELECT_ALL: tbuf->select(0, tbuf->length()); break; case VIEW_MENU_SAVE: saveFile(); break; case VIEW_MENU_WRAP: set_word_wrap(!wrap); restore_wrap = wrap; break; } } /// Scrolls down if the buffer has been modified and the last line is /// visible. See Fl_Text_Buffer::add_modify_callback() for parameter details. /// /// @param pos /// @param nins /// @param ndel /// @param nsty /// @param dtext /// @param arg /// inline void FTextView::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg) { FTextView *v = reinterpret_cast<FTextView *>(arg); if (v->mTopLineNum + v->mNVisibleLines - 1 == v->mNBufferLines) v->scroll_hint = true; v->buffer_modified_cb(pos, nins, ndel, nsty, dtext, v); } /// Removes Fl_Text_Edit keybindings that would modify text and put it out of /// sync with the style buffer. At some point we may decide that we want /// FTextView to be editable (e.g., to insert comments about a QSO), in which /// case we'll keep the keybindings and add some code to changed_cb to update /// the style buffer. /// void FTextView::change_keybindings(void) { Fl_Text_Editor_mod::Key_Func fdelete[] = { Fl_Text_Editor_mod::kf_default, Fl_Text_Editor_mod::kf_enter, Fl_Text_Editor_mod::kf_delete, Fl_Text_Editor_mod::kf_cut, Fl_Text_Editor_mod::kf_paste }; int n = sizeof(fdelete) / sizeof(fdelete[0]); // walk the keybindings linked list and delete items containing elements // of fdelete loop: for (Fl_Text_Editor_mod::Key_Binding *k = key_bindings; k; k = k->next) { for (int i = 0; i < n; i++) { if (k->function == fdelete[i]) { remove_key_binding(k->key, k->state); goto loop; } } } } // ---------------------------------------------------------------------------- Fl_Menu_Item FTextEdit::menu[] = { { icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Insert file..."), file_open_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { _("Word wrap"), 0, 0, 0, FL_MENU_TOGGLE, FL_NORMAL_LABEL } , { 0 } }; FTextEdit::FTextEdit(int x, int y, int w, int h, const char *l) : FTextBase(x, y, w, h, l) { tbuf->remove_modify_callback(buffer_modified_cb, this); tbuf->add_modify_callback(changed_cb, this); ascii_cnt = 0; ascii_chr = 0; context_menu = menu; init_context_menu(); dnd_paste = false; } /// Handles fltk events for this widget. /// We pass keyboard events to handle_key() and handle mouse3 presses to show /// the popup menu. We also disallow mouse2 events in the transmitted text area. /// Everything else is passed to the base class handle(). /// /// @param event /// /// @return /// int FTextEdit::handle(int event) { if ( !(Fl::event_inside(this) || (event == FL_KEYBOARD && Fl::focus() == this)) ) return FTextBase::handle(event); switch (event) { case FL_KEYBOARD: return handle_key(Fl::event_key()) ? 1 : FTextBase::handle(event); case FL_DND_RELEASE: dnd_paste = true; // fall through case FL_DND_ENTER: case FL_DND_LEAVE: return 1; case FL_DND_DRAG: return handle_dnd_drag(xy_to_position(Fl::event_x(), Fl::event_y(), CHARACTER_POS)); case FL_PASTE: { int r = dnd_paste ? handle_dnd_drop() : FTextBase::handle(event); dnd_paste = false; return r; } case FL_PUSH: { int eb = Fl::event_button(); if (eb == FL_RIGHT_MOUSE) { handle_context_menu(); return 1; } } default: break; } return FTextBase::handle(event); } /// Handles keyboard events to override Fl_Text_Editor_mod's handling of some /// keystrokes. /// /// @param key /// /// @return /// int FTextEdit::handle_key(int key) { // read ctl-ddd, where d is a digit, as ascii characters (in base 10) // and insert verbatim; e.g. ctl-001 inserts a <soh> if (key == FL_Control_L || key == FL_Control_R) return 0; bool t1 = isdigit(key); bool t2 = false; if (key >= FL_KP) t2 = isdigit(key - FL_KP + '0'); bool t3 = (Fl::event_state() & FL_CTRL) == FL_CTRL; if (t3 && (t1 || t2)) return handle_key_ascii(key); ascii_cnt = 0; // restart the numeric keypad entries. ascii_chr = 0; return Fl_Text_Editor_mod::handle(FL_KEYBOARD); // return 0; } /// Composes ascii characters and adds them to the FTextEdit buffer. /// Control characters are inserted with the CTRL style. Values larger than 127 /// (0x7f) are ignored. We cannot really add NULs for the time being. /// /// @param key A digit character /// /// @return 1 /// int FTextEdit::handle_key_ascii(int key) { if (key >= FL_KP) key -= FL_KP; key -= '0'; ascii_cnt++; for (int i = 0; i < 3 - ascii_cnt; i++) key *= 10; ascii_chr += key; if (ascii_cnt == 3) { if (ascii_chr < 0x100) //0x7F) add(ascii_chr, (iscntrl(ascii_chr) ? CTRL : RECV)); ascii_cnt = ascii_chr = 0; } return 1; } /// Handles FL_DND_DRAG events by scrolling and moving the cursor /// /// @return 1 int FTextEdit::handle_dnd_drag(int pos) { // Scroll if the pointer is being dragged inside the scrollbars, // otherwise obtain keyboard focus and set the insert position. if (mVScrollBar->visible() && Fl::event_inside(mVScrollBar)) mVScrollBar->handle(FL_DRAG); else if (mHScrollBar->visible() && Fl::event_inside(mHScrollBar)) mHScrollBar->handle(FL_DRAG); else { if (Fl::focus() != this) take_focus(); insert_position(pos); } return 1; } /// Handles FL_PASTE events by inserting text /// /// @return 1 or FTextBase::handle(FL_PASTE) int FTextEdit::handle_dnd_drop(void) { // paste verbatim if the shift key was held down during dnd if (Fl::event_shift()) return FTextBase::handle(FL_PASTE); string text; string::size_type p, len; text = Fl::event_text(); const char sep[] = "\n"; #if defined(__APPLE__) || defined(__WOE32__) text += sep; #endif len = text.length(); while ((p = text.find(sep)) != string::npos) { text[p] = '\0'; #if !defined(__APPLE__) && !defined(__WOE32__) if (text.find("file://") == 0) { text.erase(0, 7); p -= 7; len -= 7; } #endif // paste everything verbatim if we cannot read the first file if (readFile(text.c_str()) == -1 && len == text.length()) return FTextBase::handle(FL_PASTE); text.erase(0, p + sizeof(sep) - 1); } return 1; } /// Handles mouse-3 clicks by displaying the context menu /// /// @param val /// void FTextEdit::handle_context_menu(void) { bool selected = tbuf->selected(); icons::set_active(&menu[EDIT_MENU_CUT], selected); icons::set_active(&menu[EDIT_MENU_COPY], selected); icons::set_active(&menu[EDIT_MENU_CLEAR], tbuf->length()); if (wrap) menu[EDIT_MENU_WRAP].set(); else menu[EDIT_MENU_WRAP].clear(); show_context_menu(); } /// The context menu handler /// /// @param val /// void FTextEdit::menu_cb(size_t item) { switch (item) { case EDIT_MENU_CLEAR: clear(); break; case EDIT_MENU_CUT: kf_cut(0, this); break; case EDIT_MENU_COPY: kf_copy(0, this); break; case EDIT_MENU_PASTE: kf_paste(0, this); break; case EDIT_MENU_READ: readFile(); break; case EDIT_MENU_WRAP: set_word_wrap(!wrap); restore_wrap = wrap; break; } } /// This function is called by Fl_Text_Buffer when the buffer is modified, and /// also by nextChar when a character has been passed up the transmit path. In /// the first case either nins or ndel will be nonzero, and we change a /// corresponding amount of text in the style buffer. /// /// In the latter case, nins, ndel, pos and nsty are all zero and we update the /// style buffer to mark the last character in the buffer with the XMIT /// attribute. /// /// @param pos /// @param nins /// @param ndel /// @param nsty /// @param dtext /// @param arg /// void FTextEdit::changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg) { FTextEdit *e = reinterpret_cast<FTextEdit *>(arg); if (nins == 0 && ndel == 0) { if (nsty == -1) { // called by nextChar to update transmitted text style char s[] = { FTEXT_DEF + XMIT, '\0' }; e->sbuf->replace(pos - 1, pos, s); e->redisplay_range(pos - 1, pos); } else if (nsty > 0) // restyled, e.g. selected, text return e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e); // No changes, e.g., a paste with an empty clipboard. return; } else if (nins > 0 && e->sbuf->length() < e->tbuf->length()) { // New text not inserted by our add() methods, i.e., via a file // read, mouse-2 paste or, most likely, direct keyboard entry. int n = e->tbuf->length() - e->sbuf->length(); if (n == 1) { char s[] = { FTEXT_DEF, '\0' }; e->sbuf->append(s); } else { char *s = new char [n + 1]; memset(s, FTEXT_DEF, n); s[n] = '\0'; e->sbuf->append(s); delete [] s; } } else if (ndel > 0) e->sbuf->remove(pos, pos + ndel); e->sbuf->select(pos, pos + nins - ndel); e->buffer_modified_cb(pos, nins, ndel, nsty, dtext, e); // We may need to scroll if the text was inserted by the // add() methods, e.g. by a macro if (e->mTopLineNum + e->mNVisibleLines - 1 <= e->mNBufferLines) e->show_insert_position(); } �������������flmsg-2.0.10/src/widgets/Fl_Text_Editor_mod_1_1.cxx�������������������������������������������������0000664�0001750�0001750�00000040154�12330516146�016765� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Editor.cxx 5671 2007-02-08 07:58:47Z matt $" // // Copyright 2001-2006 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <FL/Fl.H> #include <FL/Fl_Window.H> #include "Fl_Text_Editor_mod.H" #include <FL/fl_ask.H> #include "missing_strings.h" Fl_Text_Editor_mod::Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l) : Fl_Text_Display_mod(X, Y, W, H, l) { mCursorOn = 1; insert_mode_ = 1; key_bindings = 0; // handle the default key bindings add_default_key_bindings(&key_bindings); // handle everything else default_key_function(kf_default); } Fl_Text_Editor_mod::Key_Binding* Fl_Text_Editor_mod::global_key_bindings = 0; // These are the default key bindings every widget should start with static struct { int key; int state; Fl_Text_Editor_mod::Key_Func func; } default_key_bindings[] = { { FL_Escape, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_ignore }, { FL_Enter, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_KP_Enter, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_enter }, { FL_BackSpace, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_backspace }, { FL_Insert, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_insert }, { FL_Delete, FL_TEXT_EDITOR_ANY_STATE, Fl_Text_Editor_mod::kf_delete }, { FL_Home, 0, Fl_Text_Editor_mod::kf_move }, { FL_End, 0, Fl_Text_Editor_mod::kf_move }, { FL_Left, 0, Fl_Text_Editor_mod::kf_move }, { FL_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Right, 0, Fl_Text_Editor_mod::kf_move }, { FL_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Up, 0, Fl_Text_Editor_mod::kf_move }, { FL_Page_Down, 0, Fl_Text_Editor_mod::kf_move }, { FL_Home, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_End, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Left, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Right, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Up, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Page_Down, FL_SHIFT, Fl_Text_Editor_mod::kf_shift_move }, { FL_Home, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_End, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Left, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Right, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Up, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Page_Down, FL_CTRL, Fl_Text_Editor_mod::kf_ctrl_move }, { FL_Home, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_End, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Left, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Right, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Up, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, { FL_Page_Down, FL_CTRL|FL_SHIFT, Fl_Text_Editor_mod::kf_c_s_move }, //{ FL_Clear, 0, Fl_Text_Editor_mod::delete_to_eol }, { 'z', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { '/', FL_CTRL, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_CTRL, Fl_Text_Editor_mod::kf_cut }, { FL_Delete, FL_SHIFT, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { FL_Insert, FL_CTRL, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_CTRL, Fl_Text_Editor_mod::kf_paste }, { FL_Insert, FL_SHIFT, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_CTRL, Fl_Text_Editor_mod::kf_select_all }, #ifdef __APPLE__ // Define CMD+key accelerators... { 'z', FL_COMMAND, Fl_Text_Editor_mod::kf_undo }, { 'x', FL_COMMAND, Fl_Text_Editor_mod::kf_cut }, { 'c', FL_COMMAND, Fl_Text_Editor_mod::kf_copy }, { 'v', FL_COMMAND, Fl_Text_Editor_mod::kf_paste }, { 'a', FL_COMMAND, Fl_Text_Editor_mod::kf_select_all }, #endif // __APPLE__ { 0, 0, 0 } }; void Fl_Text_Editor_mod::add_default_key_bindings(Key_Binding** list) { for (int i = 0; default_key_bindings[i].key; i++) { add_key_binding(default_key_bindings[i].key, default_key_bindings[i].state, default_key_bindings[i].func, list); } } Fl_Text_Editor_mod::Key_Func Fl_Text_Editor_mod::bound_key_function(int key, int state, Key_Binding* list) { Key_Binding* cur; if (!list) return 0; for (cur = list; cur; cur = cur->next) if (cur->key == key) if (cur->state == FL_TEXT_EDITOR_ANY_STATE || cur->state == state) break; if (!cur) return 0; return cur->function; } void Fl_Text_Editor_mod::remove_all_key_bindings(Key_Binding** list) { Key_Binding *cur, *next; for (cur = *list; cur; cur = next) { next = cur->next; delete cur; } *list = 0; } void Fl_Text_Editor_mod::remove_key_binding(int key, int state, Key_Binding** list) { Key_Binding *cur, *last = 0; for (cur = *list; cur; last = cur, cur = cur->next) if (cur->key == key && cur->state == state) break; if (!cur) return; if (last) last->next = cur->next; else *list = cur->next; delete cur; } void Fl_Text_Editor_mod::add_key_binding(int key, int state, Key_Func function, Key_Binding** list) { Key_Binding* kb = new Key_Binding; kb->key = key; kb->state = state; kb->function = function; kb->next = *list; *list = kb; } //////////////////////////////////////////////////////////////// #define NORMAL_INPUT_MOVE 0 static void kill_selection(Fl_Text_Editor_mod* e) { if (e->buffer()->selected()) { e->insert_position(e->buffer()->primary_selection()->start()); e->buffer()->remove_selection(); } } int Fl_Text_Editor_mod::kf_default(int c, Fl_Text_Editor_mod* e) { if (!c || (!isprint(c) && c != '\t')) return 0; char s[2] = "\0"; s[0] = (char)c; kill_selection(e); if (e->insert_mode()) e->insert(s); else e->overstrike(s); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } int Fl_Text_Editor_mod::kf_ignore(int, Fl_Text_Editor_mod*) { return 0; // don't handle } int Fl_Text_Editor_mod::kf_backspace(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected() && e->move_left()) e->buffer()->select(e->insert_position(), e->insert_position()+1); kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } int Fl_Text_Editor_mod::kf_enter(int, Fl_Text_Editor_mod* e) { kill_selection(e); e->insert("\n"); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } extern void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); int Fl_Text_Editor_mod::kf_move(int c, Fl_Text_Editor_mod* e) { int i; int selected = e->buffer()->selected(); if (!selected) e->dragPos = e->insert_position(); e->buffer()->unselect(); switch (c) { case FL_Home: e->insert_position(e->buffer()->line_start(e->insert_position())); break; case FL_End: e->insert_position(e->buffer()->line_end(e->insert_position())); break; case FL_Left: e->move_left(); break; case FL_Right: e->move_right(); break; case FL_Up: e->move_up(); break; case FL_Down: e->move_down(); break; case FL_Page_Up: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_up(); break; case FL_Page_Down: for (i = 0; i < e->mNVisibleLines - 1; i++) e->move_down(); break; } e->show_insert_position(); return 1; } int Fl_Text_Editor_mod::kf_shift_move(int c, Fl_Text_Editor_mod* e) { kf_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } int Fl_Text_Editor_mod::kf_ctrl_move(int c, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->dragPos = e->insert_position(); if (c != FL_Up && c != FL_Down) { e->buffer()->unselect(); e->show_insert_position(); } switch (c) { case FL_Home: e->insert_position(0); e->scroll(0, 0); break; case FL_End: e->insert_position(e->buffer()->length()); e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: e->previous_word(); break; case FL_Right: e->next_word(); break; case FL_Up: e->scroll(e->mTopLineNum-1, e->mHorizOffset); break; case FL_Down: e->scroll(e->mTopLineNum+1, e->mHorizOffset); break; case FL_Page_Up: e->insert_position(e->mLineStarts[0]); break; case FL_Page_Down: e->insert_position(e->mLineStarts[e->mNVisibleLines-2]); break; } return 1; } int Fl_Text_Editor_mod::kf_c_s_move(int c, Fl_Text_Editor_mod* e) { kf_ctrl_move(c, e); fl_text_drag_me(e->insert_position(), e); return 1; } int Fl_Text_Editor_mod::kf_home(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Home, e); } int Fl_Text_Editor_mod::kf_end(int, Fl_Text_Editor_mod* e) { return kf_move(FL_End, e); } int Fl_Text_Editor_mod::kf_left(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Left, e); } int Fl_Text_Editor_mod::kf_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Up, e); } int Fl_Text_Editor_mod::kf_right(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Right, e); } int Fl_Text_Editor_mod::kf_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Down, e); } int Fl_Text_Editor_mod::kf_page_up(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Up, e); } int Fl_Text_Editor_mod::kf_page_down(int, Fl_Text_Editor_mod* e) { return kf_move(FL_Page_Down, e); } int Fl_Text_Editor_mod::kf_insert(int, Fl_Text_Editor_mod* e) { e->insert_mode(e->insert_mode() ? 0 : 1); return 1; } int Fl_Text_Editor_mod::kf_delete(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) e->buffer()->select(e->insert_position(), e->insert_position()+1); kill_selection(e); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } int Fl_Text_Editor_mod::kf_copy(int, Fl_Text_Editor_mod* e) { if (!e->buffer()->selected()) return 1; const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); e->show_insert_position(); return 1; } int Fl_Text_Editor_mod::kf_cut(int c, Fl_Text_Editor_mod* e) { kf_copy(c, e); kill_selection(e); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } int Fl_Text_Editor_mod::kf_paste(int, Fl_Text_Editor_mod* e) { kill_selection(e); Fl::paste(*e, 1); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return 1; } int Fl_Text_Editor_mod::kf_select_all(int, Fl_Text_Editor_mod* e) { e->buffer()->select(0, e->buffer()->length()); return 1; } int Fl_Text_Editor_mod::kf_undo(int , Fl_Text_Editor_mod* e) { e->buffer()->unselect(); int crsr; int ret = e->buffer()->undo(&crsr); e->insert_position(crsr); e->show_insert_position(); e->set_changed(); if (e->when()&FL_WHEN_CHANGED) e->do_callback(); return ret; } int Fl_Text_Editor_mod::handle_key() { // Call FLTK's rules to try to turn this into a printing character. // This uses the right-hand ctrl key as a "compose prefix" and returns // the changes that should be made to the text, as a number of // bytes to delete and a string to insert: int del; if (Fl::compose(del)) { if (del) buffer()->select(insert_position()-del, insert_position()); kill_selection(this); if (Fl::event_length()) { if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); } show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } int key = Fl::event_key(), state = Fl::event_state(), c = Fl::event_text()[0]; state &= FL_SHIFT|FL_CTRL|FL_ALT|FL_META; // only care about these states Key_Func f; f = bound_key_function(key, state, global_key_bindings); if (!f) f = bound_key_function(key, state, key_bindings); if (f) return f(key, this); if (default_key_function_ && !state) return default_key_function_(c, this); return 0; } void Fl_Text_Editor_mod::maybe_do_callback() { // printf("Fl_Text_Editor_mod::maybe_do_callback()\n"); // printf("changed()=%d, when()=%x\n", changed(), when()); if (changed() || (when()&FL_WHEN_NOT_CHANGED)) do_callback(); } int Fl_Text_Editor_mod::handle(int event) { if (!buffer()) return 0; switch (event) { case FL_FOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... Fl::focus(this); return 1; case FL_UNFOCUS: show_cursor(mCursorOn); // redraws the cursor if (buffer()->selected()) redraw(); // Redraw selections... case FL_HIDE: if (when() & FL_WHEN_RELEASE) maybe_do_callback(); return 1; case FL_KEYBOARD: if (active_r() && window() && this == Fl::belowmouse()) window()->cursor(FL_CURSOR_NONE); return handle_key(); case FL_PASTE: if (!Fl::event_text()) { fl_beep(); return 1; } buffer()->remove_selection(); if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); show_insert_position(); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; case FL_ENTER: // MRS: WIN32 only? Need to test! // case FL_MOVE: show_cursor(mCursorOn); return 1; case FL_PUSH: if (Fl::event_button() == 2) { // don't let the text_display see this event if (Fl_Group::handle(event)) return 1; dragType = -1; Fl::paste(*this, 0); Fl::focus(this); set_changed(); if (when()&FL_WHEN_CHANGED) do_callback(); return 1; } break; } return Fl_Text_Display_mod::handle(event); } // // End of "$Id: Fl_Text_Editor.cxx 5671 2007-02-08 07:58:47Z matt $". // ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Editor_mod.cxx�����������������������������������������������������0000664�0001750�0001750�00000002132�12330516146�016317� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Editor_mod_1_1.cxx" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Editor_mod_1_3.cxx" #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/combo.cxx������������������������������������������������������������������0000664�0001750�0001750�00000024614�12330516146�013715� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string> #include <cstring> #include <cstdlib> #include <FL/Fl.H> #include <FL/fl_draw.H> #include "combo.h" #include "util.h" void popbrwsr_cb (Fl_Widget *v, long d); Fl_PopBrowser::Fl_PopBrowser (int X, int Y, int W, int H, const char *label) : Fl_Window (X, Y, W, H, label) { hRow = H; wRow = W; clear_border(); box(FL_BORDER_BOX); align(FL_ALIGN_INSIDE); popbrwsr = new Fl_Select_Browser(0,0,wRow,hRow, ""); popbrwsr->callback ( (Fl_Callback*)popbrwsr_cb); popbrwsr->align(FL_ALIGN_INSIDE); parentCB = 0; end(); set_modal(); } Fl_PopBrowser::~Fl_PopBrowser () { delete popbrwsr; } int Fl_PopBrowser::handle(int event) { Fl_ComboBox *cbx = (Fl_ComboBox*)this->parent(); if (!Fl::event_inside( child(0) ) && event == FL_PUSH) { pophide(); return 1; } if (event == FL_KEYDOWN) { int kbd = Fl::event_key(); char key = Fl::event_text()[0]; if (kbd == FL_Down) { if (popbrwsr->value() < popbrwsr->size()) popbrwsr->select(popbrwsr->value() + 1); popbrwsr->bottomline(popbrwsr->value()); return 1; } if (kbd == FL_Up && popbrwsr->value() > 1) { popbrwsr->select(popbrwsr->value() - 1); return 1; } if (key == '\r' || kbd == FL_Enter) { // kbd test for OS X int n = popbrwsr->value() - 1; pophide(); cbx->index(n); cbx->do_callback(); return 1; } if (key == '\b' || kbd == FL_BackSpace) { // kbd test for OS X if (!keystrokes.empty()) keystrokes.erase(keystrokes.length() - 1, 1); return 1; } if (key == 0x1b || kbd == FL_Escape) { // kbd test for OS X pophide(); return 0; } if (key >= ' ' || key <= 0x7f) { keystrokes += key; for (int i = 0; i < cbx->listsize; i++) { if (strncasecmp(keystrokes.c_str(), cbx->datalist[i]->s, keystrokes.length()) == 0) { popbrwsr->select(i+1); popbrwsr->show(i+1); return 1; } } return 0; } } return Fl_Group::handle(event); } void Fl_PopBrowser::add(char *s, void *d) { popbrwsr->add(s,d); } void Fl_PopBrowser::clear() { popbrwsr->clear(); } void Fl_PopBrowser::sort() { return; } void Fl_PopBrowser::popshow (int x, int y) { int nRows = parentCB->numrows(); int fh = fl_height(); int height = nRows * fh + 4; if (popbrwsr->size() == 0) return; if (nRows > parentCB->lsize()) nRows = parentCB->lsize(); // locate first occurance of inp string value in the list // and display that if found int i = parentCB->index(); if (!(i >= 0 && i < parentCB->listsize)) { for (i = 0; i < parentCB->listsize; i++) if (parentCB->type_ == COMBOBOX) { if (!strcmp(parentCB->val->value(), parentCB->datalist[i]->s)) break; } else { if (!strcmp(parentCB->valbox->label(), parentCB->datalist[i]->s)) break; } if (i == parentCB->listsize) i = 0; } // resize and reposition the popup to insure that it is within the bounds // of the uppermost parent widget // preferred position is just below and at the same x position as the // parent widget Fl_Widget *gparent = parentCB; int hp = gparent->h(); while ((gparent = gparent->parent())) { hp = gparent->h(); parentWindow = gparent; } int nu = nRows, nl = nRows; int hu = nu * fh + 4, hl = nl * fh + 4; int yu = parentCB->y() - hu; int yl = y; while (nl > 1 && (yl + hl > hp)) { nl--; hl -= fh; } while (nu > 1 && yu < 0) { nu--; yu += fh; hu -= fh; } y = yl; height = hl; if (nl < nu) { y = yu; height = hu; } popbrwsr->size (wRow, height); resize (x, y, wRow, height); popbrwsr->topline (i); keystrokes.empty(); popbrwsr->show(); show(); for (const Fl_Widget* o = popbrwsr; o; o = o->parent()) ((Fl_Widget *)o)->set_visible(); parentWindow->damage(FL_DAMAGE_ALL); parentWindow->redraw(); Fl::grab(this); } void Fl_PopBrowser::pophide () { hide (); parentWindow->damage(FL_DAMAGE_ALL); parentWindow->redraw(); Fl::grab(0); Fl::focus(((Fl_ComboBox*)parent())->btn); } void Fl_PopBrowser::popbrwsr_cb_i (Fl_Widget *v, long d) { // update the return values Fl_Select_Browser *SB = (Fl_Select_Browser *)(v); Fl_PopBrowser *PB = (Fl_PopBrowser *)(SB->parent()); Fl_ComboBox *CB = (Fl_ComboBox *)(PB->parent()); int row = SB->value(); if (row == 0) return; SB->deselect(); CB->value(SB->text(row)); CB->idx = row - 1; PB->pophide(); CB->do_callback(); return; } void popbrwsr_cb (Fl_Widget *v, long d) { ((Fl_PopBrowser *)(v))->popbrwsr_cb_i (v, d); return; } void Fl_ComboBox::fl_popbrwsr(Fl_Widget *p) { int xpos = p->x(), ypos = p->h() + p->y(); // pass the calling widget to the popup browser so that the // correct callback function can be called when the user selects an item // from the browser list Brwsr->parentCB = (Fl_ComboBox *) p; Brwsr->clear_kbd(); Brwsr->popshow(xpos, ypos); return; } void btnComboBox_cb (Fl_Widget *v, void *d) { Fl_ComboBox *p = (Fl_ComboBox *)(v->parent()); p->fl_popbrwsr (p); return; } Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, const char *lbl, int wtype) : Fl_Group (X, Y, W, H, lbl), type_(wtype) { width = W; height = H; if (type_ == LISTBOX) { valbox = new Fl_Box (FL_DOWN_BOX, X, Y, W-H, H, ""); valbox->align(FL_ALIGN_INSIDE | FL_ALIGN_LEFT); valbox->color(FL_BACKGROUND2_COLOR); } else { val = new Fl_Input (X, Y, W-H, H, ""); val->align(FL_ALIGN_INSIDE | FL_ALIGN_LEFT); readonly(); } btn = new Fl_Button (X + W - H + 1, Y, H - 1, H, "@2>"); btn->callback ((Fl_Callback *)btnComboBox_cb, 0); Brwsr = 0; datalist = new datambr *[FL_COMBO_LIST_INCR]; maxsize = FL_COMBO_LIST_INCR; for (int i = 0; i < FL_COMBO_LIST_INCR; i++) datalist[i] = 0; listsize = 0; listtype = 0; Brwsr = new Fl_PopBrowser(X, Y, W, H, ""); Brwsr->align(FL_ALIGN_INSIDE); idx = 0; end(); numrows_ = 8; } Fl_ComboBox::~Fl_ComboBox() { delete Brwsr; for (int i = 0; i < listsize; i++) { if (datalist[i]) { if (datalist[i]->s) delete [] datalist[i]->s; delete datalist[i]; } } delete [] datalist; } int Fl_ComboBox::handle(int event) { if (event == FL_KEYDOWN) { int kbd = Fl::event_key(); if (kbd == FL_Down) { fl_popbrwsr (this); return 1; } } return Fl_Group::handle(event); } void Fl_ComboBox::type (int t) { listtype = t; } void Fl_ComboBox::readonly(bool yes) { if (type_ == LISTBOX) return; val->readonly(yes); if (yes) val->selection_color(fl_rgb_color(173,216,230)); else val->selection_color(FL_SELECTION_COLOR); } // ComboBox value is contained in the val widget const char *Fl_ComboBox::value() { if (type_ == LISTBOX) return valbox->label(); else return val->value(); } void Fl_ComboBox::value( const char *s ) { int i; if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (i = 0; i < listsize; i++) { if (strcasecmp (s, datalist[i]->s) == 0) break; } } else { for (i = 0; i < listsize; i++) { if (strcmp (s, datalist[i]->s) == 0) break; } } if ( i < listsize) { idx = i; if (type_ == LISTBOX) { valbox->label(datalist[idx]->s); valbox->redraw_label(); } else val->value(datalist[idx]->s); } } void Fl_ComboBox::put_value(const char *s) { value(s); } void Fl_ComboBox::index(int i) { if (i >= 0 && i < listsize) { idx = i; if (type_ == LISTBOX) { valbox->label(datalist[idx]->s); valbox->redraw_label(); } else val->value( datalist[idx]->s); } } int Fl_ComboBox::index() { return idx; } void * Fl_ComboBox::data() { return retdata; } void Fl_ComboBox::insert(const char *str, void *d) { datalist[listsize] = new datambr; datalist[listsize]->s = new char [strlen(str) + 1]; datalist[listsize]->s[0] = 0; strcpy (datalist[listsize]->s, str); datalist[listsize]->d = 0; Brwsr->add(datalist[listsize]->s,d); listsize++; if (listsize == maxsize) { int nusize = maxsize + FL_COMBO_LIST_INCR; datambr **temparray = new datambr *[nusize]; for (int i = 0; i < listsize; i++) temparray[i] = datalist[i]; delete [] datalist; datalist = temparray; maxsize = nusize; } } void Fl_ComboBox::add( const char *s, void * d) { std::string str = s; std::string sinsert; size_t p = str.find("|"); bool found = false; if (p != std::string::npos) { while (p != std::string::npos) { sinsert = str.substr(0, p); found = false; // test for in list if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (int i = 0; i < listsize; i++) { if (sinsert == datalist[i]->s) { found = true; break; } } } // not in list, so add this entry if (!found) insert(sinsert.c_str(), 0); str.erase(0, p+1); p = str.find("|"); } if (str.length()) insert(str.c_str(), 0); } else insert( s, d ); } void Fl_ComboBox::clear() { Brwsr->clear(); if (listsize == 0) return; for (int i = 0; i < listsize; i++) { delete [] datalist[i]->s; delete datalist[i]; } listsize = 0; } int DataCompare( const void *x1, const void *x2 ) { int cmp; datambr *X1, *X2; X1 = *(datambr **)(x1); X2 = *(datambr **)(x2); cmp = strcasecmp (X1->s, X2->s); if (cmp < 0) return -1; if (cmp > 0) return 1; return 0; } void Fl_ComboBox::sort() { Brwsr->clear (); qsort (&datalist[0], listsize, sizeof (datambr *), DataCompare); for (int i = 0; i < listsize; i++) Brwsr->add (datalist[i]->s, datalist[i]->d); } void Fl_ComboBox::textfont (int fnt) { if (type_ == LISTBOX) valbox->labelfont (fnt); else val->textfont (fnt); } void Fl_ComboBox::textsize (uchar n) { if (type_ == LISTBOX) valbox->labelsize(n); else val->textsize (n); } void Fl_ComboBox::textcolor( Fl_Color c) { if (type_ == LISTBOX) valbox->labelcolor (c); else val->textcolor (c); } void Fl_ComboBox::color(Fl_Color c) { _color = c; if (type_ == LISTBOX) valbox->color(c); else val->color(c); if (Brwsr) Brwsr->color(c); } ��������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/pixmaps.cxx����������������������������������������������������������������0000664�0001750�0001750�00000127771�12330516146�014307� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> // This file contains custom icons, icons from gtk, and possibly other sources. // audio-card from gnome icon theme /* XPM */ const char *audio_card_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 102 2", " c #3A3E00", ". c #3A3F00", "X c #3B3F00", "o c #2F3536", "O c #303634", "+ c #303735", "@ c #303637", "# c #363D32", "$ c #323835", "% c #313836", "& c #333936", "* c #323937", "= c #343936", "- c #383E31", "; c #3B4000", ": c #3D4104", "> c #3E4206", ", c #657000", "< c #677300", "1 c #687400", "2 c #687502", "3 c #687505", "4 c #6B7704", "5 c #6B7901", "6 c #6C7900", "7 c #6C7801", "8 c #6D7A00", "9 c #6C7A02", "0 c #6F7D01", "q c #707E02", "w c #707E07", "e c #404630", "r c #3D5B50", "t c #38595E", "y c #38595F", "u c #395A5F", "i c #365761", "p c #405C4F", "a c #545650", "s c #545652", "d c #555753", "f c #565852", "g c #565853", "h c #565854", "j c #575955", "k c #585A56", "l c #5A5C58", "z c #5D5E5B", "x c #5E5F5C", "c c #426050", "v c #426251", "b c #646662", "n c #656663", "m c #666864", "M c #676965", "N c #696A67", "B c #696B67", "V c #6E6F6D", "C c #6E706C", "Z c #6F716D", "A c #758201", "S c #748202", "D c #798708", "F c #7F8839", "G c #A3B31A", "H c #A4B31A", "J c #A4B419", "K c #AABA1A", "L c #858E39", "P c #848D3B", "I c #878F3D", "U c #87903B", "Y c #8A9539", "T c #8C9638", "R c #919C38", "E c #949E39", "W c #959F3A", "Q c #959F3B", "! c #929D3C", "~ c #939E3C", "^ c #959F3D", "/ c #95A03C", "( c #96A03C", ") c #97A03C", "_ c #97A13C", "` c #97A23D", "' c #D8EB31", "] c #DBEF33", "[ c #DFF234", "{ c #E0F338", "} c #E4F839", "| c #E8FB38", " . c #EBFF39", ".. c #EFFF65", "X. c #B7B9B5", "o. c #C4C6C2", "O. c #C6C8C4", "+. c #C7C9C5", "@. c #C8CAC6", "#. c #D0D2CE", "$. c #D4D6D2", "%. c None", /* pixels */ "%.%.%.%.%.%.%.%.%.%.%.%.j k j %.", "%.%.%.%.%.%.%.%.%.%.%.d O.#.X.d ", "X a $.d d %.", " E W W W Q Q ( ( ( ^ f $.d %.%.", " ` e * * % % + # c v f $.d l x ", " ` + V Z Z Z C & y u f $.d o.d ", " ` + Z d d d N = 3 8 f $.d h g ", " _ + B M m n b $ p t f $.d %.%.", " ) - @ o o o o O r i f $.d k z ", " / A q 0 9 5 2 1 < , f $.d @.d ", " ~ K S J 6 H 7 G U I f $.d d h ", " ! { D ' 4 ] w [ P : a $.d %.%.", " T ..R } L | Y .F > s $.d %.%.", "; X X X X X X . . . . s +.d %.%.", "%.%.%.%.%.%.%.%.%.%.%.d d d %.%.", "%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%." }; // help-about from gnome /* XPM */ const char *help_about_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 76 1", " c #C4A001", ". c #C5A101", "X c #C5A102", "o c #C6A202", "O c #C6A203", "+ c #C7A403", "@ c #C7A404", "# c #C7A405", "$ c #C7A406", "% c #C7A407", "& c #C7A507", "* c #C8A508", "= c #C9A70B", "- c #C9A80D", "; c #CAA80C", ": c #C9A810", "> c #CCAC12", ", c #CCAC14", "< c #CDAE1B", "1 c #CFB11C", "2 c #D0B11F", "3 c #CFB021", "4 c #D2B522", "5 c #D3B62C", "6 c #D2B62F", "7 c #F6E132", "8 c #F6E235", "9 c #F5E038", "0 c #F7E23A", "q c #F8E33C", "w c #F8E43E", "e c #D9C04A", "r c #E4CE4C", "t c #E4CE4F", "y c #E7D041", "u c #E7D247", "i c #EBD755", "p c #EBD756", "a c #ECD85A", "s c #F8E441", "d c #F9E644", "f c #F6E349", "g c #FBE74A", "h c #F9E74D", "j c #F7E75F", "k c #F8E75A", "l c #FBE95C", "z c #E9D668", "x c #EAD86C", "c c #F6E664", "v c #F6E667", "b c #F8E864", "n c #F8E865", "m c #F9E96B", "M c #FAEB71", "N c #F9EB73", "B c #F8EA7B", "V c #FAEC7C", "C c #F9EC7F", "Z c #EEDF83", "A c #EEDF85", "S c #F7E981", "D c #F8EC88", "F c #F9ED89", "G c #FAED8B", "H c #F8EB8F", "J c #F9EE9B", "K c #FBF097", "L c #FCF2A6", "P c #FCF3AA", "I c #FDF6BC", "U c #FCF7CF", "Y c #FDF8D1", "T c #FDF9DF", "R c #FEFCEE", "E c None", /* pixels */ "EEEEEEE.EEEEEEEE", "EEEEEE@e@EEEEEEE", "EEEEEE3T<EEEEEEE", "EEEEE+ARZ+EEEEEE", "EEEEE%UVYOEEEEEE", "EEE+OxLdIzo+EEEE", "E$:rHKhglPJt-@EE", "X6DCf8wddwkGS5XE", "E&2aBn0qsNFi1#EE", "EEE#;pj7mp=+EEEE", "EEEEE*c9v@EEEEEE", "EEEEE#uby@EEEEEE", "EEEEEE,M>EEEEEEE", "EEEEEE&4&EEEEEEE", "EEEEEEE EEEEEEEE", "EEEEEEEEEEEEEEEE" }; // insert link icon from gnome /* XPM */ const char *insert_link_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 97 2", " c #2E3436", ". c #2F3536", "X c #363C3D", "o c #373D3E", "O c #464A48", "+ c #464B4C", "@ c #4F524F", "# c #545652", "$ c #555753", "% c #575955", "& c #585A56", "* c #595B57", "= c #5A5B57", "- c #5A5C58", "; c #5B5D58", ": c #5C5D59", "> c #62645F", ", c #656763", "< c #6B6D69", "1 c #6E6F6B", "2 c #6F716D", "3 c #71726F", "4 c #767773", "5 c #777875", "6 c #7C7E79", "7 c #7C7F79", "8 c #CF5F04", "9 c #D06106", "0 c #D86605", "q c #D86706", "w c #F47A03", "e c #F47A04", "r c #F47D0B", "t c #E97910", "y c #E97911", "u c #7E807D", "i c #EA9D4C", "p c #F4B15E", "a c #F5B364", "s c #FDC97D", "d c #838580", "f c #8A8C87", "g c #979B96", "h c #989B95", "j c #9FA19D", "k c #B3B4B0", "l c #B4B7B0", "z c #B7B7B1", "x c #B5B7B2", "c c #B5B8B2", "v c #BABDB6", "b c #BBBEB7", "n c #BBBEB8", "m c #BDBEBB", "M c #C0C0BC", "N c #C2C3BF", "B c #FBD7AA", "V c #FBD9AE", "C c #C4C6C0", "Z c #C5C7C1", "A c #CBCEC8", "S c #CCCEC9", "D c #D0D1CE", "F c #D1D3CE", "G c #D4D4D0", "H c #D6D7D6", "J c #D9DAD8", "K c #DBDCDB", "L c #DEDEDA", "P c #DFDFDD", "I c #FDE6C4", "U c #FEE9CA", "Y c #FEEACC", "T c #E0E0DC", "R c #E0E0DD", "E c #E2E3E2", "W c #E4E4E1", "Q c #E6E6E4", "! c #E7E8E6", "~ c #E9E9E6", "^ c #E8E9E8", "/ c #EDEDEB", "( c #EDEDEC", ") c #EDEEED", "_ c #EEEEEC", "` c #EFF0EE", "' c #F1F1F0", "] c #F3F3F1", "[ c #F3F3F2", "{ c #F4F5F4", "} c #F5F5F4", "| c #F6F6F5", " . c #F6F6F6", ".. c #F8F8F7", "X. c #F9F9F9", "o. c #FDFDFD", "O. c None", /* pixels */ "O.# # # # ; O.O.O.O.O.O.O.O.; # ", "O. .{ [ ` J u - O.O.O.O.- H ) o.", "O.v v v b C F < # $ $ # 5 / A n ", "O.# * $ * 7 b h 1 m m 1 x Z 6 % ", "O.O.& R Q 2 $ $ $ $ $ $ $ $ 3 K ", "O.O.: z L ] } ...X.| ' ( ^ ! E ", "O.O @ 4 M G T W ~ _ P D N k j f ", "O.S c d , = $ $ $ $ $ $ $ $ & > ", "O.v v v l g + X O.O.O.O.X + g l ", "O. . o O.O.O.O.O.O.O.O.o . ", "O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.", "O.O.O.O.O.w e r r r r r e w O.O.", "O.O.O.O.O.O.y V Y I U B t O.O.O.", "O.O.O.O.O.O.O.q a s p 0 O.O.O.O.", "O.O.O.O.O.O.O.O.9 i 9 O.O.O.O.O.", "O.O.O.O.O.O.O.O.O.8 O.O.O.O.O.O." }; // close icon from default gtk theme /* XPM */ const char *close_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 74 1", " c #5A5C58", ". c #5C5E5B", "X c #5C5F5B", "o c #5D5F5B", "O c #5E5F5B", "+ c #5E5F5C", "@ c #5D605A", "# c #5D605B", "$ c #5C615B", "% c #5F605A", "& c #5E615B", "* c #5E605C", "= c #5F605C", "- c #5E615C", "; c #5F615C", ": c #5E605D", "> c #5E615D", ", c #5F625C", "< c #5F625D", "1 c #5F615E", "2 c #5F625E", "3 c #60615B", "4 c #60625D", "5 c #60615E", "6 c #60625E", "7 c #61625E", "8 c #61645F", "9 c #7D807A", "0 c #7E817B", "q c #80827B", "w c #80837E", "e c #82847D", "r c #82857E", "t c #838680", "y c #848681", "u c #848781", "i c #868983", "p c #878983", "a c #868984", "s c #888A85", "d c #898C86", "f c #898D86", "g c #8A8C86", "h c #8A8D88", "j c #8D9089", "k c #8E908A", "l c #8E918B", "z c #8F928C", "x c #8F928D", "c c #91938E", "v c #92948F", "b c #949590", "n c #949691", "m c #959892", "M c #959992", "N c #969994", "B c #979B95", "V c #B1B4AC", "C c #B4B7AF", "Z c #B8BBB3", "A c #B9BCB4", "S c #BABDB5", "D c #BDC0B8", "F c #BDC1B9", "G c #BFC3BB", "H c #C1C4BC", "J c #C3C6BE", "K c #C3C7BF", "L c #C4C8C0", "P c #C5C9C1", "I c #CACEC6", "U c #CBCEC6", "Y c #CDD1C9", "T c None", /* pixels */ "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT", "TT681TTTTTT ,5TT", "TT5Ll2TTTT=wZ:TT", "TT4fUx7TT4aDu;TT", "TTT3jYz<;dHs+TTT", "TTTT>kINmJh=TTTT", "TTTTT>BPKM*TTTTT", "TTTTT-vHGc+TTTTT", "TTTT-uFnbSr.TTTT", "TTT=eAg%#iCq$TTT", "TT:9Cp@TTXyV0;TT", "TT;Vp@TTTTOtVoTT", "TT44&TTTTTT&O4TT", "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT" }; // enter key icon from KDE's crystal theme /* XPM */ const char *enter_key_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 91 1", " c #5C5C5C", ". c #626262", "X c #666666", "o c #696969", "O c #6B6B6B", "+ c #6C6C6C", "@ c #6E6E6E", "# c #6F6F6F", "$ c #717171", "% c #737373", "& c #747474", "* c #838383", "= c #8D8D8D", "- c #92928F", "; c #939393", ": c #A3A3A2", "> c #A7A7A5", ", c #A7A7A6", "< c #A7A7A7", "1 c #A9A9A8", "2 c #A9A9A9", "3 c #AEAEAD", "4 c #B0B0AE", "5 c #B1B1AF", "6 c #B2B2B0", "7 c #B4B4B2", "8 c #B5B5B3", "9 c #B7B7B6", "0 c #B7B7B7", "q c #B9B9B7", "w c #BABAB9", "e c #BBBBBB", "r c #BCBCBB", "t c #BEBEBC", "y c #C2C2C1", "u c #C4C4C0", "i c #C4C4C4", "p c #C5C5C5", "a c #C6C6C4", "s c #C7C7C7", "d c #C9C9C6", "f c #CBCBC8", "g c #CACACA", "h c #CFCFCD", "j c #D0D0CE", "k c #D1D1CF", "l c #D0D0D0", "z c #D1D1D1", "x c #D2D2D0", "c c #D3D3D1", "v c #D2D2D2", "b c #D3D3D2", "n c #D3D3D3", "m c #D4D4D3", "M c #D4D4D4", "N c #D5D5D5", "B c #D7D7D6", "V c #D7D7D7", "C c #D8D8D8", "Z c #D9D9D8", "A c #D9D9D9", "S c #DADAD9", "D c #DADADA", "F c #DCDCDC", "G c #DDDDDD", "H c #DEDEDE", "J c #DFDFDF", "K c #E0E0E0", "L c #E2E2E2", "P c #E3E3E3", "I c #E4E4E4", "U c #E5E5E5", "Y c #E7E7E7", "T c #E8E8E8", "R c #E9E9E9", "E c #EBEBEB", "W c #ECECEC", "Q c #EDEDED", "! c #EFEFEF", "~ c #F0F0F0", "^ c #F3F3F3", "/ c #F4F4F4", "( c #F5F5F5", ") c #F6F6F6", "_ c #F7F7F7", "` c #F8F8F8", "' c #F9F9F9", "] c #FAFAFA", "[ c #FCFCFC", "{ c #FDFDFD", "} c None", /* pixels */ "}}}}}}}}}}}}}}}}", "}}}}}}fSFFFFFSd}", "}}}}}}c{[[[[['a}", "}}}}}}x]_`'`_`t}", "}}}}}}x)^(p`^/r}", "}}}}}}k^!!%'!!w}", "}}}}}}j~WQ#`EWq}", "}}}}}}yWTR@(TR9}", "}Z)))_/YIU+~PI8}", "}BLHKH<zLPOWJK7}", "}mHGD= 2siXTFG6}", "}bDApo$&**;HCC4}", "}bVMA0.eDDCNMN3}", "}hvlzngzllllll1}", "}u5>,,,,,,,,,:-}", "}}}}}}}}}}}}}}}}" }; // question icon from default gtk theme /* XPM */ const char *dialog_question_48_icon[] = { "48 48 215 2", " c None", ". c #3768A6", "+ c #3968A7", "@ c #3A6AA7", "# c #386BA6", "$ c #3968A5", "% c #A7BEDA", "& c #F4F7FB", "* c #F4F8FB", "= c #A5BDD9", "- c #3769A6", "; c #3869A6", "> c #BBCEE4", ", c #FFFFFF", "' c #FEFEFF", ") c #BBCDE3", "! c #F9FBFD", "~ c #98B9DC", "{ c #99B9DC", "] c #729FCF", "^ c #97B8DB", "/ c #BACDE3", "( c #719ECE", "_ c #709DCD", ": c #709DCE", "< c #6F9CCD", "[ c #6F9CCC", "} c #95B6DA", "| c #B9CDE3", "1 c #6E9CCC", "2 c #6E9BCC", "3 c #6D9BCC", "4 c #6D9ACB", "5 c #94B5D9", "6 c #B9CCE3", "7 c #78A2D0", "8 c #709CCC", "9 c #6C9ACB", "0 c #6C99CA", "a c #6B99CA", "b c #93B4D8", "c c #B9CCE2", "d c #739FCE", "e c #A1BEDE", "f c #C9DAEC", "g c #EBF1F8", "h c #FAFCFD", "i c #E7EEF6", "j c #B7CDE6", "k c #759FCE", "l c #6B98CA", "m c #6A98C9", "n c #6A97C9", "o c #92B3D8", "p c #B9CBE2", "q c #80A8D3", "r c #E8EFF7", "s c #6997C9", "t c #6996C8", "u c #6896C8", "v c #91B2D7", "w c #B8CBE2", "x c #7FA7D2", "y c #FDFDFE", "z c #E9F0F7", "A c #EFF4F9", "B c #BBD0E7", "C c #6895C8", "D c #6795C7", "E c #6794C7", "F c #8FB1D6", "G c #B8CBE1", "H c #7EA6D1", "I c #F2F6FA", "J c #ADC6E1", "K c #749FCD", "L c #6A98CA", "M c #AFC7E2", "N c #E1EAF4", "O c #6694C7", "P c #6694C6", "Q c #6593C6", "R c #8EAFD5", "S c #B7CBE1", "T c #96B7DA", "U c #6C99CB", "V c #709CCB", "W c #719DCC", "X c #7FA5D0", "Y c #6693C6", "Z c #6592C6", "` c #6492C5", " . c #6391C5", ".. c #8DAFD4", "+. c #B0C7E2", "@. c #CBDBEC", "#. c #6391C4", "$. c #6290C4", "%. c #8CADD3", "&. c #B7CAE1", "*. c #3768A5", "=. c #396AA7", "-. c #A4BCD8", ";. c #96B6D8", ">. c #FDFEFE", ",. c #85A9D2", "'. c #6290C3", "). c #618FC3", "!. c #608EC3", "~. c #8BADD3", "{. c #A0B8D6", "]. c #3768A7", "^. c #FEFFFF", "/. c #99B8DA", "(. c #A4BFDD", "_. c #608EC2", ":. c #5F8DC2", "<. c #5F8DC1", "[. c #8AABD2", "}. c #3868A6", "|. c #396AA6", "1. c #87AAD2", "2. c #FBFCFE", "3. c #A1BDDC", "4. c #5F8EC2", "5. c #5E8DC1", "6. c #5E8CC1", "7. c #89AAD1", "8. c #3767A6", "9. c #3969A6", "0. c #92B4D8", "a. c #D0DEEE", "b. c #B1C8E2", "c. c #5D8CC1", "d. c #5D8BC0", "e. c #87AAD1", "f. c #F9FAFD", "g. c #79A0CC", "h. c #5C8BC0", "i. c #87A9D0", "j. c #F9FAFC", "k. c #B6C9E0", "l. c #3767A5", "m. c #90B2D6", "n. c #6B97C7", "o. c #6C97C8", "p. c #6C97C7", "q. c #6C96C7", "r. c #5C8AC0", "s. c #5B8ABF", "t. c #87A8D0", "u. c #3668A4", "v. c #8FB0D6", "w. c #5C8ABF", "x. c #5B89BF", "y. c #86A8D0", "z. c #B6CAE1", "A. c #8DAFD5", "B. c #ECF1F8", "C. c #5A89BF", "D. c #5A89BE", "E. c #85A7CF", "F. c #F8FAFC", "G. c #B6CAE0", "H. c #BACDE2", "I. c #8BADD4", "J. c #F6F8FB", "K. c #5A88BE", "L. c #5988BE", "M. c #5987BD", "N. c #84A7CE", "O. c #89ABD3", "P. c #EBF1F7", "Q. c #5887BD", "R. c #84A6CE", "S. c #88ABD1", "T. c #5886BD", "U. c #5786BC", "V. c #83A6CE", "W. c #82A5CE", "X. c #3667A4", "Y. c #85A8D0", "Z. c #5785BC", "`. c #5685BC", " + c #82A4CD", ".+ c #B6C8E0", "++ c #3767A3", "@+ c #85A8CF", "#+ c #5685BB", "$+ c #5584BB", "%+ c #3667A3", "&+ c #B8CAE1", "*+ c #5684BB", "=+ c #81A4CC", "-+ c #B5C8E0", ";+ c #3566A2", ">+ c #82A5CD", ",+ c #5483BA", "'+ c #B7C9E0", ")+ c #81A4CD", "!+ c #5382BA", "~+ c #80A3CB", "{+ c #B5C8DF", "]+ c #80A3CC", "^+ c #5382B9", "/+ c #7FA2CB", "(+ c #B4C8DF", "_+ c #9DB5D3", ":+ c #F1F5F9", "<+ c #F0F4F9", "[+ c #9CB4D3", "}+ c #3565A1", "|+ c #305D95", "1+ c #3666A3", "2+ c #305D96", " ", " ", " . + @ # ", " $ % & * = - ", " ; > , ' ' , ) ; ", " ; > , ! ~ { ! , ) ; ", " ; > , ! ~ ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ] ] ~ ! , ) - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ] ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ( ( _ ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ( ( : _ < < [ } ! , | - ", " ; > , ! ~ ] ] ] ] ] ] ( ( _ _ < < 1 2 3 4 5 ! , 6 - ", " ; > , ! ~ ] ] ] ] ( ( : _ < 7 8 2 2 4 4 9 0 a b ! , c - ", " ; > , ! ~ ] ] ] ( ( d e f g h , ' i j k a a l m n o ! , p - ", " ; > , ! ~ ] ( ( : _ < q , , , , , , , , r k n n s t u v ! , w - ", " ; > , ! ~ ( ( _ _ < < 1 x , , y z A , , , , B t u u C D E F ! , G - ", " ; > , ! ^ : _ < < [ 2 2 4 H I J K l L M , , , N C D D O P Q Q R ! , S - ", " ; > , ! T _ < < 1 2 3 4 9 U V W l m n s X , , , i E O Y Q Z ` ` ...! , S - ", " $ > , ! } < [ 2 2 4 4 9 0 a l L n n s t u +., , , @.Q Q Z ` ` .#.$.$.%.! , &.*. ", " =.-., ! } 1 2 3 4 9 U 0 a l m n s t u u C ;.>., , >.,.` ` .#.$.$.'.).).!.~.! , {.]. ", " . & ^.} 2 4 4 9 0 a l L n n s t u C D D /.y , , ^.(.` .#.$.$.).).)._._.:.<.[.' I }. ", " |.& ^.5 9 U 0 a l m n s t u u C D E O 1.2., , ^.3.#.$.$.'.).).!._.4.:.5.6.6.7.' I 8. ", " 9.-., ! 0.l L n n s t u C D D O P Q Q a., , , b.$.$.).).)._._.:.<.6.6.c.d.e.f., {.8. ", " *./ , ! v s t u u C D E O Y Q Q ` ` r , , , g.).).!._.4.:.5.6.6.d.d.h.i.j., k.l. ", " - ) , ! m.C D D O P Q Q Z ` ` .#.n.o.p.q.'._._.:.<.6.6.c.d.h.r.s.t.j., k.u. ", " - ) , ! v.O Y Q Q ` ` .#.$.$.'.).).!._.4.:.5.6.6.d.d.h.w.s.x.y.j., z.u. ", " - / , ! A.Z ` ` .#.$.$.'.).).B.& & & 6.6.c.d.h.r.s.x.C.D.E.F., G.u. ", " - H., ! I.#.$.$.'.).).!._.4.J., , , d.d.h.w.s.x.C.D.K.E.F., k.u. ", " - c , ! ~.'.).)._._.:.<.6.J., , , r.s.x.x.D.K.L.M.N.F., k.u. ", " - c , ! O._.4.:.5.6.6.d.P.& & & x.C.D.K.L.M.Q.R.F., k.u. ", " - p , ! S.5.6.c.d.h.r.s.x.x.D.K.L.M.Q.T.U.V.F., k.u. ", " l.w , f.i.d.h.w.s.x.C.D.K.L.M.Q.T.U.U.W.F., k.X. ", " l.G , f.Y.x.x.D.K.L.M.Q.T.U.U.Z.`. +F., .+X. ", " ++G , j.@+K.L.M.Q.T.U.U.`.#+$+ +F., .+%+ ", " %+&+, F.V.T.U.U.Z.`.*+$+$+=+F., -+%+ ", " ;+&., F.>+`.#+$+$+,+,+=+F., -+;+ ", " ;+'+, F.)+$+,+,+!+~+F., {+;+ ", " ;+k., F.]+!+^+/+F., {+;+ ", " ;+k., F./+~+F., (+;+ ", " %+k., ^.^., (+%+ ", " ;+_+:+<+[+}+ ", " |+}+1+2+ ", " ", " ", " ", " " }; /* XPM */ const char *clear_sq_icon[] = { "16 16 1 1", " c None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; const char *clear_row_icon[] = { "16 1 1 1", " c None", " " }; // The lightning bolt icons are based on gmfsk's rx.xpm and tx.xpm /* XPM */ const char *rx1_icon[] = { "16 16 4 1", " c None", ". c #0F1F01", "+ c #4E9A06", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *tx1_icon[] = { "16 16 4 1", " c None", ". c #210000", "+ c #A40000", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *rx2_icon[] = { "16 16 3 1", " c None", ". c #0F1F01", "+ c #4E9A06", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *tx2_icon[] = { "16 16 3 1", " c None", ". c #210000", "+ c #A40000", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *rx_icon[] = { "16 16 38 1", " c None", ". c #0F1F01", "+ c #64B517", "@ c #62B315", "# c #61B014", "$ c #5EAE12", "% c #5CAC11", "& c #5AA90F", "* c #68BA1B", "= c #66B719", "- c #65B517", "; c #63B315", "> c #60B014", ", c #5EAD13", "' c #6ABD1C", ") c #69BA1A", "! c #66B718", "~ c #64B418", "{ c #6FC11F", "] c #6CBF1E", "^ c #6ABC1C", "/ c #70C421", "( c #6CBE1E", "_ c #6BBC1C", ": c #75C824", "< c #72C622", "[ c #6EC11F", "} c #6CBE1D", "| c #67B819", "1 c #6DBF1E", "2 c #73C622", "3 c #70C321", "4 c #74C924", "5 c #72C522", "6 c #79CD27", "7 c #76CA26", "8 c #7ACF28", "9 c #7FD42B", " ", " ......... ", " .+@#$%&. ", " .*=-;>,. ", " .')!~@. ", " .{]^)=. ", " ./{(_..... ", " .:</[}^*|. ", " .....{1_. ", " .23[. ", " .45. ", " .67. ", " .8. ", " .9. ", " .. ", " " }; /* XPM */ const char *tx_icon[] = { "16 16 34 1", " c None", ". c #210000", "+ c #C11010", "@ c #BE0E0E", "# c #BB0D0C", "$ c #B90B0C", "% c #B60A0A", "& c #B40908", "* c #C51212", "= c #C31111", "- c #C00F0F", "; c #BC0C0D", "> c #B90C0B", ", c #C81313", "' c #C10F10", ") c #CC1617", "! c #CA1515", "~ c #C71313", "{ c #CF1818", "] c #CC1616", "^ c #D41A1A", "/ c #D11819", "( c #CF1718", "_ c #C71414", ": c #CA1514", "< c #C81413", "[ c #D21919", "} c #CF1817", "| c #CD1616", "1 c #D11818", "2 c #D81D1D", "3 c #D61B1B", "4 c #DB1E1E", "5 c #E02121", " ", " ......... ", " .+@#$%&. ", " .*=-@;>. ", " .,*='@. ", " .)!~*=. ", " .{]!,..... ", " .^/(]!_*=. ", " .....]:<. ", " .[}|. ", " .^1. ", " .23. ", " .4. ", " .5. ", " .. ", " "}; // pskreporter.info "favicon" /* XPM */ const char *pskr_icon[] = { "16 16 3 1", " c None", ". c #FF0000", "+ c #FFFF00", " .. ", " ... ", " ..... ", " .....+.. ", ". ...++++... ", ".. ..+++++. .. ", "....++++++..+. ", "..+++++++++++.. ", "..+++++++.++++. ", "....+++++..++.. ", ".. ..+++++.... ", ". ..+++++.. ", " ...+... ", " .... ", " .. ", " . "}; /* XPM */ const char * flmsg_icon[] = { "48 48 1044 2", " c #FDFCFC", ". c #F3F2F1", "+ c #F9F7F4", "@ c #EBECEE", "# c #FFFFFF", "$ c #FFFFFE", "% c #FEFEFF", "& c #FFFEFD", "* c #EFF2F4", "= c #F9F9F8", "- c #EAEAEA", "; c #F5F5F5", "> c #F8F8F9", ", c #F0EFED", "' c #FEFFFF", ") c #ECEAEA", "! c #F6F8F9", "~ c #FEFEFE", "{ c #FFFDFB", "] c #FDFFFF", "^ c #F1EEED", "/ c #FBFBFA", "( c #EBEAEA", "_ c #F3F5F6", ": c #F9FAFA", "< c #F7F7F7", "[ c #F3F3F3", "} c #F8F7F5", "| c #7F786A", "1 c #4F6377", "2 c #AAA59B", "3 c #686B6D", "4 c #EFF3F8", "5 c #B8B2AE", "6 c #545860", "7 c #FBFBF9", "8 c #B09D8A", "9 c #52575C", "0 c #BEBFBF", "a c #5D6366", "b c #D4E5F6", "c c #E1E0DC", "d c #4F4B46", "e c #A9B5C1", "f c #FFFEF4", "g c #7A7065", "h c #B5C0BF", "i c #837E7C", "j c #8495A7", "k c #C2BCB4", "l c #656E76", "m c #747270", "n c #D9DFE0", "o c #B6AF9F", "p c #444452", "q c #B5B8B6", "r c #54575A", "s c #CAD4E2", "t c #EAEAEC", "u c #525253", "v c #ECEDF0", "w c #D4C3B6", "x c #3D3636", "y c #96AFC6", "z c #F9F9FA", "A c #8E7C71", "B c #484C4E", "C c #CDD6DA", "D c #7A6B59", "E c #103963", "F c #FAF0EA", "G c #000000", "H c #D2D8DD", "I c #FFFAF2", "J c #B99C77", "K c #C7D8E9", "L c #C8A47E", "M c #161E28", "N c #57311B", "O c #293641", "P c #160C01", "Q c #CBE1F2", "R c #9B9184", "S c #000813", "T c #ECD1B8", "U c #030000", "V c #DFEAEC", "W c #090704", "X c #A6B7C3", "Y c #BCB4AE", "Z c #DFE4E4", "` c #DACCBB", " . c #000010", ".. c #737C89", "+. c #E6C69F", "@. c #080602", "#. c #8599AD", "$. c #D4BFB5", "%. c #916A40", "&. c #1B2530", "*. c #A5B0A3", "=. c #050A0E", "-. c #EAF9FF", ";. c #7A6C5D", ">. c #081D32", ",. c #453725", "'. c #768C9E", "). c #D4D6D9", "!. c #707282", "~. c #433423", "{. c #40546A", "]. c #C09E7B", "^. c #1E252E", "/. c #FDFDFD", "(. c #9E7E4D", "_. c #171B20", ":. c #1F140A", "<. c #C8D5E0", "[. c #7C6753", "}. c #1D2C45", "|. c #FFFFEA", "1. c #1E1508", "2. c #85B2D5", "3. c #D7DCDE", "4. c #F9F8F8", "5. c #CEC9C5", "6. c #E1E8F0", "7. c #D6C7B7", "8. c #01010C", "9. c #615647", "0. c #2D3B4A", "a. c #393645", "b. c #9A8C7D", "c. c #010E1C", "d. c #B9A193", "e. c #FCF4EB", "f. c #050507", "g. c #28334C", "h. c #F3E2BE", "i. c #050A10", "j. c #E7F5FE", "k. c #7E6D5A", "l. c #14426F", "m. c #E6CEB2", "n. c #03111C", "o. c #FCFFFF", "p. c #B59D7F", "q. c #71726D", "r. c #80857C", "s. c #040505", "t. c #E6F0FB", "u. c #D5AD83", "v. c #161F2A", "w. c #3A210E", "x. c #2E4A64", "y. c #180D02", "z. c #CDE4F6", "A. c #B6AB94", "B. c #CFB59D", "C. c #E9F4F6", "D. c #23190E", "E. c #98AEBD", "F. c #4B2E16", "G. c #6381A9", "H. c #E6D4C0", "I. c #00001A", "J. c #FFFDF0", "K. c #C1D3DC", "L. c #D7C1AB", "M. c #747A7A", "N. c #757A7D", "O. c #0E0C06", "P. c #A7C5D4", "Q. c #DCBCA6", "R. c #FBF2EF", "S. c #927656", "T. c #394D65", "U. c #00040A", "V. c #F2FFFF", "W. c #F3F0ED", "X. c #72675C", "Y. c #585E63", "Z. c #E1F2FE", "`. c #918675", " + c #797C7F", ".+ c #6B6665", "++ c #F0FDFF", "@+ c #EDDDCE", "#+ c #505152", "$+ c #90989D", "%+ c #85817D", "&+ c #606163", "*+ c #818385", "=+ c #AFB8BE", "-+ c #EAF3FB", ";+ c #C9C5C0", ">+ c #5A5855", ",+ c #858A8F", "'+ c #FFFEFA", ")+ c #CEC7C2", "!+ c #8A8683", "~+ c #91959C", "{+ c #D1D4DA", "]+ c #EDEAE6", "^+ c #A4A19D", "/+ c #848588", "(+ c #AFB2B4", "_+ c #ECF0F5", ":+ c #958473", "<+ c #525152", "[+ c #BDD5EB", "}+ c #BFB29E", "|+ c #61656D", "1+ c #6E655C", "2+ c #C9DAF1", "3+ c #FFFDF4", "4+ c #6A6764", "5+ c #6E7177", "6+ c #98999A", "7+ c #808182", "8+ c #EFEDED", "9+ c #A19F9C", "0+ c #555556", "a+ c #ACB2B7", "b+ c #FBFCFC", "c+ c #FBFBFB", "d+ c #E5E9EC", "e+ c #DFE9F0", "f+ c #DCD9D8", "g+ c #C4C8CF", "h+ c #F6F5F8", "i+ c #F8FAF9", "j+ c #F7FAFE", "k+ c #FAFFFF", "l+ c #DEE1E4", "m+ c #F4F1EE", "n+ c #EBEBED", "o+ c #FEFCFA", "p+ c #FCFBF8", "q+ c #CCCED0", "r+ c #DAD4D0", "s+ c #D7E0E9", "t+ c #C4C4C4", "u+ c #DBE6EB", "v+ c #E2E9EF", "w+ c #D8DCDC", "x+ c #D8D5D0", "y+ c #CDD2D7", "z+ c #FBFAF7", "A+ c #EDE8DF", "B+ c #C9D2DC", "C+ c #FFFFFD", "D+ c #EFF7FD", "E+ c #D3D7D7", "F+ c #E5E7EB", "G+ c #F9F4EF", "H+ c #DAE0E5", "I+ c #FFFDFC", "J+ c #FDFEFE", "K+ c #FCFCFC", "L+ c #FCFDFD", "M+ c #C0A188", "N+ c #B3C8D5", "O+ c #A58271", "P+ c #91979A", "Q+ c #F4FBF0", "R+ c #36363C", "S+ c #BAA994", "T+ c #8792A7", "U+ c #89796A", "V+ c #88A6C2", "W+ c #525050", "X+ c #D0DBE5", "Y+ c #958877", "Z+ c #9AABC1", "`+ c #DAC6B2", " @ c #5F84A2", ".@ c #82655B", "+@ c #CCC4C1", "@@ c #A3A0A5", "#@ c #877D7F", "$@ c #C0AAA0", "%@ c #CDD3D8", "&@ c #645447", "*@ c #8699AE", "=@ c #717880", "-@ c #936E4D", ";@ c #C1E4FE", ">@ c #7B6B58", ",@ c #CCD5DF", "'@ c #826251", ")@ c #7D8485", "!@ c #CBD6DA", "~@ c #4E3D36", "{@ c #9FAAB0", "]@ c #C1BDB6", "^@ c #5D7393", "/@ c #FCFCFD", "(@ c #243044", "_@ c #D0DCE4", ":@ c #9A958D", "<@ c #888C95", "[@ c #918B7C", "}@ c #8C9EB3", "|@ c #FEFBF8", "1@ c #665C60", "2@ c #A49F8E", "3@ c #778BA5", "4@ c #493E3D", "5@ c #587D9A", "6@ c #C3C1C1", "7@ c #7C7E83", "8@ c #7B7D7D", "9@ c #E2D1BF", "0@ c #618BAF", "a@ c #AA8A7B", "b@ c #877D78", "c@ c #C3BCBC", "d@ c #82736F", "e@ c #B2A09B", "f@ c #DADFDF", "g@ c #160A08", "h@ c #B5C5D2", "i@ c #757677", "j@ c #261613", "k@ c #D6DEE7", "l@ c #6E513E", "m@ c #95ABB8", "n@ c #7E5B47", "o@ c #858A88", "p@ c #ABBCC2", "q@ c #3A271B", "r@ c #99A1A1", "s@ c #D6DADB", "t@ c #2E364B", "u@ c #FEFEFD", "v@ c #FDFCFB", "w@ c #B8ABA3", "x@ c #FFFCFA", "y@ c #C3C1BE", "z@ c #C3D1D9", "A@ c #F3F4EE", "B@ c #BDBFC5", "C@ c #FCF4EC", "D@ c #EAFFFF", "E@ c #D0CFCC", "F@ c #A6ABB2", "G@ c #FFFFFA", "H@ c #C5C7CA", "I@ c #C2B5AE", "J@ c #F7FFFF", "K@ c #C1C0C3", "L@ c #D9D4CF", "M@ c #BEC9D3", "N@ c #D6CDC8", "O@ c #DAD7D6", "P@ c #B0B3B8", "Q@ c #DCD6CC", "R@ c #B7C3CF", "S@ c #E9E7E0", "T@ c #D2CECA", "U@ c #AAB2BB", "V@ c #B6B7B8", "W@ c #FFF9E9", "X@ c #9EB3C7", "Y@ c #ABB0B6", "Z@ c #C3B9B2", "`@ c #B1B7BE", " # c #FBFCF7", ".# c #B0AEAF", "+# c #DBDDE3", "@# c #BFB8AF", "## c #F1FFFF", "$# c #FEFDFE", "%# c #FFFEFE", "&# c #F8F8F8", "*# c #E3E2E1", "=# c #A1A5AB", "-# c #FFFEF9", ";# c #E9E2DE", "># c #F6F6F4", ",# c #F2F3F3", "'# c #DCDCDE", ")# c #FBFAF9", "!# c #F3F3F5", "~# c #E2E4E6", "{# c #E9E3E4", "]# c #F9FFFE", "^# c #E5E0E1", "/# c #F8FAFB", "(# c #EDEBE7", "_# c #E4E8EC", ":# c #949595", "<# c #EBE6E2", "[# c #E8EDF1", "}# c #E0DCE0", "|# c #FAF8F3", "1# c #EEF0F2", "2# c #AEAEAE", "3# c #F2EEED", "4# c #F6F7F6", "5# c #E6E9EE", "6# c #F7F7F6", "7# c #E2DBD3", "8# c #FBFCFB", "9# c #EDE9E5", "0# c #F1F1F1", "a# c #706D70", "b# c #797877", "c# c #D8C1B2", "d# c #CBC2B0", "e# c #E0E8EA", "f# c #6D6A6C", "g# c #ACAEB3", "h# c #F2F0EF", "i# c #D7D3C8", "j# c #C6C8CC", "k# c #93B5C8", "l# c #5F2C1E", "m# c #C3D4D5", "n# c #806162", "o# c #D0D0CB", "p# c #B5B3B6", "q# c #B0BDC9", "r# c #A4A3A0", "s# c #7D89A3", "t# c #DAE5EE", "u# c #775045", "v# c #C2D1D7", "w# c #E7EBF0", "x# c #A39E9B", "y# c #5B3F37", "z# c #F1F6EB", "A# c #6683A9", "B# c #BBAE9A", "C# c #C6D7E4", "D# c #BDB6B1", "E# c #D9D6CF", "F# c #EEECE9", "G# c #73849B", "H# c #D1CAB5", "I# c #E9ECE8", "J# c #DECDB4", "K# c #F8FFFF", "L# c #C6BFB9", "M# c #797A82", "N# c #E0E6EF", "O# c #D2D1CC", "P# c #CCD5DC", "Q# c #A5C4D9", "R# c #713B34", "S# c #D3EEF0", "T# c #795659", "U# c #D9DED1", "V# c #CAD0D0", "W# c #6F809A", "X# c #A4A29F", "Y# c #657087", "Z# c #EDFDFF", "`# c #744F4F", " $ c #A9AEA6", ".$ c #D7E0EC", "+$ c #A19D9B", "@$ c #9B8889", "#$ c #6C91BF", "$$ c #FFF0D9", "%$ c #DFE2E3", "&$ c #6B5750", "*$ c #D2D8D7", "=$ c #DBD1C8", "-$ c #F0F0F0", ";$ c #DCDDDD", ">$ c #B6B0AA", ",$ c #CACCD2", "'$ c #F6F3F1", ")$ c #D2D5DA", "!$ c #E8E4E0", "~$ c #D7DCE1", "{$ c #F3F1F0", "]$ c #F2F1F1", "^$ c #F6F4F2", "/$ c #D7D3D1", "($ c #EFEFEF", "_$ c #D6DBDC", ":$ c #E6E3E2", "<$ c #CFD1CF", "[$ c #E8EAEE", "}$ c #D2D0CF", "|$ c #F1F1F0", "1$ c #F2F2F2", "2$ c #979797", "3$ c #F6F5F4", "4$ c #D8D7D6", "5$ c #DFE0DD", "6$ c #EBEEF3", "7$ c #E1DEDA", "8$ c #F3F3F2", "9$ c #F1F1F2", "0$ c #F4F4F4", "a$ c #F0F0F1", "b$ c #EFEFEE", "c$ c #A7A4A3", "d$ c #F4F3ED", "e$ c #CFCDC9", "f$ c #C4C3C4", "g$ c #F0F1F1", "h$ c #DDDEDD", "i$ c #EBE9E8", "j$ c #D6DBDF", "k$ c #D7D7D7", "l$ c #CCCCCB", "m$ c #98999B", "n$ c #E5E6E0", "o$ c #BBBEC4", "p$ c #D8D5D4", "q$ c #BCBFC3", "r$ c #D5D5D3", "s$ c #BDBDBC", "t$ c #C0C1C3", "u$ c #C8CACE", "v$ c #CACDD2", "w$ c #D4CCC4", "x$ c #CFD5DA", "y$ c #DAD9D9", "z$ c #D8D8D7", "A$ c #DBDBDC", "B$ c #D4D5D6", "C$ c #DADADA", "D$ c #9C9C9C", "E$ c #D5D9DE", "F$ c #D6DCE0", "G$ c #C0BDBD", "H$ c #C0BFBB", "I$ c #CDCDCE", "J$ c #C4C9CB", "K$ c #D7D4D0", "L$ c #C1C0BE", "M$ c #DDDAD7", "N$ c #D6D6D6", "O$ c #A4A3A2", "P$ c #D3D4D5", "Q$ c #BEBFC0", "R$ c #CBC9C6", "S$ c #CBCDCC", "T$ c #C9CAC7", "U$ c #B9BCC6", "V$ c #D1CECB", "W$ c #B8B7B6", "X$ c #F4F7F8", "Y$ c #694F4C", "Z$ c #A69693", "`$ c #F5F7FA", " % c #B5A696", ".% c #E7EEE5", "+% c #A6A0A5", "@% c #8599B2", "#% c #BEA392", "$% c #A0ADA9", "%% c #ECF2F1", "&% c #927B6B", "*% c #97989A", "=% c #DDCBB8", "-% c #A2AEBE", ";% c #A27E76", ">% c #D6E9ED", ",% c #978A88", "'% c #EEEFEF", ")% c #DCD2CA", "!% c #CDEAFF", "~% c #9F9B99", "{% c #BCA79C", "]% c #59648C", "^% c #FEFDF3", "/% c #ECF5F7", "(% c #868E87", "_% c #BFCEE4", ":% c #E7E6E5", "<% c #F2F6F7", "[% c #63443E", "}% c #636A7A", "|% c #DBDEE2", "1% c #A6AAAC", "2% c #EAEDF0", "3% c #8B8489", "4% c #EEEEE3", "5% c #819DBD", "6% c #CEB696", "7% c #D8F6F8", "8% c #67889F", "9% c #E1B58E", "0% c #EBF8FF", "a% c #A1A19F", "b% c #777270", "c% c #C8C8C0", "d% c #735358", "e% c #E9E8D6", "f% c #837B86", "g% c #D6D8D6", "h% c #E7E4E3", "i% c #F7F4F3", "j% c #EBE9E1", "k% c #94B7D9", "l% c #989492", "m% c #CBBAB6", "n% c #4B517C", "o% c #FAFBF2", "p% c #C1CFD0", "q% c #F8F6F2", "r% c #93B1C5", "s% c #767278", "t% c #ECF1F7", "u% c #F9F9F9", "v% c #E6E7E6", "w% c #726F6F", "x% c #FFFFFB", "y% c #929CA7", "z% c #8E8982", "A% c #D1D3D3", "B% c #A09C9D", "C% c #C6C6C3", "D% c #A8B0B5", "E% c #C0BCB9", "F% c #C9CDD3", "G% c #B9AFAA", "H% c #EAF2F9", "I% c #8D8A86", "J% c #DEEFF7", "K% c #D1D5DC", "L% c #9F9999", "M% c #E0EAF5", "N% c #ACA39E", "O% c #B6BBBC", "P% c #BEBDBF", "Q% c #F7EEE5", "R% c #B8B2AD", "S% c #F3FCFF", "T% c #F9F9F7", "U% c #F6F6F6", "V% c #918E8C", "W% c #D9D7D5", "X% c #A6A7AE", "Y% c #F1F0F0", "Z% c #817E85", "`% c #F4F0E7", " & c #B2B9C4", ".& c #EDEFF3", "+& c #EBECEA", "@& c #FDFDFC", "#& c #FDFEFF", "$& c #FEFDFC", "%& c #F6F6F7", "&& c #BCBCBC", "*& c #BEBEBE", "=& c #9F9F9F", "-& c #C7C8C8", ";& c #C4C6C7", ">& c #C2C4C6", ",& c #C1C0BF", "'& c #C1C1C1", ")& c #C6C6C6", "!& c #BFBFBF", "~& c #C3C3C3", "{& c #C6C6C7", "]& c #BEBEBF", "^& c #BEC0C1", "/& c #C0BEBD", "(& c #C5C5C6", "_& c #C1C1C2", ":& c #C1BFBF", "<& c #C4C5C6", "[& c #C3C2C0", "}& c #BEBDBD", "|& c #C3C4C6", "1& c #9D9E9E", "2& c #B8AFB1", "3& c #BCB0A3", "4& c #D9C8BC", "5& c #E8F1F8", "6& c #E5E3E0", "7& c #BAB5B5", "8& c #F2F4F5", "9& c #D3D5D5", "0& c #FEFBFA", "a& c #F4F6F5", "b& c #BEB9B8", "c& c #F8F8F6", "d& c #FDF2E5", "e& c #F0FCFF", "f& c #C4BCBB", "g& c #DFDFDD", "h& c #D4D0D0", "i& c #E5F2F7", "j& c #C6BEB8", "k& c #CDDCE9", "l& c #E6E5E2", "m& c #D1DEEF", "n& c #D3C6BD", "o& c #999999", "p& c #CEC2BC", "q& c #928172", "r& c #EFC9A8", "s& c #767C84", "t& c #A7ABB1", "u& c #938788", "v& c #E4E0D7", "w& c #5D6876", "x& c #F1F2F4", "y& c #DDE2E7", "z& c #161927", "A& c #E4E4E4", "B& c #73747C", "C& c #B1B8C1", "D& c #9E908B", "E& c #E2E0DE", "F& c #A1897E", "G& c #E0F4F2", "H& c #8CAED9", "I& c #A88473", "J& c #D4CFCC", "K& c #E5DED5", "L& c #A1927E", "M& c #7C7075", "N& c #989797", "O& c #E8E0DB", "P& c #A59D97", "Q& c #E8C8AE", "R& c #C4CED8", "S& c #C9C7C7", "T& c #958D8D", "U& c #EAEFEF", "V& c #BCB0A7", "W& c #EEE8E5", "X& c #DCE0E4", "Y& c #AAA7A6", "Z& c #D7D3CA", "`& c #E8E5DF", " * c #D1CAC4", ".* c #89858B", "+* c #D8D7D3", "@* c #A19593", "#* c #DFF2F4", "$* c #888B95", "%* c #A6B2C3", "&* c #E3E7EF", "** c #F9F5EE", "=* c #ABBDCE", "-* c #A9958C", ";* c #FAFBFB", ">* c #F9FBFC", ",* c #F7FBFE", "'* c #FAFAFA", ")* c #F7F6F6", "!* c #F8F9FB", "~* c #F6F7F8", "{* c #F7F6F5", "]* c #FDFDFE", "^* c #F7F8F9", "/* c #F5F6F7", "(* c #F8F9FA", "_* c #F9F6F5", ":* c #FFFEFB", "<* c #F5F4F3", "[* c #F4F5F6", "}* c #FDFAF7", "|* c #989897", "1* c #FCFBFB", "2* c #FCFCFB", "3* c #FBFCFD", "4* c #9A9C9D", "5* c #CEC4B7", "6* c #828C94", "7* c #E0DDD8", "8* c #A6A6A7", "9* c #BCB8B4", "0* c #B3BEC6", "a* c #EFEBE5", "b* c #716561", "c* c #D5E9F3", "d* c #928683", "e* c #EFF1F3", "f* c #888584", "g* c #C7BEB6", "h* c #B6C1CA", "i* c #B4A799", "j* c #B1BBBF", "k* c #E6DFD4", "l* c #979FAB", "m* c #A6A4A4", "n* c #BCCAD9", "o* c #B6ADA5", "p* c #D2DBE1", "q* c #B6BCB1", "r* c #DFDFDF", "s* c #AE9F9B", "t* c #F8FCF9", "u* c #FAF0EC", "v* c #FFEBC9", "w* c #496797", "x* c #E2AA84", "y* c #858C91", "z* c #617C9D", "A* c #F3F1F3", "B* c #C5C8C1", "C* c #E8E4DD", "D* c #CEC8C4", "E* c #5076A5", "F* c #E0CFBC", "G* c #CEECFB", "H* c #6A5662", "I* c #C7CFD1", "J* c #9A9B9C", "K* c #D1C9BD", "L* c #949BA0", "M* c #C3BDB3", "N* c #74797F", "O* c #B0ADAF", "P* c #989895", "Q* c #A29E9C", "R* c #8F7F75", "S* c #A9B8CC", "T* c #A68C7E", "U* c #71767E", "V* c #A69A91", "W* c #929FAD", "X* c #D2C6BA", "Y* c #BCC4CC", "Z* c #B5B4B1", "`* c #B2B0B0", " = c #AEADA9", ".= c #A8A5AD", "+= c #92867E", "@= c #BBC4CC", "#= c #FAF8F6", "$= c #E6E8EB", "%= c #FBFAF8", "&= c #EEEBE8", "*= c #999A9B", "== c #E5DFD5", "-= c #9DA4A1", ";= c #D8DDE2", ">= c #E9E8E6", ",= c #C5C4C9", "'= c #FBF7EC", ")= c #BEC5D4", "!= c #C0BFC1", "~= c #F4F4F6", "{= c #D3CFC3", "]= c #727A84", "^= c #B8B2AC", "/= c #CAC5BF", "(= c #D9D2D0", "_= c #E7EDEE", ":= c #CECECF", "<= c #C4C6CA", "[= c #CFCCD1", "}= c #DFCEC2", "|= c #ECE7E2", "1= c #989898", "2= c #F6F6DE", "3= c #D1CFBE", "4= c #878F9E", "5= c #C1B1A5", "6= c #7F8B9D", "7= c #C1C7C5", "8= c #6A7689", "9= c #F2EDE8", "0= c #D9F3F9", "a= c #A98467", "b= c #C0CFD5", "c= c #8A8789", "d= c #908277", "e= c #839DB7", "f= c #A39187", "g= c #918C87", "h= c #2E2E4A", "i= c #ECECE0", "j= c #9A9A9B", "k= c #E3DACE", "l= c #949EA8", "m= c #F7F8FD", "n= c #A4A2A2", "o= c #D3D5DC", "p= c #CFC9C1", "q= c #F9F8F6", "r= c #A29FA3", "s= c #FBFEFF", "t= c #CFC7BF", "u= c #E3EBF6", "v= c #BEB1A6", "w= c #EAF2F7", "x= c #CBBDB1", "y= c #E4EEF4", "z= c #B7B2B0", "A= c #B5B6B9", "B= c #A9ACB5", "C= c #D2D1D2", "D= c #EEEDEF", "E= c #C4C1C9", "F= c #FFF8EC", "G= c #D8E2ED", "H= c #D2D4D7", "I= c #FDF9F6", "J= c #E1E6E6", "K= c #DBD2C6", "L= c #FCFCF6", "M= c #B8CED9", "N= c #F4EEE8", "O= c #EAE4E1", "P= c #D6DAD9", "Q= c #D4C9B9", "R= c #9FACBA", "S= c #CFCBC5", "T= c #C3C6CD", "U= c #DCD4D5", "V= c #9A7F83", "W= c #9AACC2", "X= c #E2BFA1", "Y= c #84868D", "Z= c #A6B4C2", "`= c #FEFDF9", " - c #B0C1D2", ".- c #686E77", "+- c #95A7AE", "@- c #5C7F9A", "#- c #937657", "$- c #98A4AC", "%- c #62615B", "&- c #949B9E", "*- c #828A91", "=- c #95857C", "-- c #EFE1B8", ";- c #C1C5CB", ">- c #113253", ",- c #B6B7BB", "'- c #D9D4C7", ")- c #E0D7D9", "!- c #A1898B", "~- c #9CABBF", "{- c #D9B79B", "]- c #A8B1C1", "^- c #97948F", "/- c #8D7C83", "(- c #E0DEDD", "_- c #7A7E86", ":- c #E3F8F8", "<- c #525876", "[- c #C0A583", "}- c #C9D7DC", "|- c #868E90", "1- c #E6EAEB", "2- c #384054", "3- c #737781", "4- c #E7D6AA", "5- c #F1F3E7", "6- c #4E5F79", "7- c #D4CCBE", "8- c #E0EAEF", "9- c #FFFFF3", "0- c #CFDDEA", "a- c #F7EEE4", "b- c #DEE4EB", "c- c #F8F5F0", "d- c #FAF8F7", "e- c #D9E1E5", "f- c #E3DFDE", "g- c #C5C6C6", "h- c #CBCED5", "i- c #DFE1E5", "j- c #DDD6CE", "k- c #C9CED1", "l- c #F1ECE6", "m- c #E9EEF4", "n- c #E1DAD7", "o- c #D5DCE9", "p- c #D7CAC3", "q- c #E0D5CC", "r- c #DDE7F0", "s- c #A0A1A1", "t- c #746363", "u- c #705F4C", "v- c #DFE8F0", "w- c #F7F0D5", "x- c #E7F2FE", "y- c #897E7C", "z- c #B39F8D", "A- c #B5AEA7", "B- c #C4C1BD", "C- c #899DB1", "D- c #8C705F", "E- c #9AAEB9", "F- c #83756D", "G- c #E8DFDA", "H- c #BBA694", "I- c #908186", "J- c #E2DFCE", "K- c #808D9D", "L- c #848580", "M- c #E0D7CA", "N- c #A4B9C6", "O- c #5978A0", "P- c #9C9898", "Q- c #9294A1", "R- c #BFC9CE", "S- c #AB9E9D", "T- c #9C958C", "U- c #E6E9E8", "V- c #8290A3", "W- c #FFFBF5", "X- c #CDC4BF", "Y- c #EBE4E0", "Z- c #BDB0A4", "`- c #A0A3B1", " ; c #E3E4E7", ".; c #AAB3BD", "+; c #BDB7B5", "@; c #D1D2C8", "#; c #D5E1EF", "$; c #B58E67", "%; c #CEE3F6", "&; c #C4BFBD", "*; c #FFFCF5", "=; c #D0CECA", "-; c #D0CBC7", ";; c #A09EA1", ">; c #E0E1E2", ",; c #E9ECEE", "'; c #CCC7CA", "); c #EEEBE0", "!; c #7F7081", "~; c #F0F5F7", "{; c #C8D3DF", "]; c #EEE2D5", "^; c #F5F4F4", "/; c #F8F7F6", "(; c #FDFDFF", "_; c #F6F8FA", ":; c #CDCBCC", "<; c #FCF9F8", "[; c #EAE8E9", "}; c #FFFEFC", "|; c #FCFEFF", "1; c #F8F6F5", "2; c #F6F5F5", "3; c #FAFAFC", " . + @ # # # $ # % & * = - # # ; > , ' # ) ! # ~ # { - ] # ^ / ( # # # $ # % # _ : # # # < [ # ", "} | 1 2 3 4 ' 5 6 # 7 8 9 0 a b c d e f g h i j # k l 0 m n o p q r s ~ t u v $ w x y z A B C # ", "# D E F G H I J G K ' L M # N O # P Q R S # T U V W X # Y Z ` .# G ..# +.@.#.# $.%.&.# *.=.-.# ", "# ;.>.,.'.# ).!.~.{.# ].^./.(._.% :.<.[.}./.|.1.2.G 3.4.5.6.7.8.9.0.# # a.b.c.# d.e.f.g.h.i.j.# ", "# k.l.m.n.o.p.q.r.s.t.u.v.# w.x.# y.z.A.G # B.G C.D.E.# F.G.H.I.J.G K.L.M.N.O.P.Q.R.S.T.# U.V.# ", "W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+# ]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+] 8+9+0+a+# ", "# # # # # # # # # # # # # # # b+# # # $ # # # # # # # # # /.# # # ' # # # # # # # # b+~ # # # # ", "# c+c+' d+e+f+g+h+i+: c+j+k+l+# m+n+o+p+q+r+s+t+u+v+w+x+y+# z+A+B+C+D+b+E+F+G+H+I+q+# J+K+c+L+# ", "# # # # M+N+O+P+Q+R+# # S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@$ =@-@;@>@,@'@)@!@~@{@]@^@% /.# # # ", "# # # /@# (@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@# i@j@k@l@m@n@o@p@q@r@s@t@# K+# # # ", "# # # u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@~ V@W@X@# Y@Z@`@ #.#+#@#### # # # # ", "# # # # # # # # # # # # $ # # ' # # # # # # # # # # # # # # # # # # $## # # # # # # $ # # # # # ", "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", "# # # ~ /.# # # # # # # # # # # # # # # # # # K+# # # # # # # # # # # # # # # /.# # # # # # # # ", "# # # # # # # # # % # # # # # ~ # %## # # # # # ~ # ~ # # # # # # # # # # # # # ~ # ' # $ # # # ", "&#&#< *#=#-#;#>#,#'#)#[ !#~## {#]#^#/#(#_#< # :#<#[#}#|#1#< &#&#&#&#&#&#&#; # 2#3#4#5#6#7#8#* 9#", "# # # 0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q## # r#s#t#u#v#w## # # # # # # # ~ # x#y#z#A## B#C#D#E#", "# # ~ F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W## # X#Y#Z#`# $.$~ # # # # # # # L+# +$@$K+#$$$%$&$*$=$", "0#0#-$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$}$|$($1$2$3$4$5$6$7$8$0#9$0$a$0#0#0#b$1$c$d+d$e$f$g$h$i$j$", "k$k$k$l$m$n$`@o$p$q$r$s$t$u$v$w$x$y$z$A$B$k$C$D$E$F$G$H$I$J$k$K$L$M$k$z$k$N$C$O$P$Q$R$S$T$U$V$W$", "# # # X$Y$Z$`$ %.%+%# @%#%$%%%&%# # # # # # # *%=%-%;%>%,%'%# G@)%!%# # # # # ~%{%]%^%/%# (%_%:%", "# # # <%[%}%|%1%2%3%4%5%6%7%8%9%0%# # # # ~ # a%b%c%d%e%f%g%h%i%j%k%# ' # ~ # l%m%n%o%p%q%r%s%t%", "u%u%&#v%w%x%y%z%A%B%C%D%E%F%' G%H%u%u%u%u%< # I%J%K%L%M%N%O%P%Q%R%S%T%u%u%U%# V%W%X%Y%Z%`% &.&+&", "/././.u%c+% # # # # # # # # @&# & /././././.# '%# # # C+# # # #&# $&/././.K+# %&# # ~ # #&# %#% ", "# # # # # # # # # # # # # # # # # # # # # # # ~ # # # # # # # # # # # # # # # # # # # # # # # # ", "/././././././././././././././././././././././.K+/./././././././././././././././././././././././.", "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&=&-&;&>&,&'&)&!&~&*&!&{&]&^&/&(&_&~&:&<&[&}&'&[&|&", "# # # # # # # # # # # # # # # # # # # # # # # 1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&] l&m&n&", "~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ /.~ o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&", "# # # # # # # # # # # # # # # # # # # # # # # N&O&P&Q&R&S&T&U&V&W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*", "; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; [ /.o&;*>*,*} '*# )*!*~*{*]*^*/*(*# &## _*# :*<*[*}*# ", "c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+'*~ |*# u@/.# /.& K+# 1*# u%# c+# 2*# & 3*# '*# # / ", "# # # # # # # # # # # # # # # # # # # # # /.# 4*5*6*7*8*9*0*a*b*c*d*e*f*# g*h*i*j*k*l*# m*n*o*p*", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$x%q*# r*s*t*u*v*w*x*y*z*# A*B*C*D*E*F*# G*H*' I*", "# # # # # # # # # # # # # # # # # # # # # ~ # J*K*L*M*N*O*P*Q*R*S*T*Y%U*# V*W*X*Y*Z*`*# =.=+=@=", "# # # # # # # # # # # # # # # # # # # # # ~ # o&#=$=# # # # # # # %=&=# # # # # # # # # # # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # *===-=;=>=,='=)=!=~={=]=^=/=(=_=:=<=[=}=|= /.1*/.", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=# 2=3=4=5=6=7=8=9=' 0=a=b=c=d=e=f=g=h=i=# # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=A=B=H.C=# # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$D=E=F=G=# H=I=J=K=L=M=# N=# O=P=# # Q=# R=~ S=T=", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$U=V=W=X=Y=Z=`= -.-# +-@-#-$-%-&-*-=---;->-# ,-'-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$)-!-~-{-]-^-# /-(-_-:-<-[-}-|-1-2-3-4-5-6-/.,-7-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$# 8-9-0-a-b-~ c-d-e-f-g-h-i-j-k-l-m-n-o-p-# q-r-", "# # # # # # # # # # # # # # # # # # # # # ~ # s-t-u-v-# # # # # # # # # w-x-y-' # z-A-B-C-D-E-F-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$G-H-I-J-K-L-M-N-O-P-# # Q-R-S-# )*# T-U-V-W-X-# ", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=Y-Z-`- ;.;+;@;#;$;%;&;*;=;-;;;>;,;';);; !;~;{;];", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=# /*# ^;# /;(;_;:;<;[;};' 2*< ; |;1;2;/ ' # # 3;"}; �������flmsg-2.0.10/src/widgets/date.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000016036�12330516146�013532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <iostream> #include <cstring> #include <ctime> #include <cstdio> #include "date.h" using namespace std; const int Date::mdays[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; const int Date::jdays[2][13] = { { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }, { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 } }; const char *Date::month_name[] = { "January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; bool date_local_ = false; void Date::today() { time_t t; struct tm *now; time( &t ); if (date_local_) now = localtime( &t ); else now = gmtime(&t); year = now->tm_year + 1900; month = now->tm_mon + 1; day = now->tm_mday; } Date::Date() { today(); fmt = 0; } Date::Date( int m, int d, int y ) { setDate( m, d, y ); fmt = 1; } void Date::setDate( int mm, int dd, int yy ) { if( isvalid( mm, dd, yy ) ) { year = yy; month = mm; day = dd; } else today(); } void Date::setDate( Date &dt ) { year = dt.year; month = dt.month; day = dt.day; } void Date::setFormat( int iFmt ) { fmt = iFmt; } void Date::Year( int y ) { year = y; } int Date::Year() { return year; } void Date::Month( int m ) { month = m; } int Date::Month() { return month; } void Date::Day( int d ) { day = d; } int Date::Day() { return day; } bool Date::leapYear( int y ) { if( y % 400 == 0 || ( y % 100 != 0 && y % 4 == 0 ) ) return true; return false; } bool Date::isvalid( int m, int d, int y ) { if( y > 2035 ) return false; if( m < 1 || m > 12 ) return false; if( d < 1 ) return false; if( leapYear( y ) ){ if( m == 2 && d > 29 ) return false; else return true; } if( d > mdays[m] ) return false; return true; } int Date::daysinmonth (int month, int leap) { /* Validate the month. */ if (month < JANUARY || month > DECEMBER) return -1; /* Return 28, 29, 30, or 31 based on month/leap. */ switch (month) { case FEBRUARY: return leap ? 29 : 28; default: return mdays[month]; } } int Date::dayofyear (int year, int mon, int mday) { /* Return day of year. */ return mday + jdays[isleapyear (year) ? 1 : 0][mon]; } int Date::dayofepoch (int year, int mon, int mday) { int doe; int era, cent, quad, rest; /* break down the year into 400, 100, 4, and 1 year multiples */ rest = year - 1; quad = rest / 4; rest %= 4; cent = quad / 25; quad %= 25; era = cent / 4; cent %= 4; /* set up doe */ doe = dayofyear (year, mon, mday); doe += era * (400 * 365 + 97); doe += cent * (100 * 365 + 24); doe += quad * (4 * 365 + 1); doe += rest * 365; return doe; } int Date::dayofweek (int year, int mon, int mday) { return dayofepoch (year, mon, mday) % 7; } void Date::previous_month () { if (month == 1) { month = 12; year--; } else month--; while ((day >= 1) && (!datevalid ())) day--; } void Date::next_month () { if (month == 12) { month = 1; year++; } else month++; while ((day >= 1) && (!datevalid ())) day--; } void Date::previous_year () { if (month == 2 && day == 29) day = 28; year--; } void Date::next_year () { if (month == 2 && day == 29) day = 28; year++; } char *Date::szDate (int fmt) { static char temp[20]; char szMonth[10]; switch (fmt) { case 1 : snprintf (temp, sizeof(temp), "%02d/%02d/%02d", month, day, year > 1999 ? year - 2000 : year - 1900); break; case 2 : snprintf (temp, sizeof(temp), "%4d-%02d-%02d", year, month, day); break; case 3 : snprintf (temp, sizeof(temp), "%s %2d, %4d", month_name[month - 1], day, year); break; case 4 : strcpy (szMonth, month_name [month - 1]); szMonth[3] = 0; snprintf (temp, sizeof(temp), "%s %2d, %4d", szMonth, day, year); break; case 5 : strcpy (szMonth, month_name [month - 1]); szMonth[3] = 0; for (int i = 0; i < 3; i++) szMonth[i] = toupper(szMonth[i]); snprintf (temp, sizeof(temp), "%s %d", szMonth, day); break; case 0 : default : snprintf (temp, sizeof(temp), "%02d/%02d/%04d", month, day, year); break; } return temp; } char *Date::szDate () { return szDate (fmt); } // operator functions ostream &operator<<( ostream &output, Date &d ) { output << d.szDate (); return output; } bool Date::endOfMonth( int d ) { if( month == 2 && leapYear( year ) ) return (d == 29 ); // last day of Feb in leap year else return (d == mdays[ month ] ); } void Date::helpIncrement() { if( endOfMonth( day ) && month == 12 ) { // end year day = 1; month = 1; ++year; } else if ( endOfMonth( day ) ) { day = 1; ++month; } else ++day; } Date &Date::operator++() { helpIncrement(); return *this; // reference return to create an lvalue } Date Date::operator++( int ) { Date temp = *this; helpIncrement(); return temp; // return non-increment, saved temporary object } const Date &Date::operator+=( int ndays ) { for( int i = 0; i < ndays; i++ ) helpIncrement(); return *this; // enables cascading } bool Date::operator==( const Date &d ) { if( this->year != d.year ) return false; if( this->month != d.month ) return false; if( this->day != d.day ) return false; return true; } bool Date::operator!=( const Date &d ) { return ( !( *this == d ) ); } bool Date::operator<( const Date &d ) { if( this->year < d.year ) return true; if( this->year > d.year ) return false; if( this->month < d.month ) return true; if( this->month > d.month ) return false; if( this->day < d.day ) return true; return false; } bool Date::operator>( const Date &d ) { if( *this < d ) return false; if( *this == d ) return false; return true; } void Date::operator=( const Date &d ) { this->year = d.year; this->month = d.month; this->day = d.day; } double Date::dJulian () { int DaysInYear = 365; if (leapYear ()) DaysInYear++; return ( year + 1.0 * (dayofyear (year, month, day) - 1) / DaysInYear); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/calendar.cxx���������������������������������������������������������������0000664�0001750�0001750�00000030543�12330516146�014365� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <cstring> #include <cstdio> #include <cstdlib> #include <FL/Fl.H> #include <FL/Fl_Pixmap.H> #include "pixmaps.h" #include "calendar.h" void popcal_cb (Fl_Widget *v, long d); static void fl_calendar_button_cb (Fl_Button *a, void *b) { long j=0; Fl_Calendar *c = (Fl_Calendar *)b; Fl_Button *sb; int numdays = c->daysinmonth () + 1; for (int i=1; i < numdays; i++) { sb = c->day_button(i); sb->color (52); if (a == sb) { c->Day (i); j = i; sb->color (sb->selection_color()); if (c->target) { ((Fl_Input2 *)(c->target))->value(c->szDate(c->calfmt)); (c->target)->redraw(); } } } c->redraw(); c->do_callback(c, j); } void Fl_Calendar_Base::setTarget (Fl_Widget *tgt) { target = tgt; } Fl_Calendar_Base::Fl_Calendar_Base (int x, int y, int w, int h, const char *l) : Fl_Group (x, y, w, h, l), Date () { int i; for (i = 0; i<(7*6); i++) { days[i] = new Fl_Button ((w/7)*(i%7) + x, (h/6)*(i/7) + y, (w/7), (h/6)); days[i]->down_box (FL_THIN_DOWN_BOX); days[i]->labelsize (10); days[i]->box (FL_THIN_UP_BOX); days[i]->color (52); days[i]->callback ((Fl_Callback*)&fl_calendar_button_cb, (void *)this); } calfmt = 0; } void Fl_Calendar_Base::csize (int cx, int cy, int cw, int ch) { int i; for (i = 0; i<(7*6); i++) { days[i]->resize ((cw/7)*(i%7) + cx, (ch/6)*(i/7) + cy, (cw/7), (ch/6)); } } void Fl_Calendar_Base::update () { int dow = dayofweek (Year(), Month(), 1); int dim = daysinmonth (Month(), isleapyear (Year())); int i; for (i=0; i<dow; i++) { days[i]->hide (); } for (i=(dim+dow); i<(6*7); i++) { days[i]->hide (); } for (i=dow; i<(dim+dow); i++) { char t[8]; snprintf (t, sizeof(t), "%d", (i-dow+1)); days[i]->label (strdup(t)); days[i]->color (52); if ((i-dow+1) == Day()) days[i]->color (selection_color()); days[i]->show (); } } Fl_Button * Fl_Calendar_Base::day_button (int i) { if ((i > 0) && (i <= daysinmonth ())) return days[i + dayofweek (Year(), Month(), 1) - 1]; return 0; } static void fl_calendar_prv_month_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->previous_month (); c->do_callback(c, (long)0); } static void fl_calendar_nxt_month_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->next_month (); c->do_callback(c, (long)0); } static void fl_calendar_prv_year_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->previous_year (); c->do_callback(c, (long)0); } static void fl_calendar_nxt_year_cb (Fl_Button *, void *b) { Fl_Calendar *c = (Fl_Calendar *)b; c->next_year (); c->do_callback(c, (long)0); } Fl_Calendar::Fl_Calendar (int x, int y, int w, int h, const char *l) : Fl_Calendar_Base (x, y, w, h, l) { int i, bw; for (i = 0; i<7; i++) { // weekdays[i] = new Fl_Button ((w/7)*(i%7) + x, weekdays[i] = new Fl_Box ((w/7)*(i%7) + x, (h/8)*((i/7)+1) + y, (w/7), (h/8)); weekdays[i]->box (FL_THIN_UP_BOX); weekdays[i]->labelsize (10); weekdays[i]->color (52); } weekdays[SUNDAY]->label ("S"); weekdays[MONDAY]->label ("M"); weekdays[TUESDAY]->label ("T"); weekdays[WEDNESDAY]->label ("W"); weekdays[THURSDAY]->label ("T"); weekdays[FRIDAY]->label ("F"); weekdays[SATURDAY]->label ("S"); bw = w/10 < 16 ? 16 : w/10; prv_year = new Fl_Button (x, y, bw, (h/8), "@<<"); prv_year->box (FL_THIN_UP_BOX); prv_year->labeltype (FL_SYMBOL_LABEL); prv_year->labelsize (10); prv_year->down_box (FL_THIN_DOWN_BOX); prv_year->callback ((Fl_Callback*)&fl_calendar_prv_year_cb, (void *)this); prv_month = new Fl_Button (x + bw, y, bw, (h/8), "@<"); prv_month->box (FL_THIN_UP_BOX); prv_month->labeltype (FL_SYMBOL_LABEL); prv_month->labelsize (10); prv_month->down_box (FL_THIN_DOWN_BOX); prv_month->callback ((Fl_Callback*)&fl_calendar_prv_month_cb, (void *)this); nxt_month = new Fl_Button (x + w - 2*bw, y, bw, (h/8), "@>"); nxt_month->box (FL_THIN_UP_BOX); nxt_month->labeltype (FL_SYMBOL_LABEL); nxt_month->labelsize (10); nxt_month->down_box (FL_THIN_DOWN_BOX); nxt_month->callback ((Fl_Callback*)&fl_calendar_nxt_month_cb, (void *)this); nxt_year = new Fl_Button (x + w - bw, y, bw, (h/8), "@>>"); nxt_year->box (FL_THIN_UP_BOX); nxt_year->labeltype (FL_SYMBOL_LABEL); nxt_year->labelsize (10); nxt_year->down_box (FL_THIN_DOWN_BOX); nxt_year->callback ((Fl_Callback*)&fl_calendar_nxt_year_cb, (void *)this); // caption = new Fl_Button (x + (w/10)*2, y, (6*w/10), (h/8)); caption = new Fl_Box (x + 2*bw, y, w - 4*bw, (h/8)); caption->box (FL_THIN_UP_BOX); caption->labeltype (FL_SYMBOL_LABEL); caption->labelfont (1); if (bw < 20) caption->labelsize (9); else caption->labelsize (11); // caption->down_box (FL_THIN_DOWN_BOX); Fl_Calendar_Base::csize (x, y + (2*h/8), w, (6*h/8)); target = 0; update (); use_local = false; } void Fl_Calendar::csize (int cx, int cy, int cw, int ch) { int i; for (i = 0; i<7; i++) { // weekdays[i] = new Fl_Button ((cw/7)*(i%7) + cx, weekdays[i] = new Fl_Box ((cw/7)*(i%7) + cx, (ch/8)*((i/7)+1) + cy, (cw/7), (ch/8)); } prv_month->resize (cx + (cw/10), cy, (cw/10), (ch/8)); nxt_month->resize (cx + (cw/10)*8, cy, (cw/10), (ch/8)); prv_year->resize (cx, cy, (cw/10), (ch/8)); nxt_year->resize (cx + (cw/10)*9, cy, (cw/10), (ch/8)); caption->resize (cx + (cw/10)*2, cy, (cw/10)*6, (ch/8)); Fl_Calendar_Base::csize (cx, cy + (2*ch/8), cw, (6*ch/8)); } void Fl_Calendar::update () { int dow = dayofweek (Year(), Month(), 1); int dim = daysinmonth (Month(), isleapyear (Year())); int i; for (i=dow; i<(dim+dow); i++) { char t[8]; snprintf (t, sizeof(t), "%d", (i-dow+1)); days[i]->label (strdup(t)); } char tmp[32]; snprintf (tmp, sizeof(tmp), "%s %d", month_name[Month()-1], Year()); Fl_Calendar_Base::update (); if (caption->label ()) free ((void *) caption->label ()); caption->label (strdup(tmp)); redraw (); } void Fl_Calendar::today () { Date::today(); update (); } void Fl_Calendar::previous_month () { Date::previous_month(); update (); } void Fl_Calendar::next_month () { Date::next_month(); update (); } void Fl_Calendar::previous_year () { Date::previous_year(); update (); } void Fl_Calendar::next_year () { Date::next_year(); update (); } void Fl_Calendar::setDate(int m, int d, int y) { Date::setDate(m,d,y); } int Fl_Calendar::handle (int event) { int m, d, y, o, md; switch (event) { case FL_FOCUS: case FL_UNFOCUS: return 1; case FL_KEYBOARD: m = Month (); d = Day (); y = Year (); switch(Fl::event_key ()) { case FL_Enter: do_callback(this, d); return 1; break; case FL_Up: o = -7; break; case FL_Down: o = 7; break; case FL_Right: o = 1; break; case FL_Left: o = -1; break; case FL_Page_Up: previous_month (); return 1; case FL_Page_Down: next_month (); return 1; default: return Fl_Group::handle (event); } if (datevalid (y, m, d + o)) setDate (m, d + o, y); else { if (o < 0) { previous_month (); m = Month (); y = Year (); md = daysinmonth (m, isleapyear (y)); d = d + o + md; setDate (m, d, y); } else { md = daysinmonth (m, isleapyear (y)); next_month (); m = Month (); y = Year (); d = d + o - md; setDate (m, d, y); } } return 1; } return Fl_Group::handle (event); } // Popup Calendar class Fl_PopCal::Fl_PopCal (int X, int Y, int W, int H, Fl_Input2 * tgt) : Fl_Window (X, Y, W, H, "") { target = tgt; clear_border(); box(FL_UP_BOX); // popcal = new Fl_Calendar(2, 2); popcal = new Fl_Calendar(2, 2, W-4, H-4); popcal->callback ( (Fl_Callback*)popcal_cb); end(); } Fl_PopCal::~Fl_PopCal () { } void Fl_PopCal::popcalfmt (int i) { popcalfmt_ = i; } int Fl_PopCal::popcalfmt () { return popcalfmt_; } void Fl_PopCal::setDate (int m, int d, int y) { popcal->setDate (m,d,y); popcal->update(); } int Fl_PopCal::handle(int event) { int ex = Fl::event_x_root(), ey = Fl::event_y_root(); if (event == FL_PUSH) { if ( ex < x() || ex > (x() + w()) || ey < y() || ey > (y() + h()) ) { pophide(); return 1; } } if (Fl_Group::handle(event)) return 1; return 0; } void Fl_PopCal::popposition (int x, int y) { position (x, y); } void Fl_PopCal::popshow () { show (); Fl::grab(this); } void Fl_PopCal::pophide () { hide (); Fl::release(); } void Fl_PopCal::popcal_cb_i (Fl_Widget *v, long d) { int ey = Fl::event_y_root(); Fl_PopCal *me = (Fl_PopCal *)(v->parent()); Fl_Input2 *tgt = me->target; if (ey > me->y() + 40) { if (d && tgt) tgt->value (((Fl_Calendar *)v)->szDate (me->popcalfmt_)); me->pophide(); } return; } void popcal_cb (Fl_Widget *v, long d) { ((Fl_PopCal *)(v))->popcal_cb_i (v, d); return; } void Fl_DateInput::fl_popcal() { Fl_Widget *who = this, *parent; int xpos = who->x(), ypos = who->h() + who->y(); int w = who->w(), h; int m = 0, d = 0, y = 0; w = w < 140 ? 140 : w; w = w - (w % 7); h = 8*(w/7); w += 4; h += 4; parent = who; while (parent) { who = parent; parent = parent->parent(); if (parent == 0) { xpos += who->x(); ypos += who->y(); } } if (!Cal) // Cal = new Fl_PopCal(xpos, ypos, 7*20+4, 8*20+4, Input); Cal = new Fl_PopCal(xpos, ypos, w, h, Input); else Cal->popposition(xpos, ypos); date_local_ = use_local; if (popcalfmt_ < 3) { switch (popcalfmt_) { case 0: case 1: sscanf(Input->value(), "%d/%d/%d", &m, &d, &y); break; case 2: default: sscanf(Input->value(),"%4d%2d%2d", &y, &m, &d); break; } if (y < 10) y+=2000; if (y < 100) y+=1900; Cal->setDate (m,d,y); } Cal->popcalfmt (popcalfmt_); Cal->popshow(); return; } void btnDateInput_cb (Fl_Widget *v, void *d) { ((Fl_DateInput *)(v->parent()))->fl_popcal (); return; } Fl_DateInput::Fl_DateInput (int X,int Y,int W,int H, const char *L) : Fl_Group (X, Y, W, H, 0) { Btn = new Fl_Button (X + W - H + 1, Y + 1, H - 2, H - 2); (new Fl_Pixmap (time_icon))->label (Btn); Btn->callback ((Fl_Callback *)btnDateInput_cb, 0); Input = new Fl_Input2 (X, Y, W-H, H, L); popcalfmt_ = 0; Cal = 0; use_local = false; end(); } void Fl_DateInput::align (Fl_Align how) { Input->align(how); } // DateInput value is contained in the Input widget void Fl_DateInput::value( const char *s ) { Input->value (s); } const char *Fl_DateInput::value() { return (Input->value ()); } void Fl_DateInput::textfont(int tf) { Input->textfont (tf); } void Fl_DateInput::textsize(int sz) { Input->textsize (sz); } void Fl_DateInput::labelfont(int fnt) { Input->labelfont(fnt); } void Fl_DateInput::labelsize(int size) { Input->labelsize(size); } void Fl_DateInput::labelcolor(int clr) { Input->labelcolor(clr); } void Fl_DateInput::format (int fmt) { switch (fmt) { case 0: case 1: case 2: case 3: case 4: popcalfmt_ = fmt; break; default : popcalfmt_ = 0; } } void Fl_DateInput::take_focus() { Input->take_focus(); } �������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/flnfc_common.cxx�����������������������������������������������������������0000664�0001750�0001750�00000004430�12330516146�015250� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// flnfc_common.cxx -- common string subs for Fl_Native_File_Chooser // // Copyright 2004 by Greg Ercolano. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string.h> // COPY A STRING WITH 'new' // Value can be NULL // static char *strnew(const char *val) { if ( val == NULL ) return(NULL); char *s = new char[strlen(val)+1]; strcpy(s, val); return(s); } // FREE STRING CREATED WITH strnew(), NULLS OUT STRING // Value can be NULL // static char *strfree(char *val) { if ( val ) delete [] val; return(NULL); } #ifndef __WOE32__ // 'DYNAMICALLY' APPEND ONE STRING TO ANOTHER // Returns newly allocated string, or NULL // if s && val == NULL. // 's' can be NULL; returns a strnew(val). // 'val' can be NULL; s is returned unmodified. // // Usage: // char *s = strnew("foo"); // s = "foo" // s = strapp(s, "bar"); // s = "foobar" // static char *strapp(char *s, const char *val) { if ( ! val ) { return(s); // Nothing to append? return s } if ( ! s ) { return(strnew(val)); // New string? return copy of val } char *news = new char[strlen(s)+strlen(val)+1]; strcpy(news, s); strcat(news, val); delete [] s; // delete old string return(news); // return new copy } #endif // APPEND A CHARACTER TO A STRING // This does NOT allocate space for the new character. // static void chrcat(char *s, char c) { char tmp[2] = { c, '\0' }; strcat(s, tmp); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Text_Display_mod_1_1.cxx������������������������������������������������0000664�0001750�0001750�00000354357�12330516146�017161� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// "$Id: Fl_Text_Display.cxx 5848 2007-05-20 16:18:31Z mike $" // // Copyright 2001-2006 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include <stdio.h> #include <stdlib.h> #include "missing_strings.h" #include <limits.h> #include <ctype.h> #include <FL/Fl.H> #include "Fl_Text_Buffer_mod.H" #include "Fl_Text_Display_mod.H" #include <FL/Fl_Window.H> #undef min #undef max // Text area margins. Left & right margins should be at least 3 so that // there is some room for the overhanging parts of the cursor! const int Fl_Text_Display_mod::DEFAULT_TOP_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_BOTTOM_MARGIN = 1; const int Fl_Text_Display_mod::DEFAULT_LEFT_MARGIN = 3; const int Fl_Text_Display_mod::DEFAULT_RIGHT_MARGIN = 3; #define NO_HINT -1 /* Masks for text drawing methods. These are or'd together to form an integer which describes what drawing calls to use to draw a string */ #define FILL_MASK 0x0100 #define SECONDARY_MASK 0x0200 #define PRIMARY_MASK 0x0400 #define HIGHLIGHT_MASK 0x0800 #define BG_ONLY_MASK 0x1000 #define TEXT_ONLY_MASK 0x2000 #define STYLE_LOOKUP_MASK 0xff /* Maximum displayable line length (how many characters will fit across the widest window). This amount of memory is temporarily allocated from the stack in the draw_vline() method for drawing strings */ #define MAX_DISP_LINE_LEN 1000 static int max( int i1, int i2 ); static int min( int i1, int i2 ); static int countlines( const char *string ); /* The variables below are used in a timer event to allow smooth scrolling of the text area when the pointer has left the area. */ static int scroll_direction = 0; static int scroll_amount = 0; static int scroll_y = 0; static int scroll_x = 0; // CET - FIXME #define TMPFONTWIDTH 6 Fl_Text_Display_mod::Fl_Text_Display_mod(int X, int Y, int W, int H, const char* l) : Fl_Group(X, Y, W, H, l) { int i; TOP_MARGIN = DEFAULT_TOP_MARGIN; BOTTOM_MARGIN = DEFAULT_BOTTOM_MARGIN; LEFT_MARGIN = DEFAULT_LEFT_MARGIN; RIGHT_MARGIN = DEFAULT_RIGHT_MARGIN; mMaxsize = 0; damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; dragPos = dragType = dragging = 0; display_insert_position_hint = 0; color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR); // box(FL_DOWN_FRAME); box(FL_DOWN_BOX); // DO NOT USE FRAME OR TILED GROUP WILL NOT CORRECTLY DRAW THE BORDERS !! textsize((uchar)FL_NORMAL_SIZE); textcolor(FL_FOREGROUND_COLOR); textfont(FL_HELVETICA); text_area.x = 0; text_area.y = 0; text_area.w = 0; text_area.h = 0; mVScrollBar = new Fl_Scrollbar(0,0,1,1); mVScrollBar->callback((Fl_Callback*)v_scrollbar_cb, this); mHScrollBar = new Fl_Scrollbar(0,0,1,1); mHScrollBar->callback((Fl_Callback*)h_scrollbar_cb, this); mHScrollBar->type(FL_HORIZONTAL); end(); scrollbar_width(16); scrollbar_align(FL_ALIGN_BOTTOM_RIGHT); mCursorOn = 0; mCursorPos = 0; mCursorOldY = -100; mCursorToHint = NO_HINT; mCursorStyle = NORMAL_CURSOR; mCursorPreferredCol = -1; mBuffer = 0; mFirstChar = 0; mLastChar = 0; mNBufferLines = 0; mTopLineNum = mTopLineNumHint = 1; mAbsTopLineNum = 1; mNeedAbsTopLineNum = 0; mHorizOffset = mHorizOffsetHint = 0; mCursor_color = FL_FOREGROUND_COLOR; mFixedFontWidth = -1; mStyleBuffer = 0; mStyleTable = 0; mNStyles = 0; mNVisibleLines = 1; mLineStarts = new int[mNVisibleLines]; mLineStarts[0] = 0; for (i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1; mSuppressResync = 0; mNLinesDeleted = 0; mModifyingTabDistance = 0; mUnfinishedStyle = 0; mUnfinishedHighlightCB = 0; mHighlightCBArg = 0; mLineNumLeft = mLineNumWidth = 0; mContinuousWrap = 0; mWrapMargin = 0; mSuppressResync = mNLinesDeleted = mModifyingTabDistance = 0; } /* ** Free a text display and release its associated memory. Note, the text ** BUFFER that the text display displays is a separate entity and is not ** freed, nor are the style buffer or style table. */ Fl_Text_Display_mod::~Fl_Text_Display_mod() { if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } // sb // if (mBuffer) { // mBuffer->remove_modify_callback(buffer_modified_cb, this); // mBuffer->remove_predelete_callback(buffer_predelete_cb, this); // } if (mLineStarts) delete[] mLineStarts; } /* ** Attach a text buffer to display, replacing the current buffer (if any) */ void Fl_Text_Display_mod::buffer( Fl_Text_Buffer_mod*buf ) { /* If the text display is already displaying a buffer, clear it off of the display and remove our callback from it */ if ( buf == mBuffer) return; if ( mBuffer != 0 ) { buffer_modified_cb( 0, 0, mBuffer->length(), 0, 0, this ); mNBufferLines = 0; mBuffer->remove_modify_callback( buffer_modified_cb, this ); mBuffer->remove_predelete_callback( buffer_predelete_cb, this ); } /* Add the buffer to the display, and attach a callback to the buffer for receiving modification information when the buffer contents change */ mBuffer = buf; if (mBuffer) { mBuffer->add_modify_callback( buffer_modified_cb, this ); mBuffer->add_predelete_callback( buffer_predelete_cb, this ); /* Update the display */ buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); } /* Resize the widget to update the screen... */ resize(x(), y(), w(), h()); } /* ** Attach (or remove) highlight information in text display and redisplay. ** Highlighting information consists of a style buffer which parallels the ** normal text buffer, but codes font and color information for the display; ** a style table which translates style buffer codes (indexed by buffer ** character - 'A') into fonts and colors; and a callback mechanism for ** as-needed highlighting, triggered by a style buffer entry of ** "unfinishedStyle". Style buffer can trigger additional redisplay during ** a normal buffer modification if the buffer contains a primary Fl_Text_Selection ** (see extendRangeForStyleMods for more information on this protocol). ** ** Style buffers, tables and their associated memory are managed by the caller. */ void Fl_Text_Display_mod::highlight_data(Fl_Text_Buffer_mod*styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg ) { mStyleBuffer = styleBuffer; mStyleTable = styleTable; mNStyles = nStyles; mUnfinishedStyle = unfinishedStyle; mUnfinishedHighlightCB = unfinishedHighlightCB; mHighlightCBArg = cbArg; mStyleBuffer->canUndo(0); #if 0 // FIXME: this is in nedit code -- is it needed? /* Call TextDSetFont to combine font information from style table and primary font, adjust font-related parameters, and then redisplay */ TextDSetFont(textD, textD->fontStruct); #endif damage(FL_DAMAGE_EXPOSE); } #if 0 // FIXME: this is in nedit code -- is it needed? /* ** Change the (non highlight) font */ void TextDSetFont(textDisp *textD, XFontStruct *fontStruct) { Display *display = XtDisplay(textD->w); int i, maxAscent = fontStruct->ascent, maxDescent = fontStruct->descent; int width, height, fontWidth; Pixel bgPixel, fgPixel, selectFGPixel, selectBGPixel; Pixel highlightFGPixel, highlightBGPixel; XGCValues values; XFontStruct *styleFont; /* If font size changes, cursor will be redrawn in a new position */ blankCursorProtrusions(textD); /* If there is a (syntax highlighting) style table in use, find the new maximum font height for this text display */ for (i=0; i<textD->nStyles; i++) { styleFont = textD->styleTable[i].font; if (styleFont != NULL && styleFont->ascent > maxAscent) maxAscent = styleFont->ascent; if (styleFont != NULL && styleFont->descent > maxDescent) maxDescent = styleFont->descent; } textD->ascent = maxAscent; textD->descent = maxDescent; /* If all of the current fonts are fixed and match in width, compute */ fontWidth = fontStruct->max_bounds.width; if (fontWidth != fontStruct->min_bounds.width) fontWidth = -1; else { for (i=0; i<textD->nStyles; i++) { styleFont = textD->styleTable[i].font; if (styleFont != NULL && (styleFont->max_bounds.width != fontWidth || styleFont->max_bounds.width != styleFont->min_bounds.width)) fontWidth = -1; } } textD->fixedFontWidth = fontWidth; /* Don't let the height dip below one line, or bad things can happen */ if (textD->height < maxAscent + maxDescent) textD->height = maxAscent + maxDescent; /* Change the font. In most cases, this means re-allocating the affected GCs (they are shared with other widgets, and if the primary font changes, must be re-allocated to change it). Unfortunately, this requres recovering all of the colors from the existing GCs */ textD->fontStruct = fontStruct; XGetGCValues(display, textD->gc, GCForeground|GCBackground, &values); fgPixel = values.foreground; bgPixel = values.background; XGetGCValues(display, textD->selectGC, GCForeground|GCBackground, &values); selectFGPixel = values.foreground; selectBGPixel = values.background; XGetGCValues(display, textD->highlightGC,GCForeground|GCBackground,&values); highlightFGPixel = values.foreground; highlightBGPixel = values.background; releaseGC(textD->w, textD->gc); releaseGC(textD->w, textD->selectGC); releaseGC(textD->w, textD->highlightGC); releaseGC(textD->w, textD->selectBGGC); releaseGC(textD->w, textD->highlightBGGC); if (textD->lineNumGC != NULL) releaseGC(textD->w, textD->lineNumGC); textD->lineNumGC = NULL; allocateFixedFontGCs(textD, fontStruct, bgPixel, fgPixel, selectFGPixel, selectBGPixel, highlightFGPixel, highlightBGPixel); XSetFont(display, textD->styleGC, fontStruct->fid); /* Do a full resize to force recalculation of font related parameters */ width = textD->width; height = textD->height; textD->width = textD->height = 0; TextDResize(textD, width, height); /* Redisplay */ TextDRedisplayRect(textD, textD->left, textD->top, textD->width, textD->height); /* Clean up line number area in case spacing has changed */ draw_line_numbers(textD, True); } int TextDMinFontWidth(textDisp *textD, Boolean considerStyles) { int fontWidth = textD->fontStruct->max_bounds.width; int i; if (considerStyles) { for (i = 0; i < textD->nStyles; ++i) { int thisWidth = (textD->styleTable[i].font)->min_bounds.width; if (thisWidth < fontWidth) { fontWidth = thisWidth; } } } return(fontWidth); } int TextDMaxFontWidth(textDisp *textD, Boolean considerStyles) { int fontWidth = textD->fontStruct->max_bounds.width; int i; if (considerStyles) { for (i = 0; i < textD->nStyles; ++i) { int thisWidth = (textD->styleTable[i].font)->max_bounds.width; if (thisWidth > fontWidth) { fontWidth = thisWidth; } } } return(fontWidth); } #endif int Fl_Text_Display_mod::longest_vline() { int longest = 0; for (int i = 0; i < mNVisibleLines; i++) longest = max(longest, measure_vline(i)); return longest; } /* ** Change the size of the displayed text area */ void Fl_Text_Display_mod::resize(int X, int Y, int W, int H) { #ifdef DEBUG printf("Fl_Text_Display_mod::resize(X=%d, Y=%d, W=%d, H=%d)\n", X, Y, W, H); #endif // DEBUG const int oldWidth = w(); #ifdef DEBUG printf(" oldWidth=%d, mContinuousWrap=%d, mWrapMargin=%d\n", oldWidth, mContinuousWrap, mWrapMargin); #endif // DEBUG Fl_Widget::resize(X,Y,W,H); if (!buffer()) return; X += Fl::box_dx(box()); Y += Fl::box_dy(box()); W -= Fl::box_dw(box()); H -= Fl::box_dh(box()); text_area.x = X+LEFT_MARGIN; text_area.y = Y+TOP_MARGIN; text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN; text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN; int i = 0; /* Find the new maximum font height for this text display */ for (i = 0, mMaxsize = fl_height(textfont(), textsize()); i < mNStyles; i++) mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size)); // did we have scrollbars initially? int hscrollbarvisible = mHScrollBar->visible(); int vscrollbarvisible = mVScrollBar->visible(); // try without scrollbars first mVScrollBar->clear_visible(); mHScrollBar->clear_visible(); for (int again = 1; again;) { again = 0; /* In continuous wrap mode, a change in width affects the total number of lines in the buffer, and can leave the top line number incorrect, and the top character no longer pointing at a valid line start */ if (mContinuousWrap && !mWrapMargin && W!=oldWidth) { int oldFirstChar = mFirstChar; mNBufferLines = count_lines(0, buffer()->length(), true); mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true)+1; absolute_top_line_number(oldFirstChar); #ifdef DEBUG printf(" mNBufferLines=%d\n", mNBufferLines); #endif // DEBUG } /* reallocate and update the line starts array, which may have changed size and / or contents. */ int nvlines = (text_area.h + mMaxsize - 1) / mMaxsize; if (nvlines < 1) nvlines = 1; if (mNVisibleLines != nvlines) { mNVisibleLines = nvlines; if (mLineStarts) delete[] mLineStarts; mLineStarts = new int [mNVisibleLines]; } calc_line_starts(0, mNVisibleLines); calc_last_char(); // figure the scrollbars if (scrollbar_width()) { /* Decide if the vertical scroll bar needs to be visible */ if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && mNBufferLines >= mNVisibleLines - 1) { if (!mVScrollBar->visible()) again = 1; mVScrollBar->set_visible(); if (scrollbar_align() & FL_ALIGN_LEFT) { text_area.x = X+scrollbar_width()+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN; mVScrollBar->resize(X, text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } else { text_area.x = X+LEFT_MARGIN; text_area.w = W-scrollbar_width()-LEFT_MARGIN-RIGHT_MARGIN; mVScrollBar->resize(X+W-scrollbar_width(), text_area.y-TOP_MARGIN, scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } } /* Decide if the horizontal scroll bar needs to be visible. If there is a vertical scrollbar, a horizontal is always created too. This is because the alternatives are unatractive: * Dynamically creating a horizontal scrollbar based on the currently visible lines is what the original nedit does, but it always wastes space for the scrollbar even when it's not used. Since the FLTK widget dynamically allocates the space for the scrollbar and rearranges the widget to make room for it, this would create a very visually displeasing "bounce" effect when the vertical scrollbar is dragged. Trust me, I tried it and it looks really bad. * The other alternative would be to keep track of what the longest line in the entire buffer is and base the scrollbar on that. I didn't do this because I didn't see any easy way to do that using the nedit code and this could involve a lengthy calculation for large buffers. If an efficient and non-costly way of doing this can be found, this might be a way to go. */ /* WAS: Suggestion: Try turning the horizontal scrollbar on when you first see a line that is too wide in the window, but then don't turn it off (ie mix both of your solutions). */ if (!mContinuousWrap && scrollbar_align() & (FL_ALIGN_TOP|FL_ALIGN_BOTTOM) && (mVScrollBar->visible() || longest_vline() > text_area.w)) { if (!mHScrollBar->visible()) { mHScrollBar->set_visible(); again = 1; // loop again to see if we now need vert. & recalc sizes } if (scrollbar_align() & FL_ALIGN_TOP) { text_area.y = Y + scrollbar_width()+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } else { text_area.y = Y+TOP_MARGIN; text_area.h = H - scrollbar_width()-TOP_MARGIN-BOTTOM_MARGIN; mHScrollBar->resize(text_area.x-LEFT_MARGIN, Y+H-scrollbar_width(), text_area.w+LEFT_MARGIN+RIGHT_MARGIN, scrollbar_width()); } } } } // user request to change viewport if (mTopLineNumHint != mTopLineNum || mHorizOffsetHint != mHorizOffset) scroll_(mTopLineNumHint, mHorizOffsetHint); // everything will fit in the viewport if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0) scroll_(1, mHorizOffset); /* if empty lines become visible, there may be an opportunity to display more text by scrolling down */ else while (mLineStarts[mNVisibleLines-2] == -1) scroll_(mTopLineNum-1, mHorizOffset); // user request to display insert position if (display_insert_position_hint) display_insert(); // in case horizontal offset is now greater than longest line int maxhoffset = max(0, longest_vline()-text_area.w); if (mHorizOffset > maxhoffset) scroll_(mTopLineNumHint, maxhoffset); mTopLineNumHint = mTopLineNum; mHorizOffsetHint = mHorizOffset; display_insert_position_hint = 0; if (mContinuousWrap || hscrollbarvisible != mHScrollBar->visible() || vscrollbarvisible != mVScrollBar->visible()) redraw(); update_v_scrollbar(); update_h_scrollbar(); } /* ** Refresh a rectangle of the text display. left and top are in coordinates of ** the text drawing window */ void Fl_Text_Display_mod::draw_text( int left, int top, int width, int height ) { int fontHeight, firstLine, lastLine, line; /* find the line number range of the display */ fontHeight = mMaxsize ? mMaxsize : textsize_; firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight; lastLine = ( top + height - text_area.y ) / fontHeight + 1; fl_push_clip( left, top, width, height ); /* draw the lines */ for ( line = firstLine; line <= lastLine; line++ ) draw_vline( line, left, left + width, 0, INT_MAX ); /* draw the line numbers if exposed area includes them */ if (mLineNumWidth != 0 && left <= mLineNumLeft + mLineNumWidth) draw_line_numbers(false); fl_pop_clip(); } void Fl_Text_Display_mod::redisplay_range(int startpos, int endpos) { if (damage_range1_start == -1 && damage_range1_end == -1) { damage_range1_start = startpos; damage_range1_end = endpos; } else if ((startpos >= damage_range1_start && startpos <= damage_range1_end) || (endpos >= damage_range1_start && endpos <= damage_range1_end)) { damage_range1_start = min(damage_range1_start, startpos); damage_range1_end = max(damage_range1_end, endpos); } else if (damage_range2_start == -1 && damage_range2_end == -1) { damage_range2_start = startpos; damage_range2_end = endpos; } else { damage_range2_start = min(damage_range2_start, startpos); damage_range2_end = max(damage_range2_end, endpos); } damage(FL_DAMAGE_SCROLL); } /* ** Refresh all of the text between buffer positions "start" and "end" ** not including the character at the position "end". ** If end points beyond the end of the buffer, refresh the whole display ** after pos, including blank lines which are not technically part of ** any range of characters. */ void Fl_Text_Display_mod::draw_range(int startpos, int endpos) { int i, startLine, lastLine, startIndex, endIndex; /* If the range is outside of the displayed text, just return */ if ( endpos < mFirstChar || ( startpos > mLastChar && !empty_vlines() ) ) return; /* Clean up the starting and ending values */ if ( startpos < 0 ) startpos = 0; if ( startpos > mBuffer->length() ) startpos = mBuffer->length(); if ( endpos < 0 ) endpos = 0; if ( endpos > mBuffer->length() ) endpos = mBuffer->length(); /* Get the starting and ending lines */ if ( startpos < mFirstChar ) startpos = mFirstChar; if ( !position_to_line( startpos, &startLine ) ) startLine = mNVisibleLines - 1; if ( endpos >= mLastChar ) { lastLine = mNVisibleLines - 1; } else { if ( !position_to_line( endpos, &lastLine ) ) { /* shouldn't happen */ lastLine = mNVisibleLines - 1; } } /* Get the starting and ending positions within the lines */ startIndex = mLineStarts[ startLine ] == -1 ? 0 : startpos - mLineStarts[ startLine ]; if ( endpos >= mLastChar ) endIndex = INT_MAX; else if ( mLineStarts[ lastLine ] == -1 ) endIndex = 0; else endIndex = endpos - mLineStarts[ lastLine ]; /* If the starting and ending lines are the same, redisplay the single line between "start" and "end" */ if ( startLine == lastLine ) { draw_vline( startLine, 0, INT_MAX, startIndex, endIndex ); return; } /* Redisplay the first line from "start" */ draw_vline( startLine, 0, INT_MAX, startIndex, INT_MAX ); /* Redisplay the lines in between at their full width */ for ( i = startLine + 1; i < lastLine; i++ ) draw_vline( i, 0, INT_MAX, 0, INT_MAX ); /* Redisplay the last line to "end" */ draw_vline( lastLine, 0, INT_MAX, 0, endIndex ); } /* ** Set the position of the text insertion cursor for text display */ void Fl_Text_Display_mod::insert_position( int newPos ) { /* make sure new position is ok, do nothing if it hasn't changed */ if ( newPos == mCursorPos ) return; if ( newPos < 0 ) newPos = 0; if ( newPos > mBuffer->length() ) newPos = mBuffer->length(); /* cursor movement cancels vertical cursor motion column */ mCursorPreferredCol = -1; /* erase the cursor at it's previous position */ redisplay_range(mCursorPos - 1, mCursorPos + 1); mCursorPos = newPos; /* draw cursor at its new position */ redisplay_range(mCursorPos - 1, mCursorPos + 1); } void Fl_Text_Display_mod::show_cursor(int b) { mCursorOn = b; redisplay_range(mCursorPos - 1, mCursorPos + 1); } void Fl_Text_Display_mod::cursor_style(int style) { mCursorStyle = style; if (mCursorOn) show_cursor(); } void Fl_Text_Display_mod::wrap_mode(int wrap, int wrapMargin) { mWrapMargin = wrapMargin; mContinuousWrap = wrap; if (buffer()) { /* wrapping can change the total number of lines, re-count */ mNBufferLines = count_lines(0, buffer()->length(), true); /* changing wrap margins or changing from wrapped mode to non-wrapped can leave the character at the top no longer at a line start, and/or change the line number */ mFirstChar = line_start(mFirstChar); mTopLineNum = count_lines(0, mFirstChar, true) + 1; reset_absolute_top_line_number(); /* update the line starts array */ calc_line_starts(0, mNVisibleLines); calc_last_char(); } else { // No buffer, so just clear the state info for later... mNBufferLines = 0; mFirstChar = 0; mTopLineNum = 1; mAbsTopLineNum = 0; } resize(x(), y(), w(), h()); } /* ** Insert "text" at the current cursor location. This has the same ** effect as inserting the text into the buffer using BufInsert and ** then moving the insert position after the newly inserted text, except ** that it's optimized to do less redrawing. */ void Fl_Text_Display_mod::insert(const char* text) { int pos = mCursorPos; mCursorToHint = pos + strlen( text ); mBuffer->insert( pos, text ); mCursorToHint = NO_HINT; } /* ** Insert "text" (which must not contain newlines), overstriking the current ** cursor location. */ void Fl_Text_Display_mod::overstrike(const char* text) { int startPos = mCursorPos; Fl_Text_Buffer_mod*buf = mBuffer; int lineStart = buf->line_start( startPos ); int textLen = strlen( text ); int i, p, endPos, indent, startIndent, endIndent; const char *c; char ch, *paddedText = NULL; /* determine how many displayed character positions are covered */ startIndent = mBuffer->count_displayed_characters( lineStart, startPos ); indent = startIndent; for ( c = text; *c != '\0'; c++ ) indent += Fl_Text_Buffer_mod::character_width( *c, indent, buf->tab_distance(), buf->null_substitution_character() ); endIndent = indent; /* find which characters to remove, and if necessary generate additional padding to make up for removed control characters at the end */ indent = startIndent; for ( p = startPos; ; p++ ) { if ( p == buf->length() ) break; ch = buf->character( p ); if ( ch == '\n' ) break; indent += Fl_Text_Buffer_mod::character_width( ch, indent, buf->tab_distance(), buf->null_substitution_character() ); if ( indent == endIndent ) { p++; break; } else if ( indent > endIndent ) { if ( ch != '\t' ) { p++; paddedText = new char [ textLen + FL_TEXT_MAX_EXP_CHAR_LEN + 1 ]; strcpy( paddedText, text ); for ( i = 0; i < indent - endIndent; i++ ) paddedText[ textLen + i ] = ' '; paddedText[ textLen + i ] = '\0'; } break; } } endPos = p; mCursorToHint = startPos + textLen; buf->replace( startPos, endPos, paddedText == NULL ? text : paddedText ); mCursorToHint = NO_HINT; if ( paddedText != NULL ) delete [] paddedText; } /* ** Translate a buffer text position to the XY location where the top left ** of the cursor would be positioned to point to that character. Returns ** 0 if the position is not displayed because it is VERTICALLY out ** of view. If the position is horizontally out of view, returns the ** X coordinate where the position would be if it were visible. */ int Fl_Text_Display_mod::position_to_xy( int pos, int* X, int* Y ) { int charIndex, lineStartPos, fontHeight, lineLen; int visLineNum, charLen, outIndex, xStep, charStyle; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; const char *lineStr; // printf("position_to_xy(pos=%d, X=%p, Y=%p)\n", pos, X, Y); /* If position is not displayed, return false */ if (pos < mFirstChar || (pos > mLastChar && !empty_vlines())) { // printf(" returning 0\n" // " mFirstChar=%d, mLastChar=%d, empty_vlines()=0\n", // mFirstChar, mLastChar); return 0; } /* Calculate Y coordinate */ if (!position_to_line(pos, &visLineNum)) { // puts(" returning 0\n" // " position_to_line()=0"); return 0; } if (visLineNum < 0 || visLineNum > mNBufferLines) { // printf(" returning 0\n" // " visLineNum=%d, mNBufferLines=%d\n", // visLineNum, mNBufferLines); return 0; } fontHeight = mMaxsize; *Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line. If the position is beyond the end of the buffer and should be at the first position on the first empty line, don't try to get or scan the text */ lineStartPos = mLineStarts[visLineNum]; if ( lineStartPos == -1 ) { *X = text_area.x - mHorizOffset; return 1; } lineLen = vline_length( visLineNum ); lineStr = mBuffer->text_range( lineStartPos, lineStartPos + lineLen ); /* Step through character positions from the beginning of the line to "pos" to calculate the X coordinate */ xStep = text_area.x - mHorizOffset; outIndex = 0; for ( charIndex = 0; charIndex < lineLen && charIndex < pos - lineStartPos; charIndex++ ) { charLen = Fl_Text_Buffer_mod::expand_character( lineStr[ charIndex ], outIndex, expandedChar, mBuffer->tab_distance(), mBuffer->null_substitution_character() ); charStyle = position_style( lineStartPos, lineLen, charIndex, outIndex ); xStep += string_width( expandedChar, charLen, charStyle ); outIndex += charLen; } *X = xStep; free((char *)lineStr); return 1; } /* ** Find the line number of position "pos". Note: this only works for ** displayed lines. If the line is not displayed, the function returns ** 0 (without the mLineStarts array it could turn in to very long ** calculation involving scanning large amounts of text in the buffer). ** If continuous wrap mode is on, returns the absolute line number (as opposed ** to the wrapped line number which is used for scrolling). */ int Fl_Text_Display_mod::position_to_linecol( int pos, int* lineNum, int* column ) { int retVal; /* In continuous wrap mode, the absolute (non-wrapped) line count is maintained separately, as needed. Only return it if we're actually keeping track of it and pos is in the displayed text */ if (mContinuousWrap) { if (!maintaining_absolute_top_line_number() || pos < mFirstChar || pos > mLastChar) return 0; *lineNum = mAbsTopLineNum + buffer()->count_lines(mFirstChar, pos); *column = buffer()->count_displayed_characters(buffer()->line_start(pos), pos); return 1; } retVal = position_to_line( pos, lineNum ); if ( retVal ) { *column = mBuffer->count_displayed_characters( mLineStarts[ *lineNum ], pos ); *lineNum += mTopLineNum; } return retVal; } /* ** Return 1 if position (X, Y) is inside of the primary Fl_Text_Selection */ int Fl_Text_Display_mod::in_selection( int X, int Y ) { int row, column, pos = xy_to_position( X, Y, CHARACTER_POS ); Fl_Text_Buffer_mod*buf = mBuffer; xy_to_rowcol( X, Y, &row, &column, CHARACTER_POS ); if (range_touches_selection(buf->primary_selection(), mFirstChar, mLastChar)) column = wrapped_column(row, column); return buf->primary_selection()->includes(pos, buf->line_start( pos ), column); } /* ** Correct a column number based on an unconstrained position (as returned by ** TextDXYToUnconstrainedPosition) to be relative to the last actual newline ** in the buffer before the row and column position given, rather than the ** last line start created by line wrapping. This is an adapter ** for rectangular selections and code written before continuous wrap mode, ** which thinks that the unconstrained column is the number of characters ** from the last newline. Obviously this is time consuming, because it ** invloves character re-counting. */ int Fl_Text_Display_mod::wrapped_column(int row, int column) { int lineStart, dispLineStart; if (!mContinuousWrap || row < 0 || row > mNVisibleLines) return column; dispLineStart = mLineStarts[row]; if (dispLineStart == -1) return column; lineStart = buffer()->line_start(dispLineStart); return column + buffer()->count_displayed_characters(lineStart, dispLineStart); } /* ** Correct a row number from an unconstrained position (as returned by ** TextDXYToUnconstrainedPosition) to a straight number of newlines from the ** top line of the display. Because rectangular selections are based on ** newlines, rather than display wrapping, and anywhere a rectangular selection ** needs a row, it needs it in terms of un-wrapped lines. */ int Fl_Text_Display_mod::wrapped_row(int row) { if (!mContinuousWrap || row < 0 || row > mNVisibleLines) return row; return buffer()->count_lines(mFirstChar, mLineStarts[row]); } /* ** Scroll the display to bring insertion cursor into view. ** ** Note: it would be nice to be able to do this without counting lines twice ** (scroll_() counts them too) and/or to count from the most efficient ** starting point, but the efficiency of this routine is not as important to ** the overall performance of the text display. */ void Fl_Text_Display_mod::display_insert() { int hOffset, topLine, X, Y; hOffset = mHorizOffset; topLine = mTopLineNum; // FIXME: I don't understand this well enough to know if it is correct // it is different than nedit 5.3 if (insert_position() < mFirstChar) { topLine -= count_lines(insert_position(), mFirstChar, false); } else if (mLineStarts[mNVisibleLines-2] != -1) { int lastChar = line_end(mLineStarts[mNVisibleLines-2],true); if (insert_position() >= lastChar) topLine += count_lines(lastChar - (wrap_uses_character(mLastChar) ? 0 : 1), insert_position(), false); } /* Find the new setting for horizontal offset (this is a bit ungraceful). If the line is visible, just use PositionToXY to get the position to scroll to, otherwise, do the vertical scrolling first, then the horizontal */ if (!position_to_xy( mCursorPos, &X, &Y )) { scroll_(topLine, hOffset); if (!position_to_xy( mCursorPos, &X, &Y )) { #ifdef DEBUG printf ("*** display_insert/position_to_xy # GIVE UP !\n"); fflush(stdout); #endif // DEBUG return; /* Give up, it's not worth it (but why does it fail?) */ } } if (X > text_area.x + text_area.w) hOffset += X-(text_area.x + text_area.w); else if (X < text_area.x) hOffset += X-text_area.x; /* Do the scroll */ if (topLine != mTopLineNum || hOffset != mHorizOffset) scroll_(topLine, hOffset); } void Fl_Text_Display_mod::show_insert_position() { display_insert_position_hint = 1; resize(x(), y(), w(), h()); } /* ** Cursor movement functions */ int Fl_Text_Display_mod::move_right() { if ( mCursorPos >= mBuffer->length() ) return 0; insert_position( mCursorPos + 1 ); return 1; } int Fl_Text_Display_mod::move_left() { if ( mCursorPos <= 0 ) return 0; insert_position( mCursorPos - 1 ); return 1; } int Fl_Text_Display_mod::move_up() { int lineStartPos, column, prevLineStartPos, newPos, visLineNum; /* Find the position of the start of the line. Use the line starts array if possible */ if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } if ( lineStartPos == 0 ) return 0; /* Decide what column to move to, if there's a preferred column use that */ column = mCursorPreferredCol >= 0 ? mCursorPreferredCol : mBuffer->count_displayed_characters( lineStartPos, mCursorPos ); /* count forward from the start of the previous line to reach the column */ if ( visLineNum != -1 && visLineNum != 0 ) prevLineStartPos = mLineStarts[ visLineNum - 1 ]; else prevLineStartPos = rewind_lines( lineStartPos, 1 ); newPos = mBuffer->skip_displayed_characters( prevLineStartPos, column ); if (mContinuousWrap) newPos = min(newPos, line_end(prevLineStartPos, true)); /* move the cursor */ insert_position( newPos ); /* if a preferred column wasn't aleady established, establish it */ mCursorPreferredCol = column; return 1; } int Fl_Text_Display_mod::move_down() { int lineStartPos, column, nextLineStartPos, newPos, visLineNum; if ( mCursorPos == mBuffer->length() ) return 0; if ( position_to_line( mCursorPos, &visLineNum ) ) lineStartPos = mLineStarts[ visLineNum ]; else { lineStartPos = line_start( mCursorPos ); visLineNum = -1; } column = mCursorPreferredCol >= 0 ? mCursorPreferredCol : mBuffer->count_displayed_characters( lineStartPos, mCursorPos ); nextLineStartPos = skip_lines( lineStartPos, 1, true ); newPos = mBuffer->skip_displayed_characters( nextLineStartPos, column ); if (mContinuousWrap) newPos = min(newPos, line_end(nextLineStartPos, true)); insert_position( newPos ); mCursorPreferredCol = column; return 1; } /* ** Same as BufCountLines, but takes in to account wrapping if wrapping is ** turned on. If the caller knows that startPos is at a line start, it ** can pass "startPosIsLineStart" as True to make the call more efficient ** by avoiding the additional step of scanning back to the last newline. */ int Fl_Text_Display_mod::count_lines(int startPos, int endPos, bool startPosIsLineStart) { int retLines, retPos, retLineStart, retLineEnd; #ifdef DEBUG printf("Fl_Text_Display_mod::count_lines(startPos=%d, endPos=%d, startPosIsLineStart=%d\n", startPos, endPos, startPosIsLineStart); #endif // DEBUG /* If we're not wrapping use simple (and more efficient) BufCountLines */ if (!mContinuousWrap) return buffer()->count_lines(startPos, endPos); wrapped_line_counter(buffer(), startPos, endPos, INT_MAX, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); #ifdef DEBUG printf(" # after WLC: retPos=%d, retLines=%d, retLineStart=%d, retLineEnd=%d\n", retPos, retLines, retLineStart, retLineEnd); #endif // DEBUG return retLines; } /* ** Same as BufCountForwardNLines, but takes in to account line breaks when ** wrapping is turned on. If the caller knows that startPos is at a line start, ** it can pass "startPosIsLineStart" as True to make the call more efficient ** by avoiding the additional step of scanning back to the last newline. */ int Fl_Text_Display_mod::skip_lines(int startPos, int nLines, bool startPosIsLineStart) { int retLines, retPos, retLineStart, retLineEnd; /* if we're not wrapping use more efficient BufCountForwardNLines */ if (!mContinuousWrap) return buffer()->skip_lines(startPos, nLines); /* wrappedLineCounter can't handle the 0 lines case */ if (nLines == 0) return startPos; /* use the common line counting routine to count forward */ wrapped_line_counter(buffer(), startPos, buffer()->length(), nLines, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); return retPos; } /* ** Same as BufEndOfLine, but takes in to account line breaks when wrapping ** is turned on. If the caller knows that startPos is at a line start, it ** can pass "startPosIsLineStart" as True to make the call more efficient ** by avoiding the additional step of scanning back to the last newline. ** ** Note that the definition of the end of a line is less clear when continuous ** wrap is on. With continuous wrap off, it's just a pointer to the newline ** that ends the line. When it's on, it's the character beyond the last ** DISPLAYABLE character on the line, where a whitespace character which has ** been "converted" to a newline for wrapping is not considered displayable. ** Also note that, a line can be wrapped at a non-whitespace character if the ** line had no whitespace. In this case, this routine returns a pointer to ** the start of the next line. This is also consistent with the model used by ** visLineLength. */ int Fl_Text_Display_mod::line_end(int pos, bool startPosIsLineStart) { int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping use more efficien BufEndOfLine */ if (!mContinuousWrap) return buffer()->line_end(pos); if (pos == buffer()->length()) return pos; wrapped_line_counter(buffer(), pos, buffer()->length(), 1, startPosIsLineStart, 0, &retPos, &retLines, &retLineStart, &retLineEnd); return retLineEnd; } /* ** Same as BufStartOfLine, but returns the character after last wrap point ** rather than the last newline. */ int Fl_Text_Display_mod::line_start(int pos) { int retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufStartOfLine */ if (!mContinuousWrap) return buffer()->line_start(pos); wrapped_line_counter(buffer(), buffer()->line_start(pos), pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); return retLineStart; } /* ** Same as BufCountBackwardNLines, but takes in to account line breaks when ** wrapping is turned on. */ int Fl_Text_Display_mod::rewind_lines(int startPos, int nLines) { Fl_Text_Buffer_mod*buf = buffer(); int pos, lineStart, retLines, retPos, retLineStart, retLineEnd; /* If we're not wrapping, use the more efficient BufCountBackwardNLines */ if (!mContinuousWrap) return buf->rewind_lines(startPos, nLines); pos = startPos; for (;;) { lineStart = buf->line_start(pos); wrapped_line_counter(buf, lineStart, pos, INT_MAX, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd, false); if (retLines > nLines) return skip_lines(lineStart, retLines-nLines, true); nLines -= retLines; pos = lineStart - 1; if (pos < 0) return 0; nLines -= 1; } } static inline int fl_isseparator(int c) { return c != '$' && c != '_' && (isspace(c) || ispunct(c)); } void Fl_Text_Display_mod::next_word() { int pos = insert_position(); while (pos < buffer()->length() && !fl_isseparator(buffer()->character(pos))) { pos++; } while (pos < buffer()->length() && fl_isseparator(buffer()->character(pos))) { pos++; } insert_position( pos ); } void Fl_Text_Display_mod::previous_word() { int pos = insert_position(); if (pos==0) return; pos--; while (pos && fl_isseparator(buffer()->character(pos))) { pos--; } while (pos && !fl_isseparator(buffer()->character(pos))) { pos--; } if (fl_isseparator(buffer()->character(pos))) pos++; insert_position( pos ); } /* ** Callback attached to the text buffer to receive delete information before ** the modifications are actually made. */ void Fl_Text_Display_mod::buffer_predelete_cb(int pos, int nDeleted, void *cbArg) { Fl_Text_Display_mod *textD = (Fl_Text_Display_mod *)cbArg; if (textD->mContinuousWrap && (textD->mFixedFontWidth == -1 || textD->mModifyingTabDistance)) /* Note: we must perform this measurement, even if there is not a single character deleted; the number of "deleted" lines is the number of visual lines spanned by the real line in which the modification takes place. Also, a modification of the tab distance requires the same kind of calculations in advance, even if the font width is "fixed", because when the width of the tab characters changes, the layout of the text may be completely different. */ textD->measure_deleted_lines(pos, nDeleted); else textD->mSuppressResync = 0; /* Probably not needed, but just in case */ } /* ** Callback attached to the text buffer to receive modification information */ void Fl_Text_Display_mod::buffer_modified_cb( int pos, int nInserted, int nDeleted, int nRestyled, const char *deletedText, void *cbArg ) { int linesInserted, linesDeleted, startDispPos, endDispPos; Fl_Text_Display_mod *textD = ( Fl_Text_Display_mod * ) cbArg; Fl_Text_Buffer_mod*buf = textD->mBuffer; int oldFirstChar = textD->mFirstChar; int scrolled, origCursorPos = textD->mCursorPos; int wrapModStart, wrapModEnd; /* buffer modification cancels vertical cursor motion column */ if ( nInserted != 0 || nDeleted != 0 ) textD->mCursorPreferredCol = -1; /* Count the number of lines inserted and deleted, and in the case of continuous wrap mode, how much has changed */ if (textD->mContinuousWrap) { textD->find_wrap_range(deletedText, pos, nInserted, nDeleted, &wrapModStart, &wrapModEnd, &linesInserted, &linesDeleted); } else { linesInserted = nInserted == 0 ? 0 : buf->count_lines( pos, pos + nInserted ); linesDeleted = nDeleted == 0 ? 0 : countlines( deletedText ); } /* Update the line starts and mTopLineNum */ if ( nInserted != 0 || nDeleted != 0 ) { if (textD->mContinuousWrap) { textD->update_line_starts( wrapModStart, wrapModEnd-wrapModStart, nDeleted + pos-wrapModStart + (wrapModEnd-(pos+nInserted)), linesInserted, linesDeleted, &scrolled ); } else { textD->update_line_starts( pos, nInserted, nDeleted, linesInserted, linesDeleted, &scrolled ); } } else scrolled = 0; /* If we're counting non-wrapped lines as well, maintain the absolute (non-wrapped) line number of the text displayed */ if (textD->maintaining_absolute_top_line_number() && (nInserted != 0 || nDeleted != 0)) { if (pos + nDeleted < oldFirstChar) textD->mAbsTopLineNum += buf->count_lines(pos, pos + nInserted) - countlines(deletedText); else if (pos < oldFirstChar) textD->reset_absolute_top_line_number(); } /* Update the line count for the whole buffer */ textD->mNBufferLines += linesInserted - linesDeleted; /* Update the cursor position */ if ( textD->mCursorToHint != NO_HINT ) { textD->mCursorPos = textD->mCursorToHint; textD->mCursorToHint = NO_HINT; } else if ( textD->mCursorPos > pos ) { if ( textD->mCursorPos < pos + nDeleted ) textD->mCursorPos = pos; else textD->mCursorPos += nInserted - nDeleted; } // refigure scrollbars & stuff textD->resize(textD->x(), textD->y(), textD->w(), textD->h()); // don't need to do anything else if not visible? if (!textD->visible_r()) return; /* If the changes caused scrolling, re-paint everything and we're done. */ if ( scrolled ) { textD->damage(FL_DAMAGE_EXPOSE); if ( textD->mStyleBuffer ) /* See comments in extendRangeForStyleMods */ textD->mStyleBuffer->primary_selection()->selected(0); return; } /* If the changes didn't cause scrolling, decide the range of characters that need to be re-painted. Also if the cursor position moved, be sure that the redisplay range covers the old cursor position so the old cursor gets erased, and erase the bits of the cursor which extend beyond the left and right edges of the text. */ startDispPos = textD->mContinuousWrap ? wrapModStart : pos; if ( origCursorPos == startDispPos && textD->mCursorPos != startDispPos ) startDispPos = min( startDispPos, origCursorPos - 1 ); if ( linesInserted == linesDeleted ) { if ( nInserted == 0 && nDeleted == 0 ) endDispPos = pos + nRestyled; else { endDispPos = textD->mContinuousWrap ? wrapModEnd : buf->line_end( pos + nInserted ) + 1; // CET - FIXME if ( origCursorPos >= startDispPos && // ( origCursorPos <= endDispPos || endDispPos == buf->length() ) ) } if (linesInserted > 1) textD->draw_line_numbers(false); } else { endDispPos = textD->mLastChar + 1; // CET - FIXME if ( origCursorPos >= pos ) /* If more than one line is inserted/deleted, a line break may have been inserted or removed in between, and the line numbers may have changed. If only one line is altered, line numbers cannot be affected (the insertion or removal of a line break always results in at least two lines being redrawn). */ textD->draw_line_numbers(false); } /* If there is a style buffer, check if the modification caused additional changes that need to be redisplayed. (Redisplaying separately would cause double-redraw on almost every modification involving styled text). Extend the redraw range to incorporate style changes */ if ( textD->mStyleBuffer ) textD->extend_range_for_styles( &startDispPos, &endDispPos ); /* Redisplay computed range */ textD->redisplay_range( startDispPos, endDispPos ); } /* ** In continuous wrap mode, internal line numbers are calculated after ** wrapping. A separate non-wrapped line count is maintained when line ** numbering is turned on. There is some performance cost to maintaining this ** line count, so normally absolute line numbers are not tracked if line ** numbering is off. This routine allows callers to specify that they still ** want this line count maintained (for use via TextDPosToLineAndCol). ** More specifically, this allows the line number reported in the statistics ** line to be calibrated in absolute lines, rather than post-wrapped lines. */ void Fl_Text_Display_mod::maintain_absolute_top_line_number(int state) { mNeedAbsTopLineNum = state; reset_absolute_top_line_number(); } /* ** Returns the absolute (non-wrapped) line number of the first line displayed. ** Returns 0 if the absolute top line number is not being maintained. */ int Fl_Text_Display_mod::get_absolute_top_line_number() { if (!mContinuousWrap) return mTopLineNum; if (maintaining_absolute_top_line_number()) return mAbsTopLineNum; return 0; } /* ** Re-calculate absolute top line number for a change in scroll position. */ void Fl_Text_Display_mod::absolute_top_line_number(int oldFirstChar) { if (maintaining_absolute_top_line_number()) { if (mFirstChar < oldFirstChar) mAbsTopLineNum -= buffer()->count_lines(mFirstChar, oldFirstChar); else mAbsTopLineNum += buffer()->count_lines(oldFirstChar, mFirstChar); } } /* ** Return true if a separate absolute top line number is being maintained ** (for displaying line numbers or showing in the statistics line). */ int Fl_Text_Display_mod::maintaining_absolute_top_line_number() { return mContinuousWrap && (mLineNumWidth != 0 || mNeedAbsTopLineNum); } /* ** Count lines from the beginning of the buffer to reestablish the ** absolute (non-wrapped) top line number. If mode is not continuous wrap, ** or the number is not being maintained, does nothing. */ void Fl_Text_Display_mod::reset_absolute_top_line_number() { mAbsTopLineNum = 1; absolute_top_line_number(0); } /* ** Find the line number of position "pos" relative to the first line of ** displayed text. Returns 0 if the line is not displayed. */ //int Fl_Text_Display_mod::position_to_line( int pos, int *lineNum ) { int Fl_Text_Display_mod::position_to_line( size_t pos, int *lineNum ) { int i; *lineNum = 0; if ( pos < (unsigned int)mFirstChar ) return 0; if ( pos > (unsigned int)mLastChar ) { if ( empty_vlines() ) { if ( mLastChar < mBuffer->length() ) { if ( !position_to_line( mLastChar, lineNum ) ) { #ifdef DEBUG Fl::error("Fl_Text_Display_mod::position_to_line(): Consistency check ptvl failed"); #endif return 0; } return ++( *lineNum ) <= mNVisibleLines - 1; } else { position_to_line( mLastChar - 1, lineNum ); return 1; } } return 0; } for ( i = mNVisibleLines - 1; i >= 0; i-- ) { if ( mLineStarts[ i ] != -1 && pos >= (unsigned int)mLineStarts[ i ] ) { *lineNum = i; return 1; } } return 0; /* probably never be reached */ } /* ** Draw the text on a single line represented by "visLineNum" (the ** number of lines down from the top of the display), limited by ** "leftClip" and "rightClip" window coordinates and "leftCharIndex" and ** "rightCharIndex" character positions (not including the character at ** position "rightCharIndex"). */ void Fl_Text_Display_mod::draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex) { Fl_Text_Buffer_mod* buf = mBuffer; int i, X, Y, startX, charIndex, lineStartPos, lineLen, fontHeight; int stdCharWidth, charWidth, startIndex, charStyle, style; int charLen, outStartIndex, outIndex; int dispIndexOffset; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ], outStr[ MAX_DISP_LINE_LEN ]; char *outPtr; const char *lineStr; // printf("draw_vline(visLineNum=%d, leftClip=%d, rightClip=%d, leftCharIndex=%d, rightCharIndex=%d)\n", // visLineNum, leftClip, rightClip, leftCharIndex, rightCharIndex); // printf("nNVisibleLines=%d\n", mNVisibleLines); /* If line is not displayed, skip it */ if ( visLineNum < 0 || visLineNum >= mNVisibleLines ) return; /* Calculate Y coordinate of the string to draw */ fontHeight = mMaxsize; Y = text_area.y + visLineNum * fontHeight; /* Get the text, length, and buffer position of the line to display */ lineStartPos = mLineStarts[ visLineNum ]; // printf("lineStartPos=%d\n", lineStartPos); if ( lineStartPos == -1 ) { lineLen = 0; lineStr = NULL; } else { lineLen = vline_length( visLineNum ); lineStr = buf->text_range( lineStartPos, lineStartPos + lineLen ); } /* Space beyond the end of the line is still counted in units of characters of a standardized character width (this is done mostly because style changes based on character position can still occur in this region due to rectangular Fl_Text_Selections). stdCharWidth must be non-zero to prevent a potential infinite loop if X does not advance */ stdCharWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; if ( stdCharWidth <= 0 ) { Fl::error("Fl_Text_Display_mod::draw_vline(): bad font measurement"); free((void *)lineStr); return; } /* Shrink the clipping range to the active display area */ leftClip = max( text_area.x, leftClip ); rightClip = min( rightClip, text_area.x + text_area.w ); /* Rectangular Fl_Text_Selections are based on "real" line starts (after a newline or start of buffer). Calculate the difference between the last newline position and the line start we're using. Since scanning back to find a newline is expensive, only do so if there's actually a rectangular Fl_Text_Selection which needs it */ if (mContinuousWrap && (range_touches_selection(buf->primary_selection(), lineStartPos, lineStartPos + lineLen) || range_touches_selection( buf->secondary_selection(), lineStartPos, lineStartPos + lineLen) || range_touches_selection(buf->highlight_selection(), lineStartPos, lineStartPos + lineLen))) { dispIndexOffset = buf->count_displayed_characters( buf->line_start(lineStartPos), lineStartPos); } else dispIndexOffset = 0; /* Step through character positions from the beginning of the line (even if that's off the left edge of the displayed area) to find the first character position that's not clipped, and the X coordinate for drawing that character */ X = text_area.x - mHorizOffset; outIndex = 0; for ( charIndex = 0; ; charIndex++ ) { charLen = charIndex >= lineLen ? 1 : Fl_Text_Buffer_mod::expand_character( lineStr[ charIndex ], outIndex, expandedChar, buf->tab_distance(), buf->null_substitution_character() ); style = position_style( lineStartPos, lineLen, charIndex, outIndex + dispIndexOffset ); charWidth = charIndex >= lineLen ? stdCharWidth : string_width( expandedChar, charLen, style ); if ( X + charWidth >= leftClip && charIndex >= leftCharIndex ) { startIndex = charIndex; outStartIndex = outIndex; startX = X; break; } X += charWidth; outIndex += charLen; } /* Scan character positions from the beginning of the clipping range, and draw parts whenever the style changes (also note if the cursor is on this line, and where it should be drawn to take advantage of the x position which we've gone to so much trouble to calculate) */ /* since characters between style may overlap, we draw the full background first */ int sX = startX; outPtr = outStr; outIndex = outStartIndex; X = startX; for ( charIndex = startIndex; charIndex < rightCharIndex; charIndex++ ) { charLen = charIndex >= lineLen ? 1 : Fl_Text_Buffer_mod::expand_character( lineStr[ charIndex ], outIndex, expandedChar, buf->tab_distance(), buf->null_substitution_character() ); charStyle = position_style( lineStartPos, lineLen, charIndex, outIndex + dispIndexOffset ); for ( i = 0; i < charLen; i++ ) { if ( i != 0 && charIndex < lineLen && lineStr[ charIndex ] == '\t' ) charStyle = position_style( lineStartPos, lineLen, charIndex, outIndex + dispIndexOffset ); if ( charStyle != style ) { draw_string( style|BG_ONLY_MASK, sX, Y, X, outStr, outPtr - outStr ); outPtr = outStr; sX = X; style = charStyle; } if ( charIndex < lineLen ) { *outPtr = expandedChar[ i ]; charWidth = string_width( &expandedChar[ i ], 1, charStyle ); } else charWidth = stdCharWidth; outPtr++; X += charWidth; outIndex++; } if ( outPtr - outStr + FL_TEXT_MAX_EXP_CHAR_LEN >= MAX_DISP_LINE_LEN || X >= rightClip ) break; } draw_string( style|BG_ONLY_MASK, sX, Y, X, outStr, outPtr - outStr ); /* now draw the text over the previously erased background */ outPtr = outStr; outIndex = outStartIndex; X = startX; for ( charIndex = startIndex; charIndex < rightCharIndex; charIndex++ ) { charLen = charIndex >= lineLen ? 1 : Fl_Text_Buffer_mod::expand_character( lineStr[ charIndex ], outIndex, expandedChar, buf->tab_distance(), buf->null_substitution_character() ); charStyle = position_style( lineStartPos, lineLen, charIndex, outIndex + dispIndexOffset ); for ( i = 0; i < charLen; i++ ) { if ( i != 0 && charIndex < lineLen && lineStr[ charIndex ] == '\t' ) charStyle = position_style( lineStartPos, lineLen, charIndex, outIndex + dispIndexOffset ); if ( charStyle != style ) { draw_string( style|TEXT_ONLY_MASK, startX, Y, X, outStr, outPtr - outStr ); outPtr = outStr; startX = X; style = charStyle; } if ( charIndex < lineLen ) { *outPtr = expandedChar[ i ]; charWidth = string_width( &expandedChar[ i ], 1, charStyle ); } else charWidth = stdCharWidth; outPtr++; X += charWidth; outIndex++; } if ( outPtr - outStr + FL_TEXT_MAX_EXP_CHAR_LEN >= MAX_DISP_LINE_LEN || X >= rightClip ) break; } /* Draw the remaining style segment */ draw_string( style|TEXT_ONLY_MASK, startX, Y, X, outStr, outPtr - outStr ); /* Draw the cursor if part of it appeared on the redisplayed part of this line. Also check for the cases which are not caught as the line is scanned above: when the cursor appears at the very end of the redisplayed section. */ /* CET - FIXME if ( mCursorOn ) { if ( hasCursor ) draw_cursor( cursorX, Y ); else if ( charIndex < lineLen && ( lineStartPos + charIndex + 1 == cursorPos ) && X == rightClip ) { if ( cursorPos >= buf->length() ) draw_cursor( X - 1, Y ); else { draw_cursor( X - 1, Y ); } } } */ if ( lineStr != NULL ) free((void *)lineStr); } /* ** Draw a string or blank area according to parameter "style", using the ** appropriate colors and drawing method for that style, with top left ** corner at X, y. If style says to draw text, use "string" as source of ** characters, and draw "nChars", if style is FILL, erase ** rectangle where text would have drawn from X to toX and from Y to ** the maximum Y extent of the current font(s). */ void Fl_Text_Display_mod::draw_string( int style, int X, int Y, int toX, const char *string, int nChars ) { const Style_Table_Entry * styleRec; /* Draw blank area rather than text, if that was the request */ if ( style & FILL_MASK ) { if (style & TEXT_ONLY_MASK) return; clear_rect( style, X, Y, toX - X, mMaxsize ); return; } /* Set font, color, and gc depending on style. For normal text, GCs for normal drawing, or drawing within a Fl_Text_Selection or highlight are pre-allocated and pre-configured. For syntax highlighting, GCs are configured here, on the fly. */ Fl_Font font = textfont(); int fsize = textsize(); Fl_Color foreground; Fl_Color background; if ( style & STYLE_LOOKUP_MASK ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; styleRec = mStyleTable + si; font = styleRec->font; fsize = styleRec->size; if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { if (Fl::focus() == this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.8f); } else background = color(); foreground = fl_contrast(styleRec->color, background); } else if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { if (Fl::focus() == this) background = selection_color(); else background = fl_color_average(color(), selection_color(), 0.5f); foreground = fl_contrast(textcolor(), background); } else { foreground = textcolor(); background = color(); } if (!(style & TEXT_ONLY_MASK)) { fl_color( background ); fl_rectf( X, Y, toX - X, mMaxsize ); } if (!(style & BG_ONLY_MASK)) { fl_color( foreground ); fl_font( font, fsize ); fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); } // CET - FIXME /* If any space around the character remains unfilled (due to use of different sized fonts for highlighting), fill in above or below to erase previously drawn characters */ /* if (fs->ascent < mAscent) clear_rect( style, X, Y, toX - X, mAscent - fs->ascent); if (fs->descent < mDescent) clear_rect( style, X, Y + mAscent + fs->descent, toX - x, mDescent - fs->descent); */ /* Underline if style is secondary Fl_Text_Selection */ /* if (style & SECONDARY_MASK) XDrawLine(XtDisplay(mW), XtWindow(mW), gc, x, y + mAscent, toX - 1, Y + fs->ascent); */ } /* ** Clear a rectangle with the appropriate background color for "style" */ void Fl_Text_Display_mod::clear_rect( int style, int X, int Y, int width, int height ) { /* A width of zero means "clear to end of window" to XClearArea */ if ( width == 0 ) return; if ( Fl::focus() != this ) { if (style & (HIGHLIGHT_MASK | PRIMARY_MASK)) { fl_color(fl_color_average(color(), selection_color(), 0.5f)); } else { fl_color( color() ); } fl_rectf( X, Y, width, height ); } else if ( style & HIGHLIGHT_MASK ) { fl_color( fl_contrast(textcolor(), color()) ); fl_rectf( X, Y, width, height ); } else if ( style & PRIMARY_MASK ) { fl_color( selection_color() ); fl_rectf( X, Y, width, height ); } else { fl_color( color() ); fl_rectf( X, Y, width, height ); } } /* ** Draw a cursor with top center at X, y. */ void Fl_Text_Display_mod::draw_cursor( int X, int Y ) { typedef struct { int x1, y1, x2, y2; } Segment; Segment segs[ 5 ]; int left, right, cursorWidth, midY; // int fontWidth = mFontStruct->min_bounds.width, nSegs = 0; int fontWidth = TMPFONTWIDTH; // CET - FIXME int nSegs = 0; int fontHeight = mMaxsize; int bot = Y + fontHeight - 1; if ( X < text_area.x - 1 || X > text_area.x + text_area.w ) return; /* For cursors other than the block, make them around 2/3 of a character width, rounded to an even number of pixels so that X will draw an odd number centered on the stem at x. */ cursorWidth = 4; //(fontWidth/3) * 2; left = X - cursorWidth / 2; right = left + cursorWidth; /* Create segments and draw cursor */ if ( mCursorStyle == CARET_CURSOR ) { midY = bot - fontHeight / 5; segs[ 0 ].x1 = left; segs[ 0 ].y1 = bot; segs[ 0 ].x2 = X; segs[ 0 ].y2 = midY; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = midY - 1; segs[ 3 ].x1 = X; segs[ 3 ].y1 = midY - 1; segs[ 3 ].x2 = right; segs[ 3 ].y2 = bot; nSegs = 4; } else if ( mCursorStyle == NORMAL_CURSOR ) { segs[ 0 ].x1 = left; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = left; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = right; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == HEAVY_CURSOR ) { segs[ 0 ].x1 = X - 1; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X - 1; segs[ 0 ].y2 = bot; segs[ 1 ].x1 = X; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = X; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = X + 1; segs[ 2 ].y1 = Y; segs[ 2 ].x2 = X + 1; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = left; segs[ 3 ].y1 = Y; segs[ 3 ].x2 = right; segs[ 3 ].y2 = Y; segs[ 4 ].x1 = left; segs[ 4 ].y1 = bot; segs[ 4 ].x2 = right; segs[ 4 ].y2 = bot; nSegs = 5; } else if ( mCursorStyle == DIM_CURSOR ) { midY = Y + fontHeight / 2; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = X; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = X; segs[ 1 ].y1 = midY; segs[ 1 ].x2 = X; segs[ 1 ].y2 = midY; segs[ 2 ].x1 = X; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; nSegs = 3; } else if ( mCursorStyle == BLOCK_CURSOR ) { right = X + fontWidth; segs[ 0 ].x1 = X; segs[ 0 ].y1 = Y; segs[ 0 ].x2 = right; segs[ 0 ].y2 = Y; segs[ 1 ].x1 = right; segs[ 1 ].y1 = Y; segs[ 1 ].x2 = right; segs[ 1 ].y2 = bot; segs[ 2 ].x1 = right; segs[ 2 ].y1 = bot; segs[ 2 ].x2 = X; segs[ 2 ].y2 = bot; segs[ 3 ].x1 = X; segs[ 3 ].y1 = bot; segs[ 3 ].x2 = X; segs[ 3 ].y2 = Y; nSegs = 4; } fl_color( mCursor_color ); for ( int k = 0; k < nSegs; k++ ) { fl_line( segs[ k ].x1, segs[ k ].y1, segs[ k ].x2, segs[ k ].y2 ); } } /* ** Determine the drawing method to use to draw a specific character from "buf". ** "lineStartPos" gives the character index where the line begins, "lineIndex", ** the number of characters past the beginning of the line, and "dispIndex", ** the number of displayed characters past the beginning of the line. Passing ** lineStartPos of -1 returns the drawing style for "no text". ** ** Why not just: position_style(pos)? Because style applies to blank areas ** of the window beyond the text boundaries, and because this routine must also ** decide whether a position is inside of a rectangular Fl_Text_Selection, and do ** so efficiently, without re-counting character positions from the start of the ** line. ** ** Note that style is a somewhat incorrect name, drawing method would ** be more appropriate. */ int Fl_Text_Display_mod::position_style( int lineStartPos, int lineLen, int lineIndex, int dispIndex ) { Fl_Text_Buffer_mod* buf = mBuffer; Fl_Text_Buffer_mod*styleBuf = mStyleBuffer; int pos, style = 0; if ( lineStartPos == -1 || buf == NULL ) return FILL_MASK; pos = lineStartPos + min( lineIndex, lineLen ); if ( lineIndex >= lineLen ) style = FILL_MASK; else if ( styleBuf != NULL ) { style = ( unsigned char ) styleBuf->character( pos ); if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)( pos, mHighlightCBArg); style = (unsigned char) styleBuf->character( pos); } } if (buf->primary_selection()->includes(pos, lineStartPos, dispIndex)) style |= PRIMARY_MASK; if (buf->highlight_selection()->includes(pos, lineStartPos, dispIndex)) style |= HIGHLIGHT_MASK; if (buf->secondary_selection()->includes(pos, lineStartPos, dispIndex)) style |= SECONDARY_MASK; return style; } /* ** Find the width of a string in the font of a particular style */ int Fl_Text_Display_mod::string_width( const char *string, int length, int style ) { Fl_Font font; int fsize; if ( style & STYLE_LOOKUP_MASK ) { int si = (style & STYLE_LOOKUP_MASK) - 'A'; if (si < 0) si = 0; else if (si >= mNStyles) si = mNStyles - 1; font = mStyleTable[si].font; fsize = mStyleTable[si].size; } else { font = textfont(); fsize = textsize(); } fl_font( font, fsize ); return ( int ) ( fl_width( string, length ) ); } /* ** Translate window coordinates to the nearest (insert cursor or character ** cell) text position. The parameter posType specifies how to interpret the ** position: CURSOR_POS means translate the coordinates to the nearest cursor ** position, and CHARACTER_POS means return the position of the character ** closest to (X, Y). */ int Fl_Text_Display_mod::xy_to_position( int X, int Y, int posType ) { int charIndex, lineStart, lineLen, fontHeight; int charWidth, charLen, charStyle, visLineNum, xStep, outIndex; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; const char *lineStr; /* Find the visible line number corresponding to the Y coordinate */ fontHeight = mMaxsize; visLineNum = ( Y - text_area.y ) / fontHeight; if ( visLineNum < 0 ) return mFirstChar; if ( visLineNum >= mNVisibleLines ) visLineNum = mNVisibleLines - 1; /* Find the position at the start of the line */ lineStart = mLineStarts[ visLineNum ]; /* If the line start was empty, return the last position in the buffer */ if ( lineStart == -1 ) return mBuffer->length(); /* Get the line text and its length */ lineLen = vline_length( visLineNum ); lineStr = mBuffer->text_range( lineStart, lineStart + lineLen ); /* Step through character positions from the beginning of the line to find the character position corresponding to the X coordinate */ xStep = text_area.x - mHorizOffset; outIndex = 0; for ( charIndex = 0; charIndex < lineLen; charIndex++ ) { charLen = Fl_Text_Buffer_mod::expand_character( lineStr[ charIndex ], outIndex, expandedChar, mBuffer->tab_distance(), mBuffer->null_substitution_character() ); charStyle = position_style( lineStart, lineLen, charIndex, outIndex ); charWidth = string_width( expandedChar, charLen, charStyle ); if ( X < xStep + ( posType == CURSOR_POS ? charWidth / 2 : charWidth ) ) { free((char *)lineStr); return lineStart + charIndex; } xStep += charWidth; outIndex += charLen; } /* If the X position was beyond the end of the line, return the position of the newline at the end of the line */ free((char *)lineStr); return lineStart + lineLen; } /* ** Translate window coordinates to the nearest row and column number for ** positioning the cursor. This, of course, makes no sense when the font is ** proportional, since there are no absolute columns. The parameter posType ** specifies how to interpret the position: CURSOR_POS means translate the ** coordinates to the nearest position between characters, and CHARACTER_POS ** means translate the position to the nearest character cell. */ void Fl_Text_Display_mod::xy_to_rowcol( int X, int Y, int *row, int *column, int posType ) { int fontHeight = mMaxsize; int fontWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Find the visible line number corresponding to the Y coordinate */ *row = ( Y - text_area.y ) / fontHeight; if ( *row < 0 ) * row = 0; if ( *row >= mNVisibleLines ) * row = mNVisibleLines - 1; *column = ( ( X - text_area.x ) + mHorizOffset + ( posType == CURSOR_POS ? fontWidth / 2 : 0 ) ) / fontWidth; if ( *column < 0 ) * column = 0; } /* ** Offset the line starts array, mTopLineNum, mFirstChar and lastChar, for a new ** vertical scroll position given by newTopLineNum. If any currently displayed ** lines will still be visible, salvage the line starts values, otherwise, ** count lines from the nearest known line start (start or end of buffer, or ** the closest value in the mLineStarts array) */ void Fl_Text_Display_mod::offset_line_starts( int newTopLineNum ) { int oldTopLineNum = mTopLineNum; int oldFirstChar = mFirstChar; int lineDelta = newTopLineNum - oldTopLineNum; int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int i, lastLineNum; Fl_Text_Buffer_mod*buf = mBuffer; /* If there was no offset, nothing needs to be changed */ if ( lineDelta == 0 ) return; /* Find the new value for mFirstChar by counting lines from the nearest known line start (start or end of buffer, or the closest value in the lineStarts array) */ lastLineNum = oldTopLineNum + nVisLines - 1; if ( newTopLineNum < oldTopLineNum && newTopLineNum < -lineDelta ) { mFirstChar = skip_lines( 0, newTopLineNum - 1, true ); } else if ( newTopLineNum < oldTopLineNum ) { mFirstChar = rewind_lines( mFirstChar, -lineDelta ); } else if ( newTopLineNum < lastLineNum ) { mFirstChar = lineStarts[ newTopLineNum - oldTopLineNum ]; } else if ( newTopLineNum - lastLineNum < mNBufferLines - newTopLineNum ) { mFirstChar = skip_lines( lineStarts[ nVisLines - 1 ], newTopLineNum - lastLineNum, true ); } else { mFirstChar = rewind_lines( buf->length(), mNBufferLines - newTopLineNum + 1 ); } /* Fill in the line starts array */ if ( lineDelta < 0 && -lineDelta < nVisLines ) { for ( i = nVisLines - 1; i >= -lineDelta; i-- ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( 0, -lineDelta ); } else if ( lineDelta > 0 && lineDelta < nVisLines ) { for ( i = 0; i < nVisLines - lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i + lineDelta ]; calc_line_starts( nVisLines - lineDelta, nVisLines - 1 ); } else calc_line_starts( 0, nVisLines ); /* Set lastChar and mTopLineNum */ calc_last_char(); mTopLineNum = newTopLineNum; /* If we're numbering lines or being asked to maintain an absolute line number, re-calculate the absolute line number */ absolute_top_line_number(oldFirstChar); } /* ** Update the line starts array, mTopLineNum, mFirstChar and lastChar for text ** display "textD" after a modification to the text buffer, given by the ** position where the change began "pos", and the nmubers of characters ** and lines inserted and deleted. */ void Fl_Text_Display_mod::update_line_starts( int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled ) { int * lineStarts = mLineStarts; int i, lineOfPos, lineOfEnd, nVisLines = mNVisibleLines; int charDelta = charsInserted - charsDeleted; int lineDelta = linesInserted - linesDeleted; /* If all of the changes were before the displayed text, the display doesn't change, just update the top line num and offset the line start entries and first and last characters */ if ( pos + charsDeleted < mFirstChar ) { mTopLineNum += lineDelta; for ( i = 0; i < nVisLines && lineStarts[i] != -1; i++ ) lineStarts[ i ] += charDelta; mFirstChar += charDelta; mLastChar += charDelta; *scrolled = 0; return; } /* The change began before the beginning of the displayed text, but part or all of the displayed text was deleted */ if ( pos < mFirstChar ) { /* If some text remains in the window, anchor on that */ if ( position_to_line( pos + charsDeleted, &lineOfEnd ) && ++lineOfEnd < nVisLines && lineStarts[ lineOfEnd ] != -1 ) { mTopLineNum = max( 1, mTopLineNum + lineDelta ); mFirstChar = rewind_lines( lineStarts[ lineOfEnd ] + charDelta, lineOfEnd ); /* Otherwise anchor on original line number and recount everything */ } else { if ( mTopLineNum > mNBufferLines + lineDelta ) { mTopLineNum = 1; mFirstChar = 0; } else mFirstChar = skip_lines( 0, mTopLineNum - 1, true ); } calc_line_starts( 0, nVisLines - 1 ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 1; return; } /* If the change was in the middle of the displayed text (it usually is), salvage as much of the line starts array as possible by moving and offsetting the entries after the changed area, and re-counting the added lines or the lines beyond the salvaged part of the line starts array */ if ( pos <= mLastChar ) { /* find line on which the change began */ position_to_line( pos, &lineOfPos ); /* salvage line starts after the changed area */ if ( lineDelta == 0 ) { for ( i = lineOfPos + 1; i < nVisLines && lineStarts[ i ] != -1; i++ ) lineStarts[ i ] += charDelta; } else if ( lineDelta > 0 ) { for ( i = nVisLines - 1; i >= lineOfPos + lineDelta + 1; i-- ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } else /* (lineDelta < 0) */ { for ( i = max( 0, lineOfPos + 1 ); i < nVisLines + lineDelta; i++ ) lineStarts[ i ] = lineStarts[ i - lineDelta ] + ( lineStarts[ i - lineDelta ] == -1 ? 0 : charDelta ); } /* fill in the missing line starts */ if ( linesInserted >= 0 ) calc_line_starts( lineOfPos + 1, lineOfPos + linesInserted ); if ( lineDelta < 0 ) calc_line_starts( nVisLines + lineDelta, nVisLines ); /* calculate lastChar by finding the end of the last displayed line */ calc_last_char(); *scrolled = 0; return; } /* Change was past the end of the displayed text, but displayable by virtue of being an insert at the end of the buffer into visible blank lines */ if ( empty_vlines() ) { position_to_line( pos, &lineOfPos ); calc_line_starts( lineOfPos, lineOfPos + linesInserted ); calc_last_char(); *scrolled = 0; return; } /* Change was beyond the end of the buffer and not visible, do nothing */ *scrolled = 0; } /* ** Scan through the text in the "textD"'s buffer and recalculate the line ** starts array values beginning at index "startLine" and continuing through ** (including) "endLine". It assumes that the line starts entry preceding ** "startLine" (or mFirstChar if startLine is 0) is good, and re-counts ** newlines to fill in the requested entries. Out of range values for ** "startLine" and "endLine" are acceptable. */ void Fl_Text_Display_mod::calc_line_starts( int startLine, int endLine ) { int startPos, bufLen = mBuffer->length(); int line, lineEnd, nextLineStart, nVis = mNVisibleLines; int *lineStarts = mLineStarts; /* Clean up (possibly) messy input parameters */ if ( endLine < 0 ) endLine = 0; if ( endLine >= nVis ) endLine = nVis - 1; if ( startLine < 0 ) startLine = 0; if ( startLine >= nVis ) startLine = nVis - 1; if ( startLine > endLine ) return; /* Find the last known good line number -> position mapping */ if ( startLine == 0 ) { lineStarts[ 0 ] = mFirstChar; startLine = 1; } startPos = lineStarts[ startLine - 1 ]; /* If the starting position is already past the end of the text, fill in -1's (means no text on line) and return */ if ( startPos == -1 ) { for ( line = startLine; line <= endLine; line++ ) lineStarts[ line ] = -1; return; } /* Loop searching for ends of lines and storing the positions of the start of the next line in lineStarts */ for ( line = startLine; line <= endLine; line++ ) { find_line_end(startPos, true, &lineEnd, &nextLineStart); startPos = nextLineStart; if ( startPos >= bufLen ) { /* If the buffer ends with a newline or line break, put buf->length() in the next line start position (instead of a -1 which is the normal marker for an empty line) to indicate that the cursor may safely be displayed there */ if ( line == 0 || ( lineStarts[ line - 1 ] != bufLen && lineEnd != nextLineStart ) ) { lineStarts[ line ] = bufLen; line++; } break; } lineStarts[ line ] = startPos; } /* Set any entries beyond the end of the text to -1 */ for ( ; line <= endLine; line++ ) lineStarts[ line ] = -1; } /* ** Given a Fl_Text_Display with a complete, up-to-date lineStarts array, update ** the lastChar entry to point to the last buffer position displayed. */ void Fl_Text_Display_mod::calc_last_char() { int i; for (i = mNVisibleLines - 1; i >= 0 && mLineStarts[i] == -1; i--) ; mLastChar = i < 0 ? 0 : line_end(mLineStarts[i], true); } void Fl_Text_Display_mod::scroll(int topLineNum, int horizOffset) { mTopLineNumHint = topLineNum; mHorizOffsetHint = horizOffset; resize(x(), y(), w(), h()); } void Fl_Text_Display_mod::scroll_(int topLineNum, int horizOffset) { /* Limit the requested scroll position to allowable values */ if (topLineNum > mNBufferLines + 3 - mNVisibleLines) topLineNum = mNBufferLines + 3 - mNVisibleLines; if (topLineNum < 1) topLineNum = 1; if (horizOffset > longest_vline() - text_area.w) horizOffset = longest_vline() - text_area.w; if (horizOffset < 0) horizOffset = 0; /* Do nothing if scroll position hasn't actually changed or there's no window to draw in yet */ if (mHorizOffset == horizOffset && mTopLineNum == topLineNum) return; /* If the vertical scroll position has changed, update the line starts array and related counters in the text display */ offset_line_starts(topLineNum); /* Just setting mHorizOffset is enough information for redisplay */ mHorizOffset = horizOffset; // redraw all text damage(FL_DAMAGE_EXPOSE); } /* ** Update the minimum, maximum, slider size, page increment, and value ** for vertical scroll bar. */ void Fl_Text_Display_mod::update_v_scrollbar() { /* The Vert. scroll bar value and slider size directly represent the top line number, and the number of visible lines respectively. The scroll bar maximum value is chosen to generally represent the size of the whole buffer, with minor adjustments to keep the scroll bar widget happy */ #ifdef DEBUG printf("Fl_Text_Display_mod::update_v_scrollbar():\n" " mTopLineNum=%d, mNVisibleLines=%d, mNBufferLines=%d\n", mTopLineNum, mNVisibleLines, mNBufferLines); #endif // DEBUG mVScrollBar->value(mTopLineNum, mNVisibleLines, 1, mNBufferLines+2); mVScrollBar->linesize(3); } /* ** Update the minimum, maximum, slider size, page increment, and value ** for the horizontal scroll bar. */ void Fl_Text_Display_mod::update_h_scrollbar() { int sliderMax = max(longest_vline(), text_area.w + mHorizOffset); mHScrollBar->value( mHorizOffset, text_area.w, 0, sliderMax ); } /* ** Callbacks for drag or valueChanged on scroll bars */ void Fl_Text_Display_mod::v_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mTopLineNum) return; textD->scroll(b->value(), textD->mHorizOffset); } void Fl_Text_Display_mod::h_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display_mod* textD) { if (b->value() == textD->mHorizOffset) return; textD->scroll(textD->mTopLineNum, b->value()); } /* ** Refresh the line number area. If clearAll is False, writes only over ** the character cell areas. Setting clearAll to True will clear out any ** stray marks outside of the character cell area, which might have been ** left from before a resize or font change. */ void Fl_Text_Display_mod::draw_line_numbers(bool /*clearAll*/) { #if 0 // FIXME: don't want this yet, so will leave for another time int y, line, visLine, nCols, lineStart; char lineNumString[12]; int lineHeight = mMaxsize ? mMaxsize : textsize_; int charWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width; /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is not yet realized */ if (mLineNumWidth == 0 || visible_r()) return; /* GC is allocated on demand, since not everyone will use line numbering */ if (textD->lineNumGC == NULL) { XGCValues values; values.foreground = textD->lineNumFGPixel; values.background = textD->bgPixel; values.font = textD->fontStruct->fid; textD->lineNumGC = XtGetGC(textD->w, GCFont| GCForeground | GCBackground, &values); } /* Erase the previous contents of the line number area, if requested */ if (clearAll) XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, textD->top, textD->lineNumWidth, textD->height, False); /* Draw the line numbers, aligned to the text */ nCols = min(11, textD->lineNumWidth / charWidth); y = textD->top; line = getAbsTopLineNum(textD); for (visLine=0; visLine < textD->nVisibleLines; visLine++) { lineStart = textD->lineStarts[visLine]; if (lineStart != -1 && (lineStart==0 || BufGetCharacter(textD->buffer, lineStart-1)=='\n')) { snprintf(lineNumString, sizeof(lineNumString), "%*d", nCols, line); XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumGC, textD->lineNumLeft, y + textD->ascent, lineNumString, strlen(lineNumString)); line++; } else { XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft, y, textD->lineNumWidth, textD->ascent + textD->descent, False); if (visLine == 0) line++; } y += lineHeight; } #endif } static int max( int i1, int i2 ) { return i1 >= i2 ? i1 : i2; } static int min( int i1, int i2 ) { return i1 <= i2 ? i1 : i2; } /* ** Count the number of newlines in a null-terminated text string; */ static int countlines( const char *string ) { const char * c; int lineCount = 0; if (!string) return 0; for ( c = string; *c != '\0'; c++ ) if ( *c == '\n' ) lineCount++; return lineCount; } /* ** Return the width in pixels of the displayed line pointed to by "visLineNum" */ int Fl_Text_Display_mod::measure_vline( int visLineNum ) { int i, width = 0, len, style, lineLen = vline_length( visLineNum ); int charCount = 0, lineStartPos = mLineStarts[ visLineNum ]; char expandedChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; if (lineStartPos < 0 || lineLen == 0) return 0; if ( mStyleBuffer == NULL ) { for ( i = 0; i < lineLen; i++ ) { len = mBuffer->expand_character( lineStartPos + i, charCount, expandedChar ); fl_font( textfont(), textsize() ); width += ( int ) fl_width( expandedChar, len ); charCount += len; } } else { for ( i = 0; i < lineLen; i++ ) { len = mBuffer->expand_character( lineStartPos + i, charCount, expandedChar ); style = ( unsigned char ) mStyleBuffer->character( lineStartPos + i ) - 'A'; if (style < 0) style = 0; else if (style >= mNStyles) style = mNStyles - 1; fl_font( mStyleTable[ style ].font, mStyleTable[ style ].size ); width += ( int ) fl_width( expandedChar, len ); charCount += len; } } return width; } /* ** Return true if there are lines visible with no corresponding buffer text */ int Fl_Text_Display_mod::empty_vlines() { return mNVisibleLines > 0 && mLineStarts[ mNVisibleLines - 1 ] == -1; } /* ** Return the length of a line (number of displayable characters) by examining ** entries in the line starts array rather than by scanning for newlines */ int Fl_Text_Display_mod::vline_length( int visLineNum ) { int nextLineStart, lineStartPos; if (visLineNum < 0 || visLineNum >= mNVisibleLines) return (0); lineStartPos = mLineStarts[ visLineNum ]; if ( lineStartPos == -1 ) return 0; if ( visLineNum + 1 >= mNVisibleLines ) return mLastChar - lineStartPos; nextLineStart = mLineStarts[ visLineNum + 1 ]; if ( nextLineStart == -1 ) return mLastChar - lineStartPos; if (wrap_uses_character(nextLineStart-1)) return nextLineStart-1 - lineStartPos; return nextLineStart - lineStartPos; } /* ** When continuous wrap is on, and the user inserts or deletes characters, ** wrapping can happen before and beyond the changed position. This routine ** finds the extent of the changes, and counts the deleted and inserted lines ** over that range. It also attempts to minimize the size of the range to ** what has to be counted and re-displayed, so the results can be useful ** both for delimiting where the line starts need to be recalculated, and ** for deciding what part of the text to redisplay. */ void Fl_Text_Display_mod::find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted) { int length, retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod*deletedTextBuf, *buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, countTo, lineStart, adjLineStart, i; int visLineNum = 0, nLines = 0; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) if (lineStarts[i] != -1 && pos >= lineStarts[i]) break; if (i > 0) { countFrom = lineStarts[i-1]; visLineNum = i-1; } else countFrom = buf->line_start(pos); } else countFrom = buf->line_start(pos); /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; *modRangeStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { countTo = buf->length(); *modRangeEnd = countTo; if (retPos != retLineEnd) nLines++; break; } else lineStart = retPos; nLines++; if (lineStart > pos + nInserted && buf->character(lineStart-1) == '\n') { countTo = lineStart; *modRangeEnd = lineStart; break; } /* Don't try to resync in continuous wrap mode with non-fixed font sizes; it would result in a chicken-and-egg dependency between the calculations for the inserted and the deleted lines. If we're in that mode, the number of deleted lines is calculated in advance, without resynchronization, so we shouldn't resynchronize for the inserted lines either. */ if (mSuppressResync) continue; /* check for synchronization with the original line starts array before pos, if so, the modified range can begin later */ if (lineStart <= pos) { while (visLineNum<nVisLines && lineStarts[visLineNum] < lineStart) visLineNum++; if (visLineNum < nVisLines && lineStarts[visLineNum] == lineStart) { countFrom = lineStart; nLines = 0; if (visLineNum+1 < nVisLines && lineStarts[visLineNum+1] != -1) *modRangeStart = min(pos, lineStarts[visLineNum+1]-1); else *modRangeStart = countFrom; } else *modRangeStart = min(*modRangeStart, lineStart-1); } /* check for synchronization with the original line starts array after pos, if so, the modified range can end early */ else if (lineStart > pos + nInserted) { adjLineStart = lineStart - nInserted + nDeleted; while (visLineNum<nVisLines && lineStarts[visLineNum]<adjLineStart) visLineNum++; if (visLineNum < nVisLines && lineStarts[visLineNum] != -1 && lineStarts[visLineNum] == adjLineStart) { countTo = line_end(lineStart, true); *modRangeEnd = lineStart; break; } } } *linesInserted = nLines; /* Count deleted lines between countFrom and countTo as the text existed before the modification (that is, as if the text between pos and pos+nInserted were replaced by "deletedText"). This extra context is necessary because wrapping can occur outside of the modified region as a result of adding or deleting text in the region. This is done by creating a textBuffer containing the deleted text and the necessary additional context, and calling the wrappedLineCounter on it. NOTE: This must not be done in continuous wrap mode when the font width is not fixed. In that case, the calculation would try to access style information that is no longer available (deleted text), or out of date (updated highlighting), possibly leading to completely wrong calculations and/or even crashes eventually. (This is not theoretical; it really happened.) In that case, the calculation of the number of deleted lines has happened before the buffer was modified (only in that case, because resynchronization of the line starts is impossible in that case, which makes the whole calculation less efficient). */ if (mSuppressResync) { *linesDeleted = mNLinesDeleted; mSuppressResync = 0; return; } length = (pos-countFrom) + nDeleted +(countTo-(pos+nInserted)); deletedTextBuf = new Fl_Text_Buffer_mod(length); deletedTextBuf->copy(buffer(), countFrom, pos, 0); if (nDeleted != 0) deletedTextBuf->insert(pos-countFrom, deletedText); deletedTextBuf->copy(buffer(), pos+nInserted, countTo, pos-countFrom+nDeleted); /* Note that we need to take into account an offset for the style buffer: the deletedTextBuf can be out of sync with the style buffer. */ wrapped_line_counter(deletedTextBuf, 0, length, INT_MAX, true, countFrom, &retPos, &retLines, &retLineStart, &retLineEnd, false); delete deletedTextBuf; *linesDeleted = retLines; mSuppressResync = 0; } /* ** This is a stripped-down version of the findWrapRange() function above, ** intended to be used to calculate the number of "deleted" lines during ** a buffer modification. It is called _before_ the modification takes place. ** ** This function should only be called in continuous wrap mode with a ** non-fixed font width. In that case, it is impossible to calculate ** the number of deleted lines, because the necessary style information ** is no longer available _after_ the modification. In other cases, we ** can still perform the calculation afterwards (possibly even more ** efficiently). */ void Fl_Text_Display_mod::measure_deleted_lines(int pos, int nDeleted) { int retPos, retLines, retLineStart, retLineEnd; Fl_Text_Buffer_mod*buf = buffer(); int nVisLines = mNVisibleLines; int *lineStarts = mLineStarts; int countFrom, lineStart; int nLines = 0, i; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed ** line, using information from the existing line starts array */ if (pos >= mFirstChar && pos <= mLastChar) { for (i=nVisLines-1; i>0; i--) if (lineStarts[i] != -1 && pos >= lineStarts[i]) break; if (i > 0) countFrom = lineStarts[i-1]; else countFrom = buf->line_start(pos); } else countFrom = buf->line_start(pos); /* ** Move forward through the (new) text one line at a time, counting ** displayed lines, and looking for either a real newline, or for the ** line starts to re-sync with the original line starts array */ lineStart = countFrom; for (;;) { /* advance to the next line. If the line ended in a real newline or the end of the buffer, that's far enough */ wrapped_line_counter(buf, lineStart, buf->length(), 1, true, 0, &retPos, &retLines, &retLineStart, &retLineEnd); if (retPos >= buf->length()) { if (retPos != retLineEnd) nLines++; break; } else lineStart = retPos; nLines++; if (lineStart > pos + nDeleted && buf->character(lineStart-1) == '\n') { break; } /* Unlike in the findWrapRange() function above, we don't try to resync with the line starts, because we don't know the length of the inserted text yet, nor the updated style information. Because of that, we also shouldn't resync with the line starts after the modification either, because we must perform the calculations for the deleted and inserted lines in the same way. This can result in some unnecessary recalculation and redrawing overhead, and therefore we should only use this two-phase mode of calculation when it's really needed (continuous wrap + variable font width). */ } mNLinesDeleted = nLines; mSuppressResync = 1; } /* ** Count forward from startPos to either maxPos or maxLines (whichever is ** reached first), and return all relevant positions and line count. ** The provided textBuffer may differ from the actual text buffer of the ** widget. In that case it must be a (partial) copy of the actual text buffer ** and the styleBufOffset argument must indicate the starting position of the ** copy, to take into account the correct style information. ** ** Returned values: ** ** retPos: Position where counting ended. When counting lines, the ** position returned is the start of the line "maxLines" ** lines beyond "startPos". ** retLines: Number of line breaks counted ** retLineStart: Start of the line where counting ended ** retLineEnd: End position of the last line traversed */ void Fl_Text_Display_mod::wrapped_line_counter(Fl_Text_Buffer_mod*buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine) { int lineStart, newLineStart = 0, b, p, colNum, wrapMargin; int maxWidth, i, foundBreak, width; bool countPixels; int nLines = 0, tabDist = buffer()->tab_distance(); unsigned char c; char nullSubsChar = buffer()->null_substitution_character(); /* If the font is fixed, or there's a wrap margin set, it's more efficient to measure in columns, than to count pixels. Determine if we can count in columns (countPixels == False) or must count pixels (countPixels == True), and set the wrap target for either pixels or columns */ if (mFixedFontWidth != -1 || mWrapMargin != 0) { countPixels = false; wrapMargin = mWrapMargin ? mWrapMargin : text_area.w / (mFixedFontWidth + 1); maxWidth = INT_MAX; } else { countPixels = true; wrapMargin = INT_MAX; maxWidth = text_area.w; } /* Find the start of the line if the start pos is not marked as a line start. */ if (startPosIsLineStart) lineStart = startPos; else lineStart = line_start(startPos); /* ** Loop until position exceeds maxPos or line count exceeds maxLines. ** (actually, contines beyond maxPos to end of line containing maxPos, ** in case later characters cause a word wrap back before maxPos) */ colNum = 0; width = 0; for (p=lineStart; p<buf->length(); p++) { c = (unsigned char)buf->character(p); /* If the character was a newline, count the line and start over, otherwise, add it to the width and column counts */ if (c == '\n') { if (p >= maxPos) { *retPos = maxPos; *retLines = nLines; *retLineStart = lineStart; *retLineEnd = maxPos; return; } nLines++; if (nLines >= maxLines) { *retPos = p + 1; *retLines = nLines; *retLineStart = p + 1; *retLineEnd = p; return; } lineStart = p + 1; colNum = 0; width = 0; } else { colNum += Fl_Text_Buffer_mod::character_width(c, colNum, tabDist, nullSubsChar); if (countPixels) width += measure_proportional_character(c, colNum, p+styleBufOffset); } /* If character exceeded wrap margin, find the break point and wrap there */ if (colNum > wrapMargin || width > maxWidth) { foundBreak = false; for (b=p; b>=lineStart; b--) { c = (unsigned char)buf->character(b); if (c == '\t' || c == ' ') { newLineStart = b + 1; if (countPixels) { colNum = 0; width = 0; for (i=b+1; i<p+1; i++) { width += measure_proportional_character( buf->character(i), colNum, i+styleBufOffset); colNum++; } } else colNum = buf->count_displayed_characters(b+1, p+1); foundBreak = true; break; } } if (!foundBreak) { /* no whitespace, just break at margin */ newLineStart = max(p, lineStart+1); colNum = Fl_Text_Buffer_mod::character_width(c, colNum, tabDist, nullSubsChar); if (countPixels) width = measure_proportional_character(c, colNum, p+styleBufOffset); } if (p >= maxPos) { *retPos = maxPos; *retLines = maxPos < newLineStart ? nLines : nLines + 1; *retLineStart = maxPos < newLineStart ? lineStart : newLineStart; *retLineEnd = maxPos; return; } nLines++; if (nLines >= maxLines) { *retPos = foundBreak ? b + 1 : max(p, lineStart+1); *retLines = nLines; *retLineStart = lineStart; *retLineEnd = foundBreak ? b : p; return; } lineStart = newLineStart; } } /* reached end of buffer before reaching pos or line target */ *retPos = buf->length(); *retLines = nLines; if (countLastLineMissingNewLine && colNum > 0) ++(*retLines); *retLineStart = lineStart; *retLineEnd = buf->length(); } /* ** Measure the width in pixels of a character "c" at a particular column ** "colNum" and buffer position "pos". This is for measuring characters in ** proportional or mixed-width highlighting fonts. ** ** A note about proportional and mixed-width fonts: the mixed width and ** proportional font code in nedit does not get much use in general editing, ** because nedit doesn't allow per-language-mode fonts, and editing programs ** in a proportional font is usually a bad idea, so very few users would ** choose a proportional font as a default. There are still probably mixed- ** width syntax highlighting cases where things don't redraw properly for ** insertion/deletion, though static display and wrapping and resizing ** should now be solid because they are now used for online help display. */ int Fl_Text_Display_mod::measure_proportional_character(char c, int colNum, int pos) { int charLen, style; char expChar[ FL_TEXT_MAX_EXP_CHAR_LEN ]; Fl_Text_Buffer_mod*styleBuf = mStyleBuffer; charLen = Fl_Text_Buffer_mod::expand_character(c, colNum, expChar, buffer()->tab_distance(), buffer()->null_substitution_character()); if (styleBuf == 0) { style = 0; } else { style = (unsigned char)styleBuf->character(pos); if (style == mUnfinishedStyle && mUnfinishedHighlightCB) { /* encountered "unfinished" style, trigger parsing */ (mUnfinishedHighlightCB)(pos, mHighlightCBArg); style = (unsigned char)styleBuf->character(pos); } } return string_width(expChar, charLen, style); } /* ** Finds both the end of the current line and the start of the next line. Why? ** In continuous wrap mode, if you need to know both, figuring out one from the ** other can be expensive or error prone. The problem comes when there's a ** trailing space or tab just before the end of the buffer. To translate an ** end of line value to or from the next lines start value, you need to know ** whether the trailing space or tab is being used as a line break or just a ** normal character, and to find that out would otherwise require counting all ** the way back to the beginning of the line. */ void Fl_Text_Display_mod::find_line_end(int startPos, bool startPosIsLineStart, int *lineEnd, int *nextLineStart) { int retLines, retLineStart; /* if we're not wrapping use more efficient BufEndOfLine */ if (!mContinuousWrap) { *lineEnd = buffer()->line_end(startPos); *nextLineStart = min(buffer()->length(), *lineEnd + 1); return; } /* use the wrapped line counter routine to count forward one line */ wrapped_line_counter(buffer(), startPos, buffer()->length(), 1, startPosIsLineStart, 0, nextLineStart, &retLines, &retLineStart, lineEnd); return; } /* ** Line breaks in continuous wrap mode usually happen at newlines or ** whitespace. This line-terminating character is not included in line ** width measurements and has a special status as a non-visible character. ** However, lines with no whitespace are wrapped without the benefit of a ** line terminating character, and this distinction causes endless trouble ** with all of the text display code which was originally written without ** continuous wrap mode and always expects to wrap at a newline character. ** ** Given the position of the end of the line, as returned by TextDEndOfLine ** or BufEndOfLine, this returns true if there is a line terminating ** character, and false if there's not. On the last character in the ** buffer, this function can't tell for certain whether a trailing space was ** used as a wrap point, and just guesses that it wasn't. So if an exact ** accounting is necessary, don't use this function. */ int Fl_Text_Display_mod::wrap_uses_character(int lineEndPos) { char c; if (!mContinuousWrap || lineEndPos == buffer()->length()) return 1; c = buffer()->character(lineEndPos); return c == '\n' || ((c == '\t' || c == ' ') && lineEndPos + 1 != buffer()->length()); } /* ** Return true if the selection "sel" is rectangular, and touches a ** buffer position withing "rangeStart" to "rangeEnd" */ int Fl_Text_Display_mod::range_touches_selection(Fl_Text_Selection *sel, int rangeStart, int rangeEnd) { return sel->selected() && sel->rectangular() && sel->end() >= rangeStart && sel->start() <= rangeEnd; } /* ** Extend the range of a redraw request (from *start to *end) with additional ** redraw requests resulting from changes to the attached style buffer (which ** contains auxiliary information for coloring or styling text). */ void Fl_Text_Display_mod::extend_range_for_styles( int *startpos, int *endpos ) { Fl_Text_Selection * sel = mStyleBuffer->primary_selection(); int extended = 0; /* The peculiar protocol used here is that modifications to the style buffer are marked by selecting them with the buffer's primary Fl_Text_Selection. The style buffer is usually modified in response to a modify callback on the text buffer BEFORE Fl_Text_Display.c's modify callback, so that it can keep the style buffer in step with the text buffer. The style-update callback can't just call for a redraw, because Fl_Text_Display hasn't processed the original text changes yet. Anyhow, to minimize redrawing and to avoid the complexity of scheduling redraws later, this simple protocol tells the text display's buffer modify callback to extend it's redraw range to show the text color/and font changes as well. */ if ( sel->selected() ) { if ( sel->start() < *startpos ) { *startpos = sel->start(); extended = 1; } if ( sel->end() > *endpos ) { *endpos = sel->end(); extended = 1; } } /* If the Fl_Text_Selection was extended due to a style change, and some of the fonts don't match in spacing, extend redraw area to end of line to redraw characters exposed by possible font size changes */ if ( mFixedFontWidth == -1 && extended ) *endpos = mBuffer->line_end( *endpos ) + 1; } // The draw() method. It tries to minimize what is draw as much as possible. void Fl_Text_Display_mod::draw(void) { // don't even try if there is no associated text buffer! if (!buffer()) { draw_box(); return; } fl_push_clip(x(),y(),w(),h()); // prevent drawing outside widget area // draw the non-text, non-scrollbar areas. if (damage() & FL_DAMAGE_ALL) { // printf("drawing all (box = %d)\n", box()); // draw the box() int W = w(), H = h(); draw_box(box(), x(), y(), W, H, color()); if (mHScrollBar->visible()) W -= scrollbar_width(); if (mVScrollBar->visible()) H -= scrollbar_width(); // left margin fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN, LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // right margin fl_rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN, RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN, color()); // top margin fl_rectf(text_area.x, text_area.y-TOP_MARGIN, text_area.w, TOP_MARGIN, color()); // bottom margin fl_rectf(text_area.x, text_area.y+text_area.h, text_area.w, BOTTOM_MARGIN, color()); // draw that little box in the corner of the scrollbars if (mVScrollBar->visible() && mHScrollBar->visible()) fl_rectf(mVScrollBar->x(), mHScrollBar->y(), mVScrollBar->w(), mHScrollBar->h(), FL_GRAY); // blank the previous cursor protrusions } else if (damage() & (FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)) { // printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY); // CET - FIXME - save old cursor position instead and just draw side needed? fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); fl_rectf(text_area.x-LEFT_MARGIN, mCursorOldY, LEFT_MARGIN, mMaxsize, color()); fl_rectf(text_area.x+text_area.w, mCursorOldY, RIGHT_MARGIN, mMaxsize, color()); fl_pop_clip(); } // draw the scrollbars if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_CHILD)) { mVScrollBar->damage(FL_DAMAGE_ALL); mHScrollBar->damage(FL_DAMAGE_ALL); } update_child(*mVScrollBar); update_child(*mHScrollBar); // draw all of the text if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_EXPOSE)) { //printf("drawing all text\n"); int X, Y, W, H; if (fl_clip_box(text_area.x, text_area.y, text_area.w, text_area.h, X, Y, W, H)) { // Draw text using the intersected clipping box... // (this sets the clipping internally) draw_text(X, Y, W, H); } else { // Draw the whole area... draw_text(text_area.x, text_area.y, text_area.w, text_area.h); } } else if (damage() & FL_DAMAGE_SCROLL) { // draw some lines of text fl_push_clip(text_area.x, text_area.y, text_area.w, text_area.h); //printf("drawing text from %d to %d\n", damage_range1_start, damage_range1_end); draw_range(damage_range1_start, damage_range1_end); if (damage_range2_end != -1) { //printf("drawing text from %d to %d\n", damage_range2_start, damage_range2_end); draw_range(damage_range2_start, damage_range2_end); } damage_range1_start = damage_range1_end = -1; damage_range2_start = damage_range2_end = -1; fl_pop_clip(); } // draw the text cursor if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && !buffer()->primary_selection()->selected() && mCursorOn && Fl::focus() == this ) { fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, text_area.w+LEFT_MARGIN+RIGHT_MARGIN, text_area.h); int X, Y; if (position_to_xy(mCursorPos, &X, &Y)) draw_cursor(X, Y); // else puts("position_to_xy() failed - unable to draw cursor!"); //printf("drew cursor at pos: %d (%d,%d)\n", mCursorPos, X, Y); mCursorOldY = Y; fl_pop_clip(); } fl_pop_clip(); } // this processes drag events due to mouse for Fl_Text_Display and // also drags due to cursor movement with shift held down for // Fl_Text_Editor void fl_text_drag_me(int pos, Fl_Text_Display_mod* d) { if (d->dragType == Fl_Text_Display_mod::DRAG_CHAR) { if (pos >= d->dragPos) { d->buffer()->select(d->dragPos, pos); } else { d->buffer()->select(pos, d->dragPos); } d->insert_position(pos); } else if (d->dragType == Fl_Text_Display_mod::DRAG_WORD) { if (pos >= d->dragPos) { d->insert_position(d->word_end(pos)); d->buffer()->select(d->word_start(d->dragPos), d->word_end(pos)); } else { d->insert_position(d->word_start(pos)); d->buffer()->select(d->word_start(pos), d->word_end(d->dragPos)); } } else if (d->dragType == Fl_Text_Display_mod::DRAG_LINE) { if (pos >= d->dragPos) { d->insert_position(d->buffer()->line_end(pos)+1); d->buffer()->select(d->buffer()->line_start(d->dragPos), d->buffer()->line_end(pos)+1); } else { d->insert_position(d->buffer()->line_start(pos)); d->buffer()->select(d->buffer()->line_start(pos), d->buffer()->line_end(d->dragPos)+1); } } } // This timer event scrolls the text view proportionally to // how far the mouse pointer has left the text area. This // allows for smooth scrolling without "wiggeling" the mouse. void Fl_Text_Display_mod::scroll_timer_cb(void *user_data) { Fl_Text_Display_mod *w = (Fl_Text_Display_mod*)user_data; int pos; switch (scroll_direction) { case 1: // mouse is to the right, scroll left w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x + w->text_area.w, scroll_y, CURSOR_POS); break; case 2: // mouse is to the left, scroll right w->scroll(w->mTopLineNum, w->mHorizOffset + scroll_amount); pos = w->xy_to_position(w->text_area.x, scroll_y, CURSOR_POS); break; case 3: // mouse is above, scroll down w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y, CURSOR_POS); break; case 4: // mouse is below, scroll up w->scroll(w->mTopLineNum + scroll_amount, w->mHorizOffset); pos = w->xy_to_position(scroll_x, w->text_area.y + w->text_area.h, CURSOR_POS); break; default: return; } fl_text_drag_me(pos, w); Fl::repeat_timeout(.1, scroll_timer_cb, user_data); } int Fl_Text_Display_mod::handle(int event) { if (!buffer()) return 0; // This isn't very elegant! if (!Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) && !dragging && event != FL_LEAVE && event != FL_ENTER && event != FL_MOVE && event != FL_FOCUS && event != FL_UNFOCUS && event != FL_KEYBOARD && event != FL_KEYUP) { return Fl_Group::handle(event); } switch (event) { case FL_ENTER: case FL_MOVE: if (active_r()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_LEAVE: case FL_HIDE: if (active_r() && window()) { window()->cursor(FL_CURSOR_DEFAULT); return 1; } else { return 0; } case FL_PUSH: { if (active_r() && window()) { if (Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h)) window()->cursor(FL_CURSOR_INSERT); else window()->cursor(FL_CURSOR_DEFAULT); } if (Fl::focus() != this) { Fl::focus(this); handle(FL_FOCUS); } if (Fl_Group::handle(event)) return 1; if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG); dragging = 1; int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); dragType = Fl::event_clicks(); dragPos = pos; if (dragType == DRAG_CHAR) buffer()->unselect(); else if (dragType == DRAG_WORD) buffer()->select(word_start(pos), word_end(pos)); else if (dragType == DRAG_LINE) buffer()->select(buffer()->line_start(pos), buffer()->line_end(pos)+1); if (buffer()->primary_selection()->selected()) insert_position(buffer()->primary_selection()->end()); else insert_position(pos); show_insert_position(); return 1; } case FL_DRAG: { if (dragType < 0) return 1; int X = Fl::event_x(), Y = Fl::event_y(), pos; // if we leave the text_area, we start a timer event // that will take care of scrolling and selecting if (Y < text_area.y) { scroll_x = X; scroll_amount = (Y - text_area.y) / 5 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 3; } else if (Y >= text_area.y+text_area.h) { scroll_x = X; scroll_amount = (Y - text_area.y - text_area.h) / 5 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 4; } else if (X < text_area.x) { scroll_y = Y; scroll_amount = (X - text_area.x) / 2 - 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 2; } else if (X >= text_area.x+text_area.w) { scroll_y = Y; scroll_amount = (X - text_area.x - text_area.w) / 2 + 1; if (!scroll_direction) { Fl::add_timeout(.01, scroll_timer_cb, this); } scroll_direction = 1; } else { if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } pos = xy_to_position(X, Y, CURSOR_POS); fl_text_drag_me(pos, this); } return 1; } case FL_RELEASE: { dragging = 0; if (scroll_direction) { Fl::remove_timeout(scroll_timer_cb, this); scroll_direction = 0; } // convert from WORD or LINE selection to CHAR if (insert_position() >= dragPos) dragPos = buffer()->primary_selection()->start(); else dragPos = buffer()->primary_selection()->end(); dragType = DRAG_CHAR; const char* copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 0); free((void*)copy); return 1; } case FL_MOUSEWHEEL: if (Fl::event_dy()) return mVScrollBar->handle(event); else return mHScrollBar->handle(event); case FL_UNFOCUS: if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT); case FL_FOCUS: if (buffer()->selected()) redraw(); return 1; case FL_KEYBOARD: // Copy? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='c') { if (!buffer()->selected()) return 1; const char *copy = buffer()->selection_text(); if (*copy) Fl::copy(copy, strlen(copy), 1); free((void*)copy); return 1; } // Select all ? if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='a') { buffer()->select(0,buffer()->length()); return 1; } if (mVScrollBar->handle(event)) return 1; if (mHScrollBar->handle(event)) return 1; break; } return 0; } // // End of "$Id: Fl_Text_Display.cxx 5848 2007-05-20 16:18:31Z mike $". // ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/widgets/Fl_Native_File_Chooser_WIN32.cxx�������������������������������������������0000664�0001750�0001750�00000053351�12330516146�017770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Fl_Native_File_Chooser_WIN32.cxx -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // API changes + filter improvements by Nathan Vander Wilt 2005 // FLTK2/WIN32 port by Greg Ercolano // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> // debugging #include "flnfc_common.cxx" // strnew/strfree/strapp/chrcat #define FLTK1 #ifdef FLTK1 // // FLTK1 // #include <FL/Fl_Native_File_Chooser.H> #define FNFC_CLASS Fl_Native_File_Chooser #define FNFC_CTOR Fl_Native_File_Chooser #else // // FLTK2 // #include <fltk/NativeFileChooser.h> #include <fltk/run.h> #define FNFC_CTOR NativeFileChooser #define FNFC_CLASS fltk::FNFC_CTOR #endif #define LCURLY_CHR '{' #define RCURLY_CHR '}' #define LBRACKET_CHR '[' #define RBRACKET_CHR ']' #define MAXFILTERS 80 #if 0 // STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG) static void dnullprint(char *wp) { if ( ! wp ) return; for ( int t=0; true; t++ ) { if ( wp[t] == '\0' && wp[t+1] == '\0' ) { printf("\\0\\0"); fflush(stdout); return; } else if ( wp[t] == '\0' ) { printf("\\0"); } else { printf("%c",wp[t]); } } } #endif // RETURN LENGTH OF DOUBLENULL STRING // Includes single nulls in count, excludes trailing doublenull. // // 1234 567 // |||/\||| // IN: "one\0two\0\0" // OUT: 7 // static int dnulllen(const char *wp) { int len = 0; while ( ! ( *(wp+0) == 0 && *(wp+1) == 0 ) ) { ++wp; ++len; } return(len); } // STATIC: Append a string to another, leaving terminated with DOUBLE NULL. // Automatically handles extending length of string. // wp can be NULL (a new wp will be allocated and initialized). // string must be NULL terminated. // The pointer wp may be modified on return. // static void dnullcat(char*&wp, const char *string, int n = -1 ) { //DEBUG printf("DEBUG: dnullcat IN: <"); dnullprint(wp); printf(">\n"); int inlen = ( n < 0 ) ? strlen(string) : n; if ( ! wp ) { wp = new char[inlen + 4]; *(wp+0) = '\0'; *(wp+1) = '\0'; } else { int wplen = dnulllen(wp); // Make copy of wp into larger buffer char *tmp = new char[wplen + inlen + 4]; memcpy(tmp, wp, wplen+2); // copy of wp plus doublenull delete [] wp; // delete old wp wp = tmp; // use new copy //DEBUG printf("DEBUG: dnullcat COPY: <"); dnullprint(wp); printf("> (wplen=%d)\n", wplen); } // Find end of double null string // *wp2 is left pointing at second null. // char *wp2 = wp; if ( *(wp2+0) != '\0' && *(wp2+1) != '\0' ) { for ( ; 1; wp2++ ) if ( *(wp2+0) == '\0' && *(wp2+1) == '\0' ) { wp2++; break; } } if ( n == -1 ) n = strlen(string); strncpy(wp2, string, n); // Leave string double-null terminated *(wp2+n+0) = '\0'; *(wp2+n+1) = '\0'; //DEBUG printf("DEBUG: dnullcat OUT: <"); dnullprint(wp); printf(">\n\n"); } // CTOR FNFC_CLASS::FNFC_CTOR(int val) { _btype = val; _options = NO_OPTIONS; memset((void*)&_ofn, 0, sizeof(OPENFILENAME)); _ofn.lStructSize = sizeof(OPENFILENAME); _ofn.hwndOwner = NULL; memset((void*)&_binf, 0, sizeof(BROWSEINFO)); _pathnames = NULL; _tpathnames = 0; _directory = NULL; _title = NULL; _filter = NULL; _parsedfilt = NULL; _nfilters = 0; _preset_file = NULL; _errmsg = NULL; } // DTOR FNFC_CLASS::~FNFC_CTOR() { //_pathnames // managed by clear_pathnames() //_tpathnames // managed by clear_pathnames() _directory = strfree(_directory); _title = strfree(_title); _filter = strfree(_filter); //_parsedfilt // managed by clear_filters() //_nfilters // managed by clear_filters() _preset_file = strfree(_preset_file); _errmsg = strfree(_errmsg); clear_filters(); clear_pathnames(); ClearOFN(); ClearBINF(); } // SET TYPE OF BROWSER void FNFC_CLASS::type(int val) { _btype = val; } // GET TYPE OF BROWSER int FNFC_CLASS::type() const { return( _btype ); } // SET OPTIONS void FNFC_CLASS::options(int val) { _options = val; } // GET OPTIONS int FNFC_CLASS::options() const { return(_options); } // PRIVATE: SET ERROR MESSAGE void FNFC_CLASS::errmsg(const char *val) { _errmsg = strfree(_errmsg); _errmsg = strnew(val); } // FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS void FNFC_CLASS::clear_pathnames() { if ( _pathnames ) { while ( --_tpathnames >= 0 ) { _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]); } delete [] _pathnames; _pathnames = NULL; } _tpathnames = 0; } // SET A SINGLE PATHNAME void FNFC_CLASS::set_single_pathname(const char *s) { clear_pathnames(); _pathnames = new char*[1]; _pathnames[0] = strnew(s); _tpathnames = 1; } // ADD PATHNAME TO EXISTING ARRAY void FNFC_CLASS::add_pathname(const char *s) { if ( ! _pathnames ) { // Create first element in array ++_tpathnames; _pathnames = new char*[_tpathnames]; } else { // Grow array by 1 char **tmp = new char*[_tpathnames+1]; // create new buffer memcpy((void*)tmp, (void*)_pathnames, sizeof(char*)*_tpathnames); // copy old delete [] _pathnames; // delete old _pathnames = tmp; // use new ++_tpathnames; } _pathnames[_tpathnames-1] = strnew(s); } // FREE A PIDL (Pointer to IDentity List) void FNFC_CLASS::FreePIDL(ITEMIDLIST *pidl) { IMalloc *imalloc = NULL; if ( SUCCEEDED(SHGetMalloc(&imalloc)) ) { imalloc->Free(pidl); imalloc->Release(); imalloc = NULL; } } // CLEAR MICROSOFT OFN (OPEN FILE NAME) CLASS void FNFC_CLASS::ClearOFN() { // Free any previously allocated lpstrFile before zeroing out _ofn if ( _ofn.lpstrFile ) { _ofn.lpstrFile = strfree((char*)_ofn.lpstrFile); } if ( _ofn.lpstrInitialDir ) { _ofn.lpstrInitialDir = (LPCSTR)strfree((char*)_ofn.lpstrInitialDir); } _ofn.lpstrFilter = NULL; // (deleted elsewhere) int temp = _ofn.nFilterIndex; // keep the filter_value memset((void*)&_ofn, 0, sizeof(_ofn)); _ofn.lStructSize = sizeof(OPENFILENAME); _ofn.nFilterIndex = temp; } // CLEAR MICROSOFT BINF (BROWSER INFO) CLASS void FNFC_CLASS::ClearBINF() { if ( _binf.pidlRoot ) { FreePIDL((ITEMIDLIST*)_binf.pidlRoot); _binf.pidlRoot = NULL; } memset((void*)&_binf, 0, sizeof(_binf)); } // CONVERT WINDOWS BACKSLASHES TO UNIX FRONTSLASHES void FNFC_CLASS::Win2Unix(char *s) { for ( ; *s; s++ ) if ( *s == '\\' ) *s = '/'; } // CONVERT UNIX FRONTSLASHES TO WINDOWS BACKSLASHES void FNFC_CLASS::Unix2Win(char *s) { for ( ; *s; s++ ) if ( *s == '/' ) *s = '\\'; } // SHOW FILE BROWSER int FNFC_CLASS::showfile() { ClearOFN(); clear_pathnames(); size_t fsize = 2048; _ofn.Flags |= OFN_NOVALIDATE; // prevent disabling of front slashes _ofn.Flags |= OFN_HIDEREADONLY; // hide goofy readonly flag // USE NEW BROWSER _ofn.Flags |= OFN_EXPLORER; // use newer explorer windows _ofn.Flags |= OFN_ENABLESIZING; // allow window to be resized (hey, why not?) // XXX: The docs for OFN_NOCHANGEDIR says the flag is 'ineffective' on XP/2K/NT! // But let's set it anyway.. // _ofn.Flags |= OFN_NOCHANGEDIR; // prevent dialog for messing up the cwd switch ( _btype ) { case BROWSE_DIRECTORY: case BROWSE_MULTI_DIRECTORY: case BROWSE_SAVE_DIRECTORY: abort(); // never happens: handled by showdir() case BROWSE_FILE: fsize = 65536; // XXX: there must be a better way break; case BROWSE_MULTI_FILE: _ofn.Flags |= OFN_ALLOWMULTISELECT; fsize = 65536; // XXX: there must be a better way break; case BROWSE_SAVE_FILE: if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) { _ofn.Flags |= OFN_OVERWRITEPROMPT; } break; } // SPACE FOR RETURNED FILENAME _ofn.lpstrFile = new char[fsize]; _ofn.nMaxFile = fsize-1; _ofn.lpstrFile[0] = '\0'; _ofn.lpstrFile[1] = '\0'; // dnull // PARENT WINDOW _ofn.hwndOwner = GetForegroundWindow(); // DIALOG TITLE _ofn.lpstrTitle = _title ? _title : NULL; // FILTER _ofn.lpstrFilter = _parsedfilt ? _parsedfilt : NULL; // PRESET FILE // If set, supercedes _directory. See KB Q86920 for details // if ( _preset_file ) { size_t len = strlen(_preset_file); if ( len >= _ofn.nMaxFile ) { char msg[80]; sprintf(msg, "preset_file() filename is too long: %ld is >=%ld", (long)len, (long)fsize); return(-1); } strncpy(_ofn.lpstrFile, _preset_file, _ofn.nMaxFile); Unix2Win(_ofn.lpstrFile); _ofn.lpstrFile[len+0] = 0; // multiselect needs dnull _ofn.lpstrFile[len+1] = 0; } if ( _directory ) { // PRESET DIR // XXX: See KB Q86920 for doc bug: // http://support.microsoft.com/default.aspx?scid=kb;en-us;86920 // _ofn.lpstrInitialDir = strnew(_directory); Unix2Win((char*)_ofn.lpstrInitialDir); } // SAVE THE CURRENT DIRECTORY // XXX: Save the cwd because GetOpenFileName() is probably going to // change it, in spite of the OFN_NOCHANGEDIR flag, due to its docs // saying the flag is 'ineffective'. %^( // char oldcwd[MAX_PATH]; GetCurrentDirectory(MAX_PATH, oldcwd); oldcwd[MAX_PATH-1] = '\0'; // OPEN THE DIALOG WINDOW int err; if ( _btype == BROWSE_SAVE_FILE ) { err = GetSaveFileName(&_ofn); } else { err = GetOpenFileName(&_ofn); } if ( err == 0 ) { // EXTENDED ERROR CHECK int err = CommDlgExtendedError(); // CANCEL? if ( err == 0 ) return(1); // user hit 'cancel' // AN ERROR OCCURRED char msg[80]; sprintf(msg, "CommDlgExtendedError() code=%d", err); errmsg(msg); // XXX: RESTORE CWD if ( oldcwd[0] ) SetCurrentDirectory(oldcwd); return(-1); } // XXX: RESTORE CWD if ( oldcwd[0] ) { SetCurrentDirectory(oldcwd); } // PREPARE PATHNAMES FOR RETURN switch ( _btype ) { case BROWSE_FILE: case BROWSE_SAVE_FILE: set_single_pathname(_ofn.lpstrFile); Win2Unix(_pathnames[_tpathnames-1]); break; case BROWSE_MULTI_FILE: { // EXTRACT MULTIPLE FILENAMES const char *dirname = _ofn.lpstrFile; int dirlen = strlen(dirname); if ( dirlen > 0 ) { // WALK STRING SEARCHING FOR 'DOUBLE-NULL' // eg. "/dir/name\0foo1\0foo2\0foo3\0\0" // char pathname[2048]; for ( const char *s = _ofn.lpstrFile + dirlen + 1; *s; s+= (strlen(s)+1)) { strcpy(pathname, dirname); strcat(pathname, "\\"); strcat(pathname, s); add_pathname(pathname); Win2Unix(_pathnames[_tpathnames-1]); } } // XXX // Work around problem where pasted forward-slash pathname // into the file browser causes new "Explorer" interface // not to grok forward slashes, passing back as a 'filename'..! // if ( _tpathnames == 0 ) { add_pathname(dirname); Win2Unix(_pathnames[_tpathnames-1]); } break; } case BROWSE_DIRECTORY: case BROWSE_MULTI_DIRECTORY: case BROWSE_SAVE_DIRECTORY: abort(); // never happens: handled by showdir() } return(0); } // Used by SHBrowseForFolder(), sets initial selected dir. // Ref: Usenet: microsoft.public.vc.mfc, Dec 8 2000, 1:38p David Lowndes // Subject: How to specify to select an initial folder .." // int CALLBACK FNFC_CLASS::Dir_CB(HWND win, UINT msg, LPARAM param, LPARAM data) { switch (msg) { case BFFM_INITIALIZED: if (data) ::SendMessage(win, BFFM_SETSELECTION, TRUE, data); break; case BFFM_SELCHANGED: TCHAR path[MAX_PATH]; if ( SHGetPathFromIDList((ITEMIDLIST*)param, path) ) { ::SendMessage(win, BFFM_ENABLEOK, 0, 1); } else { //disable ok button if not a path ::SendMessage(win, BFFM_ENABLEOK, 0, 0); } break; case BFFM_VALIDATEFAILED: // we could pop up an annoying message here. // also needs set ulFlags |= BIF_VALIDATE break; default: break; } return(0); } // SHOW DIRECTORY BROWSER int FNFC_CLASS::showdir() { OleInitialize(NULL); // init needed by BIF_USENEWUI ClearBINF(); clear_pathnames(); // PARENT WINDOW _binf.hwndOwner = GetForegroundWindow(); // DIALOG TITLE _binf.lpszTitle = _title ? _title : NULL; // FLAGS _binf.ulFlags = 0; // initialize // TBD: make sure matches to runtime system, if need be. //( what if _WIN32_IE doesn't match system? does the program not run? ) // TBD: match all 3 types of directories #if defined(BIF_NONEWFOLDERBUTTON) // Version 6.0 if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_NONEWFOLDERBUTTON; _binf.ulFlags |= BIF_USENEWUI | BIF_SHAREABLE | BIF_RETURNONLYFSDIRS; #elif defined(BIF_USENEWUI) // Version 5.0 if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_EDITBOX; else if ( _btype == BROWSE_SAVE_DIRECTORY ) _binf.ulFlags |= BIF_USENEWUI; _binf.ulFlags |= BIF_SHAREABLE | BIF_RETURNONLYFSDIRS; #elif defined(BIF_EDITBOX) // Version 4.71 _binf.ulFlags |= BIF_RETURNONLYFSDIRS | BIF_EDITBOX; #else // Version Old _binf.ulFlags |= BIF_RETURNONLYFSDIRS; #endif // BUFFER char displayname[MAX_PATH]; _binf.pszDisplayName = displayname; // PRESET DIR char presetname[MAX_PATH]; if ( _directory ) { strcpy(presetname, _directory); Unix2Win(presetname); _binf.lParam = (LPARAM)presetname; } else _binf.lParam = 0; _binf.lpfn = Dir_CB; // OPEN BROWSER ITEMIDLIST *pidl = SHBrowseForFolder(&_binf); // CANCEL? if ( pidl == NULL ) return(1); // GET THE PATHNAME(S) THE USER SELECTED // TBD: expand NetHood shortcuts from this PIDL?? // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp TCHAR path[MAX_PATH]; if ( SHGetPathFromIDList(pidl, path) ) { Win2Unix(path); add_pathname(path); } FreePIDL(pidl); if ( !strlen(path) ) return(1); // don't return empty pathnames return(0); } // RETURNS: // 0 - user picked a file // 1 - user cancelled // -1 - failed; errmsg() has reason // int FNFC_CLASS::show() { if ( _btype == BROWSE_DIRECTORY || _btype == BROWSE_MULTI_DIRECTORY || _btype == BROWSE_SAVE_DIRECTORY ) { return(showdir()); } else { return(showfile()); } } // RETURN ERROR MESSAGE const char *FNFC_CLASS::errmsg() const { return(_errmsg ? _errmsg : "No error"); } // GET FILENAME const char* FNFC_CLASS::filename() const { if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]); return(""); } // GET FILENAME FROM LIST OF FILENAMES const char* FNFC_CLASS::filename(int i) const { if ( _pathnames && i < _tpathnames ) return(_pathnames[i]); return(""); } // GET TOTAL FILENAMES CHOSEN int FNFC_CLASS::count() const { return(_tpathnames); } // PRESET PATHNAME // Can be NULL if no preset is desired. // void FNFC_CLASS::directory(const char *val) { _directory = strfree(_directory); _directory = strnew(val); } // GET PRESET PATHNAME // Can return NULL if none set. // const char *FNFC_CLASS::directory() const { return(_directory); } // SET TITLE // Can be NULL if no title desired. // void FNFC_CLASS::title(const char *val) { _title = strfree(_title); _title = strnew(val); } // GET TITLE // Can return NULL if none set. // const char *FNFC_CLASS::title() const { return(_title); } // SET FILTER // Can be NULL if no filter needed // void FNFC_CLASS::filter(const char *val) { _filter = strfree(_filter); clear_filters(); if ( val ) { _filter = strnew(val); parse_filter(_filter); } add_filter("All Files", "*.*"); // always include 'all files' option #ifdef DEBUG nullprint(_parsedfilt); #endif /*DEBUG*/ } // GET FILTER // Can return NULL if none set. // const char *FNFC_CLASS::filter() const { return(_filter); } // CLEAR FILTERS void FNFC_CLASS::clear_filters() { _nfilters = 0; _parsedfilt = strfree(_parsedfilt); } // ADD A FILTER void FNFC_CLASS::add_filter( const char *name_in, // name of filter (optional: can be null) const char *winfilter // windows style filter (eg. "*.cxx;*.h") ) { // No name? Make one.. char name[1024]; if ( !name_in || name_in[0] == '\0' ) { sprintf(name, "%.*s Files", sizeof(name)-10, winfilter); } else { sprintf(name, "%.*s", sizeof(name)-10, name_in); } dnullcat(_parsedfilt, name); dnullcat(_parsedfilt, winfilter); _nfilters++; //DEBUG printf("DEBUG: ADD FILTER name=<%s> winfilter=<%s>\n", name, winfilter); } // CONVERT FLTK STYLE PATTERN MATCHES TO WINDOWS 'DOUBLENULL' PATTERN // Handles: // IN OUT // ----------- ----------------------------- // *.{ma,mb} "*.{ma,mb} Files\0*.ma;*.mb\0\0" // *.[abc] "*.[abc] Files\0*.a;*.b;*.c\0\0" // *.txt "*.txt Files\0*.txt\0\0" // C Files\t*.[ch] "C Files\0*.c;*.h\0\0" // // Example: // IN: "*.{ma,mb}" // OUT: "*.ma;*.mb Files\0*.ma;*.mb\0All Files\0*.*\0\0" // --------------- --------- --------- --- // | | | | // Title Wildcards Title Wildcards // // Parsing Mode: // IN:"C Files\t*.{cxx,h}" // ||||||| ||||||||| // mode: nnnnnnn ww{{{{{{{ // \_____/ \_______/ // Name Wildcard // void FNFC_CLASS::parse_filter(const char *in) { clear_filters(); if ( ! in ) return; int has_name = strchr(in, '\t') ? 1 : 0; char mode = has_name ? 'n' : 'w'; // parse mode: n=name, w=wildcard int nwildcards = 0; char wildcards[MAXFILTERS][1024]; // parsed wildcards (can be several) char wildprefix[512] = ""; char name[512] = ""; // Init int t; for ( t=0; t<MAXFILTERS; t++ ) { wildcards[t][0] = '\0'; } // Parse for ( ; 1; in++ ) { //// DEBUG //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildprefix=<%s> nwildcards=%d wildcards[n]=<%s>\n", //// *in, mode, name, wildprefix, nwildcards, wildcards[nwildcards]); switch (*in) { case ',': case '|': if ( mode == LCURLY_CHR ) { // create new wildcard, copy in prefix strcat(wildcards[nwildcards++], wildprefix); continue; } else { goto regchar; } continue; // FINISHED PARSING A NAME? case '\t': if ( mode != 'n' ) goto regchar; // finish parsing name? switch to wildcard mode mode = 'w'; break; // ESCAPE NEXT CHAR case '\\': ++in; goto regchar; // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS? case '\r': case '\n': case '\0': { if ( mode == 'w' ) { // finished parsing wildcard? if ( nwildcards == 0 ) { strcpy(wildcards[nwildcards++], wildprefix); } // Append wildcards in Microsoft's "*.one;*.two" format char comp[4096] = ""; for ( t=0; t<nwildcards; t++ ) { if ( t != 0 ) strcat(comp, ";"); strcat(comp, wildcards[t]); } // Add if not empty if ( comp[0] ) { add_filter(name, comp); } } // RESET for ( t=0; t<MAXFILTERS; t++ ) { wildcards[t][0] = '\0'; } nwildcards = 0; wildprefix[0] = name[0] = '\0'; mode = strchr(in,'\t') ? 'n' : 'w'; // DONE? if ( *in == '\0' ) return; // done continue; // not done yet, more filters } // STARTING A WILDCARD? case LBRACKET_CHR: case LCURLY_CHR: mode = *in; if ( *in == LCURLY_CHR ) { // create new wildcard strcat(wildcards[nwildcards++], wildprefix); } continue; // ENDING A WILDCARD? case RBRACKET_CHR: case RCURLY_CHR: mode = 'w'; // back to wildcard mode continue; // ALL OTHER NON-SPECIAL CHARACTERS default: regchar: // handle regular char switch ( mode ) { case LBRACKET_CHR: // create new wildcard ++nwildcards; // copy in prefix strcpy(wildcards[nwildcards-1], wildprefix); // append search char chrcat(wildcards[nwildcards-1], *in); continue; case LCURLY_CHR: if ( nwildcards > 0 ) { chrcat(wildcards[nwildcards-1], *in); } continue; case 'n': chrcat(name, *in); continue; case 'w': chrcat(wildprefix, *in); for ( t=0; t<nwildcards; t++ ) { chrcat(wildcards[t], *in); } continue; } break; } } } // SET 'CURRENTLY SELECTED FILTER' void FNFC_CLASS::filter_value(int i) { _ofn.nFilterIndex = i + 1; } // RETURN VALUE OF 'CURRENTLY SELECTED FILTER' int FNFC_CLASS::filter_value() const { return(_ofn.nFilterIndex ? _ofn.nFilterIndex-1 : _nfilters+1); } // PRESET FILENAME FOR 'SAVE AS' CHOOSER void FNFC_CLASS::preset_file(const char* val) { _preset_file = strfree(_preset_file); _preset_file = strnew(val); } // GET PRESET FILENAME FOR 'SAVE AS' CHOOSER const char* FNFC_CLASS::preset_file() const { return(_preset_file); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/config.h���������������������������������������������������������������������������0000664�0001750�0001750�00000015462�12516663374�012057� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* src/config.h. Generated from config.h.in by configure. */ /* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #define BUILD_BUILD_PLATFORM "i686-pc-linux-gnu" /* Compiler */ #define BUILD_COMPILER "gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) " /* Configure arguments */ #define BUILD_CONFIGURE_ARGS "" /* Build date */ #define BUILD_DATE "Sat Apr 25 05:05:47 CDT 2015" /* Build host */ #define BUILD_HOST "dave-acer" /* Host platform */ #define BUILD_HOST_PLATFORM "i686-pc-linux-gnu" /* Target platform */ #define BUILD_TARGET_PLATFORM "i686-pc-linux-gnu" /* Build user */ #define BUILD_USER "dave" /* FLMSG compiler flags */ #define FLMSG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG" /* FLMSG linker flags */ #define FLMSG_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXext -lXft -lfontconfig -lpthread -ldl -lm -lX11 -lX11 -ldl -lrt -lpthread" /* FLTK API major version */ #define FLMSG_FLTK_API_MAJOR 1 /* FLTK API minor version */ #define FLMSG_FLTK_API_MINOR 3 /* FLTK API patch */ #define FLMSG_FLTK_API_PATCH 1 /* version string */ #define FLMSG_VERSION "2.0.10" /* major version number */ #define FLMSG_VERSION_MAJOR 2 /* minor version number */ #define FLMSG_VERSION_MINOR 0 /* patch/alpha version string */ #define FLMSG_VERSION_PATCH ".10" /* FLTK version */ #define FLTK_BUILD_VERSION "1.3.1" /* flxmlrpc version */ #define FLXMLRPC_BUILD_VERSION "" /* Define to 1 if we have clock_gettime */ #define HAVE_CLOCK_GETTIME 1 /* Define to 0 if not using dbg::stack */ /* #undef HAVE_DBG_STACK */ /* Define to 1 if we have dlopen */ #define HAVE_DLOPEN 1 /* Define to 1 if you have the `getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `gethostbyname' function. */ #define HAVE_GETHOSTBYNAME 1 /* Define to 1 if you have the `gmtime_r' function. */ #define HAVE_GMTIME_R 1 /* Define to 1 if you have the `hstrerror' function. */ #define HAVE_HSTRERROR 1 /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `localtime_r' function. */ #define HAVE_LOCALTIME_R 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkdir' function. */ #define HAVE_MKDIR 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if we have sem_timedwait */ #define HAVE_SEM_TIMEDWAIT 1 /* Define to 1 if we have sem_unlink */ #define HAVE_SEM_UNLINK 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 /* Define to 1 if you have the `socketpair' function. */ #define HAVE_SOCKETPAIR 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strcasestr' function. */ #define HAVE_STRCASESTR 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlcpy' function. */ /* #undef HAVE_STRLCPY */ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `uname' function. */ #define HAVE_UNAME 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #define HAVE_UNSETENV 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Name of package */ #define PACKAGE "flmsg" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "w1hkj AT w1hkj DOT com" /* Define to the full name of this package. */ #define PACKAGE_NAME "FLMSG" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "FLMSG 2.0.10" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "flmsg" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.0.10" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if we are using flxmlrpc */ #define USE_FLXMLRPC 0 /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Define to 1 if we are using x */ #define USE_X 1 /* Version number of package */ #define VERSION "2.0.10" /* x version */ #define X_BUILD_VERSION "1.4.99.1" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to 1 if we are building on mingw */ /* #undef __WOE32__ */ /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/�������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011270� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics203_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000134203�12330516146�013553� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics203 = (Fl_Group *)0; Fl_Tabs *tab_ics203_type = (Fl_Tabs *)0; Fl_Group *tab_203_1 = (Fl_Group *)0; Fl_Input2 *txt_203_incident = (Fl_Input2 *)0; Fl_Input2 *txt_203_date = (Fl_Input2 *)0; Fl_Button *btn_203_date = (Fl_Button *)0; Fl_Input2 *txt_203_time = (Fl_Input2 *)0; Fl_Button *btn_203_time = (Fl_Button *)0; Fl_Input2 *txt_203_op_period = (Fl_Input2 *)0; Fl_Input2 *txt_203_incident_commander = (Fl_Input2 *)0; Fl_Input2 *txt_203_incident_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_incident_safety_officer = (Fl_Input2 *)0; Fl_Input2 *txt_203_incident_info_officer = (Fl_Input2 *)0; Fl_Input2 *txt_203_liaison_officer = (Fl_Input2 *)0; Fl_Input2 *txt_203_prepared_by = (Fl_Input2 *)0; Fl_Group *tab_203_agency = (Fl_Group *)0; Fl_Input2 *txt_203_agency[7]={(Fl_Input2 *)0}; Fl_Input2 *txt_203_agency_name[7]={(Fl_Input2 *)0}; Fl_Group *tab_203_planning = (Fl_Group *)0; Fl_Input2 *txt_203_planning_chief = (Fl_Input2 *)0; Fl_Input2 *txt_203_planning_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_resources_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_situation_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_documentation_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_demobilization_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_tech_spc[3]={(Fl_Input2 *)0}; Fl_Group *tab_203_logistics = (Fl_Group *)0; Fl_Input2 *txt_203_logistics_chief = (Fl_Input2 *)0; Fl_Input2 *txt_203_logistics_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_support_director = (Fl_Input2 *)0; Fl_Input2 *txt_203_supply_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_facilities_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_ground_support = (Fl_Input2 *)0; Fl_Input2 *txt_203_service_director = (Fl_Input2 *)0; Fl_Input2 *txt_203_communications_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_medical_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_food_unit = (Fl_Input2 *)0; Fl_Group *tab_203_opsA = (Fl_Group *)0; Fl_Input2 *txt_203_ops_chief = (Fl_Input2 *)0; Fl_Input2 *txt_203_ops_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_b1_director = (Fl_Input2 *)0; Fl_Input2 *txt_203_b1_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_b1_div[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_203_b1_grp[5]={(Fl_Input2 *)0}; Fl_Group *tab_203_opsB = (Fl_Group *)0; Fl_Input2 *txt_203_b2_director = (Fl_Input2 *)0; Fl_Input2 *txt_203_b2_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_b2_div[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_203_b2_grp[5]={(Fl_Input2 *)0}; Fl_Group *tab_203_opsC = (Fl_Group *)0; Fl_Input2 *txt_203_b3_director = (Fl_Input2 *)0; Fl_Input2 *txt_203_b3_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_b3_div[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_203_b3_grp[5]={(Fl_Input2 *)0}; Fl_Group *tab_203_opsD = (Fl_Group *)0; Fl_Input2 *txt_203_air_ops_br_dir = (Fl_Input2 *)0; Fl_Input2 *txt_203_air_tactical_group_sup = (Fl_Input2 *)0; Fl_Input2 *txt_203_air_support_group_sup = (Fl_Input2 *)0; Fl_Input2 *txt_203_helicopter_coordinator = (Fl_Input2 *)0; Fl_Input2 *txt_203_air_tanker_fixed_wing = (Fl_Input2 *)0; Fl_Group *tab_203_admin = (Fl_Group *)0; Fl_Input2 *txt_203_finance_chief = (Fl_Input2 *)0; Fl_Input2 *txt_203_finance_deputy = (Fl_Input2 *)0; Fl_Input2 *txt_203_time_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_procurement_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_claims_unit = (Fl_Input2 *)0; Fl_Input2 *txt_203_cost_unit = (Fl_Input2 *)0; static void cb_btn_203_date(Fl_Button*, void*) { cb_203_set_date(); } static void cb_btn_203_time(Fl_Button*, void*) { cb_203_set_time(); } void create_ics203_tab() { int Y = tab_top; tab_ics203 = new Fl_Group(0, Y, 570, 390); tab_ics203->align(FL_ALIGN_TOP); tab_ics203_type = new Fl_Tabs(0, Y+3, 570, 387); tab_ics203_type->selection_color((Fl_Color)246); { // tab_203_orglist tab_203_1 = new Fl_Group(0, Y+25, 570, 360, _("Org List")); { // group_203_orglist_1 Fl_Group* group_203_orglist_1 = new Fl_Group(2, Y+31, 566, 115); group_203_orglist_1->box(FL_ENGRAVED_FRAME); group_203_orglist_1->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_incident = new Fl_Input2(135, Y+37, 425, 24, _("1. Incident Name")); txt_203_incident->tooltip(_("Incident name")); txt_203_incident->box(FL_DOWN_BOX); txt_203_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_incident->labeltype(FL_NORMAL_LABEL); txt_203_incident->labelfont(0); txt_203_incident->labelsize(14); txt_203_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_incident->align(FL_ALIGN_LEFT); txt_203_incident->callback(ics_changed); txt_203_incident->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_incident { txt_203_date = new Fl_Input2(135, Y+64, 155, 24, _("2. Date Prepared")); txt_203_date->tooltip(_("Date prepared")); txt_203_date->box(FL_DOWN_BOX); txt_203_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_date->labeltype(FL_NORMAL_LABEL); txt_203_date->labelfont(0); txt_203_date->labelsize(14); txt_203_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_date->align(FL_ALIGN_LEFT); txt_203_incident->callback(ics_changed); txt_203_date->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_date { btn_203_date = new Fl_Button(294, Y+66, 20, 20, _("...")); btn_203_date->tooltip(_("Set today")); btn_203_date->callback((Fl_Callback*)cb_btn_203_date); } // Fl_Button* btn_203_date { txt_203_time = new Fl_Input2(135, Y+89, 103, 24, _("3. Time Prepared")); txt_203_time->tooltip(_("Time prepared")); txt_203_time->box(FL_DOWN_BOX); txt_203_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_time->labeltype(FL_NORMAL_LABEL); txt_203_time->labelfont(0); txt_203_time->labelsize(14); txt_203_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_time->align(FL_ALIGN_LEFT); txt_203_time->callback(ics_changed); txt_203_time->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_time { btn_203_time = new Fl_Button(247, Y+91, 20, 20, _("...")); btn_203_time->tooltip(_("Set time now")); btn_203_time->callback((Fl_Callback*)cb_btn_203_time); } // Fl_Button* btn_203_time { txt_203_op_period = new Fl_Input2(135, Y+117, 425, 24, _("4. Oper\' Period")); txt_203_op_period->tooltip(_("Date / Time")); txt_203_op_period->box(FL_DOWN_BOX); txt_203_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_op_period->labeltype(FL_NORMAL_LABEL); txt_203_op_period->labelfont(0); txt_203_op_period->labelsize(14); txt_203_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_op_period->align(FL_ALIGN_LEFT); txt_203_op_period->callback(ics_changed); txt_203_op_period->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_op_period group_203_orglist_1->end(); } // group_203_orglist_1 { // group_203_orglist_2 Fl_Group* group_203_orglist_2 = new Fl_Group(2, Y+147, 566, 167, _("Incident Command and Staff")); group_203_orglist_2->box(FL_ENGRAVED_FRAME); group_203_orglist_2->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE); txt_203_incident_commander = new Fl_Input2(133, Y+168, 425, 24, _("Commander")); txt_203_incident_commander->tooltip(_("Incident name")); txt_203_incident_commander->box(FL_DOWN_BOX); txt_203_incident_commander->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_incident_commander->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_incident_commander->labeltype(FL_NORMAL_LABEL); txt_203_incident_commander->labelfont(0); txt_203_incident_commander->labelsize(14); txt_203_incident_commander->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_incident_commander->align(FL_ALIGN_LEFT); txt_203_incident_commander->callback(ics_changed); txt_203_incident_commander->when(FL_WHEN_CHANGED); txt_203_incident_deputy = new Fl_Input2(133, Y+197, 425, 24, _("Deputy")); txt_203_incident_deputy->tooltip(_("Incident name")); txt_203_incident_deputy->box(FL_DOWN_BOX); txt_203_incident_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_incident_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_incident_deputy->labeltype(FL_NORMAL_LABEL); txt_203_incident_deputy->labelfont(0); txt_203_incident_deputy->labelsize(14); txt_203_incident_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_incident_deputy->align(FL_ALIGN_LEFT); txt_203_incident_deputy->callback(ics_changed); txt_203_incident_deputy->when(FL_WHEN_CHANGED); txt_203_incident_safety_officer = new Fl_Input2(133, Y+226, 425, 24, _("Safety Officer")); txt_203_incident_safety_officer->tooltip(_("Incident name")); txt_203_incident_safety_officer->box(FL_DOWN_BOX); txt_203_incident_safety_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_incident_safety_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_incident_safety_officer->labeltype(FL_NORMAL_LABEL); txt_203_incident_safety_officer->labelfont(0); txt_203_incident_safety_officer->labelsize(14); txt_203_incident_safety_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_incident_safety_officer->align(FL_ALIGN_LEFT); txt_203_incident_safety_officer->callback(ics_changed); txt_203_incident_safety_officer->when(FL_WHEN_CHANGED); txt_203_incident_info_officer = new Fl_Input2(133, Y+255, 425, 24, _("Information Off\'")); txt_203_incident_info_officer->tooltip(_("Incident name")); txt_203_incident_info_officer->box(FL_DOWN_BOX); txt_203_incident_info_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_incident_info_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_incident_info_officer->labeltype(FL_NORMAL_LABEL); txt_203_incident_info_officer->labelfont(0); txt_203_incident_info_officer->labelsize(14); txt_203_incident_info_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_incident_info_officer->align(FL_ALIGN_LEFT); txt_203_incident_info_officer->callback(ics_changed); txt_203_incident_info_officer->when(FL_WHEN_CHANGED); txt_203_liaison_officer = new Fl_Input2(133, Y+285, 425, 24, _("Liaison Officer")); txt_203_liaison_officer->tooltip(_("Incident name")); txt_203_liaison_officer->box(FL_DOWN_BOX); txt_203_liaison_officer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_liaison_officer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_liaison_officer->labeltype(FL_NORMAL_LABEL); txt_203_liaison_officer->labelfont(0); txt_203_liaison_officer->labelsize(14); txt_203_liaison_officer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_liaison_officer->align(FL_ALIGN_LEFT); txt_203_liaison_officer->callback(ics_changed); txt_203_liaison_officer->when(FL_WHEN_CHANGED); group_203_orglist_2->end(); } // group_203_orglist_2 { // group_203_orglist_3 Fl_Group* group_203_orglist_3 = new Fl_Group(2, Y+315, 565, 35); group_203_orglist_3->box(FL_ENGRAVED_FRAME); txt_203_prepared_by = new Fl_Input2(133, Y+319, 425, 24, _("Prepared By")); txt_203_prepared_by->tooltip(_("Incident name")); txt_203_prepared_by->box(FL_DOWN_BOX); txt_203_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_prepared_by->labeltype(FL_NORMAL_LABEL); txt_203_prepared_by->labelfont(0); txt_203_prepared_by->labelsize(14); txt_203_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_prepared_by->align(FL_ALIGN_LEFT); txt_203_prepared_by->when(FL_WHEN_CHANGED); txt_203_prepared_by->callback(ics_changed); group_203_orglist_3->end(); } // group_203_orglist_3 tab_203_1->end(); } // Fl_Group* tab_203_orglist { // tab_203_agency tab_203_agency = new Fl_Group(0, Y+25, 570, 360, _("Agency")); tab_203_agency->hide(); { Fl_Group* o = new Fl_Group(2, Y+36, 566, 314, _("Agency Representatives")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); for (int i = 0; i < 7; i++) { txt_203_agency[i] = new Fl_Input2(11, Y+79 + 39*i, 275, 24, _("Agency")); txt_203_agency[i]->tooltip(_("Incident name")); txt_203_agency[i]->box(FL_DOWN_BOX); txt_203_agency[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_agency[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_agency[i]->labeltype(FL_NORMAL_LABEL); txt_203_agency[i]->labelfont(0); txt_203_agency[i]->labelsize(14); txt_203_agency[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_agency[i]->align(FL_ALIGN_TOP); txt_203_agency[i]->callback(ics_changed); txt_203_agency[i]->when(FL_WHEN_CHANGED); txt_203_agency_name[i] = new Fl_Input2(290, Y+79 + 39*i, 275, 24, _("Name")); txt_203_agency_name[i]->tooltip(_("Incident name")); txt_203_agency_name[i]->box(FL_DOWN_BOX); txt_203_agency_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_agency_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_agency_name[i]->labeltype(FL_NORMAL_LABEL); txt_203_agency_name[i]->labelfont(0); txt_203_agency_name[i]->labelsize(14); txt_203_agency_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_agency_name[i]->align(FL_ALIGN_TOP); txt_203_agency_name[i]->callback(ics_changed); txt_203_agency_name[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Group* o tab_203_agency->end(); } // Fl_Group* tab_203_agency { // tab_203_planning tab_203_planning = new Fl_Group(0, Y+25, 570, 360, _("Planning")); tab_203_planning->hide(); { Fl_Group* o = new Fl_Group(2, Y+31, 566, 289, _("Planning Section")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_203_planning_chief = new Fl_Input2(158, Y+52, 400, 24, _("Chief")); txt_203_planning_chief->tooltip(_(" ")); txt_203_planning_chief->box(FL_DOWN_BOX); txt_203_planning_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_planning_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_planning_chief->labeltype(FL_NORMAL_LABEL); txt_203_planning_chief->labelfont(0); txt_203_planning_chief->labelsize(14); txt_203_planning_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_planning_chief->align(FL_ALIGN_LEFT); txt_203_planning_chief->callback(ics_changed); txt_203_planning_chief->when(FL_WHEN_CHANGED); txt_203_planning_deputy = new Fl_Input2(158, Y+81, 400, 24, _("Deputy")); txt_203_planning_deputy->tooltip(_(" ")); txt_203_planning_deputy->box(FL_DOWN_BOX); txt_203_planning_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_planning_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_planning_deputy->labeltype(FL_NORMAL_LABEL); txt_203_planning_deputy->labelfont(0); txt_203_planning_deputy->labelsize(14); txt_203_planning_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_planning_deputy->align(FL_ALIGN_LEFT); txt_203_planning_deputy->callback(ics_changed); txt_203_planning_deputy->when(FL_WHEN_CHANGED); txt_203_resources_unit = new Fl_Input2(158, Y+101, 400, 24, _("Resources Unit")); txt_203_resources_unit->tooltip(_(" ")); txt_203_resources_unit->box(FL_DOWN_BOX); txt_203_resources_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_resources_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_resources_unit->labeltype(FL_NORMAL_LABEL); txt_203_resources_unit->labelfont(0); txt_203_resources_unit->labelsize(14); txt_203_resources_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_resources_unit->align(FL_ALIGN_LEFT); txt_203_resources_unit->callback(ics_changed); txt_203_resources_unit->when(FL_WHEN_CHANGED); txt_203_situation_unit = new Fl_Input2(158, Y+140, 400, 24, _("Situation Unit")); txt_203_situation_unit->tooltip(_(" ")); txt_203_situation_unit->box(FL_DOWN_BOX); txt_203_situation_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_situation_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_situation_unit->labeltype(FL_NORMAL_LABEL); txt_203_situation_unit->labelfont(0); txt_203_situation_unit->labelsize(14); txt_203_situation_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_situation_unit->align(FL_ALIGN_LEFT); txt_203_situation_unit->callback(ics_changed); txt_203_situation_unit->when(FL_WHEN_CHANGED); txt_203_documentation_unit = new Fl_Input2(158, Y+170, 400, 24, _("Documentation Unit")); txt_203_documentation_unit->tooltip(_(" ")); txt_203_documentation_unit->box(FL_DOWN_BOX); txt_203_documentation_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_documentation_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_documentation_unit->labeltype(FL_NORMAL_LABEL); txt_203_documentation_unit->labelfont(0); txt_203_documentation_unit->labelsize(14); txt_203_documentation_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_documentation_unit->align(FL_ALIGN_LEFT); txt_203_documentation_unit->callback(ics_changed); txt_203_documentation_unit->when(FL_WHEN_CHANGED); txt_203_demobilization_unit = new Fl_Input2(158, Y+199, 400, 24, _("Demobilization Unit")); txt_203_demobilization_unit->tooltip(_(" ")); txt_203_demobilization_unit->box(FL_DOWN_BOX); txt_203_demobilization_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_demobilization_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_demobilization_unit->labeltype(FL_NORMAL_LABEL); txt_203_demobilization_unit->labelfont(0); txt_203_demobilization_unit->labelsize(14); txt_203_demobilization_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_demobilization_unit->align(FL_ALIGN_LEFT); txt_203_demobilization_unit->callback(ics_changed); txt_203_demobilization_unit->when(FL_WHEN_CHANGED); for (int i = 0; i < 3; i++) { txt_203_tech_spc[i] = new Fl_Input2(158, Y+229 + i*29, 400, 24, _("Technical Specialist")); txt_203_tech_spc[i]->tooltip(_("Name")); txt_203_tech_spc[i]->box(FL_DOWN_BOX); txt_203_tech_spc[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_tech_spc[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_tech_spc[i]->labeltype(FL_NORMAL_LABEL); txt_203_tech_spc[i]->labelfont(0); txt_203_tech_spc[i]->labelsize(14); txt_203_tech_spc[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_tech_spc[i]->align(FL_ALIGN_LEFT); txt_203_tech_spc[i]->callback(ics_changed); txt_203_tech_spc[i]->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_tech_spc[i] o->end(); } // Fl_Group* o tab_203_planning->end(); } // tab_203_planning { // tab_203_logistics tab_203_logistics = new Fl_Group(0, Y+25, 570, 360, _("Logistics")); tab_203_logistics->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318, _("Logistics Section")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_203_logistics_chief = new Fl_Input2(165, Y+49, 395, 24, _("Chief")); txt_203_logistics_chief->tooltip(_(" ")); txt_203_logistics_chief->box(FL_DOWN_BOX); txt_203_logistics_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_logistics_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_logistics_chief->labeltype(FL_NORMAL_LABEL); txt_203_logistics_chief->labelfont(0); txt_203_logistics_chief->labelsize(14); txt_203_logistics_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_logistics_chief->align(FL_ALIGN_LEFT); txt_203_liaison_officer->callback(ics_changed); txt_203_logistics_chief->when(FL_WHEN_CHANGED); txt_203_logistics_deputy = new Fl_Input2(165, Y+76, 395, 24, _("Deputy")); txt_203_logistics_deputy->tooltip(_(" ")); txt_203_logistics_deputy->box(FL_DOWN_BOX); txt_203_logistics_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_logistics_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_logistics_deputy->labeltype(FL_NORMAL_LABEL); txt_203_logistics_deputy->labelfont(0); txt_203_logistics_deputy->labelsize(14); txt_203_logistics_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_logistics_deputy->align(FL_ALIGN_LEFT); txt_203_logistics_deputy->callback(ics_changed); txt_203_logistics_deputy->when(FL_WHEN_CHANGED); { Fl_Group* o = new Fl_Group(6, Y+105, 558, 118, _("a. Support")); o->box(FL_THIN_DOWN_BOX); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_203_support_director = new Fl_Input2(165, Y+112, 395, 24, _("Director")); txt_203_support_director->tooltip(_(" ")); txt_203_support_director->box(FL_DOWN_BOX); txt_203_support_director->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_support_director->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_support_director->labeltype(FL_NORMAL_LABEL); txt_203_support_director->labelfont(0); txt_203_support_director->labelsize(14); txt_203_support_director->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_support_director->align(FL_ALIGN_LEFT); txt_203_support_director->callback(ics_changed); txt_203_support_director->when(FL_WHEN_CHANGED); txt_203_supply_unit = new Fl_Input2(165, Y+139, 395, 24, _("Supply Unit")); txt_203_supply_unit->tooltip(_(" ")); txt_203_supply_unit->box(FL_DOWN_BOX); txt_203_supply_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_supply_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_supply_unit->labeltype(FL_NORMAL_LABEL); txt_203_supply_unit->labelfont(0); txt_203_supply_unit->labelsize(14); txt_203_supply_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_supply_unit->align(FL_ALIGN_LEFT); txt_203_supply_unit->callback(ics_changed); txt_203_supply_unit->when(FL_WHEN_CHANGED); txt_203_facilities_unit = new Fl_Input2(165, Y+166, 395, 24, _("Facilities Unit")); txt_203_facilities_unit->tooltip(_(" ")); txt_203_facilities_unit->box(FL_DOWN_BOX); txt_203_facilities_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_facilities_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_facilities_unit->labeltype(FL_NORMAL_LABEL); txt_203_facilities_unit->labelfont(0); txt_203_facilities_unit->labelsize(14); txt_203_facilities_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_facilities_unit->align(FL_ALIGN_LEFT); txt_203_facilities_unit->callback(ics_changed); txt_203_facilities_unit->when(FL_WHEN_CHANGED); txt_203_ground_support = new Fl_Input2(165, Y+194, 395, 24, _("Ground Support Unit")); txt_203_ground_support->tooltip(_(" ")); txt_203_ground_support->box(FL_DOWN_BOX); txt_203_ground_support->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_ground_support->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_ground_support->labeltype(FL_NORMAL_LABEL); txt_203_ground_support->labelfont(0); txt_203_ground_support->labelsize(14); txt_203_ground_support->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_ground_support->align(FL_ALIGN_LEFT); txt_203_ground_support->callback(ics_changed); txt_203_ground_support->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(6, Y+224, 558, 123, _("b. Service")); o->box(FL_THIN_DOWN_BOX); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_203_service_director = new Fl_Input2(165, Y+237, 395, 24, _("Director")); txt_203_service_director->tooltip(_(" ")); txt_203_service_director->box(FL_DOWN_BOX); txt_203_service_director->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_service_director->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_service_director->labeltype(FL_NORMAL_LABEL); txt_203_service_director->labelfont(0); txt_203_service_director->labelsize(14); txt_203_service_director->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_service_director->align(FL_ALIGN_LEFT); txt_203_service_director->callback(ics_changed); txt_203_service_director->when(FL_WHEN_CHANGED); txt_203_communications_unit = new Fl_Input2(165, Y+264, 395, 24, _("Communications Unit")); txt_203_communications_unit->tooltip(_(" ")); txt_203_communications_unit->box(FL_DOWN_BOX); txt_203_communications_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_communications_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_communications_unit->labeltype(FL_NORMAL_LABEL); txt_203_communications_unit->labelfont(0); txt_203_communications_unit->labelsize(14); txt_203_communications_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_communications_unit->align(FL_ALIGN_LEFT); txt_203_communications_unit->callback(ics_changed); txt_203_communications_unit->when(FL_WHEN_CHANGED); txt_203_medical_unit = new Fl_Input2(165, Y+292, 395, 24, _("Medical Unit")); txt_203_medical_unit->tooltip(_(" ")); txt_203_medical_unit->box(FL_DOWN_BOX); txt_203_medical_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_medical_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_medical_unit->labeltype(FL_NORMAL_LABEL); txt_203_medical_unit->labelfont(0); txt_203_medical_unit->labelsize(14); txt_203_medical_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_medical_unit->align(FL_ALIGN_LEFT); txt_203_medical_unit->callback(ics_changed); txt_203_medical_unit->when(FL_WHEN_CHANGED); txt_203_food_unit = new Fl_Input2(165, Y+320, 395, 24, _("Food Unit")); txt_203_food_unit->tooltip(_(" ")); txt_203_food_unit->box(FL_DOWN_BOX); txt_203_food_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_food_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_food_unit->labeltype(FL_NORMAL_LABEL); txt_203_food_unit->labelfont(0); txt_203_food_unit->labelsize(14); txt_203_food_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_food_unit->align(FL_ALIGN_LEFT); txt_203_food_unit->callback(ics_changed); txt_203_food_unit->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_logistics->end(); } // Fl_Group* tab_203_logistics { // tab_203_opsA tab_203_opsA = new Fl_Group(0, Y+25, 570, 360, _("Ops A")); tab_203_opsA->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_ops_chief = new Fl_Input2(132, Y+41, 425, 24, _("Chief")); txt_203_ops_chief->tooltip(_(" ")); txt_203_ops_chief->box(FL_DOWN_BOX); txt_203_ops_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_ops_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_ops_chief->labeltype(FL_NORMAL_LABEL); txt_203_ops_chief->labelfont(0); txt_203_ops_chief->labelsize(14); txt_203_ops_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_ops_chief->align(FL_ALIGN_LEFT); txt_203_ops_chief->callback(ics_changed); txt_203_ops_chief->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_ops_chief { txt_203_ops_deputy = new Fl_Input2(132, Y+68, 425, 24, _("Deputy")); txt_203_ops_deputy->tooltip(_(" ")); txt_203_ops_deputy->box(FL_DOWN_BOX); txt_203_ops_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_ops_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_ops_deputy->labeltype(FL_NORMAL_LABEL); txt_203_ops_deputy->labelfont(0); txt_203_ops_deputy->labelsize(14); txt_203_ops_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_ops_deputy->align(FL_ALIGN_LEFT); txt_203_ops_deputy->callback(ics_changed); txt_203_ops_deputy->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_ops_deputy { Fl_Group* o = new Fl_Group(6, Y+96, 558, 248, _("Branch I - Division/Groups")); o->box(FL_THIN_DOWN_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_b1_director = new Fl_Input2(132, Y+120, 425, 24, _("Branch Director")); txt_203_b1_director->tooltip(_(" ")); txt_203_b1_director->box(FL_DOWN_BOX); txt_203_b1_director->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b1_director->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b1_director->labeltype(FL_NORMAL_LABEL); txt_203_b1_director->labelfont(0); txt_203_b1_director->labelsize(14); txt_203_b1_director->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b1_director->align(FL_ALIGN_LEFT); txt_203_b1_director->callback(ics_changed); txt_203_b1_director->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b1_director { txt_203_b1_deputy = new Fl_Input2(133, Y+151, 425, 24, _("Deputy")); txt_203_b1_deputy->tooltip(_(" ")); txt_203_b1_deputy->box(FL_DOWN_BOX); txt_203_b1_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b1_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b1_deputy->labeltype(FL_NORMAL_LABEL); txt_203_b1_deputy->labelfont(0); txt_203_b1_deputy->labelsize(14); txt_203_b1_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b1_deputy->align(FL_ALIGN_LEFT); txt_203_b1_deputy->callback(ics_changed); txt_203_b1_deputy->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b1_deputy for (int i = 0; i < 5; i++) { // Fl_Input2* txt_203_b1_div[i] txt_203_b1_div[i] = new Fl_Input2(134, Y+180 + i*23, 161, 24, i == 0 ? _("Division / Group"):""); txt_203_b1_div[i]->tooltip(_("division")); txt_203_b1_div[i]->box(FL_DOWN_BOX); txt_203_b1_div[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b1_div[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b1_div[i]->labeltype(FL_NORMAL_LABEL); txt_203_b1_div[i]->labelfont(0); txt_203_b1_div[i]->labelsize(14); txt_203_b1_div[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b1_div[i]->align(FL_ALIGN_LEFT); txt_203_b1_div[i]->callback(ics_changed); txt_203_b1_div[i]->when(FL_WHEN_CHANGED); // Fl_Input2* txt_203_b1_grp[i] txt_203_b1_grp[i] = new Fl_Input2(297, Y+180 + i*23, 261, 24); txt_203_b1_grp[i]->tooltip(_("group")); txt_203_b1_grp[i]->box(FL_DOWN_BOX); txt_203_b1_grp[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b1_grp[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b1_grp[i]->labeltype(FL_NORMAL_LABEL); txt_203_b1_grp[i]->labelfont(0); txt_203_b1_grp[i]->labelsize(14); txt_203_b1_grp[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b1_grp[i]->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); txt_203_b1_grp[i]->callback(ics_changed); txt_203_b1_grp[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_opsA->end(); } // Fl_Group* tab_203_opsA { // tab_203_opsB tab_203_opsB = new Fl_Group(0, Y+25, 570, 360, _("Ops B")); tab_203_opsB->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318, _("Branch II - Divisions/Groups")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { Fl_Group* o = new Fl_Group(6, Y+57, 558, 248); o->box(FL_THIN_DOWN_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_b2_director = new Fl_Input2(132, Y+73, 425, 24, _("Branch Director")); txt_203_b2_director->tooltip(_("Director")); txt_203_b2_director->box(FL_DOWN_BOX); txt_203_b2_director->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b2_director->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b2_director->labeltype(FL_NORMAL_LABEL); txt_203_b2_director->labelfont(0); txt_203_b2_director->labelsize(14); txt_203_b2_director->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b2_director->align(FL_ALIGN_LEFT); txt_203_b2_director->callback(ics_changed); txt_203_b2_director->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b2_director { txt_203_b2_deputy = new Fl_Input2(132, Y+104, 425, 24, _("Deputy")); txt_203_b2_deputy->tooltip(_("Deputy")); txt_203_b2_deputy->box(FL_DOWN_BOX); txt_203_b2_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b2_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b2_deputy->labeltype(FL_NORMAL_LABEL); txt_203_b2_deputy->labelfont(0); txt_203_b2_deputy->labelsize(14); txt_203_b2_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b2_deputy->align(FL_ALIGN_LEFT); txt_203_b2_deputy->callback(ics_changed); txt_203_b2_deputy->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b2_deputy for (int i = 0; i < 5; i++) { txt_203_b2_div[i] = new Fl_Input2(132, Y+133 + i*33, 161, 24, _("Division / Group")); txt_203_b2_div[i]->tooltip(_("division")); txt_203_b2_div[i]->box(FL_DOWN_BOX); txt_203_b2_div[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b2_div[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b2_div[i]->labeltype(FL_NORMAL_LABEL); txt_203_b2_div[i]->labelfont(0); txt_203_b2_div[i]->labelsize(14); txt_203_b2_div[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b2_div[i]->align(FL_ALIGN_LEFT); txt_203_b2_div[i]->callback(ics_changed); txt_203_b2_div[i]->when(FL_WHEN_CHANGED); // Fl_Input2* txt_203_b2_div[i] txt_203_b2_grp[i] = new Fl_Input2(295, Y+133 + i*33, 261, 24); txt_203_b2_grp[i]->tooltip(_("group")); txt_203_b2_grp[i]->box(FL_DOWN_BOX); txt_203_b2_grp[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b2_grp[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b2_grp[i]->labeltype(FL_NORMAL_LABEL); txt_203_b2_grp[i]->labelfont(0); txt_203_b2_grp[i]->labelsize(14); txt_203_b2_grp[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b2_grp[i]->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); txt_203_b2_grp[i]->callback(ics_changed); txt_203_b2_grp[i]->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b2_grp[i] o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_opsB->end(); } // Fl_Group* tab_203_opsB { // tab_203_opsC tab_203_opsC = new Fl_Group(0, Y+25, 570, 360, _("OPs C")); tab_203_opsC->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318, _("Branch III - Divisions/Groups")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { Fl_Group* o = new Fl_Group(6, Y+57, 558, 248); o->box(FL_THIN_DOWN_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_b3_director = new Fl_Input2(132, Y+73, 425, 24, _("Branch Director")); txt_203_b3_director->tooltip(_(" ")); txt_203_b3_director->box(FL_DOWN_BOX); txt_203_b3_director->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b3_director->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b3_director->labeltype(FL_NORMAL_LABEL); txt_203_b3_director->labelfont(0); txt_203_b3_director->labelsize(14); txt_203_b3_director->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b3_director->align(FL_ALIGN_LEFT); txt_203_b3_director->callback(ics_changed); txt_203_b3_director->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b3_director { txt_203_b3_deputy = new Fl_Input2(132, Y+104, 425, 24, _("Deputy")); txt_203_b3_deputy->tooltip(_("Deputy")); txt_203_b3_deputy->box(FL_DOWN_BOX); txt_203_b3_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b3_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b3_deputy->labeltype(FL_NORMAL_LABEL); txt_203_b3_deputy->labelfont(0); txt_203_b3_deputy->labelsize(14); txt_203_b3_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b3_deputy->align(FL_ALIGN_LEFT); txt_203_b3_deputy->callback(ics_changed); txt_203_b3_deputy->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b3_deputy for (int i = 0; i < 5; i++) { txt_203_b3_div[i] = new Fl_Input2(132, Y+133, 161, 24, _("Division / Group")); txt_203_b3_div[i]->tooltip(_("Division")); txt_203_b3_div[i]->box(FL_DOWN_BOX); txt_203_b3_div[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b3_div[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b3_div[i]->labeltype(FL_NORMAL_LABEL); txt_203_b3_div[i]->labelfont(0); txt_203_b3_div[i]->labelsize(14); txt_203_b3_div[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b3_div[i]->align(FL_ALIGN_LEFT); txt_203_b3_div[i]->callback(ics_changed); txt_203_b3_div[i]->when(FL_WHEN_CHANGED); // Fl_Input2* txt_203_b3_div[i] txt_203_b3_grp[i] = new Fl_Input2(295, Y+133, 261, 24); txt_203_b3_grp[i]->tooltip(_("Group")); txt_203_b3_grp[i]->box(FL_DOWN_BOX); txt_203_b3_grp[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_b3_grp[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_b3_grp[i]->labeltype(FL_NORMAL_LABEL); txt_203_b3_grp[i]->labelfont(0); txt_203_b3_grp[i]->labelsize(14); txt_203_b3_grp[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_b3_grp[i]->callback(ics_changed); txt_203_b3_grp[i]->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); txt_203_b3_grp[i]->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_b3_grp[i] o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_opsC->end(); } // Fl_Group* tab_203_opsC { // tab_203_opsD tab_203_opsD = new Fl_Group(0, Y+25, 570, 360, _("OPs D")); tab_203_opsD->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318, _("Air Operations Branch")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { Fl_Group* o = new Fl_Group(6, Y+60, 558, 183); o->box(FL_THIN_DOWN_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_air_ops_br_dir = new Fl_Input2(228, Y+76, 300, 24, _("Air Operations Br. Dir.")); txt_203_air_ops_br_dir->tooltip(_(" ")); txt_203_air_ops_br_dir->box(FL_DOWN_BOX); txt_203_air_ops_br_dir->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_air_ops_br_dir->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_air_ops_br_dir->labeltype(FL_NORMAL_LABEL); txt_203_air_ops_br_dir->labelfont(0); txt_203_air_ops_br_dir->labelsize(14); txt_203_air_ops_br_dir->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_air_ops_br_dir->align(FL_ALIGN_LEFT); txt_203_air_ops_br_dir->callback(ics_changed); txt_203_air_ops_br_dir->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_air_ops_br_dir { txt_203_air_tactical_group_sup = new Fl_Input2(228, Y+107, 300, 24, _("Air Tactical Group Sup.")); txt_203_air_tactical_group_sup->tooltip(_(" ")); txt_203_air_tactical_group_sup->box(FL_DOWN_BOX); txt_203_air_tactical_group_sup->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_air_tactical_group_sup->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_air_tactical_group_sup->labeltype(FL_NORMAL_LABEL); txt_203_air_tactical_group_sup->labelfont(0); txt_203_air_tactical_group_sup->labelsize(14); txt_203_air_tactical_group_sup->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_air_tactical_group_sup->align(FL_ALIGN_LEFT); txt_203_air_tactical_group_sup->callback(ics_changed); txt_203_air_tactical_group_sup->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_air_tactical_group_sup { txt_203_air_support_group_sup = new Fl_Input2(228, Y+136, 300, 24, _("Air Support Group Sup.")); txt_203_air_support_group_sup->tooltip(_(" ")); txt_203_air_support_group_sup->box(FL_DOWN_BOX); txt_203_air_support_group_sup->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_air_support_group_sup->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_air_support_group_sup->labeltype(FL_NORMAL_LABEL); txt_203_air_support_group_sup->labelfont(0); txt_203_air_support_group_sup->labelsize(14); txt_203_air_support_group_sup->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_air_support_group_sup->align(FL_ALIGN_LEFT); txt_203_air_support_group_sup->callback(ics_changed); txt_203_air_support_group_sup->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_air_support_group_sup { txt_203_helicopter_coordinator = new Fl_Input2(228, Y+169, 300, 24, _("Helicopter Coordinator")); txt_203_helicopter_coordinator->tooltip(_(" ")); txt_203_helicopter_coordinator->box(FL_DOWN_BOX); txt_203_helicopter_coordinator->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_helicopter_coordinator->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_helicopter_coordinator->labeltype(FL_NORMAL_LABEL); txt_203_helicopter_coordinator->labelfont(0); txt_203_helicopter_coordinator->labelsize(14); txt_203_helicopter_coordinator->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_helicopter_coordinator->align(FL_ALIGN_LEFT); txt_203_helicopter_coordinator->callback(ics_changed); txt_203_helicopter_coordinator->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_helicopter_coordinator { txt_203_air_tanker_fixed_wing = new Fl_Input2(228, Y+203, 300, 24, _("Air Tanker / Fixed Wing Crd.")); txt_203_air_tanker_fixed_wing->tooltip(_(" ")); txt_203_air_tanker_fixed_wing->box(FL_DOWN_BOX); txt_203_air_tanker_fixed_wing->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_air_tanker_fixed_wing->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_air_tanker_fixed_wing->labeltype(FL_NORMAL_LABEL); txt_203_air_tanker_fixed_wing->labelfont(0); txt_203_air_tanker_fixed_wing->labelsize(14); txt_203_air_tanker_fixed_wing->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_air_tanker_fixed_wing->align(FL_ALIGN_LEFT); txt_203_air_tanker_fixed_wing->callback(ics_changed); txt_203_air_tanker_fixed_wing->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_air_tanker_fixed_wing o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_opsD->end(); } // Fl_Group* tab_203_opsD { // tab_203_admin tab_203_admin = new Fl_Group(0, Y+25, 570, 326, _("Admin")); tab_203_admin->hide(); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 318, _("Finance/Admin Section")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { Fl_Group* o = new Fl_Group(6, Y+62, 558, 215); o->box(FL_THIN_DOWN_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); { txt_203_finance_chief = new Fl_Input2(230, Y+78, 300, 24, _("Chief")); txt_203_finance_chief->tooltip(_(" ")); txt_203_finance_chief->box(FL_DOWN_BOX); txt_203_finance_chief->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_finance_chief->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_finance_chief->labeltype(FL_NORMAL_LABEL); txt_203_finance_chief->labelfont(0); txt_203_finance_chief->labelsize(14); txt_203_finance_chief->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_finance_chief->align(FL_ALIGN_LEFT); txt_203_finance_chief->callback(ics_changed); txt_203_finance_chief->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_finance_chief { txt_203_finance_deputy = new Fl_Input2(230, Y+110, 300, 24, _("Deputy")); txt_203_finance_deputy->tooltip(_(" ")); txt_203_finance_deputy->box(FL_DOWN_BOX); txt_203_finance_deputy->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_finance_deputy->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_finance_deputy->labeltype(FL_NORMAL_LABEL); txt_203_finance_deputy->labelfont(0); txt_203_finance_deputy->labelsize(14); txt_203_finance_deputy->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_finance_deputy->align(FL_ALIGN_LEFT); txt_203_finance_deputy->callback(ics_changed); txt_203_finance_deputy->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_finance_deputy { txt_203_time_unit = new Fl_Input2(230, Y+142, 300, 24, _("Time Unit")); txt_203_time_unit->tooltip(_(" ")); txt_203_time_unit->box(FL_DOWN_BOX); txt_203_time_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_time_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_time_unit->labeltype(FL_NORMAL_LABEL); txt_203_time_unit->labelfont(0); txt_203_time_unit->labelsize(14); txt_203_time_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_time_unit->align(FL_ALIGN_LEFT); txt_203_time_unit->callback(ics_changed); txt_203_time_unit->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_time_unit { txt_203_procurement_unit = new Fl_Input2(230, Y+174, 300, 24, _("Procurement Unit")); txt_203_procurement_unit->tooltip(_(" ")); txt_203_procurement_unit->box(FL_DOWN_BOX); txt_203_procurement_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_procurement_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_procurement_unit->labeltype(FL_NORMAL_LABEL); txt_203_procurement_unit->labelfont(0); txt_203_procurement_unit->labelsize(14); txt_203_procurement_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_procurement_unit->align(FL_ALIGN_LEFT); txt_203_procurement_unit->callback(ics_changed); txt_203_procurement_unit->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_procurement_unit { txt_203_claims_unit = new Fl_Input2(230, Y+206, 300, 24, _("Compensation / Claims Unit")); txt_203_claims_unit->tooltip(_(" ")); txt_203_claims_unit->box(FL_DOWN_BOX); txt_203_claims_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_claims_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_claims_unit->labeltype(FL_NORMAL_LABEL); txt_203_claims_unit->labelfont(0); txt_203_claims_unit->labelsize(14); txt_203_claims_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_claims_unit->align(FL_ALIGN_LEFT); txt_203_claims_unit->callback(ics_changed); txt_203_claims_unit->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_claims_unit { txt_203_cost_unit = new Fl_Input2(230, Y+238, 300, 24, _("Cost Unit")); txt_203_cost_unit->tooltip(_(" ")); txt_203_cost_unit->box(FL_DOWN_BOX); txt_203_cost_unit->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_203_cost_unit->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_203_cost_unit->labeltype(FL_NORMAL_LABEL); txt_203_cost_unit->labelfont(0); txt_203_cost_unit->labelsize(14); txt_203_cost_unit->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_203_cost_unit->align(FL_ALIGN_LEFT); txt_203_cost_unit->callback(ics_changed); txt_203_cost_unit->when(FL_WHEN_CHANGED); } // Fl_Input2* txt_203_cost_unit o->end(); } // Fl_Group* o o->end(); } // Fl_Group* o tab_203_admin->end(); } // Fl_Group* tab_203_admin tab_ics203_type->end(); Fl_Group::current()->resizable(tab_ics203_type); tab_ics203->end(); tab_ics203->hide(); } // Fl_Group* tab_ics203 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics205.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000047267�12330516146�012744� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // ics205 fields // compatibility fields required to read older data files string ics205_name = ":nam:"; string ics205_dt1 = ":dt1:"; string ics205_dt2 = ":dt2:"; string ics205_dt3 = ":dt3:"; string ics205_func = ":func"; string ics205_chan = ":chan"; string ics205_asgn = ":asgn"; string ics205_rx_freq = ":rxfq"; string ics205_rx_tone = ":rxtn"; string ics205_tx_freq = ":txfq"; string ics205_tx_tone = ":txtn"; string ics205_mode_adm = ":mode"; string ics205_rem = ":rmrk"; string ics205_prep = ":prp:"; string ics205_county = ":cnty:"; string ics205_state = ":stat:"; string ics205_latitude = ":lat:"; string ics205_longitude = ":lon:"; const char *nbr[] = { "00:", "01:", "02:", "03:", "04:", "05:", "06:", "07:", "08:", "09:", "10:", "11:", "12:", "13:", "14:", "15:", "16:", "17:", "18:", "19:" }; string s205_name; string s205_dt_prepared; string s205_dt_op_from; string s205_dt_op_to; string s205_func[20]; string s205_channel[20]; string s205_asgn[20]; string s205_rx_freq[20]; string s205_rx_tone[20]; string s205_tx_freq[20]; string s205_tx_tone[20]; string s205_mode_adm[20]; string s205_remarks[20]; string s205_preparer; string s205_county; string s205_state; string s205_latitude; string s205_longitude; string buff205; string def_205_filename = ""; string base_205_filename = ""; string def_205_TemplateName = ""; bool using_ics205_template = false; void cb_205_SetDateTime1() { txt_205_dt_prepared->value(szDateTime()); } void cb_205_SetDateTime2() { txt_205_dt_op_from->value(szDateTime()); } void cb_205_SetDateTime3() { txt_205_dt_op_to->value(szDateTime()); } void clear_205fields() { s205_name.clear(); s205_dt_prepared.clear(); s205_dt_op_from.clear(); for (int i = 0; i < 20; i++) { s205_func[i].clear(); s205_channel[i].clear(); s205_asgn[i].clear(); s205_rx_freq[i].clear(); s205_rx_tone[i].clear(); s205_tx_freq[i].clear(); s205_tx_tone[i].clear(); s205_mode_adm[i].clear(); s205_remarks[i].clear(); } s205_preparer.clear(); s205_county.clear(); s205_state.clear(); s205_latitude.clear(); s205_longitude.clear(); } bool check_205fields() { if (s205_name != txt_205_name->value()) return true; if (s205_dt_prepared != txt_205_dt_prepared->value()) return true; if (s205_dt_op_from != txt_205_dt_op_from->value()) return true; if (s205_dt_op_to != txt_205_dt_op_to->value()) return true; for (int i = 0; i < 20; i++) { if (s205_func[i] != txt_205_func[i]->value()) return true; if (s205_channel[i] != txt_205_channel[i]->value()) return true; if (s205_asgn[i] != txt_205_assign[i]->value()) return true; if (s205_rx_freq[i] != txt_205_rx_freq[i]->value()) return true; if (s205_rx_tone[i] != txt_205_rx_tone[i]->value()) return true; if (s205_tx_freq[i] != txt_205_tx_freq[i]->value()) return true; if (s205_tx_tone[i] != txt_205_tx_tone[i]->value()) return true; if (s205_mode_adm[i] != txt_205_mode_adm[i]->value()) return true; if (s205_remarks[i] != txt_205_remarks[i]->value()) return true; } if (s205_preparer != txt_205_preparer->value()) return true; if (s205_county != txt_205_county->value()) return true; if (s205_state != txt_205_state->value()) return true; if (s205_latitude != txt_205_latitude->value()) return true; if (s205_longitude != txt_205_longitude->value()) return true; return false; } void update_205fields() { s205_name = txt_205_name->value(); s205_dt_prepared = txt_205_dt_prepared->value(); s205_dt_op_from = txt_205_dt_op_from->value(); s205_dt_op_to = txt_205_dt_op_to->value(); for (int i = 0; i < 20; i++) { s205_func[i] = txt_205_func[i]->value(); s205_channel[i] = txt_205_channel[i]->value(); s205_asgn[i] = txt_205_assign[i]->value(); s205_rx_freq[i] = txt_205_rx_freq[i]->value(); s205_rx_tone[i] = txt_205_rx_tone[i]->value(); s205_tx_freq[i] = txt_205_tx_freq[i]->value(); s205_tx_tone[i] = txt_205_tx_tone[i]->value(); s205_mode_adm[i] = txt_205_mode_adm[i]->value(); s205_remarks[i] = txt_205_remarks[i]->value(); } s205_preparer = txt_205_preparer->value(); s205_county = txt_205_county->value(); s205_state = txt_205_state->value(); s205_latitude = txt_205_latitude->value(); s205_longitude = txt_205_longitude->value(); } void update_205form() { txt_205_name->value(s205_name.c_str()); txt_205_dt_prepared->value(s205_dt_prepared.c_str()); txt_205_dt_op_from->value(s205_dt_op_from.c_str()); txt_205_dt_op_to->value(s205_dt_op_to.c_str()); for (int i = 0; i < 20; i++) { txt_205_func[i]->value(s205_func[i].c_str()); txt_205_channel[i]->value(s205_channel[i].c_str()); txt_205_assign[i]->value(s205_asgn[i].c_str()); txt_205_rx_freq[i]->value(s205_rx_freq[i].c_str()); txt_205_rx_tone[i]->value(s205_rx_tone[i].c_str()); txt_205_tx_freq[i]->value(s205_tx_freq[i].c_str()); txt_205_tx_tone[i]->value(s205_tx_tone[i].c_str()); txt_205_mode_adm[i]->value(s205_mode_adm[i].c_str()); txt_205_remarks[i]->value(s205_remarks[i].c_str()); } txt_205_preparer->value(s205_preparer.c_str()); txt_205_county->value(s205_county.c_str()); txt_205_state->value(s205_state.c_str()); txt_205_latitude->value(s205_latitude.c_str()); txt_205_longitude->value(s205_longitude.c_str()); } void clear_205_form() { clear_205fields(); txt_205_name->value(""); txt_205_dt_prepared->value(""); txt_205_dt_op_from->value(""); txt_205_dt_op_to->value(""); for (int i = 0; i < 20; i++) { txt_205_func[i]->value(""); txt_205_channel[i]->value(""); txt_205_assign[i]->value(""); txt_205_rx_freq[i]->value(""); txt_205_rx_tone[i]->value(""); txt_205_tx_freq[i]->value(""); txt_205_tx_tone[i]->value(""); txt_205_mode_adm[i]->value(""); txt_205_remarks[i]->value(""); } txt_205_preparer->value(""); txt_205_county->value(""); txt_205_state->value(""); txt_205_latitude->value(""); txt_205_longitude->value(""); } void make_buff205(bool compress = false) { string mbuff; string temp; mbuff.clear(); mbuff.append( lineout( ics205_name, s205_name ) ); mbuff.append( lineout( ics205_dt1, s205_dt_prepared ) ); mbuff.append( lineout( ics205_dt2, s205_dt_op_from ) ); mbuff.append( lineout( ics205_dt3, s205_dt_op_to ) ); for (int i = 0; i < 20; i++) { temp = ics205_func; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_func[i] ) ); temp = ics205_chan; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_channel[i] ) ); temp = ics205_asgn; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_asgn[i] ) ); temp = ics205_rx_freq; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_rx_freq[i] ) ); temp = ics205_rx_tone; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_rx_tone[i] ) ); temp = ics205_tx_freq; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_tx_freq[i] ) ); temp = ics205_tx_tone; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_tx_tone[i] ) ); temp = ics205_mode_adm; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_mode_adm[i] ) ); temp = ics205_rem; temp.append(nbr[i]); mbuff.append( lineout ( temp, s205_remarks[i] ) ); } mbuff.append( lineout ( ics205_prep, s205_preparer ) ); mbuff.append( lineout ( ics205_county, s205_county ) ); mbuff.append( lineout ( ics205_state, s205_state ) ); mbuff.append( lineout ( ics205_latitude, s205_latitude ) ); mbuff.append( lineout ( ics205_longitude, s205_longitude ) ); if (compress) compress_maybe(mbuff); buff205.append(mbuff); } void read_205_buffer(string data) { string temp; clear_205fields(); read_header(data); s205_name = findstr(data, ics205_name); s205_dt_prepared = findstr(data, ics205_dt1); s205_dt_op_from = findstr(data, ics205_dt2); s205_dt_op_to = findstr(data, ics205_dt3); for (int i = 0; i < 20; i++) { temp = ics205_func; temp.append(nbr[i]); s205_func[i] = findstr(data, temp); temp = ics205_chan; temp.append(nbr[i]); s205_channel[i] = findstr(data, temp); temp = ics205_asgn; temp.append(nbr[i]); s205_asgn[i] = findstr(data, temp); temp = ics205_rx_freq; temp.append(nbr[i]); s205_rx_freq[i] = findstr(data, temp); temp = ics205_rx_tone; temp.append(nbr[i]); s205_rx_tone[i] = findstr(data, temp); temp = ics205_tx_freq; temp.append(nbr[i]); s205_tx_freq[i] = findstr(data, temp); temp = ics205_tx_tone; temp.append(nbr[i]); s205_tx_tone[i] = findstr(data, temp); temp = ics205_mode_adm; temp.append(nbr[i]); s205_mode_adm[i] = findstr(data, temp); temp = ics205_rem; temp.append(nbr[i]); s205_remarks[i] = findstr(data, temp); } s205_preparer = findstr(data, ics205_prep); s205_county = findstr(data, ics205_county); s205_state = findstr(data, ics205_state); s205_latitude = findstr(data, ics205_latitude); s205_longitude = findstr(data, ics205_longitude); update_205form(); } void cb_205_new() { if (check_205fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_205_save(); } } clear_205_form(); clear_header(); def_205_filename = ICS_msg_dir; def_205_filename.append("new"F205_EXT); show_filename(def_205_filename); using_ics205_template = false; } void cb_205_import() { fl_alert2("Not implemented"); } void cb_205_export() { fl_alert2("Not implemented"); } void cb_205_wrap_import(string wrapfilename, string inpbuffer) { clear_205_form(); read_205_buffer(inpbuffer); def_205_filename = ICS_msg_dir; def_205_filename.append(wrapfilename); show_filename(def_205_filename); using_ics205_template = false; } int eval_205_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_205_filename).append("]"); update_205fields(); update_header(FROM); evalstr.append(header("<ics205>")); buff205.clear(); make_buff205(true); if (buff205.empty()) return 0; compress_maybe( buff205 ); evalstr.append( buff205 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_205_wrap_export() { if (check_205fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_205fields(); if (base_205_filename == "new"F205_EXT || base_205_filename == "default"F205_EXT) if (!cb_205_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_205_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff205.assign(header("<ics205>")); make_buff205(true); export_wrapfile(base_205_filename, wrapfilename, buff205, pext != ".wrap"); buff205.assign(header("<ics205>")); make_buff205(false); write_205(def_205_filename); } } void cb_205_wrap_autosend() { if (check_205fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_205fields(); if (base_205_filename == "new"F205_EXT || base_205_filename == "default"F205_EXT) if (!cb_205_save_as()) return; update_header(FROM); buff205.assign(header("<ics205>")); make_buff205(true); xfr_via_socket(base_205_filename, buff205); buff205.assign(header("<ics205>")); make_buff205(false); write_205(def_205_filename); } void cb_205_load_template() { string def_205_filename = def_205_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T205_EXT, def_205_filename.c_str()); if (p) { clear_205_form(); read_data_file(p); def_205_TemplateName = p; show_filename(def_205_TemplateName); using_ics205_template = true; } } void cb_205_save_template() { if (!using_ics205_template) { cb_205_save_as_template(); return; } string def_205_filename = def_205_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T205_EXT, def_205_filename.c_str()); if (p) { update_header(CHANGED); buff205.assign(header("<ics205>")); make_buff205(); write_205(p); } } void cb_205_save_as_template() { string def_205_filename = def_205_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T205_EXT, def_205_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_205_TemplateName = p; if (strlen(pext) == 0) def_205_TemplateName.append(T205_EXT); remove_spaces_from_filename(def_205_TemplateName); clear_header(); update_header(CHANGED); buff205.assign(header("<ics205>")); make_buff205(); write_205(def_205_TemplateName); show_filename(def_205_TemplateName); using_ics205_template = true; } } void cb_205_open() { const char *p = FSEL::select(_("Open data file"), "ICS-205\t*"F205_EXT, def_205_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_205_form(); read_data_file(p); using_ics205_template = false; def_205_filename = p; show_filename(def_205_filename); } void write_205(string s) { FILE *file205 = fopen(s.c_str(), "w"); if (!file205) return; fwrite(buff205.c_str(), buff205.length(), 1, file205); fclose(file205); } bool cb_205_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F205_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_205_filename; p = FSEL::saveas(_("Save data file"), "ICS-205\t*"F205_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_205_filename = p; if (strlen(pext) == 0) def_205_filename.append(F205_EXT); remove_spaces_from_filename(def_205_filename); update_205fields(); clear_header(); update_header(CHANGED); buff205.assign(header("<ics205>")); make_buff205(); write_205(def_205_filename); using_ics205_template = false; show_filename(def_205_filename); return true; } void cb_205_save() { if (base_205_filename == "new"F205_EXT || base_205_filename == "default"F205_EXT || using_ics205_template == true) { cb_205_save_as(); return; } if (check_205fields()) update_header(CHANGED); update_205fields(); buff205.assign(header("<ics205>")); make_buff205(); write_205(def_205_filename); using_ics205_template = false; } void cb_205_html() { string temp; string fname_name = fl_filename_name(def_205_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics205_fname = ICS_dir; ics205_fname.append(fname_name); ics205_fname.append(".html"); string html_text = ""; update_205fields(); string form205 = ics205_html_template; replacestr(form205, TITLE, fname_name); replacestr(form205, ics205_name, s205_name); replacestr(form205, ics205_dt1, s205_dt_prepared); replacestr(form205, ics205_dt2, s205_dt_op_from); replacestr(form205, ics205_dt3, s205_dt_op_to); for (int i = 0; i < 20; i++) { temp = ics205_func; temp.append(nbr[i]); replacestr(form205, temp, s205_func[i]); temp = ics205_chan; temp.append(nbr[i]); replacestr(form205, temp, s205_channel[i]); temp = ics205_asgn; temp.append(nbr[i]); replacestr(form205, temp, s205_asgn[i]); temp = ics205_rx_freq; temp.append(nbr[i]); replacestr(form205, temp, s205_rx_freq[i]); temp = ics205_rx_tone; temp.append(nbr[i]); replacestr(form205, temp, s205_rx_tone[i]); temp = ics205_tx_freq; temp.append(nbr[i]); replacestr(form205, temp, s205_tx_freq[i]); temp = ics205_tx_tone; temp.append(nbr[i]); replacestr(form205, temp, s205_tx_tone[i]); temp = ics205_mode_adm; temp.append(nbr[i]); replacestr(form205, temp, s205_mode_adm[i]); temp = ics205_rem; temp.append(nbr[i]); replacestr(form205, temp, s205_remarks[i]); } replacestr(form205, ics205_prep, s205_preparer); replacestr(form205, ics205_county, s205_county); replacestr(form205, ics205_state, s205_state); replacestr(form205, ics205_latitude, s205_latitude); replacestr(form205, ics205_longitude, s205_longitude); FILE *file205 = fopen(ics205_fname.c_str(), "w"); fprintf(file205,"%s", form205.c_str()); fclose(file205); open_url(ics205_fname.c_str()); } void cb_205_msg_type() { if (tabs_msg_type->value() == tab_ics205 ) { show_filename(def_205_filename); } else { show_filename(def_rg_filename); } } void cb_205_textout() { string fld = ""; string temp = ""; string ics205_fname = ICS_dir; ics205_fname.append("ics205.txt"); update_205fields(); string form205 = ics205_text_template; replacestr(form205, ics205_name, s205_name); replacestr(form205, ics205_dt1, s205_dt_prepared); replacestr(form205, ics205_dt2, s205_dt_op_from); replacestr(form205, ics205_dt3, s205_dt_op_to); for (int i = 0; i < 20; i++) { fld = ics205_func; fld.append(nbr[i]); replacestr(form205, fld, s205_func[i]); fld = ics205_chan; fld.append(nbr[i]); replacestr(form205, fld, s205_channel[i]); fld = ics205_asgn; fld.append(nbr[i]); replacestr(form205, fld, s205_asgn[i]); fld = ics205_rx_freq; fld.append(nbr[i]); replacestr(form205, fld, s205_rx_freq[i]); fld = ics205_rx_tone; fld.append(nbr[i]); replacestr(form205, fld, s205_rx_tone[i]); fld = ics205_tx_freq; fld.append(nbr[i]); replacestr(form205, fld, s205_tx_freq[i]); fld = ics205_tx_tone; fld.append(nbr[i]); replacestr(form205, fld, s205_tx_tone[i]); fld = ics205_mode_adm; fld.append(nbr[i]); replacestr(form205, fld, s205_mode_adm[i]); fld = ics205_rem; fld.append(nbr[i]); temp = s205_remarks[i]; replacelf(temp); replacestr(form205, fld, temp); } replacestr(form205, ics205_prep, s205_preparer); replacestr(form205, ics205_county, s205_county); replacestr(form205, ics205_state, s205_state); replacestr(form205, ics205_latitude, s205_latitude); replacestr(form205, ics205_longitude, s205_longitude); FILE *file205 = fopen(ics205_fname.c_str(), "w"); fprintf(file205,"%s", form205.c_str()); fclose(file205); open_url(ics205_fname.c_str()); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics206_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000023603�12330516146�015007� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics206_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head>\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head>\ <body>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=2 VALIGN=middle WIDTH=200px><b>MEDICAL PLAN</b></td>\ <td VALIGN=top WIDTH=200px ALIGN=left>1. Incident Name</span><br>:nam:<br></td>\ <td COLSPAN=2 VALIGN=top WIDTH=200px>\ <div ALIGN=left>2. Date Prepared<br></div>\ <div ALIGN=left>:dat:</div>\ </td>\ <td VALIGN=top ALIGN=left WIDTH=200px>3. Time Prepared<br>:tim:</td>\ <td VALIGN=top ALIGN=left WIDTH=200px>4. Operational Period<br>:opp:</td>\ </tr>\ </tbody>\ </table>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9>5. Incident Medical Aid Station<br></td>\ </tr>\ <tr>\ <td VALIGN=middle>Medical Aid Stations<br></td>\ <td VALIGN=middle>Location<br></td>\ <td COLSPAN=1 VALIGN=top;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paramedics<br></td>\ </tr>\ <tr>\ <td VALIGN=top WIDTH=40%>:msta0:<br></td>\ <td VALIGN=top WIDTH=45%>:mloc0:<br></td>\ <td VALIGN=top WIDTH=15% ALIGN=center>:mpar0:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:msta1:<br></td>\ <td VALIGN=top>:mloc1:<br></td>\ <td VALIGN=top ALIGN=center>:mpar1:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:msta2:<br></td>\ <td VALIGN=top>:mloc2:<br></td>\ <td VALIGN=top ALIGN=center>:mpar2:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:msta3:<br></td>\ <td VALIGN=top>:mloc3:<br></td>\ <td VALIGN=top ALIGN=center>:mpar3:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:msta4:<br></td>\ <td VALIGN=top>:mloc4:<br></td>\ <td VALIGN=top ALIGN=center>:mpar4:<br></td>\ </tr>\ </tbody>\ </table>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=4 VALIGN=top BGCOLOR=#E9E9E9>6. Transportation<br></td>\ </tr>\ <tr ALIGN=center>\ <td COLSPAN=4 VALIGN=top; BGCOLOR=#E9E9E9>A. Ambulance Services<br></td>\ </tr>\ <tr>\ <td VALIGN=top WIDTH=25%>Name</td>\ <td VALIGN=top WIDTH=40%>Address<br></td>\ <td VALIGN=top WIDTH=20%>Phone<br></td>\ <td VALIGN=top WIDTH=15% ALIGN=center>Paramedics<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:tname0:<br></td>\ <td VALIGN=top>:taddr0:<br></td>\ <td VALIGN=top>:tphon0:<br></td>\ <td VALIGN=top ALIGN=center>:tpara0:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:tname1:<br></td>\ <td VALIGN=top>:taddr1:<br></td>\ <td VALIGN=top>:tphon1:<br></td>\ <td VALIGN=top ALIGN=center>:tpara1:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:tname2:<br></td>\ <td VALIGN=top>:taddr2:<br></td>\ <td VALIGN=top>:tphon2:<br></td>\ <td VALIGN=top ALIGN=center>:tpara2:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:tname3:<br></td>\ <td VALIGN=top>:taddr3:<br></td>\ <td VALIGN=top>:tphon3:<br></td>\ <td VALIGN=top ALIGN=center>:tpara3:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:tname4:<br></td>\ <td VALIGN=top>:taddr4:<br></td>\ <td VALIGN=top>:tphon4:<br></td>\ <td VALIGN=top ALIGN=center>:tpara4:<br></td>\ </tr>\ </tbody>\ </table>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9>B. Incident Ambulances<br></td>\ </tr>\ <tr>\ <td VALIGN=top WIDTH=25%>Name<br></td>\ <td VALIGN=top WIDTH=60%>Location<br></td>\ <td VALIGN=top WIDTH=15%; ALIGN=center>Paramedics<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:aname0:<br></td>\ <td VALIGN=top>:aloca0:<br></td>\ <td VALIGN=top ALIGN=center>:apara0:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:aname1:<br></td>\ <td VALIGN=top>:aloca1:<br></td>\ <td VALIGN=top ALIGN=center>:apara1:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:aname2:<br></td>\ <td VALIGN=top>:aloca2:<br></td>\ <td VALIGN=top ALIGN=center>:apara2:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:aname3:<br></td>\ <td VALIGN=top>:aloca3:<br></td>\ <td VALIGN=top ALIGN=center>:apara3:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:aname4:<br></td>\ <td VALIGN=top>:aloca4:<br></td>\ <td VALIGN=top ALIGN=center>:apara4:<br></td>\ </tr>\ </tbody>\ </table>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=7 VALIGN=top BGCOLOR=#E9E9E9>7. Hospitals<br></td>\ </tr>\ <tr>\ <td VALIGN=bottom WIDTH=20%>Name<br></td>\ <td VALIGN=bottom WIDTH=30%>Address<br></td>\ <td COLSPAN=2 VALIGN=top WIDTH=10%>&nbsp; Travel Time<br>&nbsp; Air&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; Grnd<br></td>\ <td VALIGN=bottom WIDTH=15%>Phone<br></td>\ <td VALIGN=bottom WIDTH=5%>Helipad<br></td>\ <td VALIGN=top WIDTH=5% ALIGN=center>Burn<br>Center<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:hname0:<br></td>\ <td VALIGN=top>:haddr0:<br></td>\ <td VALIGN=top WIDTH=5%>:hatim0:<br></td>\ <td VALIGN=top WIDTH=5%>:hgtim0:<br></td>\ <td VALIGN=top>:hphon0:<br></td>\ <td VALIGN=top ALIGN=center>:hheli0:<br></td>\ <td VALIGN=top ALIGN=center>:hburn0:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:hname1:<br></td>\ <td VALIGN=top>:haddr1:<br></td>\ <td VALIGN=top>:hatim1:<br></td>\ <td VALIGN=top>:hgtim1:<br></td>\ <td VALIGN=top>:hphon1:<br></td>\ <td VALIGN=top ALIGN=center>:hheli1:<br></td>\ <td VALIGN=top ALIGN=center>:hburn1:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:hname2:<br></td>\ <td VALIGN=top>:haddr2:<br></td>\ <td VALIGN=top>:hatim2:<br></td>\ <td VALIGN=top>:hgtim2:<br></td>\ <td VALIGN=top>:hphon2:<br></td>\ <td VALIGN=top ALIGN=center>:hheli2:<br></td>\ <td VALIGN=top ALIGN=center>:hburn2:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:hname3:<br></td>\ <td VALIGN=top>:haddr3:<br></td>\ <td VALIGN=top>:hatim3:<br></td>\ <td VALIGN=top>:hgtim3:<br></td>\ <td VALIGN=top>:hphon3:<br></td>\ <td VALIGN=top ALIGN=center>:hheli3:<br></td>\ <td VALIGN=top ALIGN=center>:hburn3:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:hname4:<br></td>\ <td VALIGN=top>:haddr4:<br></td>\ <td VALIGN=top>:hatim4:<br></td>\ <td VALIGN=top>:hgtim4:<br></td>\ <td VALIGN=top>:hphon4:<br></td>\ <td VALIGN=top ALIGN=center>:hheli4:<br></td>\ <td VALIGN=top ALIGN=center>:hburn4:<br></td>\ </tr>\ </tbody>\ </table>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=2 VALIGN=top BGCOLOR=#E9E9E9>8. Medical Emergency Procedures<br></td>\ </tr>\ <tr>\ <td COLSPAN=2 VALIGN=top HEIGHT=200px>:proc:<br></td>\ </tr>\ <tr>\ <td VALIGN=top WIDTH=50%>9. Prepared by (Medical Unit Leader)<br>:prep:<br></td>\ <td VALIGN=top>10.Reviewed by (Safety Officer)<br>:rvwr:<br></td>\ </tr>\ </tbody>\ </table>\ </body>\ </html>"; const char ics206_text_template[] = "ICS 206 MEDICAL PLAN\n\n\ Incident name: :nam:\n\ Operational period: :opp:\n\ Date Prepared: :dat:\n\ Time Prepared: :tim:\n\ Medical Aid Station #1: :msta0:\n\ Location #1: :mloc0:\n\ Paramedics #1: :mpar0:\n\ Medical Aid Station #2: :msta1:\n\ Location #2: :mloc1:\n\ Paramedics #2: :mpar1:\n\ Medical Aid Station #3: :msta2:\n\ Location #3: :mloc2:\n\ Paramedics #3: :mpar2:\n\ Medical Aid Station #4: :msta3:\n\ Location #4: :mloc3:\n\ Paramedics #4: :mpar3:\n\ Medical Aid Station #5: :msta4:\n\ Location #5: :mloc4:\n\ Paramedics #5: :mpar4:\n\ Ambulance service #1: :tname0:\n\ Address #1: :taddr0:\n\ Phone #1: :tphon0:\n\ Paramedics #1: :tpara0:\n\ Ambulance service #2: :tname1:\n\ Address #2: :taddr1:\n\ Phone #2: :tphon1:\n\ Paramedics #2: :tpara1:\n\ Ambulance service #3: :tname2:\n\ Address #3: :taddr2:\n\ Phone #3: :tphon2:\n\ Paramedics #3: :tpara2:\n\ Ambulance service #4: :tname3:\n\ Address #4: :taddr3:\n\ Phone #4: :tphon3:\n\ Paramedics #4: :tpara3:\n\ Ambulance service #5: :tname4:\n\ Address #5: :taddr4:\n\ Phone #5: :tphon4:\n\ Paramedics #5: :tpara4:\n\ Incident ambulance name #1: :aname0:\n\ Location #1: :aloca0:\n\ Paramedics #1 :apara0:\n\ Incident ambulance name #2: :aname1:\n\ Location #2: :aloca1:\n\ Paramedics #2 :apara1:\n\ Incident ambulance name #3: :aname2:\n\ Location #3: :aloca2:\n\ Paramedics #3 :apara2:\n\ Incident ambulance name #4: :aname3:\n\ Location #4: :aloca3:\n\ Paramedics #4 :apara3:\n\ Incident ambulance name #5: :aname4:\n\ Location #5: :aloca4:\n\ Paramedics #5 :apara4:\n\ Hospital name #1: :hname0:\n\ Address #1: :haddr0:\n\ Travel time, air #1: :hatim0:\n\ Travel time, ground #1: :hgtim0:\n\ Phone #1: :hphon0:\n\ Helipad #1: :hheli0:\n\ Burn center #1: :hburn0:\n\ Hospital name #2: :hname1:\n\ Address #2: :haddr1:\n\ Travel time, air #2: :hatim1:\n\ Travel time, ground #2: :hgtim1:\n\ Phone #2: :hphon1:\n\ Helipad #2: :hheli1:\n\ Burn center #2: :hburn1:\n\ Hospital name #3: :hname2:\n\ Address #3: :haddr2:\n\ Travel time, air #3: :hatim2:\n\ Travel time, ground #3: :hgtim2:\n\ Phone #3: :hphon2:\n\ Helipad #3: :hheli2:\n\ Burn center #3: :hburn2:\n\ Hospital name #4: :hname3:\n\ Address #4: :haddr3:\n\ Travel time, air #4: :hatim3:\n\ Travel time, ground #4: :hgtim3:\n\ Phone #4: :hphon3:\n\ Helipad #4: :hheli3:\n\ Burn center #4: :hburn3:\n\ Hospital name #5: :hname4:\n\ Address #5: :haddr4:\n\ Travel time, air #5: :hatim4:\n\ Travel time, ground #5: :hgtim4:\n\ Phone #5: :hphon4:\n\ Helipad #5: :hheli4:\n\ Burn center #5: :hburn4:\n\ Medical Emergency Procedures: :proc:\n\ Prepared by: :prep:\n\ Reviewed by: :rvwr:\n\ "; �����������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics214_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000027141�12330516146�013557� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics214 = (Fl_Group *)0; Fl_Tabs *tab_ics214_type = (Fl_Tabs *)0; Fl_Group *tab_214_1 = (Fl_Group *)0; Fl_Input2 *txt_214_incident = (Fl_Input2 *)0; Fl_Input2 *txt_214_date = (Fl_Input2 *)0; Fl_Input2 *txt_214_unit_name = (Fl_Input2 *)0; Fl_Input2 *txt_214_unit_leader = (Fl_Input2 *)0; Fl_Button *btn_214_date = (Fl_Button *)0; Fl_Input2 *txt_214_time = (Fl_Input2 *)0; Fl_Button *btn_214_time = (Fl_Button *)0; Fl_Input2 *txt_214_op_period = (Fl_Input2 *)0; Fl_Input2 *txt_214_prepared_by = (Fl_Input2 *)0; Fl_Group *tab_214_2 = (Fl_Group *)0; Fl_Input2 *txt_214_roster_name[16]={(Fl_Input2 *)0}; Fl_Input2 *txt_214_roster_position[16]={(Fl_Input2 *)0}; Fl_Input2 *txt_214_roster_home_base[16]={(Fl_Input2 *)0}; Fl_Group *tab_214_3 = (Fl_Group *)0; Fl_Input2 *txt_214_activity_time[16]={(Fl_Input2 *)0}; Fl_Input2 *txt_214_activity_event[16]={(Fl_Input2 *)0}; static void cb_btn_214_date(Fl_Button*, void*) { cb_214_set_date(); } static void cb_btn_214_time(Fl_Button*, void*) { cb_214_set_time(); } void create_ics214_tab() { int Y = tab_top; tab_ics214 = new Fl_Group(0, Y, 570, 390); tab_ics214->align(FL_ALIGN_TOP); tab_ics214_type = new Fl_Tabs(0, Y, 570, 387); tab_ics214_type->selection_color((Fl_Color)246); tab_214_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 170); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_214_incident = new Fl_Input2(135, Y+38, 425, 24, _("Incident Name")); txt_214_incident->tooltip(_("Incident name")); txt_214_incident->box(FL_DOWN_BOX); txt_214_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_incident->labeltype(FL_NORMAL_LABEL); txt_214_incident->labelfont(0); txt_214_incident->labelsize(14); txt_214_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_incident->align(FL_ALIGN_LEFT); txt_214_incident->callback(ics_changed); txt_214_incident->when(FL_WHEN_CHANGED); txt_214_date = new Fl_Input2(135, Y+65, 155, 24, _("Date Prepared")); txt_214_date->tooltip(_("Date prepared")); txt_214_date->box(FL_DOWN_BOX); txt_214_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_date->labeltype(FL_NORMAL_LABEL); txt_214_date->labelfont(0); txt_214_date->labelsize(14); txt_214_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_date->align(FL_ALIGN_LEFT); txt_214_date->callback(ics_changed); txt_214_date->when(FL_WHEN_CHANGED); btn_214_date = new Fl_Button(294, Y+67, 20, 20, _("...")); btn_214_date->tooltip(_("Set today")); btn_214_date->callback((Fl_Callback*)cb_btn_214_date); txt_214_time = new Fl_Input2(135, Y+90, 103, 24, _("Time Prepared")); txt_214_time->tooltip(_("Time prepared")); txt_214_time->box(FL_DOWN_BOX); txt_214_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_time->labeltype(FL_NORMAL_LABEL); txt_214_time->labelfont(0); txt_214_time->labelsize(14); txt_214_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_time->align(FL_ALIGN_LEFT); txt_214_time->callback(ics_changed); txt_214_time->when(FL_WHEN_CHANGED); btn_214_time = new Fl_Button(247, Y+92, 20, 20, _("...")); btn_214_time->tooltip(_("Set time now")); btn_214_time->callback((Fl_Callback*)cb_btn_214_time); txt_214_unit_name = new Fl_Input2(135, Y+115, 425, 24, _("Unit Name")); txt_214_unit_name->tooltip(_("Name / Designation")); txt_214_unit_name->box(FL_DOWN_BOX); txt_214_unit_name->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_unit_name->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_unit_name->labeltype(FL_NORMAL_LABEL); txt_214_unit_name->labelfont(0); txt_214_unit_name->labelsize(14); txt_214_unit_name->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_unit_name->align(FL_ALIGN_LEFT); txt_214_unit_name->callback(ics_changed); txt_214_unit_name->when(FL_WHEN_CHANGED); txt_214_unit_leader = new Fl_Input2(135, Y+140, 425, 24, _("Unit leader")); txt_214_unit_leader->tooltip(_("Name and Position")); txt_214_unit_leader->box(FL_DOWN_BOX); txt_214_unit_leader->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_unit_leader->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_unit_leader->labeltype(FL_NORMAL_LABEL); txt_214_unit_leader->labelfont(0); txt_214_unit_leader->labelsize(14); txt_214_unit_leader->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_unit_leader->align(FL_ALIGN_LEFT); txt_214_unit_leader->callback(ics_changed); txt_214_unit_leader->when(FL_WHEN_CHANGED); txt_214_op_period = new Fl_Input2(135, Y+165, 425, 24, _("Oper\' Period")); txt_214_op_period->tooltip(_("Date / Time")); txt_214_op_period->box(FL_DOWN_BOX); txt_214_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_op_period->labeltype(FL_NORMAL_LABEL); txt_214_op_period->labelfont(0); txt_214_op_period->labelsize(14); txt_214_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_op_period->align(FL_ALIGN_LEFT); txt_214_op_period->callback(ics_changed); txt_214_op_period->when(FL_WHEN_CHANGED); o->end(); } { Fl_Group* o = new Fl_Group(2, Y+203, 566, 35); o->box(FL_ENGRAVED_FRAME); txt_214_prepared_by = new Fl_Input2(135, Y+208, 425, 24, _("Prepared By")); txt_214_prepared_by->tooltip(_("Name and Position")); txt_214_prepared_by->box(FL_DOWN_BOX); txt_214_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_prepared_by->labeltype(FL_NORMAL_LABEL); txt_214_prepared_by->labelfont(0); txt_214_prepared_by->labelsize(14); txt_214_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_prepared_by->align(FL_ALIGN_LEFT); txt_214_prepared_by->callback(ics_changed); txt_214_prepared_by->when(FL_WHEN_CHANGED); o->end(); } tab_214_1->end(); tab_214_2 = new Fl_Group(0, Y+25, 570, 360, _("Roster")); tab_214_2->hide(); { Fl_Box* o = new Fl_Box(5, Y+32, 180, 20, _("Name")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Box* o = new Fl_Box(186, Y+32, 180, 20, _("ICS Position")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Box* o = new Fl_Box(367, Y+32, 180, 20, _("Home Base")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); o->type(2); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 16; i++) { txt_214_roster_name[i] = new Fl_Input2(5, Y+50 + i*24, 180, 24); txt_214_roster_name[i]->tooltip(_("")); txt_214_roster_name[i]->box(FL_DOWN_BOX); txt_214_roster_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_roster_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_roster_name[i]->labeltype(FL_NORMAL_LABEL); txt_214_roster_name[i]->labelfont(0); txt_214_roster_name[i]->labelsize(14); txt_214_roster_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_roster_name[i]->align(FL_ALIGN_CENTER); txt_214_roster_name[i]->callback(ics_changed); txt_214_roster_name[i]->when(FL_WHEN_CHANGED); txt_214_roster_position[i] = new Fl_Input2(186, Y+50 + i*24, 180, 24); txt_214_roster_position[i]->tooltip(_("")); txt_214_roster_position[i]->box(FL_DOWN_BOX); txt_214_roster_position[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_roster_position[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_roster_position[i]->labeltype(FL_NORMAL_LABEL); txt_214_roster_position[i]->labelfont(0); txt_214_roster_position[i]->labelsize(14); txt_214_roster_position[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_roster_position[i]->align(FL_ALIGN_CENTER); txt_214_roster_position[i]->callback(ics_changed); txt_214_roster_position[i]->when(FL_WHEN_CHANGED); txt_214_roster_home_base[i] = new Fl_Input2(367, Y+50 + i*24, 180, 24); txt_214_roster_home_base[i]->tooltip(_("")); txt_214_roster_home_base[i]->box(FL_DOWN_BOX); txt_214_roster_home_base[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_roster_home_base[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_roster_home_base[i]->labeltype(FL_NORMAL_LABEL); txt_214_roster_home_base[i]->labelfont(0); txt_214_roster_home_base[i]->labelsize(14); txt_214_roster_home_base[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_roster_home_base[i]->align(FL_ALIGN_CENTER); txt_214_roster_home_base[i]->callback(ics_changed); txt_214_roster_home_base[i]->when(FL_WHEN_CHANGED); } o->end(); } tab_214_2->end(); tab_214_3 = new Fl_Group(0, Y+25, 570, 360, _("Activity Log")); tab_214_3->hide(); tab_214_2->hide(); { Fl_Box* o = new Fl_Box(5, Y+32, 100, 20, _("Time")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Box* o = new Fl_Box(106, Y+32, 440, 20, _("Major Events")); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); } { Fl_Scroll* o = new Fl_Scroll(4, Y+54, 560, 320); o->type(2); o->box(FL_THIN_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 16; i++) { txt_214_activity_time[i] = new Fl_Input2(5, Y+50 + i*24, 100, 24); txt_214_activity_time[i]->tooltip(_("")); txt_214_activity_time[i]->box(FL_DOWN_BOX); txt_214_activity_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_activity_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_activity_time[i]->labeltype(FL_NORMAL_LABEL); txt_214_activity_time[i]->labelfont(0); txt_214_activity_time[i]->labelsize(14); txt_214_activity_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_activity_time[i]->align(FL_ALIGN_CENTER); txt_214_activity_time[i]->callback(ics_changed); txt_214_activity_time[i]->when(FL_WHEN_CHANGED); txt_214_activity_event[i] = new Fl_Input2(106, Y+50 + i*24, 442, 24); txt_214_activity_event[i]->tooltip(_("")); txt_214_activity_event[i]->box(FL_DOWN_BOX); txt_214_activity_event[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_214_activity_event[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_214_activity_event[i]->labeltype(FL_NORMAL_LABEL); txt_214_activity_event[i]->labelfont(0); txt_214_activity_event[i]->labelsize(14); txt_214_activity_event[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_214_activity_event[i]->align(FL_ALIGN_CENTER); txt_214_activity_event[i]->callback(ics_changed); txt_214_activity_event[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Scroll* o tab_214_3->end(); tab_ics214_type->end(); Fl_Group::current()->resizable(tab_ics214_type); tab_ics214->end(); tab_ics214->hide(); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics216_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000021722�12330516146�015010� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics216_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head>\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table ALIGN=left WIDTH=1600px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr>\ <td COLSPAN=5 VALIGN=middle><big><center><b>RADIO REQUIREMENTS WORKSHEET</b></center></big></td>\ <td COLSPAN=5><b>1. Incident name</b><br>:inc:<br></td>\ <td COLSPAN=3><b>2.Date Prepared</span></b><br>:dat:<br></td>\ <td COLSPAN=3><b>3.Time Prepared</span></b><br>:tim:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4><b>4. Branch</b><br>:br:<br></td>\ <td COLSPAN=4><b>5. Agency</b><br>:agc:<br></td>\ <td COLSPAN=4><b>6. Operational Period</b><br>:opp:<br></td>\ <td COLSPAN=4><b>7. Tactical Frequency</b><br>:tfr:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4><b>8. Division/Group</b><br>:div[0]:<br></td>\ <td COLSPAN=4><b>Division/Group</b><br>:div[1]:<br></td>\ <td COLSPAN=4><b>Division/Group</b><br>:div[2]:<br></td>\ <td COLSPAN=4><b>Division/Group</b><br>:div[3]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4><b>Agency</b><br>:agy[0]:<br></td>\ <td COLSPAN=4><b>Agency</b><br>:agy[1]:<br></td>\ <td COLSPAN=4><b>Agency</b><br>:agy[2]:<br></td>\ <td COLSPAN=4><b>Agency</b><br>:agy[3]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1><b>9. Agency</b></td>\ <td COLSPAN=1><center><b>ID No.</b></center></td>\ <td COLSPAN=2><center><b>Radio Requirements</b></center></td>\ <td COLSPAN=1><center><b>Agency</b></center></td>\ <td COLSPAN=1><center><b>ID No.</b></center></td>\ <td COLSPAN=2><center><b>Radio Requirements</b></center></td>\ <td COLSPAN=1><center><b>Agency</b></center></td>\ <td COLSPAN=1><center><b>ID No.</b></center></td>\ <td COLSPAN=2><center><b>Radio Requirements</b></center></td>\ <td COLSPAN=1><center><b>Agency</b></center></td>\ <td COLSPAN=1><center><b>ID No.</b></center></td>\ <td COLSPAN=2><center><b>Radio Requirements</b></center></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[0]:<br></td>\ <td COLSPAN=1>:id[0]:<br></td>\ <td COLSPAN=2>:rr[0]:<br></td>\ <td COLSPAN=1>:ag[9]:<br></td>\ <td COLSPAN=1>:id[9]:<br></td>\ <td COLSPAN=2>:rr[9]:<br></td>\ <td COLSPAN=1>:ag[18]:<br></td>\ <td COLSPAN=1>:id[18]:<br></td>\ <td COLSPAN=2>:rr[18]:<br></td>\ <td COLSPAN=1>:ag[27]:<br></td>\ <td COLSPAN=1>:id[27]:<br></td>\ <td COLSPAN=2>:rr[27]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[1]:<br></td>\ <td COLSPAN=1>:id[1]:<br></td>\ <td COLSPAN=2>:rr[1]:<br></td>\ <td COLSPAN=1>:ag[10]:<br></td>\ <td COLSPAN=1>:id[10]:<br></td>\ <td COLSPAN=2>:rr[10]:<br></td>\ <td COLSPAN=1>:ag[19]:<br></td>\ <td COLSPAN=1>:id[19]:<br></td>\ <td COLSPAN=2>:rr[19]:<br></td>\ <td COLSPAN=1>:ag[28]:<br></td>\ <td COLSPAN=1>:id[28]:<br></td>\ <td COLSPAN=2>:rr[28]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[2]:<br></td>\ <td COLSPAN=1>:id[2]:<br></td>\ <td COLSPAN=2>:rr[2]:<br></td>\ <td COLSPAN=1>:ag[11]:<br></td>\ <td COLSPAN=1>:id[11]:<br></td>\ <td COLSPAN=2>:rr[11]:<br></td>\ <td COLSPAN=1>:ag[20]:<br></td>\ <td COLSPAN=1>:id[20]:<br></td>\ <td COLSPAN=2>:rr[20]:<br></td>\ <td COLSPAN=1>:ag[29]:<br></td>\ <td COLSPAN=1>:id[29]:<br></td>\ <td COLSPAN=2>:rr[29]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[3]:<br></td>\ <td COLSPAN=1>:id[3]:<br></td>\ <td COLSPAN=2>:rr[3]:<br></td>\ <td COLSPAN=1>:ag[12]:<br></td>\ <td COLSPAN=1>:id[12]:<br></td>\ <td COLSPAN=2>:rr[12]:<br></td>\ <td COLSPAN=1>:ag[21]:<br></td>\ <td COLSPAN=1>:id[21]:<br></td>\ <td COLSPAN=2>:rr[21]:<br></td>\ <td COLSPAN=1>:ag[30]:<br></td>\ <td COLSPAN=1>:id[30]:<br></td>\ <td COLSPAN=2>:rr[30]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[4]:<br></td>\ <td COLSPAN=1>:id[4]:<br></td>\ <td COLSPAN=2>:rr[4]:<br></td>\ <td COLSPAN=1>:ag[13]:<br></td>\ <td COLSPAN=1>:id[13]:<br></td>\ <td COLSPAN=2>:rr[13]:<br></td>\ <td COLSPAN=1>:ag[22]:<br></td>\ <td COLSPAN=1>:id[22]:<br></td>\ <td COLSPAN=2>:rr[22]:<br></td>\ <td COLSPAN=1>:ag[31]:<br></td>\ <td COLSPAN=1>:id[31]:<br></td>\ <td COLSPAN=2>:rr[31]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[5]:<br></td>\ <td COLSPAN=1>:id[5]:<br></td>\ <td COLSPAN=2>:rr[5]:<br></td>\ <td COLSPAN=1>:ag[14]:<br></td>\ <td COLSPAN=1>:id[14]:<br></td>\ <td COLSPAN=2>:rr[14]:<br></td>\ <td COLSPAN=1>:ag[23]:<br></td>\ <td COLSPAN=1>:id[23]:<br></td>\ <td COLSPAN=2>:rr[23]:<br></td>\ <td COLSPAN=1>:ag[32]:<br></td>\ <td COLSPAN=1>:id[32]:<br></td>\ <td COLSPAN=2>:rr[32]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[6]:<br></td>\ <td COLSPAN=1>:id[6]:<br></td>\ <td COLSPAN=2>:rr[6]:<br></td>\ <td COLSPAN=1>:ag[15]:<br></td>\ <td COLSPAN=1>:id[15]:<br></td>\ <td COLSPAN=2>:rr[15]:<br></td>\ <td COLSPAN=1>:ag[24]:<br></td>\ <td COLSPAN=1>:id[24]:<br></td>\ <td COLSPAN=2>:rr[24]:<br></td>\ <td COLSPAN=1>:ag[33]:<br></td>\ <td COLSPAN=1>:id[33]:<br></td>\ <td COLSPAN=2>:rr[33]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[7]:<br></td>\ <td COLSPAN=1>:id[7]:<br></td>\ <td COLSPAN=2>:rr[7]:<br></td>\ <td COLSPAN=1>:ag[16]:<br></td>\ <td COLSPAN=1>:id[16]:<br></td>\ <td COLSPAN=2>:rr[16]:<br></td>\ <td COLSPAN=1>:ag[25]:<br></td>\ <td COLSPAN=1>:id[25]:<br></td>\ <td COLSPAN=2>:rr[25]:<br></td>\ <td COLSPAN=1>:ag[34]:<br></td>\ <td COLSPAN=1>:id[34]:<br></td>\ <td COLSPAN=2>:rr[34]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=1>:ag[8]:<br></td>\ <td COLSPAN=1>:id[8]:<br></td>\ <td COLSPAN=2>:rr[8]:<br></td>\ <td COLSPAN=1>:ag[17]:<br></td>\ <td COLSPAN=1>:id[17]:<br></td>\ <td COLSPAN=2>:rr[17]:<br></td>\ <td COLSPAN=1>:ag[26]:<br></td>\ <td COLSPAN=1>:id[26]:<br></td>\ <td COLSPAN=2>:rr[26]:<br></td>\ <td COLSPAN=1>:ag[35]:<br></td>\ <td COLSPAN=1>:id[35]:<br></td>\ <td COLSPAN=2>:rr[35]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4><center><b>Page __ of __</b></center></td>\ <td COLSPAN=12><b>10. Prepared by (Name and Position)</b><br>:pre:<br></td>\ </tr>\ <tr>\ <td VALIGN=center WIDTH=100px HEIGHT=20px>ICS-216</td>\ <td></td><td></td><td></td><td></td><td></td><td></td>\ <td></td><td></td><td></td><td></td><td></td><td></td>\ <td></td><td></td><td></td>\ </tr>\ </tbody>\ </table>\ </body></html>"; const char ics216_text_template[] = "ICS 216 RADIO REQUIREMENTS WORKSHEET\n\n\ 1. Incident name: :inc:\n\ 2. Date Prepared: :dat:\n\ 3. Time Prepared: :tim:\n\ 4. Branch: :br:\n\ 5. Agency: :agc:\n\ 6. Operational Period: :opp:\n\ 7. Tactical Frequency: :tfr:\n\ 8. Division/Group: :div[0]:\n\ Agency: :agy[0]:\n\ Division/Group :div[1]:\n\ Agency :div[2]:\n\ Division/Group :div[3]:\n\ Abency: :agy[1]:\n\ Division/Group :agy[2]:\n\ Agency: :agy[3]:\n\ 9. Agency / ID / Radio Requirements\n\ :ag[0]: / :id[0]:/ :rr[0]:\n\ :ag[1]: / :id[1]:/ :rr[1]:\n\ :ag[2]: / :id[2]:/ :rr[2]:\n\ :ag[3]: / :id[3]:/ :rr[3]:\n\ :ag[4]: / :id[4]:/ :rr[4]:\n\ :ag[5]: / :id[5]:/ :rr[5]:\n\ :ag[6]: / :id[6]:/ :rr[6]:\n\ :ag[7]: / :id[7]:/ :rr[7]:\n\ :ag[8]: / :id[8]:/ :rr[8]:\n\ :ag[9]: / :id[9]:/ :rr[9]:\n\ :ag[10]: / :id[10]:/ :rr[10]:\n\ :ag[11]: / :id[11]:/ :rr[11]:\n\ :ag[12]: / :id[12]:/ :rr[12]:\n\ :ag[13]: / :id[13]:/ :rr[13]:\n\ :ag[14]: / :id[14]:/ :rr[14]:\n\ :ag[15]: / :id[15]:/ :rr[15]:\n\ :ag[16]: / :id[16]:/ :rr[16]:\n\ :ag[17]: / :id[17]:/ :rr[17]:\n\ :ag[18]: / :id[18]:/ :rr[18]:\n\ :ag[19]: / :id[19]:/ :rr[19]:\n\ :ag[20]: / :id[20]:/ :rr[20]:\n\ :ag[21]: / :id[21]:/ :rr[21]:\n\ :ag[22]: / :id[22]:/ :rr[22]:\n\ :ag[23]: / :id[23]:/ :rr[23]:\n\ :ag[24]: / :id[24]:/ :rr[24]:\n\ :ag[25]: / :id[25]:/ :rr[25]:\n\ :ag[26]: / :id[26]:/ :rr[26]:\n\ :ag[27]: / :id[27]:/ :rr[27]:\n\ :ag[28]: / :id[28]:/ :rr[28]:\n\ :ag[29]: / :id[29]:/ :rr[29]:\n\ :ag[30]: / :id[30]:/ :rr[30]:\n\ :ag[31]: / :id[31]:/ :rr[31]:\n\ :ag[32]: / :id[32]:/ :rr[32]:\n\ :ag[33]: / :id[33]:/ :rr[33]:\n\ :ag[34]: / :id[34]:/ :rr[34]:\n\ :ag[35]: / :id[35]:/ :rr[35]:\n\ 10. Prepared by: :pre:\n\ "; ����������������������������������������������flmsg-2.0.10/src/ics/ics309.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000044736�12330516146�012747� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 309 field variables and template variables // --------------------------------------------------------------------- string ics309_incident = ":inc:"; string ics309_date_fm = ":dfm:"; string ics309_time_fm = ":tfm:"; string ics309_date_to = ":dto:"; string ics309_time_to = ":tto:"; string ics309_prepared_by = ":pre:"; string ics309_preparer_date_time = ":dtm:"; string ics309_radio_net = ":net:"; string ics309_radio_operator = ":opr:"; string ics309_comm_msg = ":msg[n]:"; // 34 string ics309_comm_to = ":to[n]:"; // 34 string ics309_comm_from = ":fm[n]:"; // 34 string ics309_comm_time = ":tm[n]:"; // 34 string s309_incident; string s309_date_fm; string s309_time_fm; string s309_date_to; string s309_time_to; string s309_prepared_by; string s309_preparer_date_time; string s309_radio_net; string s309_radio_operator; string s309_comm_time[34]; string s309_comm_from[34]; string s309_comm_msg[34]; string s309_comm_to[34]; // ===================================================================== string buff309; string def_309_filename = ""; string base_309_filename = ""; string def_309_TemplateName = ""; bool using_ics309_template = false; void cb_309_set_date_fm() { txt_309_date_fm->value(szDate()); } void cb_309_set_time_fm() { txt_309_time_fm->value(szTime()); } void cb_309_set_date_to() { txt_309_date_to->value(szDate()); } void cb_309_set_time_to() { txt_309_time_to->value(szTime()); } void cb_309_set_date_time() { string dt = szDate(); dt.append(", ").append(szTime()); txt_309_preparer_date_time->value(dt.c_str()); } void clear_309fields() { s309_incident.clear(); s309_date_fm.clear(); s309_time_fm.clear(); s309_date_to.clear(); s309_time_to.clear(); s309_prepared_by.clear(); s309_preparer_date_time.clear(); s309_radio_net.clear(); s309_radio_operator.clear(); for (int i = 0; i < 34; i++) { s309_comm_msg[i].clear(); s309_comm_to[i].clear(); s309_comm_from[i].clear(); } } bool check_309fields() { if (s309_incident != txt_309_incident->value()) return true; if (s309_date_fm != txt_309_date_fm->value()) return true; if (s309_time_fm != txt_309_time_fm->value()) return true; if (s309_date_to != txt_309_date_to->value()) return true; if (s309_time_to != txt_309_time_to->value()) return true; if (s309_prepared_by != txt_309_prepared_by->value()) return true; if (s309_radio_net != txt_309_radio_net->value()) return true; if (s309_radio_operator != txt_309_radio_operator->value()) return true; if (s309_preparer_date_time != txt_309_preparer_date_time->value()) return true; for (int i = 0; i < 34; i++) { if (s309_comm_time[i] != txt_309_comm_time[i]->value()) return true; if (s309_comm_msg[i] != txt_309_comm_msg[i]->value()) return true; if (s309_comm_to[i] != txt_309_comm_to[i]->value()) return true; if (s309_comm_from[i] != txt_309_comm_from[i]->value()) return true; } return false; } void update_309fields() { s309_incident = txt_309_incident->value(); s309_date_fm = txt_309_date_fm->value(); s309_time_fm = txt_309_time_fm->value(); s309_date_to = txt_309_date_to->value(); s309_time_to = txt_309_time_to->value(); s309_prepared_by = txt_309_prepared_by->value(); s309_radio_net = txt_309_radio_net->value(); s309_radio_operator = txt_309_radio_operator->value(); s309_preparer_date_time = txt_309_preparer_date_time->value(); for (int i = 0; i < 34; i++) { s309_comm_time[i] = txt_309_comm_time[i]->value(); s309_comm_from[i] = txt_309_comm_from[i]->value(); s309_comm_to[i] = txt_309_comm_to[i]->value(); s309_comm_msg[i] = txt_309_comm_msg[i]->value(); } } void update_309form() { txt_309_incident->value(s309_incident.c_str()); txt_309_date_fm->value(s309_date_fm.c_str()); txt_309_time_fm->value(s309_time_fm.c_str()); txt_309_date_to->value(s309_date_to.c_str()); txt_309_time_to->value(s309_time_to.c_str()); txt_309_prepared_by->value(s309_prepared_by.c_str()); txt_309_radio_net->value(s309_radio_net.c_str()); txt_309_radio_operator->value(s309_radio_operator.c_str()); txt_309_preparer_date_time->value(s309_preparer_date_time.c_str()); for (int i = 0; i < 34; i++) { txt_309_comm_time[i]->value(s309_comm_time[i].c_str()); txt_309_comm_to[i]->value(s309_comm_to[i].c_str()); txt_309_comm_from[i]->value(s309_comm_from[i].c_str()); txt_309_comm_msg[i]->value(s309_comm_msg[i].c_str()); } } void clear_309_form() { clear_309fields(); update_309form(); } string &ics309_nn(string & subst, int n) { static string garbage = "#$^*!"; static string ics; ics.clear(); ics = subst; size_t pos = ics.find("["); if (pos == string::npos) return garbage; pos++; if (n < 10) ics[pos] = '0' + n; else { ics[pos] = n > 29 ? '3' : n > 19 ? '2' : '1'; ics[pos+1] = '0' + n % 10; ics[pos+2] = ']'; ics += ':'; } return ics; } void make_buff309(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics309_incident, s309_incident ) ); mbuff.append( lineout( ics309_date_fm, s309_date_fm ) ); mbuff.append( lineout( ics309_time_fm, s309_time_fm ) ); mbuff.append( lineout( ics309_date_to, s309_date_to ) ); mbuff.append( lineout( ics309_time_to, s309_time_to ) ); mbuff.append( lineout( ics309_prepared_by, s309_prepared_by ) ); mbuff.append( lineout( ics309_preparer_date_time, s309_preparer_date_time ) ); mbuff.append( lineout( ics309_radio_net, s309_radio_net ) ); mbuff.append( lineout( ics309_radio_operator, s309_radio_operator ) ); for (int i = 0; i < 34; i++) { mbuff.append( lineout( ics309_nn( ics309_comm_time, i ), s309_comm_time[i] ) ); mbuff.append( lineout( ics309_nn( ics309_comm_to, i ), s309_comm_to[i] ) ); mbuff.append( lineout( ics309_nn( ics309_comm_from, i ), s309_comm_from[i] ) ); mbuff.append( lineout( ics309_nn( ics309_comm_msg, i ), s309_comm_msg[i] ) ); } if (compress) compress_maybe(mbuff); buff309.append(mbuff); } void read_309_buffer(string data) { clear_309fields(); read_header(data); s309_incident = findstr( data, ics309_incident ); s309_date_fm = findstr( data, ics309_date_fm ); s309_time_fm = findstr( data, ics309_time_fm ); s309_date_to = findstr( data, ics309_date_to ); s309_time_to = findstr( data, ics309_time_to ); s309_prepared_by = findstr( data, ics309_prepared_by ); s309_preparer_date_time = findstr( data, ics309_preparer_date_time ); s309_radio_net = findstr( data, ics309_radio_net ); s309_radio_operator = findstr( data, ics309_radio_operator ); for (int i = 0; i < 34; i++) { s309_comm_time[i] = findstr( data, ics309_nn( ics309_comm_time, i ) ); s309_comm_to[i] = findstr( data, ics309_nn( ics309_comm_to, i ) ); s309_comm_from[i] = findstr( data, ics309_nn( ics309_comm_from, i ) ); s309_comm_msg[i] = findstr( data, ics309_nn( ics309_comm_msg, i ) ); } update_309form(); } void cb_309_new() { if (check_309fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_309_save(); } } clear_309_form(); clear_header(); def_309_filename = ICS_msg_dir; def_309_filename.append("new"F309_EXT); show_filename(def_309_filename); using_ics309_template = false; } void cb_309_import() { fl_alert2("Not implemented"); } void cb_309_export() { fl_alert2("Not implemented"); } void cb_309_wrap_import(string wrapfilename, string inpbuffer) { clear_309_form(); read_309_buffer(inpbuffer); def_309_filename = ICS_msg_dir; def_309_filename.append(wrapfilename); show_filename(def_309_filename); using_ics309_template = false; } int eval_309_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_309_filename).append("]"); update_309fields(); update_header(FROM); evalstr.append(header("<ics309>")); buff309.clear(); make_buff309(true); if (buff309.empty()) return 0; compress_maybe( buff309 ); evalstr.append( buff309 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_309_wrap_export() { if (check_309fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_309fields(); if (base_309_filename == "new"F309_EXT || base_309_filename == "default"F309_EXT) if (!cb_309_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_309_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff309.assign(header("<ics309>")); make_buff309(true); export_wrapfile(base_309_filename, wrapfilename, buff309, pext != ".wrap"); write_309(def_309_filename); } } void cb_309_wrap_autosend() { if (check_309fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_309fields(); if (base_309_filename == "new"F309_EXT || base_309_filename == "default"F309_EXT) cb_309_save_as(); update_header(FROM); buff309.assign(header("<ics309>")); make_buff309(true); xfr_via_socket(base_309_filename, buff309); write_309(def_309_filename); } void cb_309_load_template() { string def_309_filename = def_309_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T309_EXT, def_309_filename.c_str()); if (p) { clear_309_form(); read_data_file(p); def_309_TemplateName = p; show_filename(def_309_TemplateName); using_ics309_template = true; } } void cb_309_save_template() { if (!using_ics309_template) { cb_309_save_as_template(); return; } string def_309_filename = def_309_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T309_EXT, def_309_filename.c_str()); if (p) { update_header(CHANGED); buff309.assign(header("<ics309>")); make_buff309(); write_309(p); } } void cb_309_save_as_template() { string def_309_filename = def_309_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T309_EXT, def_309_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_309_TemplateName = p; if (strlen(pext) == 0) def_309_TemplateName.append(T309_EXT); remove_spaces_from_filename(def_309_TemplateName); clear_header(); update_header(CHANGED); buff309.assign(header("<ics309>")); make_buff309(); write_309(def_309_TemplateName); show_filename(def_309_TemplateName); using_ics309_template = true; } } void cb_309_open() { const char *p = FSEL::select(_("Open data file"), "ICS-309\t*"F309_EXT, def_309_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_309_form(); read_data_file(p); using_ics309_template = false; def_309_filename = p; show_filename(def_309_filename); } void write_309(string s) { FILE *file309 = fopen(s.c_str(), "w"); if (!file309) return; fwrite(buff309.c_str(), buff309.length(), 1, file309); fclose(file309); } bool cb_309_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F309_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_309_filename; p = FSEL::saveas(_("Save data file"), "ICS-309\t*"F309_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_309_filename = p; if (strlen(pext) == 0) def_309_filename.append(F309_EXT); remove_spaces_from_filename(def_309_filename); update_309fields(); update_header(NEW); buff309.assign(header("<ics309>")); make_buff309(); write_309(def_309_filename); using_ics309_template = false; show_filename(def_309_filename); return true; } void cb_309_save() { if (base_309_filename == "new"F309_EXT || base_309_filename == "default"F309_EXT || using_ics309_template == true) { cb_309_save_as(); return; } if (check_309fields()) update_header(CHANGED); update_309fields(); buff309.assign(header("<ics309>")); make_buff309(); write_309(def_309_filename); using_ics309_template = false; } void cb_309_html() { string fname_name = fl_filename_name(def_309_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics309_fname = ICS_dir; ics309_fname.append(fname_name); ics309_fname.append(".html"); string html_text = ""; string empty = "<br>"; update_309fields(); string form309 = ics309_html_template; replacestr(form309, TITLE, fname_name); replacestr(form309, ics309_incident, s309_incident ); replacestr(form309, ics309_date_fm, s309_date_fm ); replacestr(form309, ics309_time_fm, s309_time_fm ); replacestr(form309, ics309_date_to, s309_date_to ); replacestr(form309, ics309_time_to, s309_time_to ); replacestr(form309, ics309_prepared_by, s309_prepared_by ); replacestr(form309, ics309_preparer_date_time, s309_preparer_date_time ); replacestr(form309, ics309_radio_net, s309_radio_net ); replacestr(form309, ics309_radio_operator, s309_radio_operator ); for (int i = 0; i < 34; i++) { replacestr(form309, ics309_nn( ics309_comm_time, i ), s309_comm_time[i].empty() ? empty : s309_comm_time[i] ); replacestr(form309, ics309_nn( ics309_comm_to, i ), s309_comm_to[i].empty() ? empty : s309_comm_to[i] ); replacestr(form309, ics309_nn( ics309_comm_from, i ), s309_comm_from[i].empty() ? empty : s309_comm_from[i] ); replacestr(form309, ics309_nn( ics309_comm_msg, i ), s309_comm_msg[i].empty() ? empty : s309_comm_msg[i] ); } FILE *file309 = fopen(ics309_fname.c_str(), "w"); fprintf(file309,"%s", form309.c_str()); fclose(file309); open_url(ics309_fname.c_str()); } void cb_309_msg_type() { if (tabs_msg_type->value() == tab_ics309 ) { tab_ics309_type->value(tab_309_1); show_filename(def_309_filename); } } void cb_309_textout() { string ics309_fname = ICS_dir; ics309_fname.append("ics309.txt"); update_309fields(); string form309 = ics309_text_template; replacestr(form309, ics309_incident, s309_incident ); replacestr(form309, ics309_date_fm, s309_date_fm ); replacestr(form309, ics309_time_fm, s309_time_fm ); replacestr(form309, ics309_date_to, s309_date_to ); replacestr(form309, ics309_time_to, s309_time_to ); replacestr(form309, ics309_prepared_by, s309_prepared_by ); replacestr(form309, ics309_preparer_date_time, s309_preparer_date_time ); replacestr(form309, ics309_radio_net, s309_radio_net ); replacestr(form309, ics309_radio_operator, s309_radio_operator ); for (int i = 0; i < 34; i++) { replacestr(form309, ics309_nn( ics309_comm_time, i ), s309_comm_time[i] ); replacestr(form309, ics309_nn( ics309_comm_msg, i ), s309_comm_msg[i] ); replacestr(form309, ics309_nn( ics309_comm_to, i ), s309_comm_to[i] ); replacestr(form309, ics309_nn( ics309_comm_from, i ), s309_comm_from[i] ); } FILE *file309 = fopen(ics309_fname.c_str(), "w"); fprintf(file309,"%s", form309.c_str()); fclose(file309); open_url(ics309_fname.c_str()); } void ics309_csv(Fl_Widget *w, void *d) { string csv_fname = ICS_dir; csv_fname.append("ics309.csv"); const char *p; p = FSEL::saveas(_("Save csv file"), "ICS-309\t*.csv", csv_fname.c_str()); if (!p) return; if (strlen(p) == 0) return; csv_fname = p; update_309fields(); string cvs_text; cvs_text.assign("Incident,Start_Date,Start_Time,End_Date,End_Time,Preparer,Prepared_Date,Radio_Net,Radio_operator\n"); cvs_text.append("\"").append(s309_incident).append("\","); cvs_text.append("\"").append(s309_date_fm).append("\","); cvs_text.append("\"").append(s309_time_fm).append("\","); cvs_text.append("\"").append(s309_date_to).append("\","); cvs_text.append("\"").append(s309_time_to).append("\","); cvs_text.append("\"").append(s309_prepared_by).append("\","); cvs_text.append("\"").append(s309_preparer_date_time).append("\","); cvs_text.append("\"").append(s309_radio_net).append("\","); cvs_text.append("\"").append(s309_radio_operator).append("\"\n"); cvs_text.append("\n"); cvs_text.append("COMM_TIME,COMM_TO,COMM_FM,COMM_MSG\n"); for (int i = 0; i < 34; i++) { cvs_text.append("\"").append(s309_comm_time[i]).append("\","); cvs_text.append("\"").append(s309_comm_to[i]).append("\","); cvs_text.append("\"").append(s309_comm_from[i]).append("\","); cvs_text.append("\"").append(s309_comm_msg[i]).append("\"\n"); } FILE *csv_file = fopen(csv_fname.c_str(), "w"); if (!csv_file) return; fprintf(csv_file,"%s", cvs_text.c_str()); fclose(csv_file); } ����������������������������������flmsg-2.0.10/src/ics/ics309_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000027416�12330516146�015021� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics309_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head>\n\ <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n\ <title>:TITLE:</title>\n\ </head>\n\ <body>\n\ <table width=950px border=1 cellpadding=1 cellspacing=0>\n\ <tbody>\n\ <tr>\ <td colspan=4 ALIGN=CENTER VALIGN=top><b>COMM Log</b><br>ICS309<br>ARES/RACES</td>\ <td colspan=8 ALIGN=left VALIGN=top>1. Incident name<br>:inc:</td>\ <td colspan=8 ALIGN=left VALIGN=top>2. Operational Period<br>From: :dfm: :tfm:<br>To: :dto: :tto: </td>\ </tr>\ <tr>\ <td colspan=10 ALIGN=left VALIGN=top>3. Radio Net Name or Position/Tactical Call<br> :net:</td>\ <td colspan=20 ALIGN=left VALIGN=top>4. Radio Operator (Name, Call Sign)<br>:opr:</td>\ </tr>\ <tr BGCOLOR=#EEFFFF>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ </tr>\ <tr>\ <td colspan=2 ALIGN=left VALIGN=top>5.\ <td colspan=19 ALIGN=center VALIGN=top>\ <b>COMMUNICATIONS LOG</b>\ </td>\ </tr>\ <tr>\ <td colspan=2 ALIGN=center VALIGN=top>Time<br>(24:00)</td>\ <td colspan=4 ALIGN=center VALIGN=top>FROM<br>Call Sign/ID Msg #</td>\ <td colspan=4 ALIGN=center VALIGN=top>TO<br>Call Sign/ID Msg #</td>\ <td colspan=10 ALIGN=left VALIGN=center>Message</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[0]:</td>\ <td colspan=4 VALIGN=top>:fm[0]:</td>\ <td colspan=4 VALIGN=top>:to[0]:</td>\ <td colspan=10 VALIGN=top>:msg[0]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[1]:</td>\ <td colspan=4 VALIGN=top>:fm[1]:</td>\ <td colspan=4 VALIGN=top>:to[1]:</td>\ <td colspan=10 VALIGN=top>:msg[1]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[2]:</td>\ <td colspan=4 VALIGN=top>:fm[2]:</td>\ <td colspan=4 VALIGN=top>:to[2]:</td>\ <td colspan=10 VALIGN=top>:msg[2]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[3]:</td>\ <td colspan=4 VALIGN=top>:fm[3]:</td>\ <td colspan=4 VALIGN=top>:to[3]:</td>\ <td colspan=10 VALIGN=top>:msg[3]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[4]:</td>\ <td colspan=4 VALIGN=top>:fm[4]:</td>\ <td colspan=4 VALIGN=top>:to[4]:</td>\ <td colspan=10 VALIGN=top>:msg[4]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[5]:</td>\ <td colspan=4 VALIGN=top>:fm[5]:</td>\ <td colspan=4 VALIGN=top>:to[5]:</td>\ <td colspan=10 VALIGN=top>:msg[5]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[6]:</td>\ <td colspan=4 VALIGN=top>:fm[6]:</td>\ <td colspan=4 VALIGN=top>:to[6]:</td>\ <td colspan=10 VALIGN=top>:msg[6]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[7]:</td>\ <td colspan=4 VALIGN=top>:fm[7]:</td>\ <td colspan=4 VALIGN=top>:to[7]:</td>\ <td colspan=10 VALIGN=top>:msg[7]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[8]:</td>\ <td colspan=4 VALIGN=top>:fm[8]:</td>\ <td colspan=4 VALIGN=top>:to[8]:</td>\ <td colspan=10 VALIGN=top>:msg[8]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[9]:</td>\ <td colspan=4 VALIGN=top>:fm[9]:</td>\ <td colspan=4 VALIGN=top>:to[9]:</td>\ <td colspan=10 VALIGN=top>:msg[9]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[10]:</td>\ <td colspan=4 VALIGN=top>:fm[10]:</td>\ <td colspan=4 VALIGN=top>:to[10]:</td>\ <td colspan=10 VALIGN=top>:msg[10]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[11]:</td>\ <td colspan=4 VALIGN=top>:fm[11]:</td>\ <td colspan=4 VALIGN=top>:to[11]:</td>\ <td colspan=10 VALIGN=top>:msg[11]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[12]:</td>\ <td colspan=4 VALIGN=top>:fm[12]:</td>\ <td colspan=4 VALIGN=top>:to[12]:</td>\ <td colspan=10 VALIGN=top>:msg[12]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[13]:</td>\ <td colspan=4 VALIGN=top>:fm[13]:</td>\ <td colspan=4 VALIGN=top>:to[13]:</td>\ <td colspan=10 VALIGN=top>:msg[13]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[14]:</td>\ <td colspan=4 VALIGN=top>:fm[14]:</td>\ <td colspan=4 VALIGN=top>:to[14]:</td>\ <td colspan=10 VALIGN=top>:msg[14]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[15]:</td>\ <td colspan=4 VALIGN=top>:fm[15]:</td>\ <td colspan=4 VALIGN=top>:to[15]:</td>\ <td colspan=10 VALIGN=top>:msg[15]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[16]:</td>\ <td colspan=4 VALIGN=top>:fm[16]:</td>\ <td colspan=4 VALIGN=top>:to[16]:</td>\ <td colspan=10 VALIGN=top>:msg[16]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[17]:</td>\ <td colspan=4 VALIGN=top>:fm[17]:</td>\ <td colspan=4 VALIGN=top>:to[17]:</td>\ <td colspan=10 VALIGN=top>:msg[17]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[18]:</td>\ <td colspan=4 VALIGN=top>:fm[18]:</td>\ <td colspan=4 VALIGN=top>:to[18]:</td>\ <td colspan=10 VALIGN=top>:msg[18]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[19]:</td>\ <td colspan=4 VALIGN=top>:fm[19]:</td>\ <td colspan=4 VALIGN=top>:to[19]:</td>\ <td colspan=10 VALIGN=top>:msg[19]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[20]:</td>\ <td colspan=4 VALIGN=top>:fm[20]:</td>\ <td colspan=4 VALIGN=top>:to[20]:</td>\ <td colspan=10 VALIGN=top>:msg[20]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[21]:</td>\ <td colspan=4 VALIGN=top>:fm[21]:</td>\ <td colspan=4 VALIGN=top>:to[21]:</td>\ <td colspan=10 VALIGN=top>:msg[21]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[22]:</td>\ <td colspan=4 VALIGN=top>:fm[22]:</td>\ <td colspan=4 VALIGN=top>:to[22]:</td>\ <td colspan=10 VALIGN=top>:msg[22]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[23]:</td>\ <td colspan=4 VALIGN=top>:fm[23]:</td>\ <td colspan=4 VALIGN=top>:to[23]:</td>\ <td colspan=10 VALIGN=top>:msg[23]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[24]:</td>\ <td colspan=4 VALIGN=top>:fm[24]:</td>\ <td colspan=4 VALIGN=top>:to[24]:</td>\ <td colspan=10 VALIGN=top>:msg[24]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[25]:</td>\ <td colspan=4 VALIGN=top>:fm[25]:</td>\ <td colspan=4 VALIGN=top>:to[25]:</td>\ <td colspan=10 VALIGN=top>:msg[25]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[26]:</td>\ <td colspan=4 VALIGN=top>:fm[26]:</td>\ <td colspan=4 VALIGN=top>:to[26]:</td>\ <td colspan=10 VALIGN=top>:msg[26]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[27]:</td>\ <td colspan=4 VALIGN=top>:fm[27]:</td>\ <td colspan=4 VALIGN=top>:to[27]:</td>\ <td colspan=10 VALIGN=top>:msg[27]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[28]:</td>\ <td colspan=4 VALIGN=top>:fm[28]:</td>\ <td colspan=4 VALIGN=top>:to[28]:</td>\ <td colspan=10 VALIGN=top>:msg[28]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[29]:</td>\ <td colspan=4 VALIGN=top>:fm[29]:</td>\ <td colspan=4 VALIGN=top>:to[29]:</td>\ <td colspan=10 VALIGN=top>:msg[29]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[30]:</td>\ <td colspan=4 VALIGN=top>:fm[30]:</td>\ <td colspan=4 VALIGN=top>:to[30]:</td>\ <td colspan=10 VALIGN=top>:msg[30]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[31]:</td>\ <td colspan=4 VALIGN=top>:fm[31]:</td>\ <td colspan=4 VALIGN=top>:to[31]:</td>\ <td colspan=10 VALIGN=top>:msg[31]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[32]:</td>\ <td colspan=4 VALIGN=top>:fm[32]:</td>\ <td colspan=4 VALIGN=top>:to[32]:</td>\ <td colspan=10 VALIGN=top>:msg[32]:</td>\ </tr>\ <tr>\ <td colspan=2 VALIGN=top>:tm[33]:</td>\ <td colspan=4 VALIGN=top>:fm[33]:</td>\ <td colspan=4 VALIGN=top>:to[33]:</td>\ <td colspan=10 VALIGN=top>:msg[33]:</td>\ </tr>\ <tr>\ <td colspan=7 VALIGN=top>6. Prepared by<br>:pre:</td>\ <td colspan=7 VALIGN=top>7. Date & Time Prepared<br>:dtm:</td>\ <td colspan=6 VALIGN=top>8.<br> Page __1__of __1__</td>\ </tr>\ </tbody>\ </table>\ </body></html>\ "; const char ics309_text_template[] = "ICS 309 COMM LOG\n\n\ Incident name: :inc:\n\ Operational Period\n\ From: :dfm: :tfm:\n\ To: :dto: :tto:\n\ Radio Net Name: :net:\n\ Radio Operator: :opr:\n\ Comm Log\n\ line 0: :tm[0]:, :fm[0]:, :to[0]:, :msg[0]:\n\ line 0: :tm[1]:, :fm[1]:, :to[1]:, :msg[1]:\n\ line 0: :tm[2]:, :fm[2]:, :to[2]:, :msg[2]:\n\ line 0: :tm[3]:, :fm[3]:, :to[3]:, :msg[3]:\n\ line 0: :tm[4]:, :fm[4]:, :to[4]:, :msg[4]:\n\ line 0: :tm[5]:, :fm[5]:, :to[5]:, :msg[5]:\n\ line 0: :tm[6]:, :fm[6]:, :to[6]:, :msg[6]:\n\ line 0: :tm[7]:, :fm[7]:, :to[7]:, :msg[7]:\n\ line 0: :tm[8]:, :fm[8]:, :to[8]:, :msg[8]:\n\ line 0: :tm[9]:, :fm[9]:, :to[9]:, :msg[9]:\n\ line 0: :tm[10]:, :fm[10]:, :to[10]:, :msg[10]:\n\ line 0: :tm[11]:, :fm[11]:, :to[11]:, :msg[11]:\n\ line 0: :tm[12]:, :fm[12]:, :to[12]:, :msg[12]:\n\ line 0: :tm[13]:, :fm[13]:, :to[13]:, :msg[13]:\n\ line 0: :tm[14]:, :fm[14]:, :to[14]:, :msg[14]:\n\ line 0: :tm[15]:, :fm[15]:, :to[15]:, :msg[15]:\n\ line 0: :tm[16]:, :fm[16]:, :to[16]:, :msg[16]:\n\ line 0: :tm[17]:, :fm[17]:, :to[17]:, :msg[17]:\n\ line 0: :tm[18]:, :fm[18]:, :to[18]:, :msg[18]:\n\ line 0: :tm[19]:, :fm[19]:, :to[19]:, :msg[19]:\n\ line 0: :tm[20]:, :fm[10]:, :to[20]:, :msg[20]:\n\ line 0: :tm[21]:, :fm[21]:, :to[21]:, :msg[21]:\n\ line 0: :tm[22]:, :fm[22]:, :to[22]:, :msg[22]:\n\ line 0: :tm[23]:, :fm[23]:, :to[23]:, :msg[23]:\n\ line 0: :tm[24]:, :fm[24]:, :to[24]:, :msg[24]:\n\ line 0: :tm[25]:, :fm[25]:, :to[25]:, :msg[25]:\n\ line 0: :tm[26]:, :fm[26]:, :to[26]:, :msg[26]:\n\ line 0: :tm[27]:, :fm[27]:, :to[27]:, :msg[27]:\n\ line 0: :tm[28]:, :fm[28]:, :to[28]:, :msg[28]:\n\ line 0: :tm[29]:, :fm[29]:, :to[29]:, :msg[29]:\n\ line 0: :tm[30]:, :fm[30]:, :to[30]:, :msg[30]:\n\ line 0: :tm[31]:, :fm[31]:, :to[31]:, :msg[31]:\n\ line 0: :tm[32]:, :fm[32]:, :to[32]:, :msg[32]:\n\ Prepared by: :pre:\n\ Date & Time Prepared: :dtm:\n\ "; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics206_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000044372�12330516146�013565� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics206 = (Fl_Group *)0; Fl_Tabs *tab_ics206_type = (Fl_Tabs *)0; Fl_Group *tab_206_med_plan = (Fl_Group *)0; Fl_Input2 *txt_206_name = (Fl_Input2 *)0; Fl_Input2 *txt_206_op_period = (Fl_Input2 *)0; Fl_Input2 *txt_206_time_prepared = (Fl_Input2 *)0; Fl_Button *btn_206_time = (Fl_Button *)0; Fl_DateInput *txt_206_date_prepared = (Fl_DateInput *)0; Fl_Button *btn_206_date = (Fl_Button *)0; Fl_Input2 *txt_206_medaid_sta[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_medaid_loc[5]={(Fl_Input2 *)0}; Fl_Check_Button *btn_206_medaid_paramedics[5]={(Fl_Check_Button *)0}; Fl_Input2 *txt_206_preparer = (Fl_Input2 *)0; Fl_Input2 *txt_206_reviewer = (Fl_Input2 *)0; Fl_Group *tab_206_transport = (Fl_Group *)0; Fl_Input2 *txt_206_transport_name[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_transport_address[5]={(Fl_Input2 *)0}; Fl_Check_Button *btn_206_transport_paramedics[5]={(Fl_Check_Button *)0}; Fl_Input2 *txt_206_transport_phone[5]={(Fl_Input2 *)0}; Fl_Group *tab_206_ambulance = (Fl_Group *)0; Fl_Input2 *txt_206_ambulance_name[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_ambulance_loc[5]={(Fl_Input2 *)0}; Fl_Check_Button *btn_206_ambulance_paramedics[5]={(Fl_Check_Button *)0}; Fl_Group *tab_206_hospital = (Fl_Group *)0; Fl_Input2 *txt_206_hosp_name[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_hosp_address[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_hosp_phone[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_hosp_airtime[5]={(Fl_Input2 *)0}; Fl_Input2 *txt_206_hosp_gndtime[5]={(Fl_Input2 *)0}; Fl_Check_Button *btn_206_hosp_helipad[5]={(Fl_Check_Button *)0}; Fl_Check_Button *btn_206_hosp_burn_center[5]={(Fl_Check_Button *)0}; Fl_Group *tab_206_med_proc = (Fl_Group *)0; FTextEdit *txt_206_procedure = (FTextEdit *)0; static void cb_btn_206_time(Fl_Button*, void*) { cb_206_settime(); } static void cb_btn_206_date(Fl_Button*, void*) { cb_206_setdate(); } void create_ics206_tab() { int Y = tab_top; tab_ics206 = new Fl_Group(0, Y, 570, 390); tab_ics206->align(FL_ALIGN_TOP); tab_ics206_type = new Fl_Tabs(0, Y, 570, 387); tab_ics206_type->selection_color((Fl_Color)246); tab_206_med_plan = new Fl_Group(0, Y+25, 570, 360, _("Med Plan")); { Fl_Group* o = new Fl_Group(2, Y+30, 566, 80); o->box(FL_ENGRAVED_FRAME); txt_206_name = new Fl_Input2(9, Y+49, 242, 24, _("Incident Name")); txt_206_name->tooltip(_("Addressee")); txt_206_name->box(FL_DOWN_BOX); txt_206_name->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_name->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_name->labeltype(FL_NORMAL_LABEL); txt_206_name->labelfont(0); txt_206_name->labelsize(14); txt_206_name->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_name->align(FL_ALIGN_TOP_LEFT); txt_206_name->callback(ics_changed); txt_206_name->when(FL_WHEN_CHANGED); txt_206_op_period = new Fl_Input2(151, Y+77, 410, 24, _("Operational Period:")); txt_206_op_period->tooltip(_("Subject")); txt_206_op_period->box(FL_DOWN_BOX); txt_206_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_op_period->labeltype(FL_NORMAL_LABEL); txt_206_op_period->labelfont(0); txt_206_op_period->labelsize(14); txt_206_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_op_period->align(FL_ALIGN_LEFT); txt_206_op_period->callback(ics_changed); txt_206_op_period->when(FL_WHEN_CHANGED); txt_206_time_prepared = new Fl_Input2(407, Y+47, 103, 24, _("Time Prepared")); txt_206_time_prepared->tooltip(_("Time of origination")); txt_206_time_prepared->box(FL_DOWN_BOX); txt_206_time_prepared->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_time_prepared->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_time_prepared->labeltype(FL_NORMAL_LABEL); txt_206_time_prepared->labelfont(0); txt_206_time_prepared->labelsize(14); txt_206_time_prepared->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_time_prepared->align(FL_ALIGN_TOP_LEFT); txt_206_time_prepared->callback(ics_changed); txt_206_time_prepared->when(FL_WHEN_CHANGED); btn_206_time = new Fl_Button(517, Y+49, 20, 20, _("...")); btn_206_time->tooltip(_("Set time now")); btn_206_time->callback((Fl_Callback*)cb_btn_206_time); txt_206_date_prepared = new Fl_DateInput(256, Y+47, 125, 24, _("Date Prepared")); txt_206_date_prepared->tooltip(_("Date of origination")); txt_206_date_prepared->box(FL_DOWN_BOX); txt_206_date_prepared->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_date_prepared->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_date_prepared->labeltype(FL_NORMAL_LABEL); txt_206_date_prepared->labelfont(0); txt_206_date_prepared->labelsize(14); txt_206_date_prepared->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_date_prepared->align(FL_ALIGN_TOP_LEFT); txt_206_date_prepared->callback(ics_changed); txt_206_date_prepared->when(FL_WHEN_CHANGED); btn_206_date = new Fl_Button(383, Y+49, 20, 20, _("...")); btn_206_date->tooltip(_("Set today")); btn_206_date->callback((Fl_Callback*)cb_btn_206_date); o->end(); } { Fl_Group* o = new Fl_Group(2, Y+110, 566, 210); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT); for (int i = 0; i < 5; i++) { txt_206_medaid_sta[i] = new Fl_Input2( 7, Y+136 + i*38, 160, 24, i == 0 ? _("Medical Aid Stations"):""); txt_206_medaid_sta[i]->tooltip(_("")); txt_206_medaid_sta[i]->box(FL_DOWN_BOX); txt_206_medaid_sta[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_medaid_sta[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_medaid_sta[i]->labeltype(FL_NORMAL_LABEL); txt_206_medaid_sta[i]->labelfont(0); txt_206_medaid_sta[i]->labelsize(14); txt_206_medaid_sta[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_medaid_sta[i]->align(FL_ALIGN_TOP_LEFT); txt_206_medaid_sta[i]->callback(ics_changed); txt_206_medaid_sta[i]->when(FL_WHEN_CHANGED); txt_206_medaid_loc[i] = new Fl_Input2(169, Y+136 + i*38, 370, 24, i == 0 ? _("Location"):""); txt_206_medaid_loc[i]->tooltip(_("")); txt_206_medaid_loc[i]->box(FL_DOWN_BOX); txt_206_medaid_loc[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_medaid_loc[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_medaid_loc[i]->labeltype(FL_NORMAL_LABEL); txt_206_medaid_loc[i]->labelfont(0); txt_206_medaid_loc[i]->labelsize(14); txt_206_medaid_loc[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_medaid_loc[i]->align(FL_ALIGN_TOP_LEFT); txt_206_medaid_loc[i]->callback(ics_changed); txt_206_medaid_loc[i]->when(FL_WHEN_CHANGED); btn_206_medaid_paramedics[i] = new Fl_Check_Button( 540, Y+136 + i*38, 20, 22, i == 0 ? _("Paramedics"):""); btn_206_medaid_paramedics[i]->down_box(FL_DOWN_BOX); btn_206_medaid_paramedics[i]->align(FL_ALIGN_TOP_RIGHT); } // Fl_Check_Button* btn_206_medaid_paramedics[i] o->end(); } { Fl_Group* o = new Fl_Group(2, Y+320, 566, 30); o->box(FL_ENGRAVED_FRAME); txt_206_preparer = new Fl_Input2(71, Y+323, 210, 24, _("Preparer")); txt_206_preparer->tooltip(_("")); txt_206_preparer->box(FL_DOWN_BOX); txt_206_preparer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_preparer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_preparer->labeltype(FL_NORMAL_LABEL); txt_206_preparer->labelfont(0); txt_206_preparer->labelsize(14); txt_206_preparer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_preparer->align(FL_ALIGN_LEFT); txt_206_preparer->callback(ics_changed); txt_206_preparer->when(FL_WHEN_CHANGED); txt_206_reviewer = new Fl_Input2(350, Y+323, 210, 24, _("Reviewer")); txt_206_reviewer->tooltip(_("")); txt_206_reviewer->box(FL_DOWN_BOX); txt_206_reviewer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_reviewer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_reviewer->labeltype(FL_NORMAL_LABEL); txt_206_reviewer->labelfont(0); txt_206_reviewer->labelsize(14); txt_206_reviewer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_reviewer->align(FL_ALIGN_LEFT); txt_206_reviewer->callback(ics_changed); txt_206_reviewer->when(FL_WHEN_CHANGED); o->end(); } tab_206_med_plan->end(); tab_206_transport = new Fl_Group(0, Y+25, 570, 360, _("Transport")); tab_206_transport->hide(); { Fl_Group* o = new Fl_Group(2, Y+35, 566, 238, _("Ambulance Services")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); for (int i = 0; i < 5; i++) { txt_206_transport_name[i] = new Fl_Input2( 7, Y+80 + i*38, 125, 24, i == 0 ? _("Service Name"):""); txt_206_transport_name[i]->tooltip(_("")); txt_206_transport_name[i]->box(FL_DOWN_BOX); txt_206_transport_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_transport_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_transport_name[i]->labeltype(FL_NORMAL_LABEL); txt_206_transport_name[i]->labelfont(0); txt_206_transport_name[i]->labelsize(14); txt_206_transport_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_transport_name[i]->align(FL_ALIGN_TOP_LEFT); txt_206_transport_name[i]->callback(ics_changed); txt_206_transport_name[i]->when(FL_WHEN_CHANGED); txt_206_transport_address[i] = new Fl_Input2( 135, Y+80 + i*38, 280, 24, i == 0 ? _("Address"):""); txt_206_transport_address[i]->tooltip(_("")); txt_206_transport_address[i]->box(FL_DOWN_BOX); txt_206_transport_address[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_transport_address[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_transport_address[i]->labeltype(FL_NORMAL_LABEL); txt_206_transport_address[i]->labelfont(0); txt_206_transport_address[i]->labelsize(14); txt_206_transport_address[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_transport_address[i]->align(FL_ALIGN_TOP_LEFT); txt_206_transport_address[i]->callback(ics_changed); txt_206_transport_address[i]->when(FL_WHEN_CHANGED); btn_206_transport_paramedics[i] = new Fl_Check_Button( 540, Y+80 + i*38, 20, 22, i == 0 ? _("Paramedics"):""); btn_206_transport_paramedics[i]->down_box(FL_DOWN_BOX); btn_206_transport_paramedics[i]->align(FL_ALIGN_TOP_RIGHT); txt_206_transport_phone[i] = new Fl_Input2( 417, Y+80 + i*38, 121, 24, i == 0 ? _("Phone"):""); txt_206_transport_phone[i]->tooltip(_("")); txt_206_transport_phone[i]->box(FL_DOWN_BOX); txt_206_transport_phone[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_transport_phone[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_transport_phone[i]->labeltype(FL_NORMAL_LABEL); txt_206_transport_phone[i]->labelfont(0); txt_206_transport_phone[i]->labelsize(14); txt_206_transport_phone[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_transport_phone[i]->align(FL_ALIGN_TOP_LEFT); txt_206_transport_phone[i]->callback(ics_changed); txt_206_transport_phone[i]->when(FL_WHEN_CHANGED); } o->end(); } tab_206_transport->end(); tab_206_ambulance = new Fl_Group(0, Y+25, 570, 360, _("Ambulance")); tab_206_ambulance->hide(); { Fl_Group* o = new Fl_Group(2, Y+30, 565, 235, _("Indicent Ambulances")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); for (int i = 0; i < 5; i++) { txt_206_ambulance_name[i] = new Fl_Input2( 8, Y+77 + i*38, 160, 24, i == 0 ? _("Name"):""); txt_206_ambulance_name[i]->tooltip(_("")); txt_206_ambulance_name[i]->box(FL_DOWN_BOX); txt_206_ambulance_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_ambulance_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_ambulance_name[i]->labeltype(FL_NORMAL_LABEL); txt_206_ambulance_name[i]->labelfont(0); txt_206_ambulance_name[i]->labelsize(14); txt_206_ambulance_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_ambulance_name[i]->align(FL_ALIGN_TOP_LEFT); txt_206_ambulance_name[i]->callback(ics_changed); txt_206_ambulance_name[i]->when(FL_WHEN_CHANGED); txt_206_ambulance_loc[i] = new Fl_Input2( 170, Y+77 + i*38, 370, 24, i == 0 ? _("Location"):""); txt_206_ambulance_loc[i]->tooltip(_("")); txt_206_ambulance_loc[i]->box(FL_DOWN_BOX); txt_206_ambulance_loc[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_ambulance_loc[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_ambulance_loc[i]->labeltype(FL_NORMAL_LABEL); txt_206_ambulance_loc[i]->labelfont(0); txt_206_ambulance_loc[i]->labelsize(14); txt_206_ambulance_loc[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_ambulance_loc[i]->align(FL_ALIGN_TOP_LEFT); txt_206_ambulance_loc[i]->callback(ics_changed); txt_206_ambulance_loc[i]->when(FL_WHEN_CHANGED); btn_206_ambulance_paramedics[i] = new Fl_Check_Button( 541, Y+77 + i*38, 20, 22, i == 0 ? _("Paramedics"):""); btn_206_ambulance_paramedics[i]->down_box(FL_DOWN_BOX); btn_206_ambulance_paramedics[i]->align(FL_ALIGN_TOP_RIGHT); } o->end(); } // Fl_Group* o tab_206_ambulance->end(); tab_206_hospital = new Fl_Group(0, Y+25, 570, 360, _("Hospital")); tab_206_hospital->hide(); { Fl_Group* o = new Fl_Group(2, Y+31, 566, 318, _("Hospitals")); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); for (int i = 0; i < 5; i++) { txt_206_hosp_name[i] = new Fl_Input2(9, Y+76 + i*54, 125, 24, i == 0 ? _("Name"):""); txt_206_hosp_name[i]->tooltip(_("")); txt_206_hosp_name[i]->box(FL_DOWN_BOX); txt_206_hosp_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_hosp_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_hosp_name[i]->labeltype(FL_NORMAL_LABEL); txt_206_hosp_name[i]->labelfont(0); txt_206_hosp_name[i]->labelsize(14); txt_206_hosp_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_hosp_name[i]->align(FL_ALIGN_TOP_LEFT); txt_206_hosp_name[i]->callback(ics_changed); txt_206_hosp_name[i]->when(FL_WHEN_CHANGED); txt_206_hosp_address[i] = new Fl_Input2(137, Y+76 + i*54, 300, 24, i == 0 ? _("Address"):""); txt_206_hosp_address[i]->tooltip(_("")); txt_206_hosp_address[i]->box(FL_DOWN_BOX); txt_206_hosp_address[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_hosp_address[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_hosp_address[i]->labeltype(FL_NORMAL_LABEL); txt_206_hosp_address[i]->labelfont(0); txt_206_hosp_address[i]->labelsize(14); txt_206_hosp_address[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_hosp_address[i]->align(FL_ALIGN_TOP_LEFT); txt_206_hosp_address[i]->callback(ics_changed); txt_206_hosp_address[i]->when(FL_WHEN_CHANGED); txt_206_hosp_phone[i] = new Fl_Input2(440, Y+76 + i*54, 121, 24, i == 0 ? _("Phone"):""); txt_206_hosp_phone[i]->tooltip(_("")); txt_206_hosp_phone[i]->box(FL_DOWN_BOX); txt_206_hosp_phone[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_hosp_phone[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_hosp_phone[i]->labeltype(FL_NORMAL_LABEL); txt_206_hosp_phone[i]->labelfont(0); txt_206_hosp_phone[i]->labelsize(14); txt_206_hosp_phone[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_hosp_phone[i]->align(FL_ALIGN_TOP_LEFT); txt_206_hosp_phone[i]->callback(ics_changed); txt_206_hosp_phone[i]->when(FL_WHEN_CHANGED); txt_206_hosp_airtime[i] = new Fl_Input2(136, Y+104 + i*54, 80, 24, _("Travel Time Air:")); txt_206_hosp_airtime[i]->tooltip(_("")); txt_206_hosp_airtime[i]->box(FL_DOWN_BOX); txt_206_hosp_airtime[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_hosp_airtime[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_hosp_airtime[i]->labeltype(FL_NORMAL_LABEL); txt_206_hosp_airtime[i]->labelfont(0); txt_206_hosp_airtime[i]->labelsize(14); txt_206_hosp_airtime[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_hosp_airtime[i]->align(FL_ALIGN_LEFT); txt_206_hosp_airtime[i]->callback(ics_changed); txt_206_hosp_airtime[i]->when(FL_WHEN_CHANGED); txt_206_hosp_gndtime[i] = new Fl_Input2(253, Y+104 + i*54, 80, 24, _("Gnd")); txt_206_hosp_gndtime[i]->tooltip(_("")); txt_206_hosp_gndtime[i]->box(FL_DOWN_BOX); txt_206_hosp_gndtime[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_hosp_gndtime[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_hosp_gndtime[i]->labeltype(FL_NORMAL_LABEL); txt_206_hosp_gndtime[i]->labelfont(0); txt_206_hosp_gndtime[i]->labelsize(14); txt_206_hosp_gndtime[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_hosp_gndtime[i]->align(FL_ALIGN_LEFT); txt_206_hosp_gndtime[i]->callback(ics_changed); txt_206_hosp_gndtime[i]->when(FL_WHEN_CHANGED); btn_206_hosp_helipad[i] = new Fl_Check_Button(342, Y+108 + i*54, 82, 15, _("Helipad")); btn_206_hosp_helipad[i]->down_box(FL_DOWN_BOX); btn_206_hosp_burn_center[i] = new Fl_Check_Button(440, Y+108 + i*54, 107, 15, _("Burn center")); btn_206_hosp_burn_center[i]->down_box(FL_DOWN_BOX); } o->end(); } // Fl_Group* o tab_206_hospital->end(); tab_206_med_proc = new Fl_Group(0, Y+25, 570, 360, _("Med\' Proc\'")); tab_206_med_proc->hide(); txt_206_procedure = new FTextEdit(4, Y+35, 562, 345); txt_206_procedure->box(FL_DOWN_FRAME); txt_206_procedure->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_206_procedure->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_206_procedure->labeltype(FL_NORMAL_LABEL); txt_206_procedure->labelfont(0); txt_206_procedure->labelsize(14); txt_206_procedure->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_206_procedure->align(FL_ALIGN_CENTER); txt_206_procedure->callback(ics_changed); txt_206_procedure->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(txt_206_procedure); tab_206_med_proc->end(); tab_ics206_type->end(); Fl_Group::current()->resizable(tab_ics206_type); tab_ics206->end(); tab_ics206->hide(); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics216_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000047772�12330516146�013575� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics216 = (Fl_Group *)0; Fl_Group *tab_ics_216 = (Fl_Group *)0; Fl_Tabs *tab_ics216_type = (Fl_Tabs *)0; Fl_Group *tab_216_1 = (Fl_Group *)0; Fl_Group *tab_216_2 = (Fl_Group *)0; Fl_Group *tab_216_3 = (Fl_Group *)0; Fl_Group *tab_216_4 = (Fl_Group *)0; Fl_Group *tab_216_5 = (Fl_Group *)0; Fl_Input2 *txt_216_incident = (Fl_Input2 *)0; Fl_Input2 *txt_216_date = (Fl_Input2 *)0; Fl_Button *btn_216_date = (Fl_Button *)0; Fl_Input2 *txt_216_time = (Fl_Input2 *)0; Fl_Button *btn_216_time = (Fl_Button *)0; Fl_Input2 *txt_216_branch = (Fl_Input2 *)0; Fl_Input2 *txt_216_agc = (Fl_Input2 *)0; Fl_Input2 *txt_216_op_period = (Fl_Input2 *)0; Fl_Input2 *txt_216_tac_freq = (Fl_Input2 *)0; Fl_Input2 *txt_216_prepared_by = (Fl_Input2 *)0; Fl_Input2 *txt_216_div_grp[4]={(Fl_Input2 *)0}; Fl_Input2 *txt_216_agency[4]={(Fl_Input2 *)0}; Fl_Input2 *txt_216_ag[36]={(Fl_Input2 *)0}; Fl_Input2 *txt_216_id[36]={(Fl_Input2 *)0}; Fl_Input2 *txt_216_rr[36]={(Fl_Input2 *)0}; static void cb_btn_216_date(Fl_Button*, void*) { cb_216_set_date(); } static void cb_btn_216_time(Fl_Button*, void*) { cb_216_set_time(); } void create_ics216_tab() { int Y = tab_top; tab_ics216 = new Fl_Group(0, Y, 570, 390); tab_ics216->align(FL_ALIGN_TOP); tab_ics216_type = new Fl_Tabs(0, Y, 570, 387); tab_ics216_type->selection_color((Fl_Color)246); tab_216_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 190); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_216_incident = new Fl_Input2(135, Y+38, 425, 24, _("1.Incident Name")); txt_216_incident->tooltip(_("Incident name")); txt_216_incident->box(FL_DOWN_BOX); txt_216_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_incident->labeltype(FL_NORMAL_LABEL); txt_216_incident->labelfont(0); txt_216_incident->labelsize(14); txt_216_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_incident->align(FL_ALIGN_LEFT); txt_216_incident->callback(ics_changed); txt_216_incident->when(FL_WHEN_CHANGED); txt_216_date = new Fl_Input2(135, Y+65, 155, 24, _("2. Date")); txt_216_date->tooltip(_("Date")); txt_216_date->box(FL_DOWN_BOX); txt_216_date->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_date->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_date->labeltype(FL_NORMAL_LABEL); txt_216_date->labelfont(0); txt_216_date->labelsize(14); txt_216_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_date->align(FL_ALIGN_LEFT); txt_216_date->callback(ics_changed); txt_216_date->when(FL_WHEN_CHANGED); btn_216_date = new Fl_Button(294, Y+67, 20, 20, _("...")); btn_216_date->tooltip(_("Set today")); btn_216_date->callback((Fl_Callback*)cb_btn_216_date); txt_216_time = new Fl_Input2(135, Y+90, 103, 24, _("3. Time")); txt_216_time->tooltip(_("Time prepared")); txt_216_time->box(FL_DOWN_BOX); txt_216_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_time->labeltype(FL_NORMAL_LABEL); txt_216_time->labelfont(0); txt_216_time->labelsize(14); txt_216_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_time->align(FL_ALIGN_LEFT); txt_216_time->callback(ics_changed); txt_216_time->when(FL_WHEN_CHANGED); btn_216_time = new Fl_Button(247, Y+92, 20, 20, _("...")); btn_216_time->tooltip(_("Set time now")); btn_216_time->callback((Fl_Callback*)cb_btn_216_time); txt_216_branch = new Fl_Input2(135, Y+115, 425, 24, _("4. Branch")); txt_216_branch->tooltip(_("branch")); txt_216_branch->box(FL_DOWN_BOX); txt_216_branch->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_branch->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_branch->labeltype(FL_NORMAL_LABEL); txt_216_branch->labelfont(0); txt_216_branch->labelsize(14); txt_216_branch->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_branch->align(FL_ALIGN_LEFT); txt_216_branch->callback(ics_changed); txt_216_branch->when(FL_WHEN_CHANGED); txt_216_agc = new Fl_Input2(135, Y+140, 425, 24, _("5. Agency")); txt_216_agc->tooltip(_("agency name")); txt_216_agc->box(FL_DOWN_BOX); txt_216_agc->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_agc->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_agc->labeltype(FL_NORMAL_LABEL); txt_216_agc->labelfont(0); txt_216_agc->labelsize(14); txt_216_agc->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_agc->align(FL_ALIGN_LEFT); txt_216_agc->callback(ics_changed); txt_216_agc->when(FL_WHEN_CHANGED); txt_216_op_period = new Fl_Input2(135, Y+165, 425, 24, _("6. Oper\' Period")); txt_216_op_period->tooltip(_("Date / Time")); txt_216_op_period->box(FL_DOWN_BOX); txt_216_op_period->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_op_period->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_op_period->labeltype(FL_NORMAL_LABEL); txt_216_op_period->labelfont(0); txt_216_op_period->labelsize(14); txt_216_op_period->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_op_period->align(FL_ALIGN_LEFT); txt_216_op_period->callback(ics_changed); txt_216_op_period->when(FL_WHEN_CHANGED); txt_216_tac_freq = new Fl_Input2(135, Y+190, 425, 24, _("7. Tac\' Freq\'")); txt_216_tac_freq->tooltip(_("tactical frequency")); txt_216_tac_freq->box(FL_DOWN_BOX); txt_216_tac_freq->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_tac_freq->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_tac_freq->labeltype(FL_NORMAL_LABEL); txt_216_tac_freq->labelfont(0); txt_216_tac_freq->labelsize(14); txt_216_tac_freq->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_tac_freq->align(FL_ALIGN_LEFT); txt_216_tac_freq->callback(ics_changed); txt_216_tac_freq->when(FL_WHEN_CHANGED); o->end(); } { Fl_Group* o = new Fl_Group(2, Y+224, 566, 35); o->box(FL_ENGRAVED_FRAME); txt_216_prepared_by = new Fl_Input2(135, Y+226, 425, 24, _("Prepared By")); txt_216_prepared_by->tooltip(_("Name and Position")); txt_216_prepared_by->box(FL_DOWN_BOX); txt_216_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_prepared_by->labeltype(FL_NORMAL_LABEL); txt_216_prepared_by->labelfont(0); txt_216_prepared_by->labelsize(14); txt_216_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_prepared_by->align(FL_ALIGN_LEFT); txt_216_prepared_by->callback(ics_changed); txt_216_prepared_by->when(FL_WHEN_CHANGED); o->end(); } tab_216_1->end(); Y = tab_top; tab_216_2 = new Fl_Group(0, Y+25, 570, 360, _("Div-Grp 1")); tab_216_2->hide(); Y+= 35; txt_216_div_grp[0] = new Fl_Input2(120, Y, 448, 24, _("Division/Group") ); txt_216_div_grp[0]->tooltip(_("")); txt_216_div_grp[0]->box(FL_DOWN_BOX); txt_216_div_grp[0]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_div_grp[0]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_div_grp[0]->labeltype(FL_NORMAL_LABEL); txt_216_div_grp[0]->labelfont(0); txt_216_div_grp[0]->labelsize(14); txt_216_div_grp[0]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_div_grp[0]->align(FL_ALIGN_LEFT); txt_216_div_grp[0]->callback(ics_changed); txt_216_div_grp[0]->when(FL_WHEN_CHANGED); Y += 24; txt_216_agency[0] = new Fl_Input2(120, Y, 448, 24, _("Agency") ); txt_216_agency[0]->tooltip(_("")); txt_216_agency[0]->box(FL_DOWN_BOX); txt_216_agency[0]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_agency[0]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_agency[0]->labeltype(FL_NORMAL_LABEL); txt_216_agency[0]->labelfont(0); txt_216_agency[0]->labelsize(14); txt_216_agency[0]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_agency[0]->align(FL_ALIGN_LEFT); txt_216_agency[0]->callback(ics_changed); txt_216_agency[0]->when(FL_WHEN_CHANGED); Y += 48; for (int i = 0, j = 0; i < 9; i++, j++) { txt_216_ag[j] = new Fl_Input2(5, Y, 180, 24, i == 0 ? "Agency" : ""); txt_216_ag[j]->tooltip(_("")); txt_216_ag[j]->box(FL_DOWN_BOX); txt_216_ag[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_ag[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_ag[j]->labeltype(FL_NORMAL_LABEL); txt_216_ag[j]->labelfont(0); txt_216_ag[j]->labelsize(14); txt_216_ag[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_ag[j]->align(FL_ALIGN_TOP); txt_216_ag[j]->callback(ics_changed); txt_216_ag[j]->when(FL_WHEN_CHANGED); txt_216_id[j] = new Fl_Input2(186, Y, 100, 24, i == 0 ? "ID No." : ""); txt_216_id[j]->tooltip(_("")); txt_216_id[j]->box(FL_DOWN_BOX); txt_216_id[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_id[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_id[j]->labeltype(FL_NORMAL_LABEL); txt_216_id[j]->labelfont(0); txt_216_id[j]->labelsize(14); txt_216_id[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_id[j]->align(FL_ALIGN_TOP); txt_216_id[j]->callback(ics_changed); txt_216_id[j]->when(FL_WHEN_CHANGED); txt_216_rr[j] = new Fl_Input2(287, Y, 280, 24, i == 0 ? "Radio Requirements" : ""); txt_216_rr[j]->tooltip(_("")); txt_216_rr[j]->box(FL_DOWN_BOX); txt_216_rr[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_rr[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_rr[j]->labeltype(FL_NORMAL_LABEL); txt_216_rr[j]->labelfont(0); txt_216_rr[j]->labelsize(14); txt_216_rr[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_rr[j]->align(FL_ALIGN_TOP); txt_216_rr[j]->callback(ics_changed); txt_216_rr[j]->when(FL_WHEN_CHANGED); Y += 24; } tab_216_2->end(); Y = tab_top; tab_216_3 = new Fl_Group(0, 95, 570, 360, _("Div-Grp 2")); tab_216_3->hide(); Y += 35; txt_216_div_grp[1] = new Fl_Input2(120, Y, 448, 24, _("Division/Group") ); txt_216_div_grp[1]->tooltip(_("")); txt_216_div_grp[1]->box(FL_DOWN_BOX); txt_216_div_grp[1]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_div_grp[1]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_div_grp[1]->labeltype(FL_NORMAL_LABEL); txt_216_div_grp[1]->labelfont(0); txt_216_div_grp[1]->labelsize(14); txt_216_div_grp[1]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_div_grp[1]->align(FL_ALIGN_LEFT); txt_216_div_grp[1]->callback(ics_changed); txt_216_div_grp[1]->when(FL_WHEN_CHANGED); Y += 24; txt_216_agency[1] = new Fl_Input2(120, Y, 448, 24, _("Agency") ); txt_216_agency[1]->tooltip(_("")); txt_216_agency[1]->box(FL_DOWN_BOX); txt_216_agency[1]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_agency[1]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_agency[1]->labeltype(FL_NORMAL_LABEL); txt_216_agency[1]->labelfont(0); txt_216_agency[1]->labelsize(14); txt_216_agency[1]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_agency[1]->align(FL_ALIGN_LEFT); txt_216_agency[1]->callback(ics_changed); txt_216_agency[1]->when(FL_WHEN_CHANGED); Y += 48; for (int i = 0, j = 9; i < 9; i++, j++) { txt_216_ag[j] = new Fl_Input2(5, Y, 180, 24, i == 0 ? "Agency" : ""); txt_216_ag[j]->tooltip(_("")); txt_216_ag[j]->box(FL_DOWN_BOX); txt_216_ag[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_ag[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_ag[j]->labeltype(FL_NORMAL_LABEL); txt_216_ag[j]->labelfont(0); txt_216_ag[j]->labelsize(14); txt_216_ag[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_ag[j]->align(FL_ALIGN_TOP); txt_216_ag[j]->callback(ics_changed); txt_216_ag[j]->when(FL_WHEN_CHANGED); txt_216_id[j] = new Fl_Input2(186, Y, 100, 24, i == 0 ? "ID No." : ""); txt_216_id[j]->tooltip(_("")); txt_216_id[j]->box(FL_DOWN_BOX); txt_216_id[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_id[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_id[j]->labeltype(FL_NORMAL_LABEL); txt_216_id[j]->labelfont(0); txt_216_id[j]->labelsize(14); txt_216_id[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_id[j]->align(FL_ALIGN_TOP); txt_216_id[j]->callback(ics_changed); txt_216_id[j]->when(FL_WHEN_CHANGED); txt_216_rr[j] = new Fl_Input2(287, Y, 280, 24, i == 0 ? "Radio Requirements" : ""); txt_216_rr[j]->tooltip(_("")); txt_216_rr[j]->box(FL_DOWN_BOX); txt_216_rr[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_rr[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_rr[j]->labeltype(FL_NORMAL_LABEL); txt_216_rr[j]->labelfont(0); txt_216_rr[j]->labelsize(14); txt_216_rr[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_rr[j]->align(FL_ALIGN_TOP); txt_216_rr[j]->callback(ics_changed); txt_216_rr[j]->when(FL_WHEN_CHANGED); Y += 24; } tab_216_3->end(); Y = tab_top; tab_216_4 = new Fl_Group(0, Y+25, 570, 360, _("Div-Grp 3")); tab_216_4->hide(); Y += 35; txt_216_div_grp[2] = new Fl_Input2(120, Y, 448, 24, _("Division/Group") ); txt_216_div_grp[2]->tooltip(_("")); txt_216_div_grp[2]->box(FL_DOWN_BOX); txt_216_div_grp[2]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_div_grp[2]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_div_grp[2]->labeltype(FL_NORMAL_LABEL); txt_216_div_grp[2]->labelfont(0); txt_216_div_grp[2]->labelsize(14); txt_216_div_grp[2]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_div_grp[2]->align(FL_ALIGN_LEFT); txt_216_div_grp[2]->callback(ics_changed); txt_216_div_grp[2]->when(FL_WHEN_CHANGED); Y += 24; txt_216_agency[2] = new Fl_Input2(120, Y, 448, 24, _("Agency") ); txt_216_agency[2]->tooltip(_("")); txt_216_agency[2]->box(FL_DOWN_BOX); txt_216_agency[2]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_agency[2]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_agency[2]->labeltype(FL_NORMAL_LABEL); txt_216_agency[2]->labelfont(0); txt_216_agency[2]->labelsize(14); txt_216_agency[2]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_agency[2]->align(FL_ALIGN_LEFT); txt_216_agency[2]->callback(ics_changed); txt_216_agency[2]->when(FL_WHEN_CHANGED); Y += 48; for (int i = 0, j = 18; i < 9; i++, j++) { txt_216_ag[j] = new Fl_Input2(5, Y, 180, 24, i == 0 ? "Agency" : ""); txt_216_ag[j]->tooltip(_("")); txt_216_ag[j]->box(FL_DOWN_BOX); txt_216_ag[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_ag[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_ag[j]->labeltype(FL_NORMAL_LABEL); txt_216_ag[j]->labelfont(0); txt_216_ag[j]->labelsize(14); txt_216_ag[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_ag[j]->align(FL_ALIGN_TOP); txt_216_ag[j]->callback(ics_changed); txt_216_ag[j]->when(FL_WHEN_CHANGED); txt_216_id[j] = new Fl_Input2(186, Y, 100, 24, i == 0 ? "ID No." : ""); txt_216_id[j]->tooltip(_("")); txt_216_id[j]->box(FL_DOWN_BOX); txt_216_id[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_id[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_id[j]->labeltype(FL_NORMAL_LABEL); txt_216_id[j]->labelfont(0); txt_216_id[j]->labelsize(14); txt_216_id[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_id[j]->align(FL_ALIGN_TOP); txt_216_id[j]->callback(ics_changed); txt_216_id[j]->when(FL_WHEN_CHANGED); txt_216_rr[j] = new Fl_Input2(287, Y, 280, 24, i == 0 ? "Radio Requirements" : ""); txt_216_rr[j]->tooltip(_("")); txt_216_rr[j]->box(FL_DOWN_BOX); txt_216_rr[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_rr[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_rr[j]->labeltype(FL_NORMAL_LABEL); txt_216_rr[j]->labelfont(0); txt_216_rr[j]->labelsize(14); txt_216_rr[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_rr[j]->align(FL_ALIGN_TOP); txt_216_rr[j]->callback(ics_changed); txt_216_rr[j]->when(FL_WHEN_CHANGED); Y += 24; } tab_216_4->end(); Y = tab_top; tab_216_5 = new Fl_Group(0, Y+25, 570, 360, _("Div-Grp 4")); tab_216_5->hide(); Y += 35; txt_216_div_grp[3] = new Fl_Input2(120, Y, 448, 24, _("Division/Group") ); txt_216_div_grp[3]->tooltip(_("")); txt_216_div_grp[3]->box(FL_DOWN_BOX); txt_216_div_grp[3]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_div_grp[3]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_div_grp[3]->labeltype(FL_NORMAL_LABEL); txt_216_div_grp[3]->labelfont(0); txt_216_div_grp[3]->labelsize(14); txt_216_div_grp[3]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_div_grp[3]->align(FL_ALIGN_LEFT); txt_216_div_grp[3]->callback(ics_changed); txt_216_div_grp[3]->when(FL_WHEN_CHANGED); Y += 24; txt_216_agency[3] = new Fl_Input2(120, Y, 448, 24, _("Agency") ); txt_216_agency[3]->tooltip(_("")); txt_216_agency[3]->box(FL_DOWN_BOX); txt_216_agency[3]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_agency[3]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_agency[3]->labeltype(FL_NORMAL_LABEL); txt_216_agency[3]->labelfont(0); txt_216_agency[3]->labelsize(14); txt_216_agency[3]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_agency[3]->align(FL_ALIGN_LEFT); txt_216_agency[3]->callback(ics_changed); txt_216_agency[3]->when(FL_WHEN_CHANGED); Y += 48; for (int i = 0, j = 27; i < 9; i++, j++) { txt_216_ag[j] = new Fl_Input2(5, Y, 180, 24, i == 0 ? "Agency" : ""); txt_216_ag[j]->tooltip(_("")); txt_216_ag[j]->box(FL_DOWN_BOX); txt_216_ag[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_ag[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_ag[j]->labeltype(FL_NORMAL_LABEL); txt_216_ag[j]->labelfont(0); txt_216_ag[j]->labelsize(14); txt_216_ag[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_ag[j]->align(FL_ALIGN_TOP); txt_216_ag[j]->callback(ics_changed); txt_216_ag[j]->when(FL_WHEN_CHANGED); txt_216_id[j] = new Fl_Input2(186, Y, 100, 24, i == 0 ? "ID No." : ""); txt_216_id[j]->tooltip(_("")); txt_216_id[j]->box(FL_DOWN_BOX); txt_216_id[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_id[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_id[j]->labeltype(FL_NORMAL_LABEL); txt_216_id[j]->labelfont(0); txt_216_id[j]->labelsize(14); txt_216_id[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_id[j]->align(FL_ALIGN_TOP); txt_216_id[j]->callback(ics_changed); txt_216_id[j]->when(FL_WHEN_CHANGED); txt_216_rr[j] = new Fl_Input2(287, Y, 280, 24, i == 0 ? "Radio Requirements" : ""); txt_216_rr[j]->tooltip(_("")); txt_216_rr[j]->box(FL_DOWN_BOX); txt_216_rr[j]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_216_rr[j]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_216_rr[j]->labeltype(FL_NORMAL_LABEL); txt_216_rr[j]->labelfont(0); txt_216_rr[j]->labelsize(14); txt_216_rr[j]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_216_rr[j]->align(FL_ALIGN_TOP); txt_216_rr[j]->callback(ics_changed); txt_216_rr[j]->when(FL_WHEN_CHANGED); Y += 24; } tab_216_5->end(); tab_ics216_type->end(); tab_ics216->end(); tab_ics216->hide(); } ������flmsg-2.0.10/src/ics/ics_tab.cxx��������������������������������������������������������������������0000664�0001750�0001750�00000002345�12330516146�013327� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" void ics_changed(Fl_Widget *, void *) { estimate(); } void create_ics_tab() { create_ics203_tab(); create_ics205_tab(); create_ics205a_tab(); create_ics206_tab(); create_ics213_tab(); create_ics214_tab(); create_ics216_tab(); create_ics309_tab(); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics213.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000036053�12500102046�012717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // ICS213 fields // compatibility fields required to read older data files string a_213_inc = "<inc:"; string a_213_to = "<to:"; string a_213_fm = "<fm:"; string a_213_p1 = "<p1:"; string a_213_p2 = "<p2:"; string a_213_subj = "<sb:"; string a_213_d1 = "<d1:"; string a_213_t1 = "<t1:"; string a_213_msg = "<mg:"; string a_213_s1 = "<s1:"; string a_213_p3 = "<p3:"; string a_213_reply = "<rp:"; string a_213_d2 = "<d2:"; string a_213_t2 = "<t2:"; string a_213_s2 = "<s2:"; string a_213_p4 = "<p4:"; FIELD afields[] = { { a_213_inc, "", (void **)&txt_213_inc, 't' }, { a_213_to, "", (void **)&txt_213_to, 't' }, { a_213_p1, "", (void **)&txt_213_p1, 't' }, { a_213_fm, "", (void **)&txt_213_fm, 't' }, { a_213_p2, "", (void **)&txt_213_p2, 't' }, { a_213_d1, "", (void **)&txt_213_d1, 'd' }, { a_213_t1, "", (void **)&txt_213_t1, 't' }, { a_213_subj, "", (void **)&txt_213_subj, 't' }, { a_213_s1, "", (void **)&txt_213_s1, 't' }, { a_213_p3, "", (void **)&txt_213_p3, 't' }, { a_213_s2, "", (void **)&txt_213_s2, 't' }, { a_213_p4, "", (void **)&txt_213_p4, 't' }, { a_213_d2, "", (void **)&txt_213_d2, 'd' }, { a_213_t2, "", (void **)&txt_213_t2, 't' }, { a_213_msg, "", (void **)&txt_213_msg, 'e' }, { a_213_reply, "", (void **)&txt_213_reply, 'e' } }; string _213_inc = ":inc:"; string _213_to = ":to:"; string _213_fm = ":fm:"; string _213_p1 = ":p1:"; string _213_p2 = ":p2:"; string _213_subj = ":sb:"; string _213_d1 = ":d1:"; string _213_t1 = ":t1:"; string _213_msg = ":mg:"; string _213_s1 = ":s1:"; string _213_p3 = ":p3:"; string _213_reply = ":rp:"; string _213_d2 = ":d2:"; string _213_t2 = ":t2:"; string _213_s2 = ":s2:"; string _213_p4 = ":p4:"; string ICS_213_msg = ""; string ICS_213_reply = ""; string buffer; FIELD fields[] = { { _213_inc, "", (void **)&txt_213_inc, 't' }, { _213_to, "", (void **)&txt_213_to, 't' }, { _213_p1, "", (void **)&txt_213_p1, 't' }, { _213_fm, "", (void **)&txt_213_fm, 't' }, { _213_p2, "", (void **)&txt_213_p2, 't' }, { _213_d1, "", (void **)&txt_213_d1, 'd' }, { _213_t1, "", (void **)&txt_213_t1, 't' }, { _213_subj, "", (void **)&txt_213_subj, 't' }, { _213_s1, "", (void **)&txt_213_s1, 't' }, { _213_p3, "", (void **)&txt_213_p3, 't' }, { _213_s2, "", (void **)&txt_213_s2, 't' }, { _213_p4, "", (void **)&txt_213_p4, 't' }, { _213_d2, "", (void **)&txt_213_d2, 'd' }, { _213_t2, "", (void **)&txt_213_t2, 't' }, { _213_msg, "", (void **)&txt_213_msg, 'e' }, { _213_reply, "", (void **)&txt_213_reply, 'e' } }; bool using_213Template = false; string base_213_filename = ""; string def_213_filename = ""; string def_213_TemplateName = ""; int numfields = sizeof(fields) / sizeof(FIELD); void cb_SetDate1() { txt_213_d1->value(szDate()); } void cb_SetDate2() { txt_213_d2->value(szDate()); } void cb_SetTime1() { txt_213_t1->value(szTime(progStatus.UTC)); } void cb_SetTime2() { txt_213_t2->value(szTime(progStatus.UTC)); } void clear_fields() { for (int i = 0; i < numfields; i++) fields[i].f_data.clear(); } bool check_fields() { for (int i = 0; i < numfields; i++) { if (fields[i].w_type == 'd') { if (fields[i].f_data != ((Fl_DateInput *)(*fields[i].w))->value()) return true; } else if (fields[i].w_type == 't') { if (fields[i].f_data != ((Fl_Input2 *)(*fields[i].w))->value()) return true; } else if (fields[i].w_type == 'e') { if (fields[i].f_data!= ((FTextEdit *)(*fields[i].w))->buffer()->text()) return true; } } return false; } void update_fields() { bool changed = false; for (int i = 0; i < numfields; i++) { if (fields[i].w_type == 'd') { if (fields[i].f_data != ((Fl_DateInput *)(*fields[i].w))->value()) { changed = true;; fields[i].f_data = ((Fl_DateInput *)(*fields[i].w))->value(); } } else if (fields[i].w_type == 't') { if (fields[i].f_data != ((Fl_Input2 *)(*fields[i].w))->value()) { changed = true;; fields[i].f_data = ((Fl_Input2 *)(*fields[i].w))->value(); } } else if (fields[i].w_type == 'e') { if (fields[i].f_data!= ((FTextEdit *)(*fields[i].w))->buffer()->text()) { changed = true;; fields[i].f_data = ((FTextEdit *)(*fields[i].w))->buffer()->text(); } } } if (changed) update_header(CHANGED); } void clear_213_form() { clear_fields(); txt_213_inc->value(""); txt_213_to->value(""); txt_213_p1->value(""); txt_213_fm->value(""); txt_213_p2->value(""); txt_213_subj->value(""); txt_213_d1->value(""); txt_213_t1->value(""); txt_213_msg->clear(); txt_213_s1->value(""); txt_213_p3->value(""); txt_213_reply->clear(); txt_213_s2->value(""); txt_213_d2->value(""); txt_213_t2->value(""); txt_213_p4->value(""); update_fields(); } void update_form213() { for (int i = 0; i < numfields; i++) { if (fields[i].w_type == 'd') ((Fl_DateInput *)(*fields[i].w))->value(fields[i].f_data.c_str()); else if (fields[i].w_type == 't') ((Fl_Input2 *)(*fields[i].w))->value(fields[i].f_data.c_str()); else if (fields[i].w_type == 'e') { ((FTextEdit *)(*fields[i].w))->clear(); ((FTextEdit *)(*fields[i].w))->add(fields[i].f_data.c_str()); } } } void make_buffer(bool compress = false) { string mbuff; mbuff.clear(); for (int i = 0; i < numfields; i++) mbuff.append( lineout( fields[i].f_type, fields[i].f_data ) ); if (compress) compress_maybe(mbuff); buffer.append(mbuff); } void read_213_buffer(string data) { bool data_ok = false; clear_fields(); read_header(data); for (int i = 0; i < numfields; i++) { fields[i].f_data = findstr(data, fields[i].f_type); if (!fields[i].f_data.empty()) data_ok = true; } if (!data_ok) for (int i = 0; i < numfields; i++) fields[i].f_data = findstr(data, afields[i].f_type); update_form213(); } void cb_213_new() { if (check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_213_save(); } } clear_213_form(); clear_header(); def_213_filename = ICS_msg_dir; def_213_filename.append("new"F213_EXT); using_213Template = false; show_filename(def_213_filename); } void cb_213_import() { string def_213_filename = ICS_dir; def_213_filename.append("DEFAULT.XML"); const char *p = FSEL::select( "Open Qforms xml file", "Qforms xml\t*.{xml,XML}", def_213_filename.c_str()); if (p){ clear_213_form(); clear_header(); qform_ics_import(p); using_213Template = false; } } void cb_213_export() { string def_213_filename = ICS_dir; def_213_filename.append(base_213_filename); def_213_filename.append(".XML"); const char *p = FSEL::saveas( "Open Qforms xml file", "Qforms xml\t*.{xml,XML}", def_213_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_213_filename = p; update_fields(); if (strlen(pext) == 0) def_213_filename.append(".XML"); qform_ics_export(def_213_filename); } } void cb_213_wrap_import(string wrapfilename, string inpbuffer) { clear_213_form(); read_213_buffer(inpbuffer); def_213_filename = ICS_msg_dir; def_213_filename.append(wrapfilename); using_213Template = false; show_filename(def_213_filename); } int eval_213_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_213_filename).append("]"); update_fields(); update_header(FROM); evalstr.append(header("<ics213>")); buffer.clear(); make_buffer(true); if (buffer.empty()) return 0; compress_maybe( buffer ); evalstr.append( buffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_213_wrap_export() { if (check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } if (base_213_filename == "new"F213_EXT || base_213_filename == "default"F213_EXT) if (!cb_213_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_213_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); update_fields(); buffer.assign(header("<ics213>")); make_buffer(true); export_wrapfile(base_213_filename, wrapfilename, buffer, pext != WRAP_EXT); buffer.assign(header("<ics213>")); make_buffer(false); write_213(def_213_filename); } } void cb_213_wrap_autosend() { if (check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } if (base_213_filename == "new"F213_EXT || base_213_filename == "default"F213_EXT) if (!cb_213_save_as()) return; update_header(FROM); update_fields(); buffer.assign(header("<ics213>")); make_buffer(true); xfr_via_socket(base_213_filename, buffer); buffer.assign(header("<ics213>")); make_buffer(false); write_213(def_213_filename); } void cb_213_load_template() { string def_213_filename = def_213_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T213_EXT, def_213_filename.c_str()); if (p) { clear_213_form(); read_data_file(p); def_213_TemplateName = p; show_filename(def_213_TemplateName); using_213Template = true; } } void cb_213_save_template() { if (!using_213Template) { cb_save_as_template(); return; } string def_213_filename = def_213_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T213_EXT, def_213_filename.c_str()); if (p) { update_header(CHANGED); update_fields(); buffer.assign(header("<ics213>")); make_buffer(); write_213(p); } } void cb_213_save_as_template() { string def_213_filename = def_213_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T213_EXT, def_213_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_213_TemplateName = p; if (strlen(pext) == 0) def_213_TemplateName.append(T213_EXT); remove_spaces_from_filename(def_213_TemplateName); clear_header(); update_header(CHANGED); update_fields(); buffer.assign(header("<ics213>")); make_buffer(); write_213(def_213_TemplateName); show_filename(def_213_TemplateName); using_213Template = true; } } void cb_213_open() { const char *p = FSEL::select(_("Open data file"), "ICS-213\t*.{213,f2s}", def_213_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_213_form(); read_data_file(p); using_213Template = false; def_213_filename = p; show_filename(def_213_filename); } void write_213(string s) { FILE *icsfile = fopen(s.c_str(), "w"); if (!icsfile) return; fwrite(buffer.c_str(), buffer.length(), 1, icsfile); fclose(icsfile); } bool cb_213_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F213_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_213_filename; p = FSEL::saveas(_("Save data file"), "ICS-213\t*.{213T,f2t}", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_213_filename = p; if (strlen(pext) == 0) def_213_filename.append(F213_EXT); remove_spaces_from_filename(def_213_filename); update_header(NEW); update_fields(); buffer.assign(header("<ics213>")); make_buffer(); write_213(def_213_filename); using_213Template = false; show_filename(def_213_filename); return true; } void cb_213_save() { if (base_213_filename == "new"F213_EXT || base_213_filename == "default"F213_EXT || using_213Template == true) { cb_213_save_as(); return; } if (check_fields()) update_header(CHANGED); update_fields(); buffer.assign(header("<ics213>")); make_buffer(); write_213(def_213_filename); using_213Template = false; } void cb_213_html() { string fname_name = fl_filename_name(def_213_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string icsname = ICS_dir; icsname.append(fname_name); icsname.append(".html"); string html_text = ""; update_fields(); string form = ics213_html_template; replacestr(form, TITLE, fname_name); for (int i = 0; i < numfields; i++) { if (fields[i].w_type != 'e') replacestr( form, fields[i].f_type, fields[i].f_data ); else { html_text = "<big style=\"font-family: Consolas, Monospace, Courier\";><pre>"; if (progStatus.autowordwrap) html_text.append(wordwrap(fields[i].f_data, progStatus.charcount)); else html_text.append(fields[i].f_data); html_text.append("</pre></big>"); replacestr( form, fields[i].f_type, html_text ); } } FILE *icsfile = fopen(icsname.c_str(), "w"); fprintf(icsfile,"%s", form.c_str()); fclose(icsfile); open_url(icsname.c_str()); } void cb_213_textout() { string icsname = ICS_dir; icsname.append("ics213.txt"); update_fields(); string form = ics213_text_template; for (int i = 0; i < numfields; i++) replacestr( form, fields[i].f_type, fields[i].f_data); FILE *icsfile = fopen(icsname.c_str(), "w"); fprintf(icsfile,"%s", form.c_str()); fclose(icsfile); open_url(icsname.c_str()); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics205_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000035554�12330516146�015016� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics205_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head>\n\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\n\ <title>:TITLE:</title>\n\ </head>\n\ <body>\n\ <table WIDTH=1000px border=0 cellpadding=0 cellspacing=0>\n\ <tbody>\n\ <tr><td>\n\ <table WIDTH=1000px border=1 cellpadding=2 cellspacing=0>\n\ <tbody>\n\ <tr ALIGN=center>\n\ <td VALIGN=top WIDTH=250px><b>INCIDENT RADIO<br>COMMUNICATIONS PLAN</b></td>\n\ <td VALIGN=top WIDTH=250px>\n\ <div ALIGN=left>1. Incident Name<br></div><div ALIGN=left>:nam:</div>\n\ </td>\n\ <td VALIGN=top ALIGN=left WIDTH=250px>2. Date/Time Prepared<br>:dt1:</td>\n\ <td VALIGN=top ALIGN=left WIDTH=250px>3. Operational Period<br>\n\ from: :dt2:<br>\n\ __to: :dt3:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td></tr>\n\ <tr><td>\n\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\n\ <tbody>\n\ <tr ALIGN=center>\n\ <td COLSPAN=9 VALIGN=top>4. Basic Radio Channel Utilization<br></td>\n\ </tr>\n\ <tr ALIGN=center>\n\ <td VALIGN=top HALIGN=center WIDTH=30px>LN<br>#<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=160px>Function<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=160px>Channel<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=160px>Assignment<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=115px>Rx Freq<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=115px>Rx Tone<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=115px>Tx Freq<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=115px>Tx Tone<br></td>\n\ <td VALIGN=top HALIGN=center WIDTH=30px>Mode<br>A/D/M<br></td>\n\ </tr>\n\ <tr>\n\ <td>1</td>\n\ <td VALIGN=top>:func00:<br></td>\n\ <td VALIGN=top>:chan00:<br></td>\n\ <td VALIGN=top>:asgn00:<br></td>\n\ <td VALIGN=top>:rxfq00:<br></td>\n\ <td VALIGN=top>:rxtn00:<br></td>\n\ <td VALIGN=top>:txfq00:<br></td>\n\ <td VALIGN=top>:txtn00:<br></td>\n\ <td VALIGN=top>:mode00:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk00:<br></td>\n\ </tr>\n\ <tr>\n\ <td>2</td>\n\ <td VALIGN=top>:func01:<br></td>\n\ <td VALIGN=top>:chan01:<br></td>\n\ <td VALIGN=top>:asgn01:<br></td>\n\ <td VALIGN=top>:rxfq01:<br></td>\n\ <td VALIGN=top>:rxtn01:<br></td>\n\ <td VALIGN=top>:txfq01:<br></td>\n\ <td VALIGN=top>:txtn01:<br></td>\n\ <td VALIGN=top>:mode01:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk01:<br></td>\n\ </tr>\n\ <tr>\n\ <td>3</td>\n\ <td VALIGN=top>:func02:<br></td>\n\ <td VALIGN=top>:chan02:<br></td>\n\ <td VALIGN=top>:asgn02:<br></td>\n\ <td VALIGN=top>:rxfq02:<br></td>\n\ <td VALIGN=top>:rxtn02:<br></td>\n\ <td VALIGN=top>:txfq02:<br></td>\n\ <td VALIGN=top>:txtn02:<br></td>\n\ <td VALIGN=top>:mode02:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk02:<br></td>\n\ </tr>\n\ <tr>\n\ <td>4</td>\n\ <td VALIGN=top>:func03:<br></td>\n\ <td VALIGN=top>:chan03:<br></td>\n\ <td VALIGN=top>:asgn03:<br></td>\n\ <td VALIGN=top>:rxfq03:<br></td>\n\ <td VALIGN=top>:rxtn03:<br></td>\n\ <td VALIGN=top>:txfq03:<br></td>\n\ <td VALIGN=top>:txtn03:<br></td>\n\ <td VALIGN=top>:mode03:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk03:<br></td>\n\ </tr>\n\ <tr>\n\ <td>5</td>\n\ <td VALIGN=top>:func04:<br></td>\n\ <td VALIGN=top>:chan04:<br></td>\n\ <td VALIGN=top>:asgn04:<br></td>\n\ <td VALIGN=top>:rxfq04:<br></td>\n\ <td VALIGN=top>:rxtn04:<br></td>\n\ <td VALIGN=top>:txfq04:<br></td>\n\ <td VALIGN=top>:txtn04:<br></td>\n\ <td VALIGN=top>:mode04:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk04:<br></td>\n\ </tr>\n\ <tr>\n\ <td>6</td>\n\ <td VALIGN=top>:func05:<br></td>\n\ <td VALIGN=top>:chan05:<br></td>\n\ <td VALIGN=top>:asgn05:<br></td>\n\ <td VALIGN=top>:rxfq05:<br></td>\n\ <td VALIGN=top>:rxtn05:<br></td>\n\ <td VALIGN=top>:txfq05:<br></td>\n\ <td VALIGN=top>:txtn05:<br></td>\n\ <td VALIGN=top>:mode05:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk05:<br></td>\n\ </tr>\n\ <tr>\n\ <td>7</td>\n\ <td VALIGN=top>:func06:<br></td>\n\ <td VALIGN=top>:chan06:<br></td>\n\ <td VALIGN=top>:asgn06:<br></td>\n\ <td VALIGN=top>:rxfq06:<br></td>\n\ <td VALIGN=top>:rxtn06:<br></td>\n\ <td VALIGN=top>:txfq06:<br></td>\n\ <td VALIGN=top>:txtn06:<br></td>\n\ <td VALIGN=top>:mode06:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk06:<br></td>\n\ </tr>\n\ <tr>\n\ <td>8</td>\n\ <td VALIGN=top>:func07:<br></td>\n\ <td VALIGN=top>:chan07:<br></td>\n\ <td VALIGN=top>:asgn07:<br></td>\n\ <td VALIGN=top>:rxfq07:<br></td>\n\ <td VALIGN=top>:rxtn07:<br></td>\n\ <td VALIGN=top>:txfq07:<br></td>\n\ <td VALIGN=top>:txtn07:<br></td>\n\ <td VALIGN=top>:mode07:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk07:<br></td>\n\ </tr>\n\ <tr>\n\ <tr>\n\ <td>9</td>\n\ <td VALIGN=top>:func08:<br></td>\n\ <td VALIGN=top>:chan08:<br></td>\n\ <td VALIGN=top>:asgn08:<br></td>\n\ <td VALIGN=top>:rxfq08:<br></td>\n\ <td VALIGN=top>:rxtn08:<br></td>\n\ <td VALIGN=top>:txfq08:<br></td>\n\ <td VALIGN=top>:txtn08:<br></td>\n\ <td VALIGN=top>:mode08:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk08:<br></td>\n\ </tr>\n\ <tr>\n\ <td>10</td>\n\ <td VALIGN=top>:func09:<br></td>\n\ <td VALIGN=top>:chan09:<br></td>\n\ <td VALIGN=top>:asgn09:<br></td>\n\ <td VALIGN=top>:rxfq09:<br></td>\n\ <td VALIGN=top>:rxtn09:<br></td>\n\ <td VALIGN=top>:txfq09:<br></td>\n\ <td VALIGN=top>:txtn09:<br></td>\n\ <td VALIGN=top>:mode09:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk09:<br></td>\n\ </tr>\n\ <tr>\n\ <td>11</td>\n\ <td VALIGN=top>:func10:<br></td>\n\ <td VALIGN=top>:chan10:<br></td>\n\ <td VALIGN=top>:asgn10:<br></td>\n\ <td VALIGN=top>:rxfq10:<br></td>\n\ <td VALIGN=top>:rxtn10:<br></td>\n\ <td VALIGN=top>:txfq10:<br></td>\n\ <td VALIGN=top>:txtn10:<br></td>\n\ <td VALIGN=top>:mode10:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk10:<br></td>\n\ </tr>\n\ <tr>\n\ <td>12</td>\n\ <td VALIGN=top>:func11:<br></td>\n\ <td VALIGN=top>:chan11:<br></td>\n\ <td VALIGN=top>:asgn11:<br></td>\n\ <td VALIGN=top>:rxfq11:<br></td>\n\ <td VALIGN=top>:rxtn11:<br></td>\n\ <td VALIGN=top>:txfq11:<br></td>\n\ <td VALIGN=top>:txtn11:<br></td>\n\ <td VALIGN=top>:mode11:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk11:<br></td>\n\ </tr>\n\ <tr>\n\ <td>13</td>\n\ <td VALIGN=top>:func12:<br></td>\n\ <td VALIGN=top>:chan12:<br></td>\n\ <td VALIGN=top>:asgn12:<br></td>\n\ <td VALIGN=top>:rxfq12:<br></td>\n\ <td VALIGN=top>:rxtn12:<br></td>\n\ <td VALIGN=top>:txfq12:<br></td>\n\ <td VALIGN=top>:txtn12:<br></td>\n\ <td VALIGN=top>:mode12:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk12:<br></td>\n\ </tr>\n\ <tr>\n\ <td>14</td>\n\ <td VALIGN=top>:func13:<br></td>\n\ <td VALIGN=top>:chan13:<br></td>\n\ <td VALIGN=top>:asgn13:<br></td>\n\ <td VALIGN=top>:rxfq13:<br></td>\n\ <td VALIGN=top>:rxtn13:<br></td>\n\ <td VALIGN=top>:txfq13:<br></td>\n\ <td VALIGN=top>:txtn13:<br></td>\n\ <td VALIGN=top>:mode13:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk13:<br></td>\n\ </tr>\n\ <tr>\n\ <td>15</td>\n\ <td VALIGN=top>:func14:<br></td>\n\ <td VALIGN=top>:chan14:<br></td>\n\ <td VALIGN=top>:asgn14:<br></td>\n\ <td VALIGN=top>:rxfq14:<br></td>\n\ <td VALIGN=top>:rxtn14:<br></td>\n\ <td VALIGN=top>:txfq14:<br></td>\n\ <td VALIGN=top>:txtn14:<br></td>\n\ <td VALIGN=top>:mode14:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk14:<br></td>\n\ </tr>\n\ <tr>\n\ <td>16</td>\n\ <td VALIGN=top>:func15:<br></td>\n\ <td VALIGN=top>:chan15:<br></td>\n\ <td VALIGN=top>:asgn15:<br></td>\n\ <td VALIGN=top>:rxfq15:<br></td>\n\ <td VALIGN=top>:rxtn15:<br></td>\n\ <td VALIGN=top>:txfq15:<br></td>\n\ <td VALIGN=top>:txtn15:<br></td>\n\ <td VALIGN=top>:mode15:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk15:<br></td>\n\ </tr>\n\ <tr>\n\ <td>17</td>\n\ <td VALIGN=top>:func16:<br></td>\n\ <td VALIGN=top>:chan16:<br></td>\n\ <td VALIGN=top>:asgn16:<br></td>\n\ <td VALIGN=top>:rxfq16:<br></td>\n\ <td VALIGN=top>:rxtn16:<br></td>\n\ <td VALIGN=top>:txfq16:<br></td>\n\ <td VALIGN=top>:txtn16:<br></td>\n\ <td VALIGN=top>:mode16:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk16:<br></td>\n\ </tr>\n\ <tr>\n\ <td>18</td>\n\ <td VALIGN=top>:func17:<br></td>\n\ <td VALIGN=top>:chan17:<br></td>\n\ <td VALIGN=top>:asgn17:<br></td>\n\ <td VALIGN=top>:rxfq17:<br></td>\n\ <td VALIGN=top>:rxtn17:<br></td>\n\ <td VALIGN=top>:txfq17:<br></td>\n\ <td VALIGN=top>:txtn17:<br></td>\n\ <td VALIGN=top>:mode17:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk17:<br></td>\n\ </tr>\n\ <tr>\n\ <td>19</td>\n\ <td VALIGN=top>:func18:<br></td>\n\ <td VALIGN=top>:chan18:<br></td>\n\ <td VALIGN=top>:asgn18:<br></td>\n\ <td VALIGN=top>:rxfq18:<br></td>\n\ <td VALIGN=top>:rxtn18:<br></td>\n\ <td VALIGN=top>:txfq18:<br></td>\n\ <td VALIGN=top>:txtn18:<br></td>\n\ <td VALIGN=top>:mode18:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk18:<br></td>\n\ </tr>\n\ <tr>\n\ <td>20</td>\n\ <td VALIGN=top>:func19:<br></td>\n\ <td VALIGN=top>:chan19:<br></td>\n\ <td VALIGN=top>:asgn19:<br></td>\n\ <td VALIGN=top>:rxfq19:<br></td>\n\ <td VALIGN=top>:rxtn19:<br></td>\n\ <td VALIGN=top>:txfq19:<br></td>\n\ <td VALIGN=top>:txtn19:<br></td>\n\ <td VALIGN=top>:mode19:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=9 VALIGN=top>Remark: :rmrk19:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN = 4 VALIGN=top>5. Prepared by (Communications unit)<br>:prp:<br></td>\n\ <td COLSPAN = 5 VALIGN=top>6. Incident Location<br>\n\ County: :cnty: State: :stat: Lat: :lat: Lon: :lon:<br>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td></tr>\n\ </tbody>\n\ </table>\n\ </body>\n\ </html>"; const char ics205_text_template[] = "ICS 205 INCIDENT RADIO COMMUNICATIONS PLAN\n\n\ Incident name: :nam:\n\ Date/Time Prepared: :dt1:\n\ Operational Period Date/Time from: :dt2:\n\ Operational Period Date/Time to: :dt3:\n\ System/Cache #1: :func00:\n\ Channel #1: :chan00:\n\ Function #1: :func00:\n\ Rx Freq/Tone #1: :rxfq00: :rxtn00:\n\ Tx Freq/Tone #1: :txfq00: :txtn00:\n\ Assignment #1: :mode00:\n\ Remarks #1: :rmrk00:\n\ System/Cache #2: :func01:\n\ Channel #2: :chan01:\n\ Function #2: :asgn01:\n\ Rx Freq/Tone #2: :rxfq01: :rxtn01:\n\ Tx Freq/Tone #2: :txfq01: :txtn01:\n\ Assignment #2: :mode01:\n\ Remarks #2: :rmrk01:\n\ System/Cache #3: :func02:\n\ Channel #3: :chan02:\n\ Function #3: :asgn02:\n\ Rx Freq/Tone #3: :rxfq02: :rxtn02:\n\ Tx Freq/Tone #3: :txfq02: :txtn02:\n\ Assignment #3: :mode02:\n\ Remarks #3: :rmrk02:\n\ System/Cache #4: :func03:\n\ Channel #4: :chan03:\n\ Function #4: :asgn03:\n\ Rx Freq/Tone #4: :rxfq03: :rxtn03:\n\ Tx Freq/Tone #4: :txfq03: :txtn03:\n\ Assignment #4: :mode03:\n\ Remarks #4: :rmrk03:\n\ System/Cache #5: :func04:\n\ Channel #5: :chan04:\n\ Function #5: :asgn04:\n\ Rx Freq/Tone #5: :rxfq04: :rxtn04:\n\ Tx Freq/Tone #5: :txfq04: :txtn04:\n\ Assignment #5: :mode04:\n\ Remarks #5: :rmrk04:\n\ System/Cache #6: :func05:\n\ Channel #6: :chan05:\n\ Function #6: :asgn05:\n\ Rx Freq/Tone #6: :rxfq05: :rxtn05:\n\ Tx Freq/Tone #6: :txfq05: :txtn05:\n\ Assignment #6: :mode05:\n\ Remarks #6: :rmrk05:\n\ System/Cache #7: :func06:\n\ Channel #7: :chan06:\n\ Function #7: :asgn06:\n\ Rx Freq/Tone #7: :rxfq06: :rxtn06:\n\ Tx Freq/Tone #7: :txfq06: :txtn06:\n\ Assignment #7: :mode06:\n\ Remarks #7: :rmrk06:\n\ System/Cache #8: :func07:\n\ Channel #8: :chan07:\n\ Function #8: :asgn07:\n\ Rx Freq/Tone #8: :rxfq07: :rxtn07:\n\ Tx Freq/Tone #8: :txfq07: :txtn07:\n\ Assignment #8: :mode07:\n\ Remarks #8: :rmrk07:\n\ System/Cache #9: :func08:\n\ Channel #9: :chan08:\n\ Function #9: :asgn08:\n\ Rx Freq/Tone #9: :rxfq08: :rxtn08:\n\ Tx Freq/Tone #9: :txfq08: :txtn08:\n\ Assignment #9: :mode08:\n\ Remarks #9: :rmrk08:\n\ System/Cache #10: :func09:\n\ Channel #10: :chan09:\n\ Function #10: :asgn09:\n\ Rx Freq/Tone #10: :rxfq09: :rxtn09:\n\ Tx Freq/Tone #10: :txfq09: :txtn09:\n\ Assignment #10: :mode09:\n\ Remarks #10: :rmrk09:\n\ System/Cache #11: :func10:\n\ Channel #11: :chan10:\n\ Function #11: :asgn10:\n\ Rx Freq/Tone #11: :rxfq10: :rxtn10:\n\ Tx Freq/Tone #11: :txfq10: :txtn10:\n\ Assignment #11: :mode10:\n\ Remarks #11: :rmrk10:\n\ System/Cache #12: :func11:\n\ Channel #12: :chan11:\n\ Function #12: :asgn11:\n\ Rx Freq/Tone #12: :rxfq11: :rxtn11:\n\ Tx Freq/Tone #12: :txfq11: :txtn11:\n\ Assignment #12: :mode11:\n\ Remarks #12: :rmrk11:\n\ System/Cache #13: :func12:\n\ Channel #13: :chan12:\n\ Function #13: :asgn12:\n\ Rx Freq/Tone #13: :rxfq12: :rxtn12:\n\ Tx Freq/Tone #13: :txfq12: :txtn12:\n\ Assignment #13: :mode12:\n\ Remarks #13: :rmrk12:\n\ System/Cache #14: :func13:\n\ Channel #14: :chan13:\n\ Function #14: :asgn13:\n\ Rx Freq/Tone #14: :rxfq13: :rxtn13:\n\ Tx Freq/Tone #14: :txfq13: :txtn13:\n\ Assignment #14: :mode13:\n\ Remarks #14: :rmrk13:\n\ System/Cache #15: :func14:\n\ Channel #15: :chan14:\n\ Function #15: :asgn14:\n\ Rx Freq/Tone #15: :rxfq14: :rxtn14:\n\ Tx Freq/Tone #15: :txfq14: :txtn14:\n\ Assignment #15: :mode14:\n\ Remarks #15: :rmrk14:\n\ System/Cache #16: :func15:\n\ Channel #16: :chan15:\n\ Function #16: :asgn15:\n\ Rx Freq/Tone #16: :rxfq15: :rxtn15:\n\ Tx Freq/Tone #16: :txfq15: :txtn15:\n\ Assignment #16: :mode15:\n\ Remarks #16: :rmrk15:\n\ System/Cache #17: :func16:\n\ Channel #17: :chan16:\n\ Function #17: :asgn16:\n\ Rx Freq/Tone #17: :rxfq16: :rxtn16:\n\ Tx Freq/Tone #17: :txfq16: :txtn16:\n\ Assignment #17: :mode16:\n\ Remarks #17: :rmrk16:\n\ System/Cache #18: :func17:\n\ Channel #18: :chan17:\n\ Function #18: :asgn17:\n\ Rx Freq/Tone #18: :rxfq17: :rxtn17:\n\ Tx Freq/Tone #18: :txfq17: :txtn17:\n\ Assignment #18: :mode17:\n\ Remarks #18: :rmrk17:\n\ System/Cache #19: :func18:\n\ Channel #19: :chan18:\n\ Function #19: :asgn18:\n\ Rx Freq/Tone #19: :rxfq18: :rxtn18:\n\ Tx Freq/Tone #19: :txfq18: :txtn18:\n\ Assignment #19: :mode18:\n\ Remarks #19: :rmrk18:\n\ System/Cache #20: :func19:\n\ Channel #20: :chan19:\n\ Function #20: :asgn19:\n\ Rx Freq/Tone #20: :rxfq19: :rxtn19:\n\ Tx Freq/Tone #20: :txfq19: :txtn19:\n\ Assignment #20: :mode19:\n\ Remarks #20: :rmrk19:\n\ Prepared by (Communications unit): :prp:\n\ County: :cnty:\n\ State: :stat:\n\ Latitude: :lat:\n\ Longitude: :lon:\n"; ����������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics205a_templates.cxx����������������������������������������������������������0000664�0001750�0001750�00000023265�12330516146�015153� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics205a_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head>\n\ <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n\ <title>:TITLE:</title>\n\ </head>\n\ <body>\n\ <table width=950px border=1 cellpadding=1 cellspacing=0>\n\ <tbody>\n\ <tr>\ <td colspan=7 ALIGN=left VALIGN=top><b>1. Incident name</b><br>:inc:</td>\ <td colspan=4 ALIGN=left VALIGN=top><b>2.From:</b><br>:dfm: :tfm:</td>\ <td colspan=4 ALIGN=left VALIGN=top><b>3.To: </b><br>:dto: :tto:</td>\ <td colspan=5 ALIGN=right VALIGN=top BGCOLOR=#EEFFFF><b>COMMUNICATIONS LIST<br>(ICS-205A)</b></td>\ </tr>\ <tr BGCOLOR=#EEFFFF>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ <td WIDTH=5% HEIGHT= 0></td><td WIDTH=5% HEIGHT= 0></td>\ </tr>\ <tr>\ <td colspan=20 ALIGN=left VALIGN=top>\ <b>4. Basic Local Communications Info</b>\ </td>\ </tr>\ <tr>\ <td colspan=6 ALIGN=center VALIGN=top><br><b>Assignment</b></td>\ <td colspan=6 ALIGN=center VALIGN=top><b><br>Name</b><br></td>\ <td colspan=8 ALIGN=center VALIGN=top>\ <b>Methods of Contact</b><br>(radio frequency, phone, pager, cell, etc.)</b>\ </td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[0]:</td>\ <td colspan=6 VALIGN=top>:nam[0]:</td>\ <td colspan=8 VALIGN=top>:inf[0]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[1]:</td>\ <td colspan=6 VALIGN=top>:nam[1]:</td>\ <td colspan=8 VALIGN=top>:inf[1]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[2]:</td>\ <td colspan=6 VALIGN=top>:nam[2]:</td>\ <td colspan=8 VALIGN=top>:inf[2]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[3]:</td>\ <td colspan=6 VALIGN=top>:nam[3]:</td>\ <td colspan=8 VALIGN=top>:inf[3]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[4]:</td>\ <td colspan=6 VALIGN=top>:nam[4]:</td>\ <td colspan=8 VALIGN=top>:inf[4]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[5]:</td>\ <td colspan=6 VALIGN=top>:nam[5]:</td>\ <td colspan=8 VALIGN=top>:inf[5]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[6]:</td>\ <td colspan=6 VALIGN=top>:nam[6]:</td>\ <td colspan=8 VALIGN=top>:inf[6]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[7]:</td>\ <td colspan=6 VALIGN=top>:nam[7]:</td>\ <td colspan=8 VALIGN=top>:inf[7]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[8]:</td>\ <td colspan=6 VALIGN=top>:nam[8]:</td>\ <td colspan=8 VALIGN=top>:inf[8]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[9]:</td>\ <td colspan=6 VALIGN=top>:nam[9]:</td>\ <td colspan=8 VALIGN=top>:inf[9]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[10]:</td>\ <td colspan=6 VALIGN=top>:nam[10]:</td>\ <td colspan=8 VALIGN=top>:inf[10]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[11]:</td>\ <td colspan=6 VALIGN=top>:nam[11]:</td>\ <td colspan=8 VALIGN=top>:inf[11]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[12]:</td>\ <td colspan=6 VALIGN=top>:nam[12]:</td>\ <td colspan=8 VALIGN=top>:inf[12]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[13]:</td>\ <td colspan=6 VALIGN=top>:nam[13]:</td>\ <td colspan=8 VALIGN=top>:inf[13]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[14]:</td>\ <td colspan=6 VALIGN=top>:nam[14]:</td>\ <td colspan=8 VALIGN=top>:inf[14]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[15]:</td>\ <td colspan=6 VALIGN=top>:nam[15]:</td>\ <td colspan=8 VALIGN=top>:inf[15]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[16]:</td>\ <td colspan=6 VALIGN=top>:nam[16]:</td>\ <td colspan=8 VALIGN=top>:inf[16]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[17]:</td>\ <td colspan=6 VALIGN=top>:nam[17]:</td>\ <td colspan=8 VALIGN=top>:inf[17]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[18]:</td>\ <td colspan=6 VALIGN=top>:nam[18]:</td>\ <td colspan=8 VALIGN=top>:inf[18]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[19]:</td>\ <td colspan=6 VALIGN=top>:nam[19]:</td>\ <td colspan=8 VALIGN=top>:inf[19]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[20]:</td>\ <td colspan=6 VALIGN=top>:nam[20]:</td>\ <td colspan=8 VALIGN=top>:inf[20]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[21]:</td>\ <td colspan=6 VALIGN=top>:nam[21]:</td>\ <td colspan=8 VALIGN=top>:inf[21]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[22]:</td>\ <td colspan=6 VALIGN=top>:nam[22]:</td>\ <td colspan=8 VALIGN=top>:inf[22]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[23]:</td>\ <td colspan=6 VALIGN=top>:nam[23]:</td>\ <td colspan=8 VALIGN=top>:inf[23]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[24]:</td>\ <td colspan=6 VALIGN=top>:nam[24]:</td>\ <td colspan=8 VALIGN=top>:inf[24]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[25]:</td>\ <td colspan=6 VALIGN=top>:nam[25]:</td>\ <td colspan=8 VALIGN=top>:inf[25]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[26]:</td>\ <td colspan=6 VALIGN=top>:nam[26]:</td>\ <td colspan=8 VALIGN=top>:inf[26]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[27]:</td>\ <td colspan=6 VALIGN=top>:nam[27]:</td>\ <td colspan=8 VALIGN=top>:inf[27]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[28]:</td>\ <td colspan=6 VALIGN=top>:nam[28]:</td>\ <td colspan=8 VALIGN=top>:inf[28]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[29]:</td>\ <td colspan=6 VALIGN=top>:nam[29]:</td>\ <td colspan=8 VALIGN=top>:inf[29]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[30]:</td>\ <td colspan=6 VALIGN=top>:nam[30]:</td>\ <td colspan=8 VALIGN=top>:inf[30]:</td>\ </tr>\ <tr>\ <td colspan=6 VALIGN=top>:asg[31]:</td>\ <td colspan=6 VALIGN=top>:nam[31]:</td>\ <td colspan=8 VALIGN=top>:inf[31]:</td>\ </tr>\ <tr>\ <td colspan=8 VALIGN=top>5. Prepared by:<br>:pre:</td>\ <td colspan=6 VALIGN=top>Position/Title:<br>:pos:</td>\ <td colspan=6 VALIGN=top>Date time:<br>:dtm:</td>\ </tr>\ <tr>\ <td colspan=4 ALIGN=center VALIGN=middle>ICS-205A</td>\ <td colspan=4 VALIGN=top>IAP Page</td>\ <td colspan=12 VALIGN=top>Signature:<br><br></td>\ </tr>\ </tbody>\ </table>\ </body></html>\ "; const char ics205a_text_template[] = "ICS 205a UNIT LOG\n\n\ Incident name: :inc:\n\ Date Prepared: :dat:\n\ Time Prepared: :tim:\n\ Prepared by: :pre:\n\ Preparer position: :pos:\n\ Preparer date time: :dtm:\n\ Comm Group Information\n\ line 0: :asg[0]:, :nam[0]:, :inf[0]:\n\ line 1: :asg[1]:, :nam[1]:, :inf[1]:\n\ line 2: :asg[2]:, :nam[2]:, :inf[2]:\n\ line 3: :asg[3]:, :nam[3]:, :inf[3]:\n\ line 4: :asg[4]:, :nam[4]:, :inf[4]:\n\ line 5: :asg[5]:, :nam[5]:, :inf[5]:\n\ line 6: :asg[6]:, :nam[6]:, :inf[6]:\n\ line 7: :asg[7]:, :nam[7]:, :inf[7]:\n\ line 8: :asg[8]:, :nam[8]:, :inf[8]:\n\ line 9: :asg[9]:, :nam[9]:, :inf[9]:\n\ line 10: :asg[10]:, :nam[10]:, :inf[10]:\n\ line 11: :asg[11]:, :nam[11]:, :inf[11]:\n\ line 12: :asg[12]:, :nam[12]:, :inf[12]:\n\ line 13: :asg[13]:, :nam[13]:, :inf[13]:\n\ line 14: :asg[14]:, :nam[14]:, :inf[14]:\n\ line 15: :asg[15]:, :nam[15]:, :inf[15]:\n\ line 16: :asg[16]:, :nam[16]:, :inf[16]:\n\ line 17: :asg[17]:, :nam[17]:, :inf[17]:\n\ line 18: :asg[18]:, :nam[18]:, :inf[18]:\n\ line 19: :asg[19]:, :nam[19]:, :inf[19]:\n\ line 20: :asg[20]:, :nam[20]:, :inf[20]:\n\ line 21: :asg[21]:, :nam[21]:, :inf[21]:\n\ line 22: :asg[22]:, :nam[22]:, :inf[22]:\n\ line 23: :asg[23]:, :nam[23]:, :inf[23]:\n\ line 24: :asg[24]:, :nam[24]:, :inf[24]:\n\ line 25: :asg[25]:, :nam[25]:, :inf[25]:\n\ line 26: :asg[26]:, :nam[26]:, :inf[26]:\n\ line 27: :asg[27]:, :nam[27]:, :inf[27]:\n\ line 28: :asg[28]:, :nam[28]:, :inf[28]:\n\ line 29: :asg[29]:, :nam[29]:, :inf[29]:\n\ line 30: :asg[30]:, :nam[30]:, :inf[30]:\n\ line 31: :asg[31]:, :nam[31]:, :inf[31]:\n\ "; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics214.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000040717�12330516146�012735� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 214 field variables and template variables // --------------------------------------------------------------------- string ics214_incident = ":inc:"; string ics214_date = ":dat:"; string ics214_time = ":tim:"; string ics214_op_period = ":opp:"; string ics214_unit_name = ":und:"; string ics214_unit_leader = ":unl:"; string ics214_roster_name = ":nam[n]:"; // 14 string ics214_roster_position = ":pos[n]:"; string ics214_roster_home_base = ":hom[n]:"; string ics214_activity_time = ":at[n]:"; // 16 string ics214_activity_event = ":ev[n]:"; string ics214_prepared_by = ":pre:"; string s214_incident; string s214_date; string s214_time; string s214_op_period; string s214_unit_name; string s214_unit_leader; string s214_roster_name[16]; string s214_roster_position[16]; string s214_roster_home_base[16]; string s214_activity_time[16]; string s214_activity_event[16]; string s214_prepared_by; // ===================================================================== string buff214; string def_214_filename = ""; string base_214_filename = ""; string def_214_TemplateName = ""; bool using_ics214_template = false; void cb_214_set_date() { txt_214_date->value(szDate()); } void cb_214_set_time() { txt_214_time->value(szTime()); } void clear_214fields() { s214_incident.clear(); s214_date.clear(); s214_time.clear(); s214_op_period.clear(); s214_unit_name.clear(); s214_unit_leader.clear(); s214_prepared_by.clear(); for (int i = 0; i < 16; i++) { s214_roster_name[i].clear(); s214_roster_position[i].clear(); s214_roster_home_base[i].clear(); s214_activity_time[i].clear(); s214_activity_event[i].clear(); } } bool check_214fields() { if (s214_incident != txt_214_incident->value()) return true; if (s214_date != txt_214_date->value()) return true; if (s214_time != txt_214_time->value()) return true; if (s214_op_period != txt_214_op_period->value()) return true; if (s214_unit_name != txt_214_unit_name->value()) return true; if (s214_unit_leader != txt_214_unit_leader->value()) return true; if (s214_prepared_by != txt_214_prepared_by->value()) return true; for (int i = 0; i < 16; i++) { if (s214_roster_name[i] != txt_214_roster_name[i]->value()) return true; if (s214_roster_position[i] != txt_214_roster_position[i]->value()) return true; if (s214_roster_home_base[i] != txt_214_roster_home_base[i]->value()) return true; if (s214_activity_time[i] != txt_214_activity_time[i]->value()) return true; if (s214_activity_event[i] != txt_214_activity_event[i]->value()) return true; } return false; } void update_214fields() { s214_incident = txt_214_incident->value(); s214_date = txt_214_date->value(); s214_time = txt_214_time->value(); s214_op_period = txt_214_op_period->value(); s214_unit_name = txt_214_unit_name->value(); s214_unit_leader = txt_214_unit_leader->value(); s214_prepared_by = txt_214_prepared_by->value(); for (int i = 0; i < 16; i++) { s214_roster_name[i] = txt_214_roster_name[i]->value(); s214_roster_position[i] = txt_214_roster_position[i]->value(); s214_roster_home_base[i] = txt_214_roster_home_base[i]->value(); s214_activity_time[i] = txt_214_activity_time[i]->value(); s214_activity_event[i] = txt_214_activity_event[i]->value(); } } void update_214form() { txt_214_incident->value(s214_incident.c_str()); txt_214_date->value(s214_date.c_str()); txt_214_time->value(s214_time.c_str()); txt_214_op_period->value(s214_op_period.c_str()); txt_214_unit_name->value(s214_unit_name.c_str()); txt_214_unit_leader->value(s214_unit_leader.c_str()); txt_214_prepared_by->value(s214_prepared_by.c_str()); for (int i = 0; i < 16; i++) { txt_214_roster_name[i]->value(s214_roster_name[i].c_str()); txt_214_roster_position[i]->value(s214_roster_position[i].c_str()); txt_214_roster_home_base[i]->value(s214_roster_home_base[i].c_str()); txt_214_activity_time[i]->value(s214_activity_time[i].c_str()); txt_214_activity_event[i]->value(s214_activity_event[i].c_str()); } } void clear_214_form() { clear_214fields(); update_214form(); } string &ics_nn(string & subst, int n) { static string garbage = "#$^*!"; static string ics; ics.clear(); ics = subst; size_t pos = ics.find("["); if (pos == string::npos) return garbage; pos++; if (n < 10) ics[pos] = '0' + n; else { ics[pos] = '1'; ics[pos+1] = '0' + n % 10; ics[pos+2] = ']'; ics += ':'; } return ics; } void make_buff214(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics214_incident, s214_incident ) ); mbuff.append( lineout( ics214_date, s214_date ) ); mbuff.append( lineout( ics214_time, s214_time ) ); mbuff.append( lineout( ics214_op_period, s214_op_period ) ); mbuff.append( lineout( ics214_unit_name, s214_unit_name) ); mbuff.append( lineout( ics214_unit_leader, s214_unit_leader) ); mbuff.append( lineout( ics214_prepared_by, s214_prepared_by ) ); for (int i = 0; i < 16; i++) { mbuff.append( lineout( ics_nn( ics214_roster_name, i ), s214_roster_name[i] ) ); mbuff.append( lineout( ics_nn( ics214_roster_position, i ), s214_roster_position[i] ) ); mbuff.append( lineout( ics_nn( ics214_roster_home_base, i ), s214_roster_home_base[i] ) ); mbuff.append( lineout( ics_nn( ics214_activity_time, i ), s214_activity_time[i] ) ); mbuff.append( lineout( ics_nn( ics214_activity_event, i ), s214_activity_event[i] ) ); } if (compress) compress_maybe(mbuff); buff214.append(mbuff); } void read_214_buffer(string data) { clear_214fields(); read_header(data); s214_incident = findstr(data, ics214_incident); s214_date = findstr(data, ics214_date); s214_time = findstr(data, ics214_time); s214_op_period = findstr(data, ics214_op_period); s214_unit_name = findstr(data, ics214_unit_name); s214_unit_leader = findstr(data, ics214_unit_leader); s214_prepared_by = findstr(data, ics214_prepared_by); for (int i = 0; i < 16; i++) { s214_roster_name[i] = findstr(data, ics_nn( ics214_roster_name, i ) ); s214_roster_position[i] = findstr(data, ics_nn( ics214_roster_position, i ) ); s214_roster_home_base[i] = findstr(data, ics_nn( ics214_roster_home_base, i ) ); s214_activity_time[i] = findstr(data, ics_nn( ics214_activity_time, i ) ); s214_activity_event[i] = findstr(data, ics_nn( ics214_activity_event, i ) ); } update_214form(); } void cb_214_new() { if (check_214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_214_save(); } } clear_214_form(); clear_header(); def_214_filename = ICS_msg_dir; def_214_filename.append("new"F214_EXT); show_filename(def_214_filename); using_ics214_template = false; } void cb_214_import() { fl_alert2("Not implemented"); } void cb_214_export() { fl_alert2("Not implemented"); } void cb_214_wrap_import(string wrapfilename, string inpbuffer) { clear_214_form(); read_214_buffer(inpbuffer); def_214_filename = ICS_msg_dir; def_214_filename.append(wrapfilename); show_filename(def_214_filename); using_ics214_template = false; } int eval_214_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_214_filename).append("]"); update_214fields(); update_header(FROM); evalstr.append(header("<ics214>")); buff214.clear(); make_buff214(true); if (buff214.empty()) return 0; compress_maybe( buff214 ); evalstr.append( buff214 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_214_wrap_export() { if (check_214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_214fields(); if (base_214_filename == "new"F214_EXT || base_214_filename == "default"F214_EXT) if (!cb_214_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_214_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff214.assign(header("<ics214>")); make_buff214(true); export_wrapfile(base_214_filename, wrapfilename, buff214, pext != ".wrap"); buff214.assign(header("<ics214>")); make_buff214(false); write_214(def_214_filename); } } void cb_214_wrap_autosend() { if (check_214fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_214fields(); if (base_214_filename == "new"F214_EXT || base_214_filename == "default"F214_EXT) if (!cb_214_save_as()) return; update_header(FROM); buff214.assign(header("<ics214>")); make_buff214(true); xfr_via_socket(base_214_filename, buff214); buff214.assign(header("<ics214>")); make_buff214(false); write_214(def_214_filename); } void cb_214_load_template() { string def_214_filename = def_214_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T214_EXT, def_214_filename.c_str()); if (p) { clear_214_form(); read_data_file(p); def_214_TemplateName = p; show_filename(def_214_TemplateName); using_ics214_template = true; } } void cb_214_save_template() { if (!using_ics214_template) { cb_214_save_as_template(); return; } string def_214_filename = def_214_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T214_EXT, def_214_filename.c_str()); if (p) { update_header(CHANGED); buff214.assign(header("<ics214>")); make_buff214(); write_214(p); } } void cb_214_save_as_template() { string def_214_filename = def_214_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T214_EXT, def_214_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_214_TemplateName = p; if (strlen(pext) == 0) def_214_TemplateName.append(T214_EXT); remove_spaces_from_filename(def_214_TemplateName); clear_header(); update_header(CHANGED); buff214.assign(header("<ics214>")); make_buff214(); write_214(def_214_TemplateName); show_filename(def_214_TemplateName); using_ics214_template = true; } } void cb_214_open() { const char *p = FSEL::select(_("Open data file"), "ICS-214\t*"F214_EXT, def_214_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_214_form(); read_data_file(p); using_ics214_template = false; def_214_filename = p; show_filename(def_214_filename); } void write_214(string s) { FILE *file214 = fopen(s.c_str(), "w"); if (!file214) return; fwrite(buff214.c_str(), buff214.length(), 1, file214); fclose(file214); } bool cb_214_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F214_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_214_filename; p = FSEL::saveas(_("Save data file"), "ICS-214\t*"F214_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_214_filename = p; if (strlen(pext) == 0) def_214_filename.append(F214_EXT); remove_spaces_from_filename(def_214_filename); update_214fields(); update_header(NEW); buff214.assign(header("<ics214>")); make_buff214(); write_214(def_214_filename); using_ics214_template = false; show_filename(def_214_filename); return true; } void cb_214_save() { if (base_214_filename == "new"F214_EXT || base_214_filename == "default"F214_EXT || using_ics214_template == true) { cb_214_save_as(); return; } if (check_214fields()) update_header(CHANGED); update_214fields(); buff214.assign(header("<ics214>")); make_buff214(); write_214(def_214_filename); using_ics214_template = false; } void cb_214_html() { string fname_name = fl_filename_name(def_214_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics214_fname = ICS_dir; ics214_fname.append(fname_name); ics214_fname.append(".html"); string html_text = ""; update_214fields(); string form214 = ics214_html_template; replacestr(form214, TITLE, fname_name); replacestr(form214, ics214_incident, s214_incident ); replacestr(form214, ics214_date, s214_date ); replacestr(form214, ics214_time, s214_time ); replacestr(form214, ics214_op_period, s214_op_period ); replacestr(form214, ics214_unit_name, s214_unit_name ); replacestr(form214, ics214_unit_leader, s214_unit_leader ); replacestr(form214, ics214_prepared_by, s214_prepared_by ); for (int i = 0; i < 16; i++) { replacestr(form214, ics_nn( ics214_roster_name, i ), s214_roster_name[i] ); replacestr(form214, ics_nn( ics214_roster_position, i ), s214_roster_position[i] ); replacestr(form214, ics_nn( ics214_roster_home_base, i ), s214_roster_home_base[i] ); replacestr(form214, ics_nn( ics214_activity_time, i ), s214_activity_time[i] ); replacestr(form214, ics_nn( ics214_activity_event, i ), s214_activity_event[i] ); } FILE *file214 = fopen(ics214_fname.c_str(), "w"); fprintf(file214,"%s", form214.c_str()); fclose(file214); open_url(ics214_fname.c_str()); } void cb_214_msg_type() { if (tabs_msg_type->value() == tab_ics214 ) { tab_ics214_type->value(tab_214_1); show_filename(def_214_filename); } } void cb_214_textout() { string ics214_fname = ICS_dir; ics214_fname.append("ics214.txt"); update_214fields(); string form214 = ics214_text_template; replacestr(form214, ics214_incident, s214_incident ); replacestr(form214, ics214_date, s214_date ); replacestr(form214, ics214_time, s214_time ); replacestr(form214, ics214_op_period, s214_op_period ); replacestr(form214, ics214_unit_name, s214_unit_name ); replacestr(form214, ics214_unit_leader, s214_unit_leader ); replacestr(form214, ics214_prepared_by, s214_prepared_by ); for (int i = 0; i < 16; i++) { replacestr(form214, ics_nn( ics214_roster_name, i ), s214_roster_name[i] ); replacestr(form214, ics_nn( ics214_roster_position, i ), s214_roster_position[i] ); replacestr(form214, ics_nn( ics214_roster_home_base, i ), s214_roster_home_base[i] ); replacestr(form214, ics_nn( ics214_activity_time, i ), s214_activity_time[i] ); replacestr(form214, ics_nn( ics214_activity_event, i ), s214_activity_event[i] ); } FILE *file214 = fopen(ics214_fname.c_str(), "w"); fprintf(file214,"%s", form214.c_str()); fclose(file214); open_url(ics214_fname.c_str()); } �������������������������������������������������flmsg-2.0.10/src/ics/ics205a_tab.cxx����������������������������������������������������������������0000664�0001750�0001750�00000026327�12330516146�013725� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics205a = (Fl_Group *)0; Fl_Tabs *tab_ics205a_type = (Fl_Tabs *)0; Fl_Group *tab_205a_1 = (Fl_Group *)0; Fl_Input2 *txt_205a_incident = (Fl_Input2 *)0; Fl_Input2 *txt_205a_date_fm = (Fl_Input2 *)0; Fl_Button *btn_205a_date_fm = (Fl_Button *)0; Fl_Input2 *txt_205a_date_to = (Fl_Input2 *)0; Fl_Button *btn_205a_date_to = (Fl_Button *)0; Fl_Input2 *txt_205a_time_fm = (Fl_Input2 *)0; Fl_Button *btn_205a_time_fm = (Fl_Button *)0; Fl_Input2 *txt_205a_time_to = (Fl_Input2 *)0; Fl_Button *btn_205a_time_to = (Fl_Button *)0; Fl_Input2 *txt_205a_prepared_by = (Fl_Input2 *)0; Fl_Input2 *txt_205a_preparer_position = (Fl_Input2 *)0; Fl_Input2 *txt_205a_preparer_date_time = (Fl_Input2 *)0; Fl_Group *tab_205a_2 = (Fl_Group *)0; Fl_Input2 *txt_205a_comm_group[32] = {(Fl_Input2 *)0}; Fl_Input2 *txt_205a_comm_position[32] = {(Fl_Input2 *)0}; Fl_Input2 *txt_205a_comm_name[32] = {(Fl_Input2 *)0}; Fl_Input2 *txt_205a_comm_info[32] = {(Fl_Input2 *)0}; void create_ics205a_tab() { int Y = tab_top; tab_ics205a = new Fl_Group(0, Y, 570, 390); tab_ics205a->align(FL_ALIGN_TOP); tab_ics205a_type = new Fl_Tabs(0, Y+2, 570, 387); tab_ics205a_type->selection_color((Fl_Color)246); tab_205a_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); { Fl_Group* o = new Fl_Group(2, Y+32, 566, 135); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_205a_incident = new Fl_Input2(135, Y+38, 425, 24, _("Incident Name")); txt_205a_incident->tooltip(_("Incident name")); txt_205a_incident->box(FL_DOWN_BOX); txt_205a_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_incident->labeltype(FL_NORMAL_LABEL); txt_205a_incident->labelfont(0); txt_205a_incident->labelsize(14); txt_205a_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_incident->align(FL_ALIGN_LEFT); txt_205a_incident->callback(ics_changed); txt_205a_incident->when(FL_WHEN_CHANGED); txt_205a_date_fm = new Fl_Input2(135, Y+65, 155, 24, _("From date")); txt_205a_date_fm->tooltip(_("Starting date")); txt_205a_date_fm->box(FL_DOWN_BOX); txt_205a_date_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_date_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_date_fm->labeltype(FL_NORMAL_LABEL); txt_205a_date_fm->labelfont(0); txt_205a_date_fm->labelsize(14); txt_205a_date_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_date_fm->align(FL_ALIGN_LEFT); txt_205a_date_fm->callback(ics_changed); txt_205a_date_fm->when(FL_WHEN_CHANGED); btn_205a_date_fm = new Fl_Button(294, Y+67, 20, 20, _("...")); btn_205a_date_fm->tooltip(_("Set today")); btn_205a_date_fm->callback((Fl_Callback*)cb_205a_set_date_fm); txt_205a_time_fm = new Fl_Input2(135, Y+90, 103, 24, _("From time")); txt_205a_time_fm->tooltip(_("Starting time")); txt_205a_time_fm->box(FL_DOWN_BOX); txt_205a_time_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_time_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_time_fm->labeltype(FL_NORMAL_LABEL); txt_205a_time_fm->labelfont(0); txt_205a_time_fm->labelsize(14); txt_205a_time_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_time_fm->align(FL_ALIGN_LEFT); txt_205a_time_fm->callback(ics_changed); txt_205a_time_fm->when(FL_WHEN_CHANGED); btn_205a_time_fm = new Fl_Button(247, Y+92, 20, 20, _("...")); btn_205a_time_fm->tooltip(_("Set time now")); btn_205a_time_fm->callback((Fl_Callback*)cb_205a_set_time_fm); txt_205a_date_to = new Fl_Input2(135, Y+115, 155, 24, _("To date")); txt_205a_date_to->tooltip(_("Ending date")); txt_205a_date_to->box(FL_DOWN_BOX); txt_205a_date_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_date_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_date_to->labeltype(FL_NORMAL_LABEL); txt_205a_date_to->labelfont(0); txt_205a_date_to->labelsize(14); txt_205a_date_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_date_to->align(FL_ALIGN_LEFT); txt_205a_date_to->callback(ics_changed); txt_205a_date_to->when(FL_WHEN_CHANGED); btn_205a_date_to = new Fl_Button(294, Y+117, 20, 20, _("...")); btn_205a_date_to->tooltip(_("Set today")); btn_205a_date_to->callback((Fl_Callback*)cb_205a_set_date_to); txt_205a_time_to = new Fl_Input2(135, Y+140, 103, 24, _("To time")); txt_205a_time_to->tooltip(_("Ending time")); txt_205a_time_to->box(FL_DOWN_BOX); txt_205a_time_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_time_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_time_to->labeltype(FL_NORMAL_LABEL); txt_205a_time_to->labelfont(0); txt_205a_time_to->labelsize(14); txt_205a_time_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_time_to->align(FL_ALIGN_LEFT); txt_205a_time_to->callback(ics_changed); txt_205a_time_to->when(FL_WHEN_CHANGED); btn_205a_time_to = new Fl_Button(247, Y+142, 20, 20, _("...")); btn_205a_time_to->tooltip(_("Set time now")); btn_205a_time_to->callback((Fl_Callback*)cb_205a_set_time_to); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(2, Y+167, 566, 80); o->box(FL_ENGRAVED_FRAME); txt_205a_prepared_by = new Fl_Input2(135, Y+170, 425, 24, _("Prepared by")); txt_205a_prepared_by->tooltip(_("Name of preparer")); txt_205a_prepared_by->box(FL_DOWN_BOX); txt_205a_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_prepared_by->labeltype(FL_NORMAL_LABEL); txt_205a_prepared_by->labelfont(0); txt_205a_prepared_by->labelsize(14); txt_205a_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_prepared_by->align(FL_ALIGN_LEFT); txt_205a_prepared_by->callback(ics_changed); txt_205a_prepared_by->when(FL_WHEN_CHANGED); txt_205a_preparer_position = new Fl_Input2(135, Y+195, 425, 24, _("Position")); txt_205a_preparer_position->tooltip(_("Preparer's Position")); txt_205a_preparer_position->box(FL_DOWN_BOX); txt_205a_preparer_position->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_preparer_position->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_preparer_position->labeltype(FL_NORMAL_LABEL); txt_205a_preparer_position->labelfont(0); txt_205a_preparer_position->labelsize(14); txt_205a_preparer_position->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_preparer_position->align(FL_ALIGN_LEFT); txt_205a_preparer_position->callback(ics_changed); txt_205a_preparer_position->when(FL_WHEN_CHANGED); txt_205a_preparer_date_time = new Fl_Input2(135, Y+220, 425, 24, _("Date/Time")); txt_205a_preparer_date_time->tooltip(_("Date / Time")); txt_205a_preparer_date_time->box(FL_DOWN_BOX); txt_205a_preparer_date_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_preparer_date_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_preparer_date_time->labeltype(FL_NORMAL_LABEL); txt_205a_preparer_date_time->labelfont(0); txt_205a_preparer_date_time->labelsize(14); txt_205a_preparer_date_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_preparer_date_time->align(FL_ALIGN_LEFT); txt_205a_preparer_date_time->callback(ics_changed); txt_205a_preparer_date_time->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o tab_205a_1->end(); tab_205a_2 = new Fl_Group(0, Y+25, 570, 360, _("Basic Info")); tab_205a_2->hide(); { Fl_Box* o = new Fl_Box(5, Y+28, 120, 20, _("Assignment")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(126, Y+28, 150, 20, _("Name")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(277, Y+28, 270, 20, _("Method of Contact")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Scroll* o = new Fl_Scroll(4, Y+48, 560, 320); o->type(2); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 32; i++) { txt_205a_comm_position[i] = new Fl_Input2(5, Y+50 + i*24, 120, 24); txt_205a_comm_position[i]->tooltip(_("")); txt_205a_comm_position[i]->box(FL_DOWN_BOX); txt_205a_comm_position[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_comm_position[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_comm_position[i]->labeltype(FL_NORMAL_LABEL); txt_205a_comm_position[i]->labelfont(0); txt_205a_comm_position[i]->labelsize(14); txt_205a_comm_position[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_comm_position[i]->align(FL_ALIGN_CENTER); txt_205a_comm_position[i]->callback(ics_changed); txt_205a_comm_position[i]->when(FL_WHEN_CHANGED); txt_205a_comm_name[i] = new Fl_Input2(126, Y+50 + i*24, 150, 24); txt_205a_comm_name[i]->tooltip(_("")); txt_205a_comm_name[i]->box(FL_DOWN_BOX); txt_205a_comm_name[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_comm_name[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_comm_name[i]->labeltype(FL_NORMAL_LABEL); txt_205a_comm_name[i]->labelfont(0); txt_205a_comm_name[i]->labelsize(14); txt_205a_comm_name[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_comm_name[i]->align(FL_ALIGN_CENTER); txt_205a_comm_name[i]->callback(ics_changed); txt_205a_comm_name[i]->when(FL_WHEN_CHANGED); txt_205a_comm_info[i] = new Fl_Input2(277, Y+50 + i*24, 270, 24); txt_205a_comm_info[i]->tooltip(_("")); txt_205a_comm_info[i]->box(FL_DOWN_BOX); txt_205a_comm_info[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205a_comm_info[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205a_comm_info[i]->labeltype(FL_NORMAL_LABEL); txt_205a_comm_info[i]->labelfont(0); txt_205a_comm_info[i]->labelsize(14); txt_205a_comm_info[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205a_comm_info[i]->align(FL_ALIGN_CENTER); txt_205a_comm_info[i]->callback(ics_changed); txt_205a_comm_info[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Scroll* o tab_205a_2->end(); tab_ics205a_type->end(); Fl_Group::current()->resizable(tab_ics205a_type); tab_ics205a->end(); tab_ics205a->hide(); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics216.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000040510�12330516146�012726� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 216 field variables and template variables // --------------------------------------------------------------------- string ics216_incident = ":inc:"; string ics216_date = ":dat:"; string ics216_time = ":tim:"; string ics216_branch = ":br:"; string ics216_agc = ":agc:"; string ics216_op_period = ":opp:"; string ics216_tac_freq = ":tfr:"; string ics216_div_grp = ":div[n]:"; string ics216_agency = ":agy[n]:"; string ics216_ag = ":ag[n]:"; string ics216_id = ":id[n]:"; string ics216_rr = ":rr[n]:"; string ics216_prepared_by = ":pre:"; string s216_incident; string s216_date; string s216_time; string s216_branch; string s216_agc; string s216_op_period; string s216_tac_freq; string s216_div_grp[4]; string s216_agency[4]; string s216_ag[36]; string s216_id[36]; string s216_rr[36]; string s216_prepared_by; // ===================================================================== string buff216; string def_216_filename = ""; string base_216_filename = ""; string def_216_TemplateName = ""; bool using_ics216_template = false; void cb_216_set_date() { txt_216_date->value(szDate()); } void cb_216_set_time() { txt_216_time->value(szTime()); } void clear_216fields() { s216_incident.clear(); s216_date.clear(); s216_time.clear(); s216_branch.clear(); s216_agc.clear(); s216_op_period.clear(); s216_tac_freq.clear(); s216_prepared_by.clear(); for (int i = 0; i < 4; i++) { s216_div_grp[i].clear(); s216_agency[i].clear(); } for (int i = 0; i < 36; i++) { s216_ag[i].clear(); s216_id[i].clear(); s216_rr[i].clear(); } } bool check_216fields() { if (s216_incident != txt_216_incident->value()) return true; if (s216_date != txt_216_date->value()) return true; if (s216_time != txt_216_time->value()) return true; if (s216_branch != txt_216_branch->value()) return true; if (s216_agc != txt_216_agc->value()) return true; if (s216_op_period != txt_216_op_period->value()) return true; if (s216_tac_freq != txt_216_tac_freq->value()) return true; if (s216_prepared_by != txt_216_prepared_by->value()) return true; for (int i = 0; i < 4; i++) { if (s216_div_grp[i] != txt_216_div_grp[i]->value()) return true; if (s216_agency[i] != txt_216_agency[i]->value()) return true; } for (int i = 0; i < 36; i++) { if (s216_ag[i] != txt_216_ag[i]->value()) return true; if (s216_id[i] != txt_216_id[i]->value()) return true; if (s216_rr[i] != txt_216_rr[i]->value()) return true; } return false; } void update_216fields() { s216_incident = txt_216_incident->value(); s216_date = txt_216_date->value(); s216_time = txt_216_time->value(); s216_branch = txt_216_branch->value(); s216_agc = txt_216_agc->value(); s216_op_period = txt_216_op_period->value(); s216_tac_freq = txt_216_tac_freq->value(); s216_prepared_by = txt_216_prepared_by->value(); for (int i = 0; i < 4; i++) { s216_div_grp[i] = txt_216_div_grp[i]->value(); s216_agency[i] = txt_216_agency[i]->value(); } for (int i = 0; i < 36; i++) { s216_ag[i] = txt_216_ag[i]->value(); s216_id[i] = txt_216_id[i]->value(); s216_rr[i] = txt_216_rr[i]->value(); } } void update_216form() { txt_216_incident->value(s216_incident.c_str()); txt_216_date->value(s216_date.c_str()); txt_216_time->value(s216_time.c_str()); txt_216_branch->value(s216_branch.c_str()); txt_216_agc->value(s216_agc.c_str()); txt_216_op_period->value(s216_op_period.c_str()); txt_216_tac_freq->value(s216_tac_freq.c_str()); txt_216_prepared_by->value(s216_prepared_by.c_str()); for (int i = 0; i < 4; i++) { txt_216_div_grp[i]->value(s216_div_grp[i].c_str()); txt_216_agency[i]->value(s216_agency[i].c_str()); } for (int i = 0; i < 36; i++) { txt_216_ag[i]->value(s216_ag[i].c_str()); txt_216_id[i]->value(s216_id[i].c_str()); txt_216_rr[i]->value(s216_rr[i].c_str()); } } void clear_216_form() { clear_216fields(); update_216form(); } string &ics_216_nn(string & subst, int n) { static string garbage = "#$^*!"; static string ics; ics.clear(); ics = subst; size_t pos = ics.find("["); if (pos == string::npos) return garbage; pos++; if (n < 10) ics[pos] = '0' + n; else { if (n < 20) ics[pos] = '1'; else if ( n < 30) ics[pos] = '2'; else if (n < 40) ics[pos] = '3'; ics[pos+1] = '0' + n % 10; ics[pos+2] = ']'; ics += ':'; } return ics; } void make_buff216(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics216_incident, s216_incident ) ); mbuff.append( lineout( ics216_date, s216_date ) ); mbuff.append( lineout( ics216_time, s216_time ) ); mbuff.append( lineout( ics216_branch, s216_branch ) ); mbuff.append( lineout( ics216_agc, s216_agc ) ); mbuff.append( lineout( ics216_op_period, s216_op_period ) ); mbuff.append( lineout( ics216_tac_freq, s216_tac_freq ) ); mbuff.append( lineout( ics216_prepared_by, s216_prepared_by ) ); for (int i = 0; i < 4; i++) { mbuff.append( lineout( ics_216_nn( ics216_div_grp, i), s216_div_grp[i] ) ); mbuff.append( lineout( ics_216_nn( ics216_agency, i), s216_agency[i] ) ); } for (int i = 0; i < 36; i++) { mbuff.append( lineout( ics_216_nn( ics216_ag, i), s216_ag[i] ) ); mbuff.append( lineout( ics_216_nn( ics216_id, i), s216_id[i] ) ); mbuff.append( lineout( ics_216_nn( ics216_rr, i), s216_rr[i] ) ); } if (compress) compress_maybe(mbuff); buff216.append(mbuff); } void read_216_buffer(string data) { clear_216fields(); read_header(data); s216_incident = findstr( data, ics216_incident ); s216_date = findstr( data, ics216_date ); s216_time = findstr( data, ics216_time ); s216_branch = findstr( data, ics216_branch ); s216_agc = findstr( data, ics216_agc ); s216_op_period = findstr( data, ics216_op_period ); s216_tac_freq = findstr( data, ics216_tac_freq ); s216_prepared_by = findstr( data, ics216_prepared_by ); for (int i = 0; i < 4; i++) { s216_div_grp[i] = findstr( data, ics_216_nn( ics216_div_grp, i ) ); s216_agency[i] = findstr( data, ics_216_nn( ics216_agency, i ) ); } for (int i = 0; i < 36; i++) { s216_ag[i] = findstr( data, ics_216_nn( ics216_ag, i ) ); s216_id[i] = findstr( data, ics_216_nn( ics216_id, i ) ); s216_rr[i] = findstr( data, ics_216_nn( ics216_rr, i ) ); } update_216form(); } void cb_216_new() { if (check_216fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_216_save(); } } clear_216_form(); clear_header(); def_216_filename = ICS_msg_dir; def_216_filename.append("new"F216_EXT); show_filename(def_216_filename); using_ics216_template = false; } void cb_216_import() { fl_alert2("Not implemented"); } void cb_216_export() { fl_alert2("Not implemented"); } void cb_216_wrap_import(string wrapfilename, string inpbuffer) { clear_216_form(); read_216_buffer(inpbuffer); def_216_filename = ICS_msg_dir; def_216_filename.append(wrapfilename); show_filename(def_216_filename); using_ics216_template = false; } int eval_216_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_216_filename).append("]"); update_216fields(); update_header(FROM); evalstr.append(header("<ics216>")); buff216.clear(); make_buff216(true); if (buff216.empty()) return 0; compress_maybe( buff216 ); evalstr.append( buff216 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_216_wrap_export() { if (check_216fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_216fields(); if (base_216_filename == "new"F216_EXT || base_216_filename == "default"F216_EXT) if (!cb_216_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_216_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff216.assign(header("<ics216>")); make_buff216(true); export_wrapfile(base_216_filename, wrapfilename, buff216, pext != ".wrap"); buff216.assign(header("<ics216>")); make_buff216(false); write_216(def_216_filename); } } void cb_216_wrap_autosend() { if (check_216fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_216fields(); if (base_216_filename == "new"F216_EXT || base_216_filename == "default"F216_EXT) if (!cb_216_save_as()) return; update_header(FROM); buff216.assign(header("<ics216>")); make_buff216(true); xfr_via_socket(base_216_filename, buff216); buff216.assign(header("<ics216>")); make_buff216(false); write_216(def_216_filename); } void cb_216_load_template() { string def_216_filename = def_216_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T216_EXT, def_216_filename.c_str()); if (p) { clear_216_form(); read_data_file(p); def_216_TemplateName = p; show_filename(def_216_TemplateName); using_ics216_template = true; } } void cb_216_save_template() { if (!using_ics216_template) { cb_216_save_as_template(); return; } string def_216_filename = def_216_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T216_EXT, def_216_filename.c_str()); if (p) { update_header(CHANGED); buff216.assign(header("<ics216>")); make_buff216(); write_216(p); } } void cb_216_save_as_template() { string def_216_filename = def_216_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T216_EXT, def_216_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_216_TemplateName = p; if (strlen(pext) == 0) def_216_TemplateName.append(T216_EXT); remove_spaces_from_filename(def_216_TemplateName); clear_header(); update_header(CHANGED); buff216.assign(header("<ics216>")); make_buff216(); write_216(def_216_TemplateName); show_filename(def_216_TemplateName); using_ics216_template = true; } } void cb_216_open() { const char *p = FSEL::select(_("Open data file"), "ICS-216\t*"F216_EXT, def_216_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_216_form(); read_data_file(p); using_ics216_template = false; def_216_filename = p; show_filename(def_216_filename); } void write_216(string s) { FILE *file216 = fopen(s.c_str(), "w"); if (!file216) return; fwrite(buff216.c_str(), buff216.length(), 1, file216); fclose(file216); } bool cb_216_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F216_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_216_filename; p = FSEL::saveas(_("Save data file"), "ICS-216\t*"F216_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_216_filename = p; if (strlen(pext) == 0) def_216_filename.append(F216_EXT); remove_spaces_from_filename(def_216_filename); update_216fields(); update_header(NEW); buff216.assign(header("<ics216>")); make_buff216(); write_216(def_216_filename); using_ics216_template = false; show_filename(def_216_filename); return true; } void cb_216_save() { if (base_216_filename == "new"F216_EXT || base_216_filename == "default"F216_EXT || using_ics216_template == true) { cb_216_save_as(); return; } if (check_216fields()) update_header(CHANGED); update_216fields(); buff216.assign(header("<ics216>")); make_buff216(); write_216(def_216_filename); using_ics216_template = false; } void cb_216_html() { string fname_name = fl_filename_name(def_216_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics216_fname = ICS_dir; ics216_fname.append(fname_name); ics216_fname.append(".html"); string html_text = ""; update_216fields(); string form216 = ics216_html_template; replacestr(form216, TITLE, fname_name); replacestr(form216, ics216_incident, s216_incident ); replacestr(form216, ics216_date, s216_date ); replacestr(form216, ics216_time, s216_time ); replacestr(form216, ics216_branch, s216_branch ); replacestr(form216, ics216_agc, s216_agc ); replacestr(form216, ics216_op_period, s216_op_period ); replacestr(form216, ics216_tac_freq, s216_tac_freq ); replacestr(form216, ics216_prepared_by, s216_prepared_by ); for (int i = 0; i < 4; i++) { replacestr(form216, ics_216_nn( ics216_div_grp, i), s216_div_grp[i] ); replacestr(form216, ics_216_nn( ics216_agency, i), s216_agency[i] ); } for (int i = 0; i < 36; i++) { replacestr(form216, ics_216_nn( ics216_ag, i), s216_ag[i] ); replacestr(form216, ics_216_nn( ics216_id, i), s216_id[i] ); replacestr(form216, ics_216_nn( ics216_rr, i), s216_rr[i] ); } FILE *file216 = fopen(ics216_fname.c_str(), "w"); fprintf(file216,"%s", form216.c_str()); fclose(file216); open_url(ics216_fname.c_str()); } void cb_216_msg_type() { if (tabs_msg_type->value() == tab_ics216 ) { tab_ics216_type->value(tab_216_1); show_filename(def_216_filename); } } void cb_216_textout() { string ics216_fname = ICS_dir; ics216_fname.append("ics216.txt"); update_216fields(); string form216 = ics216_text_template; replacestr(form216, ics216_incident, s216_incident ); replacestr(form216, ics216_date, s216_date ); replacestr(form216, ics216_time, s216_time ); replacestr(form216, ics216_branch, s216_branch ); replacestr(form216, ics216_agc, s216_agc ); replacestr(form216, ics216_op_period, s216_op_period ); replacestr(form216, ics216_tac_freq, s216_tac_freq ); replacestr(form216, ics216_prepared_by, s216_prepared_by ); for (int i = 0; i < 4; i++) { replacestr(form216, ics_216_nn( ics216_div_grp, i), s216_div_grp[i] ); replacestr(form216, ics_216_nn( ics216_agency, i), s216_agency[i] ); } for (int i = 0; i < 36; i++) { replacestr(form216, ics_216_nn( ics216_ag, i), s216_ag[i] ); replacestr(form216, ics_216_nn( ics216_id, i), s216_id[i] ); replacestr(form216, ics_216_nn( ics216_rr, i), s216_rr[i] ); } FILE *file216 = fopen(ics216_fname.c_str(), "w"); fprintf(file216,"%s", form216.c_str()); fclose(file216); open_url(ics216_fname.c_str()); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics213_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000027335�12500107157�013560� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Tabs *tabs_msg_type = (Fl_Tabs *)0; Fl_Group *tab_ics213 = (Fl_Group *)0; Fl_Tabs *tab_ics213_type = (Fl_Tabs *)0; Fl_Group *tab_213_originator = (Fl_Group *)0; Fl_Input2 *txt_213_inc = (Fl_Input2 *)0; Fl_Input2 *txt_213_to = (Fl_Input2 *)0; Fl_Input2 *txt_213_p1 = (Fl_Input2 *)0; Fl_Input2 *txt_213_fm = (Fl_Input2 *)0; Fl_Input2 *txt_213_p2 = (Fl_Input2 *)0; Fl_Input2 *txt_213_subj = (Fl_Input2 *)0; Fl_DateInput *txt_213_d1 = (Fl_DateInput *)0; Fl_Button *btn_213_date1 = (Fl_Button *)0; Fl_Input2 *txt_213_t1 = (Fl_Input2 *)0; Fl_Button *btn_213_time1 = (Fl_Button *)0; FTextEdit *txt_213_msg = (FTextEdit *)0; Fl_Input2 *txt_213_s1 = (Fl_Input2 *)0; Fl_Input2 *txt_213_p3 = (Fl_Input2 *)0; Fl_Group *tab_213_responder = (Fl_Group *)0; Fl_Input2 *txt_213_s2 = (Fl_Input2 *)0; Fl_DateInput *txt_213_d2 = (Fl_DateInput *)0; Fl_Input2 *txt_213_t2 = (Fl_Input2 *)0; Fl_Button *btn_213_time2 = (Fl_Button *)0; FTextEdit *txt_213_reply = (FTextEdit *)0; Fl_Input2 *txt_213_p4 = (Fl_Input2 *)0; Fl_Button *btn_213_date2 = (Fl_Button *)0; static void cb_btn_213_date1(Fl_Button*, void*) { cb_SetDate1(); } static void cb_btn_213_time1(Fl_Button*, void*) { cb_SetTime1(); } static void cb_btn_213_time2(Fl_Button*, void*) { cb_SetTime2(); } static void cb_btn_213_date2(Fl_Button*, void*) { cb_SetDate2(); } void create_ics213_tab() { int Y = tab_top; tab_ics213 = new Fl_Group(0, Y, 570, 390); tab_ics213->align(FL_ALIGN_TOP); tab_ics213_type = new Fl_Tabs(0, Y, 570, 387); tab_ics213_type->selection_color((Fl_Color)246); tab_213_originator = new Fl_Group(0, Y+25, 570, 360, _("Originator")); txt_213_inc = new Fl_Input2(40, Y+40, 522, 24, _("Inc:")); txt_213_inc->tooltip(_("Incident (optional)")); txt_213_inc->box(FL_DOWN_BOX); txt_213_inc->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_inc->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_inc->labeltype(FL_NORMAL_LABEL); txt_213_inc->labelfont(0); txt_213_inc->labelsize(14); txt_213_inc->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_inc->align(FL_ALIGN_LEFT); txt_213_inc->callback(ics_changed); txt_213_inc->when(FL_WHEN_CHANGED); txt_213_to = new Fl_Input2(40, Y+66, 242, 24, _("To")); txt_213_to->tooltip(_("Addressee")); txt_213_to->box(FL_DOWN_BOX); txt_213_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_to->labeltype(FL_NORMAL_LABEL); txt_213_to->labelfont(0); txt_213_to->labelsize(14); txt_213_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_to->align(FL_ALIGN_LEFT); txt_213_to->callback(ics_changed); txt_213_to->when(FL_WHEN_CHANGED); txt_213_p1 = new Fl_Input2(321, Y+66, 242, 24, _("Pos.")); txt_213_p1->tooltip(_("Position of addressee")); txt_213_p1->box(FL_DOWN_BOX); txt_213_p1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_p1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_p1->labeltype(FL_NORMAL_LABEL); txt_213_p1->labelfont(0); txt_213_p1->labelsize(14); txt_213_p1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_p1->align(FL_ALIGN_LEFT); txt_213_p1->callback(ics_changed); txt_213_p1->when(FL_WHEN_CHANGED); txt_213_fm = new Fl_Input2(40, Y+92, 242, 24, _("Fm")); txt_213_fm->tooltip(_("Originator")); txt_213_fm->box(FL_DOWN_BOX); txt_213_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_fm->labeltype(FL_NORMAL_LABEL); txt_213_fm->labelfont(0); txt_213_fm->labelsize(14); txt_213_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_fm->align(FL_ALIGN_LEFT); txt_213_fm->callback(ics_changed); txt_213_fm->when(FL_WHEN_CHANGED); txt_213_p2 = new Fl_Input2(321, Y+92, 242, 24, _("Pos.")); txt_213_p2->tooltip(_("Position of originator")); txt_213_p2->box(FL_DOWN_BOX); txt_213_p2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_p2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_p2->labeltype(FL_NORMAL_LABEL); txt_213_p2->labelfont(0); txt_213_p2->labelsize(14); txt_213_p2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_p2->align(FL_ALIGN_LEFT); txt_213_p2->callback(ics_changed); txt_213_p2->when(FL_WHEN_CHANGED); txt_213_subj = new Fl_Input2(40, Y+118, 522, 24, _("Sub.")); txt_213_subj->tooltip(_("Subject")); txt_213_subj->box(FL_DOWN_BOX); txt_213_subj->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_subj->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_subj->labeltype(FL_NORMAL_LABEL); txt_213_subj->labelfont(0); txt_213_subj->labelsize(14); txt_213_subj->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_subj->align(FL_ALIGN_LEFT); txt_213_subj->callback(ics_changed); txt_213_subj->when(FL_WHEN_CHANGED); txt_213_d1 = new Fl_DateInput(232, Y+144, 125, 24, _("Date")); txt_213_d1->tooltip(_("Date of origination")); txt_213_d1->box(FL_DOWN_BOX); txt_213_d1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_d1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_d1->labeltype(FL_NORMAL_LABEL); txt_213_d1->labelfont(0); txt_213_d1->labelsize(14); txt_213_d1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_d1->align(FL_ALIGN_LEFT); txt_213_d1->when(FL_WHEN_CHANGED); txt_213_d1->callback(ics_changed); txt_213_d1->format(2); btn_213_date1 = new Fl_Button(365, Y+146, 20, 20, _("...")); btn_213_date1->tooltip(_("Set today")); btn_213_date1->callback((Fl_Callback*)cb_btn_213_date1); txt_213_t1 = new Fl_Input2(430, Y+144, 103, 24, _("Time")); txt_213_t1->tooltip(_("Time of origination")); txt_213_t1->box(FL_DOWN_BOX); txt_213_t1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_t1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_t1->labeltype(FL_NORMAL_LABEL); txt_213_t1->labelfont(0); txt_213_t1->labelsize(14); txt_213_t1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_t1->align(FL_ALIGN_LEFT); txt_213_t1->callback(ics_changed); txt_213_t1->when(FL_WHEN_CHANGED); btn_213_time1 = new Fl_Button(540, Y+146, 20, 20, _("...")); btn_213_time1->tooltip(_("Set time now")); btn_213_time1->callback((Fl_Callback*)cb_btn_213_time1); txt_213_msg = new FTextEdit(5, Y+170, 562, 174, _("Message:")); txt_213_msg->box(FL_DOWN_FRAME); txt_213_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_msg->labeltype(FL_NORMAL_LABEL); txt_213_msg->labelfont(0); txt_213_msg->labelsize(14); txt_213_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_msg->align(FL_ALIGN_TOP_LEFT); txt_213_msg->callback(ics_changed); txt_213_msg->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(txt_213_msg); txt_213_s1 = new Fl_Input2(33, Y+351, 247, 24, _("Sig.")); txt_213_s1->tooltip(_("Signature of preparer")); txt_213_s1->box(FL_DOWN_BOX); txt_213_s1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_s1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_s1->labeltype(FL_NORMAL_LABEL); txt_213_s1->labelfont(0); txt_213_s1->labelsize(14); txt_213_s1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_s1->align(FL_ALIGN_LEFT); txt_213_s1->callback(ics_changed); txt_213_s1->when(FL_WHEN_CHANGED); txt_213_p3 = new Fl_Input2(316, Y+351, 247, 24, _("Pos.")); txt_213_p3->tooltip(_("Position of preparer")); txt_213_p3->box(FL_DOWN_BOX); txt_213_p3->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_p3->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_p3->labeltype(FL_NORMAL_LABEL); txt_213_p3->labelfont(0); txt_213_p3->labelsize(14); txt_213_p3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_p3->align(FL_ALIGN_LEFT); txt_213_p3->callback(ics_changed); txt_213_p3->when(FL_WHEN_CHANGED); tab_213_originator->end(); tab_213_responder = new Fl_Group(0, Y+25, 570, 360, _("Responder")); tab_213_responder->hide(); txt_213_d2 = new Fl_DateInput(240, Y+42, 126, 24, _("Date")); txt_213_d2->tooltip(_("Reply Date")); txt_213_d2->box(FL_DOWN_BOX); txt_213_d2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_d2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_d2->labeltype(FL_NORMAL_LABEL); txt_213_d2->labelfont(0); txt_213_d2->labelsize(14); txt_213_d2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_d2->align(FL_ALIGN_LEFT); txt_213_d2->callback(ics_changed); txt_213_d2->when(FL_WHEN_CHANGED); btn_213_date2 = new Fl_Button(367, Y+44, 20, 20, _("...")); btn_213_date2->tooltip(_("Today")); btn_213_date2->callback((Fl_Callback*)cb_btn_213_date2); txt_213_t2 = new Fl_Input2(434, Y+42, 103, 24, _("Time")); txt_213_t2->tooltip(_("Reply Time")); txt_213_t2->box(FL_DOWN_BOX); txt_213_t2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_t2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_t2->labeltype(FL_NORMAL_LABEL); txt_213_t2->labelfont(0); txt_213_t2->labelsize(14); txt_213_t2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_t2->align(FL_ALIGN_LEFT); txt_213_t2->callback(ics_changed); txt_213_t2->when(FL_WHEN_CHANGED); btn_213_time2 = new Fl_Button(540, Y+44, 20, 20, _("...")); btn_213_time2->tooltip(_("Now")); btn_213_time2->callback((Fl_Callback*)cb_btn_213_time2); txt_213_reply = new FTextEdit(5, Y+72, 562, 275, _("Reply")); txt_213_reply->box(FL_DOWN_FRAME); txt_213_reply->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_reply->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_reply->labeltype(FL_NORMAL_LABEL); txt_213_reply->labelfont(0); txt_213_reply->labelsize(14); txt_213_reply->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_reply->align(FL_ALIGN_TOP_LEFT); txt_213_reply->callback(ics_changed); txt_213_reply->when(FL_WHEN_CHANGED); txt_213_s2 = new Fl_Input2(37, Y+351, 248, 24, _("Sig.")); txt_213_s2->tooltip(_("Signature of responder")); txt_213_s2->box(FL_DOWN_BOX); txt_213_s2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_s2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_s2->labeltype(FL_NORMAL_LABEL); txt_213_s2->labelfont(0); txt_213_s2->labelsize(14); txt_213_s2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_s2->align(FL_ALIGN_LEFT); txt_213_s2->callback(ics_changed); txt_213_s2->when(FL_WHEN_CHANGED); txt_213_p4 = new Fl_Input2(323, Y+351, 242, 24, _("Pos.")); txt_213_p4->tooltip(_("Position of responder")); txt_213_p4->box(FL_DOWN_BOX); txt_213_p4->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_213_p4->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_213_p4->labeltype(FL_NORMAL_LABEL); txt_213_p4->labelfont(0); txt_213_p4->labelsize(14); txt_213_p4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_213_p4->align(FL_ALIGN_LEFT); txt_213_p4->callback(ics_changed); txt_213_p4->when(FL_WHEN_CHANGED); tab_213_responder->end(); Fl_Group::current()->resizable(tab_213_responder); tab_ics213_type->end(); Fl_Group::current()->resizable(tab_ics213_type); tab_ics213->end(); tab_ics213->hide(); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics205_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000034454�12330516146�013564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics205 = (Fl_Group *)0; Fl_Tabs *tabs_ics205 = (Fl_Tabs *)0; Fl_Group *tab_205_1 = (Fl_Group *)0; Fl_Group *tab_205_2 = (Fl_Group *)0; Fl_Input2 *txt_205_name = (Fl_Input2 *)0; Fl_Input2 *txt_205_dt_prepared = (Fl_Input2 *)0; Fl_Button *btn_205_dt_prepared = (Fl_Button *)0; Fl_Input2 *txt_205_dt_op_from = (Fl_Input2 *)0; Fl_Button *btn_205_dt_op_from = (Fl_Button *)0; Fl_Input2 *txt_205_dt_op_to = (Fl_Input2 *)0; Fl_Button *btn_205_dt_op_to = (Fl_Button *)0; Fl_Input2 *txt_205_func[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_channel[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_assign[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_rx_freq[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_rx_tone[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_tx_freq[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_tx_tone[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_mode_adm[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_remarks[20]={(Fl_Input2 *)0}; Fl_Input2 *txt_205_preparer = (Fl_Input2 *)0; Fl_Input2 *txt_205_county = (Fl_Input2 *)0; Fl_Input2 *txt_205_state = (Fl_Input2 *)0; Fl_Input2 *txt_205_latitude = (Fl_Input2 *)0; Fl_Input2 *txt_205_longitude = (Fl_Input2 *)0; static void cb_btn_205_dt_prepared(Fl_Button*, void*) { cb_205_SetDateTime1(); } static void cb_btn_205_dt_op_from(Fl_Button*, void*) { cb_205_SetDateTime2(); } static void cb_btn_205_dt_op_to(Fl_Button*, void*) { cb_205_SetDateTime3(); } void create_ics205_tab() { int Y = tab_top; tab_ics205 = new Fl_Group(0, Y, 570, 390); tab_ics205->align(FL_ALIGN_TOP); tabs_ics205 = new Fl_Tabs(0, Y+3, 570, 387); tabs_ics205->selection_color((Fl_Color)246); tab_205_1 = new Fl_Group(0, Y+25, 570, 360, _("Plan")); txt_205_name = new Fl_Input2(110, Y+35, 450, 24, _("Incident Name")); txt_205_name->tooltip(_("")); txt_205_name->box(FL_DOWN_BOX); txt_205_name->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_name->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_name->labeltype(FL_NORMAL_LABEL); txt_205_name->labelfont(0); txt_205_name->labelsize(14); txt_205_name->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_name->align(FL_ALIGN_LEFT); txt_205_name->callback(ics_changed); txt_205_name->when(FL_WHEN_CHANGED); txt_205_dt_prepared = new Fl_Input2(110, Y+67, 155, 24, _("DT/TM Prep\'")); txt_205_dt_prepared->tooltip(_("ddhhmm MMM YY of preparation")); txt_205_dt_prepared->box(FL_DOWN_BOX); txt_205_dt_prepared->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_dt_prepared->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_dt_prepared->labeltype(FL_NORMAL_LABEL); txt_205_dt_prepared->labelfont(0); txt_205_dt_prepared->labelsize(14); txt_205_dt_prepared->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_dt_prepared->align(FL_ALIGN_LEFT); txt_205_dt_prepared->callback(ics_changed); txt_205_dt_prepared->when(FL_WHEN_CHANGED); btn_205_dt_prepared = new Fl_Button(254, Y+67, 24, 24, _("...")); btn_205_dt_prepared->tooltip(_("Set today")); btn_205_dt_prepared->callback((Fl_Callback*)cb_btn_205_dt_prepared); txt_205_dt_op_from = new Fl_Input2(378, Y+67, 155, 24, _("D/T from\'")); txt_205_dt_op_from->tooltip(_("Operational period from: ddhhmm MMM YY")); txt_205_dt_op_from->box(FL_DOWN_BOX); txt_205_dt_op_from->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_dt_op_from->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_dt_op_from->labeltype(FL_NORMAL_LABEL); txt_205_dt_op_from->labelfont(0); txt_205_dt_op_from->labelsize(14); txt_205_dt_op_from->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_dt_op_from->align(FL_ALIGN_LEFT); txt_205_dt_op_from->callback(ics_changed); txt_205_dt_op_from->when(FL_WHEN_CHANGED); btn_205_dt_op_from = new Fl_Button(536, Y+67, 24, 24, _("...")); btn_205_dt_op_from->tooltip(_("Set today")); btn_205_dt_op_from->callback((Fl_Callback*)cb_btn_205_dt_op_from); txt_205_dt_op_to = new Fl_Input2(378, Y+94, 155, 24, _("D/T to")); txt_205_dt_op_to->tooltip(_("Operational period to: ddhhmm MMM YY")); txt_205_dt_op_to->box(FL_DOWN_BOX); txt_205_dt_op_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_dt_op_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_dt_op_to->labeltype(FL_NORMAL_LABEL); txt_205_dt_op_to->labelfont(0); txt_205_dt_op_to->labelsize(14); txt_205_dt_op_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_dt_op_to->align(FL_ALIGN_LEFT); txt_205_dt_op_to->callback(ics_changed); txt_205_dt_op_to->when(FL_WHEN_CHANGED); btn_205_dt_op_to = new Fl_Button(536, Y+94, 24, 24, _("...")); btn_205_dt_op_to->tooltip(_("Set today")); btn_205_dt_op_to->callback((Fl_Callback*)cb_btn_205_dt_op_to); txt_205_preparer = new Fl_Input2(110, Y+140, 450, 24, _("Prepared by:")); txt_205_preparer->tooltip(_("Communications Unit")); txt_205_preparer->box(FL_DOWN_BOX); txt_205_preparer->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_preparer->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_preparer->labeltype(FL_NORMAL_LABEL); txt_205_preparer->labelfont(0); txt_205_preparer->labelsize(14); txt_205_preparer->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_preparer->align(FL_ALIGN_LEFT); txt_205_preparer->callback(ics_changed); txt_205_preparer->when(FL_WHEN_CHANGED); txt_205_county = new Fl_Input2(110, Y+170, 200, 24, _("County:")); txt_205_county->tooltip(_("County")); txt_205_county->box(FL_DOWN_BOX); txt_205_county->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_county->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_county->labeltype(FL_NORMAL_LABEL); txt_205_county->labelfont(0); txt_205_county->labelsize(14); txt_205_county->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_county->align(FL_ALIGN_LEFT); txt_205_county->callback(ics_changed); txt_205_county->when(FL_WHEN_CHANGED); txt_205_state = new Fl_Input2(110, Y+196, 60, 24, _("State:")); txt_205_state->tooltip(_("State (abbreviated)")); txt_205_state->box(FL_DOWN_BOX); txt_205_state->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_state->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_state->labeltype(FL_NORMAL_LABEL); txt_205_state->labelfont(0); txt_205_state->labelsize(14); txt_205_state->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_state->align(FL_ALIGN_LEFT); txt_205_state->callback(ics_changed); txt_205_state->when(FL_WHEN_CHANGED); txt_205_latitude = new Fl_Input2(110, Y+226, 120, 24, _("Latitude:")); txt_205_latitude->tooltip(_("decimal degrees, North +")); txt_205_latitude->box(FL_DOWN_BOX); txt_205_latitude->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_latitude->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_latitude->labeltype(FL_NORMAL_LABEL); txt_205_latitude->labelfont(0); txt_205_latitude->labelsize(14); txt_205_latitude->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_latitude->align(FL_ALIGN_LEFT); txt_205_latitude->callback(ics_changed); txt_205_latitude->when(FL_WHEN_CHANGED); txt_205_longitude = new Fl_Input2(110, Y+252, 120, 24, _("Longitude:")); txt_205_longitude->tooltip(_("decimal degrees, West +")); txt_205_longitude->box(FL_DOWN_BOX); txt_205_longitude->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_longitude->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_longitude->labeltype(FL_NORMAL_LABEL); txt_205_longitude->labelfont(0); txt_205_longitude->labelsize(14); txt_205_longitude->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_longitude->align(FL_ALIGN_LEFT); txt_205_longitude->callback(ics_changed); txt_205_longitude->when(FL_WHEN_CHANGED); tab_205_1->end(); tab_205_1 = new Fl_Group(0, Y+25, 570, 360, _("Line items")); Fl_Scroll* os = new Fl_Scroll(2, Y+30, 566, 356); os->type(Fl_Scroll::BOTH_ALWAYS); os->box(FL_DOWN_BOX); os->color((Fl_Color)215); Fl_Box* osbox = new Fl_Box(2, Y+27, 2, 10); //osbox->box(FL_NO_BOX); for (int i = 0; i < 20; i++) { txt_205_func[i] = new Fl_Input2(2, Y + 40 + (i+1)*24, 70, 24, i == 0 ? _("Func'"):""); txt_205_func[i]->tooltip(_("")); txt_205_func[i]->box(FL_DOWN_BOX); txt_205_func[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_func[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_func[i]->labeltype(FL_NORMAL_LABEL); txt_205_func[i]->labelfont(0); txt_205_func[i]->labelsize(14); txt_205_func[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_func[i]->align(FL_ALIGN_TOP); txt_205_func[i]->callback(ics_changed); txt_205_func[i]->when(FL_WHEN_CHANGED); txt_205_channel[i] = new Fl_Input2(72, Y + 40 + (i+1)*24, 60, 24, i == 0 ? _("Chan'"):""); txt_205_channel[i]->tooltip(_("")); txt_205_channel[i]->box(FL_DOWN_BOX); txt_205_channel[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_channel[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_channel[i]->labeltype(FL_NORMAL_LABEL); txt_205_channel[i]->labelfont(0); txt_205_channel[i]->labelsize(14); txt_205_channel[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_channel[i]->align(FL_ALIGN_TOP); txt_205_channel[i]->callback(ics_changed); txt_205_channel[i]->when(FL_WHEN_CHANGED); txt_205_assign[i] = new Fl_Input2(132, Y + 40 + (i+1)*24, 80, 24, i == 0 ?_("Assign'"):""); txt_205_assign[i]->tooltip(_("")); txt_205_assign[i]->box(FL_DOWN_BOX); txt_205_assign[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_assign[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_assign[i]->labeltype(FL_NORMAL_LABEL); txt_205_assign[i]->labelfont(0); txt_205_assign[i]->labelsize(14); txt_205_assign[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_assign[i]->align(FL_ALIGN_TOP); txt_205_assign[i]->callback(ics_changed); txt_205_assign[i]->when(FL_WHEN_CHANGED); txt_205_rx_freq[i] = new Fl_Input2(212, Y + 40 + (i+1)*24, 60, 24, i == 0 ? _("Rx\nFreq"):""); txt_205_rx_freq[i]->tooltip(_("")); txt_205_rx_freq[i]->box(FL_DOWN_BOX); txt_205_rx_freq[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_rx_freq[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_rx_freq[i]->labeltype(FL_NORMAL_LABEL); txt_205_rx_freq[i]->labelfont(0); txt_205_rx_freq[i]->labelsize(14); txt_205_rx_freq[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_rx_freq[i]->align(FL_ALIGN_TOP); txt_205_rx_freq[i]->callback(ics_changed); txt_205_rx_freq[i]->when(FL_WHEN_CHANGED); txt_205_rx_tone[i] = new Fl_Input2(272, Y + 40 + (i+1)*24, 40, 24, i == 0 ? _("Rx\nTone"):""); txt_205_rx_tone[i]->tooltip(_("")); txt_205_rx_tone[i]->box(FL_DOWN_BOX); txt_205_rx_tone[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_rx_tone[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_rx_tone[i]->labeltype(FL_NORMAL_LABEL); txt_205_rx_tone[i]->labelfont(0); txt_205_rx_tone[i]->labelsize(14); txt_205_rx_tone[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_rx_tone[i]->align(FL_ALIGN_TOP); txt_205_rx_tone[i]->callback(ics_changed); txt_205_rx_tone[i]->when(FL_WHEN_CHANGED); txt_205_tx_freq[i] = new Fl_Input2(312, Y + 40 + (i+1)*24, 60, 24, i == 0 ? _("Tx\nFreq"):""); txt_205_tx_freq[i]->tooltip(_("")); txt_205_tx_freq[i]->box(FL_DOWN_BOX); txt_205_tx_freq[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_tx_freq[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_tx_freq[i]->labeltype(FL_NORMAL_LABEL); txt_205_tx_freq[i]->labelfont(0); txt_205_tx_freq[i]->labelsize(14); txt_205_tx_freq[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_tx_freq[i]->align(FL_ALIGN_TOP); txt_205_tx_freq[i]->callback(ics_changed); txt_205_tx_freq[i]->when(FL_WHEN_CHANGED); txt_205_tx_tone[i] = new Fl_Input2(372, Y + 40 + (i+1)*24, 40, 24, i == 0 ? _("Tx\nTone"):""); txt_205_tx_tone[i]->tooltip(_("")); txt_205_tx_tone[i]->box(FL_DOWN_BOX); txt_205_tx_tone[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_tx_tone[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_tx_tone[i]->labeltype(FL_NORMAL_LABEL); txt_205_tx_tone[i]->labelfont(0); txt_205_tx_tone[i]->labelsize(14); txt_205_tx_tone[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_tx_tone[i]->align(FL_ALIGN_TOP); txt_205_tx_tone[i]->callback(ics_changed); txt_205_tx_tone[i]->when(FL_WHEN_CHANGED); txt_205_mode_adm[i] = new Fl_Input2(412, Y + 40 + (i+1)*24, 50, 24, i == 0 ? _("Mode\nA/D/M"):""); txt_205_mode_adm[i]->tooltip(_("")); txt_205_mode_adm[i]->box(FL_DOWN_BOX); txt_205_mode_adm[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_mode_adm[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_mode_adm[i]->labeltype(FL_NORMAL_LABEL); txt_205_mode_adm[i]->labelfont(0); txt_205_mode_adm[i]->labelsize(14); txt_205_mode_adm[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_mode_adm[i]->align(FL_ALIGN_TOP); txt_205_mode_adm[i]->callback(ics_changed); txt_205_mode_adm[i]->when(FL_WHEN_CHANGED); txt_205_remarks[i] = new Fl_Input2(462, Y + 40 + (i+1)*24, 548, 24, i == 0 ? _("Remarks"):""); txt_205_remarks[i]->tooltip(_("")); txt_205_remarks[i]->box(FL_DOWN_BOX); txt_205_remarks[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_205_remarks[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_205_remarks[i]->labeltype(FL_NORMAL_LABEL); txt_205_remarks[i]->labelfont(0); txt_205_remarks[i]->labelsize(14); txt_205_remarks[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_205_remarks[i]->align(FL_ALIGN_TOP_LEFT); txt_205_remarks[i]->callback(ics_changed); txt_205_remarks[i]->when(FL_WHEN_CHANGED); } os->end(); tab_205_1->end(); tabs_ics205->end(); Fl_Group::current()->resizable(tabs_ics205); tab_ics205->end(); tab_ics205->hide(); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics203.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000123674�12330516146�012737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 203 field variables and template variables // --------------------------------------------------------------------- string ics203_incident = ":inc:"; string ics203_date = ":dat:"; string ics203_time = ":tim:"; string ics203_op_period = ":opp:"; string ics203_incident_commander = ":icc:"; string ics203_incident_deputy = ":icd:"; string ics203_incident_safety_officer = ":ics:"; string ics203_incident_info_officer = ":ici:"; string ics203_liaison_officer = ":icl:"; string ics203_prepared_by = ":pre:"; string ics203_agency = ":agency[n]:"; // 7 string ics203_agency_name = ":agency_name[n]:"; // 7 string ics203_planning_chief = ":planning_chief:"; string ics203_planning_deputy = ":planning_deputy:"; string ics203_resources_unit = ":resources_unit:"; string ics203_situation_unit = ":situation_unit:"; string ics203_documentation_unit = ":documentation_unit:"; string ics203_demobilization_unit = ":demobilization_unit:"; string ics203_tech_spc = ":tech_spc[n]:"; // 3 string ics203_logistics_chief = ":logistics_chief:"; string ics203_logistics_deputy = ":logistics_deputy:"; string ics203_support_director = ":support_director:"; string ics203_supply_unit = ":supply_unit:"; string ics203_facilities_unit = ":facilities_unit:"; string ics203_ground_support = ":ground_support:"; string ics203_service_director = ":service_director:"; string ics203_communications_unit = ":communications_unit:"; string ics203_medical_unit = ":medical_unit:"; string ics203_food_unit = ":food_unit:"; string ics203_ops_chief = ":ops_chief:"; string ics203_ops_deputy = ":ops_deputy:"; string ics203_b1_director = ":b1_director:"; string ics203_b1_deputy = ":b1_deputy:"; string ics203_b1_div = ":b1_div[n]:"; // 4 string ics203_b1_grp = ":b1_grp[n]:"; // 4 string ics203_b2_director = ":b2_director:"; string ics203_b2_deputy = ":b2_deputy:"; string ics203_b2_div = ":b2_div[n]:"; // 4 string ics203_b2_grp = ":b2_grp[n]:"; // 4 string ics203_b3_director = ":b3_director:"; string ics203_b3_deputy = ":b3_deputy:"; string ics203_b3_div = ":b3_div[n]:"; // 4 string ics203_b3_grp = ":b3_grp[n]:"; // 4 string ics203_air_ops_br_dir = ":air_ops_br_dir:"; string ics203_air_tactical_group_sup = ":air_tactical_group_sup:"; string ics203_air_support_group_sup = ":air_support_group_sup:"; string ics203_helicopter_coordinator = ":helicopter_coordinator:"; string ics203_air_tanker_fixed_wing = ":air_tanker_fixed_wing:"; string ics203_finance_chief = ":finance_chief:"; string ics203_finance_deputy = ":finance_deputy:"; string ics203_time_unit = ":time_unit:"; string ics203_procurement_unit = ":procurement_unit:"; string ics203_claims_unit = ":claims_unit:"; string ics203_cost_unit = ":cost_unit:"; string s203_incident; string s203_date; string s203_time; string s203_op_period; string s203_incident_commander; string s203_incident_deputy; string s203_incident_safety_officer; string s203_incident_info_officer; string s203_liaison_officer; string s203_prepared_by; string s203_agency[7]; string s203_agency_name[7]; string s203_planning_chief; string s203_planning_deputy; string s203_resources_unit; string s203_situation_unit; string s203_documentation_unit; string s203_demobilization_unit; string s203_tech_spc[3]; string s203_logistics_chief; string s203_logistics_deputy; string s203_support_director; string s203_supply_unit; string s203_facilities_unit; string s203_ground_support; string s203_service_director; string s203_communications_unit; string s203_medical_unit; string s203_food_unit; string s203_ops_chief; string s203_ops_deputy; string s203_b1_director; string s203_b1_deputy; string s203_b1_div[5]; string s203_b1_grp[5]; string s203_b2_director; string s203_b2_deputy; string s203_b2_div[5]; string s203_b2_grp[5]; string s203_b3_director; string s203_b3_deputy; string s203_b3_div[5]; string s203_b3_grp[5]; string s203_air_ops_br_dir; string s203_air_tactical_group_sup; string s203_air_support_group_sup; string s203_helicopter_coordinator; string s203_air_tanker_fixed_wing; string s203_finance_chief; string s203_finance_deputy; string s203_time_unit; string s203_procurement_unit; string s203_claims_unit; string s203_cost_unit; // ===================================================================== string buff203; string def_203_filename = ""; string base_203_filename = ""; string def_203_TemplateName = ""; bool using_ics203_template = false; void cb_203_set_date() { txt_203_date->value(szDate()); } void cb_203_set_time() { txt_203_time->value(szTime()); } void clear_203fields() { s203_incident.clear(); s203_date.clear(); s203_time.clear(); s203_op_period.clear(); s203_incident_commander.clear(); s203_incident_deputy.clear(); s203_incident_safety_officer.clear(); s203_incident_info_officer.clear(); s203_liaison_officer.clear(); s203_prepared_by.clear(); s203_planning_chief.clear(); s203_planning_deputy.clear(); s203_resources_unit.clear(); s203_situation_unit.clear(); s203_documentation_unit.clear(); s203_demobilization_unit.clear(); s203_logistics_chief.clear(); s203_logistics_deputy.clear(); s203_support_director.clear(); s203_supply_unit.clear(); s203_facilities_unit.clear(); s203_ground_support.clear(); s203_service_director.clear(); s203_communications_unit.clear(); s203_medical_unit.clear(); s203_food_unit.clear(); s203_ops_chief.clear(); s203_ops_deputy.clear(); s203_b1_director.clear(); s203_b1_deputy.clear(); s203_b2_director.clear(); s203_b2_deputy.clear(); s203_b3_director.clear(); s203_b3_deputy.clear(); s203_air_ops_br_dir.clear(); s203_air_tactical_group_sup.clear(); s203_air_support_group_sup.clear(); s203_helicopter_coordinator.clear(); s203_air_tanker_fixed_wing.clear(); s203_finance_chief.clear(); s203_finance_deputy.clear(); s203_time_unit.clear(); s203_procurement_unit.clear(); s203_claims_unit.clear(); s203_cost_unit.clear(); for (int i = 0; i < 7; i++) { s203_agency[i].clear(); s203_agency_name[i].clear(); } for (int i = 0; i < 3; i++) { s203_tech_spc[i].clear(); } for (int i = 0; i < 5; i++) { s203_b1_div[i].clear(); s203_b1_grp[i].clear(); s203_b2_div[i].clear(); s203_b2_grp[i].clear(); s203_b3_div[i].clear(); s203_b3_grp[i].clear(); } } bool check_203fields() { if (s203_incident != txt_203_incident->value()) return true; if (s203_date != txt_203_date->value()) return true; if (s203_time != txt_203_time->value()) return true; if (s203_op_period != txt_203_op_period->value()) return true; if (s203_incident_commander != txt_203_incident_commander->value()) return true; if (s203_incident_deputy != txt_203_incident_deputy->value()) return true; if (s203_incident_safety_officer != txt_203_incident_safety_officer->value()) return true; if (s203_incident_info_officer != txt_203_incident_info_officer->value()) return true; if (s203_liaison_officer != txt_203_liaison_officer->value()) return true; if (s203_prepared_by != txt_203_prepared_by->value()) return true; if (s203_planning_chief != txt_203_planning_chief->value()) return true; if (s203_planning_deputy != txt_203_planning_deputy->value()) return true; if (s203_resources_unit != txt_203_resources_unit->value()) return true; if (s203_situation_unit != txt_203_situation_unit->value()) return true; if (s203_documentation_unit != txt_203_documentation_unit->value()) return true; if (s203_demobilization_unit != txt_203_demobilization_unit->value()) return true; if (s203_logistics_chief != txt_203_logistics_chief->value()) return true; if (s203_logistics_deputy != txt_203_logistics_deputy->value()) return true; if (s203_support_director != txt_203_support_director->value()) return true; if (s203_supply_unit != txt_203_supply_unit->value()) return true; if (s203_facilities_unit != txt_203_facilities_unit->value()) return true; if (s203_ground_support != txt_203_ground_support->value()) return true; if (s203_service_director != txt_203_service_director->value()) return true; if (s203_communications_unit != txt_203_communications_unit->value()) return true; if (s203_medical_unit != txt_203_medical_unit->value()) return true; if (s203_food_unit != txt_203_food_unit->value()) return true; if (s203_ops_chief != txt_203_ops_chief->value()) return true; if (s203_ops_deputy != txt_203_ops_deputy->value()) return true; if (s203_b1_director != txt_203_b1_director->value()) return true; if (s203_b1_deputy != txt_203_b1_deputy->value()) return true; if (s203_b2_director != txt_203_b2_director->value()) return true; if (s203_b2_deputy != txt_203_b2_deputy->value()) return true; if (s203_b3_director != txt_203_b3_director->value()) return true; if (s203_b3_deputy != txt_203_b3_deputy->value()) return true; if (s203_air_ops_br_dir != txt_203_air_ops_br_dir->value()) return true; if (s203_air_tactical_group_sup != txt_203_air_tactical_group_sup->value()) return true; if (s203_air_support_group_sup != txt_203_air_support_group_sup->value()) return true; if (s203_helicopter_coordinator != txt_203_helicopter_coordinator->value()) return true; if (s203_air_tanker_fixed_wing != txt_203_air_tanker_fixed_wing->value()) return true; if (s203_finance_chief != txt_203_finance_chief->value()) return true; if (s203_finance_deputy != txt_203_finance_deputy->value()) return true; if (s203_time_unit != txt_203_time_unit->value()) return true; if (s203_procurement_unit != txt_203_procurement_unit->value()) return true; if (s203_claims_unit != txt_203_claims_unit->value()) return true; if (s203_cost_unit != txt_203_cost_unit->value()) return true; for (int i = 0; i < 7; i++) { if (s203_agency[i] != txt_203_agency[i]->value()) return true; if (s203_agency_name[i] != txt_203_agency_name[i]->value()) return true; } for (int i = 0; i < 3; i++) { if (s203_tech_spc[i] != txt_203_tech_spc[i]->value()) return true; } for (int i = 0; i < 5; i++) { if (s203_b1_div[i] != txt_203_b1_div[i]->value()) return true; if (s203_b1_grp[i] != txt_203_b1_grp[i]->value()) return true; if (s203_b2_div[i] != txt_203_b2_div[i]->value()) return true; if (s203_b2_grp[i] != txt_203_b2_grp[i]->value()) return true; if (s203_b3_div[i] != txt_203_b3_div[i]->value()) return true; if (s203_b3_grp[i] != txt_203_b3_grp[i]->value()) return true; } return false; } void update_203fields() { s203_incident = txt_203_incident->value(); s203_date = txt_203_date->value(); s203_time = txt_203_time->value(); s203_op_period = txt_203_op_period->value(); s203_incident_commander = txt_203_incident_commander->value(); s203_incident_deputy = txt_203_incident_deputy->value(); s203_incident_safety_officer = txt_203_incident_safety_officer->value(); s203_incident_info_officer = txt_203_incident_info_officer->value(); s203_liaison_officer = txt_203_liaison_officer->value(); s203_prepared_by = txt_203_prepared_by->value(); s203_planning_chief = txt_203_planning_chief->value(); s203_planning_deputy = txt_203_planning_deputy->value(); s203_resources_unit = txt_203_resources_unit->value(); s203_situation_unit = txt_203_situation_unit->value(); s203_documentation_unit = txt_203_documentation_unit->value(); s203_demobilization_unit = txt_203_demobilization_unit->value(); s203_logistics_chief = txt_203_logistics_chief->value(); s203_logistics_deputy = txt_203_logistics_deputy->value(); s203_support_director = txt_203_support_director->value(); s203_supply_unit = txt_203_supply_unit->value(); s203_facilities_unit = txt_203_facilities_unit->value(); s203_ground_support = txt_203_ground_support->value(); s203_service_director = txt_203_service_director->value(); s203_communications_unit = txt_203_communications_unit->value(); s203_medical_unit = txt_203_medical_unit->value(); s203_food_unit = txt_203_food_unit->value(); s203_ops_chief = txt_203_ops_chief->value(); s203_ops_deputy = txt_203_ops_deputy->value(); s203_b1_director = txt_203_b1_director->value(); s203_b1_deputy = txt_203_b1_deputy->value(); s203_b2_director = txt_203_b2_director->value(); s203_b2_deputy = txt_203_b2_deputy->value(); s203_b3_director = txt_203_b3_director->value(); s203_b3_deputy = txt_203_b3_deputy->value(); s203_air_ops_br_dir = txt_203_air_ops_br_dir->value(); s203_air_tactical_group_sup = txt_203_air_tactical_group_sup->value(); s203_air_support_group_sup = txt_203_air_support_group_sup->value(); s203_helicopter_coordinator = txt_203_helicopter_coordinator->value(); s203_air_tanker_fixed_wing = txt_203_air_tanker_fixed_wing->value(); s203_finance_chief = txt_203_finance_chief->value(); s203_finance_deputy = txt_203_finance_deputy->value(); s203_time_unit = txt_203_time_unit->value(); s203_procurement_unit = txt_203_procurement_unit->value(); s203_claims_unit = txt_203_claims_unit->value(); s203_cost_unit = txt_203_cost_unit->value(); for (int i = 0; i < 7; i++) { s203_agency[i] = txt_203_agency[i]->value(); s203_agency_name[i] = txt_203_agency_name[i]->value(); } for (int i = 0; i < 3; i++) { s203_tech_spc[i] = txt_203_tech_spc[i]->value(); } for (int i = 0; i < 5; i++) { s203_b1_div[i] = txt_203_b1_div[i]->value(); s203_b1_grp[i] = txt_203_b1_grp[i]->value(); s203_b2_div[i] = txt_203_b2_div[i]->value(); s203_b2_grp[i] = txt_203_b2_grp[i]->value(); s203_b3_div[i] = txt_203_b3_div[i]->value(); s203_b3_grp[i] = txt_203_b3_grp[i]->value(); } } void update_203form() { txt_203_incident->value(s203_incident.c_str()); txt_203_date->value(s203_date.c_str()); txt_203_time->value(s203_time.c_str()); txt_203_op_period->value(s203_op_period.c_str()); txt_203_incident_commander->value(s203_incident_commander.c_str()); txt_203_incident_deputy->value(s203_incident_deputy.c_str()); txt_203_incident_safety_officer->value(s203_incident_safety_officer.c_str()); txt_203_incident_info_officer->value(s203_incident_info_officer.c_str()); txt_203_liaison_officer->value(s203_liaison_officer.c_str()); txt_203_prepared_by->value(s203_prepared_by.c_str()); txt_203_planning_chief->value(s203_planning_chief.c_str()); txt_203_planning_deputy->value(s203_planning_deputy.c_str()); txt_203_resources_unit->value(s203_resources_unit.c_str()); txt_203_situation_unit->value(s203_situation_unit.c_str()); txt_203_documentation_unit->value(s203_documentation_unit.c_str()); txt_203_demobilization_unit->value(s203_demobilization_unit.c_str()); txt_203_logistics_chief->value(s203_logistics_chief.c_str()); txt_203_logistics_deputy->value(s203_logistics_deputy.c_str()); txt_203_support_director->value(s203_support_director.c_str()); txt_203_supply_unit->value(s203_supply_unit.c_str()); txt_203_facilities_unit->value(s203_facilities_unit.c_str()); txt_203_ground_support->value(s203_ground_support.c_str()); txt_203_service_director->value(s203_service_director.c_str()); txt_203_communications_unit->value(s203_communications_unit.c_str()); txt_203_medical_unit->value(s203_medical_unit.c_str()); txt_203_food_unit->value(s203_food_unit.c_str()); txt_203_ops_chief->value(s203_ops_chief.c_str()); txt_203_ops_deputy->value(s203_ops_deputy.c_str()); txt_203_b1_director->value(s203_b1_director.c_str()); txt_203_b1_deputy->value(s203_b1_deputy.c_str()); txt_203_b2_director->value(s203_b2_director.c_str()); txt_203_b2_deputy->value(s203_b2_deputy.c_str()); txt_203_b3_director->value(s203_b3_director.c_str()); txt_203_b3_deputy->value(s203_b3_deputy.c_str()); txt_203_air_ops_br_dir->value(s203_air_ops_br_dir.c_str()); txt_203_air_tactical_group_sup->value(s203_air_tactical_group_sup.c_str()); txt_203_air_support_group_sup->value(s203_air_support_group_sup.c_str()); txt_203_helicopter_coordinator->value(s203_helicopter_coordinator.c_str()); txt_203_air_tanker_fixed_wing->value(s203_air_tanker_fixed_wing.c_str()); txt_203_finance_chief->value(s203_finance_chief.c_str()); txt_203_finance_deputy->value(s203_finance_deputy.c_str()); txt_203_time_unit->value(s203_time_unit.c_str()); txt_203_procurement_unit->value(s203_procurement_unit.c_str()); txt_203_claims_unit->value(s203_claims_unit.c_str()); txt_203_cost_unit->value(s203_cost_unit.c_str()); for (int i = 0; i < 7; i++) { txt_203_agency[i]->value(s203_agency[i].c_str()); txt_203_agency_name[i]->value(s203_agency_name[i].c_str()); } for (int i = 0; i < 3; i++) { txt_203_tech_spc[i]->value(s203_tech_spc[i].c_str()); } for (int i = 0; i < 5; i++) { txt_203_b1_div[i]->value(s203_b1_div[i].c_str()); txt_203_b1_grp[i]->value(s203_b1_grp[i].c_str()); txt_203_b2_div[i]->value(s203_b2_div[i].c_str()); txt_203_b2_grp[i]->value(s203_b2_grp[i].c_str()); txt_203_b3_div[i]->value(s203_b3_div[i].c_str()); txt_203_b3_grp[i]->value(s203_b3_grp[i].c_str()); } } void clear_203_form() { clear_203fields(); txt_203_incident->value(""); txt_203_date->value(""); txt_203_time->value(""); txt_203_op_period->value(""); txt_203_incident_commander->value(""); txt_203_incident_deputy->value(""); txt_203_incident_safety_officer->value(""); txt_203_incident_info_officer->value(""); txt_203_liaison_officer->value(""); txt_203_prepared_by->value(""); txt_203_planning_chief->value(""); txt_203_planning_deputy->value(""); txt_203_resources_unit->value(""); txt_203_situation_unit->value(""); txt_203_documentation_unit->value(""); txt_203_demobilization_unit->value(""); txt_203_logistics_chief->value(""); txt_203_logistics_deputy->value(""); txt_203_support_director->value(""); txt_203_supply_unit->value(""); txt_203_facilities_unit->value(""); txt_203_ground_support->value(""); txt_203_service_director->value(""); txt_203_communications_unit->value(""); txt_203_medical_unit->value(""); txt_203_food_unit->value(""); txt_203_ops_chief->value(""); txt_203_ops_deputy->value(""); txt_203_b1_director->value(""); txt_203_b1_deputy->value(""); txt_203_b2_director->value(""); txt_203_b2_deputy->value(""); txt_203_b3_director->value(""); txt_203_b3_deputy->value(""); txt_203_air_ops_br_dir->value(""); txt_203_air_tactical_group_sup->value(""); txt_203_air_support_group_sup->value(""); txt_203_helicopter_coordinator->value(""); txt_203_air_tanker_fixed_wing->value(""); txt_203_finance_chief->value(""); txt_203_finance_deputy->value(""); txt_203_time_unit->value(""); txt_203_procurement_unit->value(""); txt_203_claims_unit->value(""); txt_203_cost_unit->value(""); for (int i = 0; i < 7; i++) { txt_203_agency[i]->value(""); txt_203_agency_name[i]->value(""); } for (int i = 0; i < 3; i++) { txt_203_tech_spc[i]->value(""); } for (int i = 0; i < 5; i++) { txt_203_b1_div[i]->value(""); txt_203_b1_grp[i]->value(""); txt_203_b2_div[i]->value(""); txt_203_b2_grp[i]->value(""); txt_203_b3_div[i]->value(""); txt_203_b3_grp[i]->value(""); } } string &ics_n(string & subst, int n) { static string garbage = "#$^*!"; size_t pos = subst.find("["); if (pos == string::npos) return garbage; pos++; subst[pos] = '0' + n; return subst; } void make_buff203(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics203_incident, s203_incident ) ); mbuff.append( lineout( ics203_date, s203_date ) ); mbuff.append( lineout( ics203_time, s203_time ) ); mbuff.append( lineout( ics203_op_period, s203_op_period ) ); mbuff.append( lineout( ics203_incident_commander, s203_incident_commander ) ); mbuff.append( lineout( ics203_incident_deputy, s203_incident_deputy ) ); mbuff.append( lineout( ics203_incident_safety_officer, s203_incident_safety_officer ) ); mbuff.append( lineout( ics203_incident_info_officer, s203_incident_info_officer ) ); mbuff.append( lineout( ics203_liaison_officer, s203_liaison_officer ) ); mbuff.append( lineout( ics203_prepared_by, s203_prepared_by ) ); mbuff.append( lineout( ics203_planning_chief, s203_planning_chief ) ); mbuff.append( lineout( ics203_planning_deputy, s203_planning_deputy ) ); mbuff.append( lineout( ics203_resources_unit, s203_resources_unit ) ); mbuff.append( lineout( ics203_situation_unit, s203_situation_unit ) ); mbuff.append( lineout( ics203_documentation_unit, s203_documentation_unit ) ); mbuff.append( lineout( ics203_demobilization_unit, s203_demobilization_unit ) ); mbuff.append( lineout( ics203_logistics_chief, s203_logistics_chief ) ); mbuff.append( lineout( ics203_logistics_deputy, s203_logistics_deputy ) ); mbuff.append( lineout( ics203_support_director, s203_support_director ) ); mbuff.append( lineout( ics203_supply_unit, s203_supply_unit ) ); mbuff.append( lineout( ics203_facilities_unit, s203_facilities_unit ) ); mbuff.append( lineout( ics203_ground_support, s203_ground_support ) ); mbuff.append( lineout( ics203_service_director, s203_service_director ) ); mbuff.append( lineout( ics203_communications_unit, s203_communications_unit ) ); mbuff.append( lineout( ics203_medical_unit, s203_medical_unit ) ); mbuff.append( lineout( ics203_food_unit, s203_food_unit ) ); mbuff.append( lineout( ics203_ops_chief, s203_ops_chief ) ); mbuff.append( lineout( ics203_ops_deputy, s203_ops_deputy ) ); mbuff.append( lineout( ics203_b1_director, s203_b1_director ) ); mbuff.append( lineout( ics203_b1_deputy, s203_b1_deputy ) ); mbuff.append( lineout( ics203_b2_director, s203_b2_director ) ); mbuff.append( lineout( ics203_b2_deputy, s203_b2_deputy ) ); mbuff.append( lineout( ics203_b3_director, s203_b3_director ) ); mbuff.append( lineout( ics203_b3_deputy, s203_b3_deputy ) ); mbuff.append( lineout( ics203_air_ops_br_dir, s203_air_ops_br_dir ) ); mbuff.append( lineout( ics203_air_tactical_group_sup, s203_air_tactical_group_sup ) ); mbuff.append( lineout( ics203_air_support_group_sup, s203_air_support_group_sup ) ); mbuff.append( lineout( ics203_helicopter_coordinator, s203_helicopter_coordinator ) ); mbuff.append( lineout( ics203_air_tanker_fixed_wing, s203_air_tanker_fixed_wing ) ); mbuff.append( lineout( ics203_finance_chief, s203_finance_chief ) ); mbuff.append( lineout( ics203_finance_deputy, s203_finance_deputy ) ); mbuff.append( lineout( ics203_time_unit, s203_time_unit ) ); mbuff.append( lineout( ics203_procurement_unit, s203_procurement_unit ) ); mbuff.append( lineout( ics203_claims_unit, s203_claims_unit ) ); mbuff.append( lineout( ics203_cost_unit, s203_cost_unit ) ); for (int i = 0; i < 7; i++) { mbuff.append( lineout( ics_n( ics203_agency, i ), s203_agency[i] ) ); mbuff.append( lineout( ics_n( ics203_agency_name, i ), s203_agency_name[i] ) ); } for (int i = 0; i < 3; i++) { mbuff.append( lineout( ics_n( ics203_tech_spc, i ), s203_tech_spc[i] ) ); } for (int i = 0; i < 5; i++) { mbuff.append( lineout( ics_n( ics203_b1_div, i ), s203_b1_div[i] ) ); mbuff.append( lineout( ics_n( ics203_b1_grp, i ), s203_b1_grp[i] ) ); mbuff.append( lineout( ics_n( ics203_b2_div, i ), s203_b2_div[i] ) ); mbuff.append( lineout( ics_n( ics203_b2_grp, i ), s203_b2_grp[i] ) ); mbuff.append( lineout( ics_n( ics203_b3_div, i ), s203_b3_div[i] ) ); mbuff.append( lineout( ics_n( ics203_b3_grp, i ), s203_b3_grp[i] ) ); } if (compress) compress_maybe(mbuff); buff203.append(mbuff); } void read_203_buffer(string data) { clear_203fields(); read_header(data); s203_incident = findstr(data, ics203_incident); s203_date = findstr(data, ics203_date); s203_time = findstr(data, ics203_time); s203_op_period = findstr(data, ics203_op_period); s203_incident_commander = findstr(data, ics203_incident_commander); s203_incident_deputy = findstr(data, ics203_incident_deputy); s203_incident_safety_officer = findstr(data, ics203_incident_safety_officer); s203_incident_info_officer = findstr(data, ics203_incident_info_officer); s203_liaison_officer = findstr(data, ics203_liaison_officer); s203_prepared_by = findstr(data, ics203_prepared_by); s203_planning_chief = findstr(data, ics203_planning_chief); s203_planning_deputy = findstr(data, ics203_planning_deputy); s203_resources_unit = findstr(data, ics203_resources_unit); s203_situation_unit = findstr(data, ics203_situation_unit); s203_documentation_unit = findstr(data, ics203_documentation_unit); s203_demobilization_unit = findstr(data, ics203_demobilization_unit); s203_logistics_chief = findstr(data, ics203_logistics_chief); s203_logistics_deputy = findstr(data, ics203_logistics_deputy); s203_support_director = findstr(data, ics203_support_director); s203_supply_unit = findstr(data, ics203_supply_unit); s203_facilities_unit = findstr(data, ics203_facilities_unit); s203_ground_support = findstr(data, ics203_ground_support); s203_service_director = findstr(data, ics203_service_director); s203_communications_unit = findstr(data, ics203_communications_unit); s203_medical_unit = findstr(data, ics203_medical_unit); s203_food_unit = findstr(data, ics203_food_unit); s203_ops_chief = findstr(data, ics203_ops_chief); s203_ops_deputy = findstr(data, ics203_ops_deputy); s203_b1_director = findstr(data, ics203_b1_director); s203_b1_deputy = findstr(data, ics203_b1_deputy); s203_b2_director = findstr(data, ics203_b2_director); s203_b2_deputy = findstr(data, ics203_b2_deputy); s203_b3_director = findstr(data, ics203_b3_director); s203_b3_deputy = findstr(data, ics203_b3_deputy); s203_air_ops_br_dir = findstr(data, ics203_air_ops_br_dir); s203_air_tactical_group_sup = findstr(data, ics203_air_tactical_group_sup); s203_air_support_group_sup = findstr(data, ics203_air_support_group_sup); s203_helicopter_coordinator = findstr(data, ics203_helicopter_coordinator); s203_air_tanker_fixed_wing = findstr(data, ics203_air_tanker_fixed_wing); s203_finance_chief = findstr(data, ics203_finance_chief); s203_finance_deputy = findstr(data, ics203_finance_deputy); s203_time_unit = findstr(data, ics203_time_unit); s203_procurement_unit = findstr(data, ics203_procurement_unit); s203_claims_unit = findstr(data, ics203_claims_unit); s203_cost_unit = findstr(data, ics203_cost_unit); for (int i = 0; i < 7; i++) { s203_agency[i] = findstr(data, ics_n( ics203_agency, i) ); s203_agency_name[i] = findstr(data, ics_n( ics203_agency_name, i) ); } for (int i = 0; i < 3; i++) { s203_tech_spc[i] = findstr(data, ics_n( ics203_tech_spc, i) ); } for (int i = 0; i < 5; i++) { s203_b1_div[i] = findstr(data, ics_n( ics203_b1_div, i) ); s203_b1_grp[i] = findstr(data, ics_n( ics203_b1_grp, i) ); s203_b2_div[i] = findstr(data, ics_n( ics203_b2_div, i) ); s203_b2_grp[i] = findstr(data, ics_n( ics203_b2_grp, i) ); s203_b3_div[i] = findstr(data, ics_n( ics203_b3_div, i) ); s203_b3_grp[i] = findstr(data, ics_n( ics203_b3_grp, i) ); } update_203form(); } void cb_203_new() { if (check_203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_203_save(); } } clear_203_form(); clear_header(); def_203_filename = ICS_msg_dir; def_203_filename.append("new"F203_EXT); show_filename(def_203_filename); using_ics203_template = false; } void cb_203_import() { fl_alert2("Not implemented"); } void cb_203_export() { fl_alert2("Not implemented"); } void cb_203_wrap_import(string wrapfilename, string inpbuffer) { clear_203_form(); read_203_buffer(inpbuffer); def_203_filename = ICS_msg_dir; def_203_filename.append(wrapfilename); show_filename(def_203_filename); using_ics203_template = false; } int eval_203_fsize() { Ccrc16 chksum; evalstr.append("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_203_filename).append("]"); update_203fields(); update_header(FROM); evalstr.append(header("<ics203>")); buff203.clear(); make_buff203(true); if (buff203.empty()) return 0; compress_maybe( buff203 ); evalstr.append( buff203 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_203_wrap_export() { if (check_203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_203fields(); if (base_203_filename == "new"F203_EXT || base_203_filename == "default"F203_EXT) if (!cb_203_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_203_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff203.assign(header("<ics203>")); make_buff203(true); export_wrapfile(base_203_filename, wrapfilename, buff203, pext != ".wrap"); buff203.assign(header("<ics203>")); make_buff203(true); write_203(def_203_filename); } } void cb_203_wrap_autosend() { if (check_203fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_203fields(); if (base_203_filename == "new"F203_EXT || base_203_filename == "default"F203_EXT) if (!cb_203_save_as()) return; update_header(FROM); buff203.assign(header("<ics203>")); make_buff203(true); xfr_via_socket(base_203_filename, buff203); buff203.assign(header("<ics203>")); make_buff203(true); write_203(def_203_filename); } void cb_203_load_template() { string def_203_filename = def_203_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T203_EXT, def_203_filename.c_str()); if (p) { clear_203_form(); read_data_file(p); def_203_TemplateName = p; show_filename(def_203_TemplateName); using_ics203_template = true; } } void cb_203_save_template() { if (!using_ics203_template) { cb_203_save_as_template(); return; } string def_203_filename = def_203_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T203_EXT, def_203_filename.c_str()); if (p) { update_header(CHANGED); buff203.assign(header("<ics203>")); make_buff203(); write_203(p); } } void cb_203_save_as_template() { string def_203_filename = def_203_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T203_EXT, def_203_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_203_TemplateName = p; if (strlen(pext) == 0) def_203_TemplateName.append(T203_EXT); remove_spaces_from_filename(def_203_TemplateName); clear_header(); update_header(CHANGED); buff203.assign(header("<ics203>")); make_buff203(); write_203(def_203_TemplateName); show_filename(def_203_TemplateName); using_ics203_template = true; } } void cb_203_open() { const char *p = FSEL::select(_("Open data file"), "ICS-203\t*"F203_EXT, def_203_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_203_form(); read_data_file(p); using_ics203_template = false; def_203_filename = p; show_filename(def_203_filename); } void write_203(string s) { FILE *file203 = fopen(s.c_str(), "w"); if (!file203) return; fwrite(buff203.c_str(), buff203.length(), 1, file203); fclose(file203); } bool cb_203_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F203_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_203_filename; p = FSEL::saveas(_("Save data file"), "ICS-203\t*"F203_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_203_filename = p; if (strlen(pext) == 0) def_203_filename.append(F203_EXT); remove_spaces_from_filename(def_203_filename); update_203fields(); update_header(NEW); buff203.assign(header("<ics203>")); make_buff203(); write_203(def_203_filename); using_ics203_template = false; show_filename(def_203_filename); return true; } void cb_203_save() { if (base_203_filename == "new"F203_EXT || base_203_filename == "default"F203_EXT || using_ics203_template == true) { cb_203_save_as(); return; } if (check_203fields()) update_header(CHANGED); update_203fields(); buff203.assign(header("<ics203>")); make_buff203(); write_203(def_203_filename); using_ics203_template = false; } void cb_203_html() { string fname_name = fl_filename_name(def_203_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics203_fname = ICS_dir; ics203_fname.append(fname_name); ics203_fname.append(".html"); string html_text = ""; update_203fields(); string form203 = ics203_html_template; replacestr(form203, TITLE, fname_name); replacestr(form203, ics203_incident, s203_incident ); replacestr(form203, ics203_date, s203_date ); replacestr(form203, ics203_time, s203_time ); replacestr(form203, ics203_op_period, s203_op_period ); replacestr(form203, ics203_incident_commander, s203_incident_commander ); replacestr(form203, ics203_incident_deputy, s203_incident_deputy ); replacestr(form203, ics203_incident_safety_officer, s203_incident_safety_officer ); replacestr(form203, ics203_incident_info_officer, s203_incident_info_officer ); replacestr(form203, ics203_liaison_officer, s203_liaison_officer ); replacestr(form203, ics203_prepared_by, s203_prepared_by ); replacestr(form203, ics203_planning_chief, s203_planning_chief ); replacestr(form203, ics203_planning_deputy, s203_planning_deputy ); replacestr(form203, ics203_resources_unit, s203_resources_unit ); replacestr(form203, ics203_situation_unit, s203_situation_unit ); replacestr(form203, ics203_documentation_unit, s203_documentation_unit ); replacestr(form203, ics203_demobilization_unit, s203_demobilization_unit ); replacestr(form203, ics203_logistics_chief, s203_logistics_chief ); replacestr(form203, ics203_logistics_deputy, s203_logistics_deputy ); replacestr(form203, ics203_support_director, s203_support_director ); replacestr(form203, ics203_supply_unit, s203_supply_unit ); replacestr(form203, ics203_facilities_unit, s203_facilities_unit ); replacestr(form203, ics203_ground_support, s203_ground_support ); replacestr(form203, ics203_service_director, s203_service_director ); replacestr(form203, ics203_communications_unit, s203_communications_unit ); replacestr(form203, ics203_medical_unit, s203_medical_unit ); replacestr(form203, ics203_food_unit, s203_food_unit ); replacestr(form203, ics203_ops_chief, s203_ops_chief ); replacestr(form203, ics203_ops_deputy, s203_ops_deputy ); replacestr(form203, ics203_b1_director, s203_b1_director ); replacestr(form203, ics203_b1_deputy, s203_b1_deputy ); replacestr(form203, ics203_b2_director, s203_b2_director ); replacestr(form203, ics203_b2_deputy, s203_b2_deputy ); replacestr(form203, ics203_b3_director, s203_b3_director ); replacestr(form203, ics203_b3_deputy, s203_b3_deputy ); replacestr(form203, ics203_air_ops_br_dir, s203_air_ops_br_dir ); replacestr(form203, ics203_air_tactical_group_sup, s203_air_tactical_group_sup ); replacestr(form203, ics203_air_support_group_sup, s203_air_support_group_sup ); replacestr(form203, ics203_helicopter_coordinator, s203_helicopter_coordinator ); replacestr(form203, ics203_air_tanker_fixed_wing, s203_air_tanker_fixed_wing ); replacestr(form203, ics203_finance_chief, s203_finance_chief ); replacestr(form203, ics203_finance_deputy, s203_finance_deputy ); replacestr(form203, ics203_time_unit, s203_time_unit ); replacestr(form203, ics203_procurement_unit, s203_procurement_unit ); replacestr(form203, ics203_claims_unit, s203_claims_unit ); replacestr(form203, ics203_cost_unit, s203_cost_unit ); for (int i = 0; i < 7; i++) { replacestr(form203, ics_n( ics203_agency, i ), s203_agency[i] ); replacestr(form203, ics_n( ics203_agency_name, i ), s203_agency_name[i] ); } for (int i = 0; i < 3; i++) { replacestr(form203, ics_n( ics203_tech_spc, i ), s203_tech_spc[i] ); } for (int i = 0; i < 5; i++) { replacestr(form203, ics_n( ics203_b1_div, i ), s203_b1_div[i] ); replacestr(form203, ics_n( ics203_b1_grp, i ), s203_b1_grp[i] ); replacestr(form203, ics_n( ics203_b2_div, i ), s203_b2_div[i] ); replacestr(form203, ics_n( ics203_b2_grp, i ), s203_b2_grp[i] ); replacestr(form203, ics_n( ics203_b3_div, i ), s203_b3_div[i] ); replacestr(form203, ics_n( ics203_b3_grp, i ), s203_b3_grp[i] ); } FILE *file203 = fopen(ics203_fname.c_str(), "w"); fprintf(file203,"%s", form203.c_str()); fclose(file203); open_url(ics203_fname.c_str()); } void cb_203_msg_type() { if (tabs_msg_type->value() == tab_ics203 ) { tab_ics203_type->value(tab_203_1); show_filename(def_203_filename); } } void cb_203_textout() { string ics203_fname = ICS_dir; ics203_fname.append("ics203.txt"); update_203fields(); string form203 = ics203_text_template; replacestr(form203, ics203_incident, s203_incident ); replacestr(form203, ics203_date, s203_date ); replacestr(form203, ics203_time, s203_time ); replacestr(form203, ics203_op_period, s203_op_period ); replacestr(form203, ics203_incident_commander, s203_incident_commander ); replacestr(form203, ics203_incident_deputy, s203_incident_deputy ); replacestr(form203, ics203_incident_safety_officer, s203_incident_safety_officer ); replacestr(form203, ics203_incident_info_officer, s203_incident_info_officer ); replacestr(form203, ics203_liaison_officer, s203_liaison_officer ); replacestr(form203, ics203_prepared_by, s203_prepared_by ); replacestr(form203, ics203_planning_chief, s203_planning_chief ); replacestr(form203, ics203_planning_deputy, s203_planning_deputy ); replacestr(form203, ics203_resources_unit, s203_resources_unit ); replacestr(form203, ics203_situation_unit, s203_situation_unit ); replacestr(form203, ics203_documentation_unit, s203_documentation_unit ); replacestr(form203, ics203_demobilization_unit, s203_demobilization_unit ); replacestr(form203, ics203_logistics_chief, s203_logistics_chief ); replacestr(form203, ics203_logistics_deputy, s203_logistics_deputy ); replacestr(form203, ics203_support_director, s203_support_director ); replacestr(form203, ics203_supply_unit, s203_supply_unit ); replacestr(form203, ics203_facilities_unit, s203_facilities_unit ); replacestr(form203, ics203_ground_support, s203_ground_support ); replacestr(form203, ics203_service_director, s203_service_director ); replacestr(form203, ics203_communications_unit, s203_communications_unit ); replacestr(form203, ics203_medical_unit, s203_medical_unit ); replacestr(form203, ics203_food_unit, s203_food_unit ); replacestr(form203, ics203_ops_chief, s203_ops_chief ); replacestr(form203, ics203_ops_deputy, s203_ops_deputy ); replacestr(form203, ics203_b1_director, s203_b1_director ); replacestr(form203, ics203_b1_deputy, s203_b1_deputy ); replacestr(form203, ics203_b2_director, s203_b2_director ); replacestr(form203, ics203_b2_deputy, s203_b2_deputy ); replacestr(form203, ics203_b3_director, s203_b3_director ); replacestr(form203, ics203_b3_deputy, s203_b3_deputy ); replacestr(form203, ics203_air_ops_br_dir, s203_air_ops_br_dir ); replacestr(form203, ics203_air_tactical_group_sup, s203_air_tactical_group_sup ); replacestr(form203, ics203_air_support_group_sup, s203_air_support_group_sup ); replacestr(form203, ics203_helicopter_coordinator, s203_helicopter_coordinator ); replacestr(form203, ics203_air_tanker_fixed_wing, s203_air_tanker_fixed_wing ); replacestr(form203, ics203_finance_chief, s203_finance_chief ); replacestr(form203, ics203_finance_deputy, s203_finance_deputy ); replacestr(form203, ics203_time_unit, s203_time_unit ); replacestr(form203, ics203_procurement_unit, s203_procurement_unit ); replacestr(form203, ics203_claims_unit, s203_claims_unit ); replacestr(form203, ics203_cost_unit, s203_cost_unit ); for (int i = 0; i < 7; i++) { replacestr(form203, ics_n( ics203_agency, i ), s203_agency[i] ); replacestr(form203, ics_n( ics203_agency_name, i ), s203_agency_name[i] ); } for (int i = 0; i < 3; i++) { replacestr(form203, ics_n( ics203_tech_spc, i ), s203_tech_spc[i] ); } for (int i = 0; i < 5; i++) { replacestr(form203, ics_n( ics203_b1_div, i ), s203_b1_div[i] ); replacestr(form203, ics_n( ics203_b1_grp, i ), s203_b1_grp[i] ); replacestr(form203, ics_n( ics203_b2_div, i ), s203_b2_div[i] ); replacestr(form203, ics_n( ics203_b2_grp, i ), s203_b2_grp[i] ); replacestr(form203, ics_n( ics203_b3_div, i ), s203_b3_div[i] ); replacestr(form203, ics_n( ics203_b3_grp, i ), s203_b3_grp[i] ); } FILE *file203 = fopen(ics203_fname.c_str(), "w"); fprintf(file203,"%s", form203.c_str()); fclose(file203); open_url(ics203_fname.c_str()); } ��������������������������������������������������������������������flmsg-2.0.10/src/ics/ics214_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000014622�12330516146�015007� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics214_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd>\ <html>\ <head>\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head>\ <body>\ <table ALIGN=left WIDTH=950px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr>\ <td COLSPAN=2 VALIGN=middle><center><big><b>UNIT LOG</b></big></center></td>\ <td COLSPAN=2><b>1. Incident name</b><br>:inc:<br></td>\ <td><b>2.Date Prepared</span></b><br>:dat:<br></td>\ <td><b>3.Time Prepared</span></b><br>:tim:<br></td>\ </tr>\ <tr>\ <td COLSPAN=2><b>4. Unit Name / Designatiors</b><br>:und:<br></td>\ <td COLSPAN=3><b>5. Unit leader (Name and Position)</b><br>:unl:<br></td>\ <td COLSPAN=1><b>6. Operational Period</b><br>:opp:<br></td>\ <tr><td COLSPAN=6><center><b>7. Personnel Roster Assigned</b></center></td></tr>\ <tr>\ <td COLSPAN=2><center><b>Name</b></center></td>\ <td COLSPAN=2><center><b>ICS Position</b></center></td>\ <td COLSPAN=2><center><b>Home Base</b></center></td>\ </tr>\ <tr><td COLSPAN=2>:nam[0]:</td><td COLSPAN=2>:pos[0]:</td><td COLSPAN=2>:hom[0]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[1]:</td><td COLSPAN=2>:pos[1]:</td><td COLSPAN=2>:hom[1]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[2]:</td><td COLSPAN=2>:pos[2]:</td><td COLSPAN=2>:hom[2]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[3]:</td><td COLSPAN=2>:pos[3]:</td><td COLSPAN=2>:hom[3]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[4]:</td><td COLSPAN=2>:pos[4]:</td><td COLSPAN=2>:hom[4]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[5]:</td><td COLSPAN=2>:pos[5]:</td><td COLSPAN=2>:hom[5]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[6]:</td><td COLSPAN=2>:pos[6]:</td><td COLSPAN=2>:hom[6]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[7]:</td><td COLSPAN=2>:pos[7]:</td><td COLSPAN=2>:hom[7]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[8]:</td><td COLSPAN=2>:pos[8]:</td><td COLSPAN=2>:hom[8]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[9]:</td><td COLSPAN=2>:pos[9]:</td><td COLSPAN=2>:hom[9]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[10]:</td><td COLSPAN=2>:pos[10]:</td><td COLSPAN=2>:hom[10]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[11]:</td><td COLSPAN=2>:pos[11]:</td><td COLSPAN=2>:hom[11]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[12]:</td><td COLSPAN=2>:pos[12]:</td><td COLSPAN=2>:hom[12]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[13]:</td><td COLSPAN=2>:pos[13]:</td><td COLSPAN=2>:hom[13]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[14]:</td><td COLSPAN=2>:pos[14]:</td><td COLSPAN=2>:hom[14]:<br></td></tr>\ <tr><td COLSPAN=2>:nam[15]:</td><td COLSPAN=2>:pos[15]:</td><td COLSPAN=2>:hom[15]:<br></td></tr>\ <tr><td COLSPAN=6><center><b>8. Activity Log</b></center></td></tr>\ <tr><td COLSPAN=1><center><b>Time</b></center></td><td COLSPAN=5><center><b>Major Events</b></center></td></tr>\ <tr><td COLSPAN=1>:at[0]:</td><td COLSPAN=5>:ev[0]:<br></td></tr>\ <tr><td COLSPAN=1>:at[1]:</td><td COLSPAN=5>:ev[1]:<br></td></tr>\ <tr><td COLSPAN=1>:at[2]:</td><td COLSPAN=5>:ev[2]:<br></td></tr>\ <tr><td COLSPAN=1>:at[3]:</td><td COLSPAN=5>:ev[3]:<br></td></tr>\ <tr><td COLSPAN=1>:at[4]:</td><td COLSPAN=5>:ev[4]:<br></td></tr>\ <tr><td COLSPAN=1>:at[5]:</td><td COLSPAN=5>:ev[5]:<br></td></tr>\ <tr><td COLSPAN=1>:at[6]:</td><td COLSPAN=5>:ev[6]:<br></td></tr>\ <tr><td COLSPAN=1>:at[7]:</td><td COLSPAN=5>:ev[7]:<br></td></tr>\ <tr><td COLSPAN=1>:at[8]:</td><td COLSPAN=5>:ev[8]:<br></td></tr>\ <tr><td COLSPAN=1>:at[9]:</td><td COLSPAN=5>:ev[9]:<br></td></tr>\ <tr><td COLSPAN=1>:at[10]:</td><td COLSPAN=5>:ev[10]:<br></td></tr>\ <tr><td COLSPAN=1>:at[11]:</td><td COLSPAN=5>:ev[11]:<br></td></tr>\ <tr><td COLSPAN=1>:at[12]:</td><td COLSPAN=5>:ev[12]:<br></td></tr>\ <tr><td COLSPAN=1>:at[13]:</td><td COLSPAN=5>:ev[13]:<br></td></tr>\ <tr><td COLSPAN=1>:at[14]:</td><td COLSPAN=5>:ev[14]:<br></td></tr>\ <tr><td COLSPAN=1>:at[15]:</td><td COLSPAN=5>:ev[15]:<br></td></tr>\ <tr><td COLSPAN=6><b>9. Prepared by (Name and Position)</b><br>:pre:<br></td></tr>\ <tr>\ <td VALIGN=top WIDTH=16% HEIGHT=24px>ICS-214</td>\ <td VALIGN=top WIDTH=16% HEIGHT=24px></td>\ <td VALIGN=top WIDTH=16% HEIGHT=24px></td>\ <td VALIGN=top WIDTH=16% HEIGHT=24px></td>\ <td VALIGN=top WIDTH=16% HEIGHT=24px></td>\ <td VALIGN=top WIDTH=17% HEIGHT=24px></td>\ </tr>\ </tbody>\ </table>\ </body>\ </html>"; const char ics214_text_template[] = "ICS 214 UNIT LOG\n\n\ Incident name: :inc:\n\ Date Prepared: :dat:\n\ Time Prepared: :tim:\n\ Personnel Roster Assigned\n\ line 0: :nam[0]:, :pos[0]:, :hom[0]:\n\ line 1: :nam[1]:, :pos[1]:, :hom[1]:\n\ line 2: :nam[2]:, :pos[2]:, :hom[2]:\n\ line 3: :nam[3]:, :pos[3]:, :hom[3]:\n\ line 4: :nam[4]:, :pos[4]:, :hom[4]:\n\ line 5: :nam[5]:, :pos[5]:, :hom[5]:\n\ line 6: :nam[6]:, :pos[6]:, :hom[6]:\n\ line 7: :nam[7]:, :pos[7]:, :hom[7]:\n\ line 8: :nam[8]:, :pos[8]:, :hom[8]:\n\ line 9: :nam[9]:, :pos[9]:, :hom[9]:\n\ line 10: :nam[10]:, :pos[10]:, :hom[10]:\n\ line 11: :nam[11]:, :pos[11]:, :hom[11]:\n\ line 12: :nam[12]:, :pos[12]:, :hom[12]:\n\ line 13: :nam[13]:, :pos[13]:, :hom[13]:\n\ line 14: :nam[14]:, :pos[14]:, :hom[14]:\n\ line 15: :nam[15]:, :pos[15]:, :hom[15]:\n\ Activity Log\n\ line 0: :at[0], :ev[0]:\n\ line 1: :at[1], :ev[1]:\n\ line 2: :at[2], :ev[2]:\n\ line 3: :at[3], :ev[3]:\n\ line 4: :at[4], :ev[4]:\n\ line 5: :at[5], :ev[5]:\n\ line 6: :at[6], :ev[6]:\n\ line 7: :at[7], :ev[7]:\n\ line 8: :at[8], :ev[8]:\n\ line 9: :at[9], :ev[9]:\n\ line 10: :at[10], :ev[10]:\n\ line 11: :at[11], :ev[11]:\n\ line 12: :at[12], :ev[12]:\n\ line 13: :at[13], :ev[13]:\n\ line 14: :at[14], :ev[14]:\n\ line 15: :at[15], :ev[15]:\n\ Prepared by: :pre:\n\ "; ��������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics203_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000027006�12330516146�015005� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics203_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head>\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=2 CELLSPACING=0>\ <tbody>\ <tr>\ <td colspan=3 VALIGN=middle><big><b></b>ORGANIZATION ASSIGNMENT LIST</b></big></td>\ <td COLSPAN=2 VALIGN=top><b>1. Incident name</b><br>:inc:<br></td>\ <td VALIGN=top><b>2.Date Prepared</b><br>:dat:<br></td>\ <td VALIGN=top><b>3.Time Prepared</b><br>:tim:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><br><br>\ <hr WIDTH=100% HEIGHT=2px><b>5. Incident Command and Staff</b><br></td>\ <td COLSPAN=3 VALIGN=top>\ <b>4. Operational Period (Date/Time)</b><br>:opp:<br>\ <hr WIDTH=100%; HEIGHT=2px><b>9. Operations section</b><br>\ </td>\ </tr>\ <tr>\ <td VALIGN=top>Incident Commander<br></td>\ <td COLSPAN=3 VALIGN=top>:icc:<br></td>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=2 VALIGN=top>:ops_chief:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=3 VALIGN=top>:icd:<br></td>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=2 VALIGN=top>:ops_deputy:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Safety Officer<br></td>\ <td COLSPAN=3 VALIGN=top>:ics:<br></td>\ <td COLSPAN=3 VALIGN=top><b>a. Branch I - Division / Groups</b><br></td>\ </tr>\ <tr>\ <td VALIGN=top>Information Officer<br></td>\ <td COLSPAN=3 VALIGN=top>:ici:<br></td>\ <td VALIGN=top>Branch Director<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_director:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Liaison Officer<br></td>\ <td COLSPAN=3 VALIGN=top>:icl:<br></td>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_deputy:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><b>6. Agency Representative</b><br></td>\ <td COLSPAN=3 VALIGN=top>Division / Group<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Agency<br></td>\ <td COLSPAN=3 VALIGN=top>Name<br></td>\ <td VALIGN=top>:b1_div[0]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_grp[0]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[0]:<br></td>\ <td COLSPAN=3 VALIGN=top>:agency_name[0]:<br></td>\ <td VALIGN=top>:b1_div[1]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_grp[1]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[1]:<br></td>\ <td COLSPAN=3 VALIGN=top>:agency_name[1]:<br></td>\ <td VALIGN=top>:b1_div[2]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_grp[2]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[2]:<br></td>\ <td COLSPAN=3 VALIGN=top>:agency_name[2]:<br></td>\ <td VALIGN=top>:b1_div[3]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b1_grp[3]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[3]:<br></td>\ <td COLSPAN=3 VALIGN=top>:agency_name[3]:<br></td>\ <td COLSPAN=3 VALIGN=top><b>b. Branch II - Division / Groups</b><br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[4]:<br></td>\ <td COLSPAN=3 VALIGN=top>:agency_name[4]:<br></td>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=2 VALIGN=top>:b2_director:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[5]:<br>\ </td>\ <td COLSPAN=3 VALIGN=top>:agency_name[5]:<br>\ </td>\ <td VALIGN=top>Deputy<br>\ </td>\ <td COLSPAN=2 VALIGN=top>:b2_deputy:<br>\ </td>\ </tr>\ <tr>\ <td VALIGN=top>:agency[6]:<br>\ </td>\ <td COLSPAN=3 VALIGN=top>:agency_name[6]:</td>\ <td COLSPAN=3 VALIGN=top>Division / Group<br>\ </td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><b>7. Planning Section</b><br></td>\ <td VALIGN=top>:b2_div[0]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b2_grp[0]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=3 VALIGN=top>:planning_chief:<br></td>\ <td VALIGN=top>:b2_div[1]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b2_grp[1]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=3 VALIGN=top>:planning_deputy:<br></td>\ <td VALIGN=top>:b2_div[2]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b2_grp[2]: <br></td>\ </tr>\ <tr>\ <td VALIGN=top>Resources Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:resources_unit:<br></td>\ <td VALIGN=top>:b2_div[3]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b2_grp[3]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Situation Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:situation_unit:<br></td>\ <td COLSPAN=3 VALIGN=top><b>c. Branch III - Division / Groups</b><br></td>\ </tr>\ <tr>\ <td VALIGN=top>Documentation Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:documentation_unit:<br></td>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_director:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Demobilization Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:demobilization_unit:<br></td>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_deputy:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top>Technical Specialists<br></td>\ <td COLSPAN=3 VALIGN=top>Division / Group<br></td>\ </tr>\ <tr>\ <td COLSPAN=2 VALIGN=top>Specialist</td>\ <td COLSPAN=2 VALIGN=top>:tech_spc[0]:</td>\ <td VALIGN=top>:b3_div[0]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_grp[0]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=2 VALIGN=top>Specialist</td>\ <td COLSPAN=2 VALIGN=top>:tech_spc[1]: </td>\ <td VALIGN=top>:b3_div[1]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_grp[1]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=2 VALIGN=top>Specialist</td>\ <td COLSPAN=2 VALIGN=top>:tech_spc[2]: </td>\ <td VALIGN=top>:b3_div[2]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_grp[2]:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><b>8. Logistics Section</b><br></td>\ <td VALIGN=top>:b3_div[3]:<br></td>\ <td COLSPAN=2 VALIGN=top>:b3_grp[3]:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=3 VALIGN=top>:logistics_chief:<br></td>\ <td COLSPAN=3 VALIGN=top><b>d. Air Operations Branch</b><br></td>\ </tr>\ <tr>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=3 VALIGN=top>:logistics_deputy:<br></td>\ <td VALIGN=top>Air Operations Br. Dir.<br></td>\ <td COLSPAN=2 VALIGN=top>:air_ops_br_dir:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><b>a. Support Branch</b><br></td>\ <td VALIGN=top>Air Tactical Group Sup.<br></td>\ <td COLSPAN=2 VALIGN=top>:air_tactical_group_sup:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Director<br></td>\ <td COLSPAN=3 VALIGN=top>:support_director:<br></td>\ <td VALIGN=top>Air Support Group Sup.<br></td>\ <td COLSPAN=2 VALIGN=top>:air_support_group_sup:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Supply Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:supply_unit:<br></td>\ <td VALIGN=top>Helicopter Coordinator<br></td>\ <td COLSPAN=2 VALIGN=top>:helicopter_coordinator:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Facilities Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:facilities_unit:<br></td>\ <td VALIGN=top>Air Tanker / Fixed Wing Crd.<br></td>\ <td COLSPAN=2 VALIGN=top>:air_tanker_fixed_wing:<br>\ </td>\ </tr>\ <tr>\ <td VALIGN=top>Ground Support Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:ground_support:<br></td>\ <td COLSPAN=3 VALIGN=top><br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><b>b. Service Branch</b><br></td>\ <td COLSPAN=3 VALIGN=top><b>10. Finance / Administration Section</b><br></td>\ </tr>\ <tr>\ <td VALIGN=top>Director<br>\ </td>\ <td COLSPAN=3 VALIGN=top>:service_director:<br></td>\ <td VALIGN=top>Chief<br></td>\ <td COLSPAN=2 VALIGN=top>:finance_chief:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Communications Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:communications_unit:<br></td>\ <td VALIGN=top>Deputy<br></td>\ <td COLSPAN=2 VALIGN=top>:finance_deputy:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Medical Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:medical_unit:<br></td>\ <td VALIGN=top>Time Unit<br></td>\ <td COLSPAN=2 VALIGN=top>:time_unit:<br></td>\ </tr>\ <tr>\ <td VALIGN=top>Food Unit<br></td>\ <td COLSPAN=3 VALIGN=top>:food_unit:<br></td>\ <td VALIGN=top>Procurement Unit<br></td>\ <td COLSPAN=2 VALIGN=top>:procurement_unit:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><br></td>\ <td VALIGN=top>Compensation/Claims Unit<br></td>\ <td COLSPAN=2 VALIGN=top>:claims_unit:<br></td>\ </tr>\ <tr>\ <td COLSPAN=4 VALIGN=top><br></td>\ <td VALIGN=top>Cost Unit<br></td>\ <td COLSPAN=2 VALIGN=top>:cost_unit:<br></td>\ </tr>\ <tr>\ <td COLSPAN=7 VALIGN=top><b>Prepared by (Resources Unit)</b><br>:pre:<br></td>\ </tr>\ <tr>\ <td WIDTH=15% VALIGN=center HEIGHT=20px>ICS-203</td>\ <td WIDTH=10%></td>\ <td WIDTH=12%></td>\ <td WIDTH=13%></td>\ <td WIDTH=20%></td>\ <td WIDTH=15%></td>\ <td WIDTH=15%></td>\ </tr>\ </tbody>\ </table>\ </body></html>"; const char ics203_text_template[] = "ICS 203 ORGANIZATION ASSIGNMENT LIST\n\n\ incident: :inc:\n\ date: :dat:\n\ time: :tim:\n\ op_period: :opp:\n\ incident_commander: :icc:\n\ incident_deputy: :icd:\n\ incident_safety_officer: :ics:\n\ incident_info_officer: :ici:\n\ liaison_officer: :icl:\n\ prepared_by: :pre:\n\ agency: :agency[0]:, name: :agency_name[0]:\n\ agency: :agency[1]:, name: :agency_name[1]:\n\ agency: :agency[2]:, name: :agency_name[2]:\n\ agency: :agency[3]:, name: :agency_name[3]:\n\ agency: :agency[4]:, name: :agency_name[4]:\n\ agency: :agency[5]:, name: :agency_name[5]:\n\ agency: :agency[6]:, name: :agency_name[6]:\n\ planning_chief: :planning_chief:\n\ planning_deputy: :planning_deputy:\n\ resources_unit: :resources_unit:\n\ situation_unit: :situation_unit:\n\ documentation_unit: :documentation_unit:\n\ demobilization_unit: :demobilization_unit:\n\ tech_spc: :tech_spc[0]:\n\ tech_spc: :tech_spc[1]:\n\ tech_spc: :tech_spc[2]:\n\ logistics_chief: :logistics_chief:\n\ logistics_deputy: :logistics_deputy:\n\ support_director: :support_director:\n\ supply_unit: :supply_unit:\n\ facilities_unit: :facilities_unit:\n\ ground_support: :ground_support:\n\ service_director: :service_director:\n\ communications_unit: :communications_unit:\n\ medical_unit: :medical_unit:\n\ food_unit: :food_unit:\n\ ops_chief: :ops_chief:\n\ ops_deputy: :ops_deputy:\n\ b1_director: :b1_director:\n\ b1_deputy: :b1_deputy:\n\ b1_div/grp: :b1_div[0]:, :b1_grp[0]:\n\ b1_div/grp: :b1_div[1]:, :b1_grp[1]:\n\ b1_div/grp: :b1_div[2]:, :b1_grp[2]:\n\ b1_div/grp: :b1_div[3]:, :b1_grp[3]:\n\ b1_div/grp: :b1_div[4]:, :b1_grp[4]:\n\ b2_director: :b2_director:\n\ b2_deputy: :b2_deputy:\n\ b2_div/grp: :b2_div[0]:, :b2_grp[0]:\n\ b2_div/grp: :b2_div[1]:, :b2_grp[1]:\n\ b2_div/grp: :b2_div[2]:, :b2_grp[2]:\n\ b2_div/grp: :b2_div[3]:, :b2_grp[3]:\n\ b2_div/grp: :b2_div[4]:, :b2_grp[4]:\n\ b3_director: :b3_director:\n\ b3_deputy: :b3_deputy:\n\ b3_div/grp: :b3_div[0]:, :b3_grp[0]:\n\ b3_div/grp: :b3_div[1]:, :b3_grp[1]:\n\ b3_div/grp: :b3_div[2]:, :b3_grp[2]:\n\ b3_div/grp: :b3_div[3]:, :b3_grp[3]:\n\ b3_div/grp: :b3_div[4]:, :b3_grp[4]:\n\ air_ops_br_dir: :air_ops_br_dir:\n\ air_tactical_group_sup: :air_tactical_group_sup:\n\ air_support_group_sup: :air_support_group_sup:\n\ helicopter_coordinator: :helicopter_coordinator:\n\ air_tanker_fixed_wing: :air_tanker_fixed_wing:\n\ finance_chief: :finance_chief:\n\ finance_deputy: :finance_deputy:\n\ time_unit: :time_unit:\n\ procurement_unit: :procurement_unit:\n\ claims_unit: :claims_unit:\n\ cost_unit: :cost_unit:\n\ "; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics309_tab.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000032622�12330516146�013564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_ics309 = (Fl_Group *)0; Fl_Tabs *tab_ics309_type = (Fl_Tabs *)0; Fl_Group *tab_309_1 = (Fl_Group *)0; Fl_Input2 *txt_309_incident = (Fl_Input2 *)0; Fl_Input2 *txt_309_date_fm = (Fl_Input2 *)0; Fl_Button *btn_309_date_fm = (Fl_Button *)0; Fl_Input2 *txt_309_date_to = (Fl_Input2 *)0; Fl_Button *btn_309_date_to = (Fl_Button *)0; Fl_Input2 *txt_309_time_fm = (Fl_Input2 *)0; Fl_Button *btn_309_time_fm = (Fl_Button *)0; Fl_Input2 *txt_309_time_to = (Fl_Input2 *)0; Fl_Button *btn_309_time_to = (Fl_Button *)0; Fl_Input2 *txt_309_prepared_by = (Fl_Input2 *)0; Fl_Input2 *txt_309_radio_net = (Fl_Input2 *)0; Fl_Input2 *txt_309_radio_operator = (Fl_Input2 *)0; Fl_Input2 *txt_309_preparer_date_time = (Fl_Input2 *)0; Fl_Button *btn_309_date_time = (Fl_Button *)0; Fl_Button *btn_309_export_csv = (Fl_Button *)0; Fl_Group *tab_309_2 = (Fl_Group *)0; Fl_Input2 *txt_309_comm_time[34] = {(Fl_Input2 *)0}; Fl_Button *btn_309_comm_time[34] = {(Fl_Button *)0}; Fl_Input2 *txt_309_comm_from[34] = {(Fl_Input2 *)0}; Fl_Input2 *txt_309_comm_to[34] = {(Fl_Input2 *)0}; Fl_Input2 *txt_309_comm_msg[34] = {(Fl_Input2 *)0}; int bptr[34] = {\ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, \ 10,11,12,13,14,15,16,17,18,19, \ 20,21,22,23,24,25,26,27,28,29, \ 30,31,32,33 }; void cb_309_comm_time_changed(Fl_Widget *w, void *d) { int p = *(int *)d; txt_309_comm_time[p]->value(szTime()); ics_changed(txt_309_comm_time[p], d); } void create_ics309_tab() { int Y = tab_top; tab_ics309 = new Fl_Group(0, Y, 570, 390); tab_ics309->align(FL_ALIGN_TOP); tab_ics309_type = new Fl_Tabs(0, Y+2, 570, 387); tab_ics309_type->selection_color((Fl_Color)246); tab_309_1 = new Fl_Group(0, Y+25, 570, 360, _("Incident")); { Fl_Group* o = new Fl_Group(2, Y+34, 566, 146); o->box(FL_ENGRAVED_FRAME); o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_309_incident = new Fl_Input2(135, Y+40, 425, 24, _("Incident Name")); txt_309_incident->tooltip(_("Incident name")); txt_309_incident->box(FL_DOWN_BOX); txt_309_incident->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_incident->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_incident->labeltype(FL_NORMAL_LABEL); txt_309_incident->labelfont(0); txt_309_incident->labelsize(14); txt_309_incident->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_incident->align(FL_ALIGN_LEFT); txt_309_incident->callback(ics_changed); txt_309_incident->when(FL_WHEN_CHANGED); txt_309_radio_operator = new Fl_Input2(135, Y+67, 425, 24, _("Radio Operator")); txt_309_radio_operator->tooltip(_("Radio Operator, Name / Callsign")); txt_309_radio_operator->box(FL_DOWN_BOX); txt_309_radio_operator->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_radio_operator->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_radio_operator->labeltype(FL_NORMAL_LABEL); txt_309_radio_operator->labelfont(0); txt_309_radio_operator->labelsize(14); txt_309_radio_operator->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_radio_operator->align(FL_ALIGN_LEFT); txt_309_radio_operator->callback(ics_changed); txt_309_radio_operator->when(FL_WHEN_CHANGED); txt_309_date_fm = new Fl_Input2(135, Y+93, 155, 24, _("From: date")); txt_309_date_fm->tooltip(_("Starting date")); txt_309_date_fm->box(FL_DOWN_BOX); txt_309_date_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_date_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_date_fm->labeltype(FL_NORMAL_LABEL); txt_309_date_fm->labelfont(0); txt_309_date_fm->labelsize(14); txt_309_date_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_date_fm->align(FL_ALIGN_LEFT); txt_309_date_fm->callback(ics_changed); txt_309_date_fm->when(FL_WHEN_CHANGED); btn_309_date_fm = new Fl_Button(292, Y+95, 20, 20, _("...")); btn_309_date_fm->tooltip(_("Set today")); btn_309_date_fm->callback((Fl_Callback*)cb_309_set_date_fm); txt_309_time_fm = new Fl_Input2(358, Y+93, 80, 24, _("time")); txt_309_time_fm->tooltip(_("Starting time")); txt_309_time_fm->box(FL_DOWN_BOX); txt_309_time_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_time_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_time_fm->labeltype(FL_NORMAL_LABEL); txt_309_time_fm->labelfont(0); txt_309_time_fm->labelsize(14); txt_309_time_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_time_fm->align(FL_ALIGN_LEFT); txt_309_time_fm->callback(ics_changed); txt_309_time_fm->when(FL_WHEN_CHANGED); btn_309_time_fm = new Fl_Button(444, Y+95, 20, 20, _("...")); btn_309_time_fm->tooltip(_("Set time now")); btn_309_time_fm->callback((Fl_Callback*)cb_309_set_time_fm); txt_309_date_to = new Fl_Input2(135, Y+119, 155, 24, _("To: date")); txt_309_date_to->tooltip(_("Ending date")); txt_309_date_to->box(FL_DOWN_BOX); txt_309_date_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_date_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_date_to->labeltype(FL_NORMAL_LABEL); txt_309_date_to->labelfont(0); txt_309_date_to->labelsize(14); txt_309_date_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_date_to->align(FL_ALIGN_LEFT); txt_309_date_to->callback(ics_changed); txt_309_date_to->when(FL_WHEN_CHANGED); btn_309_date_to = new Fl_Button(292, Y+121, 20, 20, _("...")); btn_309_date_to->tooltip(_("Set today")); btn_309_date_to->callback((Fl_Callback*)cb_309_set_date_to); txt_309_time_to = new Fl_Input2(358, Y+119, 80, 24, _("time")); txt_309_time_to->tooltip(_("Ending time")); txt_309_time_to->box(FL_DOWN_BOX); txt_309_time_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_time_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_time_to->labeltype(FL_NORMAL_LABEL); txt_309_time_to->labelfont(0); txt_309_time_to->labelsize(14); txt_309_time_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_time_to->align(FL_ALIGN_LEFT); txt_309_time_to->callback(ics_changed); txt_309_time_to->when(FL_WHEN_CHANGED); btn_309_time_to = new Fl_Button(444, Y+121, 20, 20, _("...")); btn_309_time_to->tooltip(_("Set time now")); btn_309_time_to->callback((Fl_Callback*)cb_309_set_time_to); txt_309_radio_net = new Fl_Input2(135, Y+145, 425, 24, _("Net")); txt_309_radio_net->tooltip(_("Radio Net Name or Position/Tactical Call")); txt_309_radio_net->box(FL_DOWN_BOX); txt_309_radio_net->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_radio_net->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_radio_net->labeltype(FL_NORMAL_LABEL); txt_309_radio_net->labelfont(0); txt_309_radio_net->labelsize(14); txt_309_radio_net->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_radio_net->align(FL_ALIGN_LEFT); txt_309_radio_net->callback(ics_changed); txt_309_radio_net->when(FL_WHEN_CHANGED); o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(2, Y+220, 566, 62); o->box(FL_ENGRAVED_FRAME); txt_309_prepared_by = new Fl_Input2(135, Y+226, 425, 24, _("Prepared by")); txt_309_prepared_by->tooltip(_("Name of preparer")); txt_309_prepared_by->box(FL_DOWN_BOX); txt_309_prepared_by->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_prepared_by->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_prepared_by->labeltype(FL_NORMAL_LABEL); txt_309_prepared_by->labelfont(0); txt_309_prepared_by->labelsize(14); txt_309_prepared_by->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_prepared_by->align(FL_ALIGN_LEFT); txt_309_prepared_by->callback(ics_changed); txt_309_prepared_by->when(FL_WHEN_CHANGED); txt_309_preparer_date_time = new Fl_Input2(135, Y+252, 250, 24, _("Date/Time")); txt_309_preparer_date_time->tooltip(_("Date / Time")); txt_309_preparer_date_time->box(FL_DOWN_BOX); txt_309_preparer_date_time->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_preparer_date_time->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_preparer_date_time->labeltype(FL_NORMAL_LABEL); txt_309_preparer_date_time->labelfont(0); txt_309_preparer_date_time->labelsize(14); txt_309_preparer_date_time->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_preparer_date_time->align(FL_ALIGN_LEFT); txt_309_preparer_date_time->callback(ics_changed); txt_309_preparer_date_time->when(FL_WHEN_CHANGED); btn_309_date_time = new Fl_Button(390, Y+254, 20, 20, _("...")); btn_309_date_time->tooltip(_("Set today / now")); btn_309_date_time->callback((Fl_Callback*)cb_309_set_date_time); o->end(); btn_309_export_csv = new Fl_Button(450, Y+340, 100, 24, _("Export CSV")); btn_309_export_csv->tooltip(_("Export Incident data to a CSV file")); btn_309_export_csv->callback((Fl_Callback*)ics309_csv); } // Fl_Group* o tab_309_1->end(); tab_309_2 = new Fl_Group(0, Y+25, 570, 360, _("Communications Log")); tab_309_2->hide(); { Fl_Box* o = new Fl_Box(5, Y+30, 70, 20, _("Time")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(75, Y+30, 95, 20, _("From")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(170, Y+30, 95, 20, _("To")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Box* o = new Fl_Box(265, Y+30, 284, 20, _("Message")); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); } // Fl_Box* o { Fl_Scroll* o = new Fl_Scroll(2, Y+52, 566, 334); o->type(3); o->box(FL_DOWN_BOX); o->color((Fl_Color)215); for (int i = 0; i < 34; i++) { txt_309_comm_time[i] = new Fl_Input2(5, Y+52 + i*22, 50, 22); txt_309_comm_time[i]->tooltip(_("")); txt_309_comm_time[i]->box(FL_DOWN_BOX); txt_309_comm_time[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_comm_time[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_comm_time[i]->labeltype(FL_NORMAL_LABEL); txt_309_comm_time[i]->labelfont(0); txt_309_comm_time[i]->labelsize(14); txt_309_comm_time[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_comm_time[i]->align(FL_ALIGN_CENTER); txt_309_comm_time[i]->callback(ics_changed); txt_309_comm_time[i]->when(FL_WHEN_CHANGED); btn_309_comm_time[i] = new Fl_Button(55, Y+52 + i*22, 20, 20, _("..")); btn_309_comm_time[i]->tooltip(_("Set time now")); btn_309_comm_time[i]->callback(cb_309_comm_time_changed, (void *)&bptr[i]); txt_309_comm_from[i] = new Fl_Input2(75, Y+52 + i*22, 95, 22, ""); txt_309_comm_from[i]->tooltip(_("")); txt_309_comm_from[i]->box(FL_DOWN_BOX); txt_309_comm_from[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_comm_from[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_comm_from[i]->labeltype(FL_NORMAL_LABEL); txt_309_comm_from[i]->labelfont(0); txt_309_comm_from[i]->labelsize(14); txt_309_comm_from[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_comm_from[i]->align(FL_ALIGN_CENTER); txt_309_comm_from[i]->callback(ics_changed); txt_309_comm_from[i]->when(FL_WHEN_CHANGED); txt_309_comm_to[i] = new Fl_Input2(170, Y+52 + i*22, 95, 22); txt_309_comm_to[i]->tooltip(_("")); txt_309_comm_to[i]->box(FL_DOWN_BOX); txt_309_comm_to[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_comm_to[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_comm_to[i]->labeltype(FL_NORMAL_LABEL); txt_309_comm_to[i]->labelfont(0); txt_309_comm_to[i]->labelsize(14); txt_309_comm_to[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_comm_to[i]->align(FL_ALIGN_CENTER); txt_309_comm_to[i]->callback(ics_changed); txt_309_comm_to[i]->when(FL_WHEN_CHANGED); txt_309_comm_msg[i] = new Fl_Input2(265, Y+52 + i*22, 285, 22); txt_309_comm_msg[i]->tooltip(_("")); txt_309_comm_msg[i]->box(FL_DOWN_BOX); txt_309_comm_msg[i]->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_309_comm_msg[i]->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_309_comm_msg[i]->labeltype(FL_NORMAL_LABEL); txt_309_comm_msg[i]->labelfont(0); txt_309_comm_msg[i]->labelsize(14); txt_309_comm_msg[i]->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_309_comm_msg[i]->align(FL_ALIGN_CENTER); txt_309_comm_msg[i]->callback(ics_changed); txt_309_comm_msg[i]->when(FL_WHEN_CHANGED); } o->end(); } // Fl_Scroll* o tab_309_2->end(); tab_ics309_type->end(); Fl_Group::current()->resizable(tab_ics309_type); tab_ics309->end(); tab_ics309->hide(); } ��������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics206.cxx���������������������������������������������������������������������0000664�0001750�0001750�00000072641�12330516146�012737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // ics206 fields // compatibility fields required to read older data files string aics206_name = "<nam:"; string aics206_period = "<opp:"; string aics206_date_prepared = "<dat:"; string aics206_time_prepared = "<tim:"; string aics206_procedure = "<proc:"; string aics206_preparer = "<prep:"; string aics206_reviewer = "<rvwr:"; string aics206_medaid_sta = "<msta0:"; // array of 5 string aics206_medaid_loc = "<mloc0:"; // ... string aics206_medaid_paramedics = "<mpar0:"; // bool string aics206_transport_name = "<tname0:"; // array of 5 string aics206_transport_address = "<taddr0:"; // ... string aics206_transport_phone = "<tphon0:"; string aics206_transport_paramedics = "<tpara0:"; // bool string aics206_ambulance_name = "<aname0:"; // array of 5 string aics206_ambulance_loc = "<aloca0:"; // ... string aics206_ambulance_paramedics = "<apara0:"; // bool string aics206_hosp_name = "<hname0:"; // array of 5 string aics206_hosp_address = "<haddr0:"; // ... string aics206_hosp_phone = "<hphon0:"; string aics206_hosp_airtime = "<hatim0:"; string aics206_hosp_gndtime = "<hgtim0:"; string aics206_hosp_helipad = "<hheli0:"; // bool (5) string aics206_hosp_burn_center = "<hburn0:"; // ... string ics206_name = ":nam:"; string ics206_period = ":opp:"; string ics206_date_prepared = ":dat:"; string ics206_time_prepared = ":tim:"; string ics206_procedure = ":proc:"; string ics206_preparer = ":prep:"; string ics206_reviewer = ":rvwr:"; string ics206_medaid_sta = ":msta0:"; // array of 5 string ics206_medaid_loc = ":mloc0:"; // ... string ics206_medaid_paramedics = ":mpar0:"; // bool string ics206_transport_name = ":tname0:"; // array of 5 string ics206_transport_address = ":taddr0:"; // ... string ics206_transport_phone = ":tphon0:"; string ics206_transport_paramedics = ":tpara0:"; // bool string ics206_ambulance_name = ":aname0:"; // array of 5 string ics206_ambulance_loc = ":aloca0:"; // ... string ics206_ambulance_paramedics = ":apara0:"; // bool string ics206_hosp_name = ":hname0:"; // array of 5 string ics206_hosp_address = ":haddr0:"; // ... string ics206_hosp_phone = ":hphon0:"; string ics206_hosp_airtime = ":hatim0:"; string ics206_hosp_gndtime = ":hgtim0:"; string ics206_hosp_helipad = ":hheli0:"; // bool (5) string ics206_hosp_burn_center = ":hburn0:"; // ... string s206_name; string s206_period; string s206_date_prepared; string s206_time_prepared; string s206_procedure; string s206_preparer; string s206_reviewer; string s206_medaid_sta[5]; string s206_medaid_loc[5]; bool b206_medaid_paramedics[5]; string s206_transport_name[5]; string s206_transport_address[5]; string s206_transport_phone[5]; bool b206_transport_paramedics[5]; string s206_ambulance_name[5]; string s206_ambulance_loc[5]; bool b206_ambulance_paramedics[5]; string s206_hosp_name[5]; string s206_hosp_address[5]; string s206_hosp_phone[5]; string s206_hosp_airtime[5]; string s206_hosp_gndtime[5]; bool b206_hosp_helipad[5]; bool b206_hosp_burn_center[5]; string buff206; string def_206_filename = ""; string base_206_filename = ""; string def_206_TemplateName = ""; bool using_ics206_template = false; void cb_206_setdate() { txt_206_date_prepared->value(szDate()); } void cb_206_settime() { txt_206_time_prepared->value(szTime()); } void clear_206fields() { s206_name.clear(); s206_period.clear(); s206_date_prepared.clear(); s206_time_prepared.clear(); s206_procedure.clear(); s206_preparer.clear(); s206_reviewer.clear(); for (int i = 0; i < 5; i++) { s206_medaid_sta[i].clear(); s206_medaid_loc[i].clear(); s206_transport_name[i].clear(); s206_transport_address[i].clear(); s206_transport_phone[i].clear(); s206_ambulance_name[i].clear(); s206_ambulance_loc[i].clear(); s206_hosp_name[i].clear(); s206_hosp_address[i].clear(); s206_hosp_phone[i].clear(); s206_hosp_airtime[i].clear(); s206_hosp_gndtime[i].clear(); b206_medaid_paramedics[i] = false; b206_transport_paramedics[i] = false; b206_ambulance_paramedics[i] = false; b206_hosp_helipad[i] = false; b206_hosp_burn_center[i] = false; } } bool check_206fields() { if (s206_name != txt_206_name->value()) return true; if (s206_period != txt_206_op_period->value()) return true; if (s206_date_prepared != txt_206_date_prepared->value()) return true; if (s206_time_prepared != txt_206_time_prepared->value()) return true; if (s206_procedure != txt_206_procedure->buffer()->text()) return true; if (s206_preparer != txt_206_preparer->value()) return true; if (s206_reviewer != txt_206_reviewer->value()) return true; for (int i = 0; i < 5; i++) { if (s206_medaid_sta[i] != txt_206_medaid_sta[i]->value()) return true; if (s206_medaid_loc[i] != txt_206_medaid_loc[i]->value()) return true; if (s206_transport_name[i] != txt_206_transport_name[i]->value()) return true; if (s206_transport_address[i] != txt_206_transport_address[i]->value()) return true; if (s206_transport_phone[i] != txt_206_transport_phone[i]->value()) return true; if (s206_ambulance_name[i] != txt_206_ambulance_name[i]->value()) return true; if (s206_ambulance_loc[i] != txt_206_ambulance_loc[i]->value()) return true; if (s206_hosp_name[i] != txt_206_hosp_name[i]->value()) return true; if (s206_hosp_address[i] != txt_206_hosp_address[i]->value()) return true; if (s206_hosp_phone[i] != txt_206_hosp_phone[i]->value()) return true; if (s206_hosp_airtime[i] != txt_206_hosp_airtime[i]->value()) return true; if (s206_hosp_gndtime[i] != txt_206_hosp_gndtime[i]->value()) return true; if (b206_medaid_paramedics[i] != btn_206_medaid_paramedics[i]->value()) return true; if (b206_transport_paramedics[i] != btn_206_transport_paramedics[i]->value()) return true; if (b206_ambulance_paramedics[i] != btn_206_ambulance_paramedics[i]->value()) return true; if (b206_hosp_helipad[i] != btn_206_hosp_helipad[i]->value()) return true; if (b206_hosp_burn_center[i] != btn_206_hosp_burn_center[i]->value()) return true; } return false; } void update_206fields() { s206_name = txt_206_name->value(); s206_period = txt_206_op_period->value(); s206_date_prepared = txt_206_date_prepared->value(); s206_time_prepared = txt_206_time_prepared->value(); s206_procedure = txt_206_procedure->buffer()->text(); s206_preparer = txt_206_preparer->value(); s206_reviewer = txt_206_reviewer->value(); for (int i = 0; i < 5; i++) { s206_medaid_sta[i] = txt_206_medaid_sta[i]->value(); s206_medaid_loc[i] = txt_206_medaid_loc[i]->value(); s206_transport_name[i] = txt_206_transport_name[i]->value(); s206_transport_address[i] = txt_206_transport_address[i]->value(); s206_transport_phone[i] = txt_206_transport_phone[i]->value(); s206_ambulance_name[i] = txt_206_ambulance_name[i]->value(); s206_ambulance_loc[i] = txt_206_ambulance_loc[i]->value(); s206_hosp_name[i] = txt_206_hosp_name[i]->value(); s206_hosp_address[i] = txt_206_hosp_address[i]->value(); s206_hosp_phone[i] = txt_206_hosp_phone[i]->value(); s206_hosp_airtime[i] = txt_206_hosp_airtime[i]->value(); s206_hosp_gndtime[i] = txt_206_hosp_gndtime[i]->value(); b206_medaid_paramedics[i] = btn_206_medaid_paramedics[i]->value(); b206_transport_paramedics[i] = btn_206_transport_paramedics[i]->value(); b206_ambulance_paramedics[i] = btn_206_ambulance_paramedics[i]->value(); b206_hosp_helipad[i] = btn_206_hosp_helipad[i]->value(); b206_hosp_burn_center[i] = btn_206_hosp_burn_center[i]->value(); } } void update_206form() { txt_206_name->value(s206_name.c_str()); txt_206_op_period->value(s206_period.c_str()); txt_206_date_prepared->value(s206_date_prepared.c_str()); txt_206_time_prepared->value(s206_time_prepared.c_str()); txt_206_procedure->addstr(s206_procedure.c_str()); txt_206_preparer->value(s206_preparer.c_str()); txt_206_reviewer->value(s206_reviewer.c_str()); for (int i = 0; i < 5; i++) { txt_206_medaid_sta[i]->value(s206_medaid_sta[i].c_str()); txt_206_medaid_loc[i]->value(s206_medaid_loc[i].c_str()); txt_206_transport_name[i]->value(s206_transport_name[i].c_str()); txt_206_transport_address[i]->value(s206_transport_address[i].c_str()); txt_206_transport_phone[i]->value(s206_transport_phone[i].c_str()); txt_206_ambulance_name[i]->value(s206_ambulance_name[i].c_str()); txt_206_ambulance_loc[i]->value(s206_ambulance_loc[i].c_str()); txt_206_hosp_name[i]->value(s206_hosp_name[i].c_str()); txt_206_hosp_address[i]->value(s206_hosp_address[i].c_str()); txt_206_hosp_phone[i]->value(s206_hosp_phone[i].c_str()); txt_206_hosp_airtime[i]->value(s206_hosp_airtime[i].c_str()); txt_206_hosp_gndtime[i]->value(s206_hosp_gndtime[i].c_str()); btn_206_medaid_paramedics[i]->value(b206_medaid_paramedics[i]); btn_206_transport_paramedics[i]->value(b206_transport_paramedics[i]); btn_206_ambulance_paramedics[i]->value(b206_ambulance_paramedics[i]); btn_206_hosp_helipad[i]->value(b206_hosp_helipad[i]); btn_206_hosp_burn_center[i]->value(b206_hosp_burn_center[i]); } } void clear_206_form() { clear_206fields(); txt_206_name->value(""); txt_206_op_period->value(""); txt_206_date_prepared->value(""); txt_206_time_prepared->value(""); txt_206_procedure->clear(); txt_206_preparer->value(""); txt_206_reviewer->value(""); for (int i = 0; i < 5; i++) { txt_206_medaid_sta[i]->value(""); txt_206_medaid_loc[i]->value(""); txt_206_transport_name[i]->value(""); txt_206_transport_address[i]->value(""); txt_206_transport_phone[i]->value(""); txt_206_ambulance_name[i]->value(""); txt_206_ambulance_loc[i]->value(""); txt_206_hosp_name[i]->value(""); txt_206_hosp_address[i]->value(""); txt_206_hosp_phone[i]->value(""); txt_206_hosp_airtime[i]->value(""); txt_206_hosp_gndtime[i]->value(""); btn_206_medaid_paramedics[i]->value(false); btn_206_transport_paramedics[i]->value(false); btn_206_ambulance_paramedics[i]->value(false); btn_206_hosp_helipad[i]->value(false); btn_206_hosp_burn_center[i]->value(false); } } void make_buff206(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics206_name, s206_name ) ); mbuff.append( lineout( ics206_period, s206_period ) ); mbuff.append( lineout( ics206_date_prepared, s206_date_prepared ) ); mbuff.append( lineout( ics206_time_prepared, s206_time_prepared ) ); mbuff.append( lineout( ics206_procedure, s206_procedure ) ); mbuff.append( lineout( ics206_preparer, s206_preparer ) ); mbuff.append( lineout( ics206_reviewer, s206_reviewer ) ); for (int i = 0; i < 5; i++) { ics206_medaid_sta[5] = ics206_medaid_loc[5] = ics206_medaid_paramedics[5] = ics206_transport_address[6] = ics206_transport_name[6] = ics206_transport_phone[6] = ics206_transport_paramedics[6] = ics206_ambulance_loc[6] = ics206_ambulance_name[6] = ics206_ambulance_paramedics[6] = ics206_hosp_address[6] = ics206_hosp_name[6] = ics206_hosp_airtime[6] = ics206_hosp_gndtime[6] = ics206_hosp_phone[6] = ics206_hosp_helipad[6] = ics206_hosp_burn_center[6] = '0' + i; mbuff.append( lineout( ics206_medaid_sta, s206_medaid_sta[i] ) ); mbuff.append( lineout( ics206_medaid_loc, s206_medaid_loc[i] ) ); mbuff.append( binout( ics206_medaid_paramedics, b206_medaid_paramedics[i] ) ); mbuff.append( lineout( ics206_transport_address, s206_transport_address[i] ) ); mbuff.append( lineout( ics206_transport_name, s206_transport_name[i] ) ); mbuff.append( lineout( ics206_transport_phone, s206_transport_phone[i] ) ); mbuff.append( binout( ics206_transport_paramedics, b206_transport_paramedics[i] ) ); mbuff.append( lineout( ics206_ambulance_loc, s206_ambulance_loc[i] ) ); mbuff.append( lineout( ics206_ambulance_name, s206_ambulance_name[i] ) ); mbuff.append( binout( ics206_ambulance_paramedics, b206_ambulance_paramedics[i] ) ); mbuff.append( lineout( ics206_hosp_name, s206_hosp_name[i] ) ); mbuff.append( lineout( ics206_hosp_address, s206_hosp_address[i] ) ); mbuff.append( lineout( ics206_hosp_phone, s206_hosp_phone[i] ) ); mbuff.append( lineout( ics206_hosp_airtime, s206_hosp_airtime[i] ) ); mbuff.append( lineout( ics206_hosp_gndtime, s206_hosp_gndtime[i] ) ); mbuff.append( binout( ics206_hosp_helipad, b206_hosp_helipad[i] ) ); mbuff.append( binout( ics206_hosp_burn_center, b206_hosp_burn_center[i] ) ); } if (compress) compress_maybe(mbuff); buff206.append(mbuff); } void read_206_buffer(string data) { clear_206fields(); read_header(data); s206_name = findstr(data, ics206_name); s206_period = findstr(data, ics206_period); s206_date_prepared = findstr(data, ics206_date_prepared); s206_time_prepared = findstr(data, ics206_time_prepared); s206_procedure = findstr(data, ics206_procedure); s206_preparer = findstr(data, ics206_preparer); s206_reviewer = findstr(data, ics206_reviewer); for (int i = 0; i < 5; i++) { ics206_medaid_sta[5] = ics206_medaid_loc[5] = ics206_medaid_paramedics[5] = ics206_transport_address[6] = ics206_transport_name[6] = ics206_transport_phone[6] = ics206_transport_paramedics[6] = ics206_ambulance_loc[6] = ics206_ambulance_name[6] = ics206_ambulance_paramedics[6] = ics206_hosp_address[6] = ics206_hosp_name[6] = ics206_hosp_airtime[6] = ics206_hosp_gndtime[6] = ics206_hosp_phone[6] = ics206_hosp_helipad[6] = ics206_hosp_burn_center[6] = '0' + i; s206_medaid_sta[i] = findstr(data, ics206_medaid_sta); s206_medaid_loc[i] = findstr(data, ics206_medaid_loc); b206_medaid_paramedics[i] = findbin(data, ics206_medaid_paramedics); s206_transport_address[i] = findstr(data, ics206_transport_address); s206_transport_name[i] = findstr(data, ics206_transport_name); s206_transport_phone[i] = findstr(data, ics206_transport_phone); b206_transport_paramedics[i] = findbin(data, ics206_transport_paramedics); s206_ambulance_loc[i] = findstr(data, ics206_ambulance_loc); s206_ambulance_name[i] = findstr(data, ics206_ambulance_name); b206_ambulance_paramedics[i] = findbin(data, ics206_ambulance_paramedics); s206_hosp_name[i] = findstr(data, ics206_hosp_name); s206_hosp_address[i] = findstr(data, ics206_hosp_address); s206_hosp_phone[i] = findstr(data, ics206_hosp_phone); s206_hosp_airtime[i] = findstr(data, ics206_hosp_airtime); s206_hosp_gndtime[i] = findstr(data, ics206_hosp_gndtime); b206_hosp_helipad[i] = findbin(data, ics206_hosp_helipad); b206_hosp_burn_center[i] = findbin(data, ics206_hosp_burn_center); } if (s206_name.empty()) { s206_name = findstr(data, aics206_name); s206_period = findstr(data, aics206_period); s206_date_prepared = findstr(data, aics206_date_prepared); s206_time_prepared = findstr(data, aics206_time_prepared); s206_procedure = findstr(data, aics206_procedure); s206_preparer = findstr(data, aics206_preparer); s206_reviewer = findstr(data, aics206_reviewer); for (int i = 0; i < 5; i++) { aics206_medaid_sta[5] = aics206_medaid_loc[5] = aics206_medaid_paramedics[5] = aics206_transport_address[6] = aics206_transport_name[6] = aics206_transport_phone[6] = aics206_transport_paramedics[6] = aics206_ambulance_loc[6] = aics206_ambulance_name[6] = aics206_ambulance_paramedics[6] = aics206_hosp_address[6] = aics206_hosp_name[6] = aics206_hosp_airtime[6] = aics206_hosp_gndtime[6] = aics206_hosp_phone[6] = aics206_hosp_helipad[6] = aics206_hosp_burn_center[6] = '0' + i; s206_medaid_sta[i] = findstr(data, aics206_medaid_sta); s206_medaid_loc[i] = findstr(data, aics206_medaid_loc); b206_medaid_paramedics[i] = findbin(data, aics206_medaid_paramedics); s206_transport_address[i] = findstr(data, aics206_transport_address); s206_transport_name[i] = findstr(data, aics206_transport_name); s206_transport_phone[i] = findstr(data, aics206_transport_phone); b206_transport_paramedics[i] = findbin(data, aics206_transport_paramedics); s206_ambulance_loc[i] = findstr(data, aics206_ambulance_loc); s206_ambulance_name[i] = findstr(data, aics206_ambulance_name); b206_ambulance_paramedics[i] = findbin(data, aics206_ambulance_paramedics); s206_hosp_name[i] = findstr(data, aics206_hosp_name); s206_hosp_address[i] = findstr(data, aics206_hosp_address); s206_hosp_phone[i] = findstr(data, aics206_hosp_phone); s206_hosp_airtime[i] = findstr(data, aics206_hosp_airtime); s206_hosp_gndtime[i] = findstr(data, aics206_hosp_gndtime); b206_hosp_helipad[i] = findbin(data, aics206_hosp_helipad); b206_hosp_burn_center[i] = findbin(data, aics206_hosp_burn_center); } } update_206form(); } void cb_206_new() { if (check_206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_206_save(); } } clear_206_form(); clear_header(); def_206_filename = ICS_msg_dir; def_206_filename.append("new"F206_EXT); show_filename(def_206_filename); using_ics206_template = false; } void cb_206_import() { fl_alert2("Not implemented"); } void cb_206_export() { fl_alert2("Not implemented"); } void cb_206_wrap_import(string wrapfilename, string inpbuffer) { clear_206_form(); read_206_buffer(inpbuffer); def_206_filename = ICS_msg_dir; def_206_filename.append(wrapfilename); show_filename(def_206_filename); using_ics206_template = false; } int eval_206_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_206_filename).append("]"); update_206fields(); update_header(FROM); evalstr.append(header("<ics206>")); buff206.clear(); make_buff206(true); if (buff206.empty()) return 0; compress_maybe( buff206 ); evalstr.append( buff206 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_206_wrap_export() { if (check_206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_206fields(); if (base_206_filename == "new"F206_EXT || base_206_filename == "default"F206_EXT) if (!cb_206_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_206_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff206.assign(header("<ics206>")); make_buff206(true); export_wrapfile(base_206_filename, wrapfilename, buff206, pext != ".wrap"); buff206.assign(header("<ics206>")); make_buff206(false); write_206(def_206_filename); } } void cb_206_wrap_autosend() { if (check_206fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_206fields(); if (base_206_filename == "new"F206_EXT || base_206_filename == "default"F206_EXT) if (!cb_206_save_as()) return; update_header(FROM); buff206.assign(header("<ics206>")); make_buff206(true); xfr_via_socket(base_206_filename, buff206); buff206.assign(header("<ics206>")); make_buff206(false); write_206(def_206_filename); } void cb_206_load_template() { string def_206_filename = def_206_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T206_EXT, def_206_filename.c_str()); if (p) { clear_206_form(); read_data_file(p); def_206_TemplateName = p; show_filename(def_206_TemplateName); using_ics206_template = true; } } void cb_206_save_template() { if (!using_ics206_template) { cb_206_save_as_template(); return; } string def_206_filename = def_206_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T206_EXT, def_206_filename.c_str()); if (p) { update_header(CHANGED); buff206.assign(header("<ics206>")); make_buff206(); write_206(p); } } void cb_206_save_as_template() { string def_206_filename = def_206_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T206_EXT, def_206_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_206_TemplateName = p; if (strlen(pext) == 0) def_206_TemplateName.append(T206_EXT); remove_spaces_from_filename(def_206_TemplateName);\ clear_header(); update_header(CHANGED); buff206.assign(header("<ics206>")); make_buff206(); write_206(def_206_TemplateName); show_filename(def_206_TemplateName); using_ics206_template = true; } } void cb_206_open() { const char *p = FSEL::select(_("Open data file"), "ICS-206\t*"F206_EXT, def_206_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_206_form(); read_data_file(p); using_ics206_template = false; def_206_filename = p; show_filename(def_206_filename); } void write_206(string s) { FILE *file206 = fopen(s.c_str(), "w"); if (!file206) return; fwrite(buff206.c_str(), buff206.length(), 1, file206); fclose(file206); } bool cb_206_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F206_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_206_filename; p = FSEL::saveas(_("Save data file"), "ICS-206\t*"F206_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_206_filename = p; if (strlen(pext) == 0) def_206_filename.append(F206_EXT); remove_spaces_from_filename(def_206_filename); update_206fields(); update_header(NEW); buff206.assign("<ics206>"); make_buff206(); write_206(def_206_filename); using_ics206_template = false; show_filename(def_206_filename); return true; } void cb_206_save() { if (base_206_filename == "new"F206_EXT || base_206_filename == "default"F206_EXT || using_ics206_template == true) { cb_206_save_as(); return; } if (check_206fields()) update_header(CHANGED); update_206fields(); buff206.assign(header("<ics206>")); make_buff206(); write_206(def_206_filename); using_ics206_template = false; } string yes = "YES"; string no = ""; void cb_206_html() { string fname_name = fl_filename_name(def_206_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics206_fname = ICS_dir; ics206_fname.append(fname_name); ics206_fname.append(".html"); string html_text = ""; update_206fields(); string form206 = ics206_html_template; replacestr(form206, TITLE, fname_name); replacestr(form206, ics206_name, s206_name); replacestr(form206, ics206_period, s206_period); replacestr(form206, ics206_date_prepared, s206_date_prepared); replacestr(form206, ics206_time_prepared, s206_time_prepared); for (int i = 0; i < 5; i++) { ics206_medaid_sta[5] = ics206_medaid_loc[5] = ics206_medaid_paramedics[5] = ics206_transport_address[6] = ics206_transport_name[6] = ics206_transport_phone[6] = ics206_transport_paramedics[6] = ics206_ambulance_loc[6] = ics206_ambulance_name[6] = ics206_ambulance_paramedics[6] = ics206_hosp_address[6] = ics206_hosp_name[6] = ics206_hosp_airtime[6] = ics206_hosp_gndtime[6] = ics206_hosp_phone[6] = ics206_hosp_helipad[6] = ics206_hosp_burn_center[6] = '0' + i; replacestr(form206, ics206_medaid_sta, s206_medaid_sta[i]); replacestr(form206, ics206_medaid_loc, s206_medaid_loc[i]); replacestr(form206, ics206_medaid_paramedics, b206_medaid_paramedics[i] ? yes : no); replacestr(form206, ics206_transport_name, s206_transport_name[i]); replacestr(form206, ics206_transport_address, s206_transport_address[i]); replacestr(form206, ics206_transport_phone, s206_transport_phone[i]); replacestr(form206, ics206_transport_paramedics, b206_transport_paramedics[i] ? yes : no); replacestr(form206, ics206_ambulance_name, s206_ambulance_name[i]); replacestr(form206, ics206_ambulance_loc, s206_ambulance_loc[i]); replacestr(form206, ics206_ambulance_paramedics, b206_ambulance_paramedics[i] ? yes : no); replacestr(form206, ics206_hosp_name, s206_hosp_name[i]); replacestr(form206, ics206_hosp_address, s206_hosp_address[i]); replacestr(form206, ics206_hosp_phone, s206_hosp_phone[i]); replacestr(form206, ics206_hosp_airtime, s206_hosp_airtime[i]); replacestr(form206, ics206_hosp_gndtime, s206_hosp_gndtime[i]); replacestr(form206, ics206_hosp_helipad, b206_hosp_helipad[i] ? yes : no); replacestr(form206, ics206_hosp_burn_center, b206_hosp_burn_center[i] ? yes : no); } string temp = "<pre><big style=\"font-family: monospace;\">"; if (progStatus.autowordwrap) html_text.append(wordwrap(s206_procedure, progStatus.charcount)); else temp.append(s206_procedure); temp.append("</big></pre>"); replacestr(form206, ics206_procedure, temp); replacestr(form206, ics206_preparer, s206_preparer); replacestr(form206, ics206_reviewer, s206_reviewer); FILE *file206 = fopen(ics206_fname.c_str(), "w"); fprintf(file206,"%s", form206.c_str()); fclose(file206); open_url(ics206_fname.c_str()); } void cb_206_msg_type() { if (tabs_msg_type->value() == tab_ics206 ) { tab_ics206_type->value(tab_206_med_plan); show_filename(def_206_filename); } } void cb_206_textout() { string ics206_fname = ICS_dir; ics206_fname.append("ics206.txt"); update_206fields(); string form206 = ics206_text_template; replacestr(form206, ics206_name, s206_name); replacestr(form206, ics206_period, s206_period); replacestr(form206, ics206_date_prepared, s206_date_prepared); replacestr(form206, ics206_time_prepared, s206_time_prepared); for (int i = 0; i < 5; i++) { ics206_medaid_sta[5] = ics206_medaid_loc[5] = ics206_medaid_paramedics[5] = ics206_transport_address[6] = ics206_transport_name[6] = ics206_transport_phone[6] = ics206_transport_paramedics[6] = ics206_ambulance_loc[6] = ics206_ambulance_name[6] = ics206_ambulance_paramedics[6] = ics206_hosp_address[6] = ics206_hosp_name[6] = ics206_hosp_airtime[6] = ics206_hosp_gndtime[6] = ics206_hosp_phone[6] = ics206_hosp_helipad[6] = ics206_hosp_burn_center[6] = '0' + i; replacestr(form206, ics206_medaid_sta, s206_medaid_sta[i]); replacestr(form206, ics206_medaid_loc, s206_medaid_loc[i]); replacestr(form206, ics206_medaid_paramedics, b206_medaid_paramedics[i] ? yes : no); replacestr(form206, ics206_transport_name, s206_transport_name[i]); replacestr(form206, ics206_transport_address, s206_transport_address[i]); replacestr(form206, ics206_transport_phone, s206_transport_phone[i]); replacestr(form206, ics206_transport_paramedics, b206_transport_paramedics[i] ? yes : no); replacestr(form206, ics206_ambulance_name, s206_ambulance_name[i]); replacestr(form206, ics206_ambulance_loc, s206_ambulance_loc[i]); replacestr(form206, ics206_ambulance_paramedics, b206_ambulance_paramedics[i] ? yes : no); replacestr(form206, ics206_hosp_name, s206_hosp_name[i]); replacestr(form206, ics206_hosp_address, s206_hosp_address[i]); replacestr(form206, ics206_hosp_phone, s206_hosp_phone[i]); replacestr(form206, ics206_hosp_airtime, s206_hosp_airtime[i]); replacestr(form206, ics206_hosp_gndtime, s206_hosp_gndtime[i]); replacestr(form206, ics206_hosp_helipad, b206_hosp_helipad[i] ? yes : no); replacestr(form206, ics206_hosp_burn_center, b206_hosp_burn_center[i] ? yes : no); } replacestr(form206, ics206_procedure, s206_procedure); replacestr(form206, ics206_preparer, s206_preparer); replacestr(form206, ics206_reviewer, s206_reviewer); FILE *file206 = fopen(ics206_fname.c_str(), "w"); fprintf(file206,"%s", form206.c_str()); fclose(file206); open_url(ics206_fname.c_str()); } �����������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics213_templates.cxx�����������������������������������������������������������0000664�0001750�0001750�00000007062�12500112204�014770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char ics213_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\n\ <title>:TITLE:</title></head><body>\n\ <table ALIGN=left WIDTH=1000px BORDER=1 CELLPADDING=4 CELLSPACING=0>\n\ <tbody>\n\ <tr ALIGN=center>\n\ <td COLSPAN=3 VALIGN=top BGCOLOR=#EEEEEE><big><b>GENERAL MESSAGE<b></big><br>(ics-213)<br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top WIDTH=100% COLSPAN=3>1.0 Incident (optional): :inc:<br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>2. TO: :to:<br></td>\n\ <td VALIGN=top WIDTH=50% COLSPAN=2>POSITION: :p1:<br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>3. FROM: :fm:<br></td>\n\ <td COLSPAN=2 VALIGN=top>POSITION: :p2:<br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>4. SUBJ: :sb:<br></td>\n\ <td VALIGN=top WIDTH=25%>5. DATE: :d1:<br></td>\n\ <td VALIGN=top>6. TIME: :t1:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=3 VALIGN=top BGCOLOR=#EEEEEE>7. MESSAGE:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=3 VALIGN=top>\n\ <table WIDTH=1000px ALIGN=left BORDER=0 CELLPADDING=0 CELLSPACING=0>\n\ <COL WIDTH 998px>\n\ <COL WIDTH 2px>\n\ <tr>\n\ <td VALIGN=top>:mg:</td>\n\ <td VALIGN=top>\n\ <br><br><br><br><br><br><br><br><br><br>\n\ <br><br><br><br><br><br><br><br><br><br>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>8. SIGNATURE: :s1:<br></td>\n\ <td COLSPAN=2 VALIGN=top>POSITION: :p3:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=3 VALIGN=top BGCOLOR=#EEEEEE>9. REPLY:<br></td>\n\ </tr>\n\ <tr>\n\ <td COLSPAN=3 VALIGN=top>\n\ <table WIDTH=1000px ALIGN=left BORDER=0 CELLPADDING=0 CELLSPACING=0>\n\ <COL WIDTH 998px>\n\ <COL WIDTH 2px>\n\ <tr>\n\ <td VALIGN=top>:rp:</td>\n\ <td VALIGN=top>\n\ <br><br><br><br><br><br><br><br><br><br>\n\ <br><br><br><br><br><br><br><br><br><br>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top COLSPAN=3>\n\ <table ALIGN=left WIDTH=1000px BORDER=0 CELLPADDING=0 CELLSPACING=0>\n\ <tbody>\n\ <tr>\n\ <td VALIGN=top WIDTH =15% HEIGHT=100%>10. Replied by:</td>\n\ <td VALIGN=top WIDTH=25% HEIGHT=100%>DATE:<br>:d2:<br></td>\n\ <td VALIGN=top WIDTH=25% HEIGHT=100%>TIME:<br>:t2:<br></td>\n\ <td VALIGN=top WIDTH=35%>SIGNATURE/POSITION:<br>:s2: / :p4:<br></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ <br>\n\ </body>\n\ </html>"; const char ics213_text_template[] = "ICS 213 GENERAL MESSAGE\n\n\ INC: :inc:\n\ TO: :to:\n\ POSITION: :p1:\n\ FROM: :fm:\n\ POSITION: :p2:\n\ SUBJ: :sb:\n\ DATE: :d1:\n\ TIME: :t1:\n\ MESSAGE:\n\ :mg:\n\ SIGNATURE: :s1:\n\ POSITION: :p3:\n\ REPLY:\n\ :rp:\n\ DATE: :d2:\n\ TIME: :t2:\n\ SIGNATURE: :s2:\n\ POSITION: :p4:\n"; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/ics/ics205a.cxx��������������������������������������������������������������������0000664�0001750�0001750�00000040450�12330516146�013070� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // --------------------------------------------------------------------- // ics 205a field variables and template variables // --------------------------------------------------------------------- string ics205a_incident = ":inc:"; string ics205a_date_fm = ":dfm:"; string ics205a_time_fm = ":tfm:"; string ics205a_date_to = ":dto:"; string ics205a_time_to = ":tto:"; string ics205a_prepared_by = ":pre:"; string ics205a_preparer_position = ":pos:"; string ics205a_preparer_date_time = ":dtm:"; string ics205a_comm_position = ":asg[n]:"; // 32 string ics205a_comm_name = ":nam[n]:"; // 32 string ics205a_comm_info = ":inf[n]:"; // 32 string s205a_incident; string s205a_date_fm; string s205a_time_fm; string s205a_date_to; string s205a_time_to; string s205a_prepared_by; string s205a_preparer_position; string s205a_preparer_date_time; string s205a_comm_position[32]; string s205a_comm_name[32]; string s205a_comm_info[32]; // ===================================================================== string buff205a; string def_205a_filename = ""; string base_205a_filename = ""; string def_205a_TemplateName = ""; bool using_ics205a_template = false; void cb_205a_set_date_fm() { txt_205a_date_fm->value(szDate()); } void cb_205a_set_time_fm() { txt_205a_time_fm->value(szTime()); } void cb_205a_set_date_to() { txt_205a_date_to->value(szDate()); } void cb_205a_set_time_to() { txt_205a_time_to->value(szTime()); } void clear_205afields() { s205a_incident.clear(); s205a_date_fm.clear(); s205a_time_fm.clear(); s205a_date_to.clear(); s205a_time_to.clear(); s205a_prepared_by.clear(); s205a_preparer_position.clear(); s205a_preparer_date_time.clear(); for (int i = 0; i < 32; i++) { s205a_comm_position[i].clear(); s205a_comm_name[i].clear(); s205a_comm_info[i].clear(); } } bool check_205afields() { if (s205a_incident != txt_205a_incident->value()) return true; if (s205a_date_fm != txt_205a_date_fm->value()) return true; if (s205a_time_fm != txt_205a_time_fm->value()) return true; if (s205a_date_to != txt_205a_date_to->value()) return true; if (s205a_time_to != txt_205a_time_to->value()) return true; if (s205a_prepared_by != txt_205a_prepared_by->value()) return true; if (s205a_preparer_position != txt_205a_preparer_position->value()) return true; if (s205a_preparer_date_time != txt_205a_preparer_date_time->value()) return true; for (int i = 0; i < 32; i++) { if (s205a_comm_position[i] != txt_205a_comm_position[i]->value()) return true; if (s205a_comm_name[i] != txt_205a_comm_name[i]->value()) return true; if (s205a_comm_info[i] != txt_205a_comm_info[i]->value()) return true; } return false; } void update_205afields() { s205a_incident = txt_205a_incident->value(); s205a_date_fm = txt_205a_date_fm->value(); s205a_time_fm = txt_205a_time_fm->value(); s205a_date_to = txt_205a_date_to->value(); s205a_time_to = txt_205a_time_to->value(); s205a_prepared_by = txt_205a_prepared_by->value(); s205a_preparer_position = txt_205a_preparer_position->value(); s205a_preparer_date_time = txt_205a_preparer_date_time->value(); for (int i = 0; i < 32; i++) { s205a_comm_position[i] = txt_205a_comm_position[i]->value(); s205a_comm_name[i] = txt_205a_comm_name[i]->value(); s205a_comm_info[i] = txt_205a_comm_info[i]->value(); } } void update_205aform() { txt_205a_incident->value(s205a_incident.c_str()); txt_205a_date_fm->value(s205a_date_fm.c_str()); txt_205a_time_fm->value(s205a_time_fm.c_str()); txt_205a_date_to->value(s205a_date_to.c_str()); txt_205a_time_to->value(s205a_time_to.c_str()); txt_205a_prepared_by->value(s205a_prepared_by.c_str()); txt_205a_preparer_position->value(s205a_preparer_position.c_str()); txt_205a_preparer_date_time->value(s205a_preparer_date_time.c_str()); for (int i = 0; i < 32; i++) { txt_205a_comm_position[i]->value(s205a_comm_position[i].c_str()); txt_205a_comm_name[i]->value(s205a_comm_name[i].c_str()); txt_205a_comm_info[i]->value(s205a_comm_info[i].c_str()); } } void clear_205a_form() { clear_205afields(); update_205aform(); } string &ics205a_nn(string & subst, int n) { static string garbage = "#$^*!"; static string ics; ics.clear(); ics = subst; size_t pos = ics.find("["); if (pos == string::npos) return garbage; pos++; if (n < 10) ics[pos] = '0' + n; else { ics[pos] = n > 29 ? '3' : n > 19 ? '2' : '1'; ics[pos+1] = '0' + n % 10; ics[pos+2] = ']'; ics += ':'; } return ics; } void make_buff205a(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( ics205a_incident, s205a_incident ) ); mbuff.append( lineout( ics205a_date_fm, s205a_date_fm ) ); mbuff.append( lineout( ics205a_time_fm, s205a_time_fm ) ); mbuff.append( lineout( ics205a_date_to, s205a_date_to ) ); mbuff.append( lineout( ics205a_time_to, s205a_time_to ) ); mbuff.append( lineout( ics205a_prepared_by, s205a_prepared_by ) ); mbuff.append( lineout( ics205a_preparer_position, s205a_preparer_position ) ); mbuff.append( lineout( ics205a_preparer_date_time, s205a_preparer_date_time ) ); for (int i = 0; i < 32; i++) { mbuff.append( lineout( ics205a_nn( ics205a_comm_position, i ), s205a_comm_position[i] ) ); mbuff.append( lineout( ics205a_nn( ics205a_comm_name, i ), s205a_comm_name[i] ) ); mbuff.append( lineout( ics205a_nn( ics205a_comm_info, i ), s205a_comm_info[i] ) ); } if (compress) compress_maybe(mbuff); buff205a.append(mbuff); } void read_205a_buffer(string data) { clear_205afields(); read_header(data); s205a_incident = findstr( data, ics205a_incident ); s205a_date_fm = findstr( data, ics205a_date_fm ); s205a_time_fm = findstr( data, ics205a_time_fm ); s205a_date_to = findstr( data, ics205a_date_to ); s205a_time_to = findstr( data, ics205a_time_to ); s205a_prepared_by = findstr( data, ics205a_prepared_by ); s205a_preparer_position = findstr( data, ics205a_preparer_position ); s205a_preparer_date_time = findstr( data, ics205a_preparer_date_time ); for (int i = 0; i < 32; i++) { s205a_comm_position[i] = findstr( data, ics205a_nn( ics205a_comm_position, i ) ); s205a_comm_name[i] = findstr( data, ics205a_nn( ics205a_comm_name, i ) ); s205a_comm_info[i] = findstr( data, ics205a_nn( ics205a_comm_info, i ) ); } update_205aform(); } void cb_205a_new() { if (check_205afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_205a_save(); } } clear_205a_form(); clear_header(); def_205a_filename = ICS_msg_dir; def_205a_filename.append("new"F205A_EXT); show_filename(def_205a_filename); using_ics205a_template = false; } void cb_205a_import() { fl_alert2("Not implemented"); } void cb_205a_export() { fl_alert2("Not implemented"); } void cb_205a_wrap_import(string wrapfilename, string inpbuffer) { clear_205a_form(); read_205a_buffer(inpbuffer); def_205a_filename = ICS_msg_dir; def_205a_filename.append(wrapfilename); show_filename(def_205a_filename); using_ics205a_template = false; } int eval_205a_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_205a_filename).append("]"); update_205afields(); update_header(FROM); evalstr.append(header("<ics205a>")); buff205a.clear(); make_buff205a(true); if (buff205a.empty()) return 0; compress_maybe( buff205a ); evalstr.append( buff205a ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_205a_wrap_export() { if (check_205afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_205afields(); if (base_205a_filename == "new"F205A_EXT || base_205a_filename == "default"F205A_EXT) if (!cb_205a_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_205a_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buff205a.assign(header("<ics205a>")); make_buff205a(true); export_wrapfile(base_205a_filename, wrapfilename, buff205a, pext != ".wrap"); write_205a(def_205a_filename); } } void cb_205a_wrap_autosend() { if (check_205afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_205afields(); if (base_205a_filename == "new"F205A_EXT || base_205a_filename == "default"F205A_EXT) cb_205a_save_as(); update_header(FROM); buff205a.assign(header("<ics205a>")); make_buff205a(true); xfr_via_socket(base_205a_filename, buff205a); write_205a(def_205a_filename); } void cb_205a_load_template() { string def_205a_filename = def_205a_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"T205A_EXT, def_205a_filename.c_str()); if (p) { clear_205a_form(); read_data_file(p); def_205a_TemplateName = p; show_filename(def_205a_TemplateName); using_ics205a_template = true; } } void cb_205a_save_template() { if (!using_ics205a_template) { cb_205a_save_as_template(); return; } string def_205a_filename = def_205a_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"T205A_EXT, def_205a_filename.c_str()); if (p) { clear_header(); make_buff205a(); write_205a(p); } } void cb_205a_save_as_template() { string def_205a_filename = def_205a_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"T205A_EXT, def_205a_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_205a_TemplateName = p; if (strlen(pext) == 0) def_205a_TemplateName.append(T205A_EXT); remove_spaces_from_filename(def_205a_TemplateName); clear_header(); make_buff205a(); write_205a(def_205a_TemplateName); show_filename(def_205a_TemplateName); using_ics205a_template = true; } } void cb_205a_open() { const char *p = FSEL::select(_("Open data file"), "ICS-205a\t*"F205A_EXT, def_205a_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_205a_form(); read_data_file(p); using_ics205a_template = false; def_205a_filename = p; show_filename(def_205a_filename); } void write_205a(string s) { FILE *file205a = fopen(s.c_str(), "w"); if (!file205a) return; fwrite(buff205a.c_str(), buff205a.length(), 1, file205a); fclose(file205a); } bool cb_205a_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(F205A_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_205a_filename; p = FSEL::saveas(_("Save data file"), "ICS-205a\t*"F205A_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_205a_filename = p; if (strlen(pext) == 0) def_205a_filename.append(F205A_EXT); remove_spaces_from_filename(def_205a_filename); update_205afields(); update_header(NEW); buff205a.assign(header("<ics205a>")); make_buff205a(); write_205a(def_205a_filename); using_ics205a_template = false; show_filename(def_205a_filename); return true; } void cb_205a_save() { if (base_205a_filename == "new"F205A_EXT || base_205a_filename == "default"F205A_EXT || using_ics205a_template == true) { cb_205a_save_as(); return; } if (check_205afields()) update_header(CHANGED); update_205afields(); buff205a.assign(header("<ics205a>")); make_buff205a(); write_205a(def_205a_filename); using_ics205a_template = false; } void cb_205a_html() { string fname_name = fl_filename_name(def_205a_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string ics205a_fname = ICS_dir; ics205a_fname.append(fname_name); ics205a_fname.append(".html"); string html_text = ""; string empty = "<br>"; update_205afields(); string form205a = ics205a_html_template; replacestr(form205a, TITLE, fname_name); replacestr(form205a, ics205a_incident, s205a_incident ); replacestr(form205a, ics205a_date_fm, s205a_date_fm ); replacestr(form205a, ics205a_time_fm, s205a_time_fm ); replacestr(form205a, ics205a_date_to, s205a_date_to ); replacestr(form205a, ics205a_time_to, s205a_time_to ); replacestr(form205a, ics205a_prepared_by, s205a_prepared_by ); replacestr(form205a, ics205a_preparer_position, s205a_preparer_position ); replacestr(form205a, ics205a_preparer_date_time, s205a_preparer_date_time ); for (int i = 0; i < 32; i++) { replacestr(form205a, ics205a_nn( ics205a_comm_position, i ), s205a_comm_position[i].empty() ? empty : s205a_comm_position[i] ); replacestr(form205a, ics205a_nn( ics205a_comm_name, i ), s205a_comm_name[i].empty() ? empty : s205a_comm_name[i] ); replacestr(form205a, ics205a_nn( ics205a_comm_info, i ), s205a_comm_info[i].empty() ? empty : s205a_comm_info[i] ); } FILE *file205a = fopen(ics205a_fname.c_str(), "w"); fprintf(file205a,"%s", form205a.c_str()); fclose(file205a); open_url(ics205a_fname.c_str()); } void cb_205a_msg_type() { if (tabs_msg_type->value() == tab_ics205a ) { tab_ics205a_type->value(tab_205a_1); show_filename(def_205a_filename); } } void cb_205a_textout() { string ics205a_fname = ICS_dir; ics205a_fname.append("ics205a.txt"); update_205afields(); string form205a = ics205a_text_template; replacestr(form205a, ics205a_incident, s205a_incident ); replacestr(form205a, ics205a_date_fm, s205a_date_fm ); replacestr(form205a, ics205a_time_fm, s205a_time_fm ); replacestr(form205a, ics205a_date_to, s205a_date_to ); replacestr(form205a, ics205a_time_to, s205a_time_to ); replacestr(form205a, ics205a_prepared_by, s205a_prepared_by ); replacestr(form205a, ics205a_preparer_position, s205a_preparer_position ); replacestr(form205a, ics205a_preparer_date_time, s205a_preparer_date_time ); for (int i = 0; i < 32; i++) { replacestr(form205a, ics205a_nn( ics205a_comm_position, i ), s205a_comm_position[i] ); replacestr(form205a, ics205a_nn( ics205a_comm_name, i ), s205a_comm_name[i] ); replacestr(form205a, ics205a_nn( ics205a_comm_info, i ), s205a_comm_info[i] ); } FILE *file205a = fopen(ics205a_fname.c_str(), "w"); fprintf(file205a,"%s", form205a.c_str()); fclose(file205a); open_url(ics205a_fname.c_str()); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/custom/����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�012024� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/custom/custom.cxx������������������������������������������������������������������0000664�0001750�0001750�00000102723�12462170262�013773� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <string> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include <FL/Fl_Input.H> #include <FL/Fl_Check_Button.H> #include <FL/fl_draw.H> #include <FL/fl_ask.H> #include <FL/Fl_Table_Row.H> #include <FL/Fl_Browser.H> #include <vector> #include "mongoose.h" #include "config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flmsg_config.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #include "icons.h" #include "threads.h" #include "ext_string.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; extern int custom_select; extern struct mg_server *server; static string action_str = "\n<FORM ACTION=\"/handle_post_request\" METHOD=\"post\">\n"; static string submit_str = "\n<INPUT TYPE=\"submit\" VALUE=\"Submit Form\">\n</form>"; static string input_str = "<INPUT"; static string select_str = "<SELECT"; static string end_sel_str = "</SELECT"; static string option_str = "<OPTION"; static string textarea_str = "<TEXTAREA"; static string textend_str = "</TEXTAREA"; static string checked = "CHECKED"; static string checkedeq = "CHECKED=\"CHECKED\""; static string selected = "SELECTED"; static string value_str = "VALUE=\""; static string name_str = "NAME=\""; static string text_type_str = "TYPE=\"TEXT\""; static string radio_type_str = "TYPE=\"RADIO\""; static string checkbox_type_str = "TYPE=\"CHECKBOX\""; static string password_type_str = "TYPE=\"PASSWORD\""; enum {T_TEXT, T_RADIO, T_CHECKBOX, T_AREA, T_SELECT, T_OPTION, T_PASSWORD}; struct INPUT_TYPE { int id; string txt; INPUT_TYPE(int i, string s) { id = i; txt = s; } }; static INPUT_TYPE input_types[] = { INPUT_TYPE(T_TEXT, text_type_str), INPUT_TYPE(T_PASSWORD, password_type_str), INPUT_TYPE(T_AREA, textarea_str), INPUT_TYPE(T_RADIO, radio_type_str), INPUT_TYPE(T_CHECKBOX, checkbox_type_str), INPUT_TYPE(T_SELECT, select_str) // INPUT_TYPE(T_OPTION, option_str) }; struct NAME_VALUE { int id; string name; string value; NAME_VALUE(int ID, string S1, string S2) {id = ID; name = S1; value = S2;} }; std::vector<NAME_VALUE> name_values; string html_form; string edit_txt; void escape(string &s) { size_t p; p = 0; while ((p = s.find("\r", p)) != string::npos) s.erase(p,1); p = 0; while ((p = s.find("\n", p)) != string::npos) { s.replace(p, 1, "\\n"); p += 2; } p = 0; while ((p = s.find("\"", p)) != string::npos) { if (p == 0 || s[p-1] != '\\') { s.replace(p, 1, "\\\""); p += 2; } else p++; } } void unescape(string &s) { size_t p; p = 0; while ((p = s.find("\\n", p)) != string::npos) { s.replace(p,2,"\n"); p++; } p = 0; while ((p = s.find("\\\"", p)) != string::npos) { s.replace(p,2,"\""); p++; } } int convert_case(string &s) { extstring mystring; mystring.assign(s); if (mystring.ufind("<FORM", 0) == string::npos || mystring.ufind("</FORM", 0) == string::npos ) return 1; mystring.ureplace("<FORM"); mystring.ureplace("</FORM"); mystring.ureplace("<INPUT"); mystring.ureplace("<TEXTAREA"); mystring.ureplace("</TEXTAREA"); mystring.ureplace("VALUE=\""); mystring.ureplace("NAME=\""); mystring.ureplace("TYPE=\""); mystring.ureplace("=\"TEXT\""); mystring.ureplace("=\"RADIO\""); mystring.ureplace("=\"CHECKBOX\""); mystring.ureplace("=\"PASSWORD\""); mystring.ureplace("SELECTED"); mystring.ureplace("CHECKED"); mystring.ureplace("<SELECT"); mystring.ureplace("</SELECT"); mystring.ureplace("<OPTION"); s.assign(mystring); return 0; } // this function may be called by the main or the web_server thread // reads the values associated with each form type and // clears the html form of those value. void extract_fields() { //printf("custom select %d\n", custom_select); if (custom_select < 0) return; string fname = CUSTOM_dir; { guard_lock web_lock(&mutex_web_server); fname.append(custom_pairs[custom_select].file_name); edit_txt.assign("CUSTOM_FORM,") .append(custom_pairs[custom_select].file_name) .append("\n"); } FILE *html_file = fopen(fname.c_str(), "r"); char c; html_form.clear(); while ((c = fgetc(html_file)) != EOF) html_form += c; fclose(html_file); if (convert_case(html_form)) { html_form.clear(); custom_select = 0; edit_txt.assign("INVALID HTML FORM DOCUMENT"); return; } size_t ptype, pstart, pend, pname, pvalue, p1, p2, p3; string field_name; string field_value; string val; name_values.clear(); for (size_t i = 0; i < sizeof(input_types) / sizeof(INPUT_TYPE); i++) { ptype = html_form.find(input_types[i].txt); while (ptype != string::npos) { field_name.clear(); field_value.clear(); pstart = html_form.rfind("<", ptype); pend = html_form.find(">", ptype); pname = html_form.find(name_str, pstart); if (pname == string::npos || pname > pend) { ptype = html_form.find(input_types[i].txt, ptype + 1); continue; } pname += name_str.length(); p1 = html_form.find("\"", pname); field_name = html_form.substr(pname, p1 - pname); switch (input_types[i].id) { case T_TEXT: case T_PASSWORD: pvalue = html_form.find(value_str, pstart); if (pvalue == string::npos || pvalue > pend) break; pvalue += value_str.length(); p2 = html_form.find("\"", pvalue); val = html_form.substr(pvalue, p2 - pvalue); p3 = val.find("&quot;"); while (p3 != string::npos) val.replace(p3, 6, "\""); escape(val); field_value = val; break; case T_RADIO: pvalue = html_form.find(value_str, pstart); if (pvalue == string::npos || pvalue > pend) break; pvalue += value_str.length(); p1 = html_form.find("\"", pvalue); if (p1 < pend) { field_name.append(".") .append(html_form.substr(pvalue, p1 - pvalue)); field_value.clear(); p2 = html_form.find(checkedeq, pstart); if (p2 < pend) { field_value = checked; html_form.erase(p2 - 1, checkedeq.length() + 1); pend = html_form.find(">", pstart); } else { p2 = html_form.find(checked, pstart); if (p2 < pend) { field_value = checked; html_form.erase(p2 - 1, checked.length() + 1); pend = html_form.find(">", pstart); } } } break; case T_CHECKBOX: pvalue = html_form.find(value_str, pstart); if (pvalue != string::npos && pvalue < pend) { pvalue += value_str.length(); p1 = html_form.find("\"", pvalue); if (p1 < pend) { field_name.append(".") .append(html_form.substr(pvalue, p1 - pvalue)); } } field_value.clear(); p2 = html_form.find(checkedeq, pstart); if (p2 < pend) { field_value = "ON"; html_form.erase(p2 - 1, checkedeq.length() + 1); pend = html_form.find(">", pstart); } else { p2 = html_form.find(checked, pstart); if (p2 < pend) { field_value = "ON"; html_form.erase(p2 - 1, checked.length() + 1); pend = html_form.find(">", pstart); } else { p2 = html_form.find(" ON", pstart); if (p2 < pend) { field_value = "ON"; html_form.erase(p2, 3); pend = html_form.find(">", pstart); } } } break; case T_AREA: //extract pvalue = pend + 1; p1 = html_form.find(textend_str, pvalue); if (p1 == string::npos) break; if (p1 > pvalue) val = html_form.substr(pvalue, p1 - pvalue); else val.clear(); html_form.erase(pvalue, val.length()); escape(val); field_value.assign(val); break; case T_SELECT: p3 = html_form.find(end_sel_str, pstart); if (p3 == string::npos) break; p2 = html_form.find(selected, pstart); if (p2 != string::npos && p2 < p3) { pvalue = html_form.rfind(value_str, p2); if (pvalue != string::npos) { pvalue += value_str.length(); p1 = html_form.find("\"", pvalue); if (p1 < p2) field_value = html_form.substr(pvalue, p1 - pvalue); } } break; default: break; } edit_txt.append(field_name).append(","); edit_txt.append(field_value).append("\n"); name_values.push_back(NAME_VALUE(input_types[i].id, field_name, field_value)); ptype = html_form.find(input_types[i].txt, ptype+1); } } } void refresh_txt_custom_msg(void *) { txt_custom_msg->clear(); txt_custom_msg->add(edit_txt.c_str()); } // called by web server thread void get_html_vars(struct mg_connection *conn) { static char buff[5000]; memset(buff, 0, sizeof(buff)); size_t p; if (custom_select < 0) return; edit_txt.assign("CUSTOM_FORM,") .append(custom_pairs[custom_select].file_name) .append("\n"); string field, line, val; for (size_t n = 0; n < name_values.size(); n++) name_values[n].value.clear(); for (size_t n = 0; n < name_values.size(); n++) { field = name_values[n].name; if (name_values[n].id == T_CHECKBOX || name_values[n].id == T_RADIO) { if ((p = field.find(".")) != string::npos) field.erase(p); } memset(buff, 0, sizeof(buff)); mg_get_var(conn, field.c_str(), buff, sizeof(buff)); switch (name_values[n].id) { case T_RADIO : p = name_values[n].name.find("."); if (name_values[n].name.substr(p+1) == buff) name_values[n].value = checked; line.assign(name_values[n].name) .append(",") .append(name_values[n].value); break; case T_CHECKBOX : if (strstr(buff, "on") == buff || strstr(buff, "ON") == buff) name_values[n].value = "ON"; line.assign(name_values[n].name) .append(",") .append(name_values[n].value); break; case T_AREA://get html vars val = buff; escape(val); name_values[n].value = val; line.assign(name_values[n].name).append(",").append(val); break; case T_SELECT: default : // T_TEXT, T_PASSWORD, T_SELECT name_values[n].value = buff; line.assign(name_values[n].name) .append(",") .append(name_values[n].value); } edit_txt.append(line).append("\n"); } Fl::awake(refresh_txt_custom_msg); } // modify the html form with the value strings void assign_values(string &html) { string nm, val, s1, s2, temp; size_t p, p0, p1, p2, p3, pbeg, pend, pval, pnm; for (size_t n = 0; n < name_values.size(); n++) { switch (name_values[n].id) { case T_TEXT : case T_PASSWORD : nm.assign("NAME=\"").append(name_values[n].name).append("\""); pnm = html.find(nm); if (pnm != string::npos) { pnm += nm.length(); p1 = html.find(value_str, pnm); p2 = html.find(">", pnm); val = name_values[n].value; unescape(val); p3 = val.find("\""); while (p3 != string::npos) { val.replace(p3,1, "&quot;"); p3 = val.find("\""); } if (p1 < p2) { p1 += value_str.length(); p2 = html.find("\"", p1); html.replace(p1, p2 - p1, val); } else { temp.assign(" VALUE=\"").append(val).append("\""); html.insert(p2, temp); } } break; case T_RADIO : temp = name_values[n].name; p = temp.find("."); s1.assign(temp.substr(0, p)); s2.assign(temp.substr(p+1)); nm.assign(name_str).append(s1).append("\""); val.assign(value_str).append(s2).append("\""); pnm = html.find(nm); while (pnm != string::npos) { pbeg = html.rfind("<", pnm); // beginning of tag specifier pend = html.find(">", pbeg); // end of tag specifier pval = html.find(val, pbeg); if (pval == string::npos || pval > pend) { pnm = html.find(nm, pend); continue; } // found name and value pair if (name_values[n].value == checked) html.insert(pend, string(" ").append(checked)); pend = html.find(">", pbeg); pnm = html.find(nm, pend); } break; case T_CHECKBOX : nm.assign("NAME=\"").append(name_values[n].name).append("\""); pnm = html.find(nm); if (pnm != string::npos) { pbeg = html.rfind("<", pnm); pend = html.find(">", pbeg); if (name_values[n].value == "ON") { html.insert(pend, string(" ").append(checked)); pend = html.find(">", pbeg); } } break; case T_AREA : //assign values nm.assign("NAME=\"").append(name_values[n].name).append("\""); pnm = html.find(nm); if (pnm != string::npos) { p1 = html.find(textend_str, pnm); if (p1 == string::npos) break; p0 = html.rfind(">", p1) + 1; val = name_values[n].value; unescape(val); if (p0 < p1) { html.replace(p0, p1 - p0, val); } else { html.insert(p1, val); } } break; case T_SELECT : nm.assign("NAME=\"").append(name_values[n].name).append("\""); pnm = html.find(nm); if (pnm != string::npos) { p2 = html.find("</SELECT", pnm); p0 = html.find(value_str, pnm); while(p0 != string::npos && p0 < p2) { p0 += value_str.length(); p1 = html.find("\"", p0); if (p1 != string::npos && p1 < p2) { p3 = html.find(">", p1); if (html.substr(p0, p1 - p0) == name_values[n].value) { html.replace(p1+1, p3 - p1 - 1, " SELECTED"); } else html.replace(p1+1, p3 - p1 - 1, ""); } p0 = html.find(value_str, p0); } } break; default : break; } } } void custom_editor(struct mg_connection *conn) { string html_edit = html_form; size_t p = html_edit.find("<FORM>"); if (p == string::npos) return; html_edit.replace(p, 6, action_str); p = html_edit.find("</FORM>"); html_edit.replace(p, 7, submit_str); assign_values(html_edit); mg_send_data(conn, html_edit.c_str(), html_edit.length()); } void custom_viewer(struct mg_connection *conn) { string html_view = html_form; assign_values(html_view); // add readonly attribute to all input controls size_t pstart, ptext, pradio, pcheckbox, ppassword, pend; pstart = html_view.find("<INPUT"); while (pstart != string::npos) { pend = html_view.find(">", pstart); ppassword = html_view.find("\"PASSWORD\"", pstart); if (ppassword < pend) { size_t pvalue = html_view.find("VALUE=\"", pstart); if (pvalue < pend) { pvalue += 7; while (html_view[pvalue] != '\"') { html_view[pvalue] = '*'; pvalue++; } } html_view.replace(ppassword, 10, "\"TEXT\""); } pstart = html_view.find("<INPUT", pend + 1); } pstart = html_view.find("<INPUT"); while (pstart != string::npos) { pend = html_view.find(">", pstart); ptext = html_view.find("\"TEXT\"", pstart); pradio = html_view.find("\"RADIO\"", pstart); pcheckbox = html_view.find("\"CHECKBOX\"", pstart); if (ptext < pend) html_view.insert(pstart + 6, " READONLY "); else if (pradio < pend || pcheckbox < pend) html_view.insert(pstart + 6, " DISABLED "); pstart = html_view.find("<INPUT", pend + 1); } while (pstart != string::npos) { pend = html_view.find(">", pstart); ptext = html_view.find("\"TEXT\"", pstart); ppassword = html_view.find("\"PASSWORD\"", pstart); pradio = html_view.find("\"RADIO\"", pstart); pcheckbox = html_view.find("\"CHECKBOX\"", pstart); if (ppassword < pend) { size_t pvalue = html_view.find("VALUE=\""); if (pvalue < pend) { pvalue += 7; while (html_view[pvalue] != '\"') { html_view[pvalue] = '*'; pvalue++; } } html_view.replace(ppassword, 10, "\"TEXT\""); html_view.insert(pstart + 6, " READONLY "); } else if (ptext < pend) html_view.insert(pstart + 6, " READONLY "); else if (pradio < pend || pcheckbox < pend) html_view.insert(pstart + 6, " DISABLED "); pstart = html_view.find("<INPUT", pend + 1); } pstart = html_view.find("<TEXTAREA"); while (pstart != string::npos) { pend = html_view.find(">", pstart); html_view.insert(pstart + 10, " READONLY "); pstart = html_view.find("<TEXTAREA", pend + 1); } pstart = html_view.find("<SELECT"); while (pstart != string::npos) { pend = html_view.find(">", pstart); html_view.insert(pstart + 7, " DISABLED "); pstart = html_view.find("<SELECT", pend + 1); } mg_send_data(conn, html_view.c_str(), html_view.length()); } // customform fields string custombuffer; string def_custom_filename = ""; string base_custom_filename = ""; string def_custom_TemplateName = ""; string custom_title = ":TITLE:"; string custom_msg = ":mg:"; string custom_field; bool using_custom_template = false; void clear_customfields() { custom_field.clear(); extract_fields(); } bool check_customfields() { return (custom_field != txt_custom_msg->buffer()->text()); } void update_customfields() { custom_field = txt_custom_msg->buffer()->text(); } void clear_custom_form() { clear_customfields(); txt_custom_msg->clear(); txt_custom_msg->add(edit_txt.c_str()); } void text_to_pairs() { string val; size_t p, p1; for (size_t n = 0; n < name_values.size(); n++) { p = edit_txt.find(name_values[n].name); if (p != string::npos) { p += name_values[n].name.length() + 1; p1 = edit_txt.find("\n", p); val = edit_txt.substr(p, p1 - p); if (!val.empty() && (name_values[n].id == T_AREA || name_values[n].id == T_TEXT)) escape(val); name_values[n].value = val; } //printf("name %s, value %s\n", name_values[n].name.c_str(), name_values[n].value.c_str()); } } void pairs_to_text() { edit_txt.clear(); edit_txt.assign("CUSTOM_FORM,") .append(custom_pairs[custom_select].file_name) .append("\n"); for (size_t n = 0; n < name_values.size(); n++) { edit_txt.append(name_values[n].name) .append(",") .append(name_values[n].value) .append("\n"); } } std::string min_pairs_to_text() { static std::string mintext; mintext.clear(); mintext.assign("CUSTOM_FORM,") .append(custom_pairs[custom_select].file_name) .append("\n"); for (size_t n = 0; n < name_values.size(); n++) { if (!name_values[n].value.empty()) mintext.append(name_values[n].name) .append(",") .append(name_values[n].value) .append("\n"); } return mintext; } void update_customform() { extract_fields(); edit_txt = custom_field; text_to_pairs(); //printf("B\n%s\n", edit_txt.c_str()); pairs_to_text(); //printf("C\n%s\n", edit_txt.c_str()); txt_custom_msg->clear(); txt_custom_msg->add(edit_txt.c_str()); } void read_custombuffer(string data) { size_t p0, p1; clear_customfields(); read_header(data); custom_field = findstr(data, custom_msg); custom_select = -1; p0 = custom_field.find("CUSTOM_FORM,"); if (p0 == string::npos) return; p0 += 12;//strlen("CUSTOM_FORM,"); p1 = custom_field.find("\n", p0); if (p1 == string::npos) return; string fname = custom_field.substr(p0, p1-p0); string html_fname = CUSTOM_dir; html_fname.append(fname); //printf("form file: %s\n", html_fname.c_str()); { // treat this block as a critical section guard_lock web_lock(&mutex_web_server); for (int i = 0; i < num_custom_entries; i++) { if (fname == custom_pairs[i].file_name) { custom_select = i; break; } } } update_customform(); } void cb_custom_new() { if (check_customfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_custom_save(); } } clear_custom_form(); clear_header(); def_custom_filename = ICS_msg_dir; def_custom_filename.append("new"CUSTOMFILE_EXT); show_filename(def_custom_filename); using_custom_template = false; } void cb_custom_import() { fl_alert2("Not implemented"); } void cb_custom_export() { fl_alert2("Not implemented"); } void cb_custom_wrap_import(string wrapfilename, string inpbuffer) { clear_custom_form(); read_custombuffer(inpbuffer); def_custom_filename = ICS_msg_dir; def_custom_filename.append(wrapfilename); show_filename(def_custom_filename); using_custom_template = false; } int eval_custom_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_custom_filename).append("]"); update_customfields(); update_header(FROM); evalstr.append(header("<customform>")); string outbuf = lineout( custom_msg, custom_field ); if (outbuf.empty()) return 0; compress_maybe( outbuf ); evalstr.append( outbuf ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_custom_wrap_export() { if (check_customfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } string wfields = min_pairs_to_text(); if (wfields.empty()) return; if (base_custom_filename == "new"CUSTOMFILE_EXT || base_custom_filename == "default"CUSTOMFILE_EXT) if (!cb_custom_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_custom_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); custombuffer.assign(header("<customform>")); string outbuf = lineout( custom_msg, wfields); compress_maybe(outbuf); custombuffer.append(outbuf); export_wrapfile(base_custom_filename, wrapfilename, custombuffer, pext != WRAP_EXT); custombuffer.assign(header("<customform>")).append(lineout( custom_msg, custom_field )); write_custom(def_custom_filename); } } void cb_custom_wrap_autosend() { if (check_customfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } string wfields = min_pairs_to_text(); if (wfields.empty()) return; if (base_custom_filename == "new"CUSTOMFILE_EXT || base_custom_filename == "default"CUSTOMFILE_EXT) if (!cb_custom_save_as()) return; update_header(FROM); custombuffer.assign(header("<customform>")); string outbuf = lineout( custom_msg, wfields); compress_maybe(outbuf); custombuffer.append(outbuf); xfr_via_socket(base_custom_filename, custombuffer); custombuffer.assign(header("<customform>")).append(lineout( custom_msg, custom_field )); write_custom(def_custom_filename); } void cb_custom_load_template() { return; } void cb_custom_save_template() { if (!using_custom_template) { cb_custom_save_as_template(); return; } string def_custom_filename = def_custom_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"CUSTOMTEMP_EXT, def_custom_filename.c_str()); if (p) { update_header(CHANGED); update_customfields(); custombuffer.assign(header("<customform>")); custombuffer.append( lineout( custom_msg, custom_field ) ); write_custom(p); } } void cb_custom_save_as_template() { string def_custom_filename = def_custom_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"CUSTOMTEMP_EXT, def_custom_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_custom_TemplateName = p; if (strlen(pext) == 0) def_custom_TemplateName.append(CUSTOMTEMP_EXT); remove_spaces_from_filename(def_custom_TemplateName); clear_header(); update_header(CHANGED); update_customfields(); custombuffer.assign(header("<customform>")); custombuffer.append( lineout( custom_msg, custom_field ) ); write_custom(def_custom_TemplateName); show_filename(def_custom_TemplateName); using_custom_template = true; } } void cb_custom_open() { const char *p = FSEL::select(_("Open data file"), "custom form\t*.k2s", def_custom_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_custom_form(); read_data_file(p); using_custom_template = false; def_custom_filename = p; show_filename(def_custom_filename); } void write_custom(string s) { if (custombuffer.empty()) return; FILE *customfile = fopen(s.c_str(), "w"); if (!customfile) return; fwrite(custombuffer.c_str(), custombuffer.length(), 1, customfile); fclose(customfile); } bool cb_custom_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(".k2s"); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_custom_filename; p = FSEL::saveas(_("Save data file"), "custom form\t*.k2s", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_custom_filename = p; if (strlen(pext) == 0) def_custom_filename.append(".k2s"); remove_spaces_from_filename(def_custom_filename); update_header(NEW); update_customfields(); custombuffer.assign(header("<customform>")); custombuffer.append( lineout( custom_msg, custom_field ) ); write_custom(def_custom_filename); using_custom_template = false; show_filename(def_custom_filename); return true; } void cb_custom_save() { if (base_custom_filename == "new.k2s" || base_custom_filename == "default.k2s" || using_custom_template == true) { cb_custom_save_as(); return; } if (check_customfields()) update_header(CHANGED); update_customfields(); custombuffer.assign(header("<customform>")); custombuffer.append( lineout( custom_msg, custom_field ) ); write_custom(def_custom_filename); using_custom_template = false; } void cb_custom_msg_type() { if (tabs_msg_type->value() == tab_custom ) { show_filename(def_custom_filename); } else { show_filename(def_rg_filename); } } void cb_custom_import_data() { def_custom_filename = CUSTOM_dir; def_custom_filename.append("default.custom"); const char *p = FSEL::select( _("Import custom data"), "custom file\t*.custom", def_custom_filename.c_str()); if (!p) return; if (strlen(p) == 0) return;\ clear_custom_form(); clear_estimate(); // open the custom file, read all data long filesize = 0; char *buff; FILE *custom_datafile; custom_datafile = fopen (p, "r"); if (!custom_datafile) return; // determine its size for buffer creation fseek (custom_datafile, 0, SEEK_END); filesize = ftell (custom_datafile); // test file integrity if (filesize == 0) { fl_alert2(_("Empty file")); return; } buff = new char[filesize + 1]; memset(buff, 0, filesize + 1); // read the entire file into the buffer fseek (custom_datafile, 0, SEEK_SET); int retval = fread (buff, filesize, 1, custom_datafile); fclose (custom_datafile); if (retval != 1) return; custom_field = buff; // strip any cr-lf pairs if the file was a DOS text file size_t ptr = custom_field.find("\r\n"); while (ptr != string::npos) { custom_field.erase(ptr, 1); ptr = custom_field.find("\r\n"); } update_customform(); delete [] buff; using_custom_template = false; def_custom_filename = ICS_msg_dir; def_custom_filename.append(fl_filename_name(p)); size_t pext = def_custom_filename.find(".custom"); if (pext == string::npos) pext = def_custom_filename.find(".custom"); if (pext != string::npos) def_custom_filename.erase(pext); def_custom_filename.append(".k2s"); show_filename(def_custom_filename); estimate(); } void cb_custom_export_data(bool open_file) { update_customfields(); if (custom_field.empty()) return; string fname_name = fl_filename_name(def_custom_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string custom_name = CUSTOM_dir; custom_name.append(fname_name).append(".custom"); const char *pfilename = FSEL::saveas( _("Export custom data"), "custom file\t*.custom", custom_name.c_str()); if (!pfilename) return; if (strlen(pfilename) == 0) return; custom_name = pfilename; if (custom_name.find(".custom") == string::npos) custom_name.append(".custom"); FILE *customfile = fopen(custom_name.c_str(), "w"); fprintf(customfile,"%s", custom_field.c_str()); fclose(customfile); if (open_file) { fl_alert2("If you modify the data you must save as custom and\nimport the modified file"); open_url(pfilename); } else fl_alert2("Data written to %s", custom_name.c_str()); } void custom_set_fname(const char *fn) { string fname = fn; size_t pext = fname.find(".custom"); if (pext == string::npos) pext = fname.find(".custom"); if (pext == string::npos) { txt_custom_msg->clear(); return; } using_custom_template = false; def_custom_filename = ICS_msg_dir; def_custom_filename.append(fl_filename_name(fn)); def_custom_filename.find(".custom"); if (pext == string::npos) pext = def_custom_filename.find(".custom"); if (pext != string::npos) def_custom_filename.erase(pext); def_custom_filename.append(".k2s"); show_filename(def_custom_filename); } void cb_custom_html() { return; if (custom_field.find("CUSTOM_FORM") == 0) { size_t plf = custom_field.find("\n"); if (plf != string::npos) { string fname = CUSTOM_dir; fname.append(custom_field.substr(12, plf - 12)); FILE *html_file = fopen(fname.c_str(), "r"); char c; html_form.clear(); while ((c = fgetc(html_file)) != EOF) html_form += c; fclose(html_file); handle_type = HANDLE_VIEW; string url = "http://127.0.0.1:"; url.append(sz_srvr_portnbr); open_url(url.c_str()); } } } void cb_custom_textout() { return; if (custom_field.find("CUSTOM_FORM") == 0) { size_t plf = custom_field.find("\n"); if (plf != string::npos) { string tempfile = FLMSG_temp_dir; tempfile.append(custom_field.substr(12, plf - 12)); tempfile.append(".txt"); FILE *textfile = fopen(tempfile.c_str(), "w"); fprintf(textfile,"%s", edit_txt.c_str()); fclose(textfile); open_url(tempfile.c_str()); } } } //============================================================================== // Support for transfering / receiving custom FORM, html files //============================================================================== string transfer_custom_buffer; string def_custom_transfer_filename; string def_custom_rx_filename; string receive_custom_buffer; void read_custom_transfer_buffer(string data) { const char *xfrstr = "<html_form>\n"; size_t p1 = data.find(xfrstr); if (p1 != string::npos) p1 += strlen(xfrstr); data.erase(0, p1); receive_custom_buffer = data; read_header(data); } void cb_custom_form_wrap_import(string wrapfilename, string inpbuffer) { read_custom_transfer_buffer(inpbuffer); def_custom_rx_filename = CUSTOM_dir; def_custom_rx_filename.append(wrapfilename); txt_rcvd_custom_html_filename->value(def_custom_rx_filename.c_str()); btn_save_custom_html_file->color(FL_RED); } int eval_transfer_custom_form_fsize() { if (transfer_custom_buffer.empty()) return 0; Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(fl_filename_name(def_custom_transfer_filename.c_str())).append("]"); evalstr.append(header("<html_form>")); string outbuf(transfer_custom_buffer); if (outbuf.empty()) return 0; compress_maybe( outbuf, false ); evalstr.append( outbuf ); string ck = chksum.scrc16(evalstr); evalstr.append("[WRAP:chksum ").append(ck).append("][WRAP:end]"); return evalstr.length(); } void load_custom_html_file() { string fname = CUSTOM_dir; fname.append(def_custom_transfer_filename); transfer_custom_buffer.clear(); FILE *dfile = fopen(fname.c_str(), "rb"); if (!dfile) { show_filename("ERROR"); transfer_custom_buffer.clear(); return; } fseek(dfile, 0, SEEK_END); size_t fsize = ftell(dfile); if (fsize <= 0) return; fseek(dfile, 0, SEEK_SET); transfer_custom_buffer.resize(fsize); size_t r = fread((void *)transfer_custom_buffer.c_str(), 1, fsize, dfile); fclose(dfile); if (r != fsize) { show_filename("ERROR"); transfer_custom_buffer.clear(); return; } estimate(); } void cb_transfer_custom_html() { if (transfer_custom_buffer.empty()) return; update_header(FROM); string fbuff(header("<html_form>")); string outbuf(transfer_custom_buffer); compress_maybe(outbuf, false); fbuff.append(outbuf); xfr_via_socket(fl_filename_name(def_custom_transfer_filename.c_str()), fbuff); } void cb_save_custom_html(Fl_Widget *w, void *d) { btn_save_custom_html_file->color(FL_BACKGROUND_COLOR); if (receive_custom_buffer.empty()) return; FILE *binfile = fopen(def_custom_rx_filename.c_str(), "wb"); if (binfile) { fwrite(receive_custom_buffer.c_str(), receive_custom_buffer.length(), 1, binfile); fclose(binfile); } txt_rcvd_custom_html_filename->value(""); update_custom_transfer(); } void cb_btn_select_custom_html(Fl_Widget *w, void *d) { def_custom_transfer_filename = custom_files[custom_selector->index()]; show_filename(def_custom_transfer_filename); load_custom_html_file(); } ���������������������������������������������flmsg-2.0.10/src/custom/custom_transfer_tab.cxx�����������������������������������������������������0000664�0001750�0001750�00000005174�12330516146�016526� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "combo.h" Fl_Group *tab_custom_transfer = (Fl_Group *)0; Fl_ListBox *custom_selector = (Fl_ListBox *)0; Fl_Output * txt_rcvd_custom_html_filename = (Fl_Output *)0; Fl_Button * btn_save_custom_html_file = (Fl_Button *)0; void cb_custom_autosend(Fl_Widget *w, void *d) { cb_wrap_autosend(); } void create_custom_transfer_tab() { tab_custom_transfer = new Fl_Group(0, tab_top, 570, 430 - tab_top); tab_custom_transfer->align(FL_ALIGN_TOP); Fl_Group *TransmitGroup = new Fl_Group(2, tab_top + 30, 566, 80, _("Transmit Custom FORM")); TransmitGroup->box(FL_ENGRAVED_BOX); TransmitGroup->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); custom_selector = new Fl_ListBox( 10, tab_top + 65, 200, 24, _("Select custom form")); load_custom_transfer(); custom_selector->callback((Fl_Callback*)cb_btn_select_custom_html); Fl_Button *custom_autosend = new Fl_Button( 240, tab_top + 65, 80, 24, _("Autosend")); custom_autosend->callback(cb_custom_autosend); TransmitGroup->end(); Fl_Group *ReceiveGroup = new Fl_Group(2, tab_top + 115, 566, 80, _("Receive Custom FORM")); ReceiveGroup->box(FL_ENGRAVED_BOX); ReceiveGroup->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); txt_rcvd_custom_html_filename = new Fl_Output(10, tab_top + 150, 480, 24, _("Received file:")); txt_rcvd_custom_html_filename->align(FL_ALIGN_TOP_LEFT); txt_rcvd_custom_html_filename->tooltip(""); btn_save_custom_html_file = new Fl_Button(495, tab_top + 150, 70, 24, _("Save")); btn_save_custom_html_file->tooltip(_("Export data to file")); btn_save_custom_html_file->callback((Fl_Callback*)cb_save_custom_html); ReceiveGroup->end(); tab_custom_transfer->end(); tab_custom_transfer->hide(); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/custom/custom_templates.cxx��������������������������������������������������������0000664�0001750�0001750�00000002321�12330516146�016041� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char custom_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title></head><body>\ :mg:\ </body></html>"; const char custom_txt_template[] = ":mg:"; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/custom/custom_tab.cxx��������������������������������������������������������������0000664�0001750�0001750�00000005501�12462170262�014615� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "threads.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_custom = (Fl_Group *)0; FTextView *txt_custom_msg = (FTextView *)0; Fl_Button *btn_custom_edit = (Fl_Button *)0; Fl_Button *btn_custom_view = (Fl_Button *)0; static void cb_btn_custom_edit(Fl_Button*, void*) { if (custom_select < 0) return; handle_type = HANDLE_EDIT; string url = "http://127.0.0.1:"; url.append(sz_srvr_portnbr); open_url(url.c_str()); } static void cb_btn_custom_view(Fl_Button*, void*) { if (custom_select < 0) return; handle_type = HANDLE_VIEW; string url = "http://127.0.0.1:"; url.append(sz_srvr_portnbr); open_url(url.c_str()); } static void custom_changed(FTextEdit *, void *) { estimate(); } static void do_read_cb(const char *fn) { custom_set_fname(fn); } void create_custom_tab() { int width = 570; tab_custom = new Fl_Group(0, tab_top, width, 430 - tab_top); tab_custom->align(FL_ALIGN_TOP); btn_custom_edit = new Fl_Button(width/2 - 120, tab_top + 5, 100, 24, _("Edit Form")); btn_custom_edit->tooltip(_("")); btn_custom_edit->callback((Fl_Callback*)cb_btn_custom_edit); btn_custom_view = new Fl_Button(width/2 + 20, tab_top + 5, 100, 24, _("View Form")); btn_custom_view->tooltip(_("")); btn_custom_view->callback((Fl_Callback*)cb_btn_custom_view); txt_custom_msg = new FTextView(2, tab_top + 24 + 10, 566, 430 - (tab_top + 24 + 10 + 2)); txt_custom_msg->box(FL_DOWN_FRAME); txt_custom_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_custom_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_custom_msg->labeltype(FL_NORMAL_LABEL); txt_custom_msg->labelfont(0); txt_custom_msg->labelsize(14); txt_custom_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_custom_msg->align(FL_ALIGN_TOP_LEFT); txt_custom_msg->set_read_cb(do_read_cb); txt_custom_msg->callback((Fl_Callback*)custom_changed); txt_custom_msg->when(FL_WHEN_CHANGED); tab_custom->end(); tab_custom->hide(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/flmsg_dialog.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000153106�12462170262�013577� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <sys/types.h> #include <dirent.h> #include <iostream> #include <fstream> #include <vector> #include "gettext.h" #include "flmsg_dialog.h" #include "status.h" #include "flmsg.h" #include "fileselect.h" #include "debug.h" #include "util.h" #include "transfer.h" #include "time_table.h" #include "xml_io.h" #include "combo.h" //====================================================================== Fl_Menu_Bar *mb = (Fl_Menu_Bar *)0; Fl_Browser *brwsOptions = (Fl_Browser *)0; Fl_Return_Button *btnCloseOptions = (Fl_Return_Button *)0; Fl_Output *txt_formname = (Fl_Output *)0; Fl_Output *txt_filename = (Fl_Output *)0; Fl_Input *drop_file = (Fl_Input *)0; Fl_Group *controls = (Fl_Group *)0; int tab_top; Fl_Browser *select_arl = (Fl_Browser *)0; Fl_Input2 *txt_arl_fill1 = (Fl_Input2 *)0; Fl_Input2 *txt_arl_fill2 = (Fl_Input2 *)0; Fl_Input2 *txt_arl_fill3 = (Fl_Input2 *)0; Fl_Input2 *txt_arl_fill4 = (Fl_Input2 *)0; Fl_Button *btn_arl_cancel = (Fl_Button *)0; Fl_Button *btn_arl_add = (Fl_Button *)0; FTextEdit *arl_text = (FTextEdit *)0; Fl_Check_Button *btnInsertX = (Fl_Check_Button *)0; Fl_Check_Button *btn_force_compression = (Fl_Check_Button *)0; Fl_Input2 *txt_mars_roster_file = (Fl_Input2 *)0; Fl_Input2* txt_hdr_from = (Fl_Input2 *)0; Fl_Input2* txt_hdr_edit = (Fl_Input2 *)0; Fl_Check_Button *btnAutoWordWrap = 0; Fl_Check_Button *btn_use_compression = 0; Fl_Button *btn_estimate = 0; Fl_ListBox *encoders = 0; Fl_Counter *cntCharCount = 0; Fl_ListBox *cbo_modes = 0; Fl_Output *txt_xfr_size_time = 0; int transfer_size; void cb_btn_transfer_size(Fl_Button *, void*); //---------------------------------------------------------------------- #define NO_OF_MODEMS 200 char *s_modes[NO_OF_MODEMS]; // reported by get_modes /* NULL|CW| CTSTIA|DOMEX4|DOMEX5|DOMEX8|DOMX11|DOMX16|DOMX22|DOMX44|DOMX88| FELDHELL|SLOWHELL|HELLX5|HELLX9|FSKHELL|FSKH105|HELL80| MFSK8|MFSK16|MFSK32|MFSK4|MFSK11|MFSK22|MFSK31|MFSK64|MFSK128||MFSK64L|MFSK128L| WEFAX576|WEFAX288|NAVTEX|SITORB| MT63-500S|MT63-1KS|MT63-2KS| MT63-500L|MT63-1KL|MT63-2KL| BPSK31|BPSK63|BPSK63F|BPSK125|BPSK250|BPSK500| QPSK31|QPSK63|QPSK125|QPSK250|QPSK500| PSK125R|PSK250R|PSK500R|BPSK1000|PSK1000R| OLIVIA|Olivia-4-250|Olivia-8-250|Olivia-4-500|Olivia-8-500| Olivia-16-500|Olivia-8-1K|Olivia-16-1K|Olivia-32-1K|Olivia-64-2K| RTTY| THOR4|THOR5|THOR8|THOR11|THOR16|THOR22|THOR25X4|THOR50X1|THOR50X2|THOR100| THROB1|THROB2|THROB4|THRBX1|THRBX2|THRBX4| PSK63RC4|PSK63RC5|PSK63RC10|PSK63RC20|PSK63RC32| PSK125RC4|PSK125RC5|PSK125RC10|PSK125C12|PSK125RC12|PSK125RC16| PSK250C6|PSK250RC2|PSK250RC3|PSK250RC5|PSK250RC6|PSK250RC7| PSK500C2|PSK500C4|PSK500RC2|PSK500RC3|PSK500RC4| PSK800C2|PSK800RC2| PSK1000C2|PSK1000RC2| SSB|WWV|ANALYSIS| */ string valid_modes; void update_cbo_modes(string &fldigi_modes) { memset(s_modes, 0, sizeof(s_modes)); valid_modes.clear(); cbo_modes->clear(); int j = 0; int num_modes = mode_table_count(); char *m = (char *)0; if(num_modes >= NO_OF_MODEMS) num_modes = NO_OF_MODEMS - 1; for (int i = 0; i < num_modes; i++) { m = modem_at_index(i); if (fldigi_modes.find(m) != string::npos) { s_modes[j] = (char *) m; cbo_modes->add(s_modes[j]); valid_modes.append(s_modes[j]).append("|"); j++; } } cbo_modes->index(progStatus.selected_mode); } void init_cbo_modes() { string min_modes; min_modes.assign("DOMX22|DOMX44|DOMX88"); min_modes.append("MFSK16|MFSK22|MFSK31|MFSK32|MFSK64|MFSK128|MFSK64L|MFSK128L"); min_modes.append("MT63-500S|MT63-1KS|MT63-2KS|MT63-500L|MT63-1KL|MT63-2KL"); min_modes.append("BPSK125|BPSK250|BPSK500|BPSK1000"); min_modes.append("PSK63RC4|PSK63RC5|PSK63RC10|PSK63RC20|PSK63RC32"); min_modes.append("PSK125C12|PSK125R|PSK125RC4|PSK125RC5|PSK125RC10|PSK125RC12|PSK125RC16"); min_modes.append("PSK250C6|PSK250R|PSK250RC2|PSK250RC3|PSK250RC5|PSK250RC6|PSK250RC7"); min_modes.append("PSK500C2|PSK500C4|PSK500R|PSK500RC2|PSK500RC3|PSK500RC4"); min_modes.append("PSK800C2|PSK800RC2"); min_modes.append("PSK1000C2|PSK1000R|PSK1000RC2"); min_modes.append("Olivia-4-250|Olivia-8-250"); min_modes.append("Olivia-4-500|Olivia-8-500|Olivia-16-500"); min_modes.append("Olivia-8-1K|Olivia-16-1K"); min_modes.append("Olivia-32-1K|Olivia-64-2K"); min_modes.append("THOR16|THOR22|THOR25x4|THOR50x1|THOR50x2|THOR100"); update_cbo_modes(min_modes); } bool valid_mode_check(string &md) { return (valid_modes.find(md) != string::npos); } void init_encoders() { encoders->clear(); encoders->add("base64"); encoders->add("base128"); encoders->add("base256"); encoders->index(progStatus.encoder); } void clear_estimate() { transfer_size = 0; txt_xfr_size_time->value(""); } void estimate() { static char sz_xfr_size[30]; float xfr_time = 0, overhead; transfer_size = eval_transfer_size(); if (transfer_size == 0) { txt_xfr_size_time->value(""); return; } xfr_time = seconds_from_c_string(cbo_modes->value(), evalstr.c_str(), transfer_size, &overhead); xfr_time += overhead; if (xfr_time < 60) snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d bytes / %d secs", transfer_size, (int)(xfr_time + 0.5)); else snprintf(sz_xfr_size, sizeof(sz_xfr_size), "%d bytes / %d m %d s", transfer_size, (int)(xfr_time / 60), ((int)xfr_time) % 60); txt_xfr_size_time->value(sz_xfr_size); } //====================================================================== static void cb_mnu_folders(Fl_Menu_*, void*) { cb_folders(); } static void cb_mnuNew(Fl_Menu_*, void*) { cb_new(); } static void cb_mnuOpen(Fl_Menu_*, void*) { cb_open(); } static void cb_mnuSave(Fl_Menu_*, void*) { cb_save(); } static void cb_mnuSaveAs(Fl_Menu_*, void*) { cb_save_as(); } static void cb_mnu_html(Fl_Menu_*, void*) { cb_html(); } static void cb_mnu_html_fcopy(Fl_Menu_*, void*) { cb_html_fcopy(); } static void cb_mnu_text(Fl_Menu_*, void*) { cb_text(); } static void cb_mnu_qimport(Fl_Menu_*, void*) { cb_import(); } static void cb_mnu_qexport(Fl_Menu_*, void*) { cb_export(); } static void cb_mnuWrapImport(Fl_Menu_*, void*) { cb_wrap_import(); } static void cb_mnuWrapExport(Fl_Menu_*, void*) { cb_wrap_export(); } static void cb_mnuAutoSend(Fl_Menu_*, void*) { cb_wrap_autosend(); } static void cb_mnuExit(Fl_Menu_*, void*) { cb_exit(); } static void cb_mnu_load_template(Fl_Menu_*, void*) { cb_load_template(); } static void cb_mnu_save_template(Fl_Menu_*, void*) { cb_save_template(); } static void cb_mnu_save_as_template(Fl_Menu_*, void*) { cb_save_as_template(); } static void cb_mnuPersonalConfig(Fl_Menu_ *, void*) { cb_config_personal(); } static void cb_mnuDateTimeConfig(Fl_Menu_ *, void*) { cb_config_date_time(); } static void cb_mnuConfigRadiogram(Fl_Menu_ *, void*) { cb_config_radiogram(); } static void cb_mnuConfigFiles(Fl_Menu_*, void*) { cb_config_files(); } static void cb_mnuConfigSocket(Fl_Menu_ *, void*) { cb_config_socket(); } static void cb_mnuOptions(Fl_Menu_*, void*) { showoptions(); } static void cb_mnuHeaders(Fl_Menu_*, void*) { string tmp = hdr_from; while (tmp.length() && tmp[0] == '\n') tmp.erase(0,1); txt_hdr_from->value(tmp.c_str()); tmp = hdr_edit; while (tmp.length() && tmp[0] == '\n') tmp.erase(0,1); txt_hdr_edit->value(tmp.c_str()); header_window->show(); } static void cb_mnuEvents(Fl_Menu_*, void*) { debug::show(); } static void cb_mnuOnLineHelp(Fl_Menu_*, void*) { show_help(); } static void cb_mnuCustomDownload(Fl_Menu_*, void*) { custom_download(); } static void cb_mnuAbout(Fl_Menu_*, void*) { cb_About(); } int mICS203 = ICS203; int mICS205 = ICS205; int mICS205A = ICS205A; int mICS206 = ICS206; int mICS213 = ICS213; int mICS214 = ICS214; int mICS216 = ICS216; int mICS309 = ICS309; int mHICS203 = HICS203; int mHICS206 = HICS206; int mHICS213 = HICS213; int mHICS214 = HICS214; int mIARU = IARU; int mRADIOGRAM = RADIOGRAM; int mPLAINTEXT = PLAINTEXT; int mBLANK = BLANK; int mCSV = CSV; int mCUSTOM = CUSTOM; int mMARSDAILY = MARSDAILY; int mMARSINEEI = MARSINEEI; int mMARSNET = MARSNET; int mMARSARMY = MARSARMY; int mMARSNAVY = MARSNAVY; int mREDXSNW = REDXSNW; int mREDX5739 = REDX5739; int mREDX5739A = REDX5739A; int mREDX5739B = REDX5739B; int mWXHC = WXHC; int mSEVEREWX = SEVEREWX; int mSTORMREP = STORMREP; int mCAP105 = CAP105; int mCAP110 = CAP110; int mTRANSFER = TRANSFER; Fl_Group *oldtab = (Fl_Group *)0; void select_form(int form) { if (oldtab) oldtab->hide(); if (tab_dnd->visible()) tab_dnd->hide(); switch (form) { case PLAINTEXT: oldtab = tab_plaintext; tab_plaintext->show(); txt_formname->value(_("Plaintext message")); show_filename(def_pt_filename); break; case ICS203: oldtab = tab_ics203; tab_ics203->show(); txt_formname->value(_("ICS-203 report")); show_filename(def_203_filename); break; case ICS205: oldtab = tab_ics205; tab_ics205->show(); txt_formname->value(_("ICS-205 report")); show_filename(def_205_filename); break; case ICS205A: oldtab = tab_ics205a; tab_ics205a->show(); txt_formname->value(_("ICS-205A report")); show_filename(def_205a_filename); break; case ICS206: oldtab = tab_ics206; tab_ics206->show(); tab_ics206_type->value(tab_206_med_plan); txt_formname->value(_("ICS-206 report")); show_filename(def_206_filename); break; case ICS213: oldtab = tab_ics213; tab_ics213->show(); tab_ics213_type->value(tab_213_originator); txt_formname->value(_("ICS-213 report")); show_filename(def_213_filename); break; case ICS214: oldtab = tab_ics214; tab_ics214->show(); tab_ics214_type->value(tab_214_1); txt_formname->value(_("ICS-214 report")); show_filename(def_214_filename); break; case ICS216: oldtab = tab_ics216; tab_ics216->show(); tab_ics216_type->value(tab_216_1); txt_formname->value(_("ICS-216 report")); show_filename(def_216_filename); break; case ICS309: oldtab = tab_ics309; tab_ics309->show(); tab_ics309_type->value(tab_309_1); txt_formname->value(_("ICS-309 report")); show_filename(def_309_filename); break; case MARSDAILY: oldtab = tab_mars_daily; tab_mars_daily->show(); txt_formname->value(_("MARS daily report")); show_filename(def_mars_daily_filename); break; case MARSINEEI: oldtab = tab_mars_ineei; tab_mars_ineei->show(); txt_formname->value(_("MARS IN/EEI report")); show_filename(def_mars_ineei_filename); break; case MARSNET: oldtab = tab_mars_net; tab_mars_net->show(); txt_formname->value(_("MARS Net report")); show_filename(def_mars_net_filename); break; case MARSARMY: oldtab = tab_mars_army; tab_mars_army->show(); txt_formname->value(_("MARS Army message")); show_filename(def_mars_army_filename); break; case MARSNAVY: oldtab = tab_mars_navy; tab_mars_navy->show(); txt_formname->value(_("MARS Navy message")); show_filename(def_mars_navy_filename); break; case WXHC: oldtab = tab_wxhc; tab_wxhc->show(); txt_formname->value(_("Hurricane Report")); show_filename(def_wxhc_filename); break; case SEVEREWX: oldtab = tab_severe_wx; tab_severe_wx->show(); txt_formname->value(_("Severe Wx Report")); show_filename(def_severe_wx_filename); break; case STORMREP: oldtab = tab_storm; tab_storm->show(); txt_formname->value(_("Storm Report")); show_filename(def_storm_filename); break; case REDXSNW: oldtab = tab_redx_snw; tab_redx_snw->show(); txt_formname->value(_("Red Cross Safety & Welfare")); show_filename(def_redx_snw_filename); break; case REDX5739: oldtab = tab_redx_5739; tab_redx_5739->show(); txt_formname->value(_("On-Site Detailed Damage Assessment")); show_filename(def_redx_5739_filename); break; case REDX5739A: oldtab = tab_redx_5739A; tab_redx_5739A->show(); txt_formname->value(_("Detailed Damage Assessment Supplemental Worksheet")); show_filename(def_redx_5739A_filename); break; case REDX5739B: oldtab = tab_redx_5739B; tab_redx_5739B->show(); txt_formname->value(_("Area Assessment Worksheet")); show_filename(def_redx_5739B_filename); break; case HICS203: oldtab = tab_hics203; tab_hics203->show(); txt_formname->value(_("HICS-203 report")); show_filename(def_hics203_filename); break; case HICS206: oldtab = h206_tab; h206_tab->show(); txt_formname->value(_("HICS-206 report")); show_filename(h206_def_filename); break; case HICS213: oldtab = h213_tab; h213_tab->show(); txt_formname->value(_("HICS-213 report")); show_filename(h213_def_filename); break; case HICS214: oldtab = hics214_tab; hics214_tab->show(); txt_formname->value(_("HICS-214 report")); show_filename(hics214_def_filename); break; case IARU: oldtab = tab_iaru; tab_iaru->show(); txt_formname->value(_("IARU radiogram")); show_filename(iaru_def_filename); break; case RADIOGRAM: oldtab = tab_radiogram; tab_radiogram->show(); txt_formname->value(_("ARRL radiogram")); show_filename(def_rg_filename); break; case CAP105: oldtab = tab_cap105; tab_cap105->show(); txt_formname->value(_("CAP 105")); show_filename(cap105_def_filename); break; case CAP110: oldtab = tab_cap110; tab_cap110->show(); txt_formname->value(_("CAP 110")); show_filename(cap110_def_filename); break; case CSV: oldtab = tab_csv; tab_csv->show(); txt_formname->value(_("CSV spreadsheet")); show_filename(def_csv_filename); break; case CUSTOM: oldtab = tab_custom; tab_custom->show(); txt_formname->value(_("Custom Editable Html")); show_filename(def_custom_filename); break; case TRANSFER: oldtab = tab_transfer; tab_transfer->show(); txt_formname->value(_("File transfer")); show_filename(def_transfer_filename); break; case CUSTOM_TRANSFER: oldtab = tab_custom_transfer; tab_custom_transfer->show(); txt_formname->value(_("FORM transfer")); show_filename(def_custom_transfer_filename); load_custom_html_file(); break; case BLANK: case NONE: default: oldtab = tab_blank; tab_blank->show(); txt_formname->value(_("Blank form")); show_filename(def_blank_filename); break; } estimate(); } static void cb_mnuFormSelect(Fl_Menu_*, void *d) { int *pint = (int *)d; selected_form = *pint; select_form(selected_form); } static void cb_mnuDragAndDrop(Fl_Menu_*, void *d) { if (!oldtab) return; if (tab_dnd->visible()) { tab_dnd->hide(); oldtab->show(); } else { oldtab->hide(); tab_dnd->show(); } } #define NBR_CUSTOM_MENUS 50 Fl_Menu_Item custom_menu[NBR_CUSTOM_MENUS]; void load_custom_menu(); Fl_Menu_Item menu_[] = { {_("&File"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Folders"), 0, (Fl_Callback*)cb_mnu_folders, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {_("&New"), 0x4006e, (Fl_Callback*)cb_mnuNew, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Open"), 0x4006f, (Fl_Callback*)cb_mnuOpen, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Save"), 0x40073, (Fl_Callback*)cb_mnuSave, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save &As"), 0x40061, (Fl_Callback*)cb_mnuSaveAs, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("View"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Html delivery"), 0, (Fl_Callback*)cb_mnu_html, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Html file copy"), 0, (Fl_Callback*)cb_mnu_html_fcopy, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Plain Text"), 0, (Fl_Callback*)cb_mnu_text, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Q-forms"), 0, 0, 0, 192, FL_NORMAL_LABEL, 0, 14, 0}, {_("Import"), 0, (Fl_Callback*)cb_mnu_qimport, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Export"), 0, (Fl_Callback*)cb_mnu_qexport, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Wrap"), 0, 0, 0, 192, FL_NORMAL_LABEL, 0, 14, 0}, {_("Import"), 0, (Fl_Callback*)cb_mnuWrapImport, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Export"), 0, (Fl_Callback*)cb_mnuWrapExport, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("E&xit"), 0x40078, (Fl_Callback*)cb_mnuExit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("F&orm"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Drag-n-Drop"), 0, (Fl_Callback*)cb_mnuDragAndDrop, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {_("Blank"), 0, (Fl_Callback*)cb_mnuFormSelect, &mBLANK, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("CAP"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Form 105"), 0, (Fl_Callback*)cb_mnuFormSelect, &mCAP105, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Form 110"), 0, (Fl_Callback*)cb_mnuFormSelect, &mCAP110, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("CSV"), 0, (Fl_Callback*)cb_mnuFormSelect, &mCSV, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Custom"), 0, 0, (void*)custom_menu, FL_SUBMENU_POINTER},//, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("HICS"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("HICS203"), 0, (Fl_Callback*)cb_mnuFormSelect, &mHICS203, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("HICS206"), 0, (Fl_Callback*)cb_mnuFormSelect, &mHICS206, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("HICS213"), 0, (Fl_Callback*)cb_mnuFormSelect, &mHICS213, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("HICS214"), 0, (Fl_Callback*)cb_mnuFormSelect, &mHICS214, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("IARU"), 0, (Fl_Callback*)cb_mnuFormSelect, &mIARU, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS203"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS203, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS205"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS205, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS205A"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS205A, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS206"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS206, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS213"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS213, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS214"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS214, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS216"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS216, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("ICS309"), 0, (Fl_Callback*)cb_mnuFormSelect, &mICS309, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("MARS"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Daily"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSDAILY, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("IN/EEI"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSINEEI, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Net"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSNET, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Army"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSARMY, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Navy"), 0, (Fl_Callback*)cb_mnuFormSelect, &mMARSNAVY, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Plaintext"), 0, (Fl_Callback*)cb_mnuFormSelect, &mPLAINTEXT, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Radiogram"), 0, (Fl_Callback*)cb_mnuFormSelect, &mRADIOGRAM, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Red Cross"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Welfare"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDXSNW, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("5739"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("5739A"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739A, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("5739B"), 0, (Fl_Callback*)cb_mnuFormSelect, &mREDX5739B, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Transfer"), 0, (Fl_Callback*)cb_mnuFormSelect, &mTRANSFER, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Weather"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Hurricane"), 0, (Fl_Callback*)cb_mnuFormSelect, &mWXHC, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Severe WX"), 0, (Fl_Callback*)cb_mnuFormSelect, &mSEVEREWX, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Storm Report"), 0, (Fl_Callback*)cb_mnuFormSelect, &mSTORMREP, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {_("&Template"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Load"), 0, (Fl_Callback*)cb_mnu_load_template, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save"), 0, (Fl_Callback*)cb_mnu_save_template, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save As"), 0, (Fl_Callback*)cb_mnu_save_as_template, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Config"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Personal data"), 0, (Fl_Callback*)cb_mnuPersonalConfig, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Date/Time"), 0, (Fl_Callback*)cb_mnuDateTimeConfig, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Files/Formatting"), 0, (Fl_Callback*)cb_mnuConfigFiles, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Radiogram"), 0, (Fl_Callback*)cb_mnuConfigRadiogram, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Fldigi connection"), 0, (Fl_Callback*)cb_mnuConfigSocket, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {" ", 0, 0, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {_("AutoSend"), 0, (Fl_Callback*)cb_mnuAutoSend, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {" ", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Help"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, #ifdef DEBUG {_("Event log"), 0, (Fl_Callback*)cb_mnuEvents, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, #endif {_("Header trace"), 0, (Fl_Callback*)cb_mnuHeaders, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Command line options"), 0, (Fl_Callback*)cb_mnuOptions, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("On Line help"), 0, (Fl_Callback*)cb_mnuOnLineHelp, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Download custom forms"), 0, (Fl_Callback*)cb_mnuCustomDownload, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("About"), 0, (Fl_Callback*)cb_mnuAbout, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0} }; int num_custom_entries = 0; int custom_select = -1; CUSTOM_PAIRS custom_pairs[NBR_CUSTOM_MENUS]; extern void extract_fields(); static void cb_mnuCustomFormSelect(Fl_Menu_ *, void *d) { extern string edit_txt; size_t n = (size_t)(d); custom_select = n; selected_form = CUSTOM; select_form(selected_form); extract_fields(); txt_custom_msg->clear(); txt_custom_msg->add(edit_txt.c_str()); } static void cb_open_custom_transfer_tab(Fl_Menu_ *, void *d) { selected_form = CUSTOM_TRANSFER; select_form(selected_form); } void init_custom_menu() { for (int i = 0; i < NBR_CUSTOM_MENUS; i++) { custom_menu[i].text = 0; custom_menu[i].shortcut_ = 0; custom_menu[i].callback_ = (Fl_Callback*)cb_mnuFormSelect; custom_menu[i].user_data_ = (void *)&mCUSTOM, custom_menu[i].flags = 0; custom_menu[i].labeltype_ = FL_NORMAL_LABEL; custom_menu[i].labelfont_ = 0; custom_menu[i].labelsize_ = 14; custom_menu[i].labelcolor_ = 0; custom_pairs[i].mnu_name = 0; custom_pairs[i].file_name = 0; } num_custom_entries = 0; } void load_custom_menu() { static const string key1 = "<META NAME=\"EDITABLE\" CONTENT=\"true\">"; static const string key2 = "<META NAME=\"MENU_ITEM\" CONTENT="; guard_lock web_lock(&mutex_web_server); for (int i = 0; i < NBR_CUSTOM_MENUS; i++) { custom_menu[i].text = 0; custom_menu[i].shortcut_ = 0; if (i) custom_menu[i].callback_ = (Fl_Callback*)cb_mnuCustomFormSelect; else custom_menu[i].callback_ = (Fl_Callback*)cb_open_custom_transfer_tab; custom_menu[i].user_data_ = 0; if (i) custom_menu[i].flags = 0; else custom_menu[i].flags = FL_MENU_DIVIDER; custom_menu[i].labeltype_ = FL_NORMAL_LABEL; custom_menu[i].labelfont_ = 0; custom_menu[i].labelsize_ = 14; custom_menu[i].labelcolor_ = 0; if (custom_pairs[i].mnu_name) delete [] custom_pairs[i].mnu_name; custom_pairs[i].mnu_name = 0; if (custom_pairs[i].file_name) delete [] custom_pairs[i].file_name; custom_pairs[i].file_name = 0; } num_custom_entries = 0; DIR *cdir = opendir(CUSTOM_dir.c_str()); if (!cdir) return; dirent *dentry = 0; string contents; string fname; string menu_name; ifstream in; char cin; dentry = readdir(cdir); while (dentry) { fname = CUSTOM_dir; fname.append(dentry->d_name); if (fname.find(".htm") != string::npos) { contents.clear(); in.open(fname.c_str(), ios::in); if (in) { while (in.get(cin)) contents += cin; in.close(); size_t p = string::npos; const char *ptr = strcasestr(contents.c_str(), key1.c_str()); if (ptr) p = ptr - contents.c_str(); if ( p != string::npos) { p = string::npos; ptr = strcasestr(contents.c_str(), key2.c_str()); if (ptr) p = ptr - contents.c_str(); if (p != string::npos) { p += key2.length() + 1; contents.erase(0, p); p = contents.find("\""); menu_name = contents.substr(0, p); // custom pair item custom_pairs[num_custom_entries].mnu_name = new char[menu_name.length() + 1]; strcpy( custom_pairs[num_custom_entries].mnu_name, menu_name.c_str()); custom_pairs[num_custom_entries].file_name = new char[strlen(dentry->d_name) + 1]; strcpy( custom_pairs[num_custom_entries].file_name, dentry->d_name); num_custom_entries++; } } } } dentry = readdir(cdir); } closedir(cdir); for (int i = 0; i < num_custom_entries - 1; i++) for (int j = i+1; j < num_custom_entries; j++) if (strcmp(custom_pairs[j].mnu_name, custom_pairs[i].mnu_name) < 0) { CUSTOM_PAIRS temp = custom_pairs[j]; custom_pairs[j] = custom_pairs[i]; custom_pairs[i] = temp; } custom_menu[0].text = "Transfer FORM"; custom_menu[0].user_data_ = 0; for (int i = 0; i < num_custom_entries; i++) { // custom menu item custom_menu[i+1].text = custom_pairs[i].mnu_name; custom_menu[i+1].user_data_ = (void *)i; } update_custom_transfer(); } vector<string> custom_files; void update_custom_transfer() { string current_selection = custom_selector->value(); custom_files.clear(); custom_selector->clear(); if (num_custom_entries == 0) return; for (int i = 0; i < num_custom_entries; i++) { custom_selector->add(custom_pairs[i].mnu_name); custom_files.push_back(custom_pairs[i].file_name); } if (current_selection.empty()) custom_selector->index(0); else custom_selector->value(current_selection.c_str()); def_custom_transfer_filename = custom_files[custom_selector->index()]; // def_custom_transfer_filename = custom_pairs[0].file_name; } void load_custom_transfer() { if (tab_custom_transfer->visible()) return; update_custom_transfer(); } //------------------------------------------------------------------------------ extern void drop_file_changed(); static void cb_drop_file(Fl_Input*, void*) { drop_file_changed(); } void cb_btn_estimate() { estimate(); } void cb_use_compression() { progStatus.use_compression = btn_use_compression->value(); estimate(); } void cb_use_encoder() { progStatus.encoder = encoders->index(); estimate(); } void cb_cbo_modes() { estimate(); if (!progStatus.change_modem_with_autosend) send_new_modem(); } Fl_Double_Window* flmsg_dialog() { int W = 570, H = 465; Fl_Double_Window* w = new Fl_Double_Window(570, 465, "");; w->begin(); w->align(FL_ALIGN_INSIDE); mb = new Fl_Menu_Bar(0, 0, W, 22); mb->menu(menu_); init_custom_menu(); txt_formname = new Fl_Output(4, 26, 220, 20); txt_formname->box(FL_FLAT_BOX); txt_formname->color(fl_rgb_color(245, 245, 245)); // white smoke txt_filename = new Fl_Output(260, 26, 270, 20, _("file:")); txt_filename->box(FL_FLAT_BOX); txt_filename->align(FL_ALIGN_LEFT); txt_filename->color(fl_rgb_color(245, 245, 245)); drop_file = new Fl_Input2(535, 22, 28, 28); drop_file->box(FL_OVAL_BOX); drop_file->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); drop_file->value(""); drop_file->color(fl_rgb_color(108, 166, 205)); drop_file->cursor_color(fl_rgb_color(108, 166, 205)); drop_file->labelcolor( fl_rgb_color( 205, 55, 0) ); drop_file->label("DnD"); drop_file->tooltip(_("drag and drop files here ...")); drop_file->callback((Fl_Callback*)cb_drop_file); drop_file->when(FL_WHEN_CHANGED); tab_top = 46; create_ics_tab(); create_hics_tab(); create_mars_tab(); create_cap105_tab(); create_cap110_tab(); create_iaru_tab(); create_radiogram_tab(); create_redx_tab(); create_plaintext_tab(); create_blank_tab(); create_csv_tab(); create_custom_tab(); create_dnd_tab(); create_wxhc_tab(); create_severe_wx_tab(); create_storm_tab(); create_transfer_tab(); create_custom_transfer_tab(); controls = new Fl_Group(2, 465 - 28, 566, 26, "controls"); controls->begin(); controls->box(FL_ENGRAVED_BOX); controls->align(FL_ALIGN_INSIDE); controls->copy_label(""); btn_use_compression = new Fl_Check_Button(10, H-28+4, 60, 18, _("Comp")); btn_use_compression->tooltip(_("Data will be sent compressed\nif file size is reduced")); btn_use_compression->down_box(FL_DOWN_BOX); btn_use_compression->callback((Fl_Callback*)cb_use_compression); btn_use_compression->value(progStatus.use_compression); encoders = new Fl_ListBox(74, H-28+2, 100, 22, "encoders"); encoders->begin(); encoders->copy_label(""); encoders->align(FL_ALIGN_INSIDE); encoders->when(FL_WHEN_RELEASE); encoders->tooltip(_("Encode after compression")); encoders->callback((Fl_Callback*)cb_use_encoder); encoders->end(); cbo_modes = new Fl_ListBox(180, H-28+2, 120, 22, "cbo_modes"); cbo_modes->begin(); cbo_modes->copy_label(""); cbo_modes->align(FL_ALIGN_INSIDE); cbo_modes->when(FL_WHEN_RELEASE); cbo_modes->tooltip(_("fldigi modem type")); cbo_modes->box(FL_DOWN_BOX); cbo_modes->color(FL_BACKGROUND2_COLOR); cbo_modes->selection_color(FL_BACKGROUND_COLOR); cbo_modes->labeltype(FL_NORMAL_LABEL); cbo_modes->labelfont(0); cbo_modes->labelsize(14); cbo_modes->labelcolor(FL_FOREGROUND_COLOR); cbo_modes->callback((Fl_Callback*)cb_cbo_modes); cbo_modes->end(); btn_estimate = new Fl_Button(305, H-28+4, 18, 18, "*"); btn_estimate->tooltip(_("Press to update size/time")); btn_estimate->callback((Fl_Callback*)cb_btn_estimate); txt_xfr_size_time = new Fl_Output(330, H-28+2, 230, 22, ""); txt_xfr_size_time->tooltip(_("Transfer size / time")); controls->end(); w->end(); init_cbo_modes(); init_encoders(); return w; } static void cb_btnCloseOptions(Fl_Return_Button*, void*) { closeoptions(); } static int opt_col_sizes[] = {200, 0}; Fl_Double_Window* optionsdialog() { int H = 300, W = 560; Fl_Double_Window* w = new Fl_Double_Window(W, H, _("Command Line Options")); brwsOptions = new Fl_Browser(2, 2, W - 4, H - 4 - 5 - 20); brwsOptions->column_widths(opt_col_sizes); btnCloseOptions = new Fl_Return_Button(W - 4 - 72, H - 5 - 20, 72, 20, _("OK")); btnCloseOptions->callback((Fl_Callback*)cb_btnCloseOptions); w->end(); return w; } static void cb_select_arl(Fl_Browser* o, void*) { arl_nbr = o->value()- 1; arl_text->clear(); arl_text->addstr(arl_list[arl_nbr].text); txt_arl_fill1->value(""); txt_arl_fill1->deactivate(); txt_arl_fill2->value(""); txt_arl_fill2->deactivate(); txt_arl_fill3->value(""); txt_arl_fill3->deactivate(); txt_arl_fill4->value(""); txt_arl_fill4->deactivate(); if (arl_list[arl_nbr].nfills > 0) txt_arl_fill1->activate(); if (arl_list[arl_nbr].nfills > 1) txt_arl_fill2->activate(); if (arl_list[arl_nbr].nfills > 2) txt_arl_fill3->activate(); if (arl_list[arl_nbr].nfills > 3) txt_arl_fill4->activate(); } static void cb_btn_arl_cancel(Fl_Button*, void*) { cb_arl_cancel(); } static void cb_btn_arl_add(Fl_Button*, void*) { cb_arl_add(); } static void cb_btnInsertX(Fl_Check_Button* o, void*) { progStatus.insert_x = o->value(); } Fl_Double_Window* arl_dialog() { Fl_Double_Window* w = new Fl_Double_Window(521, 261, _("ARL Message Selector")); w->begin(); select_arl = new Fl_Browser(6, 21, 161, 107, _("ARL #")); select_arl->type(2); select_arl->callback((Fl_Callback*)cb_select_arl); select_arl->align(FL_ALIGN_TOP); txt_arl_fill1 = new Fl_Input2(48, 131, 465, 22, _("fill 1:")); txt_arl_fill2 = new Fl_Input2(48, 155, 465, 22, _("fill 2:")); txt_arl_fill3 = new Fl_Input2(48, 179, 465, 22, _("fill 3:")); txt_arl_fill4 = new Fl_Input2(48, 204, 465, 22, _("fill 4:")); btn_arl_cancel = new Fl_Button(362, 232, 70, 20, _("Cancel")); btn_arl_cancel->callback((Fl_Callback*)cb_btn_arl_cancel); btn_arl_add = new Fl_Button(440, 232, 70, 20, _("Add")); btn_arl_add->callback((Fl_Callback*)cb_btn_arl_add); arl_text = new FTextEdit(169, 21, 345, 107, _("Message:")); arl_text->tooltip(_("Message contents - recommend limit to 25 words or less")); arl_text->box(FL_DOWN_BOX); arl_text->color((Fl_Color)FL_LIGHT3); arl_text->selection_color((Fl_Color)FL_SELECTION_COLOR); arl_text->labeltype(FL_NORMAL_LABEL); arl_text->labelfont(0); arl_text->labelsize(14); arl_text->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); arl_text->align(FL_ALIGN_TOP_LEFT); arl_text->when(FL_WHEN_RELEASE); Fl_Group::current()->resizable(arl_text); btnInsertX = new Fl_Check_Button(18, 234, 201, 15, _("Insert \"X\" between fields")); btnInsertX->down_box(FL_DOWN_BOX); btnInsertX->callback((Fl_Callback*)cb_btnInsertX); btnInsertX->value(progStatus.insert_x); w->end(); return w; } Fl_ListBox *sel_hx_select = (Fl_ListBox *)0; static void cb_sel_hx_select(Fl_ListBox*, void*) { cb_hx_select(); } Fl_Button *btn_hx_select_add = (Fl_Button *)0; static void cb_btn_hx_select_add(Fl_Button*, void*) { cb_hx_select_add(); } Fl_Input2 *txt_hx_select_text = (Fl_Input2 *)0; Fl_Button *btn_hx_select_cancel = (Fl_Button *)0; static void cb_btn_hx_select_cancel(Fl_Button*, void*) { cb_hx_select_cancel(); } Fl_Return_Button *btn_hx_select_ok = (Fl_Return_Button *)0; static void cb_btn_hx_select_ok(Fl_Return_Button*, void*) { cb_hx_select_ok(); } Fl_Output *txt_hx_instructions = (Fl_Output *)0; Fl_Double_Window* hx_dialog() { Fl_Double_Window* w = new Fl_Double_Window(359, 121, _("Optional Handling")); w->begin(); sel_hx_select = new Fl_ListBox(3, 20, 68, 24, _("HX__:")); sel_hx_select->callback((Fl_Callback*)cb_sel_hx_select); sel_hx_select->align(FL_ALIGN_TOP_LEFT); btn_hx_select_add = new Fl_Button(73, 20, 30, 24, _("=>")); btn_hx_select_add->callback((Fl_Callback*)cb_btn_hx_select_add); txt_hx_select_text = new Fl_Input2(105, 20, 121, 24, _("HX text")); txt_hx_select_text->box(FL_DOWN_BOX); txt_hx_select_text->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_hx_select_text->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_hx_select_text->labeltype(FL_NORMAL_LABEL); txt_hx_select_text->labelfont(0); txt_hx_select_text->labelsize(14); txt_hx_select_text->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_hx_select_text->align(FL_ALIGN_TOP_LEFT); txt_hx_select_text->when(FL_WHEN_RELEASE); btn_hx_select_cancel = new Fl_Button(229, 20, 60, 24, _("Cancel")); btn_hx_select_cancel->callback((Fl_Callback*)cb_btn_hx_select_cancel); btn_hx_select_ok = new Fl_Return_Button(293, 20, 60, 24, _("OK")); btn_hx_select_ok->callback((Fl_Callback*)cb_btn_hx_select_ok); txt_hx_instructions = new Fl_Output(5, 47, 348, 70); txt_hx_instructions->type(12); txt_hx_instructions->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); w->end(); return w; } Fl_Double_Window* headers_dialog() { Fl_Double_Window* w = new Fl_Double_Window(500, 200, _("Transfer/Edit trail")); w->begin(); txt_hdr_from = new Fl_Input2(50, 30, 440, 80, _("From:")); txt_hdr_from->type(4); txt_hdr_edit = new Fl_Input2(50, 115, 440, 80, _("Edit:")); txt_hdr_edit->type(4); w->end(); return w; } //============================================================================== // configuration dialog //============================================================================== Fl_Round_Button *btn_dtformat0 = (Fl_Round_Button *)0; Fl_Round_Button *btn_dtformat1 = (Fl_Round_Button *)0; Fl_Round_Button *btn_dtformat2 = (Fl_Round_Button *)0; Fl_Round_Button *btn_dtformat3 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format0 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format1 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format2 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format3 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format4 = (Fl_Round_Button *)0; Fl_Round_Button *btn_utc_format5 = (Fl_Round_Button *)0; Fl_Check_Button *btn_caplocal = (Fl_Check_Button *)0; Fl_Input2 *txt_my_call = (Fl_Input2 *)0; Fl_Input2 *txt_my_tel = (Fl_Input2 *)0; Fl_Input2 *txt_my_name = (Fl_Input2 *)0; Fl_Input2 *txt_my_addr = (Fl_Input2 *)0; Fl_Input2 *txt_my_city = (Fl_Input2 *)0; Fl_Input2 *txt_my_email = (Fl_Input2 *)0; Fl_Check_Button *btn_open_on_export = (Fl_Check_Button *)0; Fl_Check_Button *btn_call_fname = (Fl_Check_Button *)0; Fl_Check_Button *btn_dt_fname = (Fl_Check_Button *)0; Fl_Check_Button *btn_sernbr_fname = (Fl_Check_Button *)0; Fl_Input2 *txt_sernbr = (Fl_Input2 *)0; Fl_Spinner *cnt_wpl = (Fl_Spinner *)0; Fl_Check_Button *btn_rgnbr_fname = (Fl_Check_Button *)0; Fl_Check_Button *btn_arl_desc = (Fl_Check_Button *)0; Fl_Input2 *txt_rgnbr = (Fl_Input2 *)0; Fl_Input2 * txt_socket_addr = (Fl_Input2 *)0; Fl_Input2 * txt_socket_port = (Fl_Input2 *)0; Fl_Output * txt_web_port = (Fl_Output *)0; static void cb_btn_dtformat0(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.dtformat = 0; btn_dtformat1->value(0); btn_dtformat2->value(0); btn_dtformat3->value(0); }; } static void cb_btn_dtformat1(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.dtformat = 1; btn_dtformat0->value(0); btn_dtformat2->value(0); btn_dtformat3->value(0); }; } static void cb_btn_dtformat2(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.dtformat = 2; btn_dtformat0->value(0); btn_dtformat1->value(0); btn_dtformat3->value(0); }; } static void cb_btn_dtformat3(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.dtformat = 3; btn_dtformat0->value(0); btn_dtformat1->value(0); btn_dtformat2->value(0); }; } static void set_local_datetime() { //ONLY include those calendar widgets that rely on progStatus.UTC //for the date and time format! h206_txt_date_prepared->local_datetime(progStatus.UTC > 1); h213_txt_date->local_datetime(progStatus.UTC > 1); } static void cb_btn_utc_format0(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 0; btn_utc_format1->value(0); btn_utc_format2->value(0); btn_utc_format3->value(0); btn_utc_format4->value(0); btn_utc_format5->value(0); }; set_local_datetime(); } static void cb_btn_utc_format1(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 1; btn_utc_format0->value(0); btn_utc_format2->value(0); btn_utc_format3->value(0); btn_utc_format4->value(0); btn_utc_format5->value(0); }; set_local_datetime(); } static void cb_btn_utc_format2(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 2; btn_utc_format1->value(0); btn_utc_format0->value(0); btn_utc_format3->value(0); btn_utc_format4->value(0); btn_utc_format5->value(0); }; set_local_datetime(); } static void cb_btn_utc_format3(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 3; btn_utc_format1->value(0); btn_utc_format2->value(0); btn_utc_format0->value(0); btn_utc_format4->value(0); btn_utc_format5->value(0); }; set_local_datetime(); } static void cb_btn_utc_format4(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 4; btn_utc_format1->value(0); btn_utc_format2->value(0); btn_utc_format3->value(0); btn_utc_format0->value(0); btn_utc_format5->value(0); }; set_local_datetime(); } static void cb_btn_utc_format5(Fl_Round_Button* o, void*) { if (o->value()) { progStatus.UTC = 5; btn_utc_format1->value(0); btn_utc_format2->value(0); btn_utc_format3->value(0); btn_utc_format4->value(0); btn_utc_format0->value(0); }; set_local_datetime(); } static void cb_caplocal(Fl_Check_Button *o, void*) { if (o->value()) progStatus.caplocal = true; else progStatus.caplocal = false; } static void cb_txt_my_call(Fl_Input* o, void*) { progStatus.my_call = o->value(); } static void cb_txt_my_tel(Fl_Input* o, void*) { progStatus.my_tel = o->value(); } static void cb_txt_my_name(Fl_Input* o, void*) { progStatus.my_name = o->value(); } static void cb_txt_my_addr(Fl_Input* o, void*) { progStatus.my_addr = o->value(); } static void cb_txt_my_email(Fl_Input* o, void*) { progStatus.my_email = o->value(); } static void cb_txt_my_city(Fl_Input* o, void*) { progStatus.my_city = o->value(); } static void cb_cnt_wpl(Fl_Spinner* o, void*) { progStatus.wpl = (int)o->value(); } static void cb_btn_open_on_export(Fl_Check_Button* o, void*) { progStatus.open_on_export = o->value(); } static void cb_btn_call_fname(Fl_Check_Button* o, void*) { progStatus.call_fname = o->value(); } static void cb_btn_dt_fname(Fl_Check_Button* o, void*) { progStatus.dt_fname = o->value(); } static void cb_btn_sernbr_fname(Fl_Check_Button* o, void*) { progStatus.sernbr_fname = o->value(); } static void cb_txt_sernbr(Fl_Input* o, void*) { progStatus.sernbr = o->value(); } static void cb_btn_rgnbr_fname(Fl_Check_Button* o, void*) { progStatus.rgnbr_fname = o->value(); } static void cb_txt_rgnbr(Fl_Input* o, void*) { progStatus.rgnbr = o->value(); } static void cb_btn_arl_desc(Fl_Check_Button* o, void*) { progStatus.arl_desc = o->value(); } Fl_Group *create_tab_date_time(int X, int Y, int W, int H, const char *title) { Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 40; X += 40; btn_dtformat0 = new Fl_Round_Button(X, Y+8, 70, 20, _("YYYY-MM-DD")); btn_dtformat0->down_box(FL_ROUND_DOWN_BOX); btn_dtformat0->callback((Fl_Callback*)cb_btn_dtformat0); if (progStatus.dtformat == 0) btn_dtformat0->value(1); else btn_dtformat0->value(0); btn_dtformat3 = new Fl_Round_Button(X, Y+30, 70, 20, _("YYYY-DD-MM")); btn_dtformat3->down_box(FL_ROUND_DOWN_BOX); btn_dtformat3->callback((Fl_Callback*)cb_btn_dtformat3); if (progStatus.dtformat == 3) btn_dtformat3->value(1); else btn_dtformat3->value(0); btn_dtformat1 = new Fl_Round_Button(X, Y+52, 70, 20, _("MM/DD/YY")); btn_dtformat1->down_box(FL_ROUND_DOWN_BOX); btn_dtformat1->callback((Fl_Callback*)cb_btn_dtformat1); if (progStatus.dtformat == 1) btn_dtformat1->value(1); else btn_dtformat1->value(0); btn_dtformat2 = new Fl_Round_Button(X, Y+74, 70, 20, _("DD/MM/YY")); btn_dtformat2->down_box(FL_ROUND_DOWN_BOX); btn_dtformat2->callback((Fl_Callback*)cb_btn_dtformat2); if (progStatus.dtformat == 2) btn_dtformat2->value(1); else btn_dtformat2->value(0); btn_caplocal = new Fl_Check_Button(X, Y+118, 70, 20, _("CAP Local time")); btn_caplocal->tooltip(_("Check to use local date/time\ndefault Zulu")); btn_caplocal->callback((Fl_Callback*)cb_caplocal); X += 200; btn_utc_format0 = new Fl_Round_Button(X, Y+8, 70, 20, _("hhmmL")); btn_utc_format0->down_box(FL_ROUND_DOWN_BOX); btn_utc_format0->callback((Fl_Callback*)cb_btn_utc_format0); if (progStatus.UTC == 0) btn_utc_format0->value(1); else btn_utc_format0->value(0); btn_utc_format1 = new Fl_Round_Button(X, Y+30, 70, 20, _("hh:mmL")); btn_utc_format1->down_box(FL_ROUND_DOWN_BOX); btn_utc_format1->callback((Fl_Callback*)cb_btn_utc_format1); if (progStatus.UTC == 1) btn_utc_format1->value(1); else btn_utc_format1->value(0); btn_utc_format2 = new Fl_Round_Button(X, Y+52, 70, 20, _("hhmmZ")); btn_utc_format2->down_box(FL_ROUND_DOWN_BOX); btn_utc_format2->callback((Fl_Callback*)cb_btn_utc_format2); if (progStatus.UTC == 2) btn_utc_format2->value(1); else btn_utc_format2->value(0); btn_utc_format3 = new Fl_Round_Button(X, Y+74, 70, 20, _("hh:mmZ")); btn_utc_format3->down_box(FL_ROUND_DOWN_BOX); btn_utc_format3->callback((Fl_Callback*)cb_btn_utc_format3); if (progStatus.UTC == 3) btn_utc_format3->value(1); else btn_utc_format3->value(0); btn_utc_format4 = new Fl_Round_Button(X, Y+96, 70, 20, _("hhmm UTC")); btn_utc_format4->down_box(FL_ROUND_DOWN_BOX); btn_utc_format4->callback((Fl_Callback*)cb_btn_utc_format4); if (progStatus.UTC == 4) btn_utc_format4->value(1); else btn_utc_format4->value(0); btn_utc_format5 = new Fl_Round_Button(X, Y+118, 70, 20, _("hh:mm UTC")); btn_utc_format5->down_box(FL_ROUND_DOWN_BOX); btn_utc_format5->callback((Fl_Callback*)cb_btn_utc_format5); if (progStatus.UTC == 5) btn_utc_format5->value(1); else btn_utc_format5->value(0); grp->end(); return grp; } Fl_Group *create_tab_personal(int X, int Y, int W, int H, const char *title) { Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 10; txt_my_call = new Fl_Input2(X+90, Y+6, W - 94, 24, _("Call:")); txt_my_call->callback((Fl_Callback*)cb_txt_my_call); txt_my_call->value(progStatus.my_call.c_str()); txt_my_tel = new Fl_Input2(X+90, Y+32, W - 94, 24, _("Tel:")); txt_my_tel->callback((Fl_Callback*)cb_txt_my_tel); txt_my_tel->value(progStatus.my_tel.c_str()); txt_my_name = new Fl_Input2(X+90, Y+58, W - 94, 24, _("Name:")); txt_my_name->callback((Fl_Callback*)cb_txt_my_name); txt_my_name->value(progStatus.my_name.c_str()); txt_my_addr = new Fl_Input2(X+90, Y+84, W - 94, 24, _("Addr:")); txt_my_addr->callback((Fl_Callback*)cb_txt_my_addr); txt_my_addr->value(progStatus.my_addr.c_str()); txt_my_city = new Fl_Input2(X+90, Y+110, W - 94, 24, _("City/St/Zip:")); txt_my_city->callback((Fl_Callback*)cb_txt_my_city); txt_my_city->value(progStatus.my_city.c_str()); txt_my_email = new Fl_Input2(X+90, Y+136, W - 94, 24, _("Email addr:")); txt_my_email->callback((Fl_Callback*)cb_txt_my_email); txt_my_email->value(progStatus.my_email.c_str()); grp->end(); return grp; } Fl_Group *create_tab_radiogram(int X, int Y, int W, int H, const char *title) { Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 30; cnt_wpl = new Fl_Spinner(60, Y, 40, 24, _("message words/line")); cnt_wpl->tooltip(_("Radiogram message contents auto format")); cnt_wpl->minimum(4); cnt_wpl->maximum(10); cnt_wpl->value(5); cnt_wpl->callback((Fl_Callback*)cb_cnt_wpl); cnt_wpl->align(FL_ALIGN_RIGHT); cnt_wpl->value(progStatus.wpl); Y += 30; btn_rgnbr_fname = new Fl_Check_Button(60, Y, 70, 24, _("Auto incr\'")); btn_rgnbr_fname->tooltip(_("enable auto increment of message number")); btn_rgnbr_fname->down_box(FL_DOWN_BOX); btn_rgnbr_fname->callback((Fl_Callback*)cb_btn_rgnbr_fname); btn_rgnbr_fname->value(progStatus.rgnbr_fname); Y += 30; txt_rgnbr = new Fl_Input2(60, Y, 66, 24, _("Next #")); txt_rgnbr->tooltip(_("next number in auto-increment sequence")); txt_rgnbr->type(2); txt_rgnbr->callback((Fl_Callback*)cb_txt_rgnbr); txt_rgnbr->align(FL_ALIGN_RIGHT); txt_rgnbr->value(progStatus.rgnbr.c_str()); Y += 30; btn_arl_desc = new Fl_Check_Button(60, Y, 70, 24, _("Show ARL desc\'")); btn_arl_desc->tooltip(_("Add keyed text descriptions for ARL ## messages")); btn_arl_desc->down_box(FL_DOWN_BOX); btn_arl_desc->callback((Fl_Callback*)cb_btn_arl_desc); btn_arl_desc->value(progStatus.arl_desc); grp->end(); return grp; } void cb_find_roster() { string filename = ICS_dir; filename.append("MARS_ROSTER.csv"); const char *p = FSEL::select( "Select MARS roster file", "csv file\t*.{csv,CSV}", filename.c_str()); if (p) { progStatus.mars_roster_file = p; txt_mars_roster_file->value(p); } } void cb_autowordwrap() { progStatus.autowordwrap = btnAutoWordWrap->value(); } void cb_charcount() { progStatus.charcount = cntCharCount->value(); } void cb_force_compression(Fl_Check_Button *w, void *) { progStatus.force_compression = w->value(); } Fl_Group *create_tab_files(int X, int Y, int W, int H, const char *title) { Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 10; Fl_Group* group1 = new Fl_Group(X+2, Y, W-4, 50, _("Wrap")); group1->box(FL_ENGRAVED_FRAME); group1->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); btn_open_on_export = new Fl_Check_Button(X+10, Y+24, 18, 18, _("Open folder when exporting")); btn_open_on_export->tooltip(_("")); btn_open_on_export->down_box(FL_DOWN_BOX); btn_open_on_export->callback((Fl_Callback*)cb_btn_open_on_export); btn_open_on_export->value(progStatus.open_on_export); group1->end(); Fl_Group* group2 = new Fl_Group(X+2, Y+54, W-4, 70, _("Naming Files")); group2->box(FL_ENGRAVED_FRAME); group2->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); btn_call_fname = new Fl_Check_Button(X+10, Y+76, 18, 18, _("Callsign")); btn_call_fname->down_box(FL_DOWN_BOX); btn_call_fname->callback((Fl_Callback*)cb_btn_call_fname); btn_call_fname->value(progStatus.call_fname); btn_dt_fname = new Fl_Check_Button(X+100, Y+76, 18, 18, _("Date-time")); btn_dt_fname->down_box(FL_DOWN_BOX); btn_dt_fname->callback((Fl_Callback*)cb_btn_dt_fname); btn_dt_fname->value(progStatus.dt_fname); btn_sernbr_fname = new Fl_Check_Button(X+10, Y+96, 18, 18, _("Serial #")); btn_sernbr_fname->down_box(FL_DOWN_BOX); btn_sernbr_fname->callback((Fl_Callback*)cb_btn_sernbr_fname); btn_sernbr_fname->value(progStatus.sernbr_fname); txt_sernbr = new Fl_Input2(X+100, Y+96, 66, 22, _("Next #")); txt_sernbr->type(2); txt_sernbr->callback((Fl_Callback*)cb_txt_sernbr); txt_sernbr->align(FL_ALIGN_RIGHT); txt_sernbr->value(progStatus.sernbr.c_str()); group2->end(); Fl_Group* group3 = new Fl_Group(X+2, Y+130, W-4, 46, ""); group3->box(FL_ENGRAVED_FRAME); txt_mars_roster_file = new Fl_Input2(X+10, Y+148, 360, 22, _("MARS roster file")); txt_mars_roster_file->align(FL_ALIGN_TOP_LEFT); Fl_Button *btn_find_roster = new Fl_Button(X+372, Y+148, 68, 22, _("Find")); btn_find_roster->callback((Fl_Callback*)cb_find_roster); group3->end(); Fl_Group* group4 = new Fl_Group(X+2, Y+179, W-4, 46, "Html message text"); group4->box(FL_ENGRAVED_FRAME); group4->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); btnAutoWordWrap = new Fl_Check_Button(X+10, Y+200, 18, 18, _("Word wrap at ")); btnAutoWordWrap->down_box(FL_DOWN_BOX); btnAutoWordWrap->value(progStatus.autowordwrap); btnAutoWordWrap->callback((Fl_Callback*)cb_autowordwrap); cntCharCount = new Fl_Counter(X+135, Y+198, 60, 20, _("characters")); cntCharCount->align(FL_ALIGN_RIGHT); cntCharCount->value(progStatus.charcount); cntCharCount->type(FL_SIMPLE_COUNTER); cntCharCount->step(1); cntCharCount->callback((Fl_Callback*)cb_charcount); group4->end(); Fl_Group* group5 = new Fl_Group(X+2, Y+227, W-4, 28, ""); group5->box(FL_ENGRAVED_FRAME); btn_force_compression = new Fl_Check_Button(X+10, Y+230, 20, 20, _("Force compression on xmt data")); btn_force_compression->callback((Fl_Callback*)cb_force_compression); btn_force_compression->value(progStatus.force_compression); group5->end(); grp->end(); return grp; } static void cb_txt_socket_addr(Fl_Input* o, void*) { progStatus.socket_addr = o->value(); } static void cb_txt_socket_port(Fl_Input* o, void*) { progStatus.socket_port = o->value(); } static void cb_socket_default(Fl_Input* o, void*) { progStatus.socket_addr = "127.0.0.1"; progStatus.socket_port = "7322"; txt_socket_addr->value(progStatus.socket_addr.c_str()); txt_socket_port->value(progStatus.socket_port.c_str()); } static void cb_change_modem_with_autosend(Fl_Check_Button *o, void *) { progStatus.change_modem_with_autosend = o->value(); } static void cb_sync_modem_to_fldigi(Fl_Check_Button *o, void *) { progStatus.sync_modem_to_fldigi = o->value(); } Fl_Button *btn_socket_default = (Fl_Button *)0; Fl_Check_Button *btn_change_modem_with_autosend = (Fl_Check_Button *)0; Fl_Check_Button *btn_sync_modem_to_fldigi = (Fl_Check_Button *)0; Fl_Group *create_tab_socket(int X, int Y, int W, int H, const char *title) { Fl_Group *grp = new Fl_Group(X, Y, W, H, title); Y += 20; X += 150; txt_socket_addr = new Fl_Input2(X, Y+6, 130, 24, _("Fldigi ARQ Addr: ")); txt_socket_addr->tooltip(_("default = 127.0.0.1")); txt_socket_addr->callback((Fl_Callback*)cb_txt_socket_addr); txt_socket_addr->value(progStatus.socket_addr.c_str()); txt_socket_port = new Fl_Input2(X, Y+32, 130, 24, _("Fldigi ARQ Port: ")); txt_socket_port->tooltip(_("default = 7322")); txt_socket_port->callback((Fl_Callback*)cb_txt_socket_port); txt_socket_port->value(progStatus.socket_port.c_str()); txt_web_port = new Fl_Output(X, Y+70, 130, 24, _("Web Server Port: ")); txt_web_port->tooltip("read only"); txt_web_port->value("8080"); btn_sync_modem_to_fldigi = new Fl_Check_Button(X, Y+136, 24, 24, _("Sync modem to fldigi")); btn_sync_modem_to_fldigi->tooltip(_("flmsg will follow modem change in fldigi")); btn_sync_modem_to_fldigi->value(progStatus.sync_modem_to_fldigi); btn_sync_modem_to_fldigi->callback((Fl_Callback*)cb_sync_modem_to_fldigi); btn_change_modem_with_autosend = new Fl_Check_Button(X, Y+174, 24, 24, _("Change modem with autosend")); btn_change_modem_with_autosend->tooltip(_("flmsg sends new modem to fldigi after \"autosend\"")); btn_change_modem_with_autosend->value(progStatus.change_modem_with_autosend); btn_change_modem_with_autosend->callback((Fl_Callback*)cb_change_modem_with_autosend); Fl_Button *btn_socket_default = new Fl_Button(X+45, Y + 210, 70, 24, _("Default")); btn_socket_default->tooltip(""); btn_socket_default->callback((Fl_Callback*)cb_socket_default); grp->end(); return grp; } Fl_Tabs *tabs_config = (Fl_Tabs *)0; Fl_Group *tab_date_time = (Fl_Group *)0; Fl_Group *tab_personal = (Fl_Group *)0; Fl_Group *tab_config_radiogram = (Fl_Group *)0; Fl_Group *tab_files = (Fl_Group *)0; Fl_Group *tab_headers = (Fl_Group *)0; Fl_Group *tab_socket = (Fl_Group *)0; Fl_Double_Window* create_config_dialog() { int W = 450, H = 300, X = 0, Y = 0; Fl_Double_Window* w = new Fl_Double_Window(W, H, _("flmsg config")); w->begin(); tabs_config = new Fl_Tabs(X, Y, W, H); tabs_config->selection_color((Fl_Color)246); Y += 25; H -= 25; tab_personal = create_tab_personal(X, Y, W, H, _("Personal")); tab_date_time = create_tab_date_time(X, Y, W, H, _("Date/Time")); tab_files = create_tab_files(X, Y, W, H, _("Files")); tab_config_radiogram = create_tab_radiogram(X, Y, W, H, _("Radiogram")); tab_socket = create_tab_socket(X, Y, W, H, _("Socket")); tabs_config->end(); w->end(); return w; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/csv/�������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�011304� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/csv/csv_tab.cxx��������������������������������������������������������������������0000664�0001750�0001750�00000006216�12330516146�013362� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" extern void csv_editor(string); Fl_Group *tab_csv = (Fl_Group *)0; FTextEdit *txt_csv_msg = (FTextEdit *)0; Fl_Button *btn_csv_import = (Fl_Button *)0; Fl_Button *btn_csv_export = (Fl_Button *)0; Fl_Button *btn_csv_edit = (Fl_Button *)0; Fl_Button *btn_csv_view = (Fl_Button *)0; static void cb_btn_csv_import(Fl_Button*, void*) { cb_csv_import_data(); } static void cb_btn_csv_export(Fl_Button*, void*) { cb_csv_export_data(false); } static void cb_btn_csv_edit(Fl_Button*, void*) { cb_csv_export_data(true); } static void cb_btn_csv_view(Fl_Button*, void*) { csv_editor(txt_csv_msg->buffer()->text()); } static void do_read_cb(const char *fn) { csv_set_fname(fn); } static void csv_changed(FTextEdit *, void *) { estimate(); } void create_csv_tab() { tab_csv = new Fl_Group(0, tab_top, 570, 430 - tab_top); tab_csv->align(FL_ALIGN_TOP); btn_csv_import = new Fl_Button(570/2 - 220, tab_top + 5, 100, 24, _("Import CSV")); btn_csv_import->tooltip(_("Import data from spreadsheet CSV file")); btn_csv_import->callback((Fl_Callback*)cb_btn_csv_import); btn_csv_export = new Fl_Button(570/2 - 105, tab_top + 5, 100, 24, _("Export CSV")); btn_csv_export->tooltip(_("Export data to spreadsheet CSV file")); btn_csv_export->callback((Fl_Callback*)cb_btn_csv_export); btn_csv_view = new Fl_Button(570/2 + 10, tab_top + 5, 100, 24, _("View CSV")); btn_csv_view->tooltip(_("")); btn_csv_view->callback((Fl_Callback*)cb_btn_csv_view); btn_csv_edit = new Fl_Button(570/2 + 120, tab_top + 5, 100, 24, _("Edit CSV")); btn_csv_edit->tooltip(_("")); btn_csv_edit->callback((Fl_Callback*)cb_btn_csv_edit); txt_csv_msg = new FTextEdit(2, tab_top + 24 + 10, 566, 430 - (tab_top + 24 + 10 + 2)); txt_csv_msg->box(FL_DOWN_FRAME); txt_csv_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_csv_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_csv_msg->labeltype(FL_NORMAL_LABEL); txt_csv_msg->labelfont(0); txt_csv_msg->labelsize(14); txt_csv_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_csv_msg->align(FL_ALIGN_TOP_LEFT); txt_csv_msg->set_read_cb(do_read_cb); txt_csv_msg->callback((Fl_Callback*)csv_changed); txt_csv_msg->when(FL_WHEN_CHANGED); tab_csv->end(); tab_csv->hide(); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/csv/csv_table.cxx������������������������������������������������������������������0000664�0001750�0001750�00000010611�12330516146�013675� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <string> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Input.H> #include <FL/Fl_Check_Button.H> #include <FL/fl_draw.H> #include <FL/fl_ask.H> #include <FL/Fl_Table_Row.H> #include <FL/Fl_Browser.H> using namespace std; Fl_Window *csv_table_editor_dialog = 0; Fl_Browser *csv_browser = 0; static void cb_btn_close_dialog(Fl_Button*, void*) { csv_table_editor_dialog->hide(); } static int *cols; static int ncols; void csv_editor(string data) { if (!csv_table_editor_dialog) { csv_table_editor_dialog = new Fl_Window(0, 0, 500, 300, "CSV Viewer"); // Add children to window csv_table_editor_dialog->begin(); csv_browser = new Fl_Browser(5, 5, 490, 260, ""); Fl_Button *close_dialog = new Fl_Button(405, 271, 80, 24, "Close"); close_dialog->callback((Fl_Callback*)cb_btn_close_dialog); csv_table_editor_dialog->end(); csv_table_editor_dialog->resizable(csv_browser); } int col = 0; string line, field, temp; size_t p0, p1, p2; p0 = p1 = p2 = 0; // replace commas with tab unless contained within a quoted string while ((p0 = data.find(",")) != string::npos) data.replace(p0, 1, "\t"); p0 = 0; while ((p0 = data.find("\"", p0)) != string::npos) { p1 = data.find("\"", p0 + 1); if (p1 == string::npos) break; while ((p2 = data.find("\t", p0)) < p1) data.replace(p2, 1, ","); p0 = p1 + 1; } p0 = 0; while ((p0 = data.find("\"")) != string::npos) data.erase(p0, 1); // count # columns temp = data; p0 = 0; int lcols; while ((p0 = temp.find("\n")) != string::npos) { line = temp.substr(0, p0); lcols = 0; p1 = 0; while ((p1 < line.length()) && ((p1 = line.find("\t", p1)) != string::npos)) { lcols++; p1++; } if (lcols > ncols) ncols = lcols; temp.erase(0, p0 + 1); } ncols += 2; cols = new int[ncols]; for (int i = 0; i < ncols; i++) cols[i] = 0; // compute maximum size of columns temp = data; p0 = 0; while ((p0 = temp.find("\n")) != string::npos) { col = 0; line = temp.substr(0, p0); while (line.length() && (p1 = line.find("\t")) != string::npos) { field = line.substr(0, p1); if (field.length()) { field.append("W"); int colw = fl_width(field.c_str()) + 4; if (colw > cols[col]) cols[col] = colw; } col++; line.erase(0, p1 + 1); } if (line.length()) { line.append("X"); int colw = fl_width(line.c_str()) + 4; if (colw > cols[col]) cols[col] = colw; } temp.erase(0, p0 + 1); } if (temp.length()) { col = 0; while ((p1 = temp.find("t")) != string::npos) { field = temp.substr(0, p1+1); temp.erase(p1 + 1); if (field.length()) { field.append("W"); int colw = fl_width(field.c_str()) + 4; if (colw > cols[col]) cols[col] = colw; } col++; } if (temp.length()) { temp.append("W"); int colw = fl_width(temp.c_str()) + 4; if (colw > cols[col]) cols[col] = colw; } } int width = 0; for (int i = 0; i < ncols; i++) width += cols[i]; width += 24; // space for vertical scrollbar // csv_table_editor_dialog->size(width + 10, csv_table_editor_dialog->h()); // csv_browser->size(width, csv_browser->h()); csv_browser->column_widths((const int *)cols); csv_browser->clear(); temp = data; while ((p0 = temp.find("\n")) != string::npos) { line = temp.substr(0, p0); csv_browser->add(line.c_str()); temp.erase(0, p0 + 1); } if (temp.length()) { csv_browser->add(temp.c_str()); } csv_table_editor_dialog->show(); } �����������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/csv/csv_templates.cxx��������������������������������������������������������������0000664�0001750�0001750�00000002313�12330516146�014604� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char csv_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title></head><body>\ :mg:\ </body></html>"; const char csv_txt_template[] = ":mg:"; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/csv/csv.cxx������������������������������������������������������������������������0000664�0001750�0001750�00000046635�12330516146�012545� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #include "icons.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; // csvform fields string csvbuffer; string def_csv_filename = ""; string base_csv_filename = ""; string def_csv_TemplateName = ""; string csv_title = ":TITLE:"; string csv_msg = ":mg:"; string csv_field; bool using_csv_template = false; void clear_csvfields() { csv_field.clear(); } bool check_csvfields() { return (csv_field != txt_csv_msg->buffer()->text()); } void update_csvfields() { csv_field = txt_csv_msg->buffer()->text(); } void clear_csv_form() { clear_csvfields(); txt_csv_msg->clear(); } void update_csvform() { txt_csv_msg->clear(); txt_csv_msg->add(csv_field.c_str()); } void read_csvbuffer(string data) { clear_csvfields(); read_header(data); csv_field = findstr(data, csv_msg); update_csvform(); } void cb_csv_new() { if (check_csvfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_csv_save(); } } clear_csv_form(); clear_header(); def_csv_filename = ICS_msg_dir; def_csv_filename.append("new"CSVFILE_EXT); show_filename(def_csv_filename); using_csv_template = false; } void cb_csv_import() { fl_alert2("Not implemented"); } void cb_csv_export() { fl_alert2("Not implemented"); } void cb_csv_wrap_import(string wrapfilename, string inpbuffer) { clear_csv_form(); read_csvbuffer(inpbuffer); def_csv_filename = ICS_msg_dir; def_csv_filename.append(wrapfilename); show_filename(def_csv_filename); using_csv_template = false; } int eval_csv_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_csv_filename).append("]"); update_csvfields(); update_header(FROM); evalstr.append(header("<csvform>")); string outbuf = lineout( csv_msg, csv_field ); if (outbuf.empty()) return 0; compress_maybe( outbuf ); evalstr.append( outbuf ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_csv_wrap_export() { if (check_csvfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_csvfields(); if (csv_field.empty()) return; if (base_csv_filename == "new"CSVFILE_EXT || base_csv_filename == "default"CSVFILE_EXT) if (!cb_csv_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_csv_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); csvbuffer.assign(header("<csvform>")); string outbuf = lineout( csv_msg, csv_field ); compress_maybe(outbuf); csvbuffer.append(outbuf); export_wrapfile(base_csv_filename, wrapfilename, csvbuffer, pext != WRAP_EXT); csvbuffer.assign(header("<csvform>")).append(lineout( csv_msg, csv_field )); write_csv(def_csv_filename); } } void cb_csv_wrap_autosend() { if (check_csvfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_csvfields(); if (csv_field.empty()) return; if (base_csv_filename == "new"CSVFILE_EXT || base_csv_filename == "default"CSVFILE_EXT) if (!cb_csv_save_as()) return; update_header(FROM); csvbuffer.assign(header("<csvform>")); string outbuf = lineout( csv_msg, csv_field ); compress_maybe(outbuf); csvbuffer.append(outbuf); xfr_via_socket(base_csv_filename, csvbuffer); csvbuffer.assign(header("<csvform>")).append(lineout( csv_msg, csv_field )); write_csv(def_csv_filename); } void cb_csv_load_template() { string def_csv_filename = def_csv_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"CSVTEMP_EXT, def_csv_filename.c_str()); if (p) { clear_csv_form(); read_data_file(p); def_csv_TemplateName = p; show_filename(def_csv_TemplateName); using_csv_template = true; } } void cb_csv_save_template() { if (!using_csv_template) { cb_csv_save_as_template(); return; } string def_csv_filename = def_csv_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"CSVTEMP_EXT, def_csv_filename.c_str()); if (p) { update_header(CHANGED); update_csvfields(); csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(p); } } void cb_csv_save_as_template() { string def_csv_filename = def_csv_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"CSVTEMP_EXT, def_csv_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_csv_TemplateName = p; if (strlen(pext) == 0) def_csv_TemplateName.append(CSVTEMP_EXT); remove_spaces_from_filename(def_csv_TemplateName); clear_header(); update_header(CHANGED); update_csvfields(); csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(def_csv_TemplateName); show_filename(def_csv_TemplateName); using_csv_template = true; } } void cb_csv_open() { const char *p = FSEL::select(_("Open data file"), "csv form\t*.c2s", def_csv_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_csv_form(); read_data_file(p); using_csv_template = false; def_csv_filename = p; show_filename(def_csv_filename); } void write_csv(string s) { if (csvbuffer.empty()) return; FILE *csvfile = fopen(s.c_str(), "w"); if (!csvfile) return; fwrite(csvbuffer.c_str(), csvbuffer.length(), 1, csvfile); fclose(csvfile); } bool cb_csv_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(".c2s"); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_csv_filename; p = FSEL::saveas(_("Save data file"), "csv form\t*.c2s", newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_csv_filename = p; if (strlen(pext) == 0) def_csv_filename.append(".c2s"); remove_spaces_from_filename(def_csv_filename); update_header(NEW); update_csvfields(); csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(def_csv_filename); using_csv_template = false; show_filename(def_csv_filename); return true; } void cb_csv_save() { if (base_csv_filename == "new.c2s" || base_csv_filename == "default.c2s" || using_csv_template == true) { cb_csv_save_as(); return; } if (check_csvfields()) update_header(CHANGED); update_csvfields(); csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(def_csv_filename); using_csv_template = false; } void cb_csv_msg_type() { if (tabs_msg_type->value() == tab_csv ) { show_filename(def_csv_filename); } else { show_filename(def_rg_filename); } } void cb_csv_import_data() { def_csv_filename = CSV_dir; def_csv_filename.append("default.csv"); const char *p = FSEL::select( _("Import CSV data"), "csv file\t*.csv", def_csv_filename.c_str()); if (!p) return; if (strlen(p) == 0) return;\ clear_csv_form(); clear_estimate(); // open the CSV file, read all data long filesize = 0; char *buff; FILE *csv_datafile; csv_datafile = fopen (p, "r"); if (!csv_datafile) return; // determine its size for buffer creation fseek (csv_datafile, 0, SEEK_END); filesize = ftell (csv_datafile); // test file integrity if (filesize == 0) { fl_alert2(_("Empty file")); return; } buff = new char[filesize + 1]; memset(buff, 0, filesize + 1); // read the entire file into the buffer fseek (csv_datafile, 0, SEEK_SET); int retval = fread (buff, filesize, 1, csv_datafile); fclose (csv_datafile); if (retval != 1) return; csv_field = buff; // strip any cr-lf pairs if the file was a DOS text file size_t ptr = csv_field.find("\r\n"); while (ptr != string::npos) { csv_field.erase(ptr, 1); ptr = csv_field.find("\r\n"); } update_csvform(); delete [] buff; using_csv_template = false; def_csv_filename = ICS_msg_dir; def_csv_filename.append(fl_filename_name(p)); size_t pext = def_csv_filename.find(".csv"); if (pext == string::npos) pext = def_csv_filename.find(".CSV"); if (pext != string::npos) def_csv_filename.erase(pext); def_csv_filename.append(".c2s"); show_filename(def_csv_filename); estimate(); } void cb_csv_export_data(bool open_file) { update_csvfields(); if (csv_field.empty()) return; string fname_name = fl_filename_name(def_csv_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string csv_name = CSV_dir; csv_name.append(fname_name).append(".csv"); const char *pfilename = FSEL::saveas( _("Export CSV data"), "csv file\t*.csv", csv_name.c_str()); if (!pfilename) return; if (strlen(pfilename) == 0) return; csv_name = pfilename; if (csv_name.find(".csv") == string::npos) csv_name.append(".csv"); FILE *csvfile = fopen(csv_name.c_str(), "w"); fprintf(csvfile,"%s", csv_field.c_str()); fclose(csvfile); if (open_file) { fl_alert2("If you modify the data you must save as CSV and\nimport the modified file"); open_url(pfilename); } else fl_alert2("Data written to %s", csv_name.c_str()); } void csv_set_fname(const char *fn) { string fname = fn; size_t pext = fname.find(".csv"); if (pext == string::npos) pext = fname.find(".CSV"); if (pext == string::npos) { txt_csv_msg->clear(); return; } using_csv_template = false; def_csv_filename = ICS_msg_dir; def_csv_filename.append(fl_filename_name(fn)); def_csv_filename.find(".csv"); if (pext == string::npos) pext = def_csv_filename.find(".CSV"); if (pext != string::npos) def_csv_filename.erase(pext); def_csv_filename.append(".c2s"); show_filename(def_csv_filename); } void custom_csv_html(string form, string contents) { string fname_name = fl_filename_name(def_csv_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string csv_name = FLMSG_temp_dir; csv_name.append(fname_name).append(".htm"); string line; string field; string data; while (data[0] == '\n') data.erase(0,1); size_t comma = contents.find(","); while (contents[comma+1] == ' ') contents.erase(comma+1,1); size_t quote = contents.find("\""); size_t lfptr = contents.find("\n"); size_t tab; if (quote == comma + 1) { contents.erase(quote,1); lfptr = contents.find("\"\n"); } while (comma != string::npos) { field = ":"; field.append(contents.substr(0, comma)).append(":"); if (lfptr != string::npos) { data = contents.substr(comma + 1, lfptr - comma - 1); tab = data.find("\t"); while (tab != string::npos) { data.replace(tab, 1, " "); tab = data.find("\t"); } contents.erase(0, lfptr + 1); while (data[0] == '\n') data.erase(0,1); while ((quote = data.find("\"")) != string::npos) data.erase(quote,1); } else { data = contents.substr(comma + 1); tab = data.find("\t"); while (tab != string::npos) { data.replace(tab, 1, " "); tab = data.find("\t"); } while ((quote = data.find("\"")) != string::npos) data.erase(quote,1); contents.clear(); } lfptr = data.find("\n"); while (lfptr != string::npos) { data.replace(lfptr, 1, "<br>"); lfptr = data.find("\n"); } replacestr(form, field, data); comma = contents.find(","); while (contents[comma+1] == ' ') contents.erase(comma+1,1); quote = contents.find("\""); if (quote == comma + 1) { contents.erase(quote,1); lfptr = contents.find("\"\n"); } else lfptr = contents.find("\n"); } FILE *csvfile = fopen(csv_name.c_str(), "w"); fprintf(csvfile,"%s", form.c_str()); fclose(csvfile); open_url(csv_name.c_str()); } void cb_csv_html() { update_csvfields(); if (csv_field.find("CUSTOM_FORM") == 0) { size_t plf = csv_field.find("\n"); if (plf != string::npos) { string fname = CUSTOM_dir; fname.append(csv_field.substr(12, plf - 12)); fname.append(".htm"); FILE *ffile = fopen(fname.c_str(), "r"); if (!ffile) { fname += 'l'; ffile = fopen(fname.c_str(), "r"); } if (ffile) { string form; char c; while ((c = fgetc(ffile)) != EOF) form += c; fclose(ffile); custom_csv_html(form, csv_field.substr(plf+1)); return; } } } csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(def_csv_filename); string fname_name = fl_filename_name(def_csv_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string csv_name = FLMSG_temp_dir; string html_text = ""; csv_name.append(fname_name); csv_name.append(".htm"); string csvform = csv_html_template; string rows; string row; string field; size_t p_eol = string::npos; size_t p_eof = string::npos; char sepchar = ','; rows.assign(csv_field); int nrows = 0, ncols = 0; int cols = 0; while (!rows.empty()) { p_eol = rows.find('\n'); nrows++; cols = 0; if (p_eol != string::npos) row.assign(rows.substr(0,p_eol)); else row.assign(rows); while(!row.empty()) { cols++; p_eof = row.find(sepchar); if (p_eof != string::npos) row.erase(0, p_eof + 1); else row.clear(); } if (cols > ncols) ncols = cols; if (p_eol != string::npos) rows.erase(0,p_eol+1); else rows.clear(); } char header[200]; snprintf(header, sizeof(header),"<table BORDER=1 CELLPADDING=4 CELLSPACING=0 COLS=%d>\ <tbody>\ ", ncols); html_text.append(header); rows.assign(csv_field); while (!rows.empty()) { cols = 0; html_text.append("<tr>\n"); p_eol = rows.find('\n'); if (p_eol != string::npos) row.assign(rows.substr(0,p_eol)); else row.assign(rows); while(!row.empty()) { cols++; if (row[0] == '"') { p_eof = row.find('"', 1); field.assign(row.substr(1, p_eof - 1)); p_eof = row.find(sepchar, p_eof); } else { p_eof = row.find(sepchar); field.assign(row.substr(0, p_eof)); } if (field.empty()) field.assign("<br>"); p = 0; while((p = field.find('"', p)) != string::npos) field.replace(p, 1,"&#34;"); html_text.append("<td VALIGN=top>").append(field).append("</td>\n"); if (p_eof != string::npos) row.erase(0, p_eof + 1); else row.clear(); } while (cols < ncols) { html_text.append("<td></td>\n"); cols++; } html_text.append("</tr>\n"); if (p_eol != string::npos) rows.erase(0,p_eol+1); else rows.clear(); } html_text.append("</tbody>\n"); replacestr(csvform, csv_title, fname_name); replacestr(csvform, csv_msg, html_text); FILE *csvfile = fopen(csv_name.c_str(), "w"); fprintf(csvfile,"%s", csvform.c_str()); fclose(csvfile); open_url(csv_name.c_str()); } void custom_csv_text(string form, string contents) { string fname_name = fl_filename_name(def_csv_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string csv_name = FLMSG_temp_dir; csv_name.append(fname_name).append(".txt"); string line; string field; string data; while (data[0] == '\n') data.erase(0,1); size_t comma = contents.find(","); while (contents[comma+1] == ' ') contents.erase(comma+1,1); size_t quote = contents.find("\""); size_t lfptr = contents.find("\n"); size_t tab; if (quote == comma + 1) { contents.erase(quote,1); lfptr = contents.find("\"\n"); } while (comma != string::npos) { field = ":"; field.append(contents.substr(0, comma)).append(":"); if (lfptr != string::npos) { data = contents.substr(comma + 1, lfptr - comma - 1); tab = data.find("\t"); while (tab != string::npos) { data.replace(tab, 1, " "); tab = data.find("\t"); } contents.erase(0, lfptr + 1); while (data[0] == '\n') data.erase(0,1); while ((quote = data.find("\"")) != string::npos) data.erase(quote,1); } else { data = contents.substr(comma + 1); tab = data.find("\t"); while (tab != string::npos) { data.replace(tab, 1, " "); tab = data.find("\t"); } while ((quote = data.find("\"")) != string::npos) data.erase(quote,1); contents.clear(); } replacestr(form, field, data); comma = contents.find(","); while (contents[comma+1] == ' ') contents.erase(comma+1,1); quote = contents.find("\""); if (quote == comma + 1) { contents.erase(quote,1); lfptr = contents.find("\"\n"); } else lfptr = contents.find("\n"); } FILE *csvfile = fopen(csv_name.c_str(), "w"); fprintf(csvfile,"%s", form.c_str()); fclose(csvfile); open_url(csv_name.c_str()); } void cb_csv_textout() { update_csvfields(); csvbuffer.assign(header("<csvform>")); csvbuffer.append( lineout( csv_msg, csv_field ) ); write_csv(def_csv_filename); if (csv_field.find("CUSTOM_FORM") == 0) { size_t plf = csv_field.find("\n"); if (plf != string::npos) { string fname = CUSTOM_dir; fname.append(csv_field.substr(12, plf - 12)); fname.append(".txt"); FILE *ffile = fopen(fname.c_str(), "r"); if (ffile) { string form; char c; while ((c = fgetc(ffile)) != EOF) form += c; fclose(ffile); custom_csv_text(form, csv_field.substr(plf+1)); return; } } } string fname_name = fl_filename_name(def_csv_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string csv_name = FLMSG_temp_dir; csv_name.append(fname_name).append(".txt"); string csvform = csv_txt_template; replacestr(csvform, csv_msg, csv_field); FILE *csvfile = fopen(csv_name.c_str(), "w"); fprintf(csvfile,"%s", csvform.c_str()); fclose(csvfile); open_url(csv_name.c_str()); } ���������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011455� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/Types.h�����������������������������������������������������������������������0000664�0001750�0001750�00000013372�12330516146�012643� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Types.h -- Basic types 2008-11-23 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __7Z_TYPES_H #define __7Z_TYPES_H #include <stddef.h> #ifdef _WIN32 #include <windows.h> #endif #define SZ_OK 0 #define SZ_ERROR_DATA 1 #define SZ_ERROR_MEM 2 #define SZ_ERROR_CRC 3 #define SZ_ERROR_UNSUPPORTED 4 #define SZ_ERROR_PARAM 5 #define SZ_ERROR_INPUT_EOF 6 #define SZ_ERROR_OUTPUT_EOF 7 #define SZ_ERROR_READ 8 #define SZ_ERROR_WRITE 9 #define SZ_ERROR_PROGRESS 10 #define SZ_ERROR_FAIL 11 #define SZ_ERROR_THREAD 12 #define SZ_ERROR_ARCHIVE 16 #define SZ_ERROR_NO_ARCHIVE 17 extern const char *LZMA_ERRORS[]; typedef int SRes; #ifdef _WIN32 typedef DWORD WRes; #else typedef int WRes; #endif #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif typedef unsigned char Byte; typedef short Int16; typedef unsigned short UInt16; #ifdef _LZMA_LZ_UInt32_IS_ULONG typedef long LZ_Int32; typedef unsigned long LZ_UInt32; #else typedef int LZ_Int32; typedef unsigned int LZ_UInt32; #endif #ifdef _SZ_NO_INT_64 /* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. NOTES: Some code will work incorrectly in that case! */ typedef long LZ_Int64; typedef unsigned long LZ_UInt64; #else #if defined(_MSC_VER) || defined(__BORLANDC__) typedef __LZ_Int64 LZ_Int64; typedef unsigned __LZ_Int64 LZ_UInt64; #else typedef long long int LZ_Int64; typedef unsigned long long int LZ_UInt64; #endif #endif #ifdef _LZMA_NO_SYSTEM_SIZE_T typedef LZ_UInt32 SizeT; #else typedef size_t SizeT; #endif //typedef int Bool; #define True 1 #define False 0 #ifdef _MSC_VER #if _MSC_VER >= 1300 #define MY_NO_INLINE __declspec(noinline) #else #define MY_NO_INLINE #endif #define MY_CDECL __cdecl #define MY_STD_CALL __stdcall #define MY_FAST_CALL MY_NO_INLINE __fastcall #else #define MY_CDECL #define MY_STD_CALL #define MY_FAST_CALL #endif /* The following interfaces use first parameter as pointer to structure */ typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) < input(*size)) is allowed */ } ISeqInStream; /* it can return SZ_ERROR_INPUT_EOF */ SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); typedef struct { size_t (*Write)(void *p, const void *buf, size_t size); /* Returns: result - the number of actually written bytes. (result < size) means error */ } ISeqOutStream; typedef enum { SZ_SEEK_SET = 0, SZ_SEEK_CUR = 1, SZ_SEEK_END = 2 } ESzSeek; typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ SRes (*Seek)(void *p, LZ_Int64 *pos, ESzSeek origin); } ISeekInStream; typedef struct { SRes (*Look)(void *p, void **buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) > input(*size)) is not allowed (output(*size) < input(*size)) is allowed */ SRes (*Skip)(void *p, size_t offset); /* offset must be <= output(*size) of Look */ SRes (*Read)(void *p, void *buf, size_t *size); /* reads directly (without buffer). It's same as ISeqInStream::Read */ SRes (*Seek)(void *p, LZ_Int64 *pos, ESzSeek origin); } ILookInStream; SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); SRes LookInStream_SeekTo(ILookInStream *stream, LZ_UInt64 offset); /* reads via ILookInStream::Read */ SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); #define LookToRead_BUF_SIZE (1 << 14) typedef struct { ILookInStream s; ISeekInStream *realStream; size_t pos; size_t size; Byte buf[LookToRead_BUF_SIZE]; } CLookToRead; void LookToRead_CreateVTable(CLookToRead *p, int lookahead); void LookToRead_Init(CLookToRead *p); typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToLook; void SecToLook_CreateVTable(CSecToLook *p); typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToRead; void SecToRead_CreateVTable(CSecToRead *p); typedef struct { SRes (*Progress)(void *p, LZ_UInt64 inSize, LZ_UInt64 outSize); /* Returns: result. (result != SZ_OK) means break. Value (LZ_UInt64)(LZ_Int64)-1 for size means unknown value. */ } ICompressProgress; typedef struct { void *(*Alloc)(void *p, size_t size); void (*Free)(void *p, void *address); /* address can be 0 */ } ISzAlloc; #define IAlloc_Alloc(p, size) (p)->Alloc((p), size) #define IAlloc_Free(p, a) (p)->Free((p), a) #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaLib.c���������������������������������������������������������������������0000664�0001750�0001750�00000004575�12330516146�013071� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaLib.c -- LZMA library wrapper 2008-08-05 Igor Pavlov Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "LzmaEnc.h" #include "LzmaDec.h" #include "Alloc.h" #include "LzmaLib.h" static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } static void SzFree(void *p, void *address) { p = p; MyFree(address); } static ISzAlloc g_Alloc = { SzAlloc, SzFree }; MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, unsigned char *outProps, size_t *outPropsSize, int level, /* 0 <= level <= 9, default = 5 */ unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ int lc, /* 0 <= lc <= 8, default = 3 */ int lp, /* 0 <= lp <= 4, default = 0 */ int pb, /* 0 <= pb <= 4, default = 2 */ int fb, /* 5 <= fb <= 273, default = 32 */ int numThreads /* 1 or 2, default = 2 */ ) { CLzmaEncProps props; LzmaEncProps_Init(&props); props.level = level; props.dictSize = dictSize; props.lc = lc; props.lp = lp; props.pb = pb; props.fb = fb; props.numThreads = numThreads; return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, NULL, &g_Alloc, &g_Alloc); } MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, const unsigned char *props, size_t propsSize) { ELzmaStatus status; return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); } �����������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzHash.h����������������������������������������������������������������������0000664�0001750�0001750�00000005631�12330516146�012727� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzHash.h -- HASH functions for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __LZHASH_H #define __LZHASH_H #define kHash2Size (1 << 10) #define kHash3Size (1 << 16) #define kHash4Size (1 << 20) #define kFix3HashSize (kHash2Size) #define kFix4HashSize (kHash2Size + kHash3Size) #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) #define HASH2_CALC hashValue = cur[0] | ((LZ_UInt32)cur[1] << 8); #define HASH3_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hashValue = (temp ^ ((LZ_UInt32)cur[2] << 8)) & p->hashMask; } #define HASH4_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hashValue = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; } #define HASH5_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hash4Value = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \ hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \ hash4Value &= (kHash4Size - 1); } /* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((LZ_UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ #define HASH_ZIP_CALC hashValue = ((cur[2] | ((LZ_UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; #define MT_HASH2_CALC \ hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); #define MT_HASH3_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); } #define MT_HASH4_CALC { \ LZ_UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ hash2Value = temp & (kHash2Size - 1); \ hash3Value = (temp ^ ((LZ_UInt32)cur[2] << 8)) & (kHash3Size - 1); \ hash4Value = (temp ^ ((LZ_UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } #endif �������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaDec.c���������������������������������������������������������������������0000664�0001750�0001750�00000072111�12330516146�013045� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaDec.c -- LZMA Decoder 2008-11-06 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "LzmaDec.h" #include <string.h> #define kNumTopBits 24 #define kTopValue ((LZ_UInt32)1 << kNumTopBits) #define kNumBitModelTotalBits 11 #define kBitModelTotal (1 << kNumBitModelTotalBits) #define kNumMoveBits 5 #define RC_INIT_SIZE 5 #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ { UPDATE_0(p); i = (i + i); A0; } else \ { UPDATE_1(p); i = (i + i) + 1; A1; } #define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) #define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } #define TREE_DECODE(probs, limit, i) \ { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } /* #define _LZMA_SIZE_OPT */ #ifdef _LZMA_SIZE_OPT #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) #else #define TREE_6_DECODE(probs, i) \ { i = 1; \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ i -= 0x40; } #endif #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0_CHECK range = bound; #define UPDATE_1_CHECK range -= bound; code -= bound; #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ { UPDATE_0_CHECK; i = (i + i); A0; } else \ { UPDATE_1_CHECK; i = (i + i) + 1; A1; } #define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) #define TREE_DECODE_CHECK(probs, limit, i) \ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } #define kNumPosBitsMax 4 #define kNumPosStatesMax (1 << kNumPosBitsMax) #define kLenNumLowBits 3 #define kLenNumLowSymbols (1 << kLenNumLowBits) #define kLenNumMidBits 3 #define kLenNumMidSymbols (1 << kLenNumMidBits) #define kLenNumHighBits 8 #define kLenNumHighSymbols (1 << kLenNumHighBits) #define LenChoice 0 #define LenChoice2 (LenChoice + 1) #define LenLow (LenChoice2 + 1) #define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) #define kNumLenProbs (LenHigh + kLenNumHighSymbols) #define kNumStates 12 #define kNumLitStates 7 #define kStartPosModelIndex 4 #define kEndPosModelIndex 14 #define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) #define kNumPosSlotBits 6 #define kNumLenToPosStates 4 #define kNumAlignBits 4 #define kAlignTableSize (1 << kNumAlignBits) #define kMatchMinLen 2 #define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) #define IsMatch 0 #define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) #define IsRepG0 (IsRep + kNumStates) #define IsRepG1 (IsRepG0 + kNumStates) #define IsRepG2 (IsRepG1 + kNumStates) #define IsRep0Long (IsRepG2 + kNumStates) #define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) #define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) #define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) #define LenCoder (Align + kAlignTableSize) #define RepLenCoder (LenCoder + kNumLenProbs) #define Literal (RepLenCoder + kNumLenProbs) #define LZMA_BASE_SIZE 1846 #define LZMA_LIT_SIZE 768 #define LzmaProps_GetNumProbs(p) ((LZ_UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) #if Literal != LZMA_BASE_SIZE StopCompilingDueBUG #endif const char *LZMA_ERRORS[] = { "SZ_OK", "SZ_ERROR_DATA", "SZ_ERROR_MEM", "SZ_ERROR_CRC", "SZ_ERROR_UNSUPPORTED", "SZ_ERROR_PARAM", "SZ_ERROR_INPUT_EOF", "SZ_ERROR_OUTPUT_EOF", "SZ_ERROR_READ", "SZ_ERROR_WRITE", "SZ_ERROR_PROGRESS", "SZ_ERROR_FAIL", "SZ_ERROR_THREAD", "n/a", "n/a", "n/a", "SZ_ERROR_ARCHIVE", "SZ_ERROR_NO_ARCHIVE"}; static const Byte kLiteralNextStates[kNumStates * 2] = { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5, 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10 }; #define LZMA_DIC_MIN (1 << 12) /* First LZMA-symbol is always decoded. And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization Out: Result: SZ_OK - OK SZ_ERROR_DATA - Error p->remainLen: < kMatchSpecLenStart : normal remain = kMatchSpecLenStart : finished = kMatchSpecLenStart + 1 : Flush marker = kMatchSpecLenStart + 2 : State Init Marker */ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { CLzmaProb *probs = p->probs; unsigned state = p->state; LZ_UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; unsigned lc = p->prop.lc; Byte *dic = p->dic; SizeT dicBufSize = p->dicBufSize; SizeT dicPos = p->dicPos; LZ_UInt32 processedPos = p->processedPos; LZ_UInt32 checkDicSize = p->checkDicSize; unsigned len = 0; const Byte *buf = p->buf; LZ_UInt32 range = p->range; LZ_UInt32 code = p->code; do { CLzmaProb *prob; LZ_UInt32 bound; unsigned ttt; unsigned posState = processedPos & pbMask; prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { unsigned symbol; UPDATE_0(prob); prob = probs + Literal; if (checkDicSize != 0 || processedPos != 0) prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); if (state < kNumLitStates) { symbol = 1; do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); } else { unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; unsigned offs = 0x100; symbol = 1; do { unsigned bit; CLzmaProb *probLit; matchByte <<= 1; bit = (matchByte & offs); probLit = prob + offs + bit + symbol; GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) } while (symbol < 0x100); } dic[dicPos++] = (Byte)symbol; processedPos++; state = kLiteralNextStates[state]; /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */ continue; } else { UPDATE_1(prob); prob = probs + IsRep + state; IF_BIT_0(prob) { UPDATE_0(prob); state += kNumStates; prob = probs + LenCoder; } else { UPDATE_1(prob); if (checkDicSize == 0 && processedPos == 0) return SZ_ERROR_DATA; prob = probs + IsRepG0 + state; IF_BIT_0(prob) { UPDATE_0(prob); prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { UPDATE_0(prob); dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; dicPos++; processedPos++; state = state < kNumLitStates ? 9 : 11; continue; } UPDATE_1(prob); } else { LZ_UInt32 distance; UPDATE_1(prob); prob = probs + IsRepG1 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep1; } else { UPDATE_1(prob); prob = probs + IsRepG2 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep2; } else { UPDATE_1(prob); distance = rep3; rep3 = rep2; } rep2 = rep1; } rep1 = rep0; rep0 = distance; } state = state < kNumLitStates ? 8 : 11; prob = probs + RepLenCoder; } { unsigned limit, offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; limit = (1 << kLenNumLowBits); } else { UPDATE_1(probLen); probLen = prob + LenChoice2; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; limit = (1 << kLenNumMidBits); } else { UPDATE_1(probLen); probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; limit = (1 << kLenNumHighBits); } } TREE_DECODE(probLen, limit, len); len += offset; } if (state >= kNumStates) { LZ_UInt32 distance; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_6_DECODE(prob, distance); if (distance >= kStartPosModelIndex) { unsigned posSlot = (unsigned)distance; int numDirectBits = (int)(((distance >> 1) - 1)); distance = (2 | (distance & 1)); if (posSlot < kEndPosModelIndex) { distance <<= numDirectBits; prob = probs + SpecPos + distance - posSlot - 1; { LZ_UInt32 mask = 1; unsigned i = 1; do { GET_BIT2(prob + i, i, ; , distance |= mask); mask <<= 1; } while (--numDirectBits != 0); } } else { numDirectBits -= kNumAlignBits; do { NORMALIZE range >>= 1; { LZ_UInt32 t; code -= range; t = (0 - ((LZ_UInt32)code >> 31)); /* (LZ_UInt32)((LZ_Int32)code >> 31) */ distance = (distance << 1) + (t + 1); code += range & t; } /* distance <<= 1; if (code >= range) { code -= range; distance |= 1; } */ } while (--numDirectBits != 0); prob = probs + Align; distance <<= kNumAlignBits; { unsigned i = 1; GET_BIT2(prob + i, i, ; , distance |= 1); GET_BIT2(prob + i, i, ; , distance |= 2); GET_BIT2(prob + i, i, ; , distance |= 4); GET_BIT2(prob + i, i, ; , distance |= 8); } if (distance == (LZ_UInt32)0xFFFFFFFF) { len += kMatchSpecLenStart; state -= kNumStates; break; } } } rep3 = rep2; rep2 = rep1; rep1 = rep0; rep0 = distance + 1; if (checkDicSize == 0) { if (distance >= processedPos) return SZ_ERROR_DATA; } else if (distance >= checkDicSize) return SZ_ERROR_DATA; state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; /* state = kLiteralNextStates[state]; */ } len += kMatchMinLen; if (limit == dicPos) return SZ_ERROR_DATA; { SizeT rem = limit - dicPos; unsigned curLen = ((rem < len) ? (unsigned)rem : len); SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); processedPos += curLen; len -= curLen; if (pos + curLen <= dicBufSize) { Byte *dest = dic + dicPos; ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; const Byte *lim = dest + curLen; dicPos += curLen; do *(dest) = (Byte)*(dest + src); while (++dest != lim); } else { do { dic[dicPos++] = dic[pos]; if (++pos == dicBufSize) pos = 0; } while (--curLen != 0); } } } } while (dicPos < limit && buf < bufLimit); NORMALIZE; p->buf = buf; p->range = range; p->code = code; p->remainLen = len; p->dicPos = dicPos; p->processedPos = processedPos; p->reps[0] = rep0; p->reps[1] = rep1; p->reps[2] = rep2; p->reps[3] = rep3; p->state = state; return SZ_OK; } static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) { if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) { Byte *dic = p->dic; SizeT dicPos = p->dicPos; SizeT dicBufSize = p->dicBufSize; unsigned len = p->remainLen; LZ_UInt32 rep0 = p->reps[0]; if (limit - dicPos < len) len = (unsigned)(limit - dicPos); if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) p->checkDicSize = p->prop.dicSize; p->processedPos += len; p->remainLen -= len; while (len-- != 0) { dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; dicPos++; } p->dicPos = dicPos; } } static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { do { SizeT limit2 = limit; if (p->checkDicSize == 0) { LZ_UInt32 rem = p->prop.dicSize - p->processedPos; if (limit - p->dicPos > rem) limit2 = p->dicPos + rem; } RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); if (p->processedPos >= p->prop.dicSize) p->checkDicSize = p->prop.dicSize; LzmaDec_WriteRem(p, limit); } while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); if (p->remainLen > kMatchSpecLenStart) { p->remainLen = kMatchSpecLenStart; } return 0; } typedef enum { DUMMY_ERROR, /* unexpected end of input stream */ DUMMY_LIT, DUMMY_MATCH, DUMMY_REP } ELzmaDummy; static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) { LZ_UInt32 range = p->range; LZ_UInt32 code = p->code; const Byte *bufLimit = buf + inSize; CLzmaProb *probs = p->probs; unsigned state = p->state; ELzmaDummy res; { CLzmaProb *prob; LZ_UInt32 bound; unsigned ttt; unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ prob = probs + Literal; if (p->checkDicSize != 0 || p->processedPos != 0) prob += (LZMA_LIT_SIZE * ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); if (state < kNumLitStates) { unsigned symbol = 1; do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); } else { unsigned matchByte = p->dic[p->dicPos - p->reps[0] + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; unsigned offs = 0x100; unsigned symbol = 1; do { unsigned bit; CLzmaProb *probLit; matchByte <<= 1; bit = (matchByte & offs); probLit = prob + offs + bit + symbol; GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) } while (symbol < 0x100); } res = DUMMY_LIT; } else { unsigned len; UPDATE_1_CHECK; prob = probs + IsRep + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; state = 0; prob = probs + LenCoder; res = DUMMY_MATCH; } else { UPDATE_1_CHECK; res = DUMMY_REP; prob = probs + IsRepG0 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; NORMALIZE_CHECK; return DUMMY_REP; } else { UPDATE_1_CHECK; } } else { UPDATE_1_CHECK; prob = probs + IsRepG1 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; prob = probs + IsRepG2 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; } } } state = kNumStates; prob = probs + RepLenCoder; } { unsigned limit, offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; limit = 1 << kLenNumLowBits; } else { UPDATE_1_CHECK; probLen = prob + LenChoice2; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; limit = 1 << kLenNumMidBits; } else { UPDATE_1_CHECK; probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; limit = 1 << kLenNumHighBits; } } TREE_DECODE_CHECK(probLen, limit, len); len += offset; } if (state < 4) { unsigned posSlot; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) { int numDirectBits = ((posSlot >> 1) - 1); /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ if (posSlot < kEndPosModelIndex) { prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; } else { numDirectBits -= kNumAlignBits; do { NORMALIZE_CHECK range >>= 1; code -= range & (((code - range) >> 31) - 1); /* if (code >= range) code -= range; */ } while (--numDirectBits != 0); prob = probs + Align; numDirectBits = kNumAlignBits; } { unsigned i = 1; do { GET_BIT_CHECK(prob + i, i); } while (--numDirectBits != 0); } } } } } NORMALIZE_CHECK; return res; } static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) { p->code = ((LZ_UInt32)data[1] << 24) | ((LZ_UInt32)data[2] << 16) | ((LZ_UInt32)data[3] << 8) | ((LZ_UInt32)data[4]); p->range = 0xFFFFFFFF; p->needFlush = 0; } void LzmaDec_InitDicAndState(CLzmaDec *p, int initDic, int initState) { p->needFlush = 1; p->remainLen = 0; p->tempBufSize = 0; if (initDic) { p->processedPos = 0; p->checkDicSize = 0; p->needInitState = 1; } if (initState) p->needInitState = 1; } void LzmaDec_Init(CLzmaDec *p) { p->dicPos = 0; LzmaDec_InitDicAndState(p, True, True); } static void LzmaDec_InitStateReal(CLzmaDec *p) { LZ_UInt32 numProbs = Literal + ((LZ_UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); LZ_UInt32 i; CLzmaProb *probs = p->probs; for (i = 0; i < numProbs; i++) probs[i] = kBitModelTotal >> 1; p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; p->state = 0; p->needInitState = 0; } SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT inSize = *srcLen; (*srcLen) = 0; LzmaDec_WriteRem(p, dicLimit); *status = LZMA_STATUS_NOT_SPECIFIED; while (p->remainLen != kMatchSpecLenStart) { int checkEndMarkNow; if (p->needFlush != 0) { for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) p->tempBuf[p->tempBufSize++] = *src++; if (p->tempBufSize < RC_INIT_SIZE) { *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (p->tempBuf[0] != 0) return SZ_ERROR_DATA; LzmaDec_InitRc(p, p->tempBuf); p->tempBufSize = 0; } checkEndMarkNow = 0; if (p->dicPos >= dicLimit) { if (p->remainLen == 0 && p->code == 0) { *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; return SZ_OK; } if (finishMode == LZMA_FINISH_ANY) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_OK; } if (p->remainLen != 0) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } checkEndMarkNow = 1; } if (p->needInitState) LzmaDec_InitStateReal(p); if (p->tempBufSize == 0) { SizeT processed; const Byte *bufLimit; if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, src, inSize); if (dummyRes == DUMMY_ERROR) { memcpy(p->tempBuf, src, inSize); p->tempBufSize = (unsigned)inSize; (*srcLen) += inSize; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } bufLimit = src; } else bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; p->buf = src; if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) return SZ_ERROR_DATA; processed = (SizeT)(p->buf - src); (*srcLen) += processed; src += processed; inSize -= processed; } else { unsigned rem = p->tempBufSize, lookAhead = 0; while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) p->tempBuf[rem++] = src[lookAhead++]; p->tempBufSize = rem; if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); if (dummyRes == DUMMY_ERROR) { (*srcLen) += lookAhead; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } } p->buf = p->tempBuf; if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) return SZ_ERROR_DATA; lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); (*srcLen) += lookAhead; src += lookAhead; inSize -= lookAhead; p->tempBufSize = 0; } } if (p->code == 0) *status = LZMA_STATUS_FINISHED_WITH_MARK; return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; } SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT outSize = *destLen; SizeT inSize = *srcLen; *srcLen = *destLen = 0; for (;;) { SizeT inSizeCur = inSize, outSizeCur, dicPos; ELzmaFinishMode curFinishMode; SRes res; if (p->dicPos == p->dicBufSize) p->dicPos = 0; dicPos = p->dicPos; if (outSize > p->dicBufSize - dicPos) { outSizeCur = p->dicBufSize; curFinishMode = LZMA_FINISH_ANY; } else { outSizeCur = dicPos + outSize; curFinishMode = finishMode; } res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); src += inSizeCur; inSize -= inSizeCur; *srcLen += inSizeCur; outSizeCur = p->dicPos - dicPos; memcpy(dest, p->dic + dicPos, outSizeCur); dest += outSizeCur; outSize -= outSizeCur; *destLen += outSizeCur; if (res != 0) return res; if (outSizeCur == 0 || outSize == 0) return SZ_OK; } } void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->probs); p->probs = 0; } static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->dic); p->dic = 0; } void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) { LzmaDec_FreeProbs(p, alloc); LzmaDec_FreeDict(p, alloc); } SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) { LZ_UInt32 dicSize; Byte d; if (size < LZMA_PROPS_SIZE) return SZ_ERROR_UNSUPPORTED; else dicSize = data[1] | ((LZ_UInt32)data[2] << 8) | ((LZ_UInt32)data[3] << 16) | ((LZ_UInt32)data[4] << 24); if (dicSize < LZMA_DIC_MIN) dicSize = LZMA_DIC_MIN; p->dicSize = dicSize; d = data[0]; if (d >= (9 * 5 * 5)) return SZ_ERROR_UNSUPPORTED; p->lc = d % 9; d /= 9; p->pb = d / 5; p->lp = d % 5; return SZ_OK; } static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) { LZ_UInt32 numProbs = LzmaProps_GetNumProbs(propNew); if (p->probs == 0 || numProbs != p->numProbs) { LzmaDec_FreeProbs(p, alloc); p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); p->numProbs = numProbs; if (p->probs == 0) return SZ_ERROR_MEM; } return SZ_OK; } SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); p->prop = propNew; return SZ_OK; } SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; SizeT dicBufSize; RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); dicBufSize = propNew.dicSize; if (p->dic == 0 || dicBufSize != p->dicBufSize) { LzmaDec_FreeDict(p, alloc); p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); if (p->dic == 0) { LzmaDec_FreeProbs(p, alloc); return SZ_ERROR_MEM; } } p->dicBufSize = dicBufSize; p->prop = propNew; return SZ_OK; } SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) { CLzmaDec p; SRes res; SizeT inSize = *srcLen; SizeT outSize = *destLen; *srcLen = *destLen = 0; if (inSize < RC_INIT_SIZE) return SZ_ERROR_INPUT_EOF; LzmaDec_Construct(&p); res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); if (res != 0) return res; p.dic = dest; p.dicBufSize = outSize; LzmaDec_Init(&p); *srcLen = inSize; res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) res = SZ_ERROR_INPUT_EOF; (*destLen) = p.dicPos; LzmaDec_FreeProbs(&p, alloc); return res; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzFind.c����������������������������������������������������������������������0000664�0001750�0001750�00000051675�12330516146�012730� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzFind.c -- Match finder for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string.h> #include "LzFind.h" #include "LzHash.h" #define kEmptyHashValue 0 #define kMaxValForNormalize ((LZ_UInt32)0xFFFFFFFF) #define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ #define kNormalizeMask (~(kNormalizeStepMin - 1)) #define kMaxHistorySize ((LZ_UInt32)3 << 30) #define kStartMaxLen 3 static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc) { if (!p->directInput) { alloc->Free(alloc, p->bufferBase); p->bufferBase = 0; } } /* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ static int LzInWindow_Create(CMatchFinder *p, LZ_UInt32 keepSizeReserv, ISzAlloc *alloc) { LZ_UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; if (p->directInput) { p->blockSize = blockSize; return 1; } if (p->bufferBase == 0 || p->blockSize != blockSize) { LzInWindow_Free(p, alloc); p->blockSize = blockSize; p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize); } return (p->bufferBase != 0); } Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } Byte MatchFinder_GetIndexByte(CMatchFinder *p, LZ_Int32 index) { return p->buffer[index]; } LZ_UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } void MatchFinder_ReduceOffsets(CMatchFinder *p, LZ_UInt32 subValue) { p->posLimit -= subValue; p->pos -= subValue; p->streamPos -= subValue; } static void MatchFinder_ReadBlock(CMatchFinder *p) { if (p->streamEndWasReached || p->result != SZ_OK) return; for (;;) { Byte *dest = p->buffer + (p->streamPos - p->pos); size_t size = (p->bufferBase + p->blockSize - dest); if (size == 0) return; p->result = p->stream->Read(p->stream, dest, &size); if (p->result != SZ_OK) return; if (size == 0) { p->streamEndWasReached = 1; return; } p->streamPos += (LZ_UInt32)size; if (p->streamPos - p->pos > p->keepSizeAfter) return; } } void MatchFinder_MoveBlock(CMatchFinder *p) { memmove(p->bufferBase, p->buffer - p->keepSizeBefore, (size_t)(p->streamPos - p->pos + p->keepSizeBefore)); p->buffer = p->bufferBase + p->keepSizeBefore; } int MatchFinder_NeedMove(CMatchFinder *p) { /* if (p->streamEndWasReached) return 0; */ return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); } void MatchFinder_ReadIfRequired(CMatchFinder *p) { if (p->streamEndWasReached) return; if (p->keepSizeAfter >= p->streamPos - p->pos) MatchFinder_ReadBlock(p); } static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) { if (MatchFinder_NeedMove(p)) MatchFinder_MoveBlock(p); MatchFinder_ReadBlock(p); } static void MatchFinder_SetDefaultSettings(CMatchFinder *p) { p->cutValue = 32; p->btMode = 1; p->numHashBytes = 4; /* p->skipModeBits = 0; */ p->directInput = 0; p->bigHash = 0; } #define kCrcPoly 0xEDB88320 void MatchFinder_Construct(CMatchFinder *p) { LZ_UInt32 i; p->bufferBase = 0; p->directInput = 0; p->hash = 0; MatchFinder_SetDefaultSettings(p); for (i = 0; i < 256; i++) { LZ_UInt32 r = i; int j; for (j = 0; j < 8; j++) r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); p->crc[i] = r; } } static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc) { alloc->Free(alloc, p->hash); p->hash = 0; } void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc) { MatchFinder_FreeThisClassMemory(p, alloc); LzInWindow_Free(p, alloc); } static CLzRef* AllocRefs(LZ_UInt32 num, ISzAlloc *alloc) { size_t sizeInBytes = (size_t)num * sizeof(CLzRef); if (sizeInBytes / sizeof(CLzRef) != num) return 0; return (CLzRef *)alloc->Alloc(alloc, sizeInBytes); } int MatchFinder_Create(CMatchFinder *p, LZ_UInt32 historySize, LZ_UInt32 keepAddBufferBefore, LZ_UInt32 matchMaxLen, LZ_UInt32 keepAddBufferAfter, ISzAlloc *alloc) { LZ_UInt32 sizeReserv; if (historySize > kMaxHistorySize) { MatchFinder_Free(p, alloc); return 0; } sizeReserv = historySize >> 1; if (historySize > ((LZ_UInt32)2 << 30)) sizeReserv = historySize >> 2; sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); p->keepSizeBefore = historySize + keepAddBufferBefore + 1; p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ if (LzInWindow_Create(p, sizeReserv, alloc)) { LZ_UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1; LZ_UInt32 hs; p->matchMaxLen = matchMaxLen; { p->fixedHashSize = 0; if (p->numHashBytes == 2) hs = (1 << 16) - 1; else { hs = historySize - 1; hs |= (hs >> 1); hs |= (hs >> 2); hs |= (hs >> 4); hs |= (hs >> 8); hs >>= 1; /* hs >>= p->skipModeBits; */ hs |= 0xFFFF; /* don't change it! It's required for Deflate */ if (hs > (1 << 24)) { if (p->numHashBytes == 3) hs = (1 << 24) - 1; else hs >>= 1; } } p->hashMask = hs; hs++; if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; hs += p->fixedHashSize; } { LZ_UInt32 prevSize = p->hashSizeSum + p->numSons; LZ_UInt32 newSize; p->historySize = historySize; p->hashSizeSum = hs; p->cyclicBufferSize = newCyclicBufferSize; p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize); newSize = p->hashSizeSum + p->numSons; if (p->hash != 0 && prevSize == newSize) return 1; MatchFinder_FreeThisClassMemory(p, alloc); p->hash = AllocRefs(newSize, alloc); if (p->hash != 0) { p->son = p->hash + p->hashSizeSum; return 1; } } } MatchFinder_Free(p, alloc); return 0; } static void MatchFinder_SetLimits(CMatchFinder *p) { LZ_UInt32 limit = kMaxValForNormalize - p->pos; LZ_UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; if (limit2 < limit) limit = limit2; limit2 = p->streamPos - p->pos; if (limit2 <= p->keepSizeAfter) { if (limit2 > 0) limit2 = 1; } else limit2 -= p->keepSizeAfter; if (limit2 < limit) limit = limit2; { LZ_UInt32 lenLimit = p->streamPos - p->pos; if (lenLimit > p->matchMaxLen) lenLimit = p->matchMaxLen; p->lenLimit = lenLimit; } p->posLimit = p->pos + limit; } void MatchFinder_Init(CMatchFinder *p) { LZ_UInt32 i; for (i = 0; i < p->hashSizeSum; i++) p->hash[i] = kEmptyHashValue; p->cyclicBufferPos = 0; p->buffer = p->bufferBase; p->pos = p->streamPos = p->cyclicBufferSize; p->result = SZ_OK; p->streamEndWasReached = 0; MatchFinder_ReadBlock(p); MatchFinder_SetLimits(p); } static LZ_UInt32 MatchFinder_GetSubValue(CMatchFinder *p) { return (p->pos - p->historySize - 1) & kNormalizeMask; } void MatchFinder_Normalize3(LZ_UInt32 subValue, CLzRef *items, LZ_UInt32 numItems) { LZ_UInt32 i; for (i = 0; i < numItems; i++) { LZ_UInt32 value = items[i]; if (value <= subValue) value = kEmptyHashValue; else value -= subValue; items[i] = value; } } static void MatchFinder_Normalize(CMatchFinder *p) { LZ_UInt32 subValue = MatchFinder_GetSubValue(p); MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons); MatchFinder_ReduceOffsets(p, subValue); } static void MatchFinder_CheckLimits(CMatchFinder *p) { if (p->pos == kMaxValForNormalize) MatchFinder_Normalize(p); if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) MatchFinder_CheckAndMoveAndRead(p); if (p->cyclicBufferPos == p->cyclicBufferSize) p->cyclicBufferPos = 0; MatchFinder_SetLimits(p); } static LZ_UInt32 * Hc_GetMatchesSpec(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen) { son[_cyclicBufferPos] = curMatch; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) return distances; { const Byte *pb = cur - delta; curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; if (pb[maxLen] == cur[maxLen] && *pb == *cur) { LZ_UInt32 len = 0; while (++len != lenLimit) if (pb[len] != cur[len]) break; if (maxLen < len) { *distances++ = maxLen = len; *distances++ = delta - 1; if (len == lenLimit) return distances; } } } } } LZ_UInt32 * GetMatchesSpec1(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen) { CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; CLzRef *ptr1 = son + (_cyclicBufferPos << 1); LZ_UInt32 len0 = 0, len1 = 0; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) { *ptr0 = *ptr1 = kEmptyHashValue; return distances; } { CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); const Byte *pb = cur - delta; LZ_UInt32 len = (len0 < len1 ? len0 : len1); if (pb[len] == cur[len]) { if (++len != lenLimit && pb[len] == cur[len]) while (++len != lenLimit) if (pb[len] != cur[len]) break; if (maxLen < len) { *distances++ = maxLen = len; *distances++ = delta - 1; if (len == lenLimit) { *ptr1 = pair[0]; *ptr0 = pair[1]; return distances; } } } if (pb[len] < cur[len]) { *ptr1 = curMatch; ptr1 = pair + 1; curMatch = *ptr1; len1 = len; } else { *ptr0 = curMatch; ptr0 = pair; curMatch = *ptr0; len0 = len; } } } } static void SkipMatchesSpec(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *cur, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 cutValue) { CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; CLzRef *ptr1 = son + (_cyclicBufferPos << 1); LZ_UInt32 len0 = 0, len1 = 0; for (;;) { LZ_UInt32 delta = pos - curMatch; if (cutValue-- == 0 || delta >= _cyclicBufferSize) { *ptr0 = *ptr1 = kEmptyHashValue; return; } { CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); const Byte *pb = cur - delta; LZ_UInt32 len = (len0 < len1 ? len0 : len1); if (pb[len] == cur[len]) { while (++len != lenLimit) if (pb[len] != cur[len]) break; { if (len == lenLimit) { *ptr1 = pair[0]; *ptr0 = pair[1]; return; } } } if (pb[len] < cur[len]) { *ptr1 = curMatch; ptr1 = pair + 1; curMatch = *ptr1; len1 = len; } else { *ptr0 = curMatch; ptr0 = pair; curMatch = *ptr0; len0 = len; } } } } #define MOVE_POS \ ++p->cyclicBufferPos; \ p->buffer++; \ if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); #define MOVE_POS_RET MOVE_POS return offset; static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } #define GET_MATCHES_HEADER2(minLen, ret_op) \ LZ_UInt32 lenLimit; LZ_UInt32 hashValue; const Byte *cur; LZ_UInt32 curMatch; \ lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ cur = p->buffer; #define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) #define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) #define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue #define GET_MATCHES_FOOTER(offset, maxLen) \ offset = (LZ_UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \ distances + offset, maxLen) - distances); MOVE_POS_RET; #define SKIP_FOOTER \ SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; static LZ_UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(2) HASH2_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = 0; GET_MATCHES_FOOTER(offset, 1) } LZ_UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = 0; GET_MATCHES_FOOTER(offset, 2) } static LZ_UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, delta2, maxLen, offset; GET_MATCHES_HEADER(3) HASH3_CALC; delta2 = p->pos - p->hash[hash2Value]; curMatch = p->hash[kFix3HashSize + hashValue]; p->hash[hash2Value] = p->hash[kFix3HashSize + hashValue] = p->pos; maxLen = 2; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[0] = maxLen; distances[1] = delta2 - 1; offset = 2; if (maxLen == lenLimit) { SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS_RET; } } GET_MATCHES_FOOTER(offset, maxLen) } static LZ_UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; GET_MATCHES_HEADER(4) HASH4_CALC; delta2 = p->pos - p->hash[ hash2Value]; delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; maxLen = 1; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { distances[0] = maxLen = 2; distances[1] = delta2 - 1; offset = 2; } if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) { maxLen = 3; distances[offset + 1] = delta3 - 1; offset += 2; delta2 = delta3; } if (offset != 0) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[offset - 2] = maxLen; if (maxLen == lenLimit) { SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS_RET; } } if (maxLen < 3) maxLen = 3; GET_MATCHES_FOOTER(offset, maxLen) } static LZ_UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; GET_MATCHES_HEADER(4) HASH4_CALC; delta2 = p->pos - p->hash[ hash2Value]; delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; maxLen = 1; offset = 0; if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) { distances[0] = maxLen = 2; distances[1] = delta2 - 1; offset = 2; } if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) { maxLen = 3; distances[offset + 1] = delta3 - 1; offset += 2; delta2 = delta3; } if (offset != 0) { for (; maxLen != lenLimit; maxLen++) if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) break; distances[offset - 2] = maxLen; if (maxLen == lenLimit) { p->son[p->cyclicBufferPos] = curMatch; MOVE_POS_RET; } } if (maxLen < 3) maxLen = 3; offset = (LZ_UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), distances + offset, maxLen) - (distances)); MOVE_POS_RET } LZ_UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances) { LZ_UInt32 offset; GET_MATCHES_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; offset = (LZ_UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), distances, 2) - (distances)); MOVE_POS_RET } static void Bt2_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(2) HASH2_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Bt3_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value; SKIP_HEADER(3) HASH3_CALC; curMatch = p->hash[kFix3HashSize + hashValue]; p->hash[hash2Value] = p->hash[kFix3HashSize + hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Bt4_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value, hash3Value; SKIP_HEADER(4) HASH4_CALC; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->pos; p->hash[kFix4HashSize + hashValue] = p->pos; SKIP_FOOTER } while (--num != 0); } static void Hc4_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { LZ_UInt32 hash2Value, hash3Value; SKIP_HEADER(4) HASH4_CALC; curMatch = p->hash[kFix4HashSize + hashValue]; p->hash[ hash2Value] = p->hash[kFix3HashSize + hash3Value] = p->hash[kFix4HashSize + hashValue] = p->pos; p->son[p->cyclicBufferPos] = curMatch; MOVE_POS } while (--num != 0); } void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hashValue]; p->hash[hashValue] = p->pos; p->son[p->cyclicBufferPos] = curMatch; MOVE_POS } while (--num != 0); } void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) { vTable->Init = (Mf_Init_Func)MatchFinder_Init; vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte; vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; if (!p->btMode) { vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; } else if (p->numHashBytes == 2) { vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; } else if (p->numHashBytes == 3) { vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; } else { vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; } } �������������������������������������������������������������������flmsg-2.0.10/src/lzma/Alloc.c�����������������������������������������������������������������������0000664�0001750�0001750�00000007204�12330516146�012561� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Alloc.c -- Memory allocation functions 2008-09-24 Igor Pavlov Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifdef _WIN32 #include <windows.h> #endif #include <stdlib.h> #include "Alloc.h" /* #define _SZ_ALLOC_DEBUG */ /* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ #ifdef _SZ_ALLOC_DEBUG #include <stdio.h> int g_allocCount = 0; int g_allocCountMid = 0; int g_allocCountBig = 0; #endif void *MyAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG { void *p = malloc(size); fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); return p; } #else return malloc(size); #endif } void MyFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); #endif free(address); } #ifdef _WIN32 void *MidAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); #endif return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); } void MidFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); #endif if (address == 0) return; VirtualFree(address, 0, MEM_RELEASE); } #ifndef MEM_LARGE_PAGES #undef _7ZIP_LARGE_PAGES #endif #ifdef _7ZIP_LARGE_PAGES SIZE_T g_LargePageSize = 0; typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); #endif void SetLargePageSize() { #ifdef _7ZIP_LARGE_PAGES SIZE_T size = 0; GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); if (largePageMinimum == 0) return; size = largePageMinimum(); if (size == 0 || (size & (size - 1)) != 0) return; g_LargePageSize = size; #endif } void *BigAlloc(size_t size) { if (size == 0) return 0; #ifdef _SZ_ALLOC_DEBUG fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); #endif #ifdef _7ZIP_LARGE_PAGES if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) { void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); if (res != 0) return res; } #endif return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); } void BigFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); #endif if (address == 0) return; VirtualFree(address, 0, MEM_RELEASE); } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaEnc.h���������������������������������������������������������������������0000664�0001750�0001750�00000007354�12330516146�013073� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaEnc.h -- LZMA Encoder 2008-10-04 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __LZMAENC_H #define __LZMAENC_H #include "Types.h" #define LZMA_PROPS_SIZE 5 typedef struct _CLzmaEncProps { int level; /* 0 <= level <= 9 */ LZ_UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version (1 << 12) <= dictSize <= (1 << 30) for 64-bit version default = (1 << 24) */ int lc; /* 0 <= lc <= 8, default = 3 */ int lp; /* 0 <= lp <= 4, default = 0 */ int pb; /* 0 <= pb <= 4, default = 2 */ int algo; /* 0 - fast, 1 - normal, default = 1 */ int fb; /* 5 <= fb <= 273, default = 32 */ int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ int numHashBytes; /* 2, 3 or 4, default = 4 */ LZ_UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ int numThreads; /* 1 or 2, default = 2 */ } CLzmaEncProps; void LzmaEncProps_Init(CLzmaEncProps *p); void LzmaEncProps_Normalize(CLzmaEncProps *p); LZ_UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); /* ---------- CLzmaEncHandle Interface ---------- */ /* LzmaEnc_* functions can return the following exit codes: Returns: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater in props SZ_ERROR_WRITE - Write callback error. SZ_ERROR_PROGRESS - some break from progress callback SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ typedef void * CLzmaEncHandle; CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc); void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig); SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); /* ---------- One Call Interface ---------- */ /* LzmaEncode Return code: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaDec.h���������������������������������������������������������������������0000664�0001750�0001750�00000017407�12330516146�013061� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaDec.h -- LZMA Decoder 2008-10-04 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __LZMADEC_H #define __LZMADEC_H #include "Types.h" /* #define _LZMA_PROB32 */ /* _LZMA_PROB32 can increase the speed on some CPUs, but memory usage for CLzmaDec::probs will be doubled in that case */ #ifdef _LZMA_PROB32 #define CLzmaProb LZ_UInt32 #else #define CLzmaProb UInt16 #endif /* ---------- LZMA Properties ---------- */ #define LZMA_PROPS_SIZE 5 typedef struct _CLzmaProps { unsigned lc, lp, pb; LZ_UInt32 dicSize; } CLzmaProps; /* LzmaProps_Decode - decodes properties Returns: SZ_OK SZ_ERROR_UNSUPPORTED - Unsupported properties */ SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); /* ---------- LZMA Decoder state ---------- */ /* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ #define LZMA_REQUIRED_INPUT_MAX 20 typedef struct { CLzmaProps prop; CLzmaProb *probs; Byte *dic; const Byte *buf; LZ_UInt32 range, code; SizeT dicPos; SizeT dicBufSize; LZ_UInt32 processedPos; LZ_UInt32 checkDicSize; unsigned state; LZ_UInt32 reps[4]; unsigned remainLen; int needFlush; int needInitState; LZ_UInt32 numProbs; unsigned tempBufSize; Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; } CLzmaDec; #define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } void LzmaDec_Init(CLzmaDec *p); /* There are two types of LZMA streams: 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ typedef enum { LZMA_FINISH_ANY, /* finish at any point */ LZMA_FINISH_END /* block must be finished at the end */ } ELzmaFinishMode; /* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! You must use LZMA_FINISH_END, when you know that current output buffer covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, and output value of destLen will be less than output buffer size limit. You can check status result also. You can use multiple checks to test data integrity after full decompression: 1) Check Result and "status" variable. 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. You must use correct finish mode in that case. */ typedef enum { LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ } ELzmaStatus; /* ELzmaStatus is used only as output value for function call */ /* ---------- Interfaces ---------- */ /* There are 3 levels of interfaces: 1) Dictionary Interface 2) Buffer Interface 3) One Call Interface You can select any of these interfaces, but don't mix functions from different groups for same object. */ /* There are two variants to allocate state for Dictionary Interface: 1) LzmaDec_Allocate / LzmaDec_Free 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs You can use variant 2, if you set dictionary buffer manually. For Buffer Interface you must always use variant 1. LzmaDec_Allocate* can return: SZ_OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_UNSUPPORTED - Unsupported properties */ SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); /* ---------- Dictionary Interface ---------- */ /* You can use it, if you want to eliminate the overhead for data copying from dictionary to some other external buffer. You must work with CLzmaDec variables directly in this interface. STEPS: LzmaDec_Constr() LzmaDec_Allocate() for (each new stream) { LzmaDec_Init() while (it needs more decompression) { LzmaDec_DecodeToDic() use data from CLzmaDec::dic and update CLzmaDec::dicPos } } LzmaDec_Free() */ /* LzmaDec_DecodeToDic The decoding to internal dictionary buffer (CLzmaDec::dic). You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! finishMode: It has meaning only if the decoding reaches output limit (dicLimit). LZMA_FINISH_ANY - Decode just dicLimit bytes. LZMA_FINISH_END - Stream must be finished after dicLimit. Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_NEEDS_MORE_INPUT LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK SZ_ERROR_DATA - Data error */ SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); /* ---------- Buffer Interface ---------- */ /* It's zlib-like interface. See LzmaDec_DecodeToDic description for information about STEPS and return results, but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need to work with CLzmaDec variables manually. finishMode: It has meaning only if the decoding reaches output limit (*destLen). LZMA_FINISH_ANY - Decode just destLen bytes. LZMA_FINISH_END - Stream must be finished after (*destLen). */ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); /* ---------- One Call Interface ---------- */ /* LzmaDecode finishMode: It has meaning only if the decoding reaches output limit (*destLen). LZMA_FINISH_ANY - Decode just destLen bytes. LZMA_FINISH_END - Stream must be finished after (*destLen). Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK SZ_ERROR_DATA - Data error SZ_ERROR_MEM - Memory allocation error SZ_ERROR_UNSUPPORTED - Unsupported properties SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). */ SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaEnc.c���������������������������������������������������������������������0000664�0001750�0001750�00000202365�12330516146�013065� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaEnc.c -- LZMA Encoder 2009-02-02 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <string.h> /* #define SHOW_STAT */ /* #define SHOW_STAT2 */ #if defined(SHOW_STAT) || defined(SHOW_STAT2) #include <stdio.h> #endif #include "LzmaEnc.h" #include "LzFind.h" #ifdef COMPRESS_MF_MT #include "LzFindMt.h" #endif #ifdef SHOW_STAT static int ttt = 0; #endif #define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1) #define kBlockSize (9 << 10) #define kUnpackBlockSize (1 << 18) #define kMatchArraySize (1 << 21) #define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX) #define kNumMaxDirectBits (31) #define kNumTopBits 24 #define kTopValue ((LZ_UInt32)1 << kNumTopBits) #define kNumBitModelTotalBits 11 #define kBitModelTotal (1 << kNumBitModelTotalBits) #define kNumMoveBits 5 #define kProbInitValue (kBitModelTotal >> 1) #define kNumMoveReducingBits 4 #define kNumBitPriceShiftBits 4 #define kBitPrice (1 << kNumBitPriceShiftBits) void LzmaEncProps_Init(CLzmaEncProps *p) { p->level = 5; p->dictSize = p->mc = 0; p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; p->writeEndMark = 0; } void LzmaEncProps_Normalize(CLzmaEncProps *p) { int level = p->level; if (level < 0) level = 5; p->level = level; if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); if (p->lc < 0) p->lc = 3; if (p->lp < 0) p->lp = 0; if (p->pb < 0) p->pb = 2; if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); if (p->numHashBytes < 0) p->numHashBytes = 4; if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); if (p->numThreads < 0) p->numThreads = #ifdef COMPRESS_MF_MT ((p->btMode && p->algo) ? 2 : 1); #else 1; #endif } LZ_UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) { CLzmaEncProps props = *props2; LzmaEncProps_Normalize(&props); return props.dictSize; } /* #define LZMA_LOG_BSR */ /* Define it for Intel's CPU */ #ifdef LZMA_LOG_BSR #define kDicLogSizeMaxCompress 30 #define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); } LZ_UInt32 GetPosSlot1(LZ_UInt32 pos) { LZ_UInt32 res; BSR2_RET(pos, res); return res; } #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } #define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } #else #define kNumLogBits (9 + (int)sizeof(size_t) / 2) #define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) void LzmaEnc_FastPosInit(Byte *g_FastPos) { int c = 2, slotFast; g_FastPos[0] = 0; g_FastPos[1] = 1; for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++) { LZ_UInt32 k = (1 << ((slotFast >> 1) - 1)); LZ_UInt32 j; for (j = 0; j < k; j++, c++) g_FastPos[c] = (Byte)slotFast; } } #define BSR2_RET(pos, res) { LZ_UInt32 i = 6 + ((kNumLogBits - 1) & \ (0 - (((((LZ_UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ res = p->g_FastPos[pos >> i] + (i * 2); } /* #define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ p->g_FastPos[pos >> 6] + 12 : \ p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } */ #define GetPosSlot1(pos) p->g_FastPos[pos] #define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } #define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); } #endif #define LZMA_NUM_REPS 4 typedef unsigned CState; typedef struct _COptimal { LZ_UInt32 price; CState state; int prev1IsChar; int prev2; LZ_UInt32 posPrev2; LZ_UInt32 backPrev2; LZ_UInt32 posPrev; LZ_UInt32 backPrev; LZ_UInt32 backs[LZMA_NUM_REPS]; } COptimal; #define kNumOpts (1 << 12) #define kNumLenToPosStates 4 #define kNumPosSlotBits 6 #define kDicLogSizeMin 0 #define kDicLogSizeMax 32 #define kDistTableSizeMax (kDicLogSizeMax * 2) #define kNumAlignBits 4 #define kAlignTableSize (1 << kNumAlignBits) #define kAlignMask (kAlignTableSize - 1) #define kStartPosModelIndex 4 #define kEndPosModelIndex 14 #define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex) #define kNumFullDistances (1 << (kEndPosModelIndex / 2)) #ifdef _LZMA_PROB32 #define CLzmaProb LZ_UInt32 #else #define CLzmaProb UInt16 #endif #define LZMA_PB_MAX 4 #define LZMA_LC_MAX 8 #define LZMA_LP_MAX 4 #define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) #define kLenNumLowBits 3 #define kLenNumLowSymbols (1 << kLenNumLowBits) #define kLenNumMidBits 3 #define kLenNumMidSymbols (1 << kLenNumMidBits) #define kLenNumHighBits 8 #define kLenNumHighSymbols (1 << kLenNumHighBits) #define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) #define LZMA_MATCH_LEN_MIN 2 #define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) #define kNumStates 12 typedef struct { CLzmaProb choice; CLzmaProb choice2; CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits]; CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits]; CLzmaProb high[kLenNumHighSymbols]; } CLenEnc; typedef struct { CLenEnc p; LZ_UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; LZ_UInt32 tableSize; LZ_UInt32 counters[LZMA_NUM_PB_STATES_MAX]; } CLenPriceEnc; typedef struct _CRangeEnc { LZ_UInt32 range; Byte cache; LZ_UInt64 low; LZ_UInt64 cacheSize; Byte *buf; Byte *bufLim; Byte *bufBase; ISeqOutStream *outStream; LZ_UInt64 processed; SRes res; } CRangeEnc; typedef struct _CSeqInStreamBuf { ISeqInStream funcTable; const Byte *data; SizeT rem; } CSeqInStreamBuf; static SRes MyRead(void *pp, void *data, size_t *size) { size_t curSize = *size; CSeqInStreamBuf *p = (CSeqInStreamBuf *)pp; if (p->rem < curSize) curSize = p->rem; memcpy(data, p->data, curSize); p->rem -= curSize; p->data += curSize; *size = curSize; return SZ_OK; } typedef struct { CLzmaProb *litProbs; CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb isRep[kNumStates]; CLzmaProb isRepG0[kNumStates]; CLzmaProb isRepG1[kNumStates]; CLzmaProb isRepG2[kNumStates]; CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; CLzmaProb posAlignEncoder[1 << kNumAlignBits]; CLenPriceEnc lenEnc; CLenPriceEnc repLenEnc; LZ_UInt32 reps[LZMA_NUM_REPS]; LZ_UInt32 state; } CSaveState; typedef struct _CLzmaEnc { IMatchFinder matchFinder; void *matchFinderObj; #ifdef COMPRESS_MF_MT int mtMode; CMatchFinderMt matchFinderMt; #endif CMatchFinder matchFinderBase; #ifdef COMPRESS_MF_MT Byte pad[128]; #endif LZ_UInt32 optimumEndIndex; LZ_UInt32 optimumCurrentIndex; LZ_UInt32 longestMatchLength; LZ_UInt32 numPairs; LZ_UInt32 numAvail; COptimal opt[kNumOpts]; #ifndef LZMA_LOG_BSR Byte g_FastPos[1 << kNumLogBits]; #endif LZ_UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; LZ_UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; LZ_UInt32 numFastBytes; LZ_UInt32 additionalOffset; LZ_UInt32 reps[LZMA_NUM_REPS]; LZ_UInt32 state; LZ_UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; LZ_UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; LZ_UInt32 alignPrices[kAlignTableSize]; LZ_UInt32 alignPriceCount; LZ_UInt32 distTableSize; unsigned lc, lp, pb; unsigned lpMask, pbMask; CLzmaProb *litProbs; CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb isRep[kNumStates]; CLzmaProb isRepG0[kNumStates]; CLzmaProb isRepG1[kNumStates]; CLzmaProb isRepG2[kNumStates]; CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; CLzmaProb posAlignEncoder[1 << kNumAlignBits]; CLenPriceEnc lenEnc; CLenPriceEnc repLenEnc; unsigned lclp; int fastMode; CRangeEnc rc; int writeEndMark; LZ_UInt64 nowPos64; LZ_UInt32 matchPriceCount; int finished; int multiThread; SRes result; LZ_UInt32 dictSize; LZ_UInt32 matchFinderCycles; ISeqInStream *inStream; CSeqInStreamBuf seqBufInStream; CSaveState saveState; } CLzmaEnc; void LzmaEnc_SaveState(CLzmaEncHandle pp) { CLzmaEnc *p = (CLzmaEnc *)pp; CSaveState *dest = &p->saveState; int i; dest->lenEnc = p->lenEnc; dest->repLenEnc = p->repLenEnc; dest->state = p->state; for (i = 0; i < kNumStates; i++) { memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); } for (i = 0; i < kNumLenToPosStates; i++) memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); memcpy(dest->reps, p->reps, sizeof(p->reps)); memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb)); } void LzmaEnc_RestoreState(CLzmaEncHandle pp) { CLzmaEnc *dest = (CLzmaEnc *)pp; const CSaveState *p = &dest->saveState; int i; dest->lenEnc = p->lenEnc; dest->repLenEnc = p->repLenEnc; dest->state = p->state; for (i = 0; i < kNumStates; i++) { memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); } for (i = 0; i < kNumLenToPosStates; i++) memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); memcpy(dest->reps, p->reps, sizeof(p->reps)); memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb)); } SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) { CLzmaEnc *p = (CLzmaEnc *)pp; CLzmaEncProps props = *props2; LzmaEncProps_Normalize(&props); if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || props.dictSize > (1 << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30)) return SZ_ERROR_PARAM; p->dictSize = props.dictSize; p->matchFinderCycles = props.mc; { unsigned fb = props.fb; if (fb < 5) fb = 5; if (fb > LZMA_MATCH_LEN_MAX) fb = LZMA_MATCH_LEN_MAX; p->numFastBytes = fb; } p->lc = props.lc; p->lp = props.lp; p->pb = props.pb; p->fastMode = (props.algo == 0); p->matchFinderBase.btMode = props.btMode; { LZ_UInt32 numHashBytes = 4; if (props.btMode) { if (props.numHashBytes < 2) numHashBytes = 2; else if (props.numHashBytes < 4) numHashBytes = props.numHashBytes; } p->matchFinderBase.numHashBytes = numHashBytes; } p->matchFinderBase.cutValue = props.mc; p->writeEndMark = props.writeEndMark; #ifdef COMPRESS_MF_MT /* if (newMultiThread != _multiThread) { ReleaseMatchFinder(); _multiThread = newMultiThread; } */ p->multiThread = (props.numThreads > 1); #endif return SZ_OK; } static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; #define IsCharState(s) ((s) < 7) #define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) #define kInfinityPrice (1 << 30) static void RangeEnc_Construct(CRangeEnc *p) { p->outStream = 0; p->bufBase = 0; } #define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) #define RC_BUF_SIZE (1 << 16) static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc) { if (p->bufBase == 0) { p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE); if (p->bufBase == 0) return 0; p->bufLim = p->bufBase + RC_BUF_SIZE; } return 1; } static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc) { alloc->Free(alloc, p->bufBase); p->bufBase = 0; } static void RangeEnc_Init(CRangeEnc *p) { /* Stream.Init(); */ p->low = 0; p->range = 0xFFFFFFFF; p->cacheSize = 1; p->cache = 0; p->buf = p->bufBase; p->processed = 0; p->res = SZ_OK; } static void RangeEnc_FlushStream(CRangeEnc *p) { size_t num; if (p->res != SZ_OK) return; num = p->buf - p->bufBase; if (num != p->outStream->Write(p->outStream, p->bufBase, num)) p->res = SZ_ERROR_WRITE; p->processed += num; p->buf = p->bufBase; } static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) { if ((LZ_UInt32)p->low < (LZ_UInt32)0xFF000000 || (int)(p->low >> 32) != 0) { Byte temp = p->cache; do { Byte *buf = p->buf; *buf++ = (Byte)(temp + (Byte)(p->low >> 32)); p->buf = buf; if (buf == p->bufLim) RangeEnc_FlushStream(p); temp = 0xFF; } while (--p->cacheSize != 0); p->cache = (Byte)((LZ_UInt32)p->low >> 24); } p->cacheSize++; p->low = (LZ_UInt32)p->low << 8; } static void RangeEnc_FlushData(CRangeEnc *p) { int i; for (i = 0; i < 5; i++) RangeEnc_ShiftLow(p); } static void RangeEnc_EncodeDirectBits(CRangeEnc *p, LZ_UInt32 value, int numBits) { do { p->range >>= 1; p->low += p->range & (0 - ((value >> --numBits) & 1)); if (p->range < kTopValue) { p->range <<= 8; RangeEnc_ShiftLow(p); } } while (numBits != 0); } static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, LZ_UInt32 symbol) { LZ_UInt32 ttt = *prob; LZ_UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; if (symbol == 0) { p->range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } else { p->low += newBound; p->range -= newBound; ttt -= ttt >> kNumMoveBits; } *prob = (CLzmaProb)ttt; if (p->range < kTopValue) { p->range <<= 8; RangeEnc_ShiftLow(p); } } static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, LZ_UInt32 symbol) { symbol |= 0x100; do { RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1); symbol <<= 1; } while (symbol < 0x10000); } static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 matchByte) { LZ_UInt32 offs = 0x100; symbol |= 0x100; do { matchByte <<= 1; RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1); symbol <<= 1; offs &= ~(matchByte ^ symbol); } while (symbol < 0x10000); } void LzmaEnc_InitPriceTables(LZ_UInt32 *ProbPrices) { LZ_UInt32 i; for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits)) { const int kCyclesBits = kNumBitPriceShiftBits; LZ_UInt32 w = i; LZ_UInt32 bitCount = 0; int j; for (j = 0; j < kCyclesBits; j++) { w = w * w; bitCount <<= 1; while (w >= ((LZ_UInt32)1 << 16)) { w >>= 1; bitCount++; } } ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); } } #define GET_PRICE(prob, symbol) \ p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; #define GET_PRICEa(prob, symbol) \ ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; #define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] #define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] #define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits] #define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] static LZ_UInt32 LitEnc_GetPrice(const CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; symbol |= 0x100; do { price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); symbol <<= 1; } while (symbol < 0x10000); return price; } static LZ_UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, LZ_UInt32 symbol, LZ_UInt32 matchByte, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; LZ_UInt32 offs = 0x100; symbol |= 0x100; do { matchByte <<= 1; price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); symbol <<= 1; offs &= ~(matchByte ^ symbol); } while (symbol < 0x10000); return price; } static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol) { LZ_UInt32 m = 1; int i; for (i = numBitLevels; i != 0;) { LZ_UInt32 bit; i--; bit = (symbol >> i) & 1; RangeEnc_EncodeBit(rc, probs + m, bit); m = (m << 1) | bit; } } static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol) { LZ_UInt32 m = 1; int i; for (i = 0; i < numBitLevels; i++) { LZ_UInt32 bit = symbol & 1; RangeEnc_EncodeBit(rc, probs + m, bit); m = (m << 1) | bit; symbol >>= 1; } } static LZ_UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; symbol |= (1 << numBitLevels); while (symbol != 1) { price += GET_PRICEa(probs[symbol >> 1], symbol & 1); symbol >>= 1; } return price; } static LZ_UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, LZ_UInt32 symbol, LZ_UInt32 *ProbPrices) { LZ_UInt32 price = 0; LZ_UInt32 m = 1; int i; for (i = numBitLevels; i != 0; i--) { LZ_UInt32 bit = symbol & 1; symbol >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) | bit; } return price; } static void LenEnc_Init(CLenEnc *p) { unsigned i; p->choice = p->choice2 = kProbInitValue; for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) p->low[i] = kProbInitValue; for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) p->mid[i] = kProbInitValue; for (i = 0; i < kLenNumHighSymbols; i++) p->high[i] = kProbInitValue; } static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, LZ_UInt32 symbol, LZ_UInt32 posState) { if (symbol < kLenNumLowSymbols) { RangeEnc_EncodeBit(rc, &p->choice, 0); RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); } else { RangeEnc_EncodeBit(rc, &p->choice, 1); if (symbol < kLenNumLowSymbols + kLenNumMidSymbols) { RangeEnc_EncodeBit(rc, &p->choice2, 0); RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols); } else { RangeEnc_EncodeBit(rc, &p->choice2, 1); RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols); } } } static void LenEnc_SetPrices(CLenEnc *p, LZ_UInt32 posState, LZ_UInt32 numSymbols, LZ_UInt32 *prices, LZ_UInt32 *ProbPrices) { LZ_UInt32 a0 = GET_PRICE_0a(p->choice); LZ_UInt32 a1 = GET_PRICE_1a(p->choice); LZ_UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); LZ_UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); LZ_UInt32 i = 0; for (i = 0; i < kLenNumLowSymbols; i++) { if (i >= numSymbols) return; prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices); } for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++) { if (i >= numSymbols) return; prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices); } for (; i < numSymbols; i++) prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices); } static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, LZ_UInt32 posState, LZ_UInt32 *ProbPrices) { LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); p->counters[posState] = p->tableSize; } static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, LZ_UInt32 numPosStates, LZ_UInt32 *ProbPrices) { LZ_UInt32 posState; for (posState = 0; posState < numPosStates; posState++) LenPriceEnc_UpdateTable(p, posState, ProbPrices); } static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, LZ_UInt32 symbol, LZ_UInt32 posState, int updatePrice, LZ_UInt32 *ProbPrices) { LenEnc_Encode(&p->p, rc, symbol, posState); if (updatePrice) if (--p->counters[posState] == 0) LenPriceEnc_UpdateTable(p, posState, ProbPrices); } static void MovePos(CLzmaEnc *p, LZ_UInt32 num) { #ifdef SHOW_STAT ttt += num; printf("\n MovePos %d", num); #endif if (num != 0) { p->additionalOffset += num; p->matchFinder.Skip(p->matchFinderObj, num); } } static LZ_UInt32 ReadMatchDistances(CLzmaEnc *p, LZ_UInt32 *numDistancePairsRes) { LZ_UInt32 lenRes = 0, numPairs; p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); #ifdef SHOW_STAT printf("\n i = %d numPairs = %d ", ttt, numPairs / 2); ttt++; { LZ_UInt32 i; for (i = 0; i < numPairs; i += 2) printf("%2d %6d | ", p->matches[i], p->matches[i + 1]); } #endif if (numPairs > 0) { lenRes = p->matches[numPairs - 2]; if (lenRes == p->numFastBytes) { const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; LZ_UInt32 distance = p->matches[numPairs - 1] + 1; LZ_UInt32 numAvail = p->numAvail; if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; { const Byte *pby2 = pby - distance; for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++); } } } p->additionalOffset++; *numDistancePairsRes = numPairs; return lenRes; } #define MakeAsChar(p) (p)->backPrev = (LZ_UInt32)(-1); (p)->prev1IsChar = False; #define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False; #define IsShortRep(p) ((p)->backPrev == 0) static LZ_UInt32 GetRepLen1Price(CLzmaEnc *p, LZ_UInt32 state, LZ_UInt32 posState) { return GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState]); } static LZ_UInt32 GetPureRepPrice(CLzmaEnc *p, LZ_UInt32 repIndex, LZ_UInt32 state, LZ_UInt32 posState) { LZ_UInt32 price; if (repIndex == 0) { price = GET_PRICE_0(p->isRepG0[state]); price += GET_PRICE_1(p->isRep0Long[state][posState]); } else { price = GET_PRICE_1(p->isRepG0[state]); if (repIndex == 1) price += GET_PRICE_0(p->isRepG1[state]); else { price += GET_PRICE_1(p->isRepG1[state]); price += GET_PRICE(p->isRepG2[state], repIndex - 2); } } return price; } static LZ_UInt32 GetRepPrice(CLzmaEnc *p, LZ_UInt32 repIndex, LZ_UInt32 len, LZ_UInt32 state, LZ_UInt32 posState) { return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + GetPureRepPrice(p, repIndex, state, posState); } static LZ_UInt32 Backward(CLzmaEnc *p, LZ_UInt32 *backRes, LZ_UInt32 cur) { LZ_UInt32 posMem = p->opt[cur].posPrev; LZ_UInt32 backMem = p->opt[cur].backPrev; p->optimumEndIndex = cur; do { if (p->opt[cur].prev1IsChar) { MakeAsChar(&p->opt[posMem]) p->opt[posMem].posPrev = posMem - 1; if (p->opt[cur].prev2) { p->opt[posMem - 1].prev1IsChar = False; p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2; p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2; } } { LZ_UInt32 posPrev = posMem; LZ_UInt32 backCur = backMem; backMem = p->opt[posPrev].backPrev; posMem = p->opt[posPrev].posPrev; p->opt[posPrev].backPrev = backCur; p->opt[posPrev].posPrev = cur; cur = posPrev; } } while (cur != 0); *backRes = p->opt[0].backPrev; p->optimumCurrentIndex = p->opt[0].posPrev; return p->optimumCurrentIndex; } #define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300) static LZ_UInt32 GetOptimum(CLzmaEnc *p, LZ_UInt32 position, LZ_UInt32 *backRes) { LZ_UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; LZ_UInt32 matchPrice, repMatchPrice, normalMatchPrice; LZ_UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; LZ_UInt32 *matches; const Byte *data; Byte curByte, matchByte; if (p->optimumEndIndex != p->optimumCurrentIndex) { const COptimal *opt = &p->opt[p->optimumCurrentIndex]; LZ_UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; *backRes = opt->backPrev; p->optimumCurrentIndex = opt->posPrev; return lenRes; } p->optimumCurrentIndex = p->optimumEndIndex = 0; if (p->additionalOffset == 0) mainLen = ReadMatchDistances(p, &numPairs); else { mainLen = p->longestMatchLength; numPairs = p->numPairs; } numAvail = p->numAvail; if (numAvail < 2) { *backRes = (LZ_UInt32)(-1); return 1; } if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; repMaxIndex = 0; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 lenTest; const Byte *data2; reps[i] = p->reps[i]; data2 = data - (reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) { repLens[i] = 0; continue; } for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); repLens[i] = lenTest; if (lenTest > repLens[repMaxIndex]) repMaxIndex = i; } if (repLens[repMaxIndex] >= p->numFastBytes) { LZ_UInt32 lenRes; *backRes = repMaxIndex; lenRes = repLens[repMaxIndex]; MovePos(p, lenRes - 1); return lenRes; } matches = p->matches; if (mainLen >= p->numFastBytes) { *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; MovePos(p, mainLen - 1); return mainLen; } curByte = *data; matchByte = *(data - (reps[0] + 1)); if (mainLen < 2 && curByte != matchByte && repLens[repMaxIndex] < 2) { *backRes = (LZ_UInt32)-1; return 1; } p->opt[0].state = (CState)p->state; posState = (position & p->pbMask); { const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + (!IsCharState(p->state) ? LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : LitEnc_GetPrice(probs, curByte, p->ProbPrices)); } MakeAsChar(&p->opt[1]); matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); if (matchByte == curByte) { LZ_UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); if (shortRepPrice < p->opt[1].price) { p->opt[1].price = shortRepPrice; MakeAsShortRep(&p->opt[1]); } } lenEnd = ((mainLen >= repLens[repMaxIndex]) ? mainLen : repLens[repMaxIndex]); if (lenEnd < 2) { *backRes = p->opt[1].backPrev; return 1; } p->opt[1].posPrev = 0; for (i = 0; i < LZMA_NUM_REPS; i++) p->opt[0].backs[i] = reps[i]; len = lenEnd; do p->opt[len--].price = kInfinityPrice; while (len >= 2); for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 repLen = repLens[i]; LZ_UInt32 price; if (repLen < 2) continue; price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); do { LZ_UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; COptimal *opt = &p->opt[repLen]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = 0; opt->backPrev = i; opt->prev1IsChar = False; } } while (--repLen >= 2); } normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2); if (len <= mainLen) { LZ_UInt32 offs = 0; while (len > matches[offs]) offs += 2; for (; ; len++) { COptimal *opt; LZ_UInt32 distance = matches[offs + 1]; LZ_UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; LZ_UInt32 lenToPosState = GetLenToPosState(len); if (distance < kNumFullDistances) curAndLenPrice += p->distancesPrices[lenToPosState][distance]; else { LZ_UInt32 slot; GetPosSlot2(distance, slot); curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot]; } opt = &p->opt[len]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = 0; opt->backPrev = distance + LZMA_NUM_REPS; opt->prev1IsChar = False; } if (len == matches[offs]) { offs += 2; if (offs == numPairs) break; } } } cur = 0; #ifdef SHOW_STAT2 if (position >= 0) { unsigned i; printf("\n pos = %4X", position); for (i = cur; i <= lenEnd; i++) printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price); } #endif for (;;) { LZ_UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; LZ_UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; int nextIsChar; Byte curByte, matchByte; const Byte *data; COptimal *curOpt; COptimal *nextOpt; cur++; if (cur == lenEnd) return Backward(p, backRes, cur); newLen = ReadMatchDistances(p, &numPairs); if (newLen >= p->numFastBytes) { p->numPairs = numPairs; p->longestMatchLength = newLen; return Backward(p, backRes, cur); } position++; curOpt = &p->opt[cur]; posPrev = curOpt->posPrev; if (curOpt->prev1IsChar) { posPrev--; if (curOpt->prev2) { state = p->opt[curOpt->posPrev2].state; if (curOpt->backPrev2 < LZMA_NUM_REPS) state = kRepNextStates[state]; else state = kMatchNextStates[state]; } else state = p->opt[posPrev].state; state = kLiteralNextStates[state]; } else state = p->opt[posPrev].state; if (posPrev == cur - 1) { if (IsShortRep(curOpt)) state = kShortRepNextStates[state]; else state = kLiteralNextStates[state]; } else { LZ_UInt32 pos; const COptimal *prevOpt; if (curOpt->prev1IsChar && curOpt->prev2) { posPrev = curOpt->posPrev2; pos = curOpt->backPrev2; state = kRepNextStates[state]; } else { pos = curOpt->backPrev; if (pos < LZMA_NUM_REPS) state = kRepNextStates[state]; else state = kMatchNextStates[state]; } prevOpt = &p->opt[posPrev]; if (pos < LZMA_NUM_REPS) { LZ_UInt32 i; reps[0] = prevOpt->backs[pos]; for (i = 1; i <= pos; i++) reps[i] = prevOpt->backs[i - 1]; for (; i < LZMA_NUM_REPS; i++) reps[i] = prevOpt->backs[i]; } else { LZ_UInt32 i; reps[0] = (pos - LZMA_NUM_REPS); for (i = 1; i < LZMA_NUM_REPS; i++) reps[i] = prevOpt->backs[i - 1]; } } curOpt->state = (CState)state; curOpt->backs[0] = reps[0]; curOpt->backs[1] = reps[1]; curOpt->backs[2] = reps[2]; curOpt->backs[3] = reps[3]; curPrice = curOpt->price; nextIsChar = False; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; curByte = *data; matchByte = *(data - (reps[0] + 1)); posState = (position & p->pbMask); curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); { const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); curAnd1Price += (!IsCharState(state) ? LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : LitEnc_GetPrice(probs, curByte, p->ProbPrices)); } nextOpt = &p->opt[cur + 1]; if (curAnd1Price < nextOpt->price) { nextOpt->price = curAnd1Price; nextOpt->posPrev = cur; MakeAsChar(nextOpt); nextIsChar = True; } matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0)) { LZ_UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); if (shortRepPrice <= nextOpt->price) { nextOpt->price = shortRepPrice; nextOpt->posPrev = cur; MakeAsShortRep(nextOpt); nextIsChar = True; } } numAvailFull = p->numAvail; { LZ_UInt32 temp = kNumOpts - 1 - cur; if (temp < numAvailFull) numAvailFull = temp; } if (numAvailFull < 2) continue; numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); if (!nextIsChar && matchByte != curByte) /* speed optimization */ { /* try Literal + rep0 */ LZ_UInt32 temp; LZ_UInt32 lenTest2; const Byte *data2 = data - (reps[0] + 1); LZ_UInt32 limit = p->numFastBytes + 1; if (limit > numAvailFull) limit = numAvailFull; for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++); lenTest2 = temp - 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kLiteralNextStates[state]; LZ_UInt32 posStateNext = (position + 1) & p->pbMask; LZ_UInt32 nextRepMatchPrice = curAnd1Price + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 curAndLenPrice; COptimal *opt; LZ_UInt32 offset = cur + 1 + lenTest2; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = False; } } } } startLen = 2; /* speed optimization */ { LZ_UInt32 repIndex; for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++) { LZ_UInt32 lenTest; LZ_UInt32 lenTestTemp; LZ_UInt32 price; const Byte *data2 = data - (reps[repIndex] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); while (lenEnd < cur + lenTest) p->opt[++lenEnd].price = kInfinityPrice; lenTestTemp = lenTest; price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); do { LZ_UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; COptimal *opt = &p->opt[cur + lenTest]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur; opt->backPrev = repIndex; opt->prev1IsChar = False; } } while (--lenTest >= 2); lenTest = lenTestTemp; if (repIndex == 0) startLen = lenTest + 1; /* if (_maxMode) */ { LZ_UInt32 lenTest2 = lenTest + 1; LZ_UInt32 limit = lenTest2 + p->numFastBytes; LZ_UInt32 nextRepMatchPrice; if (limit > numAvailFull) limit = numAvailFull; for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); lenTest2 -= lenTest + 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kRepNextStates[state]; LZ_UInt32 posStateNext = (position + lenTest) & p->pbMask; LZ_UInt32 curAndLenCharPrice = price + p->repLenEnc.prices[posState][lenTest - 2] + GET_PRICE_0(p->isMatch[state2][posStateNext]) + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), data[lenTest], data2[lenTest], p->ProbPrices); state2 = kLiteralNextStates[state2]; posStateNext = (position + lenTest + 1) & p->pbMask; nextRepMatchPrice = curAndLenCharPrice + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 curAndLenPrice; COptimal *opt; LZ_UInt32 offset = cur + lenTest + 1 + lenTest2; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + lenTest + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = True; opt->posPrev2 = cur; opt->backPrev2 = repIndex; } } } } } } /* for (LZ_UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */ if (newLen > numAvail) { newLen = numAvail; for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); matches[numPairs] = newLen; numPairs += 2; } if (newLen >= startLen) { LZ_UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); LZ_UInt32 offs, curBack, posSlot; LZ_UInt32 lenTest; while (lenEnd < cur + newLen) p->opt[++lenEnd].price = kInfinityPrice; offs = 0; while (startLen > matches[offs]) offs += 2; curBack = matches[offs + 1]; GetPosSlot2(curBack, posSlot); for (lenTest = /*2*/ startLen; ; lenTest++) { LZ_UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN]; LZ_UInt32 lenToPosState = GetLenToPosState(lenTest); COptimal *opt; if (curBack < kNumFullDistances) curAndLenPrice += p->distancesPrices[lenToPosState][curBack]; else curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask]; opt = &p->opt[cur + lenTest]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur; opt->backPrev = curBack + LZMA_NUM_REPS; opt->prev1IsChar = False; } if (/*_maxMode && */lenTest == matches[offs]) { /* Try Match + Literal + Rep0 */ const Byte *data2 = data - (curBack + 1); LZ_UInt32 lenTest2 = lenTest + 1; LZ_UInt32 limit = lenTest2 + p->numFastBytes; LZ_UInt32 nextRepMatchPrice; if (limit > numAvailFull) limit = numAvailFull; for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); lenTest2 -= lenTest + 1; if (lenTest2 >= 2) { LZ_UInt32 state2 = kMatchNextStates[state]; LZ_UInt32 posStateNext = (position + lenTest) & p->pbMask; LZ_UInt32 curAndLenCharPrice = curAndLenPrice + GET_PRICE_0(p->isMatch[state2][posStateNext]) + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), data[lenTest], data2[lenTest], p->ProbPrices); state2 = kLiteralNextStates[state2]; posStateNext = (posStateNext + 1) & p->pbMask; nextRepMatchPrice = curAndLenCharPrice + GET_PRICE_1(p->isMatch[state2][posStateNext]) + GET_PRICE_1(p->isRep[state2]); /* for (; lenTest2 >= 2; lenTest2--) */ { LZ_UInt32 offset = cur + lenTest + 1 + lenTest2; LZ_UInt32 curAndLenPrice; COptimal *opt; while (lenEnd < offset) p->opt[++lenEnd].price = kInfinityPrice; curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); opt = &p->opt[offset]; if (curAndLenPrice < opt->price) { opt->price = curAndLenPrice; opt->posPrev = cur + lenTest + 1; opt->backPrev = 0; opt->prev1IsChar = True; opt->prev2 = True; opt->posPrev2 = cur; opt->backPrev2 = curBack + LZMA_NUM_REPS; } } } offs += 2; if (offs == numPairs) break; curBack = matches[offs + 1]; if (curBack >= kNumFullDistances) GetPosSlot2(curBack, posSlot); } } } } } #define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) static LZ_UInt32 GetOptimumFast(CLzmaEnc *p, LZ_UInt32 *backRes) { LZ_UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; const Byte *data; const LZ_UInt32 *matches; if (p->additionalOffset == 0) mainLen = ReadMatchDistances(p, &numPairs); else { mainLen = p->longestMatchLength; numPairs = p->numPairs; } numAvail = p->numAvail; *backRes = (LZ_UInt32)-1; if (numAvail < 2) return 1; if (numAvail > LZMA_MATCH_LEN_MAX) numAvail = LZMA_MATCH_LEN_MAX; data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; repLen = repIndex = 0; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 len; const Byte *data2 = data - (p->reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; for (len = 2; len < numAvail && data[len] == data2[len]; len++); if (len >= p->numFastBytes) { *backRes = i; MovePos(p, len - 1); return len; } if (len > repLen) { repIndex = i; repLen = len; } } matches = p->matches; if (mainLen >= p->numFastBytes) { *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; MovePos(p, mainLen - 1); return mainLen; } mainDist = 0; /* for GCC */ if (mainLen >= 2) { mainDist = matches[numPairs - 1]; while (numPairs > 2 && mainLen == matches[numPairs - 4] + 1) { if (!ChangePair(matches[numPairs - 3], mainDist)) break; numPairs -= 2; mainLen = matches[numPairs - 2]; mainDist = matches[numPairs - 1]; } if (mainLen == 2 && mainDist >= 0x80) mainLen = 1; } if (repLen >= 2 && ( (repLen + 1 >= mainLen) || (repLen + 2 >= mainLen && mainDist >= (1 << 9)) || (repLen + 3 >= mainLen && mainDist >= (1 << 15)))) { *backRes = repIndex; MovePos(p, repLen - 1); return repLen; } if (mainLen < 2 || numAvail <= 2) return 1; p->longestMatchLength = ReadMatchDistances(p, &p->numPairs); if (p->longestMatchLength >= 2) { LZ_UInt32 newDistance = matches[p->numPairs - 1]; if ((p->longestMatchLength >= mainLen && newDistance < mainDist) || (p->longestMatchLength == mainLen + 1 && !ChangePair(mainDist, newDistance)) || (p->longestMatchLength > mainLen + 1) || (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist))) return 1; } data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; for (i = 0; i < LZMA_NUM_REPS; i++) { LZ_UInt32 len, limit; const Byte *data2 = data - (p->reps[i] + 1); if (data[0] != data2[0] || data[1] != data2[1]) continue; limit = mainLen - 1; for (len = 2; len < limit && data[len] == data2[len]; len++); if (len >= limit) return 1; } *backRes = mainDist + LZMA_NUM_REPS; MovePos(p, mainLen - 2); return mainLen; } static void WriteEndMarker(CLzmaEnc *p, LZ_UInt32 posState) { LZ_UInt32 len; RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); p->state = kMatchNextStates[p->state]; len = LZMA_MATCH_LEN_MIN; LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1); RangeEnc_EncodeDirectBits(&p->rc, (((LZ_UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); } static SRes CheckErrors(CLzmaEnc *p) { if (p->result != SZ_OK) return p->result; if (p->rc.res != SZ_OK) p->result = SZ_ERROR_WRITE; if (p->matchFinderBase.result != SZ_OK) p->result = SZ_ERROR_READ; if (p->result != SZ_OK) p->finished = True; return p->result; } static SRes Flush(CLzmaEnc *p, LZ_UInt32 nowPos) { /* ReleaseMFStream(); */ p->finished = True; if (p->writeEndMark) WriteEndMarker(p, nowPos & p->pbMask); RangeEnc_FlushData(&p->rc); RangeEnc_FlushStream(&p->rc); return CheckErrors(p); } static void FillAlignPrices(CLzmaEnc *p) { LZ_UInt32 i; for (i = 0; i < kAlignTableSize; i++) p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); p->alignPriceCount = 0; } static void FillDistancesPrices(CLzmaEnc *p) { LZ_UInt32 tempPrices[kNumFullDistances]; LZ_UInt32 i, lenToPosState; for (i = kStartPosModelIndex; i < kNumFullDistances; i++) { LZ_UInt32 posSlot = GetPosSlot1(i); LZ_UInt32 footerBits = ((posSlot >> 1) - 1); LZ_UInt32 base = ((2 | (posSlot & 1)) << footerBits); tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices); } for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++) { LZ_UInt32 posSlot; const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState]; LZ_UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; for (posSlot = 0; posSlot < p->distTableSize; posSlot++) posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices); for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++) posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits); { LZ_UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; LZ_UInt32 i; for (i = 0; i < kStartPosModelIndex; i++) distancesPrices[i] = posSlotPrices[i]; for (; i < kNumFullDistances; i++) distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i]; } } p->matchPriceCount = 0; } void LzmaEnc_Construct(CLzmaEnc *p) { RangeEnc_Construct(&p->rc); MatchFinder_Construct(&p->matchFinderBase); #ifdef COMPRESS_MF_MT MatchFinderMt_Construct(&p->matchFinderMt); p->matchFinderMt.MatchFinder = &p->matchFinderBase; #endif { CLzmaEncProps props; LzmaEncProps_Init(&props); LzmaEnc_SetProps(p, &props); } #ifndef LZMA_LOG_BSR LzmaEnc_FastPosInit(p->g_FastPos); #endif LzmaEnc_InitPriceTables(p->ProbPrices); p->litProbs = 0; p->saveState.litProbs = 0; } CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc) { void *p; p = alloc->Alloc(alloc, sizeof(CLzmaEnc)); if (p != 0) LzmaEnc_Construct((CLzmaEnc *)p); return p; } void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc) { alloc->Free(alloc, p->litProbs); alloc->Free(alloc, p->saveState.litProbs); p->litProbs = 0; p->saveState.litProbs = 0; } void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig) { #ifdef COMPRESS_MF_MT MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); #endif MatchFinder_Free(&p->matchFinderBase, allocBig); LzmaEnc_FreeLits(p, alloc); RangeEnc_Free(&p->rc, alloc); } void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig) { LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); alloc->Free(alloc, p); } static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, int useLimits, LZ_UInt32 maxPackSize, LZ_UInt32 maxUnpackSize) { LZ_UInt32 nowPos32, startPos32; if (p->inStream != 0) { p->matchFinderBase.stream = p->inStream; p->matchFinder.Init(p->matchFinderObj); p->inStream = 0; } if (p->finished) return p->result; RINOK(CheckErrors(p)); nowPos32 = (LZ_UInt32)p->nowPos64; startPos32 = nowPos32; if (p->nowPos64 == 0) { LZ_UInt32 numPairs; Byte curByte; if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) return Flush(p, nowPos32); ReadMatchDistances(p, &numPairs); RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); p->state = kLiteralNextStates[p->state]; curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset); LitEnc_Encode(&p->rc, p->litProbs, curByte); p->additionalOffset--; nowPos32++; } if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) for (;;) { LZ_UInt32 pos, len, posState; if (p->fastMode) len = GetOptimumFast(p, &pos); else len = GetOptimum(p, nowPos32, &pos); #ifdef SHOW_STAT2 printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos); #endif posState = nowPos32 & p->pbMask; if (len == 1 && pos == (LZ_UInt32)-1) { Byte curByte; CLzmaProb *probs; const Byte *data; RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; curByte = *data; probs = LIT_PROBS(nowPos32, *(data - 1)); if (IsCharState(p->state)) LitEnc_Encode(&p->rc, probs, curByte); else LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); p->state = kLiteralNextStates[p->state]; } else { RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); if (pos < LZMA_NUM_REPS) { RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); if (pos == 0) { RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); } else { LZ_UInt32 distance = p->reps[pos]; RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); if (pos == 1) RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); else { RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); if (pos == 3) p->reps[3] = p->reps[2]; p->reps[2] = p->reps[1]; } p->reps[1] = p->reps[0]; p->reps[0] = distance; } if (len == 1) p->state = kShortRepNextStates[p->state]; else { LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); p->state = kRepNextStates[p->state]; } } else { LZ_UInt32 posSlot; RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); p->state = kMatchNextStates[p->state]; LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); pos -= LZMA_NUM_REPS; GetPosSlot(pos, posSlot); RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) { LZ_UInt32 footerBits = ((posSlot >> 1) - 1); LZ_UInt32 base = ((2 | (posSlot & 1)) << footerBits); LZ_UInt32 posReduced = pos - base; if (posSlot < kEndPosModelIndex) RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); else { RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); p->alignPriceCount++; } } p->reps[3] = p->reps[2]; p->reps[2] = p->reps[1]; p->reps[1] = p->reps[0]; p->reps[0] = pos; p->matchPriceCount++; } } p->additionalOffset -= len; nowPos32 += len; if (p->additionalOffset == 0) { LZ_UInt32 processed; if (!p->fastMode) { if (p->matchPriceCount >= (1 << 7)) FillDistancesPrices(p); if (p->alignPriceCount >= kAlignTableSize) FillAlignPrices(p); } if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) break; processed = nowPos32 - startPos32; if (useLimits) { if (processed + kNumOpts + 300 >= maxUnpackSize || RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) break; } else if (processed >= (1 << 15)) { p->nowPos64 += nowPos32 - startPos32; return CheckErrors(p); } } } p->nowPos64 += nowPos32 - startPos32; return Flush(p, nowPos32); } #define kBigHashDicLimit ((LZ_UInt32)1 << 24) static SRes LzmaEnc_Alloc(CLzmaEnc *p, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { LZ_UInt32 beforeSize = kNumOpts; int btMode; if (!RangeEnc_Alloc(&p->rc, alloc)) return SZ_ERROR_MEM; btMode = (p->matchFinderBase.btMode != 0); #ifdef COMPRESS_MF_MT p->mtMode = (p->multiThread && !p->fastMode && btMode); #endif { unsigned lclp = p->lc + p->lp; if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp) { LzmaEnc_FreeLits(p, alloc); p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); if (p->litProbs == 0 || p->saveState.litProbs == 0) { LzmaEnc_FreeLits(p, alloc); return SZ_ERROR_MEM; } p->lclp = lclp; } } p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit); if (beforeSize + p->dictSize < keepWindowSize) beforeSize = keepWindowSize - p->dictSize; #ifdef COMPRESS_MF_MT if (p->mtMode) { RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)); p->matchFinderObj = &p->matchFinderMt; MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); } else #endif { if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) return SZ_ERROR_MEM; p->matchFinderObj = &p->matchFinderBase; MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); } return SZ_OK; } void LzmaEnc_Init(CLzmaEnc *p) { LZ_UInt32 i; p->state = 0; for (i = 0 ; i < LZMA_NUM_REPS; i++) p->reps[i] = 0; RangeEnc_Init(&p->rc); for (i = 0; i < kNumStates; i++) { LZ_UInt32 j; for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) { p->isMatch[i][j] = kProbInitValue; p->isRep0Long[i][j] = kProbInitValue; } p->isRep[i] = kProbInitValue; p->isRepG0[i] = kProbInitValue; p->isRepG1[i] = kProbInitValue; p->isRepG2[i] = kProbInitValue; } { LZ_UInt32 num = 0x300 << (p->lp + p->lc); for (i = 0; i < num; i++) p->litProbs[i] = kProbInitValue; } { for (i = 0; i < kNumLenToPosStates; i++) { CLzmaProb *probs = p->posSlotEncoder[i]; LZ_UInt32 j; for (j = 0; j < (1 << kNumPosSlotBits); j++) probs[j] = kProbInitValue; } } { for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++) p->posEncoders[i] = kProbInitValue; } LenEnc_Init(&p->lenEnc.p); LenEnc_Init(&p->repLenEnc.p); for (i = 0; i < (1 << kNumAlignBits); i++) p->posAlignEncoder[i] = kProbInitValue; p->optimumEndIndex = 0; p->optimumCurrentIndex = 0; p->additionalOffset = 0; p->pbMask = (1 << p->pb) - 1; p->lpMask = (1 << p->lp) - 1; } void LzmaEnc_InitPrices(CLzmaEnc *p) { if (!p->fastMode) { FillDistancesPrices(p); FillAlignPrices(p); } p->lenEnc.tableSize = p->repLenEnc.tableSize = p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices); LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices); } static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { LZ_UInt32 i; for (i = 0; i < (LZ_UInt32)kDicLogSizeMaxCompress; i++) if (p->dictSize <= ((LZ_UInt32)1 << i)) break; p->distTableSize = i * 2; p->finished = False; p->result = SZ_OK; RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); LzmaEnc_Init(p); LzmaEnc_InitPrices(p); p->nowPos64 = 0; return SZ_OK; } static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqInStream *inStream, ISeqOutStream *outStream, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; p->inStream = inStream; p->rc.outStream = outStream; return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); } SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; p->inStream = inStream; return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); } static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) { p->seqBufInStream.funcTable.Read = MyRead; p->seqBufInStream.data = src; p->seqBufInStream.rem = srcLen; } SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, LZ_UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; LzmaEnc_SetInputBuf(p, src, srcLen); p->inStream = &p->seqBufInStream.funcTable; return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); } void LzmaEnc_Finish(CLzmaEncHandle pp) { #ifdef COMPRESS_MF_MT CLzmaEnc *p = (CLzmaEnc *)pp; if (p->mtMode) MatchFinderMt_ReleaseStream(&p->matchFinderMt); #else pp = pp; #endif } typedef struct _CSeqOutStreamBuf { ISeqOutStream funcTable; Byte *data; SizeT rem; int overflow; } CSeqOutStreamBuf; static size_t MyWrite(void *pp, const void *data, size_t size) { CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; if (p->rem < size) { size = p->rem; p->overflow = True; } memcpy(p->data, data, size); p->rem -= size; p->data += size; return size; } LZ_UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); } const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; } SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, int reInit, Byte *dest, size_t *destLen, LZ_UInt32 desiredPackSize, LZ_UInt32 *unpackSize) { CLzmaEnc *p = (CLzmaEnc *)pp; LZ_UInt64 nowPos64; SRes res; CSeqOutStreamBuf outStream; outStream.funcTable.Write = MyWrite; outStream.data = dest; outStream.rem = *destLen; outStream.overflow = False; p->writeEndMark = False; p->finished = False; p->result = SZ_OK; if (reInit) LzmaEnc_Init(p); LzmaEnc_InitPrices(p); nowPos64 = p->nowPos64; RangeEnc_Init(&p->rc); p->rc.outStream = &outStream.funcTable; res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize); *unpackSize = (LZ_UInt32)(p->nowPos64 - nowPos64); *destLen -= outStream.rem; if (outStream.overflow) return SZ_ERROR_OUTPUT_EOF; return res; } SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; SRes res = SZ_OK; #ifdef COMPRESS_MF_MT Byte allocaDummy[0x300]; int i = 0; for (i = 0; i < 16; i++) allocaDummy[i] = (Byte)i; #endif RINOK(LzmaEnc_Prepare(pp, inStream, outStream, alloc, allocBig)); for (;;) { res = LzmaEnc_CodeOneBlock(p, False, 0, 0); if (res != SZ_OK || p->finished != 0) break; if (progress != 0) { res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); if (res != SZ_OK) { res = SZ_ERROR_PROGRESS; break; } } } LzmaEnc_Finish(pp); return res; } SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) { CLzmaEnc *p = (CLzmaEnc *)pp; int i; LZ_UInt32 dictSize = p->dictSize; if (*size < LZMA_PROPS_SIZE) return SZ_ERROR_PARAM; *size = LZMA_PROPS_SIZE; props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); for (i = 11; i <= 30; i++) { if (dictSize <= ((LZ_UInt32)2 << i)) { dictSize = (2 << i); break; } if (dictSize <= ((LZ_UInt32)3 << i)) { dictSize = (3 << i); break; } } for (i = 0; i < 4; i++) props[1 + i] = (Byte)(dictSize >> (8 * i)); return SZ_OK; } SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { SRes res; CLzmaEnc *p = (CLzmaEnc *)pp; CSeqOutStreamBuf outStream; LzmaEnc_SetInputBuf(p, src, srcLen); outStream.funcTable.Write = MyWrite; outStream.data = dest; outStream.rem = *destLen; outStream.overflow = False; p->writeEndMark = writeEndMark; res = LzmaEnc_Encode(pp, &outStream.funcTable, &p->seqBufInStream.funcTable, progress, alloc, allocBig); *destLen -= outStream.rem; if (outStream.overflow) return SZ_ERROR_OUTPUT_EOF; return res; } SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); SRes res; if (p == 0) return SZ_ERROR_MEM; res = LzmaEnc_SetProps(p, props); if (res == SZ_OK) { res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); if (res == SZ_OK) res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, writeEndMark, progress, alloc, allocBig); } LzmaEnc_Destroy(p, alloc, allocBig); return res; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzFind.h����������������������������������������������������������������������0000664�0001750�0001750�00000010425�12330516146�012721� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzFind.h -- Match finder for LZ algorithms 2008-10-04 : Igor Pavlov : Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __LZFIND_H #define __LZFIND_H #include "Types.h" typedef LZ_UInt32 CLzRef; typedef struct _CMatchFinder { Byte *buffer; LZ_UInt32 pos; LZ_UInt32 posLimit; LZ_UInt32 streamPos; LZ_UInt32 lenLimit; LZ_UInt32 cyclicBufferPos; LZ_UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ LZ_UInt32 matchMaxLen; CLzRef *hash; CLzRef *son; LZ_UInt32 hashMask; LZ_UInt32 cutValue; Byte *bufferBase; ISeqInStream *stream; int streamEndWasReached; LZ_UInt32 blockSize; LZ_UInt32 keepSizeBefore; LZ_UInt32 keepSizeAfter; LZ_UInt32 numHashBytes; int directInput; int btMode; /* int skipModeBits; */ int bigHash; LZ_UInt32 historySize; LZ_UInt32 fixedHashSize; LZ_UInt32 hashSizeSum; LZ_UInt32 numSons; SRes result; LZ_UInt32 crc[256]; } CMatchFinder; #define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) #define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(LZ_Int32)(index)]) #define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) int MatchFinder_NeedMove(CMatchFinder *p); Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); void MatchFinder_MoveBlock(CMatchFinder *p); void MatchFinder_ReadIfRequired(CMatchFinder *p); void MatchFinder_Construct(CMatchFinder *p); /* Conditions: historySize <= 3 GB keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB */ int MatchFinder_Create(CMatchFinder *p, LZ_UInt32 historySize, LZ_UInt32 keepAddBufferBefore, LZ_UInt32 matchMaxLen, LZ_UInt32 keepAddBufferAfter, ISzAlloc *alloc); void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc); void MatchFinder_Normalize3(LZ_UInt32 subValue, CLzRef *items, LZ_UInt32 numItems); void MatchFinder_ReduceOffsets(CMatchFinder *p, LZ_UInt32 subValue); LZ_UInt32 * GetMatchesSpec1(LZ_UInt32 lenLimit, LZ_UInt32 curMatch, LZ_UInt32 pos, const Byte *buffer, CLzRef *son, LZ_UInt32 _cyclicBufferPos, LZ_UInt32 _cyclicBufferSize, LZ_UInt32 _cutValue, LZ_UInt32 *distances, LZ_UInt32 maxLen); /* Conditions: Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. Mf_GetPointerToCurrentPos_Func's result must be used only before any other function */ typedef void (*Mf_Init_Func)(void *object); typedef Byte (*Mf_GetIndexByte_Func)(void *object, LZ_Int32 index); typedef LZ_UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); typedef LZ_UInt32 (*Mf_GetMatches_Func)(void *object, LZ_UInt32 *distances); typedef void (*Mf_Skip_Func)(void *object, LZ_UInt32); typedef struct _IMatchFinder { Mf_Init_Func Init; Mf_GetIndexByte_Func GetIndexByte; Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; Mf_GetMatches_Func GetMatches; Mf_Skip_Func Skip; } IMatchFinder; void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); void MatchFinder_Init(CMatchFinder *p); LZ_UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances); LZ_UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, LZ_UInt32 *distances); void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num); void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, LZ_UInt32 num); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/LzmaLib.h���������������������������������������������������������������������0000664�0001750�0001750�00000012450�12330516146�013065� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* LzmaLib.h -- LZMA library interface 2008-08-05 Igor Pavlov Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __LZMALIB_H #define __LZMALIB_H #include "Types.h" #ifdef __cplusplus #define MY_EXTERN_C extern "C" #else #define MY_EXTERN_C extern #endif #define MY_STDAPI MY_EXTERN_C int MY_STD_CALL #define LZMA_PROPS_SIZE 5 /* RAM requirements for LZMA: for compression: (dictSize * 11.5 + 6 MB) + state_size for decompression: dictSize + state_size state_size = (4 + (1.5 << (lc + lp))) KB by default (lc=3, lp=0), state_size = 16 KB. LZMA properties (5 bytes) format Offset Size Description 0 1 lc, lp and pb in encoded form. 1 4 dictSize (little endian). */ /* LzmaCompress ------------ outPropsSize - In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. LZMA Encoder will use defult values for any parameter, if it is -1 for any from: level, loc, lp, pb, fb, numThreads 0 for dictSize level - compression level: 0 <= level <= 9; level dictSize algo fb 0: 16 KB 0 32 1: 64 KB 0 32 2: 256 KB 0 32 3: 1 MB 0 32 4: 4 MB 0 32 5: 16 MB 1 32 6: 32 MB 1 32 7+: 64 MB 1 64 The default value for "level" is 5. algo = 0 means fast method algo = 1 means normal method dictSize - The dictionary size in bytes. The maximum value is 128 MB = (1 << 27) bytes for 32-bit version 1 GB = (1 << 30) bytes for 64-bit version The default value is 16 MB = (1 << 24) bytes. It's recommended to use the dictionary that is larger than 4 KB and that can be calculated as (1 << N) or (3 << N) sizes. lc - The number of literal context bits (high bits of previous literal). It can be in the range from 0 to 8. The default value is 3. Sometimes lc=4 gives the gain for big files. lp - The number of literal pos bits (low bits of current position for literals). It can be in the range from 0 to 4. The default value is 0. The lp switch is intended for periodical data when the period is equal to 2^lp. For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's better to set lc=0, if you change lp switch. pb - The number of pos bits (low bits of current position). It can be in the range from 0 to 4. The default value is 2. The pb switch is intended for periodical data when the period is equal 2^pb. fb - Word size (the number of fast bytes). It can be in the range from 5 to 273. The default value is 32. Usually, a big number gives a little bit better compression ratio and slower compression process. numThreads - The number of thereads. 1 or 2. The default value is 2. Fast mode (algo = 0) can use only 1 thread. Out: destLen - processed output size Returns: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_PARAM - Incorrect paramater SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ int level, /* 0 <= level <= 9, default = 5 */ unsigned dictSize, /* default = (1 << 24) */ int lc, /* 0 <= lc <= 8, default = 3 */ int lp, /* 0 <= lp <= 4, default = 0 */ int pb, /* 0 <= pb <= 4, default = 2 */ int fb, /* 5 <= fb <= 273, default = 32 */ int numThreads /* 1 or 2, default = 2 */ ); /* LzmaUncompress -------------- In: dest - output data destLen - output data size src - input data srcLen - input data size Out: destLen - processed output size srcLen - processed input size Returns: SZ_OK - OK SZ_ERROR_DATA - Data error SZ_ERROR_MEM - Memory allocation arror SZ_ERROR_UNSUPPORTED - Unsupported properties SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) */ MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, const unsigned char *props, size_t propsSize); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/lzma/Alloc.h�����������������������������������������������������������������������0000664�0001750�0001750�00000002716�12330516146�012571� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Alloc.h -- Memory allocation functions 2008-03-13 Igor Pavlov Public domain */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __COMMON_ALLOC_H #define __COMMON_ALLOC_H #include <stddef.h> void *MyAlloc(size_t size); void MyFree(void *address); #ifdef _WIN32 void SetLargePageSize(); void *MidAlloc(size_t size); void MidFree(void *address); void *BigAlloc(size_t size); void BigFree(void *address); #else #define MidAlloc(size) MyAlloc(size) #define MidFree(address) MyFree(address) #define BigAlloc(size) MyAlloc(size) #define BigFree(address) MyFree(address) #endif #endif ��������������������������������������������������flmsg-2.0.10/src/include/���������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�012135� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Editor_mod_1_3.H���������������������������������������������������0000664�0001750�0001750�00000013113�12330516146�016324� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Editor_mod.H 7903 2010-11-28 21:06:39Z matt $" // // Header file for Fl_Text_Editor_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- /* \file Fl_Text_Editor_mod widget . */ #ifndef Fl_Text_Editor_mod_H #define Fl_Text_Editor_mod_H #include "Fl_Text_Display_mod.H" // key will match in any state #define Fl_Text_Editor_mod_ANY_STATE (-1L) /** This is the FLTK text editor widget. It allows the user to edit multiple lines of text and supports highlighting and scrolling. The buffer that is displayed in the widget is managed by the Fl_Text_Buffer_mod class. */ class FL_EXPORT Fl_Text_Editor_mod : public Fl_Text_Display_mod { public: /** Key function binding callback type */ typedef int (*Key_Func)(int key, Fl_Text_Editor_mod* editor); /** Simple linked list associating a key/state to a function */ struct Key_Binding { int key; ///< the key pressed int state; ///< the state of key modifiers Key_Func function; ///< associated function Key_Binding* next; ///< next key binding in the list }; Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l = 0); ~Fl_Text_Editor_mod() { remove_all_key_bindings(); } virtual int handle(int e); /** Sets the current insert mode; if non-zero, new text is inserted before the current cursor position. Otherwise, new text replaces text at the current cursor position. */ void insert_mode(int b) { insert_mode_ = b; } /** Gets the current insert mode; if non-zero, new text is inserted before the current cursor position. Otherwise, new text replaces text at the current cursor position. */ int insert_mode() { return insert_mode_; } void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); /** Adds a key of state "state" with the function "function" */ void add_key_binding(int key, int state, Key_Func f) { add_key_binding(key, state, f, &key_bindings); } void remove_key_binding(int key, int state, Key_Binding** list); /** Removes the key binding associated with the key "key" of state "state". */ void remove_key_binding(int key, int state) { remove_key_binding(key, state, &key_bindings); } void remove_all_key_bindings(Key_Binding** list); /** Removes all of the key bindings associated with the text editor or list. */ void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } void add_default_key_bindings(Key_Binding** list); Key_Func bound_key_function(int key, int state, Key_Binding* list); /** Returns the function associated with a key binding. */ Key_Func bound_key_function(int key, int state) { return bound_key_function(key, state, key_bindings); } /** Sets the default key function for unassigned keys. */ void default_key_function(Key_Func f) { default_key_function_ = f; } // functions for the built in default bindings static int kf_default(int c, Fl_Text_Editor_mod* e); static int kf_ignore(int c, Fl_Text_Editor_mod* e); static int kf_backspace(int c, Fl_Text_Editor_mod* e); static int kf_enter(int c, Fl_Text_Editor_mod* e); static int kf_move(int c, Fl_Text_Editor_mod* e); static int kf_shift_move(int c, Fl_Text_Editor_mod* e); static int kf_ctrl_move(int c, Fl_Text_Editor_mod* e); static int kf_c_s_move(int c, Fl_Text_Editor_mod* e); static int kf_meta_move(int c, Fl_Text_Editor_mod* e); static int kf_m_s_move(int c, Fl_Text_Editor_mod* e); static int kf_home(int, Fl_Text_Editor_mod* e); static int kf_end(int c, Fl_Text_Editor_mod* e); static int kf_left(int c, Fl_Text_Editor_mod* e); static int kf_up(int c, Fl_Text_Editor_mod* e); static int kf_right(int c, Fl_Text_Editor_mod* e); static int kf_down(int c, Fl_Text_Editor_mod* e); static int kf_page_up(int c, Fl_Text_Editor_mod* e); static int kf_page_down(int c, Fl_Text_Editor_mod* e); static int kf_insert(int c, Fl_Text_Editor_mod* e); static int kf_delete(int c, Fl_Text_Editor_mod* e); static int kf_copy(int c, Fl_Text_Editor_mod* e); static int kf_cut(int c, Fl_Text_Editor_mod* e); static int kf_paste(int c, Fl_Text_Editor_mod* e); static int kf_select_all(int c, Fl_Text_Editor_mod* e); static int kf_undo(int c, Fl_Text_Editor_mod* e); protected: int handle_key(); void maybe_do_callback(); #ifndef FL_DOXYGEN int insert_mode_; Key_Binding* key_bindings; static Key_Binding* global_key_bindings; Key_Func default_key_function_; #endif }; #endif // // End of "$Id: Fl_Text_Editor_mod.H 7903 2010-11-28 21:06:39Z matt $". // �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/time_table.h���������������������������������������������������������������0000664�0001750�0001750�00000003111�12431374743�014321� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ===================================================================== // // time_table.h // // Author(s): // Robert Stiles, KK5VD, Copyright (C) 2013 // // This file is part of FLAMP. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // ===================================================================== #ifndef __TIME_TABLE_H #define __TIME_TABLE_H #include <config.h> #include <string> #include <cstring> extern int mode_table_count(void); extern char * modem_at_index(int index); extern bool modem_available(std::string modem); extern bool modem_available(char *modem, int search_limit); extern float seconds_from_c_string(const char *mode, const char *string, int length, float *overhead); extern float minutes_from_c_string(const char *mode, const char *string, int length, float *overhead); extern float seconds_from_string(std::string mode, std::string& str, float *overhead); extern float minutes_from_string(std::string mode, std::string& str, float *overhead); #endif // __TIME_TABLE_H �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Editor_mod.H�������������������������������������������������������0000664�0001750�0001750�00000002126�12330516146�015664� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Editor_mod_1_1.H" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Editor_mod_1_3.H" #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/util.h���������������������������������������������������������������������0000664�0001750�0001750�00000014350�12330516146�013171� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef UTIL_H #define UTIL_H #include <string> #include "config.h" #ifdef __cplusplus extern "C" { #endif #ifndef __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 #endif #include <inttypes.h> #ifndef powerof2 # define powerof2(n) ((((n) - 1) & (n)) == 0) #endif #ifndef MAX # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef CLAMP # define CLAMP(x, low, high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) #endif #define WCLAMP(x, low, high) (((x)>(high))?(low):(((x)<(low))?(high):(x))) #ifdef __GNUC__ # if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) # define full_memory_barrier() __sync_synchronize() # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__x86_64__) # define full_memory_barrier() asm volatile ("lock; addl $0,0(%%esp)":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() /* These would be faster on SSE2-capable processors: # define full_memory_barrier() asm volatile ("mfence":::"memory") # define read_memory_barrier() asm volatile ("lfence":::"memory") # define write_memory_barrier() asm volatile ("sfence":::"memory") */ # elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) # define full_memory_barrier() asm volatile("sync":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # endif #else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() #endif /* http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html */ #if defined(__GNUC__) && (__GNUC__ >= 3) # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) # define used__ __attribute__ ((__used__)) # define unused__ __attribute__ ((__unused__)) # define must_check__ __attribute__ ((__warn_unused_result__)) # define deprecated__ __attribute__ ((__deprecated__)) # define noreturn__ __attribute__ ((__noreturn__)) # define pure__ __attribute__ ((__pure__)) # define const__ __attribute__ ((__const__)) # define malloc__ __attribute__ ((__malloc__)) # define packed__ __attribute__ ((__packed__)) # define inline__ inline __attribute__ ((__always_inline__)) # define noinline__ __attribute__ ((__noinline__)) # define nonnull__(x) __attribute__ ((__nonnull__(x))) # define format__(type_, index_, first_) __attribute__ ((format(type_, index_, first_))) #else # define likely(x) (x) # define unlikely(x) (x) # define used__ # define unused__ # define must_check__ # define deprecated__ # define noreturn__ # define pure__ # define const__ # define malloc__ # define packed__ # define inline__ # define noinline__ # define nonnull__(x) # define format__(type_, index_, first_) #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define hot__ __attribute__ ((__hot__)) # define cold__ __attribute__ ((__cold__)) #else # define hot__ # define cold__ #endif #include <stddef.h> const__ uint32_t ceil2(uint32_t n); const__ uint32_t floor2(uint32_t n); #if !HAVE_STRCASESTR char* strcasestr(const char* haystack, const char* needle); #endif #if !HAVE_STRLCPY size_t strlcpy(char* dest, const char* src, size_t size); #endif int set_cloexec(int fd, unsigned char v); int set_nonblock(int fd, unsigned char v); int set_nodelay(int fd, unsigned char v); int get_bufsize(int fd, int dir, int* len); int set_bufsize(int fd, int dir, int len); unsigned long ver2int(const char* version); void save_signals(void); void restore_signals(void); void MilliSleep(long msecs); #ifdef __cplusplus } // extern "C" #endif #ifdef __cplusplus uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code = 0); uint32_t simple_hash_str(const unsigned char* str, uint32_t code = 0); #endif #ifdef __cplusplus const char* str2hex(const unsigned char* str, size_t len); const char* str2hex(const char* str, size_t len = 0); #else const char* str2hex(const unsigned* str, size_t len); #endif const char* uint2bin(unsigned u, size_t len); void MilliSleep(long msecs); #if !defined(NDEBUG) && defined(deprecated__) && defined(__GNUC__) && !defined(__WIN32__) #include <stdio.h> #include <string.h> deprecated__ typeof(sprintf) sprintf; /* there are far too many of these in the qrz code deprecated__ typeof(strcpy) strcpy; deprecated__ typeof(strcat) strcat; */ #endif #ifdef __WIN32__ # define NOMINMAX 1 #endif #ifndef __WIN32__ # define PRIuSZ "zu" # define PRIdSZ "zd" #else # define PRIuSZ "Iu" # define PRIdSZ "Id" #endif # define PATH_SEP "/" //====================================================================== extern void ucase(std::string &); extern void strip_spaces(std::string &); extern void strip_leading_zeros(std::string &); extern void strip_lfs(std::string &); extern std::string wordwrap(std::string &s, int cnt); #endif /* UTIL_H */ /* Local Variables: mode: c++ c-file-style: "linux" End: */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flmsgrc.h������������������������������������������������������������������0000664�0001750�0001750�00000001666�12330516146�013657� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- // MS include file for application icon #define IDI_ICON 101 ��������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Display_mod_1_3.H��������������������������������������������������0000664�0001750�0001750�00000041735�12330516146�016516� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Display_mod.H 8306 2011-01-24 17:04:22Z matt $" // // Header file for Fl_Text_Display_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- /* \file Fl_Text_Display_mod widget . */ #ifndef Fl_Text_Display_mod_H #define Fl_Text_Display_mod_H #include <string> #include <FL/fl_draw.H> #include <FL/Fl_Group.H> #include <FL/Fl_Widget.H> #include <FL/Fl_Scrollbar.H> #include "Fl_Text_Buffer_mod.H" /** \brief Rich text display widget. This is the FLTK text display widget. It allows the user to view multiple lines of text and supports highlighting and scrolling. The buffer that is displayed in the widget is managed by the Fl_Text_Buffer_mod class. A single Text Buffer can be displayed by multiple Text Displays. */ class FL_EXPORT Fl_Text_Display_mod: public Fl_Group { public: /** text display cursor shapes enumeration */ enum { NORMAL_CURSOR, /**< I-beam */ CARET_CURSOR, /**< caret under the text */ DIM_CURSOR, /**< dim I-beam */ BLOCK_CURSOR, /**< unfille box under the current character */ HEAVY_CURSOR /**< thick I-beam */ }; /** the character position is the left edge of a character, whereas the cursor is thought to be between the centers of two consecutive characters. */ enum { CURSOR_POS, CHARACTER_POS }; /** drag types - they match Fl::event_clicks() so that single clicking to start a collection selects by character, double clicking selects by word and triple clicking selects by line. */ enum { DRAG_NONE = -2, DRAG_START_DND = -1, DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 }; /** wrap types - used in wrap_mode() */ enum { WRAP_NONE, /**< don't wrap text at all */ WRAP_AT_COLUMN, /**< wrap text at the given text column */ WRAP_AT_PIXEL, /**< wrap text at a pixel position */ WRAP_AT_BOUNDS /**< wrap text so that it fits into the widget width */ }; friend void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); typedef void (*Unfinished_Style_Cb)(int, void *); /** This structure associates the color, font, andsize of a string to draw with an attribute mask matching attr */ struct Style_Table_Entry { Fl_Color color; Fl_Font font; Fl_Fontsize size; unsigned attr; }; Fl_Text_Display_mod(int X, int Y, int W, int H, const char *l = 0); ~Fl_Text_Display_mod(); virtual int handle(int e); void buffer(Fl_Text_Buffer_mod* buf); /** Sets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. \param buf new text buffer */ void buffer(Fl_Text_Buffer_mod& buf) { buffer(&buf); } /** Gets the current text buffer associated with the text widget. Multiple text widgets can be associated with the same text buffer. \return current text buffer */ Fl_Text_Buffer_mod* buffer() const { return mBuffer; } void redisplay_range(int start, int end); void scroll(int topLineNum, int horizOffset); void insert(const char* text); void overstrike(const char* text); void insert_position(int newPos); /** Gets the position of the text insertion cursor for text display. \return insert position index into text buffer */ int insert_position() const { return mCursorPos; } int position_to_xy(int pos, int* x, int* y) const; int in_selection(int x, int y) const; void show_insert_position(); int move_right(); int move_left(); int move_up(); int move_down(); int count_lines(int start, int end, bool start_pos_is_line_start) const; int line_start(int pos) const; int line_end(int startPos, bool startPosIsLineStart) const; int skip_lines(int startPos, int nLines, bool startPosIsLineStart); int rewind_lines(int startPos, int nLines); void next_word(void); void previous_word(void); void show_cursor(int b = 1); /** Hides the text cursor. */ void hide_cursor() { show_cursor(0); } void cursor_style(int style); /** Gets the text cursor color. \return cursor color */ Fl_Color cursor_color() const {return mCursor_color;} /** Sets the text cursor color. \param n new cursor color */ void cursor_color(Fl_Color n) {mCursor_color = n;} /** Gets the width/height of the scrollbars. /return width of scrollbars */ int scrollbar_width() const { return scrollbar_width_; } /** Sets the width/height of the scrollbars. \param W width of scrollbars */ void scrollbar_width(int W) { scrollbar_width_ = W; } /** Gets the scrollbar alignment type. \return scrollbar alignment */ Fl_Align scrollbar_align() const { return scrollbar_align_; } /** Sets the scrollbar alignment type. \param a new scrollbar alignment */ void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } /** Moves the insert position to the beginning of the current word. \param pos start calculation at this index \return beginning of the words */ int word_start(int pos) const { return buffer()->word_start(pos); } /** Moves the insert position to the end of the current word. \param pos start calculation at this index \return index of first character after the end of the word */ int word_end(int pos) const { return buffer()->word_end(pos); } void highlight_data(Fl_Text_Buffer_mod *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg); int position_style(int lineStartPos, int lineLen, int lineIndex) const; /** \todo FIXME : get set methods pointing on shortcut_ have no effects as shortcut_ is unused in this class and derived! \return the current shortcut key */ int shortcut() const {return shortcut_;} /** \todo FIXME : get set methods pointing on shortcut_ have no effects as shortcut_ is unused in this class and derived! \param s the new shortcut key */ void shortcut(int s) {shortcut_ = s;} /** Gets the default font used when drawing text in the widget. \return current text font face unless overridden by a style */ Fl_Font textfont() const {return textfont_;} /** Sets the default font used when drawing text in the widget. \param s default text font face */ void textfont(Fl_Font s) {textfont_ = s; mColumnScale = 0;} /** Gets the default size of text in the widget. \return current text height unless overridden by a style */ Fl_Fontsize textsize() const {return textsize_;} /** Sets the default size of text in the widget. \param s new text size */ void textsize(Fl_Fontsize s) {textsize_ = s; mColumnScale = 0;} /** Gets the default color of text in the widget. \return text color unless overridden by a style */ Fl_Color textcolor() const {return textcolor_;} /** Sets the default color of text in the widget. \param n new text color */ void textcolor(Fl_Color n) {textcolor_ = n;} int wrapped_column(int row, int column) const; int wrapped_row(int row) const; void wrap_mode(int wrap, int wrap_margin); virtual void resize(int X, int Y, int W, int H); /** Convert an x pixel position into a column number. \param x number of pixels from the left margin \return an approximate column number based on the main font */ double x_to_col(double x) const; /** Convert a column number into an x pixel position. \param col an approximate column number based on the main font \return number of pixels from the left margin to the left of an average sized character */ double col_to_x(double col) const; protected: // Most (all?) of this stuff should only be called from resize() or // draw(). // Anything with "vline" indicates thats it deals with currently // visible lines. virtual void draw(); void draw_text(int X, int Y, int W, int H); void draw_range(int start, int end); void draw_cursor(int, int); void draw_string(int style, int x, int y, int toX, const char *string, int nChars) const; void draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex); int find_x(const char *s, int len, int style, int x) const; enum { DRAW_LINE, FIND_INDEX, FIND_INDEX_FROM_ZERO, GET_WIDTH }; int handle_vline(int mode, int lineStart, int lineLen, int leftChar, int rightChar, int topClip, int bottomClip, int leftClip, int rightClip) const; void draw_line_numbers(bool clearAll); void clear_rect(int style, int x, int y, int width, int height) const; void display_insert(); void offset_line_starts(int newTopLineNum); void calc_line_starts(int startLine, int endLine); void update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled); void calc_last_char(); int position_to_line( int pos, int* lineNum ) const; double string_width(const char* string, int length, int style) const; static void scroll_timer_cb(void*); static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); static void buffer_modified_cb(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display_mod* d); static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display_mod* d); void update_v_scrollbar(); void update_h_scrollbar(); int measure_vline(int visLineNum) const; int longest_vline() const; int empty_vlines() const; int vline_length(int visLineNum) const; int xy_to_position(int x, int y, int PosType = CHARACTER_POS) const; void xy_to_rowcol(int x, int y, int* row, int* column, int PosType = CHARACTER_POS) const; void maintain_absolute_top_line_number(int state); int get_absolute_top_line_number() const; void absolute_top_line_number(int oldFirstChar); int maintaining_absolute_top_line_number() const; void reset_absolute_top_line_number(); int position_to_linecol(int pos, int* lineNum, int* column) const; int scroll_(int topLineNum, int horizOffset); void extend_range_for_styles(int* start, int* end); void find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted); void measure_deleted_lines(int pos, int nDeleted); void wrapped_line_counter(Fl_Text_Buffer_mod *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine = true) const; void find_line_end(int pos, bool start_pos_is_text_start, int *lineEnd, int *nextLineStart) const; double measure_proportional_character(const char *s, int colNum, int pos) const; int wrap_uses_character(int lineEndPos) const; static const int DEFAULT_TOP_MARGIN; static const int DEFAULT_BOTTOM_MARGIN; static const int DEFAULT_LEFT_MARGIN; static const int DEFAULT_RIGHT_MARGIN; int TOP_MARGIN, BOTTOM_MARGIN, LEFT_MARGIN, RIGHT_MARGIN; int damage_range1_start, damage_range1_end; int damage_range2_start, damage_range2_end; int mCursorPos; int mCursorOn; int mCursorOldY; /* Y pos. of cursor for blanking */ int mCursorToHint; /* Tells the buffer modified callback where to move the cursor, to reduce the number of redraw calls */ int mCursorStyle; /* One of enum cursorStyles above */ int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */ int mNVisibleLines; /* # of visible (displayed) lines */ int mNBufferLines; /* # of newlines in the buffer */ Fl_Text_Buffer_mod* mBuffer; /* Contains text to be displayed */ Fl_Text_Buffer_mod* mStyleBuffer; /* Optional parallel buffer containing color and font information */ int mFirstChar, mLastChar; /* Buffer positions of first and last displayed character (lastChar points either to a newline or one character beyond the end of the buffer) */ int mContinuousWrap; /* Wrap long lines when displaying */ int mFastDisplay; /* force continuous wrap and insertion of eol characters used in FTextRX */ std::string s_text; /* current contents of line text buffer */ std::string s_style; /* current contents of line stype buffer */ int mWrapMarginPix; /* Margin in # of pixels for wrapping in continuousWrap mode */ int* mLineStarts; int mTopLineNum; /* Line number of top displayed line of file (first line of file is 1) */ int mAbsTopLineNum; /* In continuous wrap mode, the line number of the top line if the text were not wrapped (note that this is only maintained as needed). */ int mNeedAbsTopLineNum; /* Externally settable flag to continue maintaining absTopLineNum even if it isn't needed for line # display */ int mHorizOffset; /* Horizontal scroll pos. in pixels */ int mTopLineNumHint; /* Line number of top displayed line of file (first line of file is 1) */ int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */ int mNStyles; /* Number of entries in styleTable */ const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for coloring/syntax-highlighting */ char mUnfinishedStyle; /* Style buffer entry which triggers on-the-fly reparsing of region */ Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ /* regions */ void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ int mMaxsize; int mSuppressResync; /* Suppress resynchronization of line starts during buffer updates */ int mNLinesDeleted; /* Number of lines deleted during buffer modification (only used when resynchronization is suppressed) */ int mModifyingTabDistance; /* Whether tab distance is being modified */ mutable double mColumnScale; /* Width in pixels of an average character. This value is calculated as needed (lazy eval); it needs to be mutable so that it can be calculated within a method marked as "const" */ Fl_Color mCursor_color; Fl_Scrollbar* mHScrollBar; Fl_Scrollbar* mVScrollBar; int scrollbar_width_; Fl_Align scrollbar_align_; int dragPos, dragType, dragging; int display_insert_position_hint; struct { int x, y, w, h; } text_area; int shortcut_; Fl_Font textfont_; Fl_Fontsize textsize_; Fl_Color textcolor_; // The following are not presently used from the original NEdit code, // but are being put here so that future versions of Fl_Text_Display_mod // can implement line numbers without breaking binary compatibility. /* Line number margin and width */ int mLineNumLeft, mLineNumWidth; }; #endif // // End of "$Id: Fl_Text_Display_mod.H 8306 2011-01-24 17:04:22Z matt $". // �����������������������������������flmsg-2.0.10/src/include/Fl_Text_Buffer_mod.H�������������������������������������������������������0000664�0001750�0001750�00000002126�12330516146�015647� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Buffer_mod_1_1.H" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Buffer_mod_1_3.H" #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/FTextView.h����������������������������������������������������������������0000664�0001750�0001750�00000012521�12330516146�014077� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // FTextView.h // // Copyright (C) 2007-2009 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FTextView_H_ #define FTextView_H_ #include <stddef.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_Tile.H> #include "Fl_Text_Editor_mod.H" /// /// The text widgets base class. /// This class implements a basic text editing widget based on Fl_Text_Editor_mod. /// class FTextBase : public Fl_Text_Editor_mod { public: // CLICK_START: same as first clickable style // NATTR: number of styles (last style + 1) enum TEXT_ATTR { RECV, XMIT, CTRL, SKIP, ALTR, CLICK_START, QSY = CLICK_START, /* FOO, BAR, ..., */ NATTR }; FTextBase(int x, int y, int w, int h, const char *l = 0); virtual ~FTextBase() { delete tbuf; delete sbuf; } virtual void add(const char *text, int attr = RECV); virtual void add(unsigned char c, int attr = RECV); void addstr(const char *text, int attr = RECV) { add(text, attr); } void addchr(unsigned char c, int attr = RECV) { add(c, attr); } virtual int handle(int event); virtual void handle_context_menu(void) { } virtual void clear(void);//{ tbuf->text(""); sbuf->text(""); } void set_word_wrap(bool b); bool get_word_wrap(void) { return wrap; } virtual void setFont(Fl_Font f, int attr = NATTR); void setFontSize(int s, int attr = NATTR); void setFontColor(Fl_Color c, int attr = NATTR); // Override Fl_Text_Display, which stores the font number in an unsigned // character and therefore cannot represent all fonts Fl_Font textfont(void) { return styles[0].font; } void textfont(Fl_Font f) { setFont(f); } void textfont(uchar s) { textfont((Fl_Font)s); } void cursorON(void) { show_cursor(); } virtual void resize(int X, int Y, int W, int H); static bool wheight_mult_tsize(void *arg, int xd, int yd); protected: void set_style(int attr, Fl_Font f, int s, Fl_Color c, int set = SET_FONT | SET_SIZE | SET_COLOR); int readFile(const char* fn = 0); void saveFile(void); char* get_word(int x, int y, const char* nwchars = "", bool ontext = true); void init_context_menu(void); void show_context_menu(void); virtual void menu_cb(size_t item) { } int reset_wrap_col(void); void reset_styles(int set); void (*read_cb)(const char *); public: void set_read_cb(void (func(const char*))) { read_cb = func;} private: FTextBase(); FTextBase(const FTextBase &t); protected: enum { FTEXT_DEF = 'A' }; enum set_style_op_e { SET_FONT = 1 << 0, SET_SIZE = 1 << 1, SET_COLOR = 1 << 2 }; Fl_Text_Buffer_mod *tbuf; ///< text buffer Fl_Text_Buffer_mod *sbuf; ///< style buffer Fl_Text_Display_mod::Style_Table_Entry styles[NATTR]; Fl_Menu_Item *context_menu; int popx, popy; int wrap; int wrap_col; int max_lines; bool scroll_hint; bool restore_wrap; // bool wrap_restore; private: int oldw, oldh, olds; Fl_Font oldf; }; /// /// A TextBase subclass to display received & transmitted text /// class FTextView : public FTextBase { public: FTextView(int x, int y, int w, int h, const char *l = 0); ~FTextView() { } virtual int handle(int event); protected: enum { VIEW_MENU_COPY, VIEW_MENU_CLEAR, VIEW_MENU_SELECT_ALL, VIEW_MENU_SAVE, VIEW_MENU_WRAP }; virtual void handle_context_menu(void); virtual void menu_cb(size_t item); static void changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg); void change_keybindings(void); private: FTextView(); FTextView(const FTextView &t); protected: static Fl_Menu_Item menu[]; bool quick_entry; }; /// /// A FTextBase subclass to display and edit text to be transmitted /// class FTextEdit : public FTextBase { public: FTextEdit(int x, int y, int w, int h, const char *l = 0); virtual int handle(int event); protected: enum { EDIT_MENU_CUT, EDIT_MENU_COPY, EDIT_MENU_PASTE, EDIT_MENU_CLEAR, EDIT_MENU_READ, EDIT_MENU_WRAP }; virtual int handle_key(int key); int handle_key_ascii(int key); virtual int handle_dnd_drag(int pos); int handle_dnd_drop(void); virtual void handle_context_menu(void); virtual void menu_cb(size_t item); static void changed_cb(int pos, int nins, int ndel, int nsty, const char *dtext, void *arg); private: FTextEdit(); FTextEdit(const FTextEdit &t); protected: static Fl_Menu_Item menu[]; char ascii_cnt; unsigned ascii_chr; bool dnd_paste; }; #endif // FTextView_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Editor_mod_1_1.H���������������������������������������������������0000664�0001750�0001750�00000010315�12330516146�016323� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $" // // Header file for Fl_Text_Editor class. // // Copyright 2001-2005 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_TEXT_EDITOR_MOD_H #define FL_TEXT_EDITOR_MOD_H #include "Fl_Text_Display_mod.H" // key will match in any state #define FL_TEXT_EDITOR_ANY_STATE (-1L) class Fl_Text_Editor_mod : public Fl_Text_Display_mod { public: typedef int (*Key_Func)(int key, Fl_Text_Editor_mod* editor); struct Key_Binding { int key; int state; Key_Func function; Key_Binding* next; }; Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l = 0); ~Fl_Text_Editor_mod() { remove_all_key_bindings(); } virtual int handle(int e); void insert_mode(int b) { insert_mode_ = b; } int insert_mode() { return insert_mode_; } void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); void add_key_binding(int key, int state, Key_Func f) { add_key_binding(key, state, f, &key_bindings); } void remove_key_binding(int key, int state, Key_Binding** list); void remove_key_binding(int key, int state) { remove_key_binding(key, state, &key_bindings); } void remove_all_key_bindings(Key_Binding** list); void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } void add_default_key_bindings(Key_Binding** list); Key_Func bound_key_function(int key, int state, Key_Binding* list); Key_Func bound_key_function(int key, int state) { return bound_key_function(key, state, key_bindings); } void default_key_function(Key_Func f) { default_key_function_ = f; } // functions for the built in default bindings static int kf_default(int c, Fl_Text_Editor_mod* e); static int kf_ignore(int c, Fl_Text_Editor_mod* e); static int kf_backspace(int c, Fl_Text_Editor_mod* e); static int kf_enter(int c, Fl_Text_Editor_mod* e); static int kf_move(int c, Fl_Text_Editor_mod* e); static int kf_shift_move(int c, Fl_Text_Editor_mod* e); static int kf_ctrl_move(int c, Fl_Text_Editor_mod* e); static int kf_c_s_move(int c, Fl_Text_Editor_mod* e); static int kf_home(int, Fl_Text_Editor_mod* e); static int kf_end(int c, Fl_Text_Editor_mod* e); static int kf_left(int c, Fl_Text_Editor_mod* e); static int kf_up(int c, Fl_Text_Editor_mod* e); static int kf_right(int c, Fl_Text_Editor_mod* e); static int kf_down(int c, Fl_Text_Editor_mod* e); static int kf_page_up(int c, Fl_Text_Editor_mod* e); static int kf_page_down(int c, Fl_Text_Editor_mod* e); static int kf_insert(int c, Fl_Text_Editor_mod* e); static int kf_delete(int c, Fl_Text_Editor_mod* e); static int kf_copy(int c, Fl_Text_Editor_mod* e); static int kf_cut(int c, Fl_Text_Editor_mod* e); static int kf_paste(int c, Fl_Text_Editor_mod* e); static int kf_select_all(int c, Fl_Text_Editor_mod* e); static int kf_undo(int c, Fl_Text_Editor_mod* e); protected: int handle_key(); void maybe_do_callback(); int insert_mode_; Key_Binding* key_bindings; static Key_Binding* global_key_bindings; Key_Func default_key_function_; }; #endif // // End of "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $". // �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/mongoose.h�����������������������������������������������������������������0000664�0001750�0001750�00000012376�12462255714�014057� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com> // Copyright (c) 2013-2014 Cesanta Software Limited // All rights reserved // // This library is dual-licensed: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. For the terms of this // license, see <http://www.gnu.org/licenses/>. // // You are free to use this library under the terms of the GNU General // Public License, but WITHOUT ANY WARRANTY; without even the implied // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. // // Alternatively, you can license this library under a commercial // license, as set out in <http://cesanta.com/>. // // NOTE: Detailed API documentation is at http://cesanta.com/#docs #ifndef MONGOOSE_HEADER_INCLUDED #define MONGOOSE_HEADER_INCLUDED #define MONGOOSE_VERSION "5.2" #include <stdio.h> // required for FILE #include <stddef.h> // required for size_t #ifdef __cplusplus extern "C" { #endif // __cplusplus // This structure contains information about HTTP request. struct mg_connection { const char *request_method; // "GET", "POST", etc const char *uri; // URL-decoded URI const char *http_version; // E.g. "1.0", "1.1" const char *query_string; // URL part after '?', not including '?', or NULL char remote_ip[48]; // Max IPv6 string length is 45 characters const char *local_ip; // Local IP address unsigned short remote_port; // Client's port unsigned short local_port; // Local port number int num_headers; // Number of HTTP headers struct mg_header { const char *name; // HTTP header name const char *value; // HTTP header value } http_headers[30]; char *content; // POST (or websocket message) data, or NULL size_t content_len; // content length int is_websocket; // Connection is a websocket connection int status_code; // HTTP status code for HTTP error handler int wsbits; // First byte of the websocket frame void *server_param; // Parameter passed to mg_add_uri_handler() void *connection_param; // Placeholder for connection-specific data }; struct mg_server; // Opaque structure describing server instance typedef int (*mg_handler_t)(struct mg_connection *); // Server management functions struct mg_server *mg_create_server(void *server_param); void mg_destroy_server(struct mg_server **); int mg_set_option(struct mg_server *, const char *opt, const char *val, char * errmsg); //const char *mg_set_option(struct mg_server *, const char *opt, const char *val); unsigned int mg_poll_server(struct mg_server *, int milliseconds); void mg_set_request_handler(struct mg_server *, mg_handler_t); void mg_set_http_error_handler(struct mg_server *, mg_handler_t); void mg_set_auth_handler(struct mg_server *, mg_handler_t); const char **mg_get_valid_option_names(void); const char *mg_get_option(const struct mg_server *server, const char *name); void mg_set_listening_socket(struct mg_server *, int sock); int mg_get_listening_socket(struct mg_server *); void mg_iterate_over_connections(struct mg_server *, mg_handler_t, void *); // Connection management functions void mg_send_status(struct mg_connection *, int status_code); void mg_send_header(struct mg_connection *, const char *name, const char *val); void mg_send_data(struct mg_connection *, const void *data, int data_len); void mg_printf_data(struct mg_connection *, const char *format, ...); int mg_websocket_write(struct mg_connection *, int opcode, const char *data, size_t data_len); // Deprecated in favor of mg_send_* interface int mg_write(struct mg_connection *, const void *buf, int len); int mg_printf(struct mg_connection *conn, const char *fmt, ...); const char *mg_get_header(const struct mg_connection *, const char *name); const char *mg_get_mime_type(const char *name, const char *default_mime_type); int mg_get_var(const struct mg_connection *conn, const char *var_name, char *buf, size_t buf_len); int mg_parse_header(const char *hdr, const char *var_name, char *buf, size_t); int mg_parse_multipart(const char *buf, int buf_len, char *var_name, int var_name_len, char *file_name, int file_name_len, const char **data, int *data_len); // Utility functions void *mg_start_thread(void *(*func)(void *), void *param); char *mg_md5(char buf[33], ...); int mg_authorize_digest(struct mg_connection *c, FILE *fp); // Callback function return codes enum { MG_REQUEST_NOT_PROCESSED, MG_REQUEST_PROCESSED, MG_REQUEST_CALL_AGAIN }; enum { MG_AUTH_FAIL, MG_AUTH_OK }; enum { MG_ERROR_NOT_PROCESSED, MG_ERROR_PROCESSED }; enum { MG_CLIENT_CONTINUE, MG_CLIENT_CLOSE }; // HTTP client events enum { MG_CONNECT_SUCCESS, MG_CONNECT_FAILURE, MG_DOWNLOAD_SUCCESS, MG_DOWNLOAD_FAILURE }; int mg_connect(struct mg_server *, const char *host, int port, int use_ssl, mg_handler_t handler, void *param); #ifdef __cplusplus } #endif // __cplusplus #endif // MONGOOSE_HEADER_INCLUDED ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/crc16.h��������������������������������������������������������������������0000664�0001750�0001750�00000003407�12330516146�013133� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _CCRC16_ #define _CCRC16_ #include <string> #include "debug.h" using namespace std; class Ccrc16 { private: unsigned int crcval; char ss[5]; public: Ccrc16() { crcval = 0xFFFF; } ~Ccrc16() {}; void reset() { crcval = 0xFFFF;} unsigned int val() {return crcval;} string sval() { const char *smft = "%04X"; snprintf(ss,sizeof(ss), smft, crcval); return ss; } void update(char c) { crcval ^= c; for (int i = 0; i < 8; ++i) { if (crcval & 1) crcval = (crcval >> 1) ^ 0xA001; else crcval = (crcval >> 1); } } unsigned int crc16(char c) { update(c); return crcval; } unsigned int crc16(string s) { reset(); for (size_t i = 0; i < s.length(); i++) update((char)(s[i] & 0xFF)); // only use lower half of unicode return crcval; } string scrc16(string s) { crc16(s); return sval(); } }; #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flmsg_dialog.h�������������������������������������������������������������0000664�0001750�0001750�00000135476�12500105332�014646� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FLMSG_DIALOG_H #define FLMSG_DIALOG_H #include <string> #include <vector> #include <FL/Fl.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Menu_Bar.H> #include <FL/Fl_Input.H> #include <FL/Fl_Output.H> #include <FL/Fl_Tabs.H> #include <FL/Fl_Group.H> #include <FL/Fl_Button.H> #include <FL/Fl_Check_Button.H> #include <FL/Fl_Box.H> #include <FL/Fl_Scroll.H> #include <FL/Fl_Browser.H> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Input.H> #include <FL/Fl_Round_Button.H> #include <FL/Fl_Spinner.H> #include <FL/Fl_Counter.H> #include "FTextView.h" #include "flinput2.h" #include "combo.h" #include "calendar.h" #include "flmsg.h" #include "mongoose.h" extern Fl_Output *txt_filename; extern Fl_Input *drop_box; extern Fl_Input *drop_file; extern int tab_top; extern Fl_Tabs *tabs_msg_type; //====================================================================== extern Fl_Double_Window* flmsg_dialog(); extern Fl_Menu_Item menu_[]; extern void load_custom_menu(); extern Fl_Browser *brwsOptions; extern Fl_Double_Window* create_config_dialog(); extern Fl_Tabs *tabs_config; extern Fl_Group *tab_date_time; extern Fl_Group *tab_personal; extern Fl_Group *tab_config_radiogram; extern Fl_Group *tab_files; extern Fl_Group *tab_headers; extern Fl_Group *tab_socket; extern Fl_Double_Window* optionsdialog(); extern Fl_Return_Button *btnCloseOptions; extern Fl_Double_Window* arl_dialog(); extern Fl_Browser *select_arl; extern Fl_Input2 *txt_arl_fill1; extern Fl_Input2 *txt_arl_fill2; extern Fl_Input2 *txt_arl_fill3; extern Fl_Input2 *txt_arl_fill4; extern Fl_Button *btn_arl_cancel; extern Fl_Button *btn_arl_add; extern FTextEdit *arl_text; extern Fl_Check_Button *btnInsertX; //extern Fl_Double_Window* date_time_dialog(); extern Fl_Round_Button *btn_dtformat0; extern Fl_Round_Button *btn_dtformat1; extern Fl_Round_Button *btn_dtformat2; extern Fl_Round_Button *btn_dtformat3; extern Fl_Round_Button *btn_utc_format0; extern Fl_Round_Button *btn_utc_format1; extern Fl_Round_Button *btn_utc_format2; extern Fl_Round_Button *btn_utc_format3; extern Fl_Round_Button *btn_utc_format4; extern Fl_Round_Button *btn_utc_format5; extern Fl_Button *btn_close_date_time_dialog; extern Fl_Check_Button *btn_caplocal; //extern Fl_Double_Window* personal_dialog(); extern Fl_Input2 *txt_my_call; extern Fl_Input2 *txt_my_tel; extern Fl_Input2 *txt_my_name; extern Fl_Input2 *txt_my_addr; extern Fl_Input2 *txt_my_city; extern Fl_Double_Window* headers_dialog(); extern Fl_Input2* txt_hdr_from; extern Fl_Input2* txt_hdr_edit; extern Fl_Input2* txt_socket_addr; extern Fl_Input2* txt_socket_port; extern Fl_Output* txt_web_port; //extern Fl_Double_Window* radiogram_dialog(); extern Fl_Spinner *cnt_wpl; extern Fl_Check_Button *btn_rgnbr_fname; extern Fl_Input2 *txt_rgnbr; //extern Fl_Double_Window* config_files_dialog(); extern Fl_Check_Button *btn_open_on_export; extern Fl_Check_Button *btn_use_compression; extern Fl_Check_Button *btn_call_fname; extern Fl_Check_Button *btn_dt_fname; extern Fl_Check_Button *btn_sernbr_fname; extern Fl_Input2 *txt_sernbr; extern Fl_Input2 *txt_mars_roster_file; extern Fl_Double_Window* hx_dialog(); extern Fl_ListBox *sel_hx_select; extern Fl_Button *btn_hx_select_add; extern Fl_Input2 *txt_hx_select_text; extern Fl_Button *btn_hx_select_cancel; extern Fl_Return_Button *btn_hx_select_ok; extern Fl_Output *txt_hx_instructions; //extern Fl_Double_Window* socket_dialog(); extern Fl_Input2 * txt_socket_addr; extern Fl_Input2 * txt_socket_port; extern Fl_Button * btn_close_socket_dialog; extern void select_form(int form); extern Fl_Output *txt_xfr_size_time; extern int transfer_size; extern Fl_ListBox *cbo_modes; extern void clear_estimate(); extern void estimate(); extern bool valid_mode_check(string &md); extern void update_cbo_modes(string &fldigi_modes); //====================================================================== // ICS //====================================================================== extern Fl_Group *tab_ics; extern Fl_Tabs *tab_ics_type; extern void create_ics_tab(); //====================================================================== // ICS-203 //====================================================================== extern void create_ics203_tab(); extern Fl_Group *tab_ics203; extern Fl_Tabs *tab_ics203_type; extern Fl_Group *tab_203_1; extern Fl_Input2 *txt_203_incident; extern Fl_Input2 *txt_203_date; extern Fl_Button *btn_203_date; extern Fl_Input2 *txt_203_time; extern Fl_Button *btn_203_time; extern Fl_Input2 *txt_203_op_period; extern Fl_Input2 *txt_203_incident_commander; extern Fl_Input2 *txt_203_incident_deputy; extern Fl_Input2 *txt_203_incident_safety_officer; extern Fl_Input2 *txt_203_incident_info_officer; extern Fl_Input2 *txt_203_liaison_officer; extern Fl_Input2 *txt_203_prepared_by; extern Fl_Group *tab_203_agency; extern Fl_Input2 *txt_203_agency[]; extern Fl_Input2 *txt_203_agency_name[]; extern Fl_Group *tab_203_planning; extern Fl_Input2 *txt_203_planning_chief; extern Fl_Input2 *txt_203_planning_deputy; extern Fl_Input2 *txt_203_resources_unit; extern Fl_Input2 *txt_203_situation_unit; extern Fl_Input2 *txt_203_documentation_unit; extern Fl_Input2 *txt_203_demobilization_unit; extern Fl_Input2 *txt_203_tech_spc[]; extern Fl_Group *tab_203_logistics; extern Fl_Input2 *txt_203_logistics_chief; extern Fl_Input2 *txt_203_logistics_deputy; extern Fl_Input2 *txt_203_support_director; extern Fl_Input2 *txt_203_supply_unit; extern Fl_Input2 *txt_203_facilities_unit; extern Fl_Input2 *txt_203_ground_support; extern Fl_Input2 *txt_203_service_director; extern Fl_Input2 *txt_203_communications_unit; extern Fl_Input2 *txt_203_medical_unit; extern Fl_Input2 *txt_203_food_unit; extern Fl_Group *tab_203_ops; extern Fl_Input2 *txt_203_ops_chief; extern Fl_Input2 *txt_203_ops_deputy; extern Fl_Input2 *txt_203_b1_director; extern Fl_Input2 *txt_203_b1_deputy; extern Fl_Input2 *txt_203_b1_div[]; extern Fl_Input2 *txt_203_b1_grp[]; extern Fl_Group *tab_203_opsB; extern Fl_Input2 *txt_203_b2_director; extern Fl_Input2 *txt_203_b2_deputy; extern Fl_Input2 *txt_203_b2_div[]; extern Fl_Input2 *txt_203_b2_grp[]; extern Fl_Group *tab_203_opsC; extern Fl_Input2 *txt_203_b3_director; extern Fl_Input2 *txt_203_b3_deputy; extern Fl_Input2 *txt_203_b3_div[]; extern Fl_Input2 *txt_203_b3_grp[]; extern Fl_Group *tab_203_opsD; extern Fl_Input2 *txt_203_air_ops_br_dir; extern Fl_Input2 *txt_203_air_tactical_group_sup; extern Fl_Input2 *txt_203_air_support_group_sup; extern Fl_Input2 *txt_203_helicopter_coordinator; extern Fl_Input2 *txt_203_air_tanker_fixed_wing; extern Fl_Group *tab_203_admin; extern Fl_Input2 *txt_203_finance_chief; extern Fl_Input2 *txt_203_finance_deputy; extern Fl_Input2 *txt_203_time_unit; extern Fl_Input2 *txt_203_procurement_unit; extern Fl_Input2 *txt_203_claims_unit; extern Fl_Input2 *txt_203_cost_unit; //====================================================================== // ICS-205 //====================================================================== extern void create_ics205_tab(); extern Fl_Group *tab_ics205; extern Fl_Tabs *tabs_ics205; extern Fl_Group *tab_205_1; extern Fl_Group *tab_205_2; extern Fl_Input2 *txt_205_name; extern Fl_Input2 *txt_205_dt_prepared; extern Fl_Button *btn_205_dt_prepared; extern Fl_Input2 *txt_205_dt_op_from; extern Fl_Button *btn_205_dt_op_from; extern Fl_Input2 *txt_205_dt_op_to; extern Fl_Button *btn_205_dt_op_to; extern Fl_Input2 *txt_205_func[]; extern Fl_Input2 *txt_205_channel[]; extern Fl_Input2 *txt_205_assign[]; extern Fl_Input2 *txt_205_rx_freq[]; extern Fl_Input2 *txt_205_rx_tone[]; extern Fl_Input2 *txt_205_tx_freq[]; extern Fl_Input2 *txt_205_tx_tone[]; extern Fl_Input2 *txt_205_mode_adm[]; extern Fl_Input2 *txt_205_remarks[]; extern Fl_Input2 *txt_205_preparer; extern Fl_Input2 *txt_205_county; extern Fl_Input2 *txt_205_state; extern Fl_Input2 *txt_205_latitude; extern Fl_Input2 *txt_205_longitude; //====================================================================== // ICS-205A //====================================================================== extern void create_ics205a_tab(); extern Fl_Group *tab_ics205a; extern Fl_Tabs *tab_ics205a_type; extern Fl_Group *tab_205a_1; extern Fl_Group *tab_205a_2; extern Fl_Input2 *txt_205a_incident; extern Fl_Input2 *txt_205a_date_fm; extern Fl_Button *btn_205a_date_fm; extern Fl_Input2 *txt_205a_date_to; extern Fl_Button *btn_205a_date_to; extern Fl_Input2 *txt_205a_time_fm; extern Fl_Button *btn_205a_time_fm; extern Fl_Input2 *txt_205a_time_to; extern Fl_Button *btn_205a_time_to; extern Fl_Input2 *txt_205a_prepared_by; extern Fl_Input2 *txt_205a_preparer_position; extern Fl_Input2 *txt_205a_preparer_date_time; extern Fl_Input2 *txt_205a_comm_group[]; extern Fl_Input2 *txt_205a_comm_position[]; extern Fl_Input2 *txt_205a_comm_name[]; extern Fl_Input2 *txt_205a_comm_info[]; //====================================================================== // ICS-206 //====================================================================== extern void create_ics206_tab(); extern Fl_Group *tab_ics206; extern Fl_Tabs *tab_ics206_type; extern Fl_Group *tab_206_med_plan; extern Fl_Input2 *txt_206_name; extern Fl_Input2 *txt_206_op_period; extern Fl_Input2 *txt_206_time_prepared; extern Fl_Button *btn_206_time; extern Fl_DateInput *txt_206_date_prepared; extern Fl_Button *btn_206_date; extern Fl_Input2 *txt_206_medaid_sta[]; extern Fl_Input2 *txt_206_medaid_loc[]; extern Fl_Check_Button *btn_206_medaid_paramedics[]; extern Fl_Input2 *txt_206_preparer; extern Fl_Input2 *txt_206_reviewer; extern Fl_Group *tab_206_transport; extern Fl_Input2 *txt_206_transport_name[]; extern Fl_Input2 *txt_206_transport_address[]; extern Fl_Check_Button *btn_206_transport_paramedics[]; extern Fl_Input2 *txt_206_transport_phone[]; extern Fl_Group *tab_206_ambulance; extern Fl_Input2 *txt_206_ambulance_name[]; extern Fl_Input2 *txt_206_ambulance_loc[]; extern Fl_Check_Button *btn_206_ambulance_paramedics[]; extern Fl_Group *tab_206_hospital; extern Fl_Input2 *txt_206_hosp_name[]; extern Fl_Input2 *txt_206_hosp_address[]; extern Fl_Input2 *txt_206_hosp_phone[]; extern Fl_Input2 *txt_206_hosp_airtime[]; extern Fl_Input2 *txt_206_hosp_gndtime[]; extern Fl_Check_Button *btn_206_hosp_helipad[]; extern Fl_Check_Button *btn_206_hosp_burn_center[]; extern Fl_Group *tab_206_med_proc; extern FTextEdit *txt_206_procedure; //====================================================================== // ICS-213 //====================================================================== extern void create_ics213_tab(); extern Fl_Group *tab_ics213; extern Fl_Tabs *tab_ics213_type; extern Fl_Group *tab_213_originator; extern Fl_Input2 *txt_213_inc; extern Fl_Input2 *txt_213_to; extern Fl_Input2 *txt_213_p1; extern Fl_Input2 *txt_213_fm; extern Fl_Input2 *txt_213_p2; extern Fl_Input2 *txt_213_subj; extern Fl_DateInput *txt_213_d1; extern Fl_Button *btn_213_date1; extern Fl_Input2 *txt_213_t1; extern Fl_Button *btn_213_time1; extern FTextEdit *txt_213_msg; extern Fl_Input2 *txt_213_s1; extern Fl_Input2 *txt_213_p3; extern Fl_Group *tab_213_responder; extern Fl_Input2 *txt_213_s2; extern Fl_DateInput *txt_213_d2; extern Fl_Input2 *txt_213_t2; extern Fl_Button *btn_213_time2; extern FTextEdit *txt_213_reply; extern Fl_Input2 *txt_213_p4; extern Fl_Button *btn_213_date2; //====================================================================== // ICS-214 //====================================================================== extern void create_ics214_tab(); extern Fl_Group *tab_ics214; extern Fl_Tabs *tab_ics214_type; extern Fl_Group *tab_214_1; extern Fl_Input2 *txt_214_incident; extern Fl_Input2 *txt_214_date; extern Fl_Button *btn_214_date; extern Fl_Input2 *txt_214_time; extern Fl_Button *btn_214_time; extern Fl_Input2 *txt_214_op_period; extern Fl_Input2 *txt_214_unit_name; extern Fl_Input2 *txt_214_unit_leader; extern Fl_Input2 *txt_214_prepared_by; extern Fl_Group *tab_214_2; extern Fl_Input2 *txt_214_roster_name[]; extern Fl_Input2 *txt_214_roster_position[]; extern Fl_Input2 *txt_214_roster_home_base[]; extern Fl_Group *tab_214_3; extern Fl_Input2 *txt_214_activity_time[]; extern Fl_Input2 *txt_214_activity_event[]; //====================================================================== // ICS-216 //====================================================================== extern void create_ics216_tab(); extern Fl_Group *tab_ics216; extern Fl_Group *tab_ics_216; extern Fl_Tabs *tab_ics216_type; extern Fl_Group *tab_216_1; extern Fl_Group *tab_216_2; extern Fl_Group *tab_216_3; extern Fl_Group *tab_216_4; extern Fl_Group *tab_216_5; extern Fl_Input2 *txt_216_incident; extern Fl_Input2 *txt_216_date; extern Fl_Button *btn_216_date; extern Fl_Input2 *txt_216_time; extern Fl_Button *btn_216_time; extern Fl_Input2 *txt_216_branch; extern Fl_Input2 *txt_216_agc; extern Fl_Input2 *txt_216_op_period; extern Fl_Input2 *txt_216_tac_freq; extern Fl_Input2 *txt_216_prepared_by; extern Fl_Group *tab_216_2; extern Fl_Input2 *txt_216_div_grp[]; extern Fl_Input2 *txt_216_agency[]; extern Fl_Group *tab_216_3; extern Fl_Input2 *txt_216_ag[]; extern Fl_Input2 *txt_216_id[]; extern Fl_Input2 *txt_216_rr[]; //====================================================================== // ICS-309 //====================================================================== extern void create_ics309_tab(); extern Fl_Group *tab_ics309; extern Fl_Tabs *tab_ics309_type; extern Fl_Group *tab_309_1; extern Fl_Input2 *txt_309_incident; extern Fl_Input2 *txt_309_date_fm; extern Fl_Button *btn_309_date_fm; extern Fl_Input2 *txt_309_date_to; extern Fl_Button *btn_309_date_to; extern Fl_Input2 *txt_309_time_fm; extern Fl_Button *btn_309_time_fm; extern Fl_Input2 *txt_309_time_to; extern Fl_Button *btn_309_time_to; extern Fl_Input2 *txt_309_prepared_by; extern Fl_Input2 *txt_309_radio_net; extern Fl_Input2 *txt_309_radio_operator; extern Fl_Input2 *txt_309_preparer_date_time; extern Fl_Group *tab_309_2; extern Fl_Input2 *txt_309_comm_time[]; extern Fl_Input2 *txt_309_comm_from[]; extern Fl_Input2 *txt_309_comm_to[]; extern Fl_Input2 *txt_309_comm_msg[]; //====================================================================== // HICS //====================================================================== extern Fl_Group *tab_hics; extern Fl_Tabs *tab_hics_type; extern void create_hics_tab(); //====================================================================== // HICS-203 //====================================================================== extern void create_hics203_tab(); extern Fl_Group *tab_hics203; extern Fl_Tabs *tab_hics203_type; extern Fl_Group *tab_hics203_1; extern Fl_Input2 *txt_hics203_incident; extern Fl_Input2 *txt_hics203_date; extern Fl_Button *btn_hics203_date; extern Fl_Input2 *txt_hics203_time; extern Fl_Button *btn_hics203_time; extern Fl_Input2 *txt_hics203_op_period; extern Fl_Input2 *txt_hics203_incident_commander; extern Fl_Input2 *txt_hics203_incident_deputy; extern Fl_Input2 *txt_hics203_incident_safety_officer; extern Fl_Input2 *txt_hics203_incident_info_officer; extern Fl_Input2 *txt_hics203_liaison_officer; extern Fl_Input2 *txt_hics203_prepared_by; extern Fl_Input2 *txt_hics203_facility; extern Fl_Group *tab_hics203_tech_spec; extern Fl_Input2 *txt_hics203_tech_spc[]; extern Fl_Group *tab_hics203_planning; extern Fl_Input2 *txt_hics203_planning_chief; extern Fl_Input2 *txt_hics203_planning_other; extern Fl_Input2 *txt_hics203_res_unit; extern Fl_Input2 *txt_hics203_sit_unit; extern Fl_Input2 *txt_hics203_doc_unit; extern Fl_Input2 *txt_hics203_dem_unit; extern Fl_Group *tab_hics203_logisthics; extern Fl_Input2 *txt_hics203_log_chief; extern Fl_Input2 *txt_hics203_log_other; extern Fl_Input2 *txt_hics203_log_sup_brch; extern Fl_Input2 *txt_hics203_bus_brch; extern Fl_Input2 *txt_hics203_stg_mgr; extern Fl_Input2 *txt_hics203_med_care_brch; extern Fl_Input2 *txt_hics203_infr_brch; extern Fl_Input2 *txt_hics203_sec_brch; extern Fl_Input2 *txt_hics203_hazmat_brch; extern Fl_Input2 *txt_hics203_hcc_agency; extern Fl_Input2 *txt_hics203_svc_brch; extern Fl_Input2 *txt_hics203_hcc_rep; extern Fl_Input2 *txt_hics203_ext_loc; extern Fl_Input2 *txt_hics203_ext_rep; extern Fl_Group *tab_hics203_ops; extern Fl_Input2 *txt_hics203_ops_chief; extern Fl_Input2 *txt_hics203_ops_other; extern Fl_Group *tab_hics203_admin; extern Fl_Input2 *txt_hics203_fin_chief; extern Fl_Input2 *txt_hics203_fin_other; extern Fl_Input2 *txt_hics203_time_unit; extern Fl_Input2 *txt_hics203_proc_unit; extern Fl_Input2 *txt_hics203_comp_unit; extern Fl_Input2 *txt_hics203_cost_unit; //====================================================================== // HICS 206 tab extern void create_hics206_tab(); extern Fl_Group *h206_tab; extern Fl_Tabs *h206_tab_type; extern Fl_Group *h206_tab_plan; extern Fl_Input2 *h206_txt_name; extern Fl_Input2 *h206_txt_op_period; extern Fl_Input2 *h206_txt_time_prepared; extern Fl_Button *h206_btn_time; extern Fl_DateInput *h206_txt_date_prepared; extern Fl_Button *h206_btn_date; extern Fl_Input2 *h206_txt_location; extern Fl_Input2 *h206_txt_loc_contact; extern Fl_Input2 *h206_txt_team_leader; extern Fl_Input2 *h206_txt_team_contact; extern FTextEdit *h206_txt_special_instructions; extern Fl_Input2 *h206_txt_md_do; extern Fl_Input2 *h206_txt_litters; extern Fl_Input2 *h206_txt_pa_np; extern Fl_Input2 *h206_txt_portable; extern Fl_Input2 *h206_txt_rn_lpn; extern Fl_Input2 *h206_txt_transport; extern Fl_Input2 *h206_txt_tech_cn; extern Fl_Input2 *h206_txt_wheelchairs; extern Fl_Input2 *h206_txt_team_other; extern Fl_Input2 *h206_txt_transport_other; extern Fl_Input2 *h206_txt_meds_1; extern Fl_Input2 *h206_txt_supp_1; extern Fl_Input2 *h206_txt_meds_2; extern Fl_Input2 *h206_txt_supp_2; extern Fl_Input2 *h206_txt_meds_3; extern Fl_Input2 *h206_txt_supp_3; extern Fl_Input2 *h206_txt_meds_4; extern Fl_Input2 *h206_txt_supp_4; extern Fl_Input2 *h206_txt_meds_5; extern Fl_Input2 *h206_txt_supp_5; extern Fl_Input2 *h206_txt_site_1; extern Fl_Input2 *h206_txt_address_1; extern Fl_Input2 *h206_txt_phone_1; extern Fl_Input2 *h206_txt_spec_care_1; extern Fl_Input2 *h206_txt_site_2; extern Fl_Input2 *h206_txt_address_2; extern Fl_Input2 *h206_txt_phone_2; extern Fl_Input2 *h206_txt_spec_care_2; extern Fl_Input2 *h206_txt_site_3; extern Fl_Input2 *h206_txt_address_3; extern Fl_Input2 *h206_txt_phone_3; extern Fl_Input2 *h206_txt_spec_care_3; extern Fl_Input2 *h206_txt_site_4; extern Fl_Input2 *h206_txt_address_4; extern Fl_Input2 *h206_txt_phone_4; extern Fl_Input2 *h206_txt_spec_care_4; extern Fl_Input2 *h206_txt_preparer; extern Fl_Input2 *h206_txt_facility; //====================================================================== // HICS 213 tab extern void create_hics213_tab(); extern Fl_Group *h213_tab; extern Fl_Tabs *h213_tab_type; extern Fl_Group *tab_213_grp_orig; extern Fl_Group *tab_213_grp_msg; extern Fl_Group *tab_213_grp_action; extern Fl_Group *tab_213_grp_receipt1; extern Fl_Group *tab_213_grp_receipt2; extern Fl_Input2 *h213_txt_to; extern Fl_Input2 *h213_txt_fm; extern Fl_DateInput *h213_txt_date; extern Fl_Button *h213_btn_date; extern Fl_Input2 *h213_txt_time; extern Fl_Button *h213_btn_time0; extern Fl_Check_Button *h213_btn_phone; extern Fl_Check_Button *h213_btn_radio; extern Fl_Check_Button *h213_btn_other; extern Fl_Check_Button *h213_btn_yes; extern Fl_Check_Button *h213_btn_no; extern Fl_Check_Button *h213_btn_high; extern Fl_Check_Button *h213_btn_medium; extern Fl_Check_Button *h213_btn_low; extern Fl_Input2 *h213_txt_reply_to; extern FTextEdit *h213_txt_msg; extern FTextEdit *h213_txt_action; extern Fl_Input2 *h213_txt_rcvd_by; extern Fl_Input2 *h213_txt_time_rcvd; extern Fl_Button *h213_btn_time1; extern Fl_Input2 *h213_txt_fwd_to; extern FTextEdit *h213_txt_comments; extern Fl_Input2 *h213_txt_rcvd_by2; extern Fl_Input2 *h213_txt_time_rcvd2; extern Fl_Button *h213_btn_time2; extern Fl_Input2 *h213_txt_fwd_to2; extern FTextEdit *h213_txt_comments2; extern Fl_Input2 *h213_txt_facility; //====================================================================== // hics-214 //====================================================================== extern void create_hics214_tab(); extern Fl_Group *hics214_tab; extern Fl_Tabs *hics214_tab_type; extern Fl_Group *hics214_tab_1; extern Fl_Input2 *hics214_txt_incident; extern Fl_Input2 *hics214_txt_date; extern Fl_Input2 *hics214_txt_sec_brch; extern Fl_Input2 *hics214_txt_position; extern Fl_Button *hics214_btn_date; extern Fl_Input2 *hics214_txt_time; extern Fl_Button *hics214_btn_time; extern Fl_Input2 *hics214_txt_op_period; extern Fl_Input2 *hics214_txt_prepared_by; extern Fl_Input2 *hics214_txt_facility; extern Fl_Group *hics214_tab_2; extern Fl_Input2 *hics214_txt_activity_time[]; extern Fl_Input2 *hics214_txt_activity_event[]; //====================================================================== // IARU message //====================================================================== extern void create_iaru_tab(); extern Fl_Group *tab_iaru; extern Fl_Tabs *tabs_iaru; extern Fl_Group *tab_iaru_message; extern Fl_Group *tab_iaru_information; extern Fl_Input2 *iaru_txt_nbr; extern Fl_ListBox *iaru_sel_prec; extern Fl_Input2 *iaru_txt_station; extern Fl_Input2 *iaru_txt_orig; extern Fl_Input2 *iaru_txt_t1; extern Fl_Button *iaru_btn_t1; extern Fl_Input2 *iaru_txt_d1; extern Fl_Button *iaru_btn_d1; extern Fl_Input2 *iaru_txt_check; extern Fl_Button *iaru_btn_check; extern Fl_Input2 *iaru_txt_to; extern Fl_Input2 *iaru_txt_fm; extern FTextEdit *iaru_txt_msg; extern Fl_Input2 *iaru_txt_rcv_fm; extern Fl_Input2 *iaru_txt_d2; extern Fl_Button *iaru_btn_d2; extern Fl_Input2 *iaru_txt_t2; extern Fl_Button *iaru_btn_t2; extern Fl_Input2 *iaru_txt_sent_to; extern Fl_Input2 *iaru_txt_d3; extern Fl_Button *iaru_btn_d3; extern Fl_Input2 *iaru_txt_t3; extern Fl_Button *iaru_btn_t3; //====================================================================== // Radiogram //====================================================================== extern void create_radiogram_tab(); extern Fl_Group *tab_radiogram; extern Fl_Tabs *tabs_radiogram; extern Fl_Group *tab_radiogram_message; extern Fl_Input2 *txt_rg_nbr; extern Fl_ListBox *sel_rg_prec; extern Fl_Input2 *txt_rg_hx; extern Fl_Button *btn_rg_hx; extern Fl_Input2 *txt_rg_station; extern Fl_Input2 *txt_rg_place; extern Fl_Input2 *txt_rg_t1; extern Fl_Button *btn_rgTime1; extern Fl_Input2 *txt_rg_d1; extern Fl_Button *btn_rgDate1; extern Fl_Input2 *txt_rg_to; extern Fl_Input2 *txt_rg_phone; extern Fl_Input2 *txt_rg_opnote; extern FTextEdit *txt_rg_msg; extern Fl_Button *btn_arl; extern Fl_Input2 *txt_rg_check; extern Fl_Button *btn_rg_check; extern Fl_Input2 *txt_rg_sig; extern Fl_Input2 *txt_rg_opnote2; extern Fl_Check_Button *btn_rg_svc; extern Fl_Group *tab_radiogram_information; extern Fl_Input2 *txt_rg_orig; extern Fl_Input2 *txt_rg_dt2; extern Fl_Button *btn_rgDateTime2; extern Fl_Input2 *txt_rg_dt3; extern Fl_Button *btn_rgDateTime3; extern Fl_Input2 *txt_rg_dlvd_to; extern Fl_Input2 *txt_rg_rcv_fm; extern Fl_Input2 *txt_rg_rcv_net; extern Fl_Input2 *txt_rg_dt4; extern Fl_Button *btn_rgDateTime4; extern Fl_Input2 *txt_rg_sent_to; extern Fl_Input2 *txt_rg_snt_net; extern Fl_Input2 *txt_rg_dt5; extern Fl_Button *btn_rgDateTime5; extern Fl_Check_Button *btn_rg_standard; //====================================================================== // Plaintext //====================================================================== extern void create_plaintext_tab(); extern Fl_Group *tab_plaintext; extern Fl_Input2 *txt_pt_title; extern Fl_Input2 *txt_pt_to; extern Fl_Input2 *txt_pt_fm; extern Fl_Input2 *txt_pt_subj; extern FTextEdit *txt_pt_msg; extern Fl_DateInput *txt_pt_date; extern Fl_Button *btn_pt_date; extern Fl_Input2 *txt_pt_time; extern Fl_Button *btn_pt_time; //====================================================================== // Blank //====================================================================== extern void create_blank_tab(); extern Fl_Group *tab_blank; extern FTextEdit *txt_blank_msg; //====================================================================== // CSV //====================================================================== extern void create_csv_tab(); extern Fl_Group *tab_csv; extern FTextEdit *txt_csv_msg; //====================================================================== // CUSTOM //====================================================================== extern int num_custom_entries; extern int custom_select; extern void create_custom_tab(); extern Fl_Group *tab_custom; extern FTextView *txt_custom_msg; extern void get_html_vars(struct mg_connection *conn); extern void custom_editor(struct mg_connection *conn); extern void custom_viewer(struct mg_connection *conn); extern void create_custom_transfer_tab(); extern Fl_Group *tab_custom_transfer; extern Fl_ListBox *custom_selector; extern Fl_Output * txt_rcvd_custom_html_filename; extern Fl_Button * btn_save_custom_html_file; extern vector<string> custom_files; //====================================================================== // Drag-n-Drop //====================================================================== extern void create_dnd_tab(); extern Fl_Group *tab_dnd; extern Fl_Input *drop_box; //====================================================================== // MARS tab //====================================================================== extern void create_mars_tab(); extern Fl_Group *tab_mars; extern Fl_Tabs *tab_mars_type; extern string mars_list_lname; extern string mars_list_call; extern string mars_list_state; extern string mars_list_bcall; extern string mars_list_position; extern bool get_mars_list_text(); extern void cb_mars_fl_input2(Fl_Widget *w, void *d); extern void cb_mars_text(Fl_Widget *w, void *d); extern string notail(string s); extern string maxchars(string s, unsigned int n, int indent = 0); //====================================================================== // MARS daily //====================================================================== extern void create_mars_daily(); extern Fl_Group *tab_mars_daily; extern Fl_Tabs *tab_mars_daily_type; extern Fl_Group *tab_mars_daily_1; extern Fl_Input2 *txt_mars_daily_incident; extern Fl_Input2 *txt_mars_daily_de; extern Fl_Button *btn_mars_daily_de_me; extern Fl_Input2 *txt_mars_daily_nbr; extern Fl_ListBox *sel_mars_daily_prec; extern Fl_Input2 *txt_mars_daily_dtg; extern Fl_Button *btn_mars_daily_dtg; extern Fl_Input2 *txt_mars_daily_fm_name; extern Fl_Input2 *txt_mars_daily_fm_call; extern Fl_Input2 *txt_mars_daily_fm_state; extern Fl_Button *btn_mars_daily_pick_fm; extern Fl_Input2 *txt_mars_daily_to_pos; extern Fl_Input2 *txt_mars_daily_to_call; extern Fl_Input2 *txt_mars_daily_to_state; extern Fl_Button *btn_mars_daily_pick_to; extern Fl_Input2 *txt_mars_daily_pos1; extern Fl_Input2 *txt_mars_daily_call1; extern Fl_Input2 *txt_mars_daily_state1; extern Fl_Button *btn_mars_daily_pick_info1; extern Fl_Input2 *txt_mars_daily_pos2; extern Fl_Input2 *txt_mars_daily_call2; extern Fl_Input2 *txt_mars_daily_state2; extern Fl_Button *btn_mars_daily_pick_info2; extern Fl_Input2 *txt_mars_daily_pos3; extern Fl_Input2 *txt_mars_daily_call3; extern Fl_Input2 *txt_mars_daily_state3; extern Fl_Button *btn_mars_daily_pick_info3; extern Fl_Group *tab_mars_daily_2; extern Fl_Input2 *txt_mars_daily_sitrep_id; extern Fl_Input2 *txt_mars_daily_sitrep_loc; extern Fl_Input2 *txt_mars_daily_dtg_24hr; extern Fl_Button *btn_mars_daily_dtg_24hr; extern Fl_Input2 *txt_mars_daily_netcall; extern Fl_ListBox *sel_mars_daily_e_x; extern Fl_Input2 *txt_mars_daily_dtg_active; extern Fl_Button *btn_mars_daily_dtg_active; extern Fl_Input2 *txt_mars_daily_dtg_deactive; extern Fl_Button *btn_mars_daily_dtg_deactive; extern Fl_Input2 *txt_mars_daily_nbr_stations; extern Fl_Input2 *txt_mars_daily_details; extern Fl_Input2 *txt_mars_daily_activations; extern Fl_Input2 *txt_mars_daily_agencies; extern Fl_Input2 *txt_mars_daily_remarks; //====================================================================== // MARS ineei //====================================================================== extern void create_mars_ineei(); extern Fl_Group *tab_mars_ineei; extern Fl_Tabs *tab_mars_ineei_type; extern Fl_Group *tab_mars_ineei_1; extern Fl_Input2 *txt_mars_ineei_DE; extern Fl_Input2 *txt_mars_ineei_NBR; extern Fl_ListBox *sel_mars_ineei_PREC; extern Fl_Input2 *txt_mars_ineei_DTG; extern Fl_Input2 *txt_mars_ineei_FMNAME; extern Fl_Input2 *txt_mars_ineei_FMCALL; extern Fl_Input2 *txt_mars_ineei_FMSTATE; extern Fl_Input2 *txt_mars_ineei_TOPOS; extern Fl_Input2 *txt_mars_ineei_TOCALL; extern Fl_Input2 *txt_mars_ineei_TOSTATE; extern Fl_Input2 *txt_mars_ineei_INFO1POS; extern Fl_Input2 *txt_mars_ineei_INFO1CALL; extern Fl_Input2 *txt_mars_ineei_INFO1STATE; extern Fl_Input2 *txt_mars_ineei_INFO2POS; extern Fl_Input2 *txt_mars_ineei_INFO2CALL; extern Fl_Input2 *txt_mars_ineei_INFO2STATE; extern Fl_Input2 *txt_mars_ineei_INFO3POS; extern Fl_Input2 *txt_mars_ineei_INFO3CALL; extern Fl_Input2 *txt_mars_ineei_INFO3STATE; extern Fl_Input2 *txt_mars_ineei_INFO4POS; extern Fl_Input2 *txt_mars_ineei_INFO4CALL; extern Fl_Input2 *txt_mars_ineei_INFO4STATE; extern Fl_Input2 *txt_mars_ineei_INFO5POS; extern Fl_Input2 *txt_mars_ineei_INFO5CALL; extern Fl_Input2 *txt_mars_ineei_INFO5STATE; extern Fl_Input2 *txt_mars_ineei_INFO6POS; extern Fl_Input2 *txt_mars_ineei_INFO6CALL; extern Fl_Input2 *txt_mars_ineei_INFO6STATE; extern Fl_Input2 *txt_mars_ineei_INFO7POS; extern Fl_Input2 *txt_mars_ineei_INFO7CALL; extern Fl_Input2 *txt_mars_ineei_INFO7STATE; extern Fl_Input2 *txt_mars_ineei_INFO8POS; extern Fl_Input2 *txt_mars_ineei_INFO8CALL; extern Fl_Input2 *txt_mars_ineei_INFO8STATE; extern Fl_Input2 *txt_mars_ineei_INFO9POS; extern Fl_Input2 *txt_mars_ineei_INFO9CALL; extern Fl_Input2 *txt_mars_ineei_INFO9STATE; extern Fl_Input2 *txt_mars_ineei_INFO10POS; extern Fl_Input2 *txt_mars_ineei_INFO10CALL; extern Fl_Input2 *txt_mars_ineei_INFO10STATE; extern Fl_Input2 *txt_mars_ineei_INCIDENT; extern Fl_Group *tab_mars_ineei_2; extern Fl_Input2 *txt_mars_ineei_REF; extern Fl_Input2 *txt_mars_ineei_STATE; extern Fl_Input2 *txt_mars_ineei_1A_INCIDENT; extern Fl_Input2 *txt_mars_ineei_1A_LOCATION; extern Fl_Input2 *txt_mars_ineei_1A_TIME; extern Fl_Input2 *txt_mars_ineei_1B_MEDFACSTS; extern Fl_Input2 *txt_mars_ineei_1C_TRNPSTS; extern Fl_Input2 *txt_mars_ineei_1D_DAMAGE; extern Fl_Input2 *txt_mars_ineei_1E_UTILSTS; extern Fl_Input2 *txt_mars_ineei_1F_COMMSTS; extern Fl_Input2 *txt_mars_ineei_1G_INFOSRC; extern Fl_Input2 *txt_mars_ineei_1G_INFOTIME; extern Fl_Input2 *txt_mars_ineei_1H_REMARKS; //====================================================================== // MARS net //====================================================================== extern void create_mars_net(); extern Fl_Group *tab_mars_net; extern Fl_Tabs *tab_mars_net_type; extern Fl_Group *tab_mars_net_1; extern Fl_Group *tab_mars_net_2; extern Fl_Input2 *txt_mars_net_DE; extern Fl_Input2 *txt_mars_net_NBR; extern Fl_ListBox *sel_mars_net_PREC; extern Fl_Input2 *txt_mars_net_DTG; extern Fl_Input2 *txt_mars_net_FMNAME; extern Fl_Input2 *txt_mars_net_FMCALL; extern Fl_Input2 *txt_mars_net_FMSTATE; extern Fl_Input2 *txt_mars_net_TOPOS; extern Fl_Input2 *txt_mars_net_TOCALL; extern Fl_Input2 *txt_mars_net_TOSTATE; extern Fl_Input2 *txt_mars_net_INFOPOS; extern Fl_Input2 *txt_mars_net_INFOCALL; extern Fl_Input2 *txt_mars_net_INFOSTATE; extern Fl_Input2 *txt_mars_net_INCIDENT; extern Fl_Input2 *txt_mars_net_DND; extern Fl_Input2 *txt_mars_net_NETCALL; extern Fl_Input2 *txt_mars_net_DTGSTART; extern Fl_Input2 *txt_mars_net_DTGEND; extern Fl_Input2 *txt_mars_net_NETSB; extern Fl_Input2 *txt_mars_net_NCSCALL; extern Fl_Input2 *txt_mars_net_NBRSTAS; extern Fl_Input2 *txt_mars_net_CALLS; extern Fl_Input2 *txt_mars_net_NBRMSGS; extern Fl_Input2 *txt_mars_net_COMMENTS; //====================================================================== // MARS Army Standard Message //====================================================================== extern void create_mars_army(); extern Fl_Group *tab_mars_army; extern Fl_Tabs *tab_mars_army_type; extern Fl_Group *tab_mars_army_1; extern Fl_Group *tab_mars_army_2; extern Fl_Input2 *txt_mars_army_de; extern Fl_Input2 *txt_mars_army_nbr; extern Fl_Input2 *txt_mars_army_dtg; extern Fl_Input2 *txt_mars_army_fm; extern Fl_Input2 *txt_mars_army_subj; extern FTextEdit *txt_mars_army_to; extern FTextEdit *txt_mars_army_info; extern FTextEdit *txt_mars_army_text; extern Fl_Button *btn_mars_army_dtg; extern Fl_Button *btn_mars_army_pick_fm; extern Fl_Button *btn_mars_army_pick_to; extern Fl_Button *btn_mars_army_pick_info; extern Fl_ListBox *sel_mars_army_prec; //====================================================================== // MARS Navy Standard Message //====================================================================== extern void create_mars_navy(); extern Fl_Group *tab_mars_navy; extern Fl_Tabs *tab_mars_navy_type; extern Fl_Group *tab_mars_navy_1; extern Fl_Group *tab_mars_navy_2; extern Fl_Input2 *txt_mars_navy_de; extern Fl_Input2 *txt_mars_navy_serno; extern Fl_Input2 *txt_mars_navy_dtg; extern Fl_Input2 *txt_mars_navy_fm; extern Fl_Input2 *txt_mars_navy_subj; extern FTextEdit *txt_mars_navy_to; extern FTextEdit *txt_mars_navy_info; extern FTextEdit *txt_mars_navy_text; extern Fl_Button *btn_mars_navy_dtg; extern Fl_Button *btn_mars_navy_pick_fm; extern Fl_Button *btn_mars_navy_pick_to; extern Fl_Button *btn_mars_navy_pick_info; extern Fl_ListBox *sel_mars_navy_prec; //====================================================================== // National Hurricane Center, Hurricane Weather Report Form //====================================================================== extern void create_wxhc_tab(); extern Fl_Group *tab_wxhc; extern Fl_Tabs *tab_wxhc_type; extern Fl_Group *tab_wxhc_1; extern Fl_Input2 *w_wxhc_rptsta; extern Fl_Input2 *w_wxhc_email; extern Fl_Input2 *w_wxhc_phone; extern Fl_Input2 *w_wxhc_addr; extern Fl_Input2 *w_wxhc_city; extern Fl_Input2 *w_wxhc_state; extern Fl_Input2 *w_wxhc_country; extern Fl_Input2 *w_wxhc_lat; extern Fl_Input2 *w_wxhc_long; extern Fl_Input2 *w_wxhc_date; extern Fl_Input2 *w_wxhc_time; extern Fl_Check_Button *w_wxhc_meas; extern Fl_Check_Button *w_wxhc_est; extern Fl_Input2 *w_wxhc_wind_speed; extern Fl_ListBox *w_wxhc_wind_speed_units; extern Fl_Input2 *w_wxhc_wind_gusts; extern Fl_ListBox *w_wxhc_wind_gusts_units; extern Fl_ListBox *w_wxhc_wind_dir; extern Fl_Input2 *w_wxhc_wind_degrees; extern Fl_Input2 *w_wxhc_baro_press; extern Fl_ListBox *w_wxhc_baro_units; extern Fl_Group *tab_wxhc_2; extern FTextEdit *w_wxhc_comments; //====================================================================== // Severe Weather Report Form //====================================================================== extern void create_severe_wx_tab(); extern Fl_Group *tab_severe_wx; extern Fl_Tabs *tab_severe_wx_type; extern Fl_Group *tab_severe_wx_1; extern Fl_DateInput *w_severe_wx_date; extern Fl_Input2 *w_severe_wx_time; extern Fl_ListBox *w_severe_wx_zone; extern Fl_Check_Button *w_severe_wx_meas; extern Fl_Check_Button *w_severe_wx_est; extern Fl_ListBox *w_severe_wx_state; extern Fl_ListBox *w_severe_wx_county; extern Fl_Input2 *w_severe_wx_city; extern Fl_Input2 *w_severe_wx_wind_speed; extern Fl_ListBox *w_severe_wx_hail_size; extern Fl_Check_Button *w_severe_wx_exact; extern Fl_Check_Button *w_severe_wx_not_exact; extern Fl_Check_Button *w_severe_wx_tornado; extern Fl_Check_Button *w_severe_wx_funnel_cloud; extern Fl_Check_Button *w_severe_wx_wall_cloud; extern Fl_Check_Button *w_severe_wx_hail; extern Fl_Check_Button *w_severe_wx_high_wind; extern Fl_Check_Button *w_severe_wx_measured; extern Fl_Check_Button *w_severe_wx_estimated; extern Fl_Check_Button *w_severe_wx_flood; extern Fl_Check_Button *w_severe_wx_flash_flood; extern Fl_Check_Button *w_severe_wx_other; extern Fl_Check_Button *w_severe_wx_dmg_yes; extern Fl_Check_Button *w_severe_wx_dmg_no; extern Fl_Check_Button *w_severe_wx_inj_yes; extern Fl_Check_Button *w_severe_wx_inj_no; extern Fl_Group *tab_severe_wx_2; extern FTextEdit *w_severe_wx_narrative; //====================================================================== // Severe Weather Report Form //====================================================================== extern void create_storm_tab(); extern Fl_Group *tab_storm; extern Fl_Tabs *tab_storm_type; extern Fl_Group *tab_storm_1; extern Fl_DateInput *w_storm_date; extern Fl_Input2 *w_storm_time; extern Fl_ListBox *w_storm_zone; extern Fl_ListBox *w_storm_state; extern Fl_ListBox *w_storm_county; extern Fl_Input2 *w_storm_location; extern Fl_Check_Button *w_storm_tornado; extern Fl_ListBox *w_storm_tornado_cat; extern Fl_Check_Button *w_storm_hail; extern Fl_ListBox *w_storm_hail_size; extern Fl_Check_Button *w_storm_wind; extern Fl_ListBox *w_storm_wind_cat; extern Fl_Check_Button *w_storm_flood; extern Fl_ListBox *w_storm_flood_cat; extern Fl_Check_Button *w_storm_damage; extern Fl_ListBox *w_storm_damage_cat; extern Fl_Check_Button *w_storm_snow; extern Fl_ListBox *w_storm_snow_tot; extern Fl_ListBox *w_storm_snow_dur; extern Fl_Check_Button *w_storm_f_rain; extern Fl_ListBox *w_storm_f_rain_tot; extern Fl_ListBox *w_storm_f_rain_dur; extern Fl_Check_Button *w_storm_h_rain; extern Fl_ListBox *w_storm_h_rain_tot; extern Fl_ListBox *w_storm_h_rain_dur; extern Fl_Input2 *w_storm_o_name; extern Fl_Input2 *w_storm_o_email; extern Fl_Input2 *w_storm_o_tele; extern Fl_ListBox *w_storm_o_profile; extern Fl_Group *tab_storm_2; extern FTextEdit *w_storm_details; extern void set_storm_counties(int); //====================================================================== // Red Cross //====================================================================== extern void create_redx_tab(); //---------------------------------------------------------------------- // Safety and Welfare //---------------------------------------------------------------------- extern void create_redx_snw(); extern Fl_Group *tab_redx; extern Fl_Tabs *tab_redx_type; extern Fl_Group *tab_redx_snw; extern Fl_Tabs *tab_redx_snw_type; //---------------------------------------------------------------------- extern Fl_Group *tab_redx_snw_1; extern Fl_Input2 *snw_lname; extern Fl_Input2 *snw_fname; extern Fl_Input2 *snw_area1; extern Fl_Check_Button *snw_nophone; extern Fl_Input2 *snw_xchg1; extern Fl_Input2 *snw_suffix1; extern Fl_Input2 *snw_area2; extern Fl_Input2 *snw_xchg2; extern Fl_Input2 *snw_suffix2; extern Fl_Input2 *snw_area3; extern Fl_Input2 *snw_xchg3; extern Fl_Input2 *snw_suffix3; extern Fl_Input2 *snw_pdline1; extern Fl_Input2 *snw_pdline2; extern Fl_Input2 *snw_pdcity; extern Fl_Input2 *snw_pdst; extern Fl_Input2 *snw_pdzip; extern Fl_Input2 *snw_haline1; extern Fl_Input2 *snw_haline2; extern Fl_Input2 *snw_hacity; extern Fl_Input2 *snw_hast; extern Fl_Input2 *snw_hazip; //---------------------------------------------------------------------- extern Fl_Group *tab_redx_snw_2; extern Fl_Check_Button *snw_m1; extern Fl_Check_Button *snw_m2; extern Fl_Check_Button *snw_m3; extern Fl_Check_Button *snw_m4; extern Fl_Check_Button *snw_m5; extern Fl_Check_Button *snw_m6; extern Fl_Check_Button *snw_m7; //---------------------------------------------------------------------- extern Fl_Group *tab_redx_snw_3; extern Fl_Check_Button *snw_m8; extern Fl_Check_Button *snw_m9; extern Fl_Check_Button *snw_m10; extern Fl_Check_Button *snw_m11; extern Fl_Check_Button *snw_m12; extern Fl_Check_Button *snw_m13; extern Fl_Check_Button *snw_m14; //---------------------------------------------------------------------- extern Fl_Group *tab_redx_snw_4; extern Fl_Check_Button *snw_m15; extern FTextEdit *snw_cmsg; //====================================================================== // Red Cross 5739 //====================================================================== extern void create_redx_5739(); extern void redx_5739_compute(Fl_Widget * w, void *); extern Fl_Group *tab_redx_5739; extern Fl_Tabs *tab_redx_5739_type; extern Fl_Input2 *rdx_5739_nbr; extern Fl_Input2 *rdx_5739_name; extern Fl_Input2 *rdx_5739_state; extern Fl_Input2 *rdx_5739_cnty; extern Fl_Input2 *rdx_5739_city; extern Fl_Input2 *rdx_5739_date; extern Fl_Input2 *rdx_5739_street; extern Fl_Input2 *rdx_5739_georef; extern FTextEdit *rdx_5739_add_info; extern Fl_Input2 *rdx_5739_worker; extern Fl_Input2 *rdx_5739_supervisor; //---------------------------------------------------------------------- extern Fl_Input2 *rdx_sf_destroyed; extern Fl_Input2 *rdx_sf_major; extern Fl_Input2 *rdx_sf_minor; extern Fl_Input2 *rdx_sf_affected; extern Fl_Input2 *rdx_sf_inaccessible; //---------------------------------------------------------------------- extern Fl_Input2 *rdx_mh_destroyed; extern Fl_Input2 *rdx_mh_major; extern Fl_Input2 *rdx_mh_minor; extern Fl_Input2 *rdx_mh_affected; extern Fl_Input2 *rdx_mh_inaccessible; //---------------------------------------------------------------------- extern Fl_Input2 *rdx_ap_destroyed; extern Fl_Input2 *rdx_ap_major; extern Fl_Input2 *rdx_ap_minor; extern Fl_Input2 *rdx_ap_affected; extern Fl_Input2 *rdx_ap_inaccessible; //---------------------------------------------------------------------- extern Fl_Input2 *redx_5739_house_nbr[]; extern Fl_Input2 *redx_5739_apt_nbr[]; extern Fl_Input2 *redx_5739_desc[]; extern Fl_Input2 *redx_5739_nam[]; extern Fl_Input2 *redx_5739_destroyed[]; extern Fl_Input2 *redx_5739_major[]; extern Fl_Input2 *redx_5739_minor[]; extern Fl_Input2 *redx_5739_affected[]; extern Fl_Input2 *redx_5739_inaccessible[]; extern Fl_Input2 *redx_5739_floors[]; extern Fl_Input2 *redx_5739_basement[]; extern Fl_Input2 *redx_5739_waterlevel[]; extern Fl_Input2 *redx_5739_basement_water[]; extern Fl_Input2 *redx_5739_electricity[]; extern Fl_Input2 *redx_5739_occupancy[]; extern Fl_Input2 *redx_5739_OR[]; extern Fl_Input2 *redx_5739_901[]; //====================================================================== // Red Cross 5739A //====================================================================== extern void create_redx_5739A(); extern Fl_Group *tab_redx_5739A; extern Fl_Tabs *tab_redx_5739A_type; extern Fl_Group *tab_redx_5739A_1; extern Fl_Input2 *rdx_5739A_nbr; extern Fl_Input2 *rdx_5739A_name; extern Fl_Input2 *rdx_5739A_state; extern Fl_Input2 *rdx_5739A_cnty; extern Fl_Input2 *rdx_5739A_city; extern Fl_Input2 *rdx_5739A_date; extern Fl_Input2 *rdx_5739A_street; extern Fl_Input2 *rdx_5739A_georef; extern Fl_Group *tab_redx_5739A_2; extern Fl_Input2 *rdx_5739A_adrs0; extern Fl_Input2 *rdx_5739A_dwell0; extern Fl_Input2 *rdx_5739A_base0; extern Fl_Input2 *rdx_5739A_ds0; extern Fl_Input2 *rdx_5739A_mj0; extern Fl_Input2 *rdx_5739A_mn0; extern Fl_Input2 *rdx_5739A_af0; extern Fl_Input2 *rdx_5739A_in0; extern Fl_Input2 *rdx_5739A_un0; extern Fl_Input2 *rdx_5739A_gd0; extern Fl_Group *tab_redx_5739A_3; extern Fl_Input2 *rdx_5739A_adrs1; extern Fl_Input2 *rdx_5739A_dwell1; extern Fl_Input2 *rdx_5739A_base1; extern Fl_Input2 *rdx_5739A_ds1; extern Fl_Input2 *rdx_5739A_mj1; extern Fl_Input2 *rdx_5739A_mn1; extern Fl_Input2 *rdx_5739A_af1; extern Fl_Input2 *rdx_5739A_in1; extern Fl_Input2 *rdx_5739A_un1; extern Fl_Input2 *rdx_5739A_gd1; //====================================================================== // Red Cross 5739A //====================================================================== extern void create_redx_5739B(); extern Fl_Group *tab_redx_5739B; extern Fl_Tabs *tab_redx_5739B_type; extern Fl_Group *tab_redx_5739B_1; extern Fl_Input2 *rdx_5739B_nbr; extern Fl_Input2 *rdx_5739B_name; extern Fl_Input2 *rdx_5739B_state; extern Fl_Input2 *rdx_5739B_cnty; extern Fl_Input2 *rdx_5739B_city; extern Fl_Input2 *rdx_5739B_date; extern Fl_Input2 *rdx_5739B_street; extern Fl_Input2 *rdx_5739B_georef; extern Fl_Input2 *rdx_5739B_north; extern Fl_Input2 *rdx_5739B_east; extern Fl_Input2 *rdx_5739B_south; extern Fl_Input2 *rdx_5739B_west; extern Fl_Group *tab_redx_5739B_2; extern Fl_Input2 *rdx_5739B_dwell; extern Fl_Input2 *rdx_5739B_ds; extern Fl_Input2 *rdx_5739B_mj; extern Fl_Input2 *rdx_5739B_mn; extern Fl_Input2 *rdx_5739B_af; extern Fl_Input2 *rdx_5739B_in; extern Fl_Input2 *rdx_5739B_un; extern Fl_Input2 *rdx_5739B_bs; extern Fl_Input2 *rdx_5739B_gi; //====================================================================== // Civil Air Patrol (CAP) forms //====================================================================== // CAP-105, Radio Message extern Fl_Group *tab_cap105; extern Fl_Tabs *tabs_cap105; extern Fl_Group *tab_cap105_message; extern Fl_Group *tab_cap105_information; extern Fl_Input2 *cap105_txt_nbr; extern Fl_ListBox *cap105_sel_prec; extern Fl_Input2 *cap105_txt_dtm; extern Fl_Button *cap105_btn_dtm; extern Fl_Input2 *cap105_txt_from; extern Fl_Input2 *cap105_txt_to; extern Fl_Input2 *cap105_txt_info; extern Fl_Input2 *cap105_txt_subj; extern Fl_Input2 *cap105_txt_grpcnt; extern Fl_Button *cap105_btn_check; extern FTextEdit *cap105_txt_msg; extern Fl_Input2 *cap105_txt_rcvd_fm; extern Fl_Input2 *cap105_txt_rcvd_dtm; extern Fl_Button *cap105_btn_rcvd_dtm; extern Fl_Input2 *cap105_txt_sent_to; extern Fl_Input2 *cap105_txt_sent_dtm; extern Fl_Button *cap105_btn_sent_dtm; extern Fl_Input2 *cap105_txt_rcvop; extern Fl_Input2 *cap105_txt_sendop; extern void create_cap105_tab(); // cap110 comms report extern Fl_Group *tab_cap110; extern Fl_Tabs *tab_cap110_type; extern Fl_Group *tab_cap110_1; extern Fl_Input2 *txt_110_mission_nbr; extern Fl_Input2 *txt_110_station; extern Fl_Input2 *txt_110_date; extern Fl_Button *btn_110_date; extern Fl_Input2 *txt_110_ds_a; extern Fl_Input2 *txt_110_ds_b; extern Fl_Input2 *txt_110_ds_c; extern Fl_Input2 *txt_110_ds_d; extern Fl_Input2 *txt_110_ds_e; extern Fl_Input2 *txt_110_ds_f; extern Fl_Group *tab_cap110_2; extern Fl_Input2 *txt_110_comm_time[23]; extern Fl_Input2 *txt_110_comm_call[23]; extern Fl_Input2 *txt_110_comm_chref[23]; extern Fl_Input2 *txt_110_comm_rem[23]; extern void create_cap110_tab(); //====================================================================== // external string arrays // extern const std::string counties; extern const std::string states[]; extern int numstates; extern const std::string hail_size[]; extern int num_hail_size; extern const string tzones[]; extern int num_tzones; extern const std::string us_tzones[]; extern int num_us_tzones; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/wx_strings.h���������������������������������������������������������������0000664�0001750�0001750�00000004234�12330516146�014423� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- //====================================================================== // external weather string arrays //====================================================================== #ifndef WX_STRINGS_H #define WX_STRINGS_H #include <string> extern const std::string counties; extern const std::string states[]; extern int numstates; extern const std::string hail_size[]; extern int num_hail_size; extern const std::string tzones[]; extern int num_tzones; extern const std::string us_tzones[]; extern int num_us_tzones; extern const std::string flood_categories[]; extern int num_flood_categories; extern const std::string hail_size[]; extern int num_hail_size; extern const std::string wind_speeds[]; extern int num_wind_speeds; extern const std::string damage[]; extern int num_damage; extern const std::string snow_tot[]; extern int num_snow_tot; extern const std::string snow_dur[]; extern int num_snow_dur; extern const std::string ice_tot[]; extern int num_ice_tot; extern const std::string ice_dur[]; extern int num_ice_dur; extern const std::string rainfall[]; extern int num_rainfall; extern const std::string rainfall_dur[]; extern int num_rainfall_dur; extern const std::string profiles[]; extern int num_profiles; extern const std::string tornado_categories[]; extern int num_tornado_categories; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/radiogram.h����������������������������������������������������������������0000664�0001750�0001750�00000001706�12330516146�014162� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef RADIOGRAM_DEF #define RADIOGRAM_DEF #include "flmsg_dialog.h" #endif ����������������������������������������������������������flmsg-2.0.10/src/include/flslider2.h����������������������������������������������������������������0000664�0001750�0001750�00000004140�12330516146�014076� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // flslider2.h // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_SLIDER2_ #define FL_SLIDER2_ #include <FL/Fl_Slider.H> #include <FL/Fl_Value_Slider.H> #include <FL/Fl_Counter.H> #include <FL/Fl_Value_Input.H> #include <FL/Fl_Spinner.H> class Fl_Slider2 : public Fl_Slider { public: Fl_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Slider2 : public Fl_Value_Slider { public: Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Counter2 : public Fl_Counter { public: Fl_Counter2(int x, int y, int w, int h, const char* l = 0) : Fl_Counter(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Input2 : public Fl_Value_Input { public: Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Input(x, y, w, h, l) { } int handle(int event); }; class Fl_Spinner2 : public Fl_Spinner { public: Fl_Spinner2(int x, int y, int w, int h, const char* l = 0) : Fl_Spinner(x, y, w, h, l) { } int handle(int event); }; #endif // FL_SLIDER2_ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Display_mod_1_1.H��������������������������������������������������0000664�0001750�0001750�00000030107�12330516146�016503� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $" // // Header file for Fl_Text_Display class. // // Copyright 2001-2005 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_TEXT_DISPLAY_MOD_H #define FL_TEXT_DISPLAY_MOD_H #include <FL/fl_draw.H> #include <FL/Fl_Group.H> #include <FL/Fl_Widget.H> #include <FL/Fl_Scrollbar.H> #include "Fl_Text_Buffer_mod.H" class Fl_Text_Display_mod: public Fl_Group { public: enum { NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR, BLOCK_CURSOR, HEAVY_CURSOR }; enum { CURSOR_POS, CHARACTER_POS }; // drag types- they match Fl::event_clicks() so that single clicking to // start a collection selects by character, double clicking selects by // word and triple clicking selects by line. enum { DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 }; friend void fl_text_drag_me(int pos, Fl_Text_Display_mod* d); typedef void (*Unfinished_Style_Cb)(int, void *); // style attributes - currently not implemented! enum { ATTR_NONE = 0, ATTR_UNDERLINE = 1, ATTR_HIDDEN = 2 }; struct Style_Table_Entry { Fl_Color color; Fl_Font font; int size; unsigned attr; }; Fl_Text_Display_mod(int X, int Y, int W, int H, const char *l = 0); ~Fl_Text_Display_mod(); virtual int handle(int e); void buffer(Fl_Text_Buffer_mod* buf); void buffer(Fl_Text_Buffer_mod& buf) { buffer(&buf); } Fl_Text_Buffer_mod* buffer() { return mBuffer; } void redisplay_range(int start, int end); void scroll(int topLineNum, int horizOffset); void insert(const char* text); void overstrike(const char* text); void insert_position(int newPos); int insert_position() { return mCursorPos; } int in_selection(int x, int y); void show_insert_position(); int move_right(); int move_left(); int move_up(); int move_down(); int count_lines(int start, int end, bool start_pos_is_line_start); int line_start(int pos); int line_end(int pos, bool start_pos_is_line_start); int skip_lines(int startPos, int nLines, bool startPosIsLineStart); int rewind_lines(int startPos, int nLines); void next_word(void); void previous_word(void); void show_cursor(int b = 1); void hide_cursor() { show_cursor(0); } void cursor_style(int style); Fl_Color cursor_color() const {return mCursor_color;} void cursor_color(Fl_Color n) {mCursor_color = n;} int scrollbar_width() { return scrollbar_width_; } Fl_Align scrollbar_align() { return scrollbar_align_; } void scrollbar_width(int W) { scrollbar_width_ = W; } void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } int word_start(int pos) { return buffer()->word_start(pos); } int word_end(int pos) { return buffer()->word_end(pos); } void highlight_data(Fl_Text_Buffer_mod *styleBuffer, const Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg); int position_style(int lineStartPos, int lineLen, int lineIndex, int dispIndex); Fl_Font textfont() const {return textfont_;} void textfont(Fl_Font f) {textfont_ = f;} uchar textsize() const {return textsize_;} void textsize(uchar s) {textsize_ = s;} Fl_Color textcolor() const {return (Fl_Color)textcolor_;} void textcolor(unsigned n) {textcolor_ = n;} int wrapped_column(int row, int column); int wrapped_row(int row); void wrap_mode(int wrap, int wrap_margin); virtual void resize(int X, int Y, int W, int H); protected: // Most (all?) of this stuff should only be called from resize() or // draw(). // Anything with "vline" indicates thats it deals with currently // visible lines. virtual void draw(); void draw_text(int X, int Y, int W, int H); void draw_range(int start, int end); void draw_cursor(int, int); void draw_string(int style, int x, int y, int toX, const char *string, int nChars); void draw_vline(int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex); void draw_line_numbers(bool clearAll); void clear_rect(int style, int x, int y, int width, int height); void display_insert(); void offset_line_starts(int newTopLineNum); void calc_line_starts(int startLine, int endLine); void update_line_starts(int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, int *scrolled); void calc_last_char(); int position_to_line( size_t pos, int* lineNum);//int pos, int* lineNum ); int string_width(const char* string, int length, int style); static void scroll_timer_cb(void*); static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); static void buffer_modified_cb(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display_mod* d); static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display_mod* d); void update_v_scrollbar(); void update_h_scrollbar(); int measure_vline(int visLineNum); int longest_vline(); int empty_vlines(); int vline_length(int visLineNum); int xy_to_position(int x, int y, int PosType = CHARACTER_POS); void xy_to_rowcol(int x, int y, int* row, int* column, int PosType = CHARACTER_POS); int position_to_xy(int pos, int* x, int* y); void maintain_absolute_top_line_number(int state); int get_absolute_top_line_number(); void absolute_top_line_number(int oldFirstChar); int maintaining_absolute_top_line_number(); void reset_absolute_top_line_number(); int position_to_linecol(int pos, int* lineNum, int* column); void scroll_(int topLineNum, int horizOffset); void extend_range_for_styles(int* start, int* end); void find_wrap_range(const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted); void measure_deleted_lines(int pos, int nDeleted); void wrapped_line_counter(Fl_Text_Buffer_mod *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine = true); void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd, int *nextLineStart); int measure_proportional_character(char c, int colNum, int pos); int wrap_uses_character(int lineEndPos); int range_touches_selection(Fl_Text_Selection *sel, int rangeStart, int rangeEnd); static const int DEFAULT_TOP_MARGIN; static const int DEFAULT_BOTTOM_MARGIN; static const int DEFAULT_LEFT_MARGIN; static const int DEFAULT_RIGHT_MARGIN; int TOP_MARGIN, BOTTOM_MARGIN, LEFT_MARGIN, RIGHT_MARGIN; int damage_range1_start, damage_range1_end; int damage_range2_start, damage_range2_end; int mCursorPos; int mCursorOn; int mCursorOldY; /* Y pos. of cursor for blanking */ int mCursorToHint; /* Tells the buffer modified callback where to move the cursor, to reduce the number of redraw calls */ int mCursorStyle; /* One of enum cursorStyles above */ int mCursorPreferredCol; /* Column for vert. cursor movement */ int mNVisibleLines; /* # of visible (displayed) lines */ int mNBufferLines; /* # of newlines in the buffer */ Fl_Text_Buffer_mod* mBuffer; /* Contains text to be displayed */ Fl_Text_Buffer_mod* mStyleBuffer; /* Optional parallel buffer containing color and font information */ int mFirstChar, mLastChar; /* Buffer positions of first and last displayed character (lastChar points either to a newline or one character beyond the end of the buffer) */ int mContinuousWrap; /* Wrap long lines when displaying */ int mWrapMargin; /* Margin in # of char positions for wrapping in continuousWrap mode */ int* mLineStarts; int mTopLineNum; /* Line number of top displayed line of file (first line of file is 1) */ int mAbsTopLineNum; /* In continuous wrap mode, the line number of the top line if the text were not wrapped (note that this is only maintained as needed). */ int mNeedAbsTopLineNum; /* Externally settable flag to continue maintaining absTopLineNum even if it isn't needed for line # display */ int mHorizOffset; /* Horizontal scroll pos. in pixels */ int mTopLineNumHint; /* Line number of top displayed line of file (first line of file is 1) */ int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */ int mNStyles; /* Number of entries in styleTable */ const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for coloring/syntax-highlighting */ char mUnfinishedStyle; /* Style buffer entry which triggers on-the-fly reparsing of region */ Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ /* regions */ void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ int mMaxsize; int mFixedFontWidth; /* Font width if all current fonts are fixed and match in width, else -1 */ int mSuppressResync; /* Suppress resynchronization of line starts during buffer updates */ int mNLinesDeleted; /* Number of lines deleted during buffer modification (only used when resynchronization is suppressed) */ int mModifyingTabDistance; /* Whether tab distance is being modified */ Fl_Color mCursor_color; Fl_Scrollbar* mHScrollBar; Fl_Scrollbar* mVScrollBar; int scrollbar_width_; Fl_Align scrollbar_align_; int dragPos, dragType, dragging; int display_insert_position_hint; struct { int x, y, w, h; } text_area; Fl_Font textfont_; uchar textsize_; unsigned textcolor_; // The following are not presently used from the original NEdit code, // but are being put here so that future versions of Fl_Text_Display // can implement line numbers without breaking binary compatibility. int mLineNumLeft, mLineNumWidth; /* Line number margin and width */ }; #endif // // End of "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $". // ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/fileselect.h���������������������������������������������������������������0000664�0001750�0001750�00000002453�12453501576�014343� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of fldigi // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FILESELECT_H #define FILESELECT_H #include <config.h> namespace FSEL { void create(void); void destroy(void); const char* select(const char* title, const char* filter, const char* def = 0, int *fsel = NULL); const char* saveas(const char* title, const char* filter, const char* def = 0, int *fsel = NULL); const char* dir_select(const char* title, const char* filter, const char* def = 0); } #endif // FILESELECT_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Buffer_mod_1_1.H���������������������������������������������������0000664�0001750�0001750�00000026561�12330516146�016320� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $" // // Header file for Fl_Text_Buffer class. // // Copyright 2001-2005 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_TEXT_BUFFER_H #define FL_TEXT_BUFFER_H /* Maximum length in characters of a tab or control character expansion of a single buffer character */ #define FL_TEXT_MAX_EXP_CHAR_LEN 20 #include <FL/Fl_Export.H> class FL_EXPORT Fl_Text_Selection { friend class Fl_Text_Buffer_mod; public: void set(int start, int end); void set_rectangular(int start, int end, int rectStart, int rectEnd); void update(int pos, int nDeleted, int nInserted); char rectangular() { return mRectangular; } int start() { return mStart; } int end() { return mEnd; } int rect_start() { return mRectStart; } int rect_end() { return mRectEnd; } char selected() { return mSelected; } void selected(char b) { mSelected = b; } int includes(int pos, int lineStartPos, int dispIndex); int position(int* start, int* end); int position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd); protected: char mSelected; char mRectangular; int mStart; int mEnd; int mRectStart; int mRectEnd; }; typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); class FL_EXPORT Fl_Text_Buffer_mod { public: Fl_Text_Buffer_mod(int requestedSize = 0); ~Fl_Text_Buffer_mod(); int length() { return mLength; } char* text(); void text(const char* text); char* text_range(int start, int end); char character(int pos); char* text_in_rectangle(int start, int end, int rectStart, int rectEnd); void insert(int pos, const char* text); void append(const char* t) { insert(length(), t); } void remove(int start, int end); void replace(int start, int end, const char *text); void copy(Fl_Text_Buffer_mod* fromBuf, int fromStart, int fromEnd, int toPos); int undo(int *cp=0); void canUndo(char flag=1); int insertfile(const char *file, int pos, int buflen = 128*1024); int appendfile(const char *file, int buflen = 128*1024) { return insertfile(file, length(), buflen); } int loadfile(const char *file, int buflen = 128*1024) { select(0, length()); remove_selection(); return appendfile(file, buflen); } int outputfile(const char *file, int start, int end, int buflen = 128*1024); int savefile(const char *file, int buflen = 128*1024) { return outputfile(file, 0, length(), buflen); } void insert_column(int column, int startPos, const char* text, int* charsInserted, int* charsDeleted); void replace_rectangular(int start, int end, int rectStart, int rectEnd, const char* text); void overlay_rectangular(int startPos, int rectStart, int rectEnd, const char* text, int* charsInserted, int* charsDeleted); void remove_rectangular(int start, int end, int rectStart, int rectEnd); void clear_rectangular(int start, int end, int rectStart, int rectEnd); int tab_distance() { return mTabDist; } void tab_distance(int tabDist); void select(int start, int end); int selected() { return mPrimary.selected(); } void unselect(); void select_rectangular(int start, int end, int rectStart, int rectEnd); int selection_position(int* start, int* end); int selection_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd); char* selection_text(); void remove_selection(); void replace_selection(const char* text); void secondary_select(int start, int end); int secondary_selected() { return mSecondary.selected(); } void secondary_unselect(); void secondary_select_rectangular(int start, int end, int rectStart, int rectEnd); int secondary_selection_position(int* start, int* end); int secondary_selection_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd); char* secondary_selection_text(); void remove_secondary_selection(); void replace_secondary_selection(const char* text); void highlight(int start, int end); int highlight() { return mHighlight.selected(); } void unhighlight(); void highlight_rectangular(int start, int end, int rectStart, int rectEnd); int highlight_position(int* start, int* end); int highlight_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd); char* highlight_text(); void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg); void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg); void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } char* line_text(int pos); int line_start(int pos); int line_end(int pos); int word_start(int pos); int word_end(int pos); int expand_character(int pos, int indent, char *outStr); static int expand_character(char c, int indent, char* outStr, int tabDist, char nullSubsChar); static int character_width(char c, int indent, int tabDist, char nullSubsChar); int count_displayed_characters(int lineStartPos, int targetPos); int skip_displayed_characters(int lineStartPos, int nChars); int count_lines(int startPos, int endPos); int skip_lines(int startPos, int nLines); int rewind_lines(int startPos, int nLines); int findchar_forward(int startPos, char searchChar, int* foundPos); int findchar_backward(int startPos, char searchChar, int* foundPos); int findchars_forward(int startPos, const char* searchChars, int* foundPos); int findchars_backward(int startPos, const char* searchChars, int* foundPos); int search_forward(int startPos, const char* searchString, int* foundPos, int matchCase = 0); int search_backward(int startPos, const char* searchString, int* foundPos, int matchCase = 0); int substitute_null_characters(char* string, int length); void unsubstitute_null_characters(char* string); char null_substitution_character() { return mNullSubsChar; } Fl_Text_Selection* primary_selection() { return &mPrimary; } Fl_Text_Selection* secondary_selection() { return &mSecondary; } Fl_Text_Selection* highlight_selection() { return &mHighlight; } protected: void call_modify_callbacks(int pos, int nDeleted, int nInserted, int nRestyled, const char* deletedText); void call_predelete_callbacks(int pos, int nDeleted); int insert_(int pos, const char* text); void remove_(int start, int end); void remove_rectangular_(int start, int end, int rectStart, int rectEnd, int* replaceLen, int* endPos); void insert_column_(int column, int startPos, const char* insText, int* nDeleted, int* nInserted, int* endPos); void overlay_rectangular_(int startPos, int rectStart, int rectEnd, const char* insText, int* nDeleted, int* nInserted, int* endPos); void redisplay_selection(Fl_Text_Selection* oldSelection, Fl_Text_Selection* newSelection); void move_gap(int pos); void reallocate_with_gap(int newGapStart, int newGapLen); char* selection_text_(Fl_Text_Selection* sel); void remove_selection_(Fl_Text_Selection* sel); void replace_selection_(Fl_Text_Selection* sel, const char* text); void rectangular_selection_boundaries(int lineStartPos, int rectStart, int rectEnd, int* selStart, int* selEnd); void update_selections(int pos, int nDeleted, int nInserted); Fl_Text_Selection mPrimary; /* highlighted areas */ Fl_Text_Selection mSecondary; Fl_Text_Selection mHighlight; int mLength; /* length of the text in the buffer (the length of the buffer itself must be calculated: gapEnd - gapStart + length) */ char* mBuf; /* allocated memory where the text is stored */ int mGapStart; /* points to the first character of the gap */ int mGapEnd; /* points to the first char after the gap */ // The hardware tab distance used by all displays for this buffer, // and used in computing offsets for rectangular selection operations. int mTabDist; /* equiv. number of characters in a tab */ int mUseTabs; /* True if buffer routines are allowed to use tabs for padding in rectangular operations */ int mNModifyProcs; /* number of modify-redisplay procs attached */ Fl_Text_Modify_Cb* /* procedures to call when buffer is */ mNodifyProcs; /* modified to redisplay contents */ void** mCbArgs; /* caller arguments for modifyProcs above */ int mNPredeleteProcs; /* number of pre-delete procs attached */ Fl_Text_Predelete_Cb* /* procedure to call before text is deleted */ mPredeleteProcs; /* from the buffer; at most one is supported. */ void **mPredeleteCbArgs; /* caller argument for pre-delete proc above */ int mCursorPosHint; /* hint for reasonable cursor position after a buffer modification operation */ char mNullSubsChar; /* NEdit is based on C null-terminated strings, so ascii-nul characters must be substituted with something else. This is the else, but of course, things get quite messy when you use it */ char mCanUndo; /* if this buffer is used for attributes, it must not do any undo calls */ }; #endif // // End of "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $". // �����������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/cap.h����������������������������������������������������������������������0000664�0001750�0001750�00000001706�12330516146�012760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef RADIOGRAM_DEF #define RADIOGRAM_DEF #include "flmsg_dialog.h" #endif ����������������������������������������������������������flmsg-2.0.10/src/include/ext_string.h���������������������������������������������������������������0000664�0001750�0001750�00000002173�12330516146�014402� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef __EXT_STRING__ #define __EXT_STRING__ #include <string> #include <string.h> class extstring : public std::string { public: extstring() {} ~extstring() {} size_t ufind(std::string needle, size_t pos); void ureplace(std::string needle); }; #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/templates.h����������������������������������������������������������������0000664�0001750�0001750�00000007323�12330516146�014214� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _TEMPLATES_H #define _TEMPLATES_H extern const char cap105_html_template[]; extern const char cap105_txt_template[]; extern const char cap110_html_template[]; extern const char cap110_text_template[]; extern const char ics203_html_template[]; extern const char ics203_text_template[]; extern const char ics205_html_template[]; extern const char ics205_text_template[]; extern const char ics205a_html_template[]; extern const char ics205a_text_template[]; extern const char ics206_html_template[]; extern const char ics206_text_template[]; extern const char ics213_html_template[]; extern const char ics213_text_template[]; extern const char ics214_html_template[]; extern const char ics214_text_template[]; extern const char ics216_html_template[]; extern const char ics216_text_template[]; extern const char ics309_html_template[]; extern const char ics309_text_template[]; extern const char hics203_html_template[]; extern const char hics203_text_template[]; extern const char hics206_html_template[]; extern const char hics206_text_template[]; extern const char hics213_html_template[]; extern const char hics213_text_template[]; extern const char hics214_html_template[]; extern const char hics214_text_template[]; extern const char rg_html_template[]; extern const char rg_html_fcopy_template[]; extern const char rg_txt_template[]; extern const char rg_css[]; extern const char iaru_html_template[]; extern const char iaru_txt_template[]; extern const char pt_html_template[]; extern const char pt_txt_template[]; extern const char blank_html_template[]; extern const char blank_txt_template[]; extern const char csv_html_template[]; extern const char csv_txt_template[]; extern const char custom_html_template[]; extern const char custom_txt_template[]; extern const char baddata_html_template[]; extern const char mars_daily_html_template[]; extern const char mars_daily_text_template[]; extern const char mars_ineei_html_template[]; extern const char mars_ineei_text_template[]; extern const char mars_net_html_template[]; extern const char mars_net_text_template[]; extern const char mars_army_html_template[]; extern const char mars_army_text_template[]; extern const char mars_navy_html_template[]; extern const char mars_navy_text_template[]; extern const char redx_snw_html_template[]; extern const char redx_snw_text_template[]; extern const char redx_5739_html_template[]; extern const char redx_5739_text_template[]; extern const char redx_5739A_html_template[]; extern const char redx_5739A_text_template[]; extern const char redx_5739B_html_template[]; extern const char redx_5739B_text_template[]; extern const char wxhc_html_template[]; extern const char wxhc_text_template[]; extern const char severe_wx_html_template[]; extern const char severe_wx_text_template[]; extern const char storm_html_template[]; extern const char storm_text_template[]; #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/gettext.h������������������������������������������������������������������0000664�0001750�0001750�00000024420�12330516146�013677� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- /* Convenience header for conditional use of GNU <libintl.h>. Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include <libintl.h> /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <locale.h> a NOP. We don't include <libintl.h> as well because people using "gettext.h" will not include <libintl.h>, and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> is OK. */ #if defined(__sun) # include <locale.h> #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include <libintl.h>, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <libintl.h> a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include <cstdlib> # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include <libintl.h> # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include <string.h> #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include <stdlib.h> #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #if ENABLE_NLS #define _(String) gettext (String) #define N_(String) gettext_noop (String) #else #define _(String) (String) #define N_(String) String #endif #if ENABLE_NLS int setup_nls(void); unused__ static const int nls_init_ = setup_nls(); #endif #endif /* _LIBGETTEXT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/plaintext.h����������������������������������������������������������������0000664�0001750�0001750�00000002550�12330516146�014223� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef PLAINTEXT_DEF #define PLAINTEXT_DEF #include "flmsg_dialog.h" /* Fl_Group *tab_plaintext = (Fl_Group *)0; Fl_Input2 *txt_pt_title = (Fl_Input2 *)0; Fl_Input2 *txt_pt_to = (Fl_Input2 *)0; Fl_Input2 *txt_pt_fm = (Fl_Input2 *)0; Fl_Input2 *txt_pt_subj = (Fl_Input2 *)0; FTextEdit *txt_pt_msg = (FTextEdit *)0; Fl_DateInput *txt_pt_date = (Fl_DateInput *)0; Fl_Button *btn_pt_date = (Fl_Button *)0; Fl_Input2 *txt_pt_time = (Fl_Input2 *)0; Fl_Button *btn_pt_time = (Fl_Button *)0; */ #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/date.h���������������������������������������������������������������������0000664�0001750�0001750�00000006365�12330516146�013140� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*-C++-*- "$Id: Fl_Date.H,v 1.4 2000/03/30 04:43:56 davefreese Exp $" Copyright 1999-2000 by the Dave Freese & the Flek development team. */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef DATE_H #define DATE_H #include <iosfwd> typedef enum { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } weekday_t; typedef enum { JANUARY = 1, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER } month_t; class Date { friend std::ostream &operator<<(std::ostream &, Date &); protected: int year; int month; int day; int fmt; static const int mdays[]; static const int jdays[][13]; static const char *month_name[]; void helpIncrement(); public: Date(); Date( int m, int d, int y ); void setDate( int, int, int ); // set the date void setDate( Date & ); void setFormat (int); void today(); // set date to the present day void Year( int ); int Year(); void Month( int ); int Month(); void Day( int ); int Day(); void previous_month (); void next_month (); void previous_year (); void next_year (); bool endOfMonth( int ); bool leapYear (int); bool leapYear () { return leapYear (year); } bool isleapyear (int year) { return leapYear (year); } bool isleapyear () { return isleapyear (year); } int daysinmonth (int, int); int daysinmonth () { return daysinmonth (month, isleapyear (year)); } bool isvalid (int, int, int); bool datevalid (int year, int mon, int day) { return isvalid (mon, day, year); } bool datevalid () { return isvalid (month, day, year); } int dayofyear (int, int, int); int dayofyear () { return dayofyear (year, month, day); } int dayofepoch (int, int, int); int dayofepoch () { return dayofepoch (year, month, day); } int dayofweek (int, int, int); int dayofweek () { return dayofweek (year, month, day); } char *szDate (int); char *szDate (); double dJulian (); bool operator==( const Date & ); bool operator!=( const Date & ); bool operator<( const Date & ); bool operator>( const Date & ); void operator=( const Date & ); const Date &operator+=( int); // add days, modify object Date &operator++(); // pre-increment operator Date operator++( int ); // post-increment operator }; extern bool date_local_; #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/debug.h��������������������������������������������������������������������0000664�0001750�0001750�00000007230�12330516146�013301� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // debug.h // // Copyright (C) 2008, 2012 // Stelios Bounanos, M0GLD; Dave Freese, W1HKJ // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _DEBUG_H_ #define _DEBUG_H_ #include "util.h" class debug { public: enum level_e { QUIET_LEVEL, ERROR_LEVEL, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL, LOG_NLEVELS }; enum source_e { LOG_RIGCONTROL = 1 << 0, LOG_RPC = 1 << 1, LOG_OTHER = 1 << 2 }; static void start(const char* filename); static void stop(void); static void log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void elog(const char* func, const char* srcf, int line, const char* text); static void show(void); static level_e level; static uint32_t mask; private: static void sync_text(void*); debug(const char* filename); debug(const debug&); debug& operator=(const debug&); ~debug(); static debug* inst; }; #define LOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::log(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define LOG_DEBUG(...) LOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define LOG_INFO(...) LOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define LOG_WARN(...) LOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define LOG_ERROR(...) LOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define LOG_QUIET(...) LOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define SLOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::slog(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define SLOG_DEBUG(...) SLOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define SLOG_INFO(...) SLOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define SLOG_WARN(...) SLOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define SLOG_ERROR(...) SLOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define SLOG_QUIET(...) SLOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define LOG_PERROR(msg__) \ do { \ if (debug::ERROR_LEVEL <= debug::level && log_source_ & debug::mask) \ debug::elog(__func__, __FILE__, __LINE__, msg__); \ } while (0) unused__ static uint32_t log_source_ = debug::LOG_OTHER; #if defined(__GNUC__) && (__GNUC__ >= 3) # define LOG_FILE_SOURCE(source__) \ __attribute__((constructor)) \ static void log_set_source_(void) { log_source_ = source__; } #else # define LOG_FILE_SOURCE(source__) #endif #define LOG_SET_SOURCE(source__) log_source_ = source__ #endif // _DEBUG_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/icons.h��������������������������������������������������������������������0000664�0001750�0001750�00000002357�12431375020�013327� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef ICONS_H_ #define ICONS_H_ #define USE_IMAGE_LABELS 1 #include <FL/Fl_Widget.H> #include <FL/Fl_Menu_Item.H> #include <FL/fl_ask.H> #include "pixmaps.h" namespace icons { const char* make_icon_label(const char* text, const char** pixmap = 0); void set_icon_label(Fl_Menu_Item* item); void set_icon_label(Fl_Widget* w); void toggle_icon_labels(void); const char* get_icon_label_text(Fl_Menu_Item* item); const char* get_icon_label_text(Fl_Widget* w); void free_icon_label(Fl_Menu_Item* item); void free_icon_label(Fl_Widget* w); void set_active(Fl_Menu_Item* item, bool v); void set_active(Fl_Widget* w, bool v); // fltk message dialogs with nicer icons void set_message_icon(const char** pixmap); } #define fl_input2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_input(__VA_ARGS__); }) #define fl_choice2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_choice(__VA_ARGS__); }) #define fl_message2(...) ({ icons::set_message_icon(dialog_information_48_icon); fl_message(__VA_ARGS__); }) #define fl_alert2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_alert(__VA_ARGS__); }) #define fl_warn_choice2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_choice(__VA_ARGS__); }) #endif // ICONS_H_ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/missing_strings.h����������������������������������������������������������0000664�0001750�0001750�00000007132�12431375020�015432� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- /* * "$Id: flstring.h 4660 2005-11-27 14:45:48Z mike $" * * Common string header file for the Fast Light Tool Kit (FLTK). * versions < 1.3.x * * Copyright 1998-2005 by Bill Spitzak and others. */ #ifndef flstring_h # define flstring_h #include <config.h> // versions of FLTK < 1.3.2 do not contain fl_string #if (FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 ) || \ (FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 && FLMSG_FLTK_API_PATCH < 1) # include <FL/Fl_Export.H> # include <config.h> # include <stdio.h> # include <stdarg.h> # include <string.h> # ifdef HAVE_STRINGS_H # include <strings.h> # endif /* HAVE_STRINGS_H */ # include <ctype.h> /* * Apparently Unixware defines "index" to strchr (!) rather than * providing a proper entry point or not providing the (obsolete) * BSD function. Make sure index is not defined... */ # ifdef index # undef index # endif /* index */ # if defined(WIN32) && !defined(__CYGWIN__) # define strcasecmp(s,t) _stricmp((s), (t)) # define strncasecmp(s,t,n) _strnicmp((s), (t), (n)) // Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs // on Windows, which is supposed to be POSIX compliant... Some of these functions // are also defined in ISO C99... # define strdup _strdup # define unlink _unlink # elif defined(__EMX__) # define strcasecmp(s,t) stricmp((s), (t)) # define strncasecmp(s,t,n) strnicmp((s), (t), (n)) # endif /* WIN32 */ # ifdef __cplusplus extern "C" { # endif /* __cplusplus */ /* * MetroWerks' CodeWarrior put thes "non-standard" functions in * <extras.h> which unfortunatly does not play well otherwise * when included - to be resolved... */ # if defined(__APPLE__) && defined(__MWERKS__) && defined(_MSL_USING_MW_C_HEADERS) int strcasecmp(const char*,const char*); int strncasecmp(const char*,const char*,int); char *strdup(const char*); # endif FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); # if !HAVE_SNPRINTF # define snprintf fl_snprintf # endif /* !HAVE_SNPRINTF */ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); # if !HAVE_VSNPRINTF # define vsnprintf fl_vsnprintf # endif /* !HAVE_VSNPRINTF */ /* * strlcpy() and strlcat() are some really useful BSD string functions * that work the way strncpy() and strncat() *should* have worked. */ FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t); # if !HAVE_STRLCAT # define strlcat fl_strlcat # endif /* !HAVE_STRLCAT */ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t); # if !HAVE_STRLCPY # define strlcpy fl_strlcpy # endif /* !HAVE_STRLCPY */ # ifdef __cplusplus } # endif /* __cplusplus */ #endif /* < FLTK < 1.3.0 */ #endif /* !flstring_h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/arl_msgs.h�����������������������������������������������������������������0000664�0001750�0001750�00000002106�12330516146�014017� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef ARL_MSGS_H #define ARL_MSGS_H #include <string.h> struct ARL_TEXT { const char *sznbr; int nfills; const char *text; }; extern ARL_TEXT arl_list[]; std::string expand_arl(std::string &); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/combo.h��������������������������������������������������������������������0000664�0001750�0001750�00000007633�12330516146�013321� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _FL_COMBOBOX_H #define _FL_COMBOBOX_H #include <string> #include <FL/Fl_Window.H> #include <FL/Fl_Group.H> #include <FL/Fl_Button.H> #include <FL/Fl_Select_Browser.H> #include <FL/Fl_Input.H> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Box.H> #define FL_COMBO_UNIQUE 1 #define FL_COMBO_UNIQUE_NOCASE 2 #define FL_COMBO_LIST_INCR 100 class Fl_ComboBox; enum {COMBOBOX, LISTBOX}; struct datambr { char *s; void *d; }; class Fl_PopBrowser : public Fl_Window { friend void popbrwsr_cb(Fl_Widget *, long); Fl_Select_Browser *popbrwsr; int hRow; int wRow; std::string keystrokes; public: Fl_PopBrowser (int x, int y, int w, int h, const char *label); ~Fl_PopBrowser (); void popshow (int, int); void pophide (); void popbrwsr_cb_i (Fl_Widget *, long); void add (char *s, void *d = 0); void clear (); void sort (); int handle (int); void clear_kbd() { keystrokes.clear(); } Fl_ComboBox *parentCB; Fl_Widget *parentWindow; }; class Fl_ComboBox : public Fl_Group { friend int DataCompare (const void *, const void *); friend class Fl_PopBrowser; Fl_Button *btn; Fl_Box *valbox; Fl_Input *val; Fl_PopBrowser *Brwsr; datambr **datalist; int listsize; int maxsize; int listtype; int numrows_; int type_; int width; int height; void *retdata; int idx; Fl_Color _color; void insert(const char *, void *); public: Fl_ComboBox (int x, int y, int w, int h, const char *lbl = 0, int wtype = COMBOBOX); ~Fl_ComboBox(); const char *value (); void value (const char *); void put_value( const char *); void fl_popbrwsr(Fl_Widget *); void type (int = 0); void add (const char *s, void *d = 0); void clear (); void sort (); int index (); void index (int i); void *data (); void textfont (int); void textsize (uchar); void textcolor (Fl_Color c); void color (Fl_Color c); void readonly(bool yes = true); int numrows() { return numrows_; } void numrows(int n) { numrows_ = n; } int lsize() { return listsize; } void set_focus() { Fl::focus(btn); }; void labelfont(Fl_Font fnt) { Fl_Group::labelfont(fnt); } Fl_Font labelfont() { return Fl_Group::labelfont(); } void labelsize(Fl_Fontsize n) { Fl_Group::labelsize(n); } Fl_Fontsize labelsize() { return Fl_Group::labelsize(); } int handle(int); // Custom resize behavior -- input stretches, button doesn't inline int val_x() { return x(); } inline int val_y() { return y(); } inline int val_w() { return w() - h(); } inline int val_h() { return h(); } inline int btn_x() { return x() + w() - h(); } inline int btn_y() { return y(); } inline int btn_w() { return h(); } inline int btn_h() { return h(); } void resize(int X, int Y, int W, int H) { Fl_Group::resize(X,Y,W,H); if (type_ == LISTBOX) valbox->resize(val_x(), val_y(), val_w(), val_h()); else val->resize(val_x(), val_y(), val_w(), val_h()); btn->resize(btn_x(), btn_y(), btn_w(), btn_h()); } }; class Fl_ListBox : public Fl_ComboBox { public: Fl_ListBox (int x, int y, int w, int h, const char *lbl = 0) : Fl_ComboBox(x,y,w,h,lbl,LISTBOX) {}; ~Fl_ListBox() {}; }; #endif �����������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/socket.h�������������������������������������������������������������������0000664�0001750�0001750�00000010054�12330516146�013501� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // socket.h // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef SOCKET_H_ #define SOCKET_H_ #include <config.h> #include <sys/time.h> #ifndef __MINGW32__ # include <sys/socket.h> # include <netdb.h> # include <netinet/in.h> #else # include <winsock2.h> #endif #include <string> #include <exception> #include <cstring> class SocketException : public std::exception { public: SocketException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { } SocketException(const char* msg_) : err(1), msg(msg_) { } SocketException(int err_, const std::string& prefix) : err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { } virtual ~SocketException() throw() { } const char* what(void) const throw() { return msg.c_str(); } int error(void) const { return err; } protected: const char* err_to_str(int e) { #if HAVE_GETADDRINFO if (e < 0) return gai_strerror(e); else #endif return strerror(e); } int err; std::string msg; }; #if HAVE_GETADDRINFO typedef struct addrinfo addr_info_t; #else struct addr_info_t { int ai_family; int ai_socktype; int ai_protocol; int ai_addrlen; struct sockaddr* ai_addr; }; #endif class Address { public: Address(const char* host = "", int port = 0, const char* proto_name = "tcp"); Address(const char* host, const char* port_name, const char* proto_name = "tcp"); Address(const Address& addr); ~Address(); Address& operator=(const Address& rhs); size_t size(void) const; const addr_info_t* get(size_t n = 0) const; static std::string get_str(const addr_info_t* addr); private: void lookup(const char* proto_name); std::string node; std::string service; int port; #if HAVE_GETADDRINFO struct addrinfo* info; #else struct hostent host_entry; struct servent service_entry; mutable addr_info_t addr; mutable struct sockaddr_in saddr; #endif bool copied; }; class Socket { public: Socket(const Address& addr); Socket(int fd = -1); Socket(const Socket& s); ~Socket(); Socket& operator=(const Socket& rhs); void open(const Address& addr); void close(void); bool wait(int dir); // Server void bind(void); void listen(int backlog = SOMAXCONN); Socket accept(void); Socket accept1(void); // Client void connect(const Address& addr); void connect(void); // Data Transimission size_t send(const void* buf, size_t len); size_t send(const std::string& buf); size_t recv(void* buf, size_t len); size_t recv(std::string& buf); // Options int get_bufsize(int dir); void set_bufsize(int dir, int len); void set_nonblocking(bool v = true); void set_nodelay(bool v = true); void set_timeout(const struct timeval& t); void set_timeout(double t); void set_autoclose(bool v) const; void set_close_on_exec(bool v, int fd = -1); int fd(void); private: int sockfd; Address address; size_t anum; const addr_info_t* ainfo; char* buffer; struct timeval timeout; bool nonblocking; mutable bool autoclose; }; #endif // SOCKET_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/csv.h����������������������������������������������������������������������0000664�0001750�0001750�00000002015�12330516146�013002� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef CSV_DEF #define CSV_DEF #include "flmsg_dialog.h" /* Fl_Group *tab_csv = (Fl_Group *)0; FTextEdit *txt_csv_msg = (FTextEdit *)0; */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/pixmaps.h������������������������������������������������������������������0000664�0001750�0001750�00000006473�12330516146�013704� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef PIXMAPS_H_ #define PIXMAPS_H_ extern const char *address_book_icon[]; extern const char *edit_undo_icon[]; extern const char *edit_select_all_icon[]; extern const char *edit_clear_icon[]; extern const char *edit_copy_icon[]; extern const char *edit_cut_icon[]; extern const char *edit_paste_icon[]; extern const char *file_open_icon[]; extern const char *format_indent_more_icon[]; extern const char *left_arrow_icon[]; extern const char *log_out_icon[]; extern const char *minus_icon[]; extern const char *net_icon[]; extern const char *plus_icon[]; extern const char *process_stop_icon[]; extern const char *right_arrow_icon[]; extern const char *save_as_icon[]; extern const char *save_icon[]; extern const char *time_icon[]; extern const char *trash_icon[]; extern const char *image_icon[]; extern const char *weather_clear_icon[]; extern const char *start_here_icon[]; extern const char *help_browser_icon[]; extern const char *system_search_icon[]; extern const char *system_software_update_icon[]; extern const char *utilities_terminal_icon[]; extern const char *emblem_symbolic_link_icon[]; extern const char *emblems_system_icon[]; extern const char *dialog_information_icon[]; extern const char *executable_icon[]; extern const char *other_icon[]; extern const char *folder_open_icon[]; extern const char *preferences_system_icon[]; extern const char *preferences_desktop_font_icon[]; extern const char *system_users_icon[]; extern const char *utilities_system_monitor_icon[]; extern const char *multimedia_player_icon[]; extern const char *chat_icon[]; extern const char *dialog_information_48_icon[]; extern const char *dialog_warning_48_icon[]; extern const char *refresh_icon[]; extern const char *text_editor_icon[]; extern const char *text_icon[]; extern const char *shutdown_icon[]; extern const char *applications_system_icon[]; extern const char *audio_card_icon[]; extern const char *help_about_icon[]; extern const char *insert_link_icon[]; extern const char *close_icon[]; extern const char *enter_key_icon[]; extern const char *dialog_question_48_icon[]; extern const char *clear_sq_icon[]; extern const char *clear_row_icon[]; extern const char *rx1_icon[]; extern const char *tx1_icon[]; extern const char *rx2_icon[]; extern const char *tx2_icon[]; extern const char *rx_icon[]; extern const char *tx_icon[]; extern const char *waterfall_icon[]; extern const char *dice_icon[]; extern const char *pskr_icon[]; extern const char *flmsg_icon[]; #endif // PIXMAPS_H_ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/base64.h�������������������������������������������������������������������0000664�0001750�0001750�00000002456�12330516146�013304� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string> using namespace std; typedef unsigned char byte; class base64 { #define LINELEN 64 private: string output; size_t iolen; size_t iocp; bool ateof; byte dtable[256]; byte etable[256]; int linelength; bool crlf; void init(); public: base64(bool t = false) {crlf = t; init(); }; ~base64(){}; string encode(string in); string decode(string in); }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flinput2.h�����������������������������������������������������������������0000664�0001750�0001750�00000002120�12330516146�013747� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_INPUT2_ #define FL_INPUT2_ #include <FL/Fl_Input.H> class Fl_Input2 : public Fl_Input { public: Fl_Input2(int x, int y, int w, int h, const char* l = 0); int handle(int event); }; #endif // FL_INPUT2_ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/parse_xml.h����������������������������������������������������������������0000664�0001750�0001750�00000002352�12330516146�014205� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef XML_H #define XML_H #include <string> #include <list> using namespace std; struct TAGS { const char *tag; void (*fp)(size_t &, string);}; extern void parse_ics(string); extern bool qform_ics_import(string); extern void qform_ics_export(string); extern void parse_rg(string); extern bool qform_rg_import(string); extern void qform_rg_export(string); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/calendar.h�����������������������������������������������������������������0000664�0001750�0001750�00000007063�12330516146�013770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*-C++-*- "$Id: Fl_Calendar.H,v 1.4 2000/02/13 04:43:56 jamespalmer Exp $" Copyright 1999-2010 by the Flek development team. */ // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _FL_CALENDAR_H #define _FL_CALENDAR_H #include <FL/Fl_Window.H> #include <FL/Fl_Group.H> #include <FL/Fl_Button.H> #include <FL/Fl_Box.H> #include "flinput2.h" #include "date.h" class Fl_Calendar_Base : public Fl_Group , public Date { private: protected: int cal_x; int cal_y; int cal_w; int cal_h; Fl_Button * days[6*7]; public: Fl_Widget *target; int calfmt; /** * The constructor for an empty Fl_Calendar_Base. */ Fl_Calendar_Base (int x, int y, int w = (7*20), int h = (6*20), const char *l = 0); Fl_Button * day_button (int i); void update (); void csize (int cx, int cy, int cw, int ch); void setTarget (Fl_Widget *tgt); }; class Fl_Calendar : public Fl_Calendar_Base { public: /** * The constructor for an empty Fl_Calendar. */ Fl_Calendar (int x, int y, int w = (7*20), int h = (8*20), const char *l = 0); void today (); void previous_month (); void next_month (); void previous_year (); void next_year (); void setDate (int, int, int); void update (); void csize (int cx, int cy, int cw, int ch); int handle (int); void local_datetime() { use_local = true; } protected: // Fl_Button * weekdays[7]; // Fl_Button * caption; Fl_Box * weekdays[7]; Fl_Box * caption; Fl_Button * nxt_month; Fl_Button * prv_month; Fl_Button * nxt_year; Fl_Button * prv_year; bool use_local; }; class Fl_PopCal : public Fl_Window { friend void popcal_cb(Fl_Widget *, long); protected: int popcalfmt_; // Fl_Window popcal_form; Fl_Calendar *popcal; Fl_Input2 *target; public: Fl_PopCal (int x, int y, int w, int h, Fl_Input2 *inp = 0); ~Fl_PopCal (); void popposition (int, int); void popshow (); void pophide (); void popcal_cb_i (Fl_Widget *, long); void popcalfmt (int); int popcalfmt (); int handle (int); void setDate (int, int, int); }; class Fl_DateInput : public Fl_Group { protected: Fl_Button *Btn; Fl_Input2 *Input; Fl_PopCal *Cal; Fl_Window *popcal_form; Fl_Calendar *popcal; int popcalfmt_; bool use_local; void makepopcal(); public: Fl_DateInput (int x, int y, int w, int h, const char * = 0); void format (int); const char *value (); void value (const char *); void textfont (int); void textsize (int); void labelfont (int); void labelsize (int); void labelcolor (int); void align (Fl_Align); void fl_popcal(); void take_focus(); void local_datetime(bool val = true) { use_local = val; } }; #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/ascii.h��������������������������������������������������������������������0000664�0001750�0001750�00000002052�12330516146�013300� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef ASCII_H #define ASCII_H extern const char *ascii[]; extern const char *ascii2[]; #define SOH 0x01 // SOH ascii character #define EOT 0x04 // EOT ascii character #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/transfer.h�����������������������������������������������������������������0000664�0001750�0001750�00000002365�12330516146�014043� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _TRANSFER_ #define _TRANSFER_ #include <FL/Fl_Output.H> #include <FL/Fl_Button.H> extern Fl_Group *tab_transfer; extern Fl_Output *txt_send_filename; extern Fl_Output *txt_rcvd_filename; extern Fl_Button *btn_select_send; extern Fl_Button *btn_save_rcvd; extern string def_transfer_filename; extern void create_transfer_tab(); extern void clear_transfer_form(); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/dirent-check.h�������������������������������������������������������������0000664�0001750�0001750�00000002545�12330516146�014557� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef DIRENT_CHECK_H #define DIRENT_CHECK_H // this tests depends on a modified FL/filename.H in the Fltk-1.3.0 // change //# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) // to //# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) && !defined(__WOE32__) #ifdef __MINGW32__ # if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # undef dirent # include <dirent.h> # else # include <dirent.h> # endif #else # include <dirent.h> #endif #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flmsg_config.h�������������������������������������������������������������0000664�0001750�0001750�00000005710�12330516146�014651� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FLMSG_CONFIG_H_ #define FLMSG_CONFIG_H_ #define DATAFILE_EXT ".f2s" #define DATATEMP_EXT ".f2t" #define F203_EXT ".203" #define T203_EXT ".203T" #define F205_EXT ".205" #define T205_EXT ".205T" #define F205A_EXT ".25A" #define T205A_EXT ".25T" #define F206_EXT ".206" #define T206_EXT ".206T" #define F213_EXT ".213" #define T213_EXT ".213T" #define F214_EXT ".214" #define T214_EXT ".214T" #define F216_EXT ".216" #define T216_EXT ".216T" #define F309_EXT ".309" #define T309_EXT ".309T" #define HF203_EXT ".H203" #define HT203_EXT ".H203T" #define HF206_EXT ".H206" #define HT206_EXT ".H206T" #define HF213_EXT ".H213" #define HT213_EXT ".H213T" #define HF214_EXT ".H214" #define HT214_EXT ".H214T" #define RGFILE_EXT ".m2s" #define RGTEMP_EXT ".m2t" #define IARU_FILE_EXT ".i2s" #define IARU_TEMP_EXT ".i2t" #define PTFILE_EXT ".p2s" #define PTTEMP_EXT ".p2t" #define BLANKFILE_EXT ".b2s" #define BLANKTEMP_EXT ".b2t" #define CSVFILE_EXT ".c2s" #define CSVTEMP_EXT ".c2t" #define CUSTOMFILE_EXT ".k2s" #define CUSTOMTEMP_EXT ".k2t" #define FMARSDAILY_EXT ".mds" #define TMARSDAILY_EXT ".mdt" #define FMARSINEEI_EXT ".mis" #define TMARSINEEI_EXT ".mit" #define FMARSNET_EXT ".mns" #define TMARSNET_EXT ".mnt" #define FMARSARMY_EXT ".nas" #define TMARSARMY_EXT ".nat" #define FMARSNAVY_EXT ".nns" #define TMARSNAVY_EXT ".nnt" #define FREDXSNW_EXT ".sws" #define TREDXSNW_EXT ".swt" #define FREDX5739_EXT ".39s" #define TREDX5739_EXT ".39t" #define FREDX5739A_EXT ".3as" #define TREDX5739A_EXT ".3at" #define FREDX5739B_EXT ".3bs" #define TREDX5739B_EXT ".3bt" #define FWXHC_EXT ".w2s" #define TWXHC_EXT ".w2t" #define FSWX_EXT ".s2s" #define TSWX_EXT ".s2t" #define FSTRM_EXT ".fstm2s" #define TSTRM_EXT ".tstm2s" #define CAP105_FILE_EXT ".c105F" #define CAP105_TEMP_EXT ".c105T" #define CAP110_FILE_EXT ".c110F" #define CAP110_TEMP_EXT ".c110T" #define TRANSFER_EXT ".xfr" #define WRAP_EXT ".wrap" #endif ��������������������������������������������������������flmsg-2.0.10/src/include/blank.h��������������������������������������������������������������������0000664�0001750�0001750�00000002025�12330516146�013277� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef BLANK_DEF #define BLANK_DEF #include "flmsg_dialog.h" /* Fl_Group *tab_blank = (Fl_Group *)0; FTextEdit *txt_blank_msg = (FTextEdit *)0; */ #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/fl_lock.h������������������������������������������������������������������0000664�0001750�0001750�00000005556�12330516146�013635� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // fl_lock.h // // Copyright (C) 2007 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FL_LOCK_H_ #define FL_LOCK_H_ // disabled calls #define FL_LOCK_D(x) ((void)0) #define FL_UNLOCK_D(x) ((void)0) #define FL_AWAKE_D(x) ((void)0) // enabled calls #define FL_LOCK_E(x) FL_LOCK(x) #define FL_UNLOCK_E(x) FL_UNLOCK(x) #define FL_AWAKE_E(x) FL_AWAKE(x) #if !defined(NDEBUG) && !defined(NO_LOCKS) # include <FL/Fl.H> #endif #ifdef NDEBUG # define FL_LOCK(x) Fl::lock(x) # define FL_UNLOCK(x) Fl::unlock(x) # define FL_AWAKE(x) Fl::awake(x) #else // debugging # include <stacktrace.h> # ifndef NO_LOCKS # include "debug.h" # define FL_LOCK(x) \ do { \ switch (GET_THREAD_ID()) { \ case TRX_TID: \ LOG_ERROR("trx lock"); \ break; \ case FLMAIN_TID: \ LOG_WARN("flrun lock"); \ break; \ default: \ LOG_VERBOSE("lock"); \ } \ pstack_maybe(); \ Fl::lock(x); \ } while (0); # define FL_UNLOCK(x) Fl::unlock(x) # define FL_AWAKE(x) Fl::awake(x) # else // no locks # define FL_LOCK(x) ((void)0) # define FL_UNLOCK(x) ((void)0) # define FL_AWAKE(x) ((void)0) # endif // NO_LOCKS #endif // NDEBUG #endif // FL_LOCK_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: ��������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/base128.h������������������������������������������������������������������0000664�0001750�0001750�00000002506�12330516146�013361� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string> using namespace std; typedef unsigned char byte; class base128 { #define LINELEN 64 private: string output; size_t iolen; size_t iocp; bool ateof; int linelength; void init(); void escape(string &, bool encode = true); void addlf(string &); void remlf(string &); public: base128() { init(); }; ~base128() {}; string encode(string &in); string decode(string &in); }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/FL/������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�012436� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/FL/Fl_Native_File_Chooser.H������������������������������������������������0000664�0001750�0001750�00000002503�12504014113�016730� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser.H -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // #ifndef FL_NATIVE_FILE_CHOOSER_H #define FL_NATIVE_FILE_CHOOSER_H // Use Windows' chooser #if defined(_WIN32) || defined(__CYGWIN__) #include <FL/Fl_Native_File_Chooser_WIN32.H> #endif // Use Apple's chooser #ifdef __APPLE__ #include <FL/Fl_Native_File_Chooser_MAC.H> #endif // All else falls back to FLTK's own chooser #if ! defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) #include <FL/Fl_Native_File_Chooser_FLTK.H> #endif #endif /*FL_NATIVE_FILE_CHOOSER_H*/ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/FL/Fl_Native_File_Chooser_MAC.H��������������������������������������������0000664�0001750�0001750�00000011240�12504014113�017406� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser_MAC.H -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // 10 20 30 40 50 60 70 // | | | | | | | // 4567890123456789012345678901234567890123456789012345678901234567890123456789 // OSX-SPECIFIC NATIVE BROWSER #ifdef __APPLE_CC__ #include <Carbon/Carbon.h> #else #include <Carbon.h> #endif #include <FL/filename.H> #define MAXFILTERS 80 class Fl_Native_File_Chooser { public: enum Type { BROWSE_FILE = 0, BROWSE_DIRECTORY, BROWSE_MULTI_FILE, BROWSE_MULTI_DIRECTORY, BROWSE_SAVE_FILE, BROWSE_SAVE_DIRECTORY }; enum Option { NO_OPTIONS = 0x0000, // no options enabled SAVEAS_CONFIRM = 0x0001, // Show native 'Save As' overwrite // confirm dialog (if supported) NEW_FOLDER = 0x0002, // Show 'New Folder' icon // (if supported) PREVIEW = 0x0004, // enable preview mode }; protected: NavDialogCreationOptions _opts; // file navigation options private: int _btype; // kind-of browser to show() int _options; // general options NavDialogRef _ref; // file navigation reference NavActionState _keepstate; // holds button permissions NavMenuItemSpec _tempitem; // Popup menu selection char **_pathnames; // array of pathnames int _tpathnames; // total pathnames char *_directory; // default pathname to use char *_title; // title for window char *_preset_file; // the 'save as' filename char *_filter; // user-side search filter, eg: // C Files\t*.[ch]\nText Files\t*.txt" char *_filt_names; // filter names (tab delimited) // eg. "C Files\tText Files" char *_filt_patt[MAXFILTERS]; // array of filter patterns, eg: // _filt_patt[0]="*.{cxx,h}" // _filt_patt[1]="*.txt" int _filt_total; // parse_filter() # of filters loaded int _filt_value; // index of the selected filter char *_errmsg; // error message // PRIVATE CLASS TO HANDLE NAVIGATION DIALOG REPLY STRUCT // Class-ified, mainly to ensure proper cleanup. // class NavReply { int _valid_reply; NavReplyRecord _reply; public: NavReply(); ~NavReply(); int get_reply(NavDialogRef& ref); int get_saveas_basename(char *s, int slen); int get_dirname(char *s, int slen); int get_pathnames(char **&pathnames, int& tpathnames); }; // Private methods void errmsg(const char *msg); void clear_pathnames(); void set_single_pathname(const char *s); int get_saveas_basename(NavDialogRef& ref); int get_pathnames(NavDialogRef& ref); static void event_handler(NavEventCallbackMessage callBackSelector, NavCBRecPtr cbparm, void *data); void clear_filters(); void add_filter(const char *, const char *); void parse_filter(const char *from); static Boolean filter_proc_cb(AEDesc *, void *, void *, NavFilterModes); Boolean filter_proc_cb2(AEDesc*, void*, void*, NavFilterModes); int post(); public: Fl_Native_File_Chooser(int val = BROWSE_FILE); ~Fl_Native_File_Chooser(); // Public methods void type(int); int type() const; void options(int); int options() const; int count() const; const char *filename() const; const char *filename(int i) const; void directory(const char *); const char *directory() const; void title(const char *); const char *title() const; const char *filter() const; void filter(const char *); void filter_value(int i) { _filt_value = i; } int filter_value() { return(_filt_value); } int filters() { return(_filt_total); } void preset_file(const char *); const char *preset_file(); const char *errmsg() const; int show(); }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/FL/Fl_Native_File_Chooser_FLTK.H�������������������������������������������0000664�0001750�0001750�00000005721�12504014113�017555� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser_DEFAULT.H -- FLTK native OS file chooser widget // // Copyright 2005 by Nathan Vander Wilt. // March 2005 - wrapper around Fl_File_Chooser // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // #include <FL/Fl_File_Chooser.H> #include <FL/Fl_File_Icon.H> #include <string.h> #include "icons.h" #include "gettext.h" class Fl_Native_File_Chooser { public: enum Type { BROWSE_FILE = 0, BROWSE_DIRECTORY, BROWSE_MULTI_FILE, BROWSE_MULTI_DIRECTORY, BROWSE_SAVE_FILE, BROWSE_SAVE_DIRECTORY }; enum Option { NO_OPTIONS = 0x0000, // no options enabled SAVEAS_CONFIRM = 0x0001, // Show native 'Save As' overwrite // confirm dialog (if supported) NEW_FOLDER = 0x0002, // Show 'New Folder' icon // (if supported) PREVIEW = 0x0004 // enable preview mode }; private: int _btype; // kind-of browser to show() int _options; // general options char *_filter; // user supplied filter char *_parsedfilt; // parsed filter int _filtvalue; // selected filter char *_preset_file; char *_prevvalue; // Returned filename char *_directory; char *_errmsg; // error message Fl_File_Chooser *file_chooser; int exist_dialog() { return(fl_choice2(_("File exists. Are you sure you want to overwrite?"), _("Cancel"), _("OK"), NULL)); } void load_system_icons() { Fl_File_Icon::load_system_icons(); } int _nfilters; // Private methods void errmsg(const char *msg); int type_fl_file(int); void parse_filter(); void keeplocation(); public: Fl_Native_File_Chooser(int val=BROWSE_FILE); ~Fl_Native_File_Chooser(); // Public methods void type(int); int type() const; void options(int); int options() const; int count() const; const char *filename() const; const char *filename(int i) const; void directory(const char *val); const char *directory() const; void title(const char *); const char* title() const; const char *filter() const; void filter(const char *); int filters() const { return(_nfilters); } void filter_value(int i); int filter_value() const; void preset_file(const char*); const char* preset_file() const; const char *errmsg() const; int show(); }; �����������������������������������������������flmsg-2.0.10/src/include/FL/Fl_Native_File_Chooser_WIN32.H������������������������������������������0000664�0001750�0001750�00000007102�12504014113�017612� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Fl_Native_File_Chooser_WINDOWS.H -- FLTK native OS file chooser widget // // Copyright 2004 by Greg Ercolano. // April 2005 - API changes, improved filter processing by Nathan Vander Wilt // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // #define _WIN32_WINNT 0x0501 // needed for OPENFILENAME's 'FlagsEx' #include <stdio.h> #include <stdlib.h> // malloc #include <windows.h> #include <commdlg.h> // OPENFILENAME, GetOpenFileName() #include <shlobj.h> // BROWSEINFO, SHBrowseForFolder() class Fl_Native_File_Chooser { public: enum Type { BROWSE_FILE = 0, BROWSE_DIRECTORY, BROWSE_MULTI_FILE, BROWSE_MULTI_DIRECTORY, BROWSE_SAVE_FILE, BROWSE_SAVE_DIRECTORY }; enum Option { NO_OPTIONS = 0x0000, // no options enabled SAVEAS_CONFIRM = 0x0001, // Show native 'Save As' overwrite // confirm dialog (if supported) NEW_FOLDER = 0x0002, // Show 'New Folder' icon // (if supported) PREVIEW = 0x0004, // enable preview mode }; private: int _btype; // kind-of browser to show() int _options; // general options OPENFILENAME _ofn; // GetOpenFileName() & GetSaveFileName() struct BROWSEINFO _binf; // SHBrowseForFolder() struct char **_pathnames; // array of pathnames int _tpathnames; // total pathnames char *_directory; // default pathname to use char *_title; // title for window char *_filter; // user-side search filter char *_parsedfilt; // filter parsed for Windows dialog int _nfilters; // number of filters parse_filter counted char *_preset_file; // the file to preselect char *_errmsg; // error message // Private methods void errmsg(const char *msg); void clear_pathnames(); void set_single_pathname(const char *s); void add_pathname(const char *s); void FreePIDL(ITEMIDLIST *pidl); void ClearOFN(); void ClearBINF(); void Win2Unix(char *s); void Unix2Win(char *s); int showfile(); static int CALLBACK Dir_CB(HWND win, UINT msg, LPARAM param, LPARAM data); int showdir(); void parse_filter(const char *); void clear_filters(); void add_filter(const char *, const char *); public: Fl_Native_File_Chooser(int val = BROWSE_FILE); ~Fl_Native_File_Chooser(); // Public methods void type(int val); int type() const; void options(int); int options() const; int count() const; const char *filename() const; const char *filename(int i) const; void directory(const char *val); const char *directory() const; void title(const char *val); const char *title() const; const char *filter() const; void filter(const char *val); int filters() const { return _nfilters; } void filter_value(int i); int filter_value() const; void preset_file(const char *); const char *preset_file() const; const char *errmsg() const; int show(); }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/status.h�������������������������������������������������������������������0000664�0001750�0001750�00000003577�12330516146�013550� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _status_H #define _status_H #include <string> using namespace std; struct status { int mainX; int mainY; int wpl; // words per line in radiogram bool open_on_export; int UTC; int dtformat; void saveLastState(); void loadLastState(); string my_call; string my_tel; string my_name; string my_addr; string my_city; string my_email; bool sernbr_fname; bool call_fname; bool dt_fname; bool rgnbr_fname; bool arl_desc; string sernbr; string rgnbr; bool insert_x; int tab; string mars_roster_file; int charcount; bool autowordwrap; string socket_addr; string socket_port; string xmlrpc_addr; string xmlrpc_port; bool use_compression; int encoder; int selected_mode; int swx_index_default_state; int swx_index_default_county; string swx_default_city; string swx_default_location; string swx_default_zone; string swx_default_profile; bool change_modem_with_autosend; bool sync_modem_to_fldigi; bool force_compression; bool caplocal; }; extern status progStatus; #endif ���������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/timeops.h������������������������������������������������������������������0000664�0001750�0001750�00000004052�12330516146�013672� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef TIMEOPS_H_ #define TIMEOPS_H_ #include <config.h> #include <time.h> #include <sys/time.h> #ifdef __MINGW32__ # include <pthread.h> #endif #if !HAVE_CLOCK_GETTIME enum clockid_t { CLOCK_REALTIME, CLOCK_MONOTONIC }; int clock_gettime(clockid_t clock_id, struct timespec* tp); #endif struct timespec operator+(const struct timespec &t0, const double &t); struct timespec operator-(const struct timespec &t0, const struct timespec &t1); struct timespec& operator-=(struct timespec &t0, const struct timespec &t1); bool operator>(const struct timespec &t0, const struct timespec &t1); bool operator==(const struct timespec &t0, const struct timespec &t1); struct timeval operator+(const struct timeval &t0, const double &t); struct timeval operator-(const struct timeval &t0, const struct timeval &t1); struct timeval& operator-=(struct timeval &t0, const struct timeval &t1); bool operator>(const struct timeval &t0, const struct timeval &t1); bool operator==(const struct timeval &t0, const struct timeval &t1); #ifndef GMTIME_R extern struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf); extern struct tm *localtime_r(const time_t *_Time,struct tm *_Tm); #endif #endif // TIMEOPS_H_ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/custom.h�������������������������������������������������������������������0000664�0001750�0001750�00000001700�12330516146�013521� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef CUSTOM_DEF #define CUSTOM_DEF #include "flmsg_dialog.h" #endif ����������������������������������������������������������������flmsg-2.0.10/src/include/base256.h������������������������������������������������������������������0000664�0001750�0001750�00000002450�12330516146�013361� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string> using namespace std; class base256 { #define LINELEN 64 private: string output; size_t iolen; size_t iocp; bool ateof; int linelength; void init(); void escape(string &, bool encode = true); void addlf(string &); void remlf(string &); public: base256() { init(); }; ~base256() {}; string encode(string &in); string decode(string &in); }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/xml_io.h�������������������������������������������������������������������0000664�0001750�0001750�00000002242�12431374743�013507� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef XML_IO_H #define XML_IO_H extern std::string get_io_mode(void); extern void enable_arq(void); extern void open_xmlrpc(); extern void close_xmlrpc(); extern void send_new_modem(); extern void *xmlrpc_loop(void *d); extern pthread_t *xmlrpc_thread; extern pthread_mutex_t mutex_xmlrpc; #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flmsg.h��������������������������������������������������������������������0000664�0001750�0001750�00000120760�12462170262�013330� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FLMSG_H #define FLMSG_H #include <string> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Double_Window.H> #include "arl_msgs.h" #include "hx_msgs.h" #include "crc16.h" #include "threads.h" #define DEBUG 0 using namespace std; enum MSGTYPE { NONE, ICS203, ICS205, ICS205A, ICS206, ICS213, ICS214, ICS216, ICS309, HICS203, HICS206, HICS213, HICS214, IARU, RADIOGRAM, PLAINTEXT, BLANK, CSV, CUSTOM, MARSDAILY, MARSINEEI, MARSNET, MARSARMY, MARSNAVY, REDXSNW, REDX5739, REDX5739A, REDX5739B, WXHC, SEVEREWX, STORMREP, CAP105, CAP110, TRANSFER, CUSTOM_TRANSFER }; struct FIELD { string f_type; string f_data; void **w; char w_type; }; extern FIELD fields[]; extern FIELD ptfields[]; extern FIELD rgfields[]; extern int selected_form; extern void checkdirectories(void); extern int parse_args(int argc, char **argv, int& idx); extern void showoptions(); extern Fl_Double_Window *mainwindow; extern Fl_Double_Window *optionswindow; extern Fl_Double_Window *arlwindow; extern Fl_Double_Window *config_files_window; extern Fl_Double_Window *hxwindow; extern Fl_Double_Window *header_window; extern Fl_Double_Window *time_estimate_window; extern Fl_Double_Window *socket_window; extern string flmsgHomeDir; extern string IcsHomeDir; extern bool printme; extern int arl_nbr; extern string FLMSG_dir; extern string ARQ_dir; extern string ARQ_files_dir; extern string ARQ_recv_dir; extern string ARQ_send_dir; extern string WRAP_dir; extern string WRAP_recv_dir; extern string WRAP_send_dir; extern string WRAP_auto_dir; extern string ICS_dir; extern string ICS_msg_dir; extern string ICS_tmp_dir; extern string CSV_dir; extern string CUSTOM_dir; extern string XFR_dir; extern string FLMSG_temp_dir; extern string title; extern string buffer; extern string evalstr; extern char *named_file(); extern pthread_t *xmlrpc_thread; extern pthread_mutex_t mutex_xmlrpc; //menu callbacks extern void cb_new(); extern void cb_open(); extern void cb_save(); extern void cb_save_as(); extern void cb_text(); extern void cb_import(); extern void cb_export(); extern void cb_wrap_import(); extern void cb_wrap_export(); extern void cb_wrap_autosend(); extern void cb_exit(); extern void cb_load_template(); extern void cb_save_template(); extern void cb_save_as_template(); extern void cb_config_files(); extern void cb_config_date_time(); extern void cb_config_personal(); extern void cb_config_radiogram(); extern void cb_config_socket(); extern void showoptions(); extern void show_help(); extern void custom_download(); extern void cb_About(); extern void cb_html(); extern void cb_html_fcopy(); extern void cb_folders(); extern void open_url(const char* url); extern void cb_arl(); extern void cb_arl_cancel(); extern void cb_arl_add(); extern void cb_hx(); extern void cb_hx_select(); extern void cb_hx_select_add(); extern void cb_hx_select_cancel(); extern void cb_hx_select_ok(); extern void closeoptions(); extern void remove_spaces_from_filename(string &fname); extern char *szTime(int typ = 0); extern char *szDate(); extern char *szAbbrevDate(); extern char *szDateTime(); extern char *szMarsDateTime(); extern char *szCAPDateTime(); extern void set_main_label(); extern void show_filename(string); extern void clear_fields(); extern void update_fields(); extern void to_html(string &s); extern void fm_html(string &html); extern void drop_box_changed(); extern int eval_transfer_size(); // used by all form management extern string lineout( string &, string & ); extern string binout( string &, bool & ); extern string hdr_from; extern string hdr_edit; extern void clear_header(); extern string header(const char *); extern void read_header(string &str); enum hdr_reason {NEW, CHANGED, FROM}; extern void update_header(hdr_reason sender = NEW); extern string findstr(string &, string &); extern bool findbin(string &, string &); extern void replacestr(string &form, string &where, string &what); extern void replacelf(string &form, int n = 0); extern void striplf(string &); extern void print_and_exit(); // ics extern void ics_changed(Fl_Widget *, void *); // ics205 extern string base_205_filename; extern string def_205_filename; extern string def_205_TemplateName; extern bool using_ics205_template; extern void cb_205_SetDateTime1(); extern void cb_205_SetDateTime2(); extern void cb_205_SetDateTime3(); extern void clear_205fields(); extern void update_205fields(); extern void clear_205_form(); extern string find(string haystack, string needle); extern void read_205_buffer(string data); extern void cb_205_new(); extern void cb_205_import(); extern void cb_205_export(); extern void cb_205_wrap_import(string wrapfilename, string inpbuffer); extern void cb_205_wrap_export(); extern void cb_205_wrap_autosend(); extern void cb_205_load_template(); extern void cb_205_save_template(); extern void cb_205_save_as_template(); extern void cb_205_open(); extern void write_205(string s); extern bool cb_205_save_as(); extern void cb_205_save(); extern void cb_205_html(); extern void cb_205_msg_type(); extern void cb_205_textout(); extern int eval_205_fsize(); // ics205a extern string base_205a_filename; extern string def_205a_filename; extern string def_205a_TemplateName; extern bool using_ics205a_template; extern void cb_205a_set_date_fm(); extern void cb_205a_set_time_fm(); extern void cb_205a_set_date_to(); extern void cb_205a_set_time_to(); extern void clear_205afields(); extern void update_205afields(); extern void update_205aform(); extern void clear_205a_form(); extern void read_205a_buffer(string data); extern void cb_205a_new(); extern void cb_205a_import(); extern void cb_205a_export(); extern void cb_205a_wrap_import(string wrapfilename, string inpbuffer); extern void cb_205a_wrap_export(); extern void cb_205a_wrap_autosend(); extern void cb_205a_load_template(); extern void cb_205a_save_template(); extern void cb_205a_save_as_template(); extern void cb_205a_open(); extern void write_205a(string s); extern bool cb_205a_save_as(); extern void cb_205a_save(); extern void cb_205a_html(); extern void cb_205a_msg_type(); extern void cb_205a_textout(); extern int eval_205a_fsize(); // ics203 extern string yes; extern string no; extern string buff203; extern string def_203_filename; extern string base_203_filename; extern string def_203_TemplateName; extern bool using_203_template; extern void cb_203_set_date(); extern void cb_203_set_time(); extern void clear_203fields(); extern void update_203fields(); extern void clear_203_form(); extern void read_203_buffer(string data); extern void cb_203_new(); extern void cb_203_import(); extern void cb_203_export(); extern void cb_203_wrap_import(string wrapfilename, string inpbuffer); extern void cb_203_wrap_export(); extern void cb_203_wrap_autosend(); extern void cb_203_load_template(); extern void cb_203_save_template(); extern void cb_203_save_as_template(); extern void cb_203_open(); extern void write_203(string s); extern bool cb_203_save_as(); extern void cb_203_save(); extern void cb_203_html(); extern void cb_203_msg_type(); extern void cb_203_textout(); extern int eval_203_fsize(); // ics206 extern string yes; extern string no; extern string buff206; extern string def_206_filename; extern string base_206_filename; extern string def_206_TemplateName; extern bool using_ics206_template; extern void cb_206_setdate(); extern void cb_206_settime(); extern void clear_206fields(); extern void update_206fields(); extern void clear_206_form(); extern void read_206_buffer(string data); extern void cb_206_new(); extern void cb_206_import(); extern void cb_206_export(); extern void cb_206_wrap_import(string wrapfilename, string inpbuffer); extern void cb_206_wrap_export(); extern void cb_206_wrap_autosend(); extern void cb_206_load_template(); extern void cb_206_save_template(); extern void cb_206_save_as_template(); extern void cb_206_open(); extern void write_206(string s); extern bool cb_206_save_as(); extern void cb_206_save(); extern void cb_206_html(); extern void cb_206_msg_type(); extern void cb_206_textout(); extern int eval_206_fsize(); // ics213 extern bool using_213Template; extern string base_213_filename; extern string def_213_filename; extern string def_213_TemplateName; extern void clear_213_form(); extern void read_213(string); extern void write_213(string); extern void read_213_buffer(string); extern void cb_213_new(); extern void cb_213_open(); extern void cb_213_save(); extern bool cb_213_save_as(); extern void cb_213_write(); extern void cb_213_html(); extern void cb_213_textout(); extern void cb_213_import(); extern void cb_213_export(); extern void cb_213_wrap_import(string, string); extern void cb_213_wrap_export(); extern void cb_213_wrap_autosend(); extern void cb_213_load_template(); extern void cb_213_save_template(); extern void cb_213_save_as_template(); extern void cb_SetDate1(); extern void cb_SetDate2(); extern void cb_SetTime1(); extern void cb_SetTime2(); extern int eval_213_fsize(); // ics214 extern string buff214; extern string def_214_filename; extern string base_214_filename; extern string def_214_TemplateName; extern bool using_ics214_template; extern void cb_214_set_date(); extern void cb_214_set_time(); extern void clear_214fields(); extern void update_214fields(); extern void clear_214_form(); extern void read_214_buffer(string data); extern void cb_214_new(); extern void cb_214_import(); extern void cb_214_export(); extern void cb_214_wrap_import(string wrapfilename, string inpbuffer); extern void cb_214_wrap_export(); extern void cb_214_wrap_autosend(); extern void cb_214_load_template(); extern void cb_214_save_template(); extern void cb_214_save_as_template(); extern void cb_214_open(); extern void write_214(string s); extern bool cb_214_save_as(); extern void cb_214_save(); extern void cb_214_html(); extern void cb_214_msg_type(); extern void cb_214_textout(); extern int eval_214_fsize(); // ics216 extern string buff216; extern string def_216_filename; extern string base_216_filename; extern string def_216_TemplateName; extern bool using_ics216_template; extern void cb_216_set_date(); extern void cb_216_set_time(); extern void clear_216fields(); extern void update_216fields(); extern void clear_216_form(); extern void read_216_buffer(string data); extern void cb_216_new(); extern void cb_216_import(); extern void cb_216_export(); extern void cb_216_wrap_import(string wrapfilename, string inpbuffer); extern void cb_216_wrap_export(); extern void cb_216_wrap_autosend(); extern void cb_216_load_template(); extern void cb_216_save_template(); extern void cb_216_save_as_template(); extern void cb_216_open(); extern void write_216(string s); extern bool cb_216_save_as(); extern void cb_216_save(); extern void cb_216_html(); extern void cb_216_msg_type(); extern void cb_216_textout(); extern int eval_216_fsize(); // ics309 extern string buff309; extern string def_309_filename; extern string base_309_filename; extern string def_309_TemplateName; extern bool using_ics309_template; extern void cb_309_set_date_fm(); extern void cb_309_set_time_fm(); extern void cb_309_set_date_to(); extern void cb_309_set_time_to(); extern void cb_309_set_date_time(); extern void clear_309fields(); extern void update_309fields(); extern void clear_309_form(); extern void read_309_buffer(string data); extern void cb_309_new(); extern void cb_309_import(); extern void cb_309_export(); extern void cb_309_wrap_import(string wrapfilename, string inpbuffer); extern void cb_309_wrap_export(); extern void cb_309_wrap_autosend(); extern void cb_309_load_template(); extern void cb_309_save_template(); extern void cb_309_save_as_template(); extern void cb_309_open(); extern void write_309(string s); extern bool cb_309_save_as(); extern void cb_309_save(); extern void cb_309_html(); extern void cb_309_msg_type(); extern void cb_309_textout(); extern int eval_309_fsize(); extern void ics309_csv(Fl_Widget *w, void *d); // radiogram extern bool using_rg_template; extern string base_rg_filename; extern string def_rg_filename; extern string def_rg_TemplateName; extern const char hxitems[]; extern const char precitems[]; extern const char *s_prec[]; extern const char *s_hx[]; extern void cb_rgSetDate1(); extern void cb_rgSetTime1(); extern void cb_rgSetDateTime2(); extern void cb_rgSetDateTime3(); extern void cb_rgSetDateTime4(); extern void cb_rgSetDateTime5(); extern void clear_rgfields(); extern void update_rgfields(); extern void clear_rg_form(); extern void read_rg_buffer(string data); extern void cb_rg_new(); extern void cb_rg_import(); extern void cb_rg_export(); extern void cb_rg_wrap_import(string, string); extern void cb_rg_wrap_export(); extern void cb_rg_wrap_autosend(); extern void cb_rg_load_template(); extern void cb_rg_save_template(); extern void cb_rg_save_as_template(); extern void read_rg(string s); extern void cb_rg_open(); extern void write_rg(string s); extern bool cb_rg_save_as(); extern void cb_rg_save(); extern void cb_rg_html(); extern void cb_rg_html_fcopy(); extern void cb_rg_rtf(); extern void cb_rg_textout(); extern void set_rg_choices(); extern void cb_rg_check(); extern void cb_rg_nbr(Fl_Widget *); extern void cb_rg_filter_input(Fl_Widget *); extern int eval_rg_fsize(); extern void read_data_file(string); // plaintext extern bool using_pt_template; extern string base_pt_filename; extern string def_pt_filename; extern string def_pt_TemplateName; extern void cb_set_pt_date(); extern void cb_set_pt_time(); extern void clear_ptfields(); extern void update_ptfields(); extern void clear_pt_form(); extern void read_ptbuffer(string data); extern void cb_pt_new(); extern void cb_pt_import(); extern void cb_pt_export(); extern void cb_pt_wrap_import(string wrapfilename, string inpbuffer); extern void cb_pt_wrap_export(); extern void cb_pt_wrap_autosend(); extern void cb_pt_load_template(); extern void cb_pt_save_template(); extern void cb_pt_save_as_template(); extern void read_pt_data_file(string s); extern void cb_pt_open(); extern void write_pt(string s); extern bool cb_pt_save_as(); extern void cb_pt_save(); extern void cb_pt_html(); extern void cb_pt_msg_type(); extern void cb_pt_textout(); extern int eval_pt_fsize(); // blank form extern bool using_blank_template; extern string base_blank_filename; extern string def_blank_filename; extern string def_blank_TemplateName; extern string TITLE; extern string errtext; extern void clear_blankfields(); extern void update_blankfields(); extern void clear_blank_form(); extern void read_blankbuffer(string data); extern void cb_blank_new(); extern void cb_blank_import(); extern void cb_blank_export(); extern void cb_blank_wrap_import(string wrapfilename, string inpbuffer); extern void cb_blank_wrap_export(); extern void cb_blank_wrap_autosend(); extern void cb_blank_load_template(); extern void cb_blank_save_template(); extern void cb_blank_save_as_template(); extern void read_blank_data_file(string s); extern void cb_blank_open(); extern void write_blank(string s); extern bool cb_blank_save_as(); extern void cb_blank_save(); extern void cb_blank_html(); extern void cb_blank_msg_type(); extern void cb_blank_textout(); extern int eval_blank_fsize(); // csv form extern bool using_csv_template; extern string base_csv_filename; extern string def_csv_filename; extern string def_csv_TemplateName; extern void clear_csvfields(); extern void update_csvfields(); extern void clear_csv_form(); extern void read_csvbuffer(string data); extern void cb_csv_new(); extern void cb_csv_import(); extern void cb_csv_export(); extern void cb_csv_wrap_import(string wrapfilename, string inpbuffer); extern void cb_csv_wrap_export(); extern void cb_csv_wrap_autosend(); extern void cb_csv_load_template(); extern void cb_csv_save_template(); extern void cb_csv_save_as_template(); extern void read_csv_data_file(string s); extern void cb_csv_open(); extern void write_csv(string s); extern bool cb_csv_save_as(); extern void cb_csv_save(); extern void cb_csv_html(); extern void cb_csv_msg_type(); extern void cb_csv_textout(); extern void cb_csv_export_data(bool); extern void cb_csv_import_data(); extern void csv_set_fname(const char *); extern int eval_csv_fsize(); // custom form enum HANDLE_TYPE {HANDLE_NONE, HANDLE_EDIT, HANDLE_VIEW, HANDLE_WAITING}; extern int custom_select; extern int handle_type; extern int flmsg_webserver_portnbr; extern char sz_srvr_portnbr[]; extern pthread_t *web_server_thread; extern pthread_mutex_t mutex_web_server; struct CUSTOM_PAIRS { char *mnu_name; char *file_name; }; extern CUSTOM_PAIRS custom_pairs[]; extern bool using_custom_template; extern string base_custom_filename; extern string def_custom_filename; extern string def_custom_TemplateName; extern void clear_customfields(); extern void update_customfields(); extern void clear_custom_form(); extern void read_custombuffer(string data); extern void cb_custom_new(); extern void cb_custom_import(); extern void cb_custom_export(); extern void cb_custom_wrap_import(string wrapfilename, string inpbuffer); extern void cb_custom_wrap_export(); extern void cb_custom_wrap_autosend(); extern void cb_custom_load_template(); extern void cb_custom_save_template(); extern void cb_custom_save_as_template(); extern void read_custom_data_file(string s); extern void cb_custom_open(); extern void write_custom(string s); extern bool cb_custom_save_as(); extern void cb_custom_save(); extern void cb_custom_html(); extern void cb_custom_msg_type(); extern void cb_custom_textout(); extern void cb_custom_export_data(bool); extern void cb_custom_import_data(); extern void custom_set_fname(const char *); extern int eval_custom_fsize(); // mars daily extern string def_mars_daily_filename; extern string def_mars_daily_TemplateName; extern string base_mars_daily_filename; extern void mars_changed(Fl_Widget *, void *); extern void clear_mars_dailyfields(); extern void update_mars_dailyfields(); extern void clear_mars_daily_form(); extern void read_mars_daily_buffer(string data); extern void cb_mars_daily_new(); extern void cb_mars_daily_import(); extern void cb_mars_daily_export(); extern void cb_mars_daily_wrap_import(string wrapfilename, string inpbuffer); extern void cb_mars_daily_wrap_export(); extern void cb_mars_daily_wrap_autosend(); extern void cb_mars_daily_load_template(); extern void cb_mars_daily_save_template(); extern void cb_mars_daily_save_as_template(); extern void read_mars_daily__data_file(string s); extern void cb_mars_daily_open(); extern void write_mars_daily(string s); extern bool cb_mars_daily_save_as(); extern void cb_mars_daily_save(); extern void cb_mars_daily_html(); extern void cb_mars_daily_msg_type(); extern void cb_mars_daily_textout(); extern int eval_mars_daily_fsize(); // mars ineei extern string def_mars_ineei_filename; extern string def_mars_ineei_TemplateName; extern string base_mars_ineei_filename; extern void cb_mars_ineei_SetDTG(); extern void clear_mars_ineei_fields(); extern void update_mars_ineei_fields(); extern void update_mars_ineeiform(); extern void clear_mars_ineei_form(); extern void read_mars_ineei_buffer(string data); extern void cb_mars_ineei_new(); extern void cb_mars_ineei_import(); extern void cb_mars_ineei_export(); extern void cb_mars_ineei_wrap_import(string wrapfilename, string inpbuffer); extern void cb_mars_ineei_wrap_export(); extern void cb_mars_ineei_wrap_autosend(); extern void cb_mars_ineei_load_template(); extern void cb_mars_ineei_save_template(); extern void cb_mars_ineei_save_as_template(); extern void cb_mars_ineei_open(); extern void write_mars_ineei(string s); extern bool cb_mars_ineei_save_as(); extern void cb_mars_ineei_save(); extern void cb_mars_ineei_html(); extern void cb_mars_ineei_textout(); extern void cb_mars_ineei_html(); extern void cb_mars_ineei_textout(); extern int eval_mars_ineei_fsize(); // mars net extern string def_mars_net_filename; extern string def_mars_net_TemplateName; extern string base_mars_net_filename; extern void cb_mars_net_SetDTG(); extern void cb_mars_net_SetDTGSTART(); extern void cb_mars_net_SetDTGEND(); extern void clear_mars_net_fields(); extern void update_mars_net_fields(); extern void update_mars_netform(); extern void clear_mars_net_form(); extern void read_mars_net_buffer(string data); extern void cb_mars_net_new(); extern void cb_mars_net_import(); extern void cb_mars_net_export(); extern void cb_mars_net_wrap_import(string wrapfilename, string inpbuffer); extern void cb_mars_net_wrap_export(); extern void cb_mars_net_wrap_autosend(); extern void cb_mars_net_load_template(); extern void cb_mars_net_save_template(); extern void cb_mars_net_save_as_template(); extern void cb_mars_net_open(); extern void write_mars_net(string s); extern bool cb_mars_net_save_as(); extern void cb_mars_net_save(); extern void cb_mars_net_html(); extern void cb_mars_net_textout(); extern int eval_mars_net_fsize(); // mars army extern bool using_mars_army_template; extern string base_mars_army_filename; extern string def_mars_army_filename; extern string def_mars_army_TemplateName; extern void clear_mars_armyfields(); extern void update_mars_armyfields(); extern void update_mars_armyform(); extern void clear_mars_army_form(); extern void read_mars_army_buffer(string data); extern void cb_mars_army_new(); extern void cb_mars_army_import(); extern void cb_mars_army_export(); extern void cb_mars_army_wrap_import(string wrapfilename, string inpbuffer); extern void cb_mars_army_wrap_export(); extern void cb_mars_army_wrap_autosend(); extern void cb_mars_army_load_template(); extern void cb_mars_army_save_template(); extern void cb_mars_army_save_as_template(); extern void cb_mars_army_open(); extern void write_mars_army(string s); extern bool cb_mars_army_save_as(); extern void cb_mars_army_save(); extern void cb_mars_army_html(); extern void cb_mars_army_msg_type(); extern void cb_mars_army_textout(); extern int eval_mars_army_fsize(); // mars navy extern bool using_mars_navy_template; extern string base_mars_navy_filename; extern string def_mars_navy_filename; extern string def_mars_navy_TemplateName; extern void clear_mars_navyfields(); extern void update_mars_navyfields(); extern void update_mars_navyform(); extern void clear_mars_navy_form(); extern void read_mars_navy_buffer(string data); extern void cb_mars_navy_new(); extern void cb_mars_navy_import(); extern void cb_mars_navy_export(); extern void cb_mars_navy_wrap_import(string wrapfilename, string inpbuffer); extern void cb_mars_navy_wrap_export(); extern void cb_mars_navy_wrap_autosend(); extern void cb_mars_navy_load_template(); extern void cb_mars_navy_save_template(); extern void cb_mars_navy_save_as_template(); extern void cb_mars_navy_open(); extern void write_mars_navy(string s); extern bool cb_mars_navy_save_as(); extern void cb_mars_navy_save(); extern void cb_mars_navy_html(); extern void cb_mars_navy_msg_type(); extern void cb_mars_navy_textout(); extern int eval_mars_navy_fsize(); // hics203 extern string hics_buff203; extern string def_hics203_filename; extern string base_hics203_filename; extern string def_hics203_TemplateName; extern bool using_hics203_template; extern void hics_changed(Fl_Widget *, void *); extern void cb_hics203_set_date(); extern void cb_hics203_set_time(); extern void clear_hics203fields(); extern void update_hics203fields(); extern void clear_hics203_form(); extern void read_hics203_buffer(string data); extern void cb_hics203_new(); extern void cb_hics203_import(); extern void cb_hics203_export(); extern void cb_hics203_wrap_import(string wrapfilename, string inpbuffer); extern void cb_hics203_wrap_export(); extern void cb_hics203_wrap_autosend(); extern void cb_hics203_load_template(); extern void cb_hics203_save_template(); extern void cb_hics203_save_as_template(); extern void cb_hics203_open(); extern void write_hics203(string s); extern bool cb_hics203_save_as(); extern void cb_hics203_save(); extern void cb_hics203_html(); extern void cb_hics203_msg_type(); extern void cb_hics203_textout(); extern int eval_hics203_fsize(); // ics_h206 extern string h206_buff; extern string h206_def_filename; extern string h206_base_filename; extern string h206_def_template_name; extern bool h206_using_template; extern void h206_cb_setdate(); extern void h206_cb_settime(); extern void h206_clear_fields(); extern void h206_update_fields(); extern void h206_clear__form(); extern void h206_read_buffer(string data); extern void h206_cb_new(); extern void h206_cb_import(); extern void h206_cb_export(); extern void h206_cb_wrap_import(string wrapfilename, string inpbuffer); extern void h206_cb_wrap_export(); extern void h206_cb_wrap_autosend(); extern void h206_cb_load_template(); extern void h206_cb_save_template(); extern void h206_cb_save_as_template(); extern void h206_cb_open(); extern void h206_write(string s); extern bool h206_cb_save_as(); extern void h206_cb_save(); extern void h206_cb_html(); extern void h206_cb_textout(); extern int eval_h206_fsize(); // ics_h213 extern string h213_buffer; extern string h213_def_filename; extern string h213_base_filename; extern string h213_def_template_name; extern bool h213_using_template; extern void h213_cb_set_date(); extern void h213_cb_set_time0(); extern void h213_cb_set_time1(); extern void h213_cb_set_time2(); extern void h213_clear_fields(); extern void h213_update_fields(); extern void h213_clear_form(); extern void h213_update_form(); extern void h213_read_buffer(string data); extern void h213_cb_new(); extern void h213_cb_import(); extern void h213_cb_export(); extern void h213_cb_wrap_import(string wrapfilename, string inpbuffer); extern void h213_cb_wrap_export(); extern void h213_cb_wrap_autosend(); extern void h213_cb_load_template(); extern void h213_cb_save_template(); extern void h213_cb_save_as_template(); extern void h213_cb_open(); extern void h213_write(string s); extern bool h213_cb_save_as(); extern void h213_cb_save(); extern void h213_cb_html(); extern void h213_cb_textout(); extern int eval_h213_fsize(); // hics 214 variables and functions extern string hics214_incident; extern string hics214_date; extern string hics214_time; extern string hics214_op_period; extern string hics214_sec_brch; extern string hics214_position; extern string hics214_activity_time[30]; extern string hics214_activity_event[30]; extern string hics214_prepared_by; extern string hics214_facility; extern string hics214_buff; extern string hics214_def_filename; extern string hics214_base_filename; extern string hics214_template_name; extern bool hics214_using_template; extern void hics214_cb_set_date(); extern void hics214_cb_set_time(); extern void hics214_clear_fields(); extern void hics214_update_fields(); extern void hics214_update_form(); extern void hics214_clear_form(); extern void hics214_read_buffer(string data); extern void hics214_cb_new(); extern void hics214_cb_import(); extern void hics214_cb_export(); extern void hics214_cb_wrap_import(string wrapfilename, string inpbuffer); extern void hics214_cb_wrap_export(); extern void hics214_cb_wrap_autosend(); extern void hics214_cb_load_template(); extern void hics214_cb_save_template(); extern void hics214_cb_save_as_template(); extern void hics214_cb_open(); extern void hics214_write(string s); extern bool hics214_cb_save_as(); extern void hics214_cb_save(); extern void hics214_cb_html(); extern void hics214_cb_textout(); extern int eval_hics214_fsize(); // IARU form extern bool iaru_using_template; extern int iaru_num_fields; extern void iaru_cb_set_d1(); extern void iaru_cb_set_t1(); extern void iaru_cb_set_d2(); extern void iaru_cb_set_t2(); extern void iaru_cb_set_d3(); extern void iaru_cb_set_t3(); extern void iaru_cb_nbr(Fl_Widget *wdg); extern void iaru_cb_filter_input(Fl_Widget *wdg); extern void iaru_clear_fields(); extern void iaru_set_choices(); extern void iaru_update_fields(); extern void iaru_clear_form(); extern void iaru_update_form(); extern void iaru_read_buffer(string data); extern void iaru_cb_new(); extern void iaru_cb_import(); extern void iaru_cb_export(); extern void iaru_cb_wrap_import(string wrapfilename, string inpbuffer); extern void iaru_cb_wrap_export(); extern void iaru_cb_wrap_autosend(); extern void iaru_cb_load_template(); extern void iaru_cb_save_template(); extern void iaru_cb_save_as_template(); extern void iaru_cb_open(); extern void iaru_write(string s); extern bool iaru_cb_save_as(); extern void iaru_cb_save(); extern void iaru_cb_check(); extern void iaru_cb_html(); extern void iaru_cb_textout(); extern int eval_iaru_fsize(); extern string iaru_base_filename; extern string iaru_def_filename; extern string iaru_def_template_name; // Red Cross extern void redx_changed(Fl_Widget *, void *); // Safety & Welfare extern bool using_redx_snw_template; extern string base_redx_snw_filename; extern string def_redx_snw_filename; extern string def_redx_snw_TemplateName; extern void clear_redx_snwfields(); extern void update_redx_snwfields(); extern void update_redx_snwform(); extern void clear_redx_snw_form(); extern void read_redx_snw_buffer(string data); extern void cb_redx_snw_new(); extern void cb_redx_snw_import(); extern void cb_redx_snw_export(); extern void cb_redx_snw_wrap_import(string wrapfilename, string inpbuffer); extern void cb_redx_snw_wrap_export(); extern void cb_redx_snw_wrap_autosend(); extern void cb_redx_snw_load_template(); extern void cb_redx_snw_save_template(); extern void cb_redx_snw_save_as_template(); extern void cb_redx_snw_open(); extern void write_redx_snw(string s); extern bool cb_redx_snw_save_as(); extern void cb_redx_snw_save(); extern void cb_redx_snw_html(); extern void cb_snw_msg_type(); extern void cb_redx_snw_textout(); extern int eval_redx_snw_fsize(); // Form 5739 extern string base_redx_5739_filename; extern string def_redx_5739_filename; extern string def_redx_5739_TemplateName; extern void clear_redx_5739fields(); extern void update_redx_5739fields(); extern void update_redx_5739form(); extern void clear_redx_5739_form(); extern void read_redx_5739_buffer(string data); extern void cb_redx_5739_new(); extern void cb_redx_5739_import(); extern void cb_redx_5739_export(); extern void cb_redx_5739_wrap_import(string wrapfilename, string inpbuffer); extern void cb_redx_5739_wrap_export(); extern void cb_redx_5739_wrap_autosend(); extern void cb_redx_5739_load_template(); extern void cb_redx_5739_save_template(); extern void cb_redx_5739_save_as_template(); extern void cb_redx_5739_open(); extern void write_redx_5739(string s); extern bool cb_redx_5739_save_as(); extern void cb_redx_5739_save(); extern void cb_redx_5739_html(); extern void cb_5739_msg_type(); extern void cb_redx_5739_textout(); extern int eval_redx_5739_fsize(); // Form 5739A extern string def_redx_5739A_filename; extern string base_redx_5739A_filename; extern string def_redx_5739A_TemplateName; extern void clear_redx_5739Afields(); extern void update_redx_5739Afields(); extern void update_redx_5739Aform(); extern void clear_redx_5739A_form(); extern void read_redx_5739A_buffer(string data); extern void cb_redx_5739A_new(); extern void cb_redx_5739A_import(); extern void cb_redx_5739A_export(); extern void cb_redx_5739A_wrap_import(string wrapfilename, string inpbuffer); extern void cb_redx_5739A_wrap_export(); extern void cb_redx_5739A_wrap_autosend(); extern void cb_redx_5739A_load_template(); extern void cb_redx_5739A_save_template(); extern void cb_redx_5739A_save_as_template(); extern void cb_redx_5739A_open(); extern void write_redx_5739A(string s); extern bool cb_redx_5739A_save_as(); extern void cb_redx_5739A_save(); extern void cb_redx_5739A_html(); extern void cb_5739A_msg_type(); extern void cb_redx_5739A_textout(); extern int eval_redx_5739A_fsize(); // Form 5739B extern string def_redx_5739B_filename; extern string base_redx_5739B_filename; extern string def_redx_5739B_TemplateName; extern void clear_redx_5739Bfields(); extern void update_redx_5739Bfields(); extern void update_redx_5739Bform(); extern void clear_redx_5739B_form(); extern void read_redx_5739B_buffer(string data); extern void cb_redx_5739B_new(); extern void cb_redx_5739B_import(); extern void cb_redx_5739B_export(); extern void cb_redx_5739B_wrap_import(string wrapfilename, string inpbuffer); extern void cb_redx_5739B_wrap_export(); extern void cb_redx_5739B_wrap_autosend(); extern void cb_redx_5739B_load_template(); extern void cb_redx_5739B_save_template(); extern void cb_redx_5739B_save_as_template(); extern void cb_redx_5739B_open(); extern void write_redx_5739B(string s); extern bool cb_redx_5739B_save_as(); extern void cb_redx_5739B_save(); extern void cb_redx_5739B_html(); extern void cb_5739B_msg_type(); extern void cb_redx_5739B_textout(); extern int eval_redx_5739B_fsize(); //====================================================================== // National Hurricane Center, Hurricane Weather Report Form //====================================================================== extern string buffwxhc; extern string def_wxhc_filename; extern string base_wxhc_filename; extern string def_wxhc_TemplateName; extern void clear_wxhcfields(); extern bool check_wxhcfields(); extern void update_wxhcfields(); extern void set_nhc_wx_combos(); extern void update_wxhcform(); extern void clear_wxhc_form(); extern void read_wxhc_buffer(string data); extern void cb_wxhc_new(); extern void cb_wxhc_import(); extern void cb_wxhc_export(); extern void cb_wxhc_wrap_import(string wrapfilename, string inpbuffer); extern void cb_wxhc_wrap_export(); extern void cb_wxhc_wrap_autosend(); extern void cb_wxhc_load_template(); extern void cb_wxhc_save_template(); extern void cb_wxhc_save_as_template(); extern void cb_wxhc_open(); extern void write_wxhc(string s); extern bool cb_wxhc_save_as(); extern void cb_wxhc_save(); extern void cb_wxhc_html(); extern void cb_wxhc_textout(); extern int eval_wxhc_fsize(); //====================================================================== // Severe Weather Report Form //====================================================================== extern string buffsevere_wx; extern string def_severe_wx_filename; extern string base_severe_wx_filename; extern string def_severe_wx_TemplateName; extern void clear_severe_wxfields(); extern bool check_severe_wxfields(); extern void update_severe_wxfields(); extern void update_severe_wxform(); extern void clear_severe_wx_form(); extern void read_severe_wx_buffer(string data); extern void cb_severe_wx_new(); extern void cb_severe_wx_import(); extern void cb_severe_wx_export(); extern void cb_severe_wx_wrap_import(string wrapfilename, string inpbuffer); extern int eval_severe_wx_fsize(); extern void cb_severe_wx_wrap_export(); extern void cb_severe_wx_wrap_autosend(); extern void cb_severe_wx_load_template(); extern void cb_severe_wx_save_template(); extern void cb_severe_wx_save_as_template(); extern void cb_severe_wx_open(); extern void write_severe_wx(string s); extern bool cb_severe_wx_save_as(); extern void cb_severe_wx_save(); extern void cb_severe_wx_html(); extern void cb_severe_wx_textout(); extern void set_severe_wx_combos(); extern void set_severe_wx_counties(int); //====================================================================== // Storm Report Form //====================================================================== extern string buffstorm; extern string def_storm_filename; extern string base_storm_filename; extern string def_storm_TemplateName; extern void clear_stormfields(); extern bool check_stormfields(); extern void update_stormfields(); extern void update_stormform(); extern void clear_storm_form(); extern void read_storm_buffer(string data); extern void cb_storm_new(); extern void cb_storm_import(); extern void cb_storm_export(); extern void cb_storm_wrap_import(string wrapfilename, string inpbuffer); extern int eval_storm_fsize(); extern void cb_storm_wrap_export(); extern void cb_storm_wrap_autosend(); extern void cb_storm_load_template(); extern void cb_storm_save_template(); extern void cb_storm_save_as_template(); extern void cb_storm_open(); extern void write_storm(string s); extern bool cb_storm_save_as(); extern void cb_storm_save(); extern void cb_storm_html(); extern void cb_storm_textout(); //====================================================================== // generic file transfer //====================================================================== extern string transfer_buffer; extern string def_transfer_filename; extern string base_transfer_filename; extern void clear_transfer_form(); extern void read_transfer_buffer(string data); extern void cb_transfer_new(); extern void cb_transfer_import(); extern void cb_transfer_export(); extern void cb_transfer_wrap_import(string wrapfilename, string inpbuffer); extern int eval_transfer_fsize(); extern void cb_transfer_wrap_export(); extern void cb_transfer_wrap_autosend(); extern void cb_transfer_load_template(); extern void cb_transfer_save_template(); extern void cb_transfer_save_as_template(); extern void cb_transfer_open(); extern void write_transfer(string s); extern bool cb_transfer_save_as(); extern void cb_transfer_save(); extern void cb_transfer_msg_type(); extern void cb_transfer_html(); extern void cb_transfer_textout(); extern void cb_transfer_import_data(); extern void cb_transfer_export_data(); extern string def_custom_transfer_filename; extern void load_custom_html_file(); extern void load_custom_transfer(); extern void update_custom_transfer(); extern void cb_custom_form_wrap_import(string s1, string s2); extern int eval_transfer_custom_form_fsize(); extern void cb_transfer_custom_html(); extern void cb_save_custom_html(Fl_Widget *w, void *d); extern void cb_btn_select_custom_html(Fl_Widget *w, void *d); //===================================================================== // CAP 105 //===================================================================== extern string cap105_base_filename; extern string cap105_def_filename; extern string cap105_def_template_name; extern void cap105_cb_set_dtm(); extern void cap105_cb_set_rcvd_dtm(); extern void cap105_cb_set_sent_dtm(); extern void cap105_cb_nbr(Fl_Widget *wdg); extern void cap105_cb_filter_input(Fl_Widget *wdg); extern void cap105_clear_fields(); extern void cap105_set_choices(); extern bool cap105_check_fields(); extern void cap105_update_fields(); extern void cap105_clear_form(); extern void cap105_update_form(); extern void cap105_make_buffer(bool compress = false); extern void cap105_read_buffer(string data); extern void cap105_cb_new(); extern void cap105_cb_import(); extern void cap105_cb_export(); extern void cap105_cb_wrap_import(string wrapfilename, string inpbuffer); extern int eval_cap105_fsize(); extern void cap105_cb_wrap_export(); extern void cap105_cb_wrap_autosend(); extern void cap105_cb_load_template(); extern void cap105_cb_save_template(); extern void cap105_cb_save_as_template(); extern void cap105_cb_open(); extern void cap105_write(string s); extern bool cap105_cb_save_as(); extern void cap105_cb_save(); extern void cap105_cb_check(); extern void cap105_cb_html(); extern void cap105_cb_textout(); //===================================================================== // CAP 105 //===================================================================== extern string cap110_def_filename; extern string cap110_base_filename; extern string cap110_def_template_name; extern void cap110_set_date(); extern void clear_110fields(); extern bool check_110fields(); extern void update_110fields(); extern void update_110form(); extern void clear_110_form(); extern string &cap110_nn(string & subst, int n); extern void read_c110_buffer(string data); extern void cap110_cb_load_template(string data); extern void cap110_cb_new(); extern void cap110_cb_import(); extern void cap110_cb_export(); extern void cap110_cb_wrap_import(string wrapfilename, string inpbuffer); extern int eval_cap110_fsize(); extern void cap110_cb_wrap_export(); extern void cap110_cb_wrap_autosend(); extern void cap110_cb_load_template(); extern void cap110_cb_save_template(); extern void cap110_cb_save_as_template(); extern void cap110_cb_open(); extern void write_110(string s); extern bool cap110_cb_save_as(); extern void cap110_cb_save(); extern void cap110_cb_html(); extern void cap110_cb_msg_type(); extern void cap110_cb_textout(); #endif ����������������flmsg-2.0.10/src/include/Fl_Text_Display_mod.H������������������������������������������������������0000664�0001750�0001750�00000002130�12330516146�016036� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3 # include "Fl_Text_Display_mod_1_1.H" #elif FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 # include "Fl_Text_Display_mod_1_3.H" #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/hx_msgs.h������������������������������������������������������������������0000664�0001750�0001750�00000002015�12330516146�013657� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef hx_MSGS_H #define hx_MSGS_H struct hx_TEXT { const char *sznbr; const char *text; const char *instruct;}; extern hx_TEXT hx_list[]; #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/font_browser.h�������������������������������������������������������������0000664�0001750�0001750�00000005705�12330516146�014731� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Font_Browser.h v 0.0.1 2005-10-17 // // for the Fast Light Tool Kit (FLTK) 1.1.x . // // David Freese, w1hkj@w1hkj.com // based on similar widget by Mariwan Jalal // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef FONTBROWSER_H #define FONTBROWSER_H #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Widget.H> #include <FL/Fl_Browser.H> #include <FL/Fl_Button.H> #include <FL/Fl_Return_Button.H> #include "flslider2.h" // Preview box for showing font class Preview_Box : public Fl_Widget { private: int fontName; int fontSize; Fl_Color fontColor; void draw(); public: Preview_Box(int x, int y, int w, int h, const char* l); void SetFont( int fontname, int fontsize, Fl_Color c); }; // Font browser widget class Font_Browser : public Fl_Window { public: enum filter_t { FIXED_WIDTH, VARIABLE_WIDTH, ALL_TYPES }; private: int numfonts; Fl_Font fontnbr; int fontsize; Fl_Color fontcolor; filter_t filter; void *data_; Fl_Browser *lst_Font; Fl_Browser *lst_Size; Fl_Value_Input2 *txt_Size; Fl_Return_Button *btn_OK; Fl_Button *btn_Cancel; Fl_Button *btn_Color; Preview_Box *box_Example; void FontSort(); Fl_Callback* callback_; public: Font_Browser(int x = 100, int y = 100, int w = 430, int h = 225, const char *lbl = "Font Browser"); void callback(Fl_Callback* cb, void *d = 0) { callback_ = cb; data_ = d; } static void fb_callback(Fl_Widget* w, void* arg); void FontNameSelect(); void ColorSelect(); int numFonts() { return numfonts; } void fontNumber(Fl_Font n); Fl_Font fontNumber() { return fontnbr; } void fontSize(int s); int fontSize() { return fontsize; } void fontColor(Fl_Color c); Fl_Color fontColor() { return fontcolor; }; const char *fontName() { return lst_Font->text(lst_Font->value()); } void fontName(const char* n); static bool fixed_width(Fl_Font f); void fontFilter(filter_t filter); }; extern Font_Browser* font_browser; #endif �����������������������������������������������������������flmsg-2.0.10/src/include/iaru.h���������������������������������������������������������������������0000664�0001750�0001750�00000001706�12330516146�013155� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef RADIOGRAM_DEF #define RADIOGRAM_DEF #include "flmsg_dialog.h" #endif ����������������������������������������������������������flmsg-2.0.10/src/include/wrap.h���������������������������������������������������������������������0000664�0001750�0001750�00000002625�12330516146�013167� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef WRAP_H #define WRAP_H #include <string.h> #include <string> using namespace std; enum {BASE64, BASE128, BASE256}; extern void compress_maybe(string& input, bool file_transfer = false); extern void decompress_maybe(string& input); extern void export_wrapfile(string, string, string, bool with_ext); extern bool import_wrapfile(string fname, string &efname, string &text); extern void xfr_via_socket(string, string); extern string wrap_outfilename; extern void connect_to_fldigi(); extern void disconnect_from_fldigi(); #endif �����������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/threads.h������������������������������������������������������������������0000664�0001750�0001750�00000010115�12330516146�013641� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef THREADS_H_ #define THREADS_H_ #include <config.h> #include <pthread.h> #include <stdint.h> #include <semaphore.h> #if !HAVE_SEM_TIMEDWAIT # include <time.h> int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout); #endif int sem_timedwait_rel(sem_t* sem, double rel_timeout); int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout); enum { INVALID_TID = -1, TRX_TID, QRZ_TID, RIGCTL_TID, NORIGCTL_TID, #if USE_XMLRPC XMLRPC_TID, #endif ARQ_TID, ARQSOCKET_TID, FLMAIN_TID, NUM_THREADS, NUM_QRUNNER_THREADS = NUM_THREADS - 1 }; #ifdef __linux__ void linux_log_tid(void); # define LOG_THREAD_ID() linux_log_tid() #else # define LOG_THREAD_ID() /* nothing */ #endif #if USE_TLS # define THREAD_ID_TYPE __thread intptr_t # define CREATE_THREAD_ID() thread_id_ = INVALID_TID # define SET_THREAD_ID(x) do { thread_id_ = (x); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() thread_id_ #else # define THREAD_ID_TYPE pthread_key_t # define CREATE_THREAD_ID() pthread_key_create(&thread_id_, NULL) # define SET_THREAD_ID(x) do { pthread_setspecific(thread_id_, (const void *)(x + 1)); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() ((intptr_t)pthread_getspecific(thread_id_) - 1) #endif // USE_TLS extern THREAD_ID_TYPE thread_id_; #ifndef NDEBUG # include "debug.h" bool thread_in_list(int id, const int* list); # define ENSURE_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (!thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) # define ENSURE_NOT_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) #else # define ENSURE_THREAD(...) ((void)0) # define ENSURE_NOT_THREAD(...) ((void)0) #endif // ! NDEBUG // On POSIX systems we cancel threads by sending them SIGUSR2, // which will also interrupt blocking calls. On woe32 we use // pthread_cancel and there is no good/sane way to interrupt. #ifndef __WOE32__ # define SET_THREAD_CANCEL() \ do { \ sigset_t usr2; \ sigemptyset(&usr2); \ sigaddset(&usr2, SIGUSR2); \ pthread_sigmask(SIG_UNBLOCK, &usr2, NULL); \ } while (0) # define TEST_THREAD_CANCEL() /* nothing */ # define CANCEL_THREAD(t__) pthread_kill(t__, SIGUSR2) #else // threads have PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED when created # define SET_THREAD_CANCEL() /* nothing */ # define TEST_THREAD_CANCEL() pthread_testcancel() # define CANCEL_THREAD(t__) pthread_cancel(t__); #endif #include "fl_lock.h" /// This ensures that a mutex is always unlocked when leaving a function or block. class guard_lock { public: guard_lock(pthread_mutex_t* m); ~guard_lock(void); private: pthread_mutex_t* mutex; }; /// This wraps together a mutex and a condition variable which are used /// together very often for queues etc... class syncobj { pthread_mutex_t m_mutex ; pthread_cond_t m_cond ; public: syncobj(); ~syncobj(); pthread_mutex_t * mtxp(void) { return & m_mutex; } void signal(); bool wait( double seconds ); }; #endif // !THREADS_H_ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/compat.h�������������������������������������������������������������������0000664�0001750�0001750�00000004210�12330516146�013471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef COMPAT_H #define COMPAT_H /* adapted from compat.h in git-1.6.1.2 */ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX) # define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ # define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 #include <config.h> #include <unistd.h> #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> #include <stddef.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <errno.h> #include <limits.h> #include <sys/param.h> #include <sys/types.h> #include <sys/time.h> #include <time.h> #include <signal.h> #include <assert.h> #ifdef __WIN32__ # define dirent fl_dirent_no_thanks # else # include <dirent.h> # include <sys/utsname.h> # include <sys/ipc.h> # include <sys/msg.h> #endif #include "compat-mingw.h" #ifdef __cplusplus extern "C" { #endif #if SNPRINTF_RETURNS_BOGUS #define snprintf git_snprintf extern int git_snprintf(char *str, size_t maxsize, const char *format, ...); #define vsnprintf git_vsnprintf extern int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap); #endif #ifdef __cplusplus } #endif #endif // MINGW32_H ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/Fl_Text_Buffer_mod_1_3.H���������������������������������������������������0000664�0001750�0001750�00000065542�12330516146�016324� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // "$Id: Fl_Text_Buffer_mod.H 8148 2010-12-31 22:38:03Z matt $" // // Header file for Fl_Text_Buffer_mod class. // // Copyright 2001-2010 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- /* \file Fl_Text_Buffer_mod, Fl_Text_Selection_mod widget . */ #ifndef Fl_Text_Buffer_mod_H #define Fl_Text_Buffer_mod_H #undef ASSERT_UTF8 #ifdef ASSERT_UTF8 # include <assert.h> # define IS_UTF8_ALIGNED(a) if (a && *a) assert(fl_utf8len(*(a))>0); # define IS_UTF8_ALIGNED2(a, b) if (b>=0 && b<a->length()) assert(fl_utf8len(a->byte_at(b))>0); #else # define IS_UTF8_ALIGNED(a) # define IS_UTF8_ALIGNED2(a, b) #endif /* "character size" is the size of a UTF-8 character in bytes "character width" is the width of a Unicode character in pixels "column" was orginally defined as a character offset from the left margin. It was identical to the byte offset. In UTF-8, we have neither a byte offset nor truly fixed width fonts (*). Column could be a pixel value multiplied with an average character width (which is a bearable approximation). * in Unicode, there are no fixed width fonts! Even if the ASCII characters may happen to be all the same width in pixels, chinese charcaters surely are not. There are plenty of exceptions, like ligatures, that make special handling of "fixed" character widths a nightmare. I decided to remove all references to fixed fonts and see "columns" as a multiple of the average width of a character in the main font. - Matthias */ /* Maximum length in characters of a tab or control character expansion of a single buffer character */ #define FL_TEXT_MAX_EXP_CHAR_LEN 20 #include <FL/Fl_Export.H> /** \class Fl_Text_Selection_mod \brief This is an internal class for Fl_Text_Buffer_mod to manage text selections. This class works correctly with utf-8 strings assuming that the parameters for all calls are on character boundaries. */ class FL_EXPORT Fl_Text_Selection_mod { friend class Fl_Text_Buffer_mod; public: /** \brief Set the selection range. \param start byte offset to first selected character \param end byte offset pointing after last selected character */ void set(int start, int end); /** \brief Updates a selection afer text was modified. Updates an individual selection for changes in the corresponding text \param pos byte offset into text buffer at which the change occured \param nDeleted number of bytes deleted from the buffer \param nInserted number of bytes inserted into the buffer */ void update(int pos, int nDeleted, int nInserted); /** \brief Return the byte offset to the first selected character. \return byte offset */ int start() const { return mStart; } /** \brief Return the byte ofsset to the character after the last selected character. \return byte offset */ int end() const { return mEnd; } /** \brief Returns true if any text is selected. \return a non-zero number if any text has been selected, or 0 if no text is selected. */ bool selected() const { return mSelected; } /** \brief Modify the 'selected' flag. \param b new flag */ void selected(bool b) { mSelected = b; } /** Return true if position \p pos with indentation \p dispIndex is in the Fl_Text_Selection_mod. */ int includes(int pos) const; /** \brief Return the positions of this selection. \param start retrun byte offset to first selected character \param end retrun byte offset pointing after last selected character \return true if selected */ int position(int* start, int* end) const; protected: int mStart; ///< byte offset to the first selected character int mEnd; ///< byte offset to the character after the last selected character bool mSelected; ///< this flag is set if any text is selected }; typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); /** \brief This class manages unicode displayed in one or more Fl_Text_Display_mod widgets. All text in Fl_Text_Buffer_modmust be encoded in UTF-8. All indices used in the function calls must be aligned to the start of a UTF-8 sequence. All indices and pointers returned will be aligned. All functions that return a single character will return that in an unsiged int in UCS-4 encoding. The Fl_Text_Buffer_mod class is used by the Fl_Text_Display_mod and Fl_Text_Editor_mod to manage complex text data and is based upon the excellent NEdit text editor engine - see http://www.nedit.org/. */ class FL_EXPORT Fl_Text_Buffer_mod { public: /** Create an empty text buffer of a pre-determined size. \param requestedSize use this to avoid unnecessary re-allocation if you know exactly how much the buffer will need to hold \param preferredGapSize Initial size for the buffer gap (empty space in the buffer where text might be inserted if the user is typing sequential chars) */ Fl_Text_Buffer_mod(int requestedSize = 0, int preferredGapSize = 1024); /** Frees a text buffer */ ~Fl_Text_Buffer_mod(); /** \brief Returns the number of bytes in the buffer. \return size of text in bytes */ int length() const { return mLength; } /** \brief Get a copy of the entire contents of the text buffer. Memory is allocated to contain the returned string, which the caller must free. \return newly allocated text buffer - must be free'd, text is utf8 */ char* text() const; /** Replaces the entire contents of the text buffer. \param text Text must be valid utf8. */ void text(const char* text); /** \brief Get a copy of a part of the text buffer. Return a copy of the text between \p start and \p end character positions from text buffer \p buf. Positions start at 0, and the range does not include the character pointed to by \p end. When you are done with the text, free it using the free() function. \param start byte offset to first character \param end byte offset after last character in range \return newly allocated text buffer - must be free'd, text is utf8 */ char* text_range(int start, int end) const; /** Returns the character at the specified position pos in the buffer. Positions start at 0 \param pos byte offset into buffer, pos must be at acharacter boundary \return Unicode UCS-4 encoded character */ unsigned int char_at(int pos) const; /** Returns the raw byte at the specified position pos in the buffer. Positions start at 0 \param pos byte offset into buffer \return unencoded raw byte */ char byte_at(int pos) const; /** Convert a byte offset in buffer into a memory address. \param pos byte offset into buffer \return byte offset converted to a memory address */ const char *address(int pos) const { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } /** Convert a byte offset in buffer into a memory address. \param pos byte offset into buffer \return byte offset converted to a memory address */ char *address(int pos) { return (pos < mGapStart) ? mBuf+pos : mBuf+pos+mGapEnd-mGapStart; } /** Inserts null-terminated string \p text at position \p pos. \param pos insertion position as byte offset (must be utf-8 character aligned) \param text utf-8 encoded and nul terminated text */ void insert(int pos, const char* text); /** Appends the text string to the end of the buffer. \param t utf-8 encoded and nul terminated text */ void append(const char* t) { insert(length(), t); } /** Deletes a range of characters in the buffer. \param start byte offset to first character to be removed \param end byte offset to charcatre after last character to be removed */ void remove(int start, int end); /** Deletes the characters between \p start and \p end, and inserts the null-terminated string \p text in their place in the buffer. \param start byte offset to first character to be removed and new insert position \param end byte offset to charcatre after last character to be removed \param text utf-8 encoded and nul terminated text */ void replace(int start, int end, const char *text); /** Copies text from one buffer to this one. \param fromBuf source text buffer may be the same as this \param fromStart byte offset into buffer \param fromEnd byte offset into buffer \param toPos destination byte offset into buffer */ void copy(Fl_Text_Buffer_mod* fromBuf, int fromStart, int fromEnd, int toPos); /** Undo text modification according to the undo variables or insert text from the undo buffer */ int undo(int *cp=0); /** Lets the undo system know if we can undo changes */ void canUndo(char flag=1); /** Inserts a file at the specified position. Returns 0 on success, non-zero on error (strerror() contains reason). 1 indicates open for read failed (no data loaded). 2 indicates error occurred while reading data (data was partially loaded). File can be UTF-8 or CP1252-encoded. If the input file is not UTF-8-encoded, the Fl_Text_Buffer_mod widget will contain UTF-8-transcoded data. By default, the message Fl_Text_Buffer_mod::file_encoding_warning_message will warn the user about this. \see input_file_was_transcoded and transcoding_warning_action. */ int insertfile(const char *file, int pos, int buflen = 128*1024); /** Appends the named file to the end of the buffer. See also insertfile(). */ int appendfile(const char *file, int buflen = 128*1024) { return insertfile(file, length(), buflen); } /** Loads a text file into the buffer. See also insertfile(). */ int loadfile(const char *file, int buflen = 128*1024) { select(0, length()); remove_selection(); return appendfile(file, buflen); } /** Writes the specified portions of the file to a file. Returns 0 on success, non-zero on error (strerror() contains reason). 1 indicates open for write failed (no data saved). 2 indicates error occurred while writing data (data was partially saved). */ int outputfile(const char *file, int start, int end, int buflen = 128*1024); /** Saves a text file from the current buffer */ int savefile(const char *file, int buflen = 128*1024) { return outputfile(file, 0, length(), buflen); } /** Gets the tab width. */ int tab_distance() const { return mTabDist; } /** Set the hardware tab distance (width) used by all displays for this buffer, and used in computing offsets for rectangular selection operations. */ void tab_distance(int tabDist); /** Selects a range of characters in the buffer. */ void select(int start, int end); /** Returns a non 0 value if text has been selected, 0 otherwise */ int selected() const { return mPrimary.selected(); } /** Cancels any previous selection on the primary text selection object */ void unselect(); /** Gets the selection position */ int selection_position(int* start, int* end); /** Returns the currently selected text. When you are done with the text, free it using the free() function. */ char* selection_text(); /** Removes the text in the primary selection. */ void remove_selection(); /** Replaces the text in the primary selection. */ void replace_selection(const char* text); /** Selects a range of characters in the secondary selection. */ void secondary_select(int start, int end); /** Returns a non 0 value if text has been selected in the secondary text selection, 0 otherwise */ int secondary_selected() { return mSecondary.selected(); } /** Clears any selection in the secondary text selection object. */ void secondary_unselect(); /** Returns the current selection in the secondary text selection object. */ int secondary_selection_position(int* start, int* end); /** Returns the text in the secondary selection. When you are done with the text, free it using the free() function. */ char* secondary_selection_text(); /** Removes the text from the buffer corresponding to the secondary text selection object. */ void remove_secondary_selection(); /** Replaces the text from the buffer corresponding to the secondary text selection object with the new string \p text. */ void replace_secondary_selection(const char* text); /** Highlights the specified text within the buffer. */ void highlight(int start, int end); /** Returns the highlighted text. When you are done with the text, free it using the free() function. */ int highlight() { return mHighlight.selected(); } /** Unhighlights text in the buffer. */ void unhighlight(); /** Highlights the specified text between \p start and \p end within the buffer. */ int highlight_position(int* start, int* end); /** Returns the highlighted text. When you are done with the text, free it using the free() function. */ char* highlight_text(); /** Adds a callback function that is called whenever the text buffer is modified. The callback function is declared as follows: \code typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, int nRestyled, const char* deletedText, void* cbArg); \endcode */ void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); /** Removes a modify callback. */ void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); /** Calls all modify callbacks that have been registered using the add_modify_callback() method. */ void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } /** Adds a callback routine to be called before text is deleted from the buffer. */ void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg); /** Removes a callback routine \p bufPreDeleteCB associated with argument \p cbArg to be called before text is deleted from the buffer. */ void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg); /** Calls the stored pre-delete callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } /** Returns the text from the entire line containing the specified character position. When you are done with the text, free it using the free() function. \param pos byte index into buffer \return copy of utf8 text, must be free'd */ char* line_text(int pos) const; /** Returns the position of the start of the line containing position \p pos. \param pos byte index into buffer \return byte offset to line start */ int line_start(int pos) const; /** Finds and returns the position of the end of the line containing position \p pos (which is either a pointer to the newline character ending the line, or a pointer to one character beyond the end of the buffer) \param pos byte index into buffer \return byte offset to line end */ int line_end(int pos) const; /** Returns the position corresponding to the start of the word \param pos byte index into buffer \return byte offset to word start */ int word_start(int pos) const; /** Returns the position corresponding to the end of the word. \param pos byte index into buffer \return byte offset to word end */ int word_end(int pos) const; /** Count the number of displayed characters between buffer position \p lineStartPos and \p targetPos. (displayed characters are the characters shown on the screen to represent characters in the buffer, where tabs and control characters are expanded) */ int count_displayed_characters(int lineStartPos, int targetPos) const; /** Count forward from buffer position \p startPos in displayed characters (displayed characters are the characters shown on the screen to represent characters in the buffer, where tabs and control characters are expanded) \param lineStartPos byte offset into buffer \param nChars number of bytes that are sent to the display \return byte offset in input after all output bytes are sent */ int skip_displayed_characters(int lineStartPos, int nChars); /** Counts the number of newlines between \p startPos and \p endPos in buffer. The character at position \p endPos is not counted. */ int count_lines(int startPos, int endPos) const; /** Finds the first character of the line \p nLines forward from \p startPos in the buffer and returns its position */ int skip_lines(int startPos, int nLines); /** Finds and returns the position of the first character of the line \p nLines backwards from \p startPos (not counting the character pointed to by \p startpos if that is a newline) in the buffer. \p nLines == 0 means find the beginning of the line */ int rewind_lines(int startPos, int nLines); /** Finds the next occurrence of the specified character. Search forwards in buffer for character \p searchChar, starting with the character \p startPos, and returning the result in \p foundPos returns 1 if found, 0 if not. (The difference between this and BufSearchForward is that it's optimized for single characters. The overall performance of the text widget is dependent on its ability to count lines quickly, hence searching for a single character: newline) \param startPos byte offset to start position \param searchChar UCS-4 character that we want to find \param foundPos byte offset where the character was found \return 1 if found, 0 if not */ int findchar_forward(int startPos, unsigned searchChar, int* foundPos) const; /** Search backwards in buffer \p buf for character \p searchChar, starting with the character BEFORE \p startPos, returning the result in \p foundPos returns 1 if found, 0 if not. (The difference between this and BufSearchBackward is that it's optimized for single characters. The overall performance of the text widget is dependent on its ability to count lines quickly, hence searching for a single character: newline) \param startPos byte offset to start position \param searchChar UCS-4 character that we want to find \param foundPos byte offset where the character was found \return 1 if found, 0 if not */ int findchar_backward(int startPos, unsigned int searchChar, int* foundPos) const; /** Search forwards in buffer for string \p searchString, starting with the character \p startPos, and returning the result in \p foundPos returns 1 if found, 0 if not. \param startPos byte offset to start position \param searchString utf8 string that we want to find \param foundPos byte offset where the string was found \param matchCase if set, match character case \return 1 if found, 0 if not */ int search_forward(int startPos, const char* searchString, int* foundPos, int matchCase = 0) const; /** Search backwards in buffer for string <i>searchCharssearchString</i>, starting with the character BEFORE \p startPos, returning the result in \p foundPos returns 1 if found, 0 if not. \param startPos byte offset to start position \param searchString utf8 string that we want to find \param foundPos byte offset where the string was found \param matchCase if set, match character case \return 1 if found, 0 if not */ int search_backward(int startPos, const char* searchString, int* foundPos, int matchCase = 0) const; int findchars_forward(int startPos, const char* searchChars, int* foundPos); int findchars_backward(int startPos, const char* searchChars, int* foundPos); /** Returns the primary selection. */ const Fl_Text_Selection_mod* primary_selection() const { return &mPrimary; } /** Returns the primary selection. */ Fl_Text_Selection_mod* primary_selection() { return &mPrimary; } /** Returns the secondary selection. */ const Fl_Text_Selection_mod* secondary_selection() const { return &mSecondary; } /** Returns the current highlight selection. */ const Fl_Text_Selection_mod* highlight_selection() const { return &mHighlight; } /** Returns the index of the previous character. \param ix index to the current char */ int prev_char(int ix) const; int prev_char_clipped(int ix) const; /** Returns the index of the next character. \param ix index to the current char */ int next_char(int ix) const; int next_char_clipped(int ix) const; /** Align an index into the buffer to the current or previous utf8 boundary. */ int utf8_align(int) const; /** \brief true iff the loaded file has been transcoded to UTF-8 */ int input_file_was_transcoded; /** This message may be displayed using the fl_alert() function when a file which was not UTF-8 encoded is input. */ static const char* file_encoding_warning_message; /** \brief Pointer to a function called after reading a non UTF-8 encoded file. This function is called after reading a file if the file content was transcoded to UTF-8. Its default implementation calls fl_alert() with the text of \ref file_encoding_warning_message. No warning message is displayed if this pointer is set to NULL. Use \ref input_file_was_transcoded to be informed if file input required transcoding to UTF-8. */ void (*transcoding_warning_action)(Fl_Text_Buffer_mod*); protected: /** Calls the stored modify callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_modify_callbacks(int pos, int nDeleted, int nInserted, int nRestyled, const char* deletedText) const; /** Calls the stored pre-delete callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners. */ void call_predelete_callbacks(int pos, int nDeleted) const; /** Internal (non-redisplaying) version of BufInsert. Returns the length of text inserted (this is just strlen(\p text), however this calculation can be expensive and the length will be required by any caller who will continue on to call redisplay). \p pos must be contiguous with the existing text in the buffer (i.e. not past the end). \return the number of bytes inserted */ int insert_(int pos, const char* text); /** Internal (non-redisplaying) version of BufRemove. Removes the contents of the buffer between start and end (and moves the gap to the site of the delete). */ void remove_(int start, int end); /** Calls the stored redisplay procedure(s) for this buffer to update the screen for a change in a selection. */ void redisplay_selection(Fl_Text_Selection_mod* oldSelection, Fl_Text_Selection_mod* newSelection) const; /** Move the gap to start at a new position. */ void move_gap(int pos); /** Reallocates the text storage in the buffer to have a gap starting at \p newGapStart and a gap size of \p newGapLen, preserving the buffer's current contents. */ void reallocate_with_gap(int newGapStart, int newGapLen); char* selection_text_(Fl_Text_Selection_mod* sel) const; /** Removes the text from the buffer corresponding to \p sel. */ void remove_selection_(Fl_Text_Selection_mod* sel); /** Replaces the \p text in selection \p sel. */ void replace_selection_(Fl_Text_Selection_mod* sel, const char* text); /** Updates all of the selections in the buffer for changes in the buffer's text */ void update_selections(int pos, int nDeleted, int nInserted); Fl_Text_Selection_mod mPrimary; /**< highlighted areas */ Fl_Text_Selection_mod mSecondary; /**< highlighted areas */ Fl_Text_Selection_mod mHighlight; /**< highlighted areas */ int mLength; /**< length of the text in the buffer (the length of the buffer itself must be calculated: gapEnd - gapStart + length) */ char* mBuf; /**< allocated memory where the text is stored */ int mGapStart; /**< points to the first character of the gap */ int mGapEnd; /**< points to the first char after the gap */ // The hardware tab distance used by all displays for this buffer, // and used in computing offsets for rectangular selection operations. int mTabDist; /**< equiv. number of characters in a tab */ int mNModifyProcs; /**< number of modify-redisplay procs attached */ Fl_Text_Modify_Cb *mModifyProcs;/**< procedures to call when buffer is modified to redisplay contents */ void** mCbArgs; /**< caller arguments for modifyProcs above */ int mNPredeleteProcs; /**< number of pre-delete procs attached */ Fl_Text_Predelete_Cb *mPredeleteProcs; /**< procedure to call before text is deleted from the buffer; at most one is supported. */ void **mPredeleteCbArgs; /**< caller argument for pre-delete proc above */ int mCursorPosHint; /**< hint for reasonable cursor position after a buffer modification operation */ char mCanUndo; /**< if this buffer is used for attributes, it must not do any undo calls */ int mPreferredGapSize; /**< the default allocation for the text gap is 1024 bytes and should only be increased if frequent and large changes in buffer size are expected */ }; #endif // // End of "$Id: Fl_Text_Buffer_mod.H 8148 2010-12-31 22:38:03Z matt $". // ��������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/mingw.h��������������������������������������������������������������������0000664�0001750�0001750�00000005140�12330516146�013332� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef MINGW_H_ #define MINGW_H_ #include <sys/types.h> #include <pthread.h> #include <winsock2.h> #ifdef __cplusplus extern "C" { #endif typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #ifndef EADDRINUSE # define EADDRINUSE WSAEADDRINUSE #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include <io.h> #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/flmisc.h�������������������������������������������������������������������0000664�0001750�0001750�00000005512�12330516146�013471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // flmisc.h // // Copyright (C) 2009-2010 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef fl_misc_h_ #define fl_misc_h_ #include <config.h> #include <FL/Enumerations.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_Window.H> #include <FL/Fl_Box.H> #include <FL/Fl_Dial.H> #include <FL/Fl_Dial.H> #include <FL/Fl_Return_Button.H> #include "flinput2.h" unsigned quick_choice_menu(const char* title, unsigned sel, const Fl_Menu_Item* menu); unsigned quick_choice(const char* title, unsigned sel, ...); Fl_Color adjust_color(Fl_Color fg, Fl_Color bg); void adjust_color_inv(unsigned char& bg1r, unsigned char& bg1g, unsigned char& bg1b, Fl_Color bg2, Fl_Color def); #if !defined(__APPLE__) && !defined(__WOE32__) # include <FL/x.H> void make_pixmap(Pixmap *xpm, const char **data, int argc, char** argv); #endif class notify_dialog : public Fl_Window { Fl_Box icon; Fl_Input2 message; Fl_Dial dial; Fl_Return_Button button; Fl_Box resize_box; bool delete_on_hide; public: notify_dialog(int X = 410, int Y = 103, const char* l = 0); ~notify_dialog(); int handle(int event); Fl_Button* make_button(int W, int H = 23); void notify(const char* msg, double timeout, bool delete_on_hide_ = false); private: static void button_cb(Fl_Widget* w, void*); static void dial_timer(void* arg); int newx; }; #ifdef BUILD_FLDIGI #include <FL/Fl_Double_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Check_Browser.H> #include "globals.h" class Mode_Browser : public Fl_Double_Window { public: Mode_Browser(void); ~Mode_Browser(void); void show(mode_set_t* b); void callback(Fl_Callback* cb, void* args = 0); private: Fl_Button *close_button, *all_button, *none_button; Fl_Check_Browser* modes; mode_set_t* store; Fl_Callback* changed_cb; void* changed_args; static void modes_cb(Fl_Widget* w, void* arg); static void button_cb(Fl_Widget* w, void* arg); }; #endif // BUILD_FLDIGI #endif // fl_misc_h_ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/include/compat-mingw.h�������������������������������������������������������������0000664�0001750�0001750�00000005135�12330516146�014617� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef MINGW_H_ #define MINGW_H_ #include <sys/types.h> #include <pthread.h> #include <winsock2.h> #ifdef __cplusplus extern "C" { #endif typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #ifndef EADDRINUSE # define EADDRINUSE WSAEADDRINUSE #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include <io.h> #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�012457� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/radiogram.cxx������������������������������������������������������������0000664�0001750�0001750�00000062235�12330516146�015063� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #include "arl_msgs.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string base_rg_filename = ""; string def_rg_filename = ""; string def_rg_TemplateName = ""; // Radiogram rgfields const char *s_prec[] = { "ROUTINE", "WELFARE", "PRIORITY", "EMERGENCY", "TEST ROUTINE", "TEST WELFARE", "TEST PRIORITY", "TEST EMERGENCY"}; const char precitems[] = "ROUTINE|WELFARE|PRIORITY|EMERGENCY|\ TEST ROUTINE|TEST WELFARE|TEST PRIORITY|TEST EMERGENCY"; const char *s_hx[] = {"", "HXA", "HXB", "HXC", "HXD", "HXE", "HXF", "HXG"}; const char hxitems[] = " |HXA|HXB|HXC|HXD|HXE|HXF|HXG"; // compatibility fields required to read older data files string a_rg_nbr = "<nbr:"; // 0. string a_rg_prec = "<prec:"; // 1. string a_rg_hx = "<hx:"; // 2. string a_rg_d1 = "<d1:"; // 3. string a_rg_t1 = "<t1:"; // 4. string a_rg_dt2 = "<dt2:"; // 5. string a_rg_dt3 = "<dt3:"; // 6. string a_rg_to = "<to:"; // 7. string a_rg_phone = "<tel:"; // 8. string a_rg_opnote = "<opn:"; // 9 string a_rg_msg = "<msg:"; // 10. string a_rg_sig = "<sig:"; // 11. string a_rg_opnote2 = "<op2:"; // 12 string a_rg_check = "<ck:"; // 13. string a_rg_station = "<sta:"; // 14. string a_rg_place = "<org:"; // 15 string a_rg_orig = "<ori:"; // 16 string a_rg_dlvd_to = "<dlv:"; // 17 string a_rg_sent_to = "<sto:"; // 18 string a_rg_snt_net = "<snt:"; // 19 string a_rg_dt4 = "<dt4:"; // 20 string a_rg_rcv_fm = "<rfm:"; // 21 string a_rg_rcv_net = "<rnt:"; // 22 string a_rg_dt5 = "<dt5:"; // 23 string a_rg_svc = "<svc:"; // 24 FIELD argfields[] = { { a_rg_nbr, "", (void **)&txt_rg_nbr, 't' }, // 0 { a_rg_prec, "0", (void **)&sel_rg_prec, 's' }, // 1 { a_rg_hx, "", (void **)&txt_rg_hx, 't' }, // 2 { a_rg_d1, "", (void **)&txt_rg_d1, 't' }, // 3 { a_rg_t1, "", (void **)&txt_rg_t1, 't' }, // 4 { a_rg_dt2, "", (void **)&txt_rg_dt2, 't' }, // 5 { a_rg_dt3, "", (void **)&txt_rg_dt3, 't' }, // 6 { a_rg_to, "", (void **)&txt_rg_to, 't' }, // 7 { a_rg_phone, "", (void **)&txt_rg_phone, 't' }, // 8 { a_rg_opnote, "", (void **)&txt_rg_opnote, 't' }, // 9 { a_rg_msg, "", (void **)&txt_rg_msg, 'e' }, // 10 { a_rg_sig, "", (void **)&txt_rg_sig, 't' }, // 11 { a_rg_opnote2, "", (void **)&txt_rg_opnote2,'t' }, // 12 { a_rg_check, "", (void **)&txt_rg_check, 't' }, // 13 { a_rg_station, "", (void **)&txt_rg_station,'t' }, // 14 { a_rg_place, "", (void **)&txt_rg_place, 't' }, // 15 { a_rg_orig, "", (void **)&txt_rg_orig, 't' }, // 16 { a_rg_dlvd_to, "", (void **)&txt_rg_dlvd_to,'t' }, // 17 { a_rg_sent_to, "", (void **)&txt_rg_sent_to,'t' }, // 18 { a_rg_snt_net, "", (void **)&txt_rg_snt_net,'t' }, // 19 { a_rg_dt4, "", (void **)&txt_rg_dt4, 't' }, // 20 { a_rg_rcv_fm, "", (void **)&txt_rg_rcv_fm, 't' }, // 21 { a_rg_rcv_net, "", (void **)&txt_rg_rcv_net,'t' }, // 22 { a_rg_dt5, "", (void **)&txt_rg_dt5, 't' }, // 23 { a_rg_svc, "", (void **)&btn_rg_svc, 'b' } // 24 }; // new tag strings string _rg_nbr = ":nbr:"; // 0. string _rg_prec = ":prec:"; // 1. string _rg_hx = ":hx:"; // 2. string _rg_d1 = ":d1:"; // 3. string _rg_t1 = ":t1:"; // 4. string _rg_dt2 = ":dt2:"; // 5. string _rg_dt3 = ":dt3:"; // 6. string _rg_to = ":to:"; // 7. string _rg_phone = ":tel:"; // 8. string _rg_opnote = ":opn:"; // 9 string _rg_msg = ":msg:"; // 10. string _rg_sig = ":sig:"; // 11. string _rg_opnote2 = ":op2:"; // 12 string _rg_check = ":ck:"; // 13. string _rg_station = ":sta:"; // 14. string _rg_place = ":org:"; // 15 string _rg_orig = ":ori:"; // 16 string _rg_dlvd_to = ":dlv:"; // 17 string _rg_sent_to = ":sto:"; // 18 string _rg_snt_net = ":snt:"; // 19 string _rg_dt4 = ":dt4:"; // 20 string _rg_rcv_fm = ":rfm:"; // 21 string _rg_rcv_net = ":rnt:"; // 22 string _rg_dt5 = ":dt5:"; // 23 string _rg_svc = ":svc:"; // 24 string _rg_standard = ":std:"; // 25 FIELD rgfields[] = { { _rg_nbr, "", (void **)&txt_rg_nbr, 't' }, // 0 { _rg_prec, "0", (void **)&sel_rg_prec, 's' }, // 1 { _rg_hx, "", (void **)&txt_rg_hx, 't' }, // 2 { _rg_d1, "", (void **)&txt_rg_d1, 't' }, // 3 { _rg_t1, "", (void **)&txt_rg_t1, 't' }, // 4 { _rg_dt2, "", (void **)&txt_rg_dt2, 't' }, // 5 { _rg_dt3, "", (void **)&txt_rg_dt3, 't' }, // 6 { _rg_to, "", (void **)&txt_rg_to, 't' }, // 7 { _rg_phone, "", (void **)&txt_rg_phone, 't' }, // 8 { _rg_opnote, "", (void **)&txt_rg_opnote, 't' }, // 9 { _rg_msg, "", (void **)&txt_rg_msg, 'e' }, // 10 { _rg_sig, "", (void **)&txt_rg_sig, 't' }, // 11 { _rg_opnote2, "", (void **)&txt_rg_opnote2, 't' }, // 12 { _rg_check, "", (void **)&txt_rg_check, 't' }, // 13 { _rg_station, "", (void **)&txt_rg_station, 't' }, // 14 { _rg_place, "", (void **)&txt_rg_place, 't' }, // 15 { _rg_orig, "", (void **)&txt_rg_orig, 't' }, // 16 { _rg_dlvd_to, "", (void **)&txt_rg_dlvd_to, 't' }, // 17 { _rg_sent_to, "", (void **)&txt_rg_sent_to, 't' }, // 18 { _rg_snt_net, "", (void **)&txt_rg_snt_net, 't' }, // 19 { _rg_dt4, "", (void **)&txt_rg_dt4, 't' }, // 20 { _rg_rcv_fm, "", (void **)&txt_rg_rcv_fm, 't' }, // 21 { _rg_rcv_net, "", (void **)&txt_rg_rcv_net, 't' }, // 22 { _rg_dt5, "", (void **)&txt_rg_dt5, 't' }, // 23 { _rg_svc, "F", (void **)&btn_rg_svc, 'b' }, // 24 { _rg_standard, "T", (void **)&btn_rg_standard, 'B' } // 25 }; bool using_rg_template = false; int num_rgfields = sizeof(rgfields) / sizeof(FIELD); int fld_nbr(string &fld) { for (int i = 0; i < num_rgfields; i++) if (fld == rgfields[i].f_type) return i; printf("err %s\n", fld.c_str()); exit(1); } //====================================================================== void cb_rgSetDate1() { txt_rg_d1->value(szAbbrevDate()); } void cb_rgSetTime1() { txt_rg_t1->value(szTime(progStatus.UTC <= 1 ? 0 : 2)); } void cb_rgSetDateTime2() { txt_rg_dt2->value(szDateTime()); } void cb_rgSetDateTime3() { txt_rg_dt3->value(szDateTime()); } void cb_rgSetDateTime4() { txt_rg_dt4->value(szDateTime()); } void cb_rgSetDateTime5() { txt_rg_dt5->value(szDateTime()); } void cb_rg_nbr(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; string s = inp->value(); for (size_t n = 0; n < s.length(); n++) if (!isdigit(s[n])) s.erase(n,1); strip_leading_zeros(s); inp->value(s.c_str()); } static char valid_input[] = "0123456789/ ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"; void cb_rg_filter_input(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; int p = inp->position(); string s = inp->value(); ucase(s); for (size_t n = 0; n < s.length(); n++) if (strchr(valid_input, s[n]) == NULL) s.erase(n,1); inp->value(s.c_str()); inp->position(p); } void clear_rgfields() { for (int i = 0; i < num_rgfields; i++) { switch (rgfields[i].w_type) { case 's': rgfields[i].f_data = "0"; break; case 'b': rgfields[i].f_data = "F"; break; case 'B': rgfields[i].f_data = "T"; break; default: rgfields[i].f_data.clear(); } } } string numeric(int n) { static char snum[10]; snprintf(snum, sizeof(snum), "%d", n); return snum; } void set_rg_choices() { sel_rg_prec->clear(); sel_rg_prec->add(precitems); sel_rg_prec->index(0); } bool check_rgfields() { string temp; for (int i = 0; i < num_rgfields; i++) { if (rgfields[i].w == NULL) return false; if (rgfields[i].w_type == 'd') { if (rgfields[i].f_data != ((Fl_DateInput *)(*rgfields[i].w))->value()) return true; } else if (rgfields[i].w_type == 't') { if (rgfields[i].f_data != ((Fl_Input2 *)(*rgfields[i].w))->value()) return true; } else if (rgfields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*rgfields[i].w))->index(); if (rgfields[i].f_data != numeric(choice)) return true; } else if (rgfields[i].w_type == 'e') { if (rgfields[i].f_data != ((FTextEdit *)(*rgfields[i].w))->buffer()->text()) return true; } else if (rgfields[i].w_type == 'b') { temp = ((Fl_Button *)(*rgfields[i].w))->value() ? "T" : "F"; if (rgfields[i].f_data != temp) return true; } else if (rgfields[i].w_type == 'B'){ temp = ((Fl_Button *)(*rgfields[i].w))->value() ? "T" : "F"; if (rgfields[i].f_data != temp) return true; } } return false; } void update_rgfields() { for (int i = 0; i < num_rgfields; i++) { if (rgfields[i].w_type == 'd') rgfields[i].f_data = ((Fl_DateInput *)(*rgfields[i].w))->value(); else if (rgfields[i].w_type == 't') rgfields[i].f_data = ((Fl_Input2 *)(*rgfields[i].w))->value(); else if (rgfields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*rgfields[i].w))->index(); if (choice >= 0) rgfields[i].f_data = numeric(choice); } else if (rgfields[i].w_type == 'e') rgfields[i].f_data = ((FTextEdit *)(*rgfields[i].w))->buffer()->text(); else if (rgfields[i].w_type == 'b') rgfields[i].f_data = ((Fl_Button *)(*rgfields[i].w))->value() ? "T" : "F"; else if (rgfields[i].w_type == 'B') rgfields[i].f_data = ((Fl_Button *)(*rgfields[i].w))->value() ? "T" : "F"; } } void clear_rg_form() { clear_rgfields(); if (progStatus.rgnbr_fname) txt_rg_nbr->value(progStatus.rgnbr.c_str()); else txt_rg_nbr->value(""); for (int i = 1; i < num_rgfields; i++) if (rgfields[i].w_type == 'd') ((Fl_DateInput *)(*rgfields[i].w))->value(""); else if (rgfields[i].w_type == 't') ((Fl_Input2 *)(*rgfields[i].w))->value(""); else if (rgfields[i].w_type == 's') ((Fl_ListBox *)(*rgfields[i].w))->index(0); else if (rgfields[i].w_type == 'e') ((FTextEdit *)(*rgfields[i].w))->clear(); else if (rgfields[i].w_type == 'b') ((Fl_Button *)(*rgfields[i].w))->value(0); else if (rgfields[i].w_type == 'B') ((Fl_Button *)(*rgfields[i].w))->value(1); update_rgfields(); } void update_rg_form() { for (int i = 0; i < num_rgfields; i++) { if (rgfields[i].w_type == 'd') ((Fl_DateInput *)(*rgfields[i].w))->value(rgfields[i].f_data.c_str()); else if (rgfields[i].w_type == 't') ((Fl_Input2 *)(*rgfields[i].w))->value(rgfields[i].f_data.c_str()); else if (rgfields[i].w_type == 's') ((Fl_ListBox *)(*rgfields[i].w))->index(atoi(rgfields[i].f_data.c_str())); else if (rgfields[i].w_type == 'e') { ((FTextEdit *)(*rgfields[i].w))->clear(); ((FTextEdit *)(*rgfields[i].w))->add(rgfields[i].f_data.c_str()); } else if (rgfields[i].w_type == 'b') ((Fl_Button *)(*rgfields[i].w))->value(rgfields[i].f_data == "T" ? 1 : 0); else if (rgfields[i].w_type == 'B') ((Fl_Button *)(*rgfields[i].w))->value(rgfields[i].f_data == "T" ? 1 : 0); } } void make_rg_buffer(bool compress = false) { string mbuff; mbuff.clear(); for (int i = 0; i < num_rgfields; i++) mbuff.append( lineout( rgfields[i].f_type, rgfields[i].f_data ) ); if (compress) compress_maybe(mbuff); buffer.append(mbuff); } void read_rg_buffer(string data) { bool data_ok = false; clear_fields(); read_header(data); string temp; for (int i = 0; i < num_rgfields; i++) { temp = findstr(data, rgfields[i].f_type); if (!temp.empty()) rgfields[i].f_data = temp; if (!rgfields[i].f_data.empty()) data_ok = true; } if (!data_ok) for (int i = 0; i < num_rgfields; i++) rgfields[i].f_data = findstr(data, argfields[i].f_type); update_rg_form(); } void cb_rg_new() { if (check_rgfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_rg_save(); } } clear_rg_form(); clear_header(); def_rg_filename = ICS_msg_dir; def_rg_filename.append("new"RGFILE_EXT); using_rg_template = false; show_filename(def_rg_filename); } void cb_rg_import() { string def_rg_filename = ICS_dir; def_rg_filename.append("DEFAULT.XML"); const char *p = FSEL::select( "Open Qforms xml file", "Qforms xml\t*.{xml,XML}", def_rg_filename.c_str()); if (p){ clear_rg_form(); qform_rg_import(p); using_rg_template = false; } } void cb_rg_export() { string exp_rgFileName = ICS_dir; exp_rgFileName.append(base_rg_filename); exp_rgFileName.append(".XML"); const char *p = FSEL::saveas( "Open Qforms xml file", "Qforms xml\t*.{xml,XML}", exp_rgFileName.c_str()); if (p) { const char *pext = fl_filename_ext(p); exp_rgFileName = p; if (strlen(pext) == 0) exp_rgFileName.append(".XML"); qform_rg_export(exp_rgFileName); } } void cb_rg_wrap_import(string wrapfilename, string inpbuffer) { clear_rg_form(); read_rg_buffer(inpbuffer); def_rg_filename = ICS_msg_dir; def_rg_filename.append(wrapfilename); show_filename(def_rg_filename); using_rg_template = false; } int eval_rg_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_rg_filename).append("]"); update_rgfields(); update_header(FROM); evalstr.append(header("<radiogram>")); buffer.clear(); make_rg_buffer(true); if (buffer.empty()) return 0; evalstr.append( buffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_rg_wrap_export() { if (btn_rg_check->labelcolor() == FL_RED) cb_rg_check(); if (check_rgfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_rgfields(); if (base_rg_filename == "new"RGFILE_EXT || base_rg_filename == "default"RGFILE_EXT) if (!cb_rg_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_rg_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrapped radiogram file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { if (btn_rg_check->labelcolor() == FL_RED) cb_rg_check(); string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffer.assign(header("<radiogram>")); make_rg_buffer(true); export_wrapfile(base_rg_filename, wrapfilename, buffer, pext != WRAP_EXT); buffer.assign(header("<radiogram>")); make_rg_buffer(false); write_rg(def_rg_filename); } } void cb_rg_wrap_autosend() { if (btn_rg_check->labelcolor() == FL_RED) cb_rg_check(); if (check_rgfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_rgfields(); if (base_rg_filename == "new"RGFILE_EXT || base_rg_filename == "default"RGFILE_EXT) if (!cb_rg_save_as()) return; update_header(FROM); buffer.assign(header("<radiogram>")); make_rg_buffer(true); xfr_via_socket(base_rg_filename, buffer); buffer.assign(header("<radiogram>")); make_rg_buffer(false); write_rg(def_rg_filename); } void cb_rg_load_template() { string def_rg_filename = def_rg_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"RGTEMP_EXT, def_rg_filename.c_str()); if (p) { clear_rg_form(); read_data_file(p); def_rg_TemplateName = p; show_filename(def_rg_TemplateName); using_rg_template = true; } } void cb_rg_save_template() { if (!using_rg_template) { cb_rg_save_as_template(); return; } string def_rg_filename = def_rg_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"RGTEMP_EXT, def_rg_filename.c_str()); if (p) { update_header(CHANGED); update_rgfields(); buffer.assign(header("<radiogram>")); make_rg_buffer(); write_rg(p); } } void cb_rg_save_as_template() { string def_rg_filename = def_rg_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"RGTEMP_EXT, def_rg_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_rg_TemplateName = p; if (strlen(pext) == 0) def_rg_TemplateName.append(RGTEMP_EXT); remove_spaces_from_filename(def_rg_TemplateName); clear_header(); update_header(CHANGED); buffer.assign(header("<radiogram>")); make_rg_buffer(); write_rg(def_rg_TemplateName); show_filename(def_rg_TemplateName); using_rg_template = true; } } void cb_rg_open() { const char *p = FSEL::select(_("Open data file"), "radiogram\t*"RGFILE_EXT, def_rg_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_rg_form(); read_data_file(p); using_rg_template = false; def_rg_filename = p; show_filename(def_rg_filename); } void write_rg(string s) { FILE *rgfile = fopen(s.c_str(), "w"); if (!rgfile) return; fwrite(buffer.c_str(), buffer.length(), 1, rgfile); fclose(rgfile); } bool cb_rg_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(RGFILE_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_rg_filename; p = FSEL::saveas(_("Save data file"), "radiogram\t*"RGFILE_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.rgnbr_fname) { int n = atoi(progStatus.rgnbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.rgnbr = szn; txt_rgnbr->value(szn); txt_rgnbr->redraw(); } else if (progStatus.sernbr_fname) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } const char *pext = fl_filename_ext(p); def_rg_filename = p; if (strlen(pext) == 0) def_rg_filename.append(RGFILE_EXT); remove_spaces_from_filename(def_rg_filename); update_header(NEW); update_rgfields(); buffer.assign(header("<radiogram>")); make_rg_buffer(); write_rg(def_rg_filename); using_rg_template = false; show_filename(def_rg_filename); return true; } void cb_rg_save() { if (base_rg_filename == "new"RGFILE_EXT || base_rg_filename == "default"RGFILE_EXT || using_rg_template == true) { cb_rg_save_as(); return; } if (check_rgfields()) update_header(CHANGED); update_rgfields(); buffer.assign(header("<radiogram>")); make_rg_buffer(); write_rg(def_rg_filename); using_rg_template = false; } const char *punctuation[] = { ". ", " X ", ",", " COMMA ", "?", " QUERY ", "\\", " BACKSLASH ", "://", " COLON SLASH SLASH ", "~", " TILDE ", "_", " UNDERSCORE ", "@", " AT ", "#", " POUNDSIGN ", "\"", " QUOTE ", "\'", "", 0, 0 }; void cb_rg_check() { string temp = txt_rg_msg->buffer()->text(); if (temp.empty()) { txt_rg_check->value(""); btn_rg_check->labelcolor(FL_BLACK); btn_rg_check->redraw_label(); return; } size_t pos = string::npos; if (btn_rg_standard->value()) { // convert to uppercase for (size_t n = 0; n < temp.length(); n++) temp[n] = toupper(temp[n]); strip_lfs(temp); // remove trailing period if (temp[temp.length()-1] == '.') temp.erase(temp.length()-1,1); // convert punctuation for (int n = 0; punctuation[n]; n += 2) while ((pos = temp.find(punctuation[n])) != string::npos) temp.replace(pos, strlen(punctuation[n]), punctuation[n+1]); //convert embedded periods while ((pos = temp.find(".")) != string::npos) if (isdigit(temp[pos-1]) || isdigit(temp[pos+1])) temp[pos] = 'R'; else temp.replace(pos, 1, " DOT "); } // remove any user inserted end-of-lines while ((pos = temp.find('\n')) != string::npos) temp[pos] = ' '; // only single spaces no trailing spaces, no leading spaces while ((pos = temp.find(" ")) != string::npos) temp.erase(pos,1); while (temp[temp.length() -1] == ' ') temp.erase(temp.length()-1, 1); if (temp[0] == ' ') temp.erase(0,1); // count number of words in textdef_rg_filename int numwords = 1; if (temp.length()) { pos = 0; while ((pos = temp.find(" ", pos + 1)) != string::npos) numwords++; } // no more than specified # words to a line if (numwords > progStatus.wpl) { int wc = numwords; size_t pos = 0; while (wc > progStatus.wpl) { for (int i = 0; i < progStatus.wpl; i++) pos = temp.find(' ', pos + 1); temp[pos] = '\n'; wc -= progStatus.wpl; } } // insert trailing end-of-line temp += '\n'; // return converted text to editor txt_rg_msg->clear(); txt_rg_msg->addstr(temp.c_str()); char snum[10]; snprintf(snum, sizeof(snum), "%s%d", temp.find("ARL") != string::npos ? "ARL " : "", numwords); txt_rg_check->value(snum); update_rgfields(); btn_rg_check->labelcolor(FL_BLACK); btn_rg_check->redraw_label(); } void cb_rg_html() { string rgname; string html_text; size_t nbr; rgname = ICS_dir; rgname.append("radiogram.html"); update_rgfields(); cb_rg_check(); string form = rg_html_template; for (int i = 0; i < num_rgfields; i++) { if (rgfields[i].f_type == _rg_prec) { sscanf(rgfields[i].f_data.c_str(), "%d", &nbr); if (nbr >= 0 && nbr < (sizeof(s_prec) / sizeof(*s_prec))) html_text = s_prec[nbr]; else html_text = s_prec[0]; replacestr( form, rgfields[i].f_type, html_text ); } else if (rgfields[i].w_type == 'b') { replacestr( form, rgfields[i].f_type, rgfields[i].f_data == "T" ? yes : no); } else replacestr( form, rgfields[i].f_type, rgfields[i].f_data ); } string rxstr = ""; rxstr.append(progStatus.my_call).append(" ").append(progStatus.my_tel); rxstr.append("\n").append(progStatus.my_name); rxstr.append("\n").append(progStatus.my_addr); rxstr.append("\n").append(progStatus.my_city); html_text = ":rx:"; replacestr( form, html_text, rxstr); html_text = ":exp:"; string arlmsgs = ""; if (progStatus.arl_desc) arlmsgs = expand_arl(rgfields[10].f_data); replacestr( form, html_text, arlmsgs); FILE *rgfile = fopen(rgname.c_str(), "w"); fprintf(rgfile,"%s", form.c_str()); fclose(rgfile); open_url(rgname.c_str()); } void cb_rg_html_fcopy() { string rgname; string MSG = ""; string html_text; size_t nbr; rgname = ICS_dir; rgname.append("rg_file_copy.html"); update_rgfields(); cb_rg_check(); string form = rg_html_fcopy_template; for (int i = 0; i < num_rgfields; i++) { if (rgfields[i].f_type == _rg_prec) { sscanf(rgfields[i].f_data.c_str(), "%d", &nbr); if (nbr >= 0 && nbr < (sizeof(s_prec) / sizeof(*s_prec))) html_text = s_prec[nbr]; else html_text = s_prec[0]; replacestr( form, rgfields[i].f_type, html_text); } else if (rgfields[i].w_type == 'b') { replacestr( form, rgfields[i].f_type, rgfields[i].f_data == "T" ? yes : no); } else replacestr( form, rgfields[i].f_type, rgfields[i].f_data ); } string rxstr = ""; rxstr.append(progStatus.my_call).append(" ").append(progStatus.my_tel); rxstr.append("\n").append(progStatus.my_name); rxstr.append("\n").append(progStatus.my_addr); rxstr.append("\n").append(progStatus.my_city); html_text = ":rx:"; replacestr( form, html_text, rxstr); FILE *rgfile = fopen(rgname.c_str(), "w"); fprintf(rgfile,"%s", form.c_str()); fclose(rgfile); open_url(rgname.c_str()); } void cb_rg_textout() { string rgname; string lines; string str; size_t nbr = 0; rgname = ICS_dir; rgname.append("radiogram.txt"); update_rgfields(); cb_rg_check(); string form = rg_txt_template; for (int i = 0; i < num_rgfields; i++) { str.clear(); if (rgfields[i].f_type == _rg_prec) { sscanf(rgfields[i].f_data.c_str(), "%d", &nbr); if (nbr < 0) nbr = 0; if (nbr >= sizeof(s_prec)/sizeof(*s_prec)) nbr = 0; str = s_prec[nbr]; if (str.find("TEST") != string::npos) { // test message if (str.find("EMERGENCY") == string::npos) str = str.substr(0, 6); } else { if (str.find("EMERGENCY") == string::npos) str = str[0]; } replacestr( form, rgfields[i].f_type, str); } else if (rgfields[i].w_type == 'e' || rgfields[i].w_type == 't') { if (rgfields[i].f_type == _rg_opnote || rgfields[i].f_type == _rg_opnote2) { if (!rgfields[i].f_data.empty()) str.append(" OPNOTE ").append(rgfields[i].f_data); } else if (rgfields[i].f_type == _rg_hx && !rgfields[i].f_data.empty()) { str = " "; str.append(rgfields[i].f_data); } else { str = rgfields[i].f_data; strip_lfs(str); } replacestr( form, rgfields[i].f_type, str ); } else replacestr( form, rgfields[i].f_type, rgfields[i].f_data ); } FILE *rgfile = fopen(rgname.c_str(), "w"); fprintf(rgfile,"%s", form.c_str()); fclose(rgfile); open_url(rgname.c_str()); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/radiogram_tab.cxx��������������������������������������������������������0000664�0001750�0001750�00000050317�12330516146�015707� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_radiogram = (Fl_Group *)0; Fl_Tabs *tabs_radiogram = (Fl_Tabs *)0; Fl_Group *tab_radiogram_message = (Fl_Group *)0; Fl_Input2 *txt_rg_nbr = (Fl_Input2 *)0; Fl_ListBox *sel_rg_prec = (Fl_ListBox *)0; Fl_Input2 *txt_rg_hx = (Fl_Input2 *)0; Fl_Button *btn_rg_hx = (Fl_Button *)0; Fl_Input2 *txt_rg_station = (Fl_Input2 *)0; Fl_Input2 *txt_rg_place = (Fl_Input2 *)0; Fl_Input2 *txt_rg_t1 = (Fl_Input2 *)0; Fl_Button *btn_rgTime1 = (Fl_Button *)0; Fl_Input2 *txt_rg_d1 = (Fl_Input2 *)0; Fl_Button *btn_rgDate1 = (Fl_Button *)0; Fl_Input2 *txt_rg_to = (Fl_Input2 *)0; Fl_Input2 *txt_rg_phone = (Fl_Input2 *)0; Fl_Input2 *txt_rg_opnote = (Fl_Input2 *)0; FTextEdit *txt_rg_msg = (FTextEdit *)0; Fl_Button *btn_arl = (Fl_Button *)0; Fl_Input2 *txt_rg_check = (Fl_Input2 *)0; Fl_Button *btn_rg_check = (Fl_Button *)0; Fl_Input2 *txt_rg_sig = (Fl_Input2 *)0; Fl_Input2 *txt_rg_opnote2 = (Fl_Input2 *)0; Fl_Check_Button *btn_rg_svc = (Fl_Check_Button *)0; Fl_Group *tab_radiogram_information = (Fl_Group *)0; Fl_Input2 *txt_rg_orig = (Fl_Input2 *)0; Fl_Input2 *txt_rg_dt2 = (Fl_Input2 *)0; Fl_Button *btn_rgDateTime2 = (Fl_Button *)0; Fl_Input2 *txt_rg_dt3 = (Fl_Input2 *)0; Fl_Button *btn_rgDateTime3 = (Fl_Button *)0; Fl_Input2 *txt_rg_dlvd_to = (Fl_Input2 *)0; Fl_Input2 *txt_rg_rcv_fm = (Fl_Input2 *)0; Fl_Input2 *txt_rg_rcv_net = (Fl_Input2 *)0; Fl_Input2 *txt_rg_dt4 = (Fl_Input2 *)0; Fl_Button *btn_rgDateTime4 = (Fl_Button *)0; Fl_Input2 *txt_rg_sent_to = (Fl_Input2 *)0; Fl_Input2 *txt_rg_snt_net = (Fl_Input2 *)0; Fl_Input2 *txt_rg_dt5 = (Fl_Input2 *)0; Fl_Button *btn_rgDateTime5 = (Fl_Button *)0; Fl_Check_Button *btn_rg_standard; static void cb_txt_rg_nbr(Fl_Input2*, void*) { cb_rg_nbr(txt_rg_nbr); estimate(); } static void cb_btn_rg_hx(Fl_Button*, void*) { cb_hx(); estimate(); } static void cb_txt_rg_station(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_station); estimate(); } static void cb_txt_rg_place(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_place); estimate(); } static void cb_btn_rgTime1(Fl_Button*, void*) { cb_rgSetTime1(); estimate(); } static void cb_btn_rgDate1(Fl_Button*, void*) { cb_rgSetDate1(); estimate(); } static void cb_txt_rg_to(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_to); estimate(); } static void cb_txt_rg_phone(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_phone); estimate(); } static void cb_txt_rg_opnote(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_opnote); estimate(); } static void cb_txt_rg_msg(FTextEdit*, void*) { btn_rg_check->labelcolor(FL_RED); btn_rg_check->redraw_label(); estimate(); } static void cb_btn_arl(Fl_Button*, void*) { cb_arl(); estimate(); } static void cb_btn_rg_check(Fl_Button*, void*) { cb_rg_check(); estimate(); } static void cb_txt_rg_sig(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_sig); estimate(); } static void cb_txt_rg_opnote2(Fl_Input2*, void*) { cb_rg_filter_input(txt_rg_opnote2); estimate(); } static void cb_btn_rgDateTime2(Fl_Button*, void*) { cb_rgSetDateTime2(); estimate(); } static void cb_btn_rgDateTime3(Fl_Button*, void*) { cb_rgSetDateTime3(); estimate(); } static void cb_btn_rgDateTime4(Fl_Button*, void*) { cb_rgSetDateTime4(); estimate(); } static void cb_btn_rgDateTime5(Fl_Button*, void*) { cb_rgSetDateTime5(); estimate(); } void rg_changed(Fl_Widget *, void *) { estimate(); } void create_radiogram_tab() { int Y = tab_top; tab_radiogram = new Fl_Group(0, Y, 570, 380); tab_radiogram->hide(); tabs_radiogram = new Fl_Tabs(0, Y, 570, 380); tabs_radiogram->selection_color((Fl_Color)246); tab_radiogram_message = new Fl_Group(0, Y+25, 570, 355, _("Message")); Fl_Box *svctxt = new Fl_Box(12, Y+34, 17, 15, _("SVC")); svctxt->box(FL_FLAT_BOX); btn_rg_svc = new Fl_Check_Button(12, Y+55, 17, 15); btn_rg_svc->tooltip(_("Check for Service Message")); btn_rg_svc->down_box(FL_DOWN_BOX); btn_rg_svc->align(FL_ALIGN_TOP); txt_rg_nbr = new Fl_Input2(36, Y+50, 50, 24, _("*NR")); txt_rg_nbr->tooltip(_("Message number at station of origin")); txt_rg_nbr->box(FL_DOWN_BOX); txt_rg_nbr->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_nbr->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_nbr->labeltype(FL_NORMAL_LABEL); txt_rg_nbr->labelfont(0); txt_rg_nbr->labelsize(14); txt_rg_nbr->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_nbr->callback((Fl_Callback*)cb_txt_rg_nbr); txt_rg_nbr->align(FL_ALIGN_TOP); txt_rg_nbr->when(FL_WHEN_CHANGED); sel_rg_prec = new Fl_ListBox(88, Y+50, 120, 24, _("*PREC")); sel_rg_prec->tooltip(_("Message Precedence")); sel_rg_prec->align(FL_ALIGN_TOP); txt_rg_hx = new Fl_Input2(210, Y+50, 95, 24, _("HX__")); txt_rg_hx->tooltip(_("Handling instructions")); txt_rg_hx->box(FL_DOWN_BOX); txt_rg_hx->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_hx->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_hx->labeltype(FL_NORMAL_LABEL); txt_rg_hx->labelfont(0); txt_rg_hx->labelsize(14); txt_rg_hx->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_hx->align(FL_ALIGN_TOP); txt_rg_hx->callback(rg_changed); txt_rg_hx->when(FL_WHEN_CHANGED); btn_rg_hx = new Fl_Button(308, Y+50, 24, 24, _("hx")); btn_rg_hx->tooltip(_("Open HX dialog")); btn_rg_hx->callback((Fl_Callback*)cb_btn_rg_hx); txt_rg_station = new Fl_Input2(336, Y+50, 101, 24, _("*STN ORIG")); txt_rg_station->tooltip(_("Station call sign")); txt_rg_station->box(FL_DOWN_BOX); txt_rg_station->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_station->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_station->labeltype(FL_NORMAL_LABEL); txt_rg_station->labelfont(0); txt_rg_station->labelsize(14); txt_rg_station->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_station->callback((Fl_Callback*)cb_txt_rg_station); txt_rg_station->align(FL_ALIGN_TOP); txt_rg_station->when(FL_WHEN_CHANGED); txt_rg_check = new Fl_Input2(439, Y+50, 101, 24, _("CK")); txt_rg_check->tooltip(_("Message check count")); txt_rg_check->box(FL_DOWN_BOX); txt_rg_check->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_check->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_check->labeltype(FL_NORMAL_LABEL); txt_rg_check->labelfont(0); txt_rg_check->labelsize(14); txt_rg_check->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_check->align(FL_ALIGN_TOP); txt_rg_check->when(FL_WHEN_CHANGED); btn_rg_check = new Fl_Button(541, Y+50, 24, 24, _("ck")); btn_rg_check->tooltip(_("Compute check count")); btn_rg_check->callback((Fl_Callback*)cb_btn_rg_check); txt_rg_place = new Fl_Input2(6, Y+96, 266, 24, _("PLACE OF ORIG")); txt_rg_place->tooltip(_("Place of origin")); txt_rg_place->box(FL_DOWN_BOX); txt_rg_place->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_place->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_place->labeltype(FL_NORMAL_LABEL); txt_rg_place->labelfont(0); txt_rg_place->labelsize(14); txt_rg_place->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_place->callback((Fl_Callback*)cb_txt_rg_place); txt_rg_place->align(FL_ALIGN_TOP_LEFT); txt_rg_place->when(FL_WHEN_CHANGED); txt_rg_t1 = new Fl_Input2(288, Y+96, 81, 24, _("TIME FILED")); txt_rg_t1->tooltip(_("Time of origination")); txt_rg_t1->box(FL_DOWN_BOX); txt_rg_t1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_t1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_t1->labeltype(FL_NORMAL_LABEL); txt_rg_t1->labelfont(0); txt_rg_t1->labelsize(14); txt_rg_t1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_t1->align(FL_ALIGN_TOP_LEFT); txt_rg_t1->callback(rg_changed); txt_rg_t1->when(FL_WHEN_CHANGED); btn_rgTime1 = new Fl_Button(372, Y+96, 24, 24, _("...")); btn_rgTime1->tooltip(_("Set time now")); btn_rgTime1->callback((Fl_Callback*)cb_btn_rgTime1); txt_rg_d1 = new Fl_Input2(416, Y+96, 123, 24, _("*MON DY")); txt_rg_d1->tooltip(_("Date of origination")); txt_rg_d1->box(FL_DOWN_BOX); txt_rg_d1->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_d1->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_d1->labeltype(FL_NORMAL_LABEL); txt_rg_d1->labelfont(0); txt_rg_d1->labelsize(14); txt_rg_d1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_d1->align(FL_ALIGN_TOP_LEFT); txt_rg_d1->callback(rg_changed); txt_rg_d1->when(FL_WHEN_CHANGED); btn_rgDate1 = new Fl_Button(541, Y+96, 24, 24, _("...")); btn_rgDate1->tooltip(_("Set today")); btn_rgDate1->callback((Fl_Callback*)cb_btn_rgDate1); txt_rg_to = new Fl_Input2(6, Y+138, 277, 70, _("*TO")); txt_rg_to->tooltip(_("Addressee")); txt_rg_to->type(4); txt_rg_to->box(FL_DOWN_BOX); txt_rg_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_to->labeltype(FL_NORMAL_LABEL); txt_rg_to->labelfont(0); txt_rg_to->labelsize(14); txt_rg_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_to->callback((Fl_Callback*)cb_txt_rg_to); txt_rg_to->align(FL_ALIGN_TOP_LEFT); txt_rg_to->when(FL_WHEN_CHANGED); txt_rg_phone = new Fl_Input2(327, Y+137, 238, 24, _("TEL:")); txt_rg_phone->tooltip(_("Addressee telephone number")); txt_rg_phone->box(FL_DOWN_BOX); txt_rg_phone->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_phone->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_phone->labeltype(FL_NORMAL_LABEL); txt_rg_phone->labelfont(0); txt_rg_phone->labelsize(14); txt_rg_phone->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_phone->callback((Fl_Callback*)cb_txt_rg_phone); txt_rg_phone->align(FL_ALIGN_LEFT); txt_rg_phone->when(FL_WHEN_CHANGED); txt_rg_opnote = new Fl_Input2(360, Y+164, 205, 24, _("OP NOTE:")); txt_rg_opnote->tooltip(_("Operating notes")); txt_rg_opnote->box(FL_DOWN_BOX); txt_rg_opnote->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_opnote->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_opnote->labeltype(FL_NORMAL_LABEL); txt_rg_opnote->labelfont(0); txt_rg_opnote->labelsize(14); txt_rg_opnote->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_opnote->callback((Fl_Callback*)cb_txt_rg_opnote); txt_rg_opnote->align(FL_ALIGN_LEFT); txt_rg_opnote->when(FL_WHEN_CHANGED); btn_rg_standard = new Fl_Check_Button(300, Y+195, 50, 24, _("Standard Format")); btn_rg_standard->tooltip(_("Uncheck to allow punctuation and lower case")); btn_rg_standard->value(1); btn_arl = new Fl_Button(489, Y+195, 76, 24, _("ARL MSG")); btn_arl->tooltip(_("ARL message selector")); btn_arl->callback((Fl_Callback*)cb_btn_arl); txt_rg_msg = new FTextEdit(4, Y+227, 562, 125, _("TXT:")); txt_rg_msg->tooltip(_("Message contents - recommend limit to 25 words or less")); txt_rg_msg->box(FL_DOWN_BOX); txt_rg_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_msg->labeltype(FL_NORMAL_LABEL); txt_rg_msg->labelfont(0); txt_rg_msg->labelsize(14); txt_rg_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_msg->callback((Fl_Callback*)cb_txt_rg_msg); txt_rg_msg->align(FL_ALIGN_TOP_LEFT); txt_rg_msg->when(FL_WHEN_CHANGED); txt_rg_sig = new Fl_Input2(48, Y+354, 238, 24, _("SIG:")); txt_rg_sig->tooltip(_("Signature")); txt_rg_sig->box(FL_DOWN_BOX); txt_rg_sig->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_sig->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_sig->labeltype(FL_NORMAL_LABEL); txt_rg_sig->labelfont(0); txt_rg_sig->labelsize(14); txt_rg_sig->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_sig->callback((Fl_Callback*)cb_txt_rg_sig); txt_rg_sig->align(FL_ALIGN_LEFT); txt_rg_sig->when(FL_WHEN_CHANGED); txt_rg_opnote2 = new Fl_Input2(364, Y+354, 201, 24, _("OP NOTE:")); txt_rg_opnote2->tooltip(_("Operating notes")); txt_rg_opnote2->box(FL_DOWN_BOX); txt_rg_opnote2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_opnote2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_opnote2->labeltype(FL_NORMAL_LABEL); txt_rg_opnote2->labelfont(0); txt_rg_opnote2->labelsize(14); txt_rg_opnote2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_opnote2->callback((Fl_Callback*)cb_txt_rg_opnote2); txt_rg_opnote2->align(FL_ALIGN_LEFT); txt_rg_opnote2->when(FL_WHEN_CHANGED); tab_radiogram_message->end(); tab_radiogram_information = new Fl_Group(0, Y+25, 570, 355, _("Records")); tab_radiogram_information->hide(); Fl_Group* frame1 = new Fl_Group(5, Y+32, 560, 58); frame1->box(FL_ENGRAVED_FRAME); txt_rg_rcv_fm = new Fl_Input2(82, Y+36, 100, 24, _("RCVD FM:")); txt_rg_rcv_fm->tooltip(_("Call sign of sender")); txt_rg_rcv_fm->box(FL_DOWN_BOX); txt_rg_rcv_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_rcv_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_rcv_fm->labeltype(FL_NORMAL_LABEL); txt_rg_rcv_fm->labelfont(0); txt_rg_rcv_fm->labelsize(14); txt_rg_rcv_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_rcv_fm->align(FL_ALIGN_LEFT); txt_rg_rcv_fm->callback(rg_changed); txt_rg_rcv_fm->when(FL_WHEN_CHANGED); txt_rg_rcv_net = new Fl_Input2(221, Y+36, 100, 24, _("NET:")); txt_rg_rcv_net->tooltip(_("Net rcvd from")); txt_rg_rcv_net->box(FL_DOWN_BOX); txt_rg_rcv_net->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_rcv_net->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_rcv_net->labeltype(FL_NORMAL_LABEL); txt_rg_rcv_net->labelfont(0); txt_rg_rcv_net->labelsize(14); txt_rg_rcv_net->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_rcv_net->align(FL_ALIGN_LEFT); txt_rg_rcv_net->callback(rg_changed); txt_rg_rcv_net->when(FL_WHEN_CHANGED); txt_rg_dt4 = new Fl_Input2(381, Y+36, 152, 24, _("DT/TM")); txt_rg_dt4->tooltip(_("ddhhmm MMM YY of receipt")); txt_rg_dt4->box(FL_DOWN_BOX); txt_rg_dt4->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_dt4->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_dt4->labeltype(FL_NORMAL_LABEL); txt_rg_dt4->labelfont(0); txt_rg_dt4->labelsize(14); txt_rg_dt4->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_dt4->align(FL_ALIGN_LEFT); txt_rg_dt4->callback(rg_changed); txt_rg_dt4->when(FL_WHEN_CHANGED); btn_rgDateTime4 = new Fl_Button(536, Y+36, 24, 24, _("...")); btn_rgDateTime4->tooltip(_("Set today")); btn_rgDateTime4->callback((Fl_Callback*)cb_btn_rgDateTime4); txt_rg_sent_to = new Fl_Input2(82, Y+62, 100, 24, _("SENT TO:")); txt_rg_sent_to->tooltip(_("Sent to call sign")); txt_rg_sent_to->box(FL_DOWN_BOX); txt_rg_sent_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_sent_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_sent_to->labeltype(FL_NORMAL_LABEL); txt_rg_sent_to->labelfont(0); txt_rg_sent_to->labelsize(14); txt_rg_sent_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_sent_to->align(FL_ALIGN_LEFT); txt_rg_sent_to->callback(rg_changed); txt_rg_sent_to->when(FL_WHEN_CHANGED); txt_rg_snt_net = new Fl_Input2(221, Y+62, 100, 24, _("NET:")); txt_rg_snt_net->tooltip(_("Sent via net")); txt_rg_snt_net->box(FL_DOWN_BOX); txt_rg_snt_net->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_snt_net->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_snt_net->labeltype(FL_NORMAL_LABEL); txt_rg_snt_net->labelfont(0); txt_rg_snt_net->labelsize(14); txt_rg_snt_net->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_snt_net->align(FL_ALIGN_LEFT); txt_rg_snt_net->callback(rg_changed); txt_rg_snt_net->when(FL_WHEN_CHANGED); txt_rg_dt5 = new Fl_Input2(381, Y+62, 152, 24, _("DT/TM")); txt_rg_dt5->tooltip(_("ddhhmm MMM YY when sent")); txt_rg_dt5->box(FL_DOWN_BOX); txt_rg_dt5->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_dt5->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_dt5->labeltype(FL_NORMAL_LABEL); txt_rg_dt5->labelfont(0); txt_rg_dt5->labelsize(14); txt_rg_dt5->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_dt5->align(FL_ALIGN_LEFT); txt_rg_dt5->callback(rg_changed); txt_rg_dt5->when(FL_WHEN_CHANGED); btn_rgDateTime5 = new Fl_Button(536, Y+62, 24, 24, _("...")); btn_rgDateTime5->tooltip(_("Set today")); btn_rgDateTime5->callback((Fl_Callback*)cb_btn_rgDateTime5); frame1->end(); Fl_Group* frame2 = new Fl_Group(5, Y+90, 560, 142, _("ORIG - FM - DATE/TIME")); frame2->box(FL_ENGRAVED_FRAME); frame2->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_rg_dt2 = new Fl_Input2(381, Y+96, 152, 24, _("DT/TM")); txt_rg_dt2->tooltip(_("ddhhmm MMM YY of preparation")); txt_rg_dt2->box(FL_DOWN_BOX); txt_rg_dt2->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_dt2->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_dt2->labeltype(FL_NORMAL_LABEL); txt_rg_dt2->labelfont(0); txt_rg_dt2->labelsize(14); txt_rg_dt2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_dt2->align(FL_ALIGN_LEFT); txt_rg_dt2->callback(rg_changed); txt_rg_dt2->when(FL_WHEN_CHANGED); btn_rgDateTime2 = new Fl_Button(536, Y+96, 24, 24, _("...")); btn_rgDateTime2->tooltip(_("Set today")); btn_rgDateTime2->callback((Fl_Callback*)cb_btn_rgDateTime2); txt_rg_orig = new Fl_Input2(10, Y+128, 550, 98, _("Name/Addr/City/Tel")); txt_rg_orig->tooltip(_("Person requesting message")); txt_rg_orig->type(4); txt_rg_orig->box(FL_DOWN_BOX); txt_rg_orig->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_orig->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_orig->labeltype(FL_NORMAL_LABEL); txt_rg_orig->labelfont(0); txt_rg_orig->labelsize(14); txt_rg_orig->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_orig->align(FL_ALIGN_TOP_LEFT); txt_rg_orig->callback(rg_changed); txt_rg_orig->when(FL_WHEN_CHANGED); frame2->end(); Fl_Group* frame4 = new Fl_Group(5, Y+234, 560, 144, _("DLVD -TO - DATE/TIME")); frame4->box(FL_ENGRAVED_FRAME); frame4->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); txt_rg_dt3 = new Fl_Input2(381, Y+240, 152, 24, _("DT/TM")); txt_rg_dt3->tooltip(_("ddhhmm MMM YY of delivery")); txt_rg_dt3->box(FL_DOWN_BOX); txt_rg_dt3->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_dt3->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_dt3->labeltype(FL_NORMAL_LABEL); txt_rg_dt3->labelfont(0); txt_rg_dt3->labelsize(14); txt_rg_dt3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_dt3->align(FL_ALIGN_LEFT); txt_rg_dt3->callback(rg_changed); txt_rg_dt3->when(FL_WHEN_CHANGED); btn_rgDateTime3 = new Fl_Button(537, Y+240, 24, 24, _("...")); btn_rgDateTime3->tooltip(_("Set to today")); btn_rgDateTime3->callback((Fl_Callback*)cb_btn_rgDateTime3); txt_rg_dlvd_to = new Fl_Input2(10, Y+272, 550, 100, _("Name/Addr/City/Tel")); txt_rg_dlvd_to->tooltip(_("Message sent to")); txt_rg_dlvd_to->type(4); txt_rg_dlvd_to->box(FL_DOWN_BOX); txt_rg_dlvd_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_rg_dlvd_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_rg_dlvd_to->labeltype(FL_NORMAL_LABEL); txt_rg_dlvd_to->labelfont(0); txt_rg_dlvd_to->labelsize(14); txt_rg_dlvd_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_rg_dlvd_to->align(FL_ALIGN_TOP_LEFT); txt_rg_dlvd_to->callback(rg_changed); txt_rg_dlvd_to->when(FL_WHEN_CHANGED); frame4->end(); tab_radiogram_information->end(); Fl_Group::current()->resizable(tab_radiogram_information); tabs_radiogram->end(); Fl_Group::current()->resizable(tabs_radiogram); tab_radiogram->end(); tab_radiogram->hide(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/arl_msgs.cxx�������������������������������������������������������������0000664�0001750�0001750�00000016544�12330516146�014727� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "flmsg.h" #include "flmsg_dialog.h" #include "status.h" ARL_TEXT arl_list[] = { {"ONE", 0, "Everyone safe here. Please don't worry." }, {"TWO", 0, "Coming home as soon as possible." }, {"THREE", 1, "Am in ____ hospital. Receiving excellent care and recovering fine." }, {"FOUR", 0, "Only slight property damage here. Do not be concerned about disaster reports." }, {"FIVE", 0, "Am moving to new location. Send no further mail or communication. Will inform you of new address when relocated." }, {"SIX", 0, "Will contact you as soon as possible." }, {"SEVEN", 0, "Please reply by Amateur Radio through the amateur delivering this message. This is a free public service." }, {"EIGHT", 1, "Need additional ____ mobile or portable equipment for immediate emergency use." }, {"NINE", 1, "Additional ____ radio operators needed to assist with emergency at this location." }, {"TEN", 1, "Please contact ____. Advise to standby and provide further emergency information, instructions or assistance." }, {"ELEVEN", 2, "Establish Amateur Radio emergency communications with ____ on ____ MHz." }, {"TWELVE", 0, "Anxious to hear from you. No word in some time. Please contact me as soon as possible." }, {"THIRTEEN", 0, "Medical emergency situation exits here." }, {"FOURTEEN", 1, "Situation here becoming critical. Losses and damage from ____ increasing." }, {"FIFTEEN", 0, "Please advise your condition and what help is needed." }, {"SIXTEEN", 0, "Property damage very severe in this area." }, {"SEVENTEEN", 2, "REACT communications services also available. Establish REACT communication with ____ on channel ____." }, {"EIGHTEEN", 1, "Please contact me as soon as possible at ____." }, {"NINETEEN", 1, "Request health and welfare report on ____ . (State name, address and telephone number.)" }, {"TWENTY", 1, "Temporarily stranded. Will need some assistance. Please contact me at ____." }, {"TWENTY ONE", 0, "Search and Rescue assistance is needed by local authorities here. Advise availability." }, {"TWENTY TWO", 0, "Need accurate information on the extent and type of conditions now existing at your location. Please furnish this information and reply without delay." }, {"TWENTY THREE", 0, "Report at once the accessibility and best way to reach your location." }, {"TWENTY FOUR", 0, "Evacuation of residents from this area urgently needed. Advise plans for help." }, {"TWENTY FIVE", 0, "Furnish as soon as possible the weather conditions at your location." }, {"TWENTY SIX", 0, "Help and care for evacuation of sick and injured from this location needed at once. Emergency/priority messages originating from official sources must carry the signature of the originating official." }, {"FORTY SIX", 0, "Greetings on your birthday and best wishes for many more to come." }, {"FORTY SEVEN", 4, "Reference your message number ____ to ____ delivered on ____ at ____ UTC." }, {"FIFTY", 0, "Greetings by Amateur Radio." }, {"FIFTY ONE", 1, "Greetings by Amateur Radio. This message is sent as a free public service by ham radio operators at ____. Am having a wonderful time." }, {"FIFTY TWO", 0, "Really enjoyed being with you. Looking forward to getting together again." }, {"FIFTY THREE", 1, "Received your ____. It's appreciated; many thanks." }, {"FIFTY FOUR", 0, "Many thanks for your good wishes." }, {"FIFTY FIVE", 0, "Good news is always welcome. Very delighted to hear about yours." }, {"FIFTY SIX", 1, "Congratulations on your ____, a most worthy and deserved achievement." }, {"FIFTY SEVEN", 0, "Wish we could be together." }, {"FIFTY EIGHT", 0, "Have a wonderful time. Let us know when you return." }, {"FIFTY NINE", 0, "Congratulations on the new arrival. Hope mother and child are well." }, {"SIXTY", 1, "Wishing you the best of everything on ____." }, {"SIXTY ONE", 0, "Wishing you a very Merry Christmas and a Happy New Year." }, {"SIXTY TWO", 1, "Greetings and best wishes to you for a pleasant ____ holiday season." }, {"SIXTY THREE", 0, "Victory or defeat, our best wishes are with you. Hope you win." }, {"SIXTY FOUR", 1, "Arrived safely at ____." }, {"SIXTY FIVE", 2, "Arriving ____ on ____. Please arrange to meet me there." }, {"SIXTY SIX", 2, "DX QSLs are on hand for you at the ____ QSL Bureau. Send ____ self addressed envelopes." }, {"SIXTY SEVEN", 2, "Your message number ____ undeliverable because of ____. Please advise." }, {"SIXTY EIGHT", 0, "Sorry to hear you are ill. Best wishes for a speedy recovery." }, {"SIXTY NINE", 1, "Welcome to the ____. We are glad to have you with us and hope you will enjoy the fun and fellowship of the organization." }, {0, 0, 0} }; int arl_nbr = 0; void cb_arl() { if (!arlwindow) { arlwindow = arl_dialog(); int n = 0; while (arl_list[n].sznbr) { select_arl->add(arl_list[n].sznbr); n++; } } select_arl->value(1); select_arl->do_callback(); arlwindow->show(); } void cb_arl_cancel() { arlwindow->hide(); } void cb_arl_add() { string msg = "ARL "; string fill; msg.append(arl_list[arl_nbr].sznbr).append(progStatus.insert_x ? " X " : " "); fill = txt_arl_fill1->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " "); fill = txt_arl_fill2->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " "); fill = txt_arl_fill3->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " "); fill = txt_arl_fill4->value(); if (!fill.empty()) msg.append(fill).append(progStatus.insert_x ? " X " : " "); txt_rg_msg->addstr(msg.c_str()); select_arl->value(1); select_arl->do_callback(); cb_rg_check(); } std::string expand_arl(std::string &s) { size_t p = 0; std::string text = s; std::string retstr = ""; int num = sizeof(arl_list) / sizeof(ARL_TEXT); for (size_t n = 0; n < text.length(); n++) if (text[n] == '\n') text[n] = ' '; while ((p = text.find(" ")) != std::string::npos) text.erase(p,1); p = text.find("ARL"); while (p != std::string::npos) { p += 3; while (text[p] == ' ') p++; for (int i = num - 2; i >= 0; i--) { if (text.find(arl_list[i].sznbr, p) == p) { char arlstr[50]; snprintf(arlstr, sizeof(arlstr), "ARL %s: ", arl_list[i].sznbr); retstr.append(arlstr); retstr.append(arl_list[i].text).append("<br>"); break; } } p = text.find("ARL", p+1); } return retstr; } ������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/radiogram_templates.cxx��������������������������������������������������0000664�0001750�0001750�00000034336�12330516146�017142� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char rg_html_template[] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\ <HTML><HEAD><TITLE>radiogram</TITLE>\n\ <META content=\"text/html; charset=UTF-8\" http-equiv=content-type>\n\ <META name=author content=w1hkj>\n\ <STYLE type=\"text/css\">\n\ p.F2 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 8pt }\n\ p.F3 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 14pt }\n\ p.F4 { FONT-FAMILY: \"monospace\"; FONT-SIZE: 12pt }\n\ p.F5 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 16pt }\n\ p.F6 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 10pt }\n\ </STYLE>\n\ \n\ <META name=GENERATOR content=\"MSHTML 8.00.6001.19154\"></HEAD>\n\ <BODY>\n\ <TABLE style=\"TEXT-ALIGN: left; WIDTH: 100%\" border=0 cellSpacing=0 \n\ cellPadding=0>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\">\n\ <TABLE \n\ style=\"TEXT-ALIGN: left; WIDTH: 100%; MARGIN-LEFT: auto; MARGIN-RIGHT: auto\" \n\ border=0 cellSpacing=0 cellPadding=2>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\">\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=3><B>THE AMERICAN RADIO RELAY LEAGUE</B></FONT><BR>\n\ </DIV>\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=6><B>RADIOGRAM</B></FONT><BR>\n\ </DIV>\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=3><B>VIA AMATEUR RADIO<BR></B></FONT>\n\ </DIV>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE>\n\ <TABLE style=\"TEXT-ALIGN: left; WIDTH: 100%\" border=1 cellSpacing=0 \n\ cellPadding=2>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 7%; VERTICAL-ALIGN: top\">\n\ <p class=F2>NUMBER</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 14%; VERTICAL-ALIGN: top\">\n\ <p class=F2>PRECEDENCE</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 7%; VERTICAL-ALIGN: top\">\n\ <p class=F2>HX</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 20%; VERTICAL-ALIGN: top\">\n\ <p class=F2>STATION OF ORIGIN</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 10%; VERTICAL-ALIGN: top\">\n\ <p class=F2>CHECK</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 20%; VERTICAL-ALIGN: top\">\n\ <p class=F2>PLACE OF ORIGIN</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 10%; VERTICAL-ALIGN: top\">\n\ <p class=F2>TIME FILED</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F2>DATE</p>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:nbr:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:prec:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:hx:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=\"F4\">:sta:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:ck:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:org:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:t1:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:d1:<br></p>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=4>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><p class=\"F2\">TO</p></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><pre><p class=F4>:to:</p></pre></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br><br><br><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=4>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top; TEXT-ALIGN: center\">\n\ <p class=F2>THIS RADIO MESSAGE WAS RECEIVED AT</p>\n\ </td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><pre><p class=F4>:rx:</p><pre></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br><br><br><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=8>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td VALIGN=top><p class=F2>PHONE NUMBER</p></td>\n\ <td><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top><p class=F4>:tel:</p></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=8>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td VALIGN=top><pre><p class=F4>:msg:</p></pre></td>\n\ <td><br><br><br><br><br><br><br><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top><p class=F4>:sig:</p></td>\n\ <td><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE>\n\ <TABLE style=\"TEXT-ALIGN: left; WIDTH: 100%\" border=0 cellSpacing=2 cellPadding=2>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\">\n\ <p class=F4>:exp:</p>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE><BR>\n\ </BODY>\n\ </HTML>\n\ "; const char rg_html_fcopy_template[] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\ <HTML><HEAD><TITLE>radiogram</TITLE>\n\ <META content=\"text/html; charset=UTF-8\" http-equiv=content-type>\n\ <META name=author content=w1hkj>\n\ <STYLE type=\"text/css\">\n\ p.F2 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 8pt }\n\ p.F3 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 14pt }\n\ p.F4 { FONT-FAMILY: \"monospace\"; FONT-SIZE: 12pt }\n\ p.F5 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 16pt }\n\ p.F6 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 10pt }\n\ </STYLE>\n\ \n\ <META name=GENERATOR content=\"MSHTML 8.00.6001.19154\"></HEAD>\n\ <BODY>\n\ <TABLE style=\"TEXT-ALIGN: left; WIDTH: 100%\" border=0 cellSpacing=0 \n\ cellPadding=0>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\">\n\ <TABLE \n\ style=\"TEXT-ALIGN: left; WIDTH: 100%; MARGIN-LEFT: auto; MARGIN-RIGHT: auto\" \n\ border=0 cellSpacing=0 cellPadding=2>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\">\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=3><B>THE AMERICAN RADIO RELAY LEAGUE</B></FONT><BR>\n\ </DIV>\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=6><B>RADIOGRAM</B></FONT><BR>\n\ </DIV>\n\ <DIV style=\"TEXT-ALIGN: center\">\n\ <FONT size=3><B>VIA AMATEUR RADIO<BR></B></FONT>\n\ </DIV>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE>\n\ <TABLE style=\"TEXT-ALIGN: left; WIDTH: 100%\" border=1 cellSpacing=0 \n\ cellPadding=2>\n\ <TBODY>\n\ <TR>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 7%; VERTICAL-ALIGN: top\">\n\ <p class=F2>NUMBER</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 14%; VERTICAL-ALIGN: top\">\n\ <p class=F2>PRECEDENCE</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 7%; VERTICAL-ALIGN: top\">\n\ <p class=F2>HX</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 20%; VERTICAL-ALIGN: top\">\n\ <p class=F2>STATION OF ORIGIN</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 8%; VERTICAL-ALIGN: top\">\n\ <p class=F2>CHECK</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 20%; VERTICAL-ALIGN: top\">\n\ <p class=F2>PLACE OF ORIGIN</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; WIDTH: 10%; VERTICAL-ALIGN: top\">\n\ <p class=F2>TIME FILED</p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F2>DATE</p>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:nbr:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:prec:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:hx:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=\"F4\">:sta:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:ck:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:org:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:t1:<br></p>\n\ </TD>\n\ <TD style=\"TEXT-ALIGN: center; VERTICAL-ALIGN: top\">\n\ <p class=F4>:d1:<br></p>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=4>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><p class=\"F2\">TO</p></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><pre><p class=F4>:to:</p></pre></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br><br><br><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=4>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top; TEXT-ALIGN: center\">\n\ <p class=F2>THIS RADIO MESSAGE WAS RECEIVED AT</p>\n\ </td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"VERTICAL-ALIGN: top\"><pre><p class=F4>:rx:</p></pre></td>\n\ <td style=\"VERTICAL-ALIGN: top\"><br><br><br><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=8>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td VALIGN=top><p class=F2>PHONE NUMBER</p></td>\n\ <td><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top><p class=F4>:tel:</p></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ <TR>\n\ <TD style=\"VERTICAL-ALIGN: top\" colSpan=8>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td VALIGN=top><pre><p class=F4>:msg:</p></pre></td>\n\ <td><br><br><br><br><br><br><br><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top><p class=F4>:sig:</p></td>\n\ <td><br></td>\n\ </tr>\n\ </table>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE>\n\ </TD>\n\ </TR>\n\ </TBODY>\n\ </TABLE><BR>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td VALIGN=top><p class=F4>ORIG - FROM / DATE/TIME: :ori:</p></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top><p class=F4>DLVD - TO / DATE/TIME: :dlv:</p></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </body>\n\ </html>"; const char rg_txt_template[] = "Formated for CW/Voice: :std:\n\ :nbr: :prec::hx: :sta: :ck: :org: :t1: :d1:\n\ :to:\n\ :tel::opn:\n\ BT\n\ :msg:\n\ BT\n\ :sig::op2:\n\ AR\n\ "; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/radiogram/hx_msgs.cxx��������������������������������������������������������������0000664�0001750�0001750�00000005042�12330516146�014557� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "flmsg.h" #include "flmsg_dialog.h" hx_TEXT hx_list[] = { {"HXA", "HXAnn", "\ Collect landline delivery authorized within\n___ miles" }, {"HXB", "HXBnn", "\ Cancel message if not delivered within\n\ ___ hours of filing time." }, {"HXC", "HXC", "\ Report data & time of delivery back to the\n\ originating station" }, {"HXD", "HXD", "\ Report to originating station the identity\n\ of station from which received, plus date\nand time" }, {"HXE", "HXE", "\ Delivering station get reply from addressee,\n\ originate message back." }, {"HXF", "HXFnn", "\ Hold delivery until ___ [date]" }, {"HXG", "HXG", "\ Delivery by mail or landline toll call not required\n\ If toll call or other expenses involved, cancel\n\ message and send service message back to\n\ originating station." }, {0, 0, 0} }; int hx_nbr = 0; void cb_hx() { if (!hxwindow) { hxwindow = hx_dialog(); int n = 0; while (hx_list[n].sznbr) { sel_hx_select->add(hx_list[n].sznbr); n++; } sel_hx_select->index(0); txt_hx_instructions->value(hx_list[0].instruct); } hxwindow->show(); } void cb_hx_select() { int n = sel_hx_select->index(); txt_hx_instructions->value(hx_list[n].instruct); } void cb_hx_select_add() { string hxadd = txt_hx_select_text->value(); int n = sel_hx_select->index(); if (n < 0) return; if (hxadd.empty()) hxadd = hx_list[n].text; else hxadd.append(" ").append(hx_list[n].text); txt_hx_select_text->value(hxadd.c_str()); } void cb_hx_select_cancel() { hxwindow->hide(); } void cb_hx_select_ok() { txt_rg_hx->value(txt_hx_select_text->value()); hxwindow->hide(); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/config.h.in������������������������������������������������������������������������0000664�0001750�0001750�00000013435�12516663043�012453� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #undef BUILD_BUILD_PLATFORM /* Compiler */ #undef BUILD_COMPILER /* Configure arguments */ #undef BUILD_CONFIGURE_ARGS /* Build date */ #undef BUILD_DATE /* Build host */ #undef BUILD_HOST /* Host platform */ #undef BUILD_HOST_PLATFORM /* Target platform */ #undef BUILD_TARGET_PLATFORM /* Build user */ #undef BUILD_USER /* FLMSG compiler flags */ #undef FLMSG_BUILD_CXXFLAGS /* FLMSG linker flags */ #undef FLMSG_BUILD_LDFLAGS /* FLTK API major version */ #undef FLMSG_FLTK_API_MAJOR /* FLTK API minor version */ #undef FLMSG_FLTK_API_MINOR /* FLTK API patch */ #undef FLMSG_FLTK_API_PATCH /* version string */ #undef FLMSG_VERSION /* major version number */ #undef FLMSG_VERSION_MAJOR /* minor version number */ #undef FLMSG_VERSION_MINOR /* patch/alpha version string */ #undef FLMSG_VERSION_PATCH /* FLTK version */ #undef FLTK_BUILD_VERSION /* flxmlrpc version */ #undef FLXMLRPC_BUILD_VERSION /* Define to 1 if we have clock_gettime */ #undef HAVE_CLOCK_GETTIME /* Define to 0 if not using dbg::stack */ #undef HAVE_DBG_STACK /* Define to 1 if we have dlopen */ #undef HAVE_DLOPEN /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R /* Define to 1 if you have the `hstrerror' function. */ #undef HAVE_HSTRERROR /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if we have sem_timedwait */ #undef HAVE_SEM_TIMEDWAIT /* Define to 1 if we have sem_unlink */ #undef HAVE_SEM_UNLINK /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `socketpair' function. */ #undef HAVE_SOCKETPAIR /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if we are using flxmlrpc */ #undef USE_FLXMLRPC /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to 1 if we are using x */ #undef USE_X /* Version number of package */ #undef VERSION /* x version */ #undef X_BUILD_VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 1 if we are building on mingw */ #undef __WOE32__ /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/��������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011150� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/severe_wx.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000063056�12330516146�013620� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "combo.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> string severe_wx_date; string severe_wx_time; string severe_wx_zone; bool severe_wx_exact; bool severe_wx_not_exact; string severe_wx_city; string severe_wx_state; string severe_wx_county; bool severe_wx_tornado; bool severe_wx_funnel_cloud; bool severe_wx_wall_cloud; bool severe_wx_hail; string severe_wx_hail_size; bool severe_wx_high_wind; string severe_wx_wind_speed; bool severe_wx_measured; bool severe_wx_estimated; bool severe_wx_flood; bool severe_wx_flash_flood; bool severe_wx_other; bool severe_wx_dmg_yes; bool severe_wx_dmg_no; bool severe_wx_inj_yes; bool severe_wx_inj_no; string severe_wx_narrative; // could not use real names ... WIN32 barfs enum SWX_QTYPE { B, D, S, M, T, I, F, C, O, E }; // bool, string, multi-line string, text, int, float, character, cOmbo, empty struct SWX_QUAD { SWX_QTYPE qtype; // type of field string html_fld; void *ptr; Fl_Widget *widget; }; SWX_QUAD severe_wx_QUAD[] = { { D, ":date:", &severe_wx_date, w_severe_wx_date }, // 0 { S, ":time:", &severe_wx_time, w_severe_wx_time }, // 1 { O, ":zone:", &severe_wx_zone, w_severe_wx_zone }, // 2 { O, ":state:", &severe_wx_state, w_severe_wx_state }, // 3 { O, ":county:", &severe_wx_county, w_severe_wx_county }, // 4 { S, ":city:", &severe_wx_city, w_severe_wx_city }, // 5 { S, ":speed:", &severe_wx_wind_speed, w_severe_wx_wind_speed }, // 6 { T, ":narrative:", &severe_wx_narrative, w_severe_wx_narrative }, // 7 { O, ":hail_size:", &severe_wx_hail_size, w_severe_wx_hail_size}, // 8 { B, ":exact:", &severe_wx_exact, w_severe_wx_exact }, // 9 { B, ":not_exact:", &severe_wx_not_exact, w_severe_wx_not_exact }, // 10 { B, ":tornado:", &severe_wx_tornado, w_severe_wx_tornado }, // 11 { B, ":funnel_cloud:", &severe_wx_funnel_cloud, w_severe_wx_funnel_cloud }, // 12 { B, ":wall_cloud:", &severe_wx_wall_cloud, w_severe_wx_wall_cloud }, // 13 { B, ":hail:", &severe_wx_hail, w_severe_wx_hail }, // 14 { B, ":high_wind:", &severe_wx_high_wind, w_severe_wx_high_wind }, // 15 { B, ":measured:", &severe_wx_measured, w_severe_wx_measured }, // 16 { B, ":estimated:", &severe_wx_estimated, w_severe_wx_estimated }, // 17 { B, ":flood:", &severe_wx_flood, w_severe_wx_flood }, // 18 { B, ":flash_flood:", &severe_wx_flash_flood, w_severe_wx_flash_flood }, // 19 { B, ":other:", &severe_wx_other, w_severe_wx_other }, // 20 { B, ":dmg_yes:", &severe_wx_dmg_yes, w_severe_wx_dmg_yes }, // 21 { B, ":dmg_no:", &severe_wx_dmg_no, w_severe_wx_dmg_no }, // 22 { B, ":inj_yes:", &severe_wx_inj_yes, w_severe_wx_inj_yes }, // 23 { B, ":inj_no:", &severe_wx_inj_no, w_severe_wx_inj_no }, // 24 { E, "", NULL, NULL } }; string buffsevere_wx; string def_severe_wx_filename = ""; string base_severe_wx_filename = ""; string def_severe_wx_TemplateName = ""; bool using_severe_wx_template = false; static bool fields_initialized = false; // required to initialize the control pointers in the QUAD array static void init_widgets() { severe_wx_QUAD[0].widget = w_severe_wx_date; severe_wx_QUAD[1].widget = w_severe_wx_time; severe_wx_QUAD[2].widget = w_severe_wx_zone; severe_wx_QUAD[3].widget = w_severe_wx_state; severe_wx_QUAD[4].widget = w_severe_wx_county; severe_wx_QUAD[5].widget = w_severe_wx_city; severe_wx_QUAD[6].widget = w_severe_wx_wind_speed; severe_wx_QUAD[7].widget = w_severe_wx_narrative; severe_wx_QUAD[8].widget = w_severe_wx_hail_size; severe_wx_QUAD[9].widget = w_severe_wx_exact; severe_wx_QUAD[10].widget = w_severe_wx_not_exact; severe_wx_QUAD[11].widget = w_severe_wx_tornado; severe_wx_QUAD[12].widget = w_severe_wx_funnel_cloud; severe_wx_QUAD[13].widget = w_severe_wx_wall_cloud; severe_wx_QUAD[14].widget = w_severe_wx_hail; severe_wx_QUAD[15].widget = w_severe_wx_high_wind; severe_wx_QUAD[16].widget = w_severe_wx_measured; severe_wx_QUAD[17].widget = w_severe_wx_estimated; severe_wx_QUAD[18].widget = w_severe_wx_flood; severe_wx_QUAD[19].widget = w_severe_wx_flash_flood; severe_wx_QUAD[20].widget = w_severe_wx_other; severe_wx_QUAD[21].widget = w_severe_wx_dmg_yes; severe_wx_QUAD[22].widget = w_severe_wx_dmg_no; severe_wx_QUAD[23].widget = w_severe_wx_inj_yes; severe_wx_QUAD[24].widget = w_severe_wx_inj_no; fields_initialized = true; } //enum SWX_QTYPE { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty static void clearQUAD(SWX_QUAD *p) { SWX_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B : (*(bool *)(p->ptr)) = false; break; case S : case D : case M : ((string *)(p->ptr))->clear(); break; case T : ((string *)(p->ptr))->clear(); break; case C : (*(char *)(p->ptr)) = ' '; break; case I : (*(int *)(p->ptr)) = 0; break; case F : (*(float *)(p->ptr)) = 0.0; break; case O : break; case E : return; } p++; } } void clear_severe_wxfields() { if (!fields_initialized) init_widgets(); clearQUAD(severe_wx_QUAD); } static bool checkQUAD(SWX_QUAD *p) { int i = 0; float f = 0; char c = ' '; SWX_QTYPE qt = E; while ((qt = p->qtype) != E) { if (p->widget == NULL) return false; switch (qt) { case B: if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true; break; case S: case M: if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; break; case D: if (*((string *)(p->ptr)) != ((Fl_DateInput *)p->widget)->value()) return true; break; case T: if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; if (*((char *)(p->ptr)) != c) return true; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); if (*((int *)(p->ptr)) != i) return true; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); if (*((float *)(p->ptr)) != f) return true; break; case O: if (((Fl_ListBox *)p->widget)->index() == 0) break; if (*((string *)(p->ptr)) != ((Fl_ListBox *)p->widget)->value()) return true; break; case E: default: return false; } p++; } return false; } bool check_severe_wxfields() { return checkQUAD(severe_wx_QUAD); } static void updateQUAD(SWX_QUAD *p) { int i = 0; float f = 0; char c = ' '; SWX_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); break; case S: case M: *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); break; case D: *((string *)(p->ptr)) = ((Fl_DateInput *)p->widget)->value(); break; case O: { string s = ((Fl_ListBox *)p->widget)->value(); if (s.find("--") == 0) ((string *)(p->ptr))->clear(); else *((string *)(p->ptr)) = ((Fl_ListBox *)p->widget)->value(); } break; case T: *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; *((char *)(p->ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void update_severe_wxfields() { if (!fields_initialized) init_widgets(); updateQUAD(severe_wx_QUAD); if (w_severe_wx_hail->value()) w_severe_wx_hail_size->activate(); else w_severe_wx_hail_size->deactivate(); } void set_severe_wx_counties(int n) { if (n > (numstates - 1)) return; string st_letters = states[n].substr(0,3); size_t p1 = counties.find(st_letters); size_t p2 = counties.rfind(st_letters); if (p1 == string::npos || p2 == string::npos) { printf("not found\n"); return; } string state_counties = counties.substr(p1 + 3, p2 - p1 - 3); size_t p4 = 0, p5 = 0; w_severe_wx_county->clear(); while ((p5 = state_counties.find(',',p4)) != string::npos) { w_severe_wx_county->add(state_counties.substr(p4, p5-p4).c_str()); p4 = p5 + 1; } w_severe_wx_county->index(0); } void set_severe_wx_combos() { w_severe_wx_state->clear(); for (int n = 0; n < numstates; n++) { if (n == 0) w_severe_wx_state->add("--Select State--"); else w_severe_wx_state->add(states[n].c_str()); } w_severe_wx_state->index(0); set_severe_wx_counties(0); w_severe_wx_hail_size->clear(); for (int n = 0; n < num_hail_size; n++ ) w_severe_wx_hail_size->add(hail_size[n].c_str()); w_severe_wx_hail_size->index(0); } static void updateFORM(SWX_QUAD *p) { char val[20]; SWX_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); break; case S: case M: ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case D: ((Fl_DateInput *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case O: ((Fl_ListBox *)p->widget)->put_value(((string *)(p->ptr))->c_str()); break; case T: ((FTextEdit *)p->widget)->clear(); ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); break; case C: val[0] = *((char *)(p->ptr)); val[1] = 0; ((Fl_Input2 *)p->widget)->value(val); break; case I: if (*((int *)(p->ptr)) == 0) ((Fl_Input2 *)p->widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); break; case E: default: return; } p++; } } void update_severe_wxform() { if (!fields_initialized) init_widgets(); updateFORM(severe_wx_QUAD); } void clear_severe_wx_form() { clear_severe_wxfields(); update_severe_wxform(); // combo initializers w_severe_wx_state->index(0); set_severe_wx_counties(0); w_severe_wx_county->index(0); w_severe_wx_city->index(0); w_severe_wx_zone->index(0); w_severe_wx_hail_size->index(0); // boolean initializers w_severe_wx_dmg_no->value(1); w_severe_wx_inj_no->value(1); w_severe_wx_estimated->value(1); w_severe_wx_not_exact->value(1); } static string mbuff; static void make_buffQUAD(SWX_QUAD *p) { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; SWX_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: if (*((bool *)(p->ptr)) == true) mbuff.append( lineout( p->html_fld, *((bool *)(p->ptr)) ? one : zero)); break; case O: case S: case D: case M: if (((string *)(p->ptr))->length()) mbuff.append( lineout( p->html_fld, *((string *)(p->ptr)))); break; case T: mbuff.append( lineout( p->html_fld, *((string *)(p->ptr)))); break; case C: if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { sval = " "; sval[0] = *((char *)(p->ptr)); mbuff.append( lineout( p->html_fld, sval)); } break; case I: if (*((int*)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; mbuff.append( lineout( p->html_fld, sval) ); } break; case F: if (*((float *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; mbuff.append( lineout( p->html_fld, sval) ); } break; case E: default: return; } p++; } } void make_buff_severe_wx(bool compress = false) { mbuff.clear(); make_buffQUAD(severe_wx_QUAD); if (compress) compress_maybe(mbuff); buffsevere_wx.append(mbuff); } static void readQUAD(string data, SWX_QUAD *p) { int i = 0; float f; SWX_QTYPE qt = p->qtype; while (qt != E) { switch (qt) { case B: *((bool *)(p->ptr)) = (findstr( data, p->html_fld ) == "1"); break; case D: case O: case S: case M: *((string *)(p->ptr)) = findstr( data, p->html_fld ); break; case T: *((string *)(p->ptr)) = findstr( data, p->html_fld ); break; case C: *((char *)(p->ptr)) = findstr( data, p->html_fld )[0]; break; case I: i = 0; sscanf( findstr( data, p->html_fld ).c_str(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; sscanf( findstr( data, p->html_fld ).c_str(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; qt = p->qtype; } } void read_severe_wx_buffer(string data) { clear_severe_wxfields(); read_header(data); readQUAD (data, severe_wx_QUAD); update_severe_wxform(); int idx = w_severe_wx_state->index(); set_severe_wx_counties(idx); w_severe_wx_county->value( ((string *)(severe_wx_QUAD[4].ptr))->c_str() ); } void cb_severe_wx_new() { if (check_severe_wxfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_severe_wx_save(); } } clear_severe_wx_form(); clear_header(); def_severe_wx_filename = ICS_msg_dir; def_severe_wx_filename.append("new"FSWX_EXT); show_filename(def_severe_wx_filename); using_severe_wx_template = false; } void cb_severe_wx_import() { fl_alert2("Not implemented"); } void cb_severe_wx_export() { fl_alert2("Not implemented"); } void cb_severe_wx_wrap_import(string wrapfilename, string inpbuffer) { clear_severe_wx_form(); read_severe_wx_buffer(inpbuffer); def_severe_wx_filename = ICS_msg_dir; def_severe_wx_filename.append(wrapfilename); show_filename(def_severe_wx_filename); using_severe_wx_template = false; } int eval_severe_wx_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_severe_wx_filename).append("]"); update_severe_wxfields(); update_header(FROM); evalstr.append(header("<severe_wx>")); buffsevere_wx.clear(); make_buff_severe_wx(true); if (buffsevere_wx.empty()) return 0; compress_maybe( buffsevere_wx ); evalstr.append( buffsevere_wx ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_severe_wx_wrap_export() { if (check_severe_wxfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_severe_wxfields(); if (base_severe_wx_filename == "new"FSWX_EXT || base_severe_wx_filename == "default"FSWX_EXT) if (!cb_severe_wx_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_severe_wx_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(true); export_wrapfile(base_severe_wx_filename, wrapfilename, buffsevere_wx, pext != ".wrap"); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(false); write_severe_wx(def_severe_wx_filename); } } void cb_severe_wx_wrap_autosend() { if (check_severe_wxfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_severe_wxfields(); if (base_severe_wx_filename == "new"FSWX_EXT || base_severe_wx_filename == "default"FSWX_EXT) if (!cb_severe_wx_save_as()) return; update_header(FROM); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(true); xfr_via_socket(base_severe_wx_filename, buffsevere_wx); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(false); write_severe_wx(def_severe_wx_filename); } void cb_severe_wx_load_template() { string def_severe_wx_filename = def_severe_wx_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TSWX_EXT, def_severe_wx_filename.c_str()); if (p) { clear_severe_wx_form(); read_data_file(p); def_severe_wx_TemplateName = p; show_filename(def_severe_wx_TemplateName); using_severe_wx_template = true; } } void cb_severe_wx_save_template() { if (!using_severe_wx_template) { cb_severe_wx_save_as_template(); return; } string def_severe_wx_filename = def_severe_wx_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TSWX_EXT, def_severe_wx_filename.c_str()); if (p) { update_header(CHANGED); update_severe_wxfields(); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(); write_severe_wx(p); } } void cb_severe_wx_save_as_template() { string def_severe_wx_filename = def_severe_wx_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TSWX_EXT, def_severe_wx_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_severe_wx_TemplateName = p; if (strlen(pext) == 0) def_severe_wx_TemplateName.append(TSWX_EXT); remove_spaces_from_filename(def_severe_wx_TemplateName); clear_header(); update_header(CHANGED); update_severe_wxfields(); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(); write_severe_wx(def_severe_wx_TemplateName); show_filename(def_severe_wx_TemplateName); using_severe_wx_template = true; } } void cb_severe_wx_open() { const char *p = FSEL::select(_("Open data file"), "ICS-severe_wx\t*"FSWX_EXT, def_severe_wx_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_severe_wx_form(); read_data_file(p); using_severe_wx_template = false; def_severe_wx_filename = p; show_filename(def_severe_wx_filename); } void write_severe_wx(string s) { FILE *filesevere_wx = fopen(s.c_str(), "w"); if (!filesevere_wx) return; fwrite(buffsevere_wx.c_str(), buffsevere_wx.length(), 1, filesevere_wx); fclose(filesevere_wx); } bool cb_severe_wx_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FSWX_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_severe_wx_filename; p = FSEL::saveas(_("Save data file"), "ICS-severe_wx\t*"FSWX_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_severe_wx_filename = p; if (strlen(pext) == 0) def_severe_wx_filename.append(FSWX_EXT); remove_spaces_from_filename(def_severe_wx_filename); update_header(NEW); update_severe_wxfields(); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(); write_severe_wx(def_severe_wx_filename); using_severe_wx_template = false; show_filename(def_severe_wx_filename); return true; } void cb_severe_wx_save() { if (base_severe_wx_filename == "new"FSWX_EXT || base_severe_wx_filename == "default"FSWX_EXT || using_severe_wx_template == true) { cb_severe_wx_save_as(); return; } if (check_severe_wxfields()) update_header(CHANGED); update_severe_wxfields(); buffsevere_wx.assign(header("<severe_wx>")); make_buff_severe_wx(); write_severe_wx(def_severe_wx_filename); using_severe_wx_template = false; } static void quad_to_html( string &target, SWX_QUAD *p) { string X = "x"; string SP = "_"; string sval = " "; string del = ""; char szval[20]; while (p->qtype != E) { if (p->qtype == B) replacestr(target, p->html_fld, *((bool *)(p->ptr)) ? X : SP); else if (p->qtype == S || p->qtype == O || p->qtype == D) { string s = *((string *)(p->ptr)); if (p->html_fld == ":state:") { if (s.length() > 1) s.erase(2); replacestr(target, p->html_fld, s); } else if (p->html_fld == ":zone") { size_t cp = s.find(','); s.erase(cp); replacestr(target, p->html_fld, s); } else if (s.find("--") == 0) { replacestr(target, p->html_fld, del); } else { replacestr(target, p->html_fld, *((string *)(p->ptr))); } } else if (p->qtype == M) { sval = *((string *)(p->ptr)); size_t np = string::npos; while ( (np = sval.find("\n")) != string::npos) sval.replace(np, 1, "<br>"); replacestr(target, p->html_fld, sval); } else if (p->qtype == T) replacestr(target, p->html_fld, *((string *)(p->ptr))); else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); replacestr(target, p->html_fld, sval); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; } else sval.clear(); replacestr(target, p->html_fld, sval); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; } else sval.clear(); replacestr(target, p->html_fld, sval); } p++; } } void cb_severe_wx_html() { string name_name = fl_filename_name(def_severe_wx_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string severe_wx_rptsta = ICS_dir; severe_wx_rptsta.append(name_name); severe_wx_rptsta.append(".html"); update_severe_wxfields(); string formsevere_wx = severe_wx_html_template; replacestr(formsevere_wx, TITLE, name_name); quad_to_html (formsevere_wx, severe_wx_QUAD); FILE *filesevere_wx = fopen(severe_wx_rptsta.c_str(), "w"); fprintf(filesevere_wx,"%s", formsevere_wx.c_str()); fclose(filesevere_wx); open_url(severe_wx_rptsta.c_str()); } static void quad_to_text( string &target, SWX_QUAD *p) { string X = "X"; string SP = " "; string sval = " "; string del = ""; char szval[20]; while (p->qtype != E) { if (p->qtype == B) { bool b = *((bool *)(p->ptr)); if (b) replacestr(target, p->html_fld, X); else replacestr(target, p->html_fld, SP); } else if (p->qtype == S || p->qtype == M || p->qtype == O || p->qtype == D) { string s = *((string *)(p->ptr)); if (p->html_fld == ":state:") { if (s.length() > 1) s.erase(2); replacestr(target, p->html_fld, s); } else if (p->html_fld == ":zone") { size_t cp = s.find(','); s.erase(cp); replacestr(target, p->html_fld, s); } else if (s.find("--") == 0) { replacestr(target, p->html_fld, del); } else { if (((string *)(p->ptr))->length()) replacestr(target, p->html_fld, *((string *)(p->ptr))); else replacestr(target, p->html_fld, del); } } else if (p->qtype == T) { if (((string *)(p->ptr))->length()) replacestr(target, p->html_fld, *((string *)(p->ptr))); else replacestr(target, p->html_fld, del); } else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, p->html_fld, sval); else replacestr(target, p->html_fld, del); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; replacestr(target, p->html_fld, sval); } else replacestr(target, p->html_fld, del); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; replacestr(target, p->html_fld, sval); } else replacestr(target, p->html_fld, del); } p++; } } void cb_severe_wx_textout() { string severe_wx_rptsta = ICS_dir; severe_wx_rptsta.append("severe_wx.txt"); update_severe_wxfields(); string formsevere_wx = severe_wx_text_template; quad_to_text (formsevere_wx, severe_wx_QUAD); FILE *filesevere_wx = fopen(severe_wx_rptsta.c_str(), "w"); fprintf(filesevere_wx,"%s", formsevere_wx.c_str()); fclose(filesevere_wx); open_url(severe_wx_rptsta.c_str()); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/storm_report_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000042666�12330516146�015202� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" #include "calendar.h" #include "wx_strings.h" Fl_Group *tab_storm = (Fl_Group *)0; Fl_Tabs *tab_storm_type = (Fl_Tabs *)0; Fl_Group *tab_storm_1 = (Fl_Group *)0; Fl_DateInput *w_storm_date = (Fl_DateInput *)0; Fl_Input2 *w_storm_time = (Fl_Input2 *)0; Fl_Button *w_storm_btn_time = (Fl_Button *)0; Fl_ListBox *w_storm_zone = (Fl_ListBox *)0; Fl_ListBox *w_storm_state = (Fl_ListBox *)0; Fl_ListBox *w_storm_county = (Fl_ListBox *)0; Fl_Input2 *w_storm_location = (Fl_Input2 *)0; Fl_Button *use_storm_default = (Fl_Button *)0; Fl_Button *make_storm_default = (Fl_Button *)0; Fl_Check_Button *w_storm_tornado = (Fl_Check_Button *)0; Fl_ListBox *w_storm_tornado_cat = (Fl_ListBox *)0; Fl_Check_Button *w_storm_hail = (Fl_Check_Button *)0; Fl_ListBox *w_storm_hail_size = (Fl_ListBox *)0; Fl_Check_Button *w_storm_wind = (Fl_Check_Button *)0; Fl_ListBox *w_storm_wind_cat = (Fl_ListBox *)0;; Fl_Check_Button *w_storm_flood = (Fl_Check_Button *)0; Fl_ListBox *w_storm_flood_cat = (Fl_ListBox *)0; Fl_Check_Button *w_storm_damage = (Fl_Check_Button *)0; Fl_ListBox *w_storm_damage_cat = (Fl_ListBox *)0; Fl_Check_Button *w_storm_snow = (Fl_Check_Button *)0; Fl_ListBox *w_storm_snow_tot = (Fl_ListBox *)0; Fl_ListBox *w_storm_snow_dur = (Fl_ListBox *)0; Fl_Check_Button *w_storm_f_rain = (Fl_Check_Button *)0; Fl_ListBox *w_storm_f_rain_tot = (Fl_ListBox *)0; Fl_ListBox *w_storm_f_rain_dur = (Fl_ListBox *)0; Fl_Check_Button *w_storm_h_rain = (Fl_Check_Button *)0; Fl_ListBox *w_storm_h_rain_tot = (Fl_ListBox *)0; Fl_ListBox *w_storm_h_rain_dur = (Fl_ListBox *)0; Fl_Input2 *w_storm_o_name = (Fl_Input2 *)0; Fl_Input2 *w_storm_o_email = (Fl_Input2 *)0; Fl_Input2 *w_storm_o_tele = (Fl_Input2 *)0; Fl_ListBox *w_storm_o_profile = (Fl_ListBox *)0; Fl_Group *tab_storm_2 = (Fl_Group *)0; FTextEdit *w_storm_details = (FTextEdit *)0; //---------------------------------------------------------------------- // widget callbacks & support //---------------------------------------------------------------------- void set_storm_counties(int ndx) { string st = states[ndx]; size_t p = st.find(','); if (p != string::npos) { st.erase(p+1); size_t p1 = counties.find(st); size_t p2 = counties.rfind(st); string cnty = counties.substr(p1+3, p2 - p1 - 3); size_t pc = cnty.find(','); p1 = 0; w_storm_county->clear(); while (pc != string::npos) { w_storm_county->add(cnty.substr(p1, pc - p1).c_str()); p1 = pc + 1; pc = cnty.find(',', pc + 1); } } w_storm_county->index(0); } static void set_storm_combos() { w_storm_state->clear(); for (int i = 0; i < numstates; i++) { if (i == 0) w_storm_state->add("--Select State--"); else w_storm_state->add(states[i].c_str()); } w_storm_state->index(0); w_storm_zone->clear(); for (int i = 0; i < num_us_tzones; i++) w_storm_zone->add(us_tzones[i].c_str()); w_storm_zone->index(0); w_storm_flood_cat->clear(); for (int i = 0; i < num_flood_categories; i++) w_storm_flood_cat->add(flood_categories[i].c_str()); w_storm_flood_cat->index(0); w_storm_hail_size->clear(); for (int i = 0; i < num_hail_size; i++) w_storm_hail_size->add(hail_size[i].c_str()); w_storm_hail_size->index(0); w_storm_tornado_cat->clear(); for (int i = 0; i < num_tornado_categories; i++) w_storm_tornado_cat->add(tornado_categories[i].c_str()); w_storm_tornado_cat->index(0); w_storm_wind_cat->clear(); for (int i = 0; i < num_wind_speeds; i++) w_storm_wind_cat->add(wind_speeds[i].c_str()); w_storm_wind_cat->index(0); w_storm_damage_cat->clear(); for (int i = 0; i < num_damage; i++) w_storm_damage_cat->add(damage[i].c_str()); w_storm_damage_cat->index(0); w_storm_snow_dur->clear(); for (int i = 0; i < num_snow_dur; i++) w_storm_snow_dur->add(snow_dur[i].c_str()); w_storm_snow_dur->index(0); w_storm_snow_tot->clear(); for (int i = 0; i < num_snow_tot; i++) w_storm_snow_tot->add(snow_tot[i].c_str()); w_storm_snow_tot->index(0); w_storm_f_rain_dur->clear(); for (int i = 0; i < num_ice_dur; i++) w_storm_f_rain_dur->add(ice_dur[i].c_str()); w_storm_f_rain_dur->index(0); w_storm_f_rain_tot->clear(); for (int i = 0; i < num_ice_tot; i++) w_storm_f_rain_tot->add(ice_tot[i].c_str()); w_storm_f_rain_tot->index(0); w_storm_h_rain_dur->clear(); for (int i = 0; i < num_rainfall_dur; i++) w_storm_h_rain_dur->add(rainfall_dur[i].c_str()); w_storm_h_rain_dur->index(0); w_storm_h_rain_tot->clear(); for (int i = 0; i < num_rainfall; i++) w_storm_h_rain_tot->add(rainfall[i].c_str()); w_storm_h_rain_tot->index(0); w_storm_o_profile->clear(); for (int i = 0; i < num_profiles; i++) w_storm_o_profile->add(profiles[i].c_str()); w_storm_o_profile->index(0); set_storm_counties(0); } static void cb_btn_time(Fl_Button*, void*) { w_storm_time->value(szTime(7)); } static void cb_make_storm_default(Fl_Button*, void*) { progStatus.swx_index_default_county = w_storm_county->index(); progStatus.swx_index_default_state = w_storm_state->index(); progStatus.swx_default_location = w_storm_location->value(); progStatus.swx_default_zone = w_storm_zone->value(); progStatus.swx_default_profile = w_storm_o_profile->value(); } static void cb_use_storm_default(Fl_Button*, void*) { w_storm_state->index(progStatus.swx_index_default_state); set_storm_counties(progStatus.swx_index_default_state); w_storm_county->index(progStatus.swx_index_default_county); w_storm_location->value(progStatus.swx_default_location.c_str()); w_storm_zone->value(progStatus.swx_default_zone.c_str()); w_storm_o_name->value(progStatus.my_name.c_str()); w_storm_o_tele->value(progStatus.my_tel.c_str()); w_storm_o_email->value(progStatus.my_email.c_str()); w_storm_o_profile->value(progStatus.swx_default_profile.c_str()); } void storm_changed(Fl_Widget *, void *) { estimate(); } void cb_storm_state(Fl_Widget *, void *) { int n = w_storm_state->index(); set_storm_counties(n); estimate(); } void cb_flood(Fl_Widget *, void *) { w_storm_flood_cat->index(0); if (w_storm_flood->value()) w_storm_flood_cat->activate(); else w_storm_flood_cat->deactivate(); estimate(); } void cb_hail(Fl_Widget *, void *) { w_storm_hail_size->index(0); if (w_storm_hail->value()) w_storm_hail_size->activate(); else w_storm_hail_size->deactivate(); estimate(); } void cb_high_wind(Fl_Widget *, void *) { w_storm_wind_cat->index(0); if (w_storm_wind->value()) w_storm_wind_cat->activate(); else w_storm_wind_cat->deactivate(); estimate(); } void cb_tornado(Fl_Widget *, void *) { w_storm_tornado_cat->index(0); if (w_storm_tornado->value()) w_storm_tornado_cat->activate(); else w_storm_tornado_cat->deactivate(); estimate(); } void cb_damage(Fl_Widget *, void *) { w_storm_damage_cat->index(0); if (w_storm_damage->value()) w_storm_damage_cat->activate(); else w_storm_damage_cat->deactivate(); estimate(); } void cb_snow(Fl_Widget *, void *) { w_storm_snow_tot->index(0); w_storm_snow_dur->index(0); if (w_storm_snow->value()) { w_storm_snow_tot->activate(); w_storm_snow_dur->activate(); } else { w_storm_snow_tot->deactivate(); w_storm_snow_dur->deactivate(); } estimate(); } void cb_f_rain(Fl_Widget *, void *) { w_storm_f_rain_tot->index(0); w_storm_f_rain_dur->index(0); if (w_storm_f_rain->value()) { w_storm_f_rain_tot->activate(); w_storm_f_rain_dur->activate(); } else { w_storm_f_rain_tot->deactivate(); w_storm_f_rain_dur->deactivate(); } estimate(); } void cb_h_rain(Fl_Widget *, void *) { w_storm_h_rain_tot->index(0); w_storm_h_rain_dur->index(0); if (w_storm_h_rain->value()) { w_storm_h_rain_tot->activate(); w_storm_h_rain_dur->activate(); } else { w_storm_h_rain_tot->deactivate(); w_storm_h_rain_dur->deactivate(); } estimate(); } void create_storm_tab() { int Y = tab_top; tab_storm = new Fl_Group(0, Y, 570, 390, "tab_storm"); tab_storm->begin(); tab_storm->copy_label(""); tab_storm->align(FL_ALIGN_INSIDE); tab_storm_type = new Fl_Tabs(0, Y+2, 570, 387, "wx_tabs"); tab_storm_type->selection_color((Fl_Color)246); tab_storm_type->copy_label(""); tab_storm_type->align(FL_ALIGN_INSIDE); tab_storm_1 = new Fl_Group(0, Y+25, 570, 360, "Report"); tab_storm_1->begin(); Y += 35; w_storm_date = new Fl_DateInput(70, Y, 140, 22, _("Date")); w_storm_date->tooltip(_("Observation date : month/day/year")); w_storm_date->align(FL_ALIGN_LEFT); w_storm_date->box(FL_DOWN_BOX); w_storm_date->color((Fl_Color)FL_BACKGROUND2_COLOR); w_storm_date->selection_color((Fl_Color)FL_SELECTION_COLOR); w_storm_date->labeltype(FL_NORMAL_LABEL); w_storm_date->labelfont(0); w_storm_date->labelsize(14); w_storm_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); w_storm_date->when(FL_WHEN_CHANGED); w_storm_date->callback(storm_changed); w_storm_date->local_datetime(); w_storm_time = new Fl_Input2(250, Y, 60, 22, _("Time")); w_storm_time->tooltip(_("Observation time : HHMM")); w_storm_time->align(FL_ALIGN_LEFT); w_storm_time->when(FL_WHEN_CHANGED); w_storm_time->callback(storm_changed); w_storm_btn_time = new Fl_Button(312, Y, 22, 22, _("...")); w_storm_btn_time->tooltip(_("Current local time")); w_storm_btn_time->callback((Fl_Callback*)cb_btn_time); w_storm_zone = new Fl_ListBox(335, Y, 80, 22, ""); w_storm_zone->begin(); w_storm_zone->align(FL_ALIGN_TOP || FL_ALIGN_INSIDE); w_storm_zone->tooltip(_("Time Zone, ie: EDT")); w_storm_zone->when(FL_WHEN_CHANGED); w_storm_zone->align(FL_ALIGN_RIGHT); for (int n = 0; n < num_us_tzones; n++) w_storm_zone->add(us_tzones[n].c_str()); w_storm_zone->callback(storm_changed); w_storm_zone->end(); Y += 25; w_storm_state = new Fl_ListBox(70, Y, 200, 22, _("State")); w_storm_state->begin(); w_storm_state->tooltip(_("Select state / territory")); w_storm_state->align(FL_ALIGN_LEFT); w_storm_state->when(FL_WHEN_CHANGED); w_storm_state->callback((Fl_Callback*)cb_storm_state); w_storm_state->end(); w_storm_county = new Fl_ListBox(325, Y, 235, 22, _("County")); w_storm_county->begin(); w_storm_county->tooltip(_("Select county")); w_storm_county->align(FL_ALIGN_LEFT); w_storm_county->when(FL_WHEN_CHANGED); w_storm_county->callback((Fl_Callback*)storm_changed); w_storm_county->end(); Y += 25; int y1 = Y; w_storm_location = new Fl_Input2(70, Y, 200, 22, _("Location")); w_storm_location->tooltip(_("Enter location/town")); w_storm_location->align(FL_ALIGN_LEFT); w_storm_location->when(FL_WHEN_CHANGED); w_storm_location->callback((Fl_Callback*)storm_changed); // flood Y += 35; w_storm_flood = new Fl_Check_Button(20, Y, 180, 22, _("Flood")); w_storm_flood->tooltip(_("Report flooding")); w_storm_flood->when(FL_WHEN_CHANGED); w_storm_flood->callback((Fl_Callback*)cb_flood); w_storm_flood_cat = new Fl_ListBox(200, Y, 365, 22, ""); w_storm_flood_cat->tooltip(_("Select a flooding category")); w_storm_flood_cat->when(FL_WHEN_CHANGED); w_storm_flood_cat->callback((Fl_Callback*)storm_changed); w_storm_flood_cat->deactivate(); //hail Y += 25; w_storm_hail = new Fl_Check_Button(20, Y, 180, 22, _("Hail")); w_storm_hail->tooltip(_("Report incidence of hail")); w_storm_hail->when(FL_WHEN_CHANGED); w_storm_hail->callback((Fl_Callback*)cb_hail); w_storm_hail_size = new Fl_ListBox(200, Y, 365, 22, ""); w_storm_hail_size->tooltip(_("Select a Hail size")); w_storm_hail_size->when(FL_WHEN_CHANGED); w_storm_hail_size->callback((Fl_Callback*)storm_changed); w_storm_hail_size->deactivate(); //high speed wind Y += 25; w_storm_wind = new Fl_Check_Button(20, Y, 180, 22, _("High Wind Speed")); w_storm_wind->tooltip(_("Report high winds")); w_storm_wind->when(FL_WHEN_CHANGED); w_storm_wind->callback((Fl_Callback*)cb_high_wind); w_storm_wind_cat = new Fl_ListBox(200, Y, 365, 22, ""); w_storm_wind_cat->tooltip(_("Select a wind speed")); w_storm_wind_cat->when(FL_WHEN_CHANGED); w_storm_wind_cat->callback((Fl_Callback*)storm_changed); w_storm_wind_cat->deactivate(); //tornado/funnel cloud Y += 25; w_storm_tornado = new Fl_Check_Button(20, Y, 180, 22, _("Tornado/Funnel cloud")); w_storm_tornado->tooltip(_("Report tornado sighting")); w_storm_tornado->when(FL_WHEN_CHANGED); w_storm_tornado->callback((Fl_Callback*)cb_tornado); w_storm_tornado_cat = new Fl_ListBox(200, Y, 365, 22, ""); w_storm_tornado_cat->tooltip(_("Select a report")); w_storm_tornado_cat->when(FL_WHEN_CHANGED); w_storm_tornado_cat->callback((Fl_Callback*)storm_changed); w_storm_tornado_cat->deactivate(); //wind damage Y += 25; w_storm_damage = new Fl_Check_Button(20, Y, 180, 22, _("Wind Damage?")); w_storm_damage->tooltip("Report wind damage"); w_storm_damage->when(FL_WHEN_CHANGED); w_storm_damage->callback((Fl_Callback*)cb_damage); w_storm_damage_cat = new Fl_ListBox(200, Y, 365, 22, ""); w_storm_damage_cat->tooltip(_("Select a Damage Desc'")); w_storm_damage_cat->when(FL_WHEN_CHANGED); w_storm_damage_cat->callback((Fl_Callback*)storm_changed); w_storm_damage_cat->deactivate(); //snow Y += 25; w_storm_snow = new Fl_Check_Button(20, Y, 180, 22, _("Snow")); w_storm_snow->tooltip("Report Snowfall"); w_storm_snow->when(FL_WHEN_CHANGED); w_storm_snow->callback((Fl_Callback*)cb_snow); w_storm_snow_tot = new Fl_ListBox(200, Y, 180, 22, ""); w_storm_snow_tot->tooltip(_("Select a snow tot'")); w_storm_snow_tot->when(FL_WHEN_CHANGED); w_storm_snow_tot->callback((Fl_Callback*)storm_changed); w_storm_snow_tot->deactivate(); w_storm_snow_dur = new Fl_ListBox(385, Y, 180, 22, ""); w_storm_snow_dur->tooltip(_("Select a snow total")); w_storm_snow_dur->when(FL_WHEN_CHANGED); w_storm_snow_dur->callback((Fl_Callback*)storm_changed); w_storm_snow_dur->deactivate(); //freezing rain/icing Y += 25; w_storm_f_rain = new Fl_Check_Button(20, Y, 180, 22, _("Freezing Rain/Icing")); w_storm_f_rain->tooltip("Report freezing rain / ice"); w_storm_f_rain->when(FL_WHEN_CHANGED); w_storm_f_rain->callback((Fl_Callback*)cb_f_rain); w_storm_f_rain_tot = new Fl_ListBox(200, Y, 180, 22, ""); w_storm_f_rain_tot->tooltip(_("Select an ice total")); w_storm_f_rain_tot->when(FL_WHEN_CHANGED); w_storm_f_rain_tot->callback((Fl_Callback*)storm_changed); w_storm_f_rain_tot->deactivate(); w_storm_f_rain_dur = new Fl_ListBox(385, Y, 180, 22, ""); w_storm_f_rain_dur->tooltip(_("Select a duration")); w_storm_f_rain_dur->when(FL_WHEN_CHANGED); w_storm_f_rain_dur->callback((Fl_Callback*)storm_changed); w_storm_f_rain_dur->deactivate(); //heavy rain Y += 25; w_storm_h_rain = new Fl_Check_Button(20, Y, 180, 22, _("Heavy Rain")); w_storm_h_rain->tooltip("Report heavy rain"); w_storm_h_rain->when(FL_WHEN_CHANGED); w_storm_h_rain->callback((Fl_Callback*)cb_h_rain); w_storm_h_rain_tot = new Fl_ListBox(200, Y, 180, 22, ""); w_storm_h_rain_tot->tooltip(_("Select rain total")); w_storm_h_rain_tot->when(FL_WHEN_CHANGED); w_storm_h_rain_tot->callback((Fl_Callback*)storm_changed); w_storm_h_rain_tot->deactivate(); w_storm_h_rain_dur = new Fl_ListBox(385, Y, 180, 22, ""); w_storm_h_rain_dur->tooltip(_("Select a duration")); w_storm_h_rain_dur->when(FL_WHEN_CHANGED); w_storm_h_rain_dur->callback((Fl_Callback*)storm_changed); w_storm_h_rain_dur->deactivate(); //contact information Y += 35; w_storm_o_name = new Fl_Input2(70, Y, 240, 22, _("Name")); w_storm_o_name->when(FL_WHEN_CHANGED); w_storm_o_name->align(FL_ALIGN_LEFT); w_storm_o_tele = new Fl_Input2(380, Y, 185, 22, _("Phone")); w_storm_o_tele->when(FL_WHEN_CHANGED); w_storm_o_tele->align(FL_ALIGN_LEFT); Y += 25; w_storm_o_email = new Fl_Input2(70, Y, 240, 22, _("Email")); w_storm_o_email->when(FL_WHEN_CHANGED); w_storm_o_email->align(FL_ALIGN_LEFT); w_storm_o_profile = new Fl_ListBox(380, Y, 185, 22, _("Profile")); w_storm_o_profile->begin(); w_storm_o_profile->align(FL_ALIGN_LEFT); w_storm_o_profile->tooltip(_("Select a profile")); w_storm_o_profile->when(FL_WHEN_CHANGED); w_storm_o_profile->callback((Fl_Callback*)storm_changed); w_storm_o_profile->end(); make_storm_default = new Fl_Button(415, y1, 70, 24, _("Store")); make_storm_default->tooltip(_("Store state/county/location\ntime-zone\nname, email, tele, profile\nas default")); make_storm_default->callback((Fl_Callback*)cb_make_storm_default); use_storm_default = new Fl_Button(490, y1, 70, 24, _("Default")); use_storm_default->tooltip(_("Use state/county/location\ntime-zone\nname, email, tele, profile\nas default")); use_storm_default->callback((Fl_Callback*)cb_use_storm_default); tab_storm_1->end(); Y = tab_top; tab_storm_2 = new Fl_Group(0, Y+25, 570, 360, _("Details")); tab_storm_2->begin(); Y += 35; w_storm_details = new FTextEdit(5, Y, 560, 340, _("")); w_storm_details->when(FL_WHEN_RELEASE); w_storm_details->callback((Fl_Callback*)storm_changed); tab_storm_2->end(); tab_storm->end(); set_storm_combos(); tab_storm->hide(); }; ��������������������������������������������������������������������������flmsg-2.0.10/src/wx/hurricane.cxx�������������������������������������������������������������������0000664�0001750�0001750�00000053756�12330516146�013577� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "combo.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string wxhc_rptsta; string wxhc_email; string wxhc_phone; string wxhc_addr; string wxhc_city; string wxhc_state; string wxhc_country; string wxhc_lat; string wxhc_long; string wxhc_date; string wxhc_time; bool wxhc_meas; bool wxhc_est; string wxhc_wind_speed; string wxhc_wind_speed_units; string wxhc_wind_gusts; string wxhc_wind_gusts_units; string wxhc_wind_dir; string wxhc_wind_degrees; string wxhc_baro_press; string wxhc_baro_units; string wxhc_comments; const char *s_wsu_units[] = { "MPH", "KNOTS", "KPH", NULL }; const char *s_wdu_units[] = { "N", "NE", "E", "SE", "S", "SW", "W", "NW", NULL }; const char *s_baro_units[] = { "Inches", "Millibars", NULL }; // could not use real names ... WIN32 barfs enum NHC_QTYPE { B, S, M, T, I, F, C, O, E }; // bool, string, multi-line string, text, int, float, character, cOmbo, empty struct NHC_QUAD { NHC_QTYPE qtype; // type of field string html_fld; void *ptr; Fl_Widget *widget; }; NHC_QUAD wxhc_QUAD[] = { { S, ":rptsta:", &wxhc_rptsta, w_wxhc_rptsta }, // 0 { S, ":email:", &wxhc_email, w_wxhc_email }, // 1 { S, ":phone:", &wxhc_phone, w_wxhc_phone }, // 2 { S, ":addr:", &wxhc_addr, w_wxhc_addr }, // 3 { S, ":city:", &wxhc_city, w_wxhc_city }, // 4 { S, ":state:", &wxhc_state, w_wxhc_state }, // 5 { S, ":country:", &wxhc_country, w_wxhc_country }, // 6 { S, ":lat:", &wxhc_lat, w_wxhc_lat }, // 7 { S, ":long:", &wxhc_long, w_wxhc_long }, // 8 { S, ":date:", &wxhc_date, w_wxhc_date }, // 9 { S, ":time:", &wxhc_time, w_wxhc_time }, // 10 { B, ":meas:", &wxhc_meas, w_wxhc_meas }, // 11 { B, ":est:", &wxhc_est, w_wxhc_est }, // 12 { S, ":wspd:", &wxhc_wind_speed, w_wxhc_wind_speed }, // 13 { O, ":wsunits:", &wxhc_wind_speed_units, w_wxhc_wind_speed_units}, // 14 { S, ":wgst:", &wxhc_wind_gusts, w_wxhc_wind_gusts }, // 15 { O, ":wgunits:", &wxhc_wind_gusts_units, w_wxhc_wind_gusts_units }, // 16 { O, ":wdir:", &wxhc_wind_dir, w_wxhc_wind_dir }, // 17 { S, ":wdeg:", &wxhc_wind_degrees, w_wxhc_wind_degrees }, // 18 { S, ":baro:", &wxhc_baro_press, w_wxhc_baro_press }, // 19 { O, ":bunits:", &wxhc_baro_units, w_wxhc_baro_units }, // 20 { T, ":cmmts:", &wxhc_comments, w_wxhc_comments }, // 21 { E, "", NULL, NULL } }; string buffwxhc; string def_wxhc_filename = ""; string base_wxhc_filename = ""; string def_wxhc_TemplateName = ""; bool using_wxhc_template = false; static bool fields_initialized = false; // required to initialize the control pointers in the QUAD array static void init_widgets() { wxhc_QUAD[0].widget = w_wxhc_rptsta; wxhc_QUAD[1].widget = w_wxhc_email; wxhc_QUAD[2].widget = w_wxhc_phone; wxhc_QUAD[3].widget = w_wxhc_addr; wxhc_QUAD[4].widget = w_wxhc_city; wxhc_QUAD[5].widget = w_wxhc_state; wxhc_QUAD[6].widget = w_wxhc_country; wxhc_QUAD[7].widget = w_wxhc_lat; wxhc_QUAD[8].widget = w_wxhc_long; wxhc_QUAD[9].widget = w_wxhc_date; wxhc_QUAD[10].widget = w_wxhc_time; wxhc_QUAD[11].widget = w_wxhc_meas; wxhc_QUAD[12].widget = w_wxhc_est; wxhc_QUAD[13].widget = w_wxhc_wind_speed; wxhc_QUAD[14].widget = w_wxhc_wind_speed_units; wxhc_QUAD[15].widget = w_wxhc_wind_gusts; wxhc_QUAD[16].widget = w_wxhc_wind_gusts_units; wxhc_QUAD[17].widget = w_wxhc_wind_dir; wxhc_QUAD[18].widget = w_wxhc_wind_degrees; wxhc_QUAD[19].widget = w_wxhc_baro_press; wxhc_QUAD[20].widget = w_wxhc_baro_units; wxhc_QUAD[21].widget = w_wxhc_comments; fields_initialized = true; } //enum NHC_QTYPE { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty static void clearQUAD(NHC_QUAD *p) { NHC_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B : (*(bool *)(p->ptr)) = false; break; case S : case M : ((string *)(p->ptr))->clear(); break; case T : ((string *)(p->ptr))->clear(); break; case C : (*(char *)(p->ptr)) = ' '; break; case I : (*(int *)(p->ptr)) = 0; break; case F : (*(float *)(p->ptr)) = 0.0; break; case O : break; case E : return; } p++; } wxhc_est = true; wxhc_wind_speed_units = s_wsu_units[0]; wxhc_wind_gusts_units = s_wsu_units[0]; wxhc_wind_dir = s_wdu_units[0]; wxhc_baro_units = s_baro_units[0]; } void clear_wxhcfields() { if (!fields_initialized) init_widgets(); clearQUAD(wxhc_QUAD); } static bool checkQUAD(NHC_QUAD *p) { int i = 0; float f = 0; char c = ' '; NHC_QTYPE qt = E; while ((qt = p->qtype) != E) { if (p->widget == NULL) return false; switch (qt) { case B: if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true; break; case S: case M: if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; break; case T: if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; if (*((char *)(p->ptr)) != c) return true; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); if (*((int *)(p->ptr)) != i) return true; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); if (*((float *)(p->ptr)) != f) return true; break; case O: if (*((string *)(p->ptr)) != ((Fl_ListBox *)p->widget)->value()) return true; break; case E: default: return false; } p++; } return false; } bool check_wxhcfields() { return checkQUAD(wxhc_QUAD); } static void updateQUAD(NHC_QUAD *p) { int i = 0; float f = 0; char c = ' '; NHC_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); break; case S: case M: *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); break; case O: *((string *)(p->ptr)) = ((Fl_ListBox *)p->widget)->value(); break; case T: *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; *((char *)(p->ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void update_wxhcfields() { if (!fields_initialized) init_widgets(); updateQUAD(wxhc_QUAD); } void set_nhc_wx_combos() { const char **s = s_wsu_units; int i = 0; w_wxhc_wind_speed_units->clear(); while (s[i]) { w_wxhc_wind_speed_units->add(s[i]); i++;} s = s_wsu_units; i = 0; w_wxhc_wind_gusts_units->clear(); while (s[i]) { w_wxhc_wind_gusts_units->add(s[i]); i++; } s = s_wdu_units; i = 0; w_wxhc_wind_dir->clear(); while (s[i]) { w_wxhc_wind_dir->add(s[i]); i++; } s = s_baro_units; i = 0; w_wxhc_baro_units->clear(); while (s[i]) { w_wxhc_baro_units->add(s[i]); i++; } } static void updateFORM(NHC_QUAD *p) { char val[20]; NHC_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); break; case S: case M: ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case O: ((Fl_ListBox *)p->widget)->put_value(((string *)(p->ptr))->c_str()); break; case T: ((FTextEdit *)p->widget)->clear(); ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); break; case C: val[0] = *((char *)(p->ptr)); val[1] = 0; ((Fl_Input2 *)p->widget)->value(val); break; case I: if (*((int *)(p->ptr)) == 0) ((Fl_Input2 *)p->widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); break; case E: default: return; } p++; } } void update_wxhcform() { if (!fields_initialized) init_widgets(); updateFORM(wxhc_QUAD); } void clear_wxhc_form() { clear_wxhcfields(); update_wxhcform(); } static string mbuff; static void make_buffQUAD(NHC_QUAD *p) { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; NHC_QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: if (*((bool *)(p->ptr)) == true) mbuff.append( lineout( p->html_fld, *((bool *)(p->ptr)) ? one : zero)); break; case O: case S: case M: if (((string *)(p->ptr))->length()) mbuff.append( lineout( p->html_fld, *((string *)(p->ptr)))); break; case T: mbuff.append( lineout( p->html_fld, *((string *)(p->ptr)))); break; case C: if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { sval = " "; sval[0] = *((char *)(p->ptr)); mbuff.append( lineout( p->html_fld, sval)); } break; case I: if (*((int*)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; mbuff.append( lineout( p->html_fld, sval) ); } break; case F: if (*((float *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; mbuff.append( lineout( p->html_fld, sval) ); } break; case E: default: return; } p++; } } void make_buffwxhc(bool compress = false) { mbuff.clear(); make_buffQUAD(wxhc_QUAD); if (compress) compress_maybe(mbuff); buffwxhc.append(mbuff); } static void readQUAD(string data, NHC_QUAD *p) { int i = 0; float f; NHC_QTYPE qt = p->qtype; while (qt != E) { switch (qt) { case B: *((bool *)(p->ptr)) = (findstr( data, p->html_fld ) == "1"); break; case O: case S: case M: *((string *)(p->ptr)) = findstr( data, p->html_fld ); break; case T: *((string *)(p->ptr)) = findstr( data, p->html_fld ); break; case C: *((char *)(p->ptr)) = findstr( data, p->html_fld )[0]; break; case I: i = 0; sscanf( findstr( data, p->html_fld ).c_str(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; sscanf( findstr( data, p->html_fld ).c_str(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; qt = p->qtype; } } void read_wxhc_buffer(string data) { clear_wxhcfields(); read_header(data); readQUAD (data, wxhc_QUAD); update_wxhcform(); } void cb_wxhc_new() { if (check_wxhcfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_wxhc_save(); } } clear_wxhc_form(); clear_header(); def_wxhc_filename = ICS_msg_dir; def_wxhc_filename.append("new"FWXHC_EXT); show_filename(def_wxhc_filename); using_wxhc_template = false; } void cb_wxhc_import() { fl_alert2("Not implemented"); } void cb_wxhc_export() { fl_alert2("Not implemented"); } void cb_wxhc_wrap_import(string wrapfilename, string inpbuffer) { clear_wxhc_form(); read_wxhc_buffer(inpbuffer); def_wxhc_filename = ICS_msg_dir; def_wxhc_filename.append(wrapfilename); show_filename(def_wxhc_filename); using_wxhc_template = false; } int eval_wxhc_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_wxhc_filename).append("]"); update_wxhcfields(); update_header(FROM); evalstr.append(header("<nhc_wx>")); buffwxhc.clear(); make_buffwxhc(true); if (buffwxhc.empty()) return 0; compress_maybe( buffwxhc ); evalstr.append( buffwxhc ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_wxhc_wrap_export() { if (check_wxhcfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_wxhcfields(); if (base_wxhc_filename == "new"FWXHC_EXT || base_wxhc_filename == "default"FWXHC_EXT) if (!cb_wxhc_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_wxhc_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(true); export_wrapfile(base_wxhc_filename, wrapfilename, buffwxhc, pext != ".wrap"); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(false); write_wxhc(def_wxhc_filename); } } void cb_wxhc_wrap_autosend() { if (check_wxhcfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_wxhcfields(); if (base_wxhc_filename == "new"FWXHC_EXT || base_wxhc_filename == "default"FWXHC_EXT) if (!cb_wxhc_save_as()) return; update_header(FROM); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(true); xfr_via_socket(base_wxhc_filename, buffwxhc); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(false); write_wxhc(def_wxhc_filename); } void cb_wxhc_load_template() { string def_wxhc_filename = def_wxhc_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TWXHC_EXT, def_wxhc_filename.c_str()); if (p) { clear_wxhc_form(); read_data_file(p); def_wxhc_TemplateName = p; show_filename(def_wxhc_TemplateName); using_wxhc_template = true; } } void cb_wxhc_save_template() { if (!using_wxhc_template) { cb_wxhc_save_as_template(); return; } string def_wxhc_filename = def_wxhc_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TWXHC_EXT, def_wxhc_filename.c_str()); if (p) { update_header(CHANGED); update_wxhcfields(); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(); write_wxhc(p); } } void cb_wxhc_save_as_template() { string def_wxhc_filename = def_wxhc_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TWXHC_EXT, def_wxhc_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_wxhc_TemplateName = p; if (strlen(pext) == 0) def_wxhc_TemplateName.append(TWXHC_EXT); remove_spaces_from_filename(def_wxhc_TemplateName); clear_header(); update_header(CHANGED); update_wxhcfields(); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(); write_wxhc(def_wxhc_TemplateName); show_filename(def_wxhc_TemplateName); using_wxhc_template = true; } } void cb_wxhc_open() { const char *p = FSEL::select(_("Open data file"), "ICS-wxhc\t*"FWXHC_EXT, def_wxhc_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_wxhc_form(); read_data_file(p); using_wxhc_template = false; def_wxhc_filename = p; show_filename(def_wxhc_filename); } void write_wxhc(string s) { FILE *filewxhc = fopen(s.c_str(), "w"); if (!filewxhc) return; fwrite(buffwxhc.c_str(), buffwxhc.length(), 1, filewxhc); fclose(filewxhc); } bool cb_wxhc_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FWXHC_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_wxhc_filename; p = FSEL::saveas(_("Save data file"), "ICS-wxhc\t*"FWXHC_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_wxhc_filename = p; if (strlen(pext) == 0) def_wxhc_filename.append(FWXHC_EXT); remove_spaces_from_filename(def_wxhc_filename); update_header(NEW); update_wxhcfields(); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(); write_wxhc(def_wxhc_filename); using_wxhc_template = false; show_filename(def_wxhc_filename); return true; } void cb_wxhc_save() { if (base_wxhc_filename == "new"FWXHC_EXT || base_wxhc_filename == "default"FWXHC_EXT || using_wxhc_template == true) { cb_wxhc_save_as(); return; } if (check_wxhcfields()) update_header(CHANGED); update_wxhcfields(); buffwxhc.assign(header("<nhc_wx>")); make_buffwxhc(); write_wxhc(def_wxhc_filename); using_wxhc_template = false; } static void quad_to_html( string &target, NHC_QUAD *p) { string X = "X"; string SP = " "; string sval = " "; char szval[20]; while (p->qtype != E) { if (p->qtype == B) replacestr(target, p->html_fld, *((bool *)(p->ptr)) ? X : SP); else if (p->qtype == S || p->qtype == O) replacestr(target, p->html_fld, *((string *)(p->ptr))); else if (p->qtype == M) { sval = *((string *)(p->ptr)); size_t np = string::npos; while ( (np = sval.find("\n")) != string::npos) sval.replace(np, 1, "<br>"); replacestr(target, p->html_fld, sval); } else if (p->qtype == T) replacestr(target, p->html_fld, *((string *)(p->ptr))); else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); replacestr(target, p->html_fld, sval); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; } else sval.clear(); replacestr(target, p->html_fld, sval); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; } else sval.clear(); replacestr(target, p->html_fld, sval); } p++; } } void cb_wxhc_html() { string name_name = fl_filename_name(def_wxhc_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string wxhc_rptsta = ICS_dir; wxhc_rptsta.append(name_name); wxhc_rptsta.append(".html"); update_wxhcfields(); string formwxhc = wxhc_html_template; replacestr(formwxhc, TITLE, name_name); quad_to_html (formwxhc, wxhc_QUAD); FILE *filewxhc = fopen(wxhc_rptsta.c_str(), "w"); fprintf(filewxhc,"%s", formwxhc.c_str()); fclose(filewxhc); open_url(wxhc_rptsta.c_str()); } static void quad_to_text( string &target, NHC_QUAD *p) { string X = "X"; string SP = " "; string sval = " "; string del = "DELETE"; char szval[20]; while (p->qtype != E) { if (p->qtype == B) { bool b = *((bool *)(p->ptr)); if (b) replacestr(target, p->html_fld, X); else replacestr(target, p->html_fld, SP); } else if (p->qtype == S || p->qtype == M || p->qtype == O) { if (((string *)(p->ptr))->length()) replacestr(target, p->html_fld, *((string *)(p->ptr))); else replacestr(target, p->html_fld, del); } else if (p->qtype == T) { if (((string *)(p->ptr))->length()) replacestr(target, p->html_fld, *((string *)(p->ptr))); else replacestr(target, p->html_fld, del); } else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, p->html_fld, sval); else replacestr(target, p->html_fld, del); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; replacestr(target, p->html_fld, sval); } else replacestr(target, p->html_fld, del); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; replacestr(target, p->html_fld, sval); } else replacestr(target, p->html_fld, del); } p++; } } static void strip_text( string &target ) { size_t p = 0, p1, p2; while ((p = target.find ("DELETE"), p) != string::npos) { p1 = target.rfind ("\n", p); p2 = target.find ("\n", p); if (p1 != string::npos && p2 != string::npos) target.erase( p1, p2 - p1 ); p++; } } void cb_wxhc_textout() { string wxhc_rptsta = ICS_dir; wxhc_rptsta.append("wxhc.txt"); update_wxhcfields(); string formwxhc = wxhc_text_template; quad_to_text (formwxhc, wxhc_QUAD); strip_text (formwxhc); FILE *filewxhc = fopen(wxhc_rptsta.c_str(), "w"); fprintf(filewxhc,"%s", formwxhc.c_str()); fclose(filewxhc); open_url(wxhc_rptsta.c_str()); } ������������������flmsg-2.0.10/src/wx/wx_strings.cxx������������������������������������������������������������������0000664�0001750�0001750�00000213303�12330516146�014010� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "wx_strings.h" const std::string counties = "\ --,--Select County--,\ --,\ AL,\ Autauga (001),\ Baldwin (003),\ Barbour (005),\ Bibb (007),\ Blount (009),\ Bullock (011),\ Butler (013),\ Calhoun (015),\ Chambers (017),\ Cherokee (019),\ Chilton (021),\ Choctaw (023),\ Clarke (025),\ Clay (027),\ Cleburne (029),\ Coffee (031),\ Colbert (033),\ Conecuh (035),\ Coosa (037),\ Covington (039),\ Crenshaw (041),\ Cullman (043),\ Dale (045),\ Dallas (047),\ DeKalb (049),\ Elmore (051),\ Escambia (053),\ Etowah (055),\ Fayette (057),\ Franklin (059),\ Geneva (061),\ Greene (063),\ Hale (065),\ Henry (067),\ Houston (069),\ Jackson (071),\ Jefferson (073),\ Lamar (075),\ Lauderdale (077),\ Lawrence (079),\ Lee (081),\ Limestone (083),\ Lowndes (085),\ Macon (087),\ Madison (089),\ Marengo (091),\ Marion (093),\ Marshall (095),\ Mobile (097),\ Monroe (099),\ Montgomery (101),\ Morgan (103),\ Perry (105),\ Pickens (107),\ Pike (109),\ Randolph (111),\ Russell (113),\ St. Clair (115),\ Shelby (117),\ Sumter (119),\ Talladega (121),\ Tallapoosa (123),\ Tuscaloosa (125),\ Walker (127),\ Washington (129),\ Wilcox (131),\ Winston (133),\ AL,\ AK,\ Aleutians East (013),\ Aleutians West (016),\ Anchorage (020),\ Bethel (050),\ Bristol Bay (060),\ Denali (068),\ Dillingham (070),\ Fairbanks North Star (090),\ Haines (100),\ Juneau (110),\ Kenai Peninsula (122),\ Ketchikan Gateway (130),\ Kodiak Island (150),\ Lake and Peninsula (164),\ Matanuska-Susitna (170),\ Nome (180),\ North Slope (185),\ Northwest Arctic (188),\ Prince of Wales-OuterKetchikan (201),\ Sitka (220),\ Skagway-Yakutat-Angoon (231),\ Southeast Fairbanks (240),\ Valdez-Gordova (261),\ Wade Hampton (270),\ Wrangell-Petersburg (280),\ Yukon-Koyukuk (290),\ AK,\ AZ,\ Apache (001),\ Cochise (003),\ Coconino (005),\ Gila (007),\ Graham (009),\ Greenlee (011),\ La Paz (012),\ Maricopa (013),\ Mohave (015),\ Navajo (017),\ Pima (019),\ Pinal (021),\ Santa Cruz (023),\ Yavapai (025),\ Yuma (027),\ AZ,\ AR,\ Arkansas (001),\ Ashley (003),\ Baxter (005),\ Benton (007),\ Boone (009),\ Bradley (011),\ Calhoun (013),\ Carroll (015),\ Chicot (017),\ Clark (019),\ Clay (021),\ Cleburne (023),\ Cleveland (025),\ Columbia (027),\ Conway (029),\ Craighead (031),\ Crawford (033),\ Crittenden (035),\ Cross (037),\ Dallas (039),\ Desha (041),\ Drew (043),\ Faulkner (045),\ Franklin (047),\ Fulton (049),\ Garland (051),\ Grant (053),\ Hempstead (057),\ Hot Spring (059),\ Howard (061),\ Independence (063),\ Izard (065),\ Jackson (067),\ Jefferson (069),\ Johnson (071),\ Lafayette (073),\ Lawrence (075),\ Lee (077),\ Lincoln (079),\ Little River (081),\ Logan (083),\ Lonoke (085),\ Madison (087),\ Marion (089),\ Miller (091),\ Mississippi (093),\ Monroe (095),\ Montgomery (097),\ Nevada (099),\ Newton (101),\ Ouachita (103),\ Phillips (107),\ Pike (109),\ Poinsett (111),\ Polk (113),\ Pope (115),\ Prairie (117),\ Pulaski (119),\ Randolph (121),\ St. Francis (123),\ Saline (125),\ Scott (127),\ Searcy (129),\ Sebastian (131),\ Sevier (133),\ Sharp (135),\ Stone (137),\ Union (139),\ Van Buren (141),\ Washington (143),\ White (145),\ Woodruff (147),\ Yell (149),\ AR,\ CA,\ Alameda (001),\ Alpine (003),\ Amador (005),\ Butte (007),\ Calaveras (009),\ Colusa (011),\ Contra Costa (013),\ Del Norte (015),\ El Dorado (017),\ Fresno (019),\ Glenn (021),\ Humboldt (023),\ Imperial (025),\ Inyo (027),\ Kern (029),\ Kings (031),\ Lake (033),\ Lassen (035),\ Los Angeles (037),\ Madera (039),\ Marin (041),\ Mariposa (043),\ Mendocino (045),\ Merced (047),\ Modoc (049),\ Mono (051),\ Monterey (053),\ Napa (055),\ Nevada (057),\ Orange (059),\ Placer (061),\ Plumas (063),\ Riverside (065),\ Sacramento (067),\ San Benito (069),\ San Bernardino (071),\ San Diego (073),\ San Francisco (075),\ San Joaquin (077),\ San Luis Obispo (079),\ San Mateo (081),\ Santa Barbara (083),\ Santa Clara (085),\ Santa Cruz (087),\ Shasta (089),\ Sierra (091),\ Siskiyou (093),\ Solano (095),\ Sonoma (097),\ Stanislaus (099),\ Sutter (101),\ Tehama (103),\ Trinity (105),\ Tulare (107),\ Tuolumne (109),\ Ventura (111),\ Yolo (113),\ Yuba (115),\ CA,\ CO,\ Adams (001),\ Alamosa (003),\ Arapahoe (005),\ Archuleta (007),\ Baca (009),\ Bent (011),\ Boulder (013),\ Chaffee (015),\ Cheyenne (017),\ Clear Creek (019),\ Conejos (021),\ Costilla (023),\ Crowley (025),\ Custer (027),\ Delta (029),\ Denver (031),\ Dolores (033),\ Douglas (035),\ Eagle (037),\ Elbert (039),\ El Paso (041),\ Fremont (043),\ Garfield (045),\ Gilpin (047),\ Grand (049),\ Gunnison (051),\ Hinsdale (053),\ Huerfano (055),\ Jackson (057),\ Jefferson (059),\ Kiowa (061),\ Kit Carson (063),\ Lake (065),\ La Plata (067),\ Larimer (069),\ Las Animas (071),\ Lincoln (073),\ Logan (075),\ Mesa (077),\ Mineral (079),\ Moffat (081),\ Montezuma (083),\ Montrose (085),\ Morgan (087),\ Otero (089),\ Ouray (091),\ Park (093),\ Phillips (095),\ Pitkin (097),\ Prowers (099),\ Pueblo (101),\ Rio Blanco (103),\ Rio Grande (105),\ Routt (107),\ Saguache (109),\ San Juan (111),\ San Miguel (113),\ Sedgwick (115),\ Summit (117),\ Teller (119),\ Washington (121),\ Weld (123),\ Yuma (125),\ CO,\ CT,\ Fairfield (001),\ Hartford (003),\ Litchfield (005),\ Middlesex (007),\ New Haven (009),\ New London (011),\ Tolland (013),\ Windham (015),\ CT,\ DE,\ Kent (001),\ New Castle (003),\ Sussex (005),\ DE,\ DC,\ District of Columbia (001),\ DC,\ FL,\ Alachua (001),\ Baker (003),\ Bay (005),\ Bradford (007),\ Brevard (009),\ Broward (011),\ Calhoun (013),\ Charlotte (015),\ Citrus (017),\ Clay (019),\ Collier (021),\ Columbia (023),\ Dade (025),\ DeSoto (027),\ Dixie (029),\ Duval (031),\ Escambia (033),\ Flagler (035),\ Franklin (037),\ Gadsden (039),\ Gilchrist (041),\ Glades (043),\ Gulf (045),\ Hamilton (047),\ Hardee (049),\ Hendry (051),\ Hernando (053),\ Highlands (055),\ Hillsborough (057),\ Holmes (059),\ Indian River (061),\ Jackson (063),\ Jefferson (065),\ Lafayette (067),\ Lake (069),\ Lee (071),\ Leon (073),\ Levy (075),\ Liberty (077),\ Madison (079),\ Manatee (081),\ Marion (083),\ Martin (085),\ Monroe (087),\ Nassau (089),\ Okaloosa (091),\ Okeechobee (093),\ Orange (095),\ Osceola (097),\ Palm Beach (099),\ Pasco (101),\ Pinellas (103),\ Polk (105),\ Putnam (107),\ St. Johns (109),\ St. Lucie (111),\ Santa Rosa (113),\ Sarasota (115),\ Seminole (117),\ Sumter (119),\ Suwannee (121),\ Taylor (123),\ Union (125),\ Volusia (127),\ Wakulla (129),\ Walton (131),\ Washington (133),\ FL,\ GA,\ Appling (001),\ Atkinson (003),\ Bacon (005),\ Baker (007),\ Baldwin (009),\ Banks (011),\ Barrow (013),\ Bartow (015),\ Ben Hill (017),\ Berrien (019),\ Bibb (021),\ Bleckley (023),\ Brantley (025),\ Brooks (027),\ Bryan (029),\ Bulloch (031),\ Burke (033),\ Butts (035),\ Calhoun (037),\ Camden (039),\ Candler (043),\ Carroll (045),\ Catoosa (047),\ Charlton (049),\ Chatham (051),\ Chattahoochee (053),\ Chattooga (055),\ Cherokee (057),\ Clarke (059),\ Clay (061),\ Clayton (063),\ Clinch (065),\ Cobb (067),\ Coffee (069),\ Colquitt (071),\ Columbia (073),\ Cook (075),\ Coweta (077),\ Crawford (079),\ Crisp (081),\ Dade (083),\ Dawson (085),\ Decatur (087),\ DeKalb (089),\ Dodge (091),\ Dooly (093),\ Dougherty (095),\ Douglas (097),\ Early (099),\ Echols (101),\ Effingham (103),\ Elbert (105),\ Emanuel (107),\ Evans (109),\ Fannin (111),\ Fayette (113),\ Floyd (115),\ Forsyth (117),\ Franklin (119),\ Fulton (121),\ Gilmer (123),\ Glascock (125),\ Glynn (127),\ Gordon (129),\ Grady (131),\ Greene (133),\ Gwinnett (135),\ Habersham (137),\ Hall (139),\ Hancock (141),\ Haralson (143),\ Harris (145),\ Hart (147),\ Heard (149),\ Henry (151),\ Houston (153),\ Irwin (155),\ Jackson (157),\ Jasper (159),\ Jeff Davis (161),\ Jefferson (163),\ Jenkins (165),\ Johnson (167),\ Jones (169),\ Lamar (171),\ Lanier (173),\ Laurens (175),\ Lee (177),\ Liberty (179),\ Lincoln (181),\ Long (183),\ Lowndes (185),\ Lumpkin (187),\ Macon (193),\ Madison (195),\ Marion (197),\ McDuffie (189),\ Mclntosh (191),\ Meriwether (199),\ Miller (201),\ Mitchell (205),\ Monroe (207),\ Montgomery (209),\ Morgan (211),\ Murray (213),\ Muscogee (215),\ Newton (217),\ Oconee (219),\ Oglethorpe (221),\ Paulding (223),\ Peach (225),\ Pickens (227),\ Pierce (229),\ Pike (231),\ Polk (233),\ Pulaski (235),\ Putnam (237),\ Quitman (239),\ Rabun (241),\ Randolph (243),\ Richmond (245),\ Rockdale (247),\ Schley (249),\ Screven (251),\ Seminole (253),\ Spalding (255),\ Stephens (257),\ Stewart (259),\ Sumter (261),\ Talbot (263),\ Taliaferro (265),\ Tattnall (267),\ Taylor (269),\ Telfair (271),\ Terrell (273),\ Thomas (275),\ Tift (277),\ Toombs (279),\ Towns (281),\ Treutlen (283),\ Troup (285),\ Turner (287),\ Twiggs (289),\ Union (291),\ Upson (293),\ Walker (295),\ Walton (297),\ Ware (299),\ Warren (301),\ Washington (303),\ Wayne (305),\ Webster (307),\ Wheeler (309),\ White (311),\ Whitfield (313),\ Wilcox (315),\ Wilkes (317),\ Wilkinson (319),\ Worth (321),\ GA,\ HI,\ Hawaii (001),\ Honolulu (003),\ Kalawao (005),\ Kauai (007),\ Maui (009),\ HI,\ ID,\ Ada (001),\ Adams (003),\ Bannock (005),\ Bear Lake (007),\ Benewah (009),\ Bingham (011),\ Blaine (013),\ Boise (015),\ Bonner (017),\ Bonneville (019),\ Boundary (021),\ Butte (023),\ Camas (025),\ Canyon (027),\ Caribou (029),\ Cassia (031),\ Clark (033),\ Clearwater (035),\ Custer (037),\ Elmore (039),\ Franklin (041),\ Fremont (043),\ Gem (045),\ Gooding (047),\ Idaho (049),\ Jefferson (051),\ Jerome (053),\ Kootenai (055),\ Latah (057),\ Lemhi (059),\ Lewis (061),\ Lincoln (063),\ Madison (065),\ Minidoka (067),\ Nez Perce (069),\ Oneida (071),\ Owyhee (073),\ Payette (075),\ Power (077),\ Shoshone (079),\ Teton (081),\ Twin Falls (083),\ Valley (085),\ Washington (087),\ ID,\ IL,\ Adams (001),\ Alexander (003),\ Bond (005),\ Boone (007),\ Brown (009),\ Bureau (011),\ Calhoun (013),\ Carroll (015),\ Cass (017),\ Champaign (019),\ Christian (021),\ Clark (023),\ Clay (025),\ Clinton (027),\ Coles (029),\ Cook (031),\ Crawford (033),\ Cumberland (035),\ DeKalb* (037),\ De Witt (039),\ Douglas (041),\ DuPage* (043),\ Edgar (045),\ Edwards (047),\ Effingham (049),\ Fayette (051),\ Ford (053),\ Franklin (055),\ Fulton (057),\ Gallatin (059),\ Greene (061),\ Grundy (063),\ Hamilton (065),\ Hancock (067),\ Hardin (069),\ Henderson (071),\ Henry (073),\ Iroquois (075),\ Jackson (077),\ Jasper (079),\ Jefferson (081),\ Jersey (083),\ Jo Daviess (085),\ Johnson (087),\ Kane (089),\ Kankakee (091),\ Kendall (093),\ Knox (095),\ Lake (097),\ La Salle (099),\ Lawrence (101),\ Lee (103),\ Livingston (105),\ Logan (107),\ McDonough (109),\ McHenry (111),\ McLean (113),\ Macon (115),\ Macoupin (117),\ Madison (119),\ Marion (121),\ Marshall (123),\ Mason (125),\ Massac (127),\ Menard (129),\ Mercer (131),\ Monroe (133),\ Montgomery (135),\ Morgan (137),\ Moultrie (139),\ Ogle (141),\ Peoria (143),\ Perry (145),\ Piatt (147),\ Pike (149),\ Pope (151),\ Pulaski (153),\ Putnam (155),\ Randolph (157),\ Richland (159),\ Rock Island (161),\ St. Clair (163),\ Saline (165),\ Sangamon (167),\ Schuyler (169),\ Scott (171),\ Shelby (173),\ Stark (175),\ Stephenson (177),\ Tazewell (179),\ Union (181),\ Vermilion (183),\ Wabash (185),\ Warren (187),\ Washington (189),\ Wayne (191),\ White (193),\ Whiteside (195),\ Will (197),\ Williamson (199),\ Winnebago (201),\ Woodford (203),\ IL,\ IN,\ Adams (001),\ Allen (003),\ Bartholomew (005),\ Benton (007),\ Blackford (009),\ Boone (011),\ Brown (013),\ Carroll (015),\ Cass (017),\ Clark (019),\ Clay (021),\ Clinton (023),\ Crawford (025),\ Daviess (027),\ Dearborn (029),\ Decatur (031),\ De Kalb (033),\ Delaware (035),\ Dubois (037),\ Elkhart (039),\ Fayette (041),\ Floyd (043),\ Fountain (045),\ Franklin (047),\ Fulton (049),\ Gibson (051),\ Grant (053),\ Greene (055),\ Hamilton (057),\ Hancock (059),\ Harrison (061),\ Hendricks (063),\ Henry (065),\ Howard (067),\ Huntington (069),\ Jackson (071),\ Jasper (073),\ Jay (075),\ Jefferson (077),\ Jennings (079),\ Johnson (081),\ Knox (083),\ Kosciusko (085),\ Lagrange (087),\ Lake (089),\ La Porte (091),\ Lawrence (093),\ Madison (095),\ Marion (097),\ Marshall (099),\ Martin (101),\ Miami (103),\ Monroe (105),\ Montgomery (107),\ Morgan (109),\ Newton (111),\ Noble (113),\ Ohio (115),\ Orange (117),\ Owen (119),\ Parke (121),\ Perry (123),\ Pike (125),\ Porter (127),\ Posey (129),\ Pulaski (131),\ Putnam (133),\ Randolph (135),\ Ripley (137),\ Rush (139),\ St. Joseph (141),\ Scott (143),\ Shelby (145),\ Spencer (147),\ Starke (149),\ Steuben (151),\ Sullivan (153),\ Switzerland (155),\ Tippecanoe (157),\ Tipton (159),\ Union (161),\ Vanderburgh (163),\ Vermillion (165),\ Vigo (167),\ Wabash (169),\ Warren (171),\ Warrick (173),\ Washington (175),\ Wayne (177),\ Wells (179),\ White (181),\ Whitley (183),\ IN,\ IA,\ Adair (001),\ Adams (003),\ Allamakee (005),\ Appanoose (007),\ Audubon (009),\ Benton (011),\ Black Hawk (013),\ Boone (015),\ Bremer (017),\ Buchanan (019),\ Buena Vista (021),\ Butler (023),\ Calhoun (025),\ Carroll (027),\ Cass (029),\ Cedar (031),\ Cerro Gordo (033),\ Cherokee (035),\ Chickasaw (037),\ Clarke (039),\ Clay (041),\ Clayton (043),\ Clinton (045),\ Crawford (047),\ Dallas (049),\ Davis (051),\ Decatur (053),\ Delaware (055),\ Des Moines (057),\ Dickinson (059),\ Dubuque (061),\ Emmet (063),\ Fayette (065),\ Floyd (067),\ Franklin (069),\ Fremont (071),\ Greene (073),\ Grundy (075),\ Guthrie (077),\ Hamilton (079),\ Hancock (081),\ Hardin (083),\ Harrison (085),\ Henry (087),\ Howard (089),\ Humboldt (091),\ Ida (093),\ Iowa (095),\ Jackson (097),\ Jasper (099),\ Jefferson (101),\ Johnson (103),\ Jones (105),\ Keokuk (107),\ Kossuth (109),\ Lee (111),\ Linn (113),\ Louisa (115),\ Lucas (117),\ Lyon (119),\ Madison (121),\ Mahaska (123),\ Marion (125),\ Marshall (127),\ Mills (129),\ Mitchell (131),\ Monona (133),\ Monroe (135),\ Montgomery (137),\ Muscatine (139),\ O'Brien (141),\ Osceola (143),\ Page (145),\ Palo Alto (147),\ Plymouth (149),\ Pocahontas (151),\ Polk (153),\ Pottawattamie (155),\ Poweshiek (157),\ Ringgold (159),\ Sac (161),\ Scott (163),\ Shelby (165),\ Sioux (167),\ Story (169),\ Tama (171),\ Taylor (173),\ Union (175),\ Van Buren (177),\ Wapello (179),\ Warren (181),\ Washington (183),\ Wayne (185),\ Webster (187),\ Winnebago (189),\ Winneshiek (191),\ Woodbury (193),\ Worth (195),\ Wright (197),\ IA,\ KS,\ Allen (001),\ Anderson (003),\ Atchison (005),\ Barber (007),\ Barton (009),\ Bourbon (011),\ Brown (013),\ Butler (015),\ Chase (017),\ Chautauqua (019),\ Cherokee (021),\ Cheyenne (023),\ Clark (025),\ Clay (027),\ Cloud (029),\ Coffey (031),\ Comanche (033),\ Cowley (035),\ Crawford (037),\ Decatur (039),\ Dickinson (041),\ Doniphan (043),\ Douglas (045),\ Edwards (047),\ Elk (049),\ Ellis (051),\ Ellsworth (053),\ Finney (055),\ Ford (057),\ Franklin (059),\ Geary (061),\ Gove (063),\ Graham (065),\ Grant (067),\ Gray (069),\ Greeley (071),\ Greenwood (073),\ Hamilton (075),\ Harper (077),\ Harvey (079),\ Haskell (081),\ Hodgeman (083),\ Jackson (085),\ Jefferson (087),\ Jewell (089),\ Johnson (091),\ Kearny (093),\ Kingman (095),\ Kiowa (097),\ Labette (099),\ Lane (101),\ Leavenworth (103),\ Lincoln (105),\ Linn (107),\ Logan (109),\ Lyon (111),\ McPherson (113),\ Marion (115),\ Marshall (117),\ Meade (119),\ Miami (121),\ Mitchell (123),\ Montgomery (125),\ Morris (127),\ Morton (129),\ Nemaha (131),\ Neosho (133),\ Ness (135),\ Norton (137),\ Osage (139),\ Osborne (141),\ Ottawa (143),\ Pawnee (145),\ Phillips (147),\ Pottawatomie (149),\ Pratt (151),\ Rawlins (153),\ Reno (155),\ Republic (157),\ Rice (159),\ Riley (161),\ Rooks (163),\ Rush (165),\ Russell (167),\ Saline (169),\ Scott (171),\ Sedgwick (173),\ Seward (175),\ Shawnee (177),\ Sheridan (179),\ Sherman (181),\ Smith (183),\ Stafford (185),\ Stanton (187),\ Stevens (189),\ Sumner (191),\ Thomas (193),\ Trego (195),\ Wabaunsee (197),\ Wallace (199),\ Washington (201),\ Wichita (203),\ Wilson (205),\ Woodson (207),\ Wyandotte (209),\ KS,\ KY,\ Adair (001),\ Allen (003),\ Anderson (005),\ Ballard (007),\ Barren (009),\ Bath (011),\ Bell (013),\ Boone (015),\ Bourbon (017),\ Boyd (019),\ Boyle (021),\ Bracken (023),\ Breathitt (025),\ Breckinridge (027),\ Bullitt (029),\ Butler (031),\ Caldwell (033),\ Calloway (035),\ Campbell (037),\ Carlisle (039),\ Carroll (041),\ Carter (043),\ Casey (045),\ Christian (047),\ Clark (049),\ Clay (051),\ Clinton (053),\ Crittenden (055),\ Cumberland (057),\ Daviess (059),\ Edmonson (061),\ Elliott (063),\ Estill (065),\ Fayette (067),\ Fleming (069),\ Floyd (071),\ Franklin (073),\ Fulton (075),\ Gallatin (077),\ Garrard (079),\ Grant (081),\ Graves (083),\ Grayson (085),\ Green (087),\ Greenup (089),\ Hancock (091),\ Hardin (093),\ Harlan (095),\ Harrison (097),\ Hart (099),\ Henderson (101),\ Henry (103),\ Hickman (105),\ Hopkins (107),\ Jackson (109),\ Jefferson (111),\ Jessamine (113),\ Johnson (115),\ Kenton (117),\ Knott (119),\ Knox (121),\ Larue (123),\ Laurel (125),\ Lawrence (127),\ Lee (129),\ Leslie (131),\ Letcher (133),\ Lewis (135),\ Lincoln (137),\ Livingston (139),\ Logan (141),\ Lyon (143),\ McCracken (145),\ McCreary (147),\ McLean (149),\ Madison (151),\ Magoffin (153),\ Marion (155),\ Marshall (157),\ Martin (159),\ Mason (161),\ Meade (163),\ Menifee (165),\ Mercer (167),\ Metcalfe (169),\ Monroe (171),\ Montgomery (173),\ Morgan (175),\ Muhlenberg (177),\ Nelson (179),\ Nicholas (181),\ Ohio (183),\ Oldham (185),\ Owen (187),\ Owsley (189),\ Pendleton (191),\ Perry (193),\ Pike (195),\ Powell (197),\ Pulaski (199),\ Robertson (201),\ Rockcastle (203),\ Rowan (205),\ Russell (207),\ Scott (209),\ Shelby (211),\ Simpson (213),\ Spencer (215),\ Taylor (217),\ Todd (219),\ Trigg (221),\ Trimble (223),\ Union (225),\ Warren (227),\ Washington (229),\ Wayne (231),\ Webster (233),\ Whitley (235),\ Wolfe (237),\ Woodford (239),\ KY,\ LA,\ Acadia (001),\ Allen (003),\ Ascension (005),\ Assumption (007),\ Avoyelles (009),\ Beauregard (011),\ Bienville (013),\ Bossier (015),\ Caddo (017),\ Calcasieu (019),\ Caldwell (021),\ Cameron (023),\ Catahoula (025),\ Claiborne (027),\ Concordia (029),\ De Soto (031),\ E. Baton Rouge (033),\ E. Carroll (035),\ E. Feliciana (037),\ Evangeline (039),\ Franklin (041),\ Grant (043),\ Iberia (045),\ Iberville (047),\ Jackson (049),\ Jefferson (051),\ Jefferson Davis (053),\ Lafayette (055),\ Lafourche (057),\ La Salle (059),\ Lincoln (061),\ Livingston (063),\ Madison (065),\ Morehouse (067),\ Natchitoches (069),\ Orleans (071),\ Ouachita (073),\ Plaquemines (075),\ Pointe Coupee (077),\ Rapides (079),\ Red River (081),\ Richland (083),\ Sabine (085),\ St. Bernard (087),\ St. Charles (089),\ St. Helena (091),\ St. James (093),\ St. John the Baptist (095),\ St. Landry (097),\ St. Martin (099),\ St. Mary (101),\ St. Tammany (103),\ Tangipahoa (105),\ Tensas (107),\ Terrebonne (109),\ Union (111),\ Vermilion (113),\ Vernon (115),\ Washington (117),\ Webster (119),\ W. Baton Rouge (121),\ W. Carroll (123),\ W. Feliciana (125),\ Winn (127),\ LA,\ ME,\ Androscoggin (001),\ Aroostook (003),\ Cumberland (005),\ Franklin (007),\ Hancock (009),\ Kennebec (011),\ Knox (013),\ Lincoln (015),\ Oxford (017),\ Penobscot (019),\ Piscataquis (021),\ Sagadahoc (023),\ Somerset (025),\ Waldo (027),\ Washington (029),\ York (031),\ ME,\ MD,\ Allegany (001),\ Anne Arundel (003),\ Baltimore (005),\ Calvert (009),\ Caroline (011),\ Carroll (013),\ Cecil (015),\ Charles (017),\ Dorchester (019),\ Frederick (021),\ Garrett (023),\ Harford (025),\ Howard (027),\ Kent (029),\ Montgomery (031),\ Prince George's (033),\ Queen Anne's (035),\ St. Mary's (037),\ Somerset (039),\ Talbot (041),\ Washington (043),\ Wicomico (045),\ Worcester (047),\ Baltimore; city (510),\ MD,\ MA,\ Barnstable (001),\ Berkshire (003),\ Bristol (005),\ Dukes (007),\ Essex (009),\ Franklin (011),\ Hampden (013),\ Hampshire (015),\ Middlesex (017),\ Nantucket (019),\ Norfolk (021),\ Plymouth (023),\ Suffolk (025),\ Worcester (027),\ MA,\ MI,\ Alcona (001),\ Alger (003),\ Allegan (005),\ Alpena (007),\ Antrim (009),\ Arenac (011),\ Baraga (013),\ Barry (015),\ Bay (017),\ Benzie (019),\ Berrien (021),\ Branch (023),\ Calhoun (025),\ Cass (027),\ Charlevoix (029),\ Cheboygan (031),\ Chippewa (033),\ Clare (035),\ Clinton (037),\ Crawford (039),\ Delta (041),\ Dickinson (043),\ Eaton (045),\ Emmet (047),\ Genesee (049),\ Gladwin (051),\ Gogebic (053),\ Grand Traverse (055),\ Gratiot (057),\ Hillsdale (059),\ Houghton (061),\ Huron (063),\ Ingham (065),\ Ionia (067),\ Iosco (069),\ Iron (071),\ IsabelIa (073),\ Jackson (075),\ Kalamazoo (077),\ Kalkaska (079),\ Kent (081),\ Keweenaw (083),\ Lake (085),\ Lapeer (087),\ Leelanau (089),\ Lenawee (091),\ Livingston (093),\ Luce (095),\ Mackinac (097),\ Macomb (099),\ Manistee (101),\ Marquette (103),\ Mason (105),\ Mecosta (107),\ Menominee (109),\ Midland (111),\ Missaukee (113),\ Monroe (115),\ Montcalm (117),\ Montmorency (119),\ Muskegon (121),\ Newaygo (123),\ Oakland (125),\ Oceana (127),\ Ogemaw (129),\ Ontonagon (131),\ Osceola (133),\ Oscoda (135),\ Otsego (137),\ Ottawa (139),\ Presque Isle (141),\ Roscommon (143),\ Saginaw (145),\ St. Clair (147),\ St. Joseph (149),\ Sanilac (151),\ Schoolcraft (153),\ Shiawassee (155),\ Tuscola (157),\ Van Buren (159),\ Washtenaw (161),\ Wayne (163),\ Wexford (165),\ MI,\ MN,\ Aitkin (001),\ Anoka (003),\ Becker (005),\ Beltrami (007),\ Benton (009),\ Big Stone (011),\ Blue Earth (013),\ Brown (015),\ Carlton (017),\ Carver (019),\ Cass (021),\ Chippewa (023),\ Chisago (025),\ Clay (027),\ Clearwater (029),\ Cook (031),\ Cottonwood (033),\ Crow Wing (035),\ Dakota (037),\ Dodge (039),\ Douglas (041),\ Faribault (043),\ Fillmore (045),\ Freeborn (047),\ Goodhue (049),\ Grant (051),\ Hennepin (053),\ Houston (055),\ Hubbard (057),\ Isanti (059),\ Itasca (061),\ Jackson (063),\ Kanabec (065),\ Kandiyohi (067),\ Kittson (069),\ Koochiching (071),\ Lac qui Parle (073),\ Lake (075),\ Lake of the Woods (077),\ Le Sueur (079),\ Lincoln (081),\ Lyon (083),\ McLeod (085),\ Mahnomen (087),\ Marshall (089),\ Martin (091),\ Meeker (093),\ Mille Lacs (095),\ Morrison (097),\ Mower (099),\ Murray (101),\ Nicollet (103),\ Nobles (105),\ Norman (107),\ Olmsted (109),\ Otter Tail (111),\ Pennington (113),\ Pine (115),\ Pipestone (117),\ Polk (119),\ Pope (121),\ Ramsey (123),\ Red Lake (125),\ Redwood (127),\ Renville (129),\ Rice (131),\ Rock (133),\ Roseau (135),\ St. Louis (137),\ Scott (139),\ Sherburne (141),\ Sibley (143),\ Stearns (145),\ Steele (147),\ Stevens (149),\ Swift (151),\ Todd (153),\ Traverse (155),\ Wabasha (157),\ Wadena (159),\ Waseca (161),\ Washington (163),\ Watonwan (165),\ Wilkin (167),\ Winona (169),\ Wright (171),\ Yellow Medicine (173),\ MN,\ MS,\ Adams (001),\ Alcorn (003),\ Amite (005),\ Attala (007),\ Benton (009),\ Bolivar (011),\ Calhoun (013),\ Carroll (015),\ Chickasaw (017),\ Choctaw (019),\ Claiborne (021),\ Clarke (023),\ Clay (025),\ Coahoma (027),\ Copiah (029),\ Covington (031),\ DeSoto (033),\ Forrest (035),\ Franklin (037),\ George (039),\ Greene (041),\ Grenada (043),\ Hancock (045),\ Harrison (047),\ Hinds (049),\ Holmes (051),\ Humphreys (053),\ Issaquena (055),\ Itawamba (057),\ Jackson (059),\ Jasper (061),\ Jefferson (063),\ Jefferson Davis (065),\ Jones (067),\ Kemper (069),\ Lafayette (071),\ Lamar (073),\ Lauderdale (075),\ Lawrence (077),\ Leake (079),\ Lee (081),\ Leflore (083),\ Lincoln (085),\ Lowndes (087),\ Madison (089),\ Marion (091),\ Marshall (093),\ Monroe (095),\ Montgomery (097),\ Neshoba (099),\ Newton (101),\ Noxubee (103),\ Oktibbeha (105),\ Panola (107),\ Pearl River (109),\ Perry (111),\ Pike (113),\ Pontotoc (115),\ Prentiss (117),\ Quitman (119),\ Rankin (121),\ Scott (123),\ Sharkey (125),\ Simpson (127),\ Smith (129),\ Stone (131),\ Sunflower (133),\ Tallahatchie (135),\ Tate (137),\ Tippah (139),\ Tishomingo (141),\ Tunica (143),\ Union (145),\ Walthall (147),\ Warren (149),\ Washington (151),\ Wayne (153),\ Webster (155),\ Wilkinson (157),\ Winston (159),\ Yalobusha (161),\ Yazoo (163),\ MS,\ MO,\ Adair (001),\ Andrew (003),\ Atchison (005),\ Audrain (007),\ Barry (009),\ Barton (011),\ Bates (013),\ Benton (015),\ Bollinger (017),\ Boone (019),\ Buchanan (021),\ Butler (023),\ Caldwell (025),\ Callaway (027),\ Camden (029),\ Cape Girardeau (031),\ Carroll (033),\ Carter (035),\ Cass (037),\ Cedar (039),\ Chariton (041),\ Christian (043),\ Clark (045),\ Clay (047),\ Clinton (049),\ Cole (051),\ Cooper (053),\ Crawford (055),\ Dade (057),\ Dallas (059),\ Daviess (061),\ DeKalb (063),\ Dent (065),\ Douglas (067),\ Dunklin (069),\ Franklin (071),\ Gasconade (073),\ Gentry (075),\ Greene (077),\ Grundy (079),\ Harrison (081),\ Henry (083),\ Hickory (085),\ Holt (087),\ Howard (089),\ Howell (091),\ Iron (093),\ Jackson (095),\ Jasper (097),\ Jefferson (099),\ Johnson (101),\ Knox (103),\ Laclede (105),\ Lafayette (107),\ Lawrence (109),\ Lewis (111),\ Lincoln (113),\ Linn (115),\ Livingston (117),\ McDonald (119),\ Macon (121),\ Madison (123),\ Maries (125),\ Marion (127),\ Mercer (129),\ Miller (131),\ Mississippi (133),\ Moniteau (135),\ Monroe (137),\ Montgomery (139),\ Morgan (141),\ New Madrid (143),\ Newton (145),\ Nodaway (147),\ Oregon (149),\ Osage (151),\ Ozark (153),\ Pemiscot (155),\ Perry (157),\ Pettis (159),\ Phelps (161),\ Pike (163),\ Platte (165),\ Polk (167),\ Pulaski (169),\ Putnam (171),\ Ralls (173),\ Randolph (175),\ Ray (177),\ Reynolds (179),\ Ripley (181),\ St. Charles (183),\ St. Clair (185),\ Ste. Genevieve (186),\ St. Francois (187),\ St. Louis (189),\ St. Louis - city (510),\ Saline (195),\ Schuyler (197),\ Scotland (199),\ Scott (201),\ Shannon (203),\ Shelby (205),\ Stoddard (207),\ Stone (209),\ Sullivan (211),\ Taney (213),\ Texas (215),\ Vernon (217),\ Warren (219),\ Washington (221),\ Wayne (223),\ Webster (225),\ Worth (227),\ Wright (229),\ MO,\ MT,\ Beaverhead,(001),\ Big Horn,(003),\ Blaine,(005),\ Broadwater,(007),\ Carbon,(009),\ Carter,(011),\ Cascade,(013),\ Chouteau,(015),\ Custer,(017),\ Daniels,(019),\ Dawson,(021),\ Deer Lodge,(023),\ Fallon,(025),\ Fergus,(027),\ Flathead,(029),\ Gallatin,(031),\ Garfield*,(033),\ Glacier,(035),\ Golden Valley,(037),\ Granite,(039),\ Hill,(041),\ Jefferson,(043),\ Judith Basin,(045),\ Lake,(047),\ Lewis & Clark,(049),\ Liberty,(051),\ Lincoln,(053),\ McCone,(055),\ Madison,(057),\ Meagher,(059),\ Mineral,(061),\ Missoula,(063),\ Musselshell,(065),\ Park,(067),\ Petroleum,(069),\ Phillips,(071),\ Pondera,(073),\ Powder River,(075),\ Powell,(077),\ Prairie,(079),\ Ravalli,(081),\ Richland,(083),\ Roosevelt,(085),\ Rosebud,(087),\ Sanders,(089),\ Sheridan,(091),\ Silver Bow,(093),\ Stillwater,(095),\ Sweet Grass,(097),\ Teton,(099),\ Toole,(101),\ Treasure,(103),\ Valley,(105),\ Wheatland,(107),\ Wibaux,(109),\ Yellowstone,(111),\ MT,\ NE,\ Adams (001),\ Antelope (003),\ Arthur (005),\ Banner (007),\ Blaine (009),\ Boone (011),\ Box Butte (013),\ Boyd (015),\ Brown (017),\ Buffalo (019),\ Burt (021),\ Butler (023),\ Cass (025),\ Cedar (027),\ Chase (029),\ Cherry (031),\ Cheyenne (033),\ Clay (035),\ Colfax (037),\ Cuming (039),\ Custer (041),\ Dakota (043),\ Dawes (045),\ Dawson (047),\ Deuel (049),\ Dixon (051),\ Dodge (053),\ Douglas (055),\ Dundy (057),\ Fillmore (059),\ Franklin (061),\ Frontier (063),\ Furnas (065),\ Gage (067),\ Garden (069),\ Garfield (071),\ Gosper (073),\ Grant (075),\ Greeley (077),\ Hall (079),\ Hamilton (081),\ Harlan (083),\ Hayes (085),\ Hitchcock (087),\ Holt (089),\ Hooker (091),\ Howard (093),\ Jefferson (095),\ Johnson (097),\ Kearney (099),\ Keith (101),\ Keya Paha (103),\ Kimball (105),\ Knox (107),\ Lancaster (109),\ Lincoln (111),\ Logan (113),\ Loup (115),\ McPherson (117),\ Madison (119),\ Merrick (121),\ Morrill (123),\ Nance (125),\ Nemaha (127),\ Nuckolls (129),\ Otoe (131),\ Pawnee (133),\ Perkins (135),\ Phelps (137),\ Pierce (139),\ Platte (141),\ Polk (143),\ Red Willow (145),\ Richardson (147),\ Rock (149),\ Saline (151),\ Sarpy (153),\ Saunders (155),\ Scotts Bluff (157),\ Seward (159),\ Sheridan (161),\ Sherman (163),\ Sioux (165),\ Stanton (167),\ Thayer (169),\ Thomas (171),\ Thurston (173),\ Valley (175),\ Washington (177),\ Wayne (179),\ Webster (181),\ Wheeler (183),\ York (185),\ NE,\ NV,\ Carson City (510),\ Churchill (001),\ Clark (003),\ Douglas (005),\ Elko (007),\ Esmeralda (009),\ Eureka (011),\ Humboldt (013),\ Lander (015),\ Lincoln (017),\ Lyon (019),\ Mineral (021),\ Nye (023),\ Pershing (027),\ Storey (029),\ Washoe (031),\ White Pine (033),\ NV,\ NH,\ Belknap (001),\ Carroll (003),\ Cheshire (005),\ Coos (007),\ Grafton (009),\ Hillsborough (011),\ Merrimack (013),\ Rockingham (015),\ Strafford (017),\ Sullivan (019),\ NH,\ NJ,\ Atlantic (001),\ Bergen (003),\ Burlington (005),\ Camden (007),\ Cape May (009),\ Cumberland (011),\ Essex (013),\ Gloucester (015),\ Hudson (017),\ Hunterdon (019),\ Mercer (021),\ Middlesex (023),\ Monmouth (025),\ Morris (027),\ Ocean (029),\ Passaic (031),\ Salem (033),\ Somerset (035),\ Sussex (037),\ Union (039),\ Warren (041),\ NJ,\ NM,\ Bernalillo (001),\ Catron (003),\ Chaves (005),\ Cibola (006),\ Colfax (007),\ Curry (009),\ De Baca (011),\ Dona Ana (013),\ Eddy (015),\ Grant (017),\ Guadalupe (019),\ Harding (021),\ Hidalgo (023),\ Lea (025),\ Lincoln (027),\ Los Alamos (028),\ Luna (029),\ McKinley (031),\ Mora (033),\ Otero (035),\ Quay (037),\ Rio Arriba (039),\ Roosevelt (041),\ Sandoval (043),\ San Juan (045),\ San Miguel (047),\ Santa Fe (049),\ Sierra (051),\ Socorro (053),\ Taos (055),\ Torrance (057),\ Union (059),\ Valencia (061),\ NM,\ NY,\ Albany (001),\ Allegany (003),\ Bronx (005),\ Broome (007),\ Cattaraugus (009),\ Cayuga (011),\ Chautauqua (013),\ Chemung (015),\ Chenango (017),\ Clinton (019),\ Columbia (021),\ Cortland (023),\ Delaware (025),\ Dutchess (027),\ Erie (029),\ Essex (031),\ Franklin (033),\ Fulton (035),\ Genesee (037),\ Greene (039),\ Hamilton (041),\ Herkimer (043),\ Jefferson (045),\ Kings (047),\ Lewis (049),\ Livingston (051),\ Madison (053),\ Monroe (055),\ Montgomery (057),\ Nassau (059),\ New York (061),\ Niagara (063),\ Oneida (065),\ Onondaga (067),\ Ontario (069),\ Orange (071),\ Orleans (073),\ Oswego (075),\ Otsego (077),\ Putnam (079),\ Queens (081),\ Rensselaer (083),\ Richmond (085),\ Rockland (087),\ St. Lawrence (089),\ Saratoga (091),\ Schenectady (093),\ Schoharie (095),\ Schuyler (097),\ Seneca (099),\ Steuben (101),\ Suffolk (103),\ Sullivan (105),\ Tioga (107),\ Tompkins (109),\ Ulster (111),\ Warren (113),\ Washington (115),\ Wayne (117),\ Westchester (119),\ Wyoming (121),\ Yates (123),\ NY,\ NC,\ Alamance (001),\ Alexander (003),\ Alleghany (005),\ Anson (007),\ Ashe (009),\ Avery (011),\ Beaufort (013),\ Bertie (015),\ Bladen (017),\ Brunswick (019),\ Buncombe (021),\ Burke (023),\ Cabarrus (025),\ Caldwell (027),\ Camden (029),\ Carteret (031),\ Caswell (033),\ Catawba (035),\ Chatham (037),\ Cherokee (039),\ Chowan (041),\ Clay (043),\ Cleveland (045),\ Columbus (047),\ Craven (049),\ Cumberland (051),\ Currituck (053),\ Dare (055),\ Davidson (057),\ Davie (059),\ Duplin (061),\ Durham (063),\ Edgecombe (065),\ Forsyth (067),\ Franklin (069),\ Gaston (071),\ Gates (073),\ Graham (075),\ Granville (077),\ Greene (079),\ Guilford (081),\ Halifax (083),\ Harnett (085),\ Haywood (087),\ Henderson (089),\ Hertford (091),\ Hoke (093),\ Hyde (095),\ Iredell (097),\ Jackson (099),\ Johnston (101),\ Jones (103),\ Lee (105),\ Lenoir (107),\ Lincoln (109),\ McDowell (111),\ Macon (113),\ Madison (115),\ Martin (117),\ Mecklenburg (119),\ Mitchell (121),\ Montgomery (123),\ Moore (125),\ Nash (127),\ New Hanover (129),\ Northampton (131),\ Onslow (133),\ Orange (135),\ Pamlico (137),\ Pasquotank (139),\ Pender (141),\ Perquimans (143),\ Person (145),\ Pitt (147),\ Polk (149),\ Randolph (151),\ Richmond (153),\ Robeson (155),\ Rockingham (157),\ Rowan (159),\ Rutherford (161),\ Sampson (163),\ Scotland (165),\ Stanly (167),\ Stokes (169),\ Surry (171),\ Swain (173),\ Transylvania (175),\ Tyrrell (177),\ Union (179),\ Vance (181),\ Wake (183),\ Warren (185),\ Washington (187),\ Watauga (189),\ Wayne (191),\ Wilkes (193),\ Wilson (195),\ Yadkin (197),\ Yancey (199),\ NC,\ ND,\ Adams (001),\ Barnes (003),\ Benson (005),\ Billings (007),\ Bottineau (009),\ Bowman (011),\ Burke (013),\ Burleigh (015),\ Cass (017),\ Cavalier (019),\ Dickey (021),\ Divide (023),\ Dunn (025),\ Eddy (027),\ Emmons (029),\ Foster (031),\ Golden Valley (033),\ Grand Forks (035),\ Grant (037),\ Griggs (039),\ Hettinger (041),\ Kidder (043),\ LaMoure (045),\ Logan (047),\ McHenry (049),\ McIntosh (051),\ McKenzie (053),\ McLean (055),\ Mercer (057),\ Morton (059),\ Mountrail (061),\ Nelson (063),\ Oliver (065),\ Pembina (067),\ Pierce (069),\ Ramsey (071),\ Ransom (073),\ Renville (075),\ Richland (077),\ Rolette (079),\ Sargent (081),\ Sheridan (083),\ Sioux (085),\ Slope (087),\ Stark (089),\ Steele (091),\ Stutsman (093),\ Towner (095),\ Traill (097),\ Walsh (099),\ Ward (101),\ Wells (103),\ Williams (105),\ ND,\ OH,\ Adams (001),\ Allen (003),\ Ashland (005),\ Ashtabula (007),\ Athens (009),\ Auglaize (011),\ Belmont (013),\ Brown (015),\ Butler (017),\ Carroll (019),\ Champaign (021),\ Clark (023),\ Clermont (025),\ Clinton (027),\ Columbiana (029),\ Coshocton (031),\ Crawford (033),\ Cuyahoga (035),\ Darke (037),\ Defiance (039),\ Delaware (041),\ Erie (043),\ Fairfield (045),\ Fayette (O47),\ Franklin (049),\ Fulton (051),\ Gallia (053),\ Geauga (055),\ Greene (057),\ Guernsey (059),\ Hamilton (061),\ Hancock (063),\ Hardin (065),\ Harrison (067),\ Henry (069),\ Highland (071),\ Hocking (073),\ Holmes (075),\ Huron (077),\ Jackson (079),\ Jefferson (081),\ Knox (083),\ Lake (085),\ Lawrence (087),\ Licking (089),\ Logan (091),\ Lorain (093),\ Lucas (095),\ Madison (097),\ Mahoning (099),\ Marion (101),\ Medina (103),\ Meigs (105),\ Mercer (107),\ Miami (109),\ Monroe (111),\ Montgomery (113),\ Morgan (115),\ Morrow (117),\ Muskingum (119),\ Noble (121),\ Ottawa (123),\ Paulding (125),\ Perry (127),\ Pickaway (129),\ Pike (131),\ Portage (133),\ Preble (135),\ Putnam (137),\ Richland (139),\ Ross (141),\ Sandusky (143),\ Scioto (145),\ Seneca (147),\ Shelby (149),\ Stark (151),\ Summit (153),\ Trumbull (155),\ Tuscarawas (157),\ Union (159),\ Van Wert (161),\ Vinton (163),\ Warren (165),\ Washington (167),\ Wayne (169),\ Williams (171),\ Wood (173),\ Wyandot (175),\ OH,\ OK,\ Adair (001),\ Alfalfa (003),\ Atoka (005),\ Beaver (007),\ Beckham (009),\ Blaine (011),\ Bryan (013),\ Caddo (015),\ Canadian (017),\ Carter (019),\ Cherokee (021),\ Choctaw (023),\ Cimarron (025),\ Cleveland (027),\ Coal (029),\ Comanche (031),\ Cotton (033),\ Craig (035),\ Creek (037),\ Custer (039),\ Delaware (041),\ Dewey (043),\ Ellis (045),\ Garfield (047),\ Garvin (049),\ Grady (051),\ Grant (053),\ Greer (055),\ Harmon (057),\ Harper (059),\ Haskell (061),\ Hughes (063),\ Jackson (065),\ Jefferson (067),\ Johnston (069),\ Kay (071),\ Kingfisher (073),\ Kiowa (075),\ Latimer (077),\ Le Flore (079),\ Lincoln (081),\ Logan (083),\ Love (085),\ McClain (087),\ McCurtain (089),\ McIntosh (091),\ Major (093),\ Marshall (095),\ Mayes (097),\ Murray (099),\ Muskogee (101),\ Noble (103),\ Nowata (105),\ Okfuskee (107),\ Oklahoma (109),\ Okmulgee (111),\ Osage (113),\ Ottawa (115),\ Pawnee (117),\ Payne (119),\ Pittsburg (121),\ Pontotoc (123),\ Pottawatomie (125),\ Pushmataha (127),\ Roger Mills (129),\ Rogers (131),\ Seminole (133),\ Sequoyah (135),\ Stephens (137),\ Texas (139),\ Tillman (141),\ Tulsa (143),\ Wagoner (145),\ Washington (147),\ Washita (149),\ Woods (151),\ Woodward (153),\ OK,\ OR,\ Baker (001),\ Benton (003),\ Clackamas (005),\ Clatsop (007),\ Columbia (009),\ Coos (011),\ Crook (013),\ Curry (015),\ Deschutes (017),\ Douglas (019),\ Gilliam (021),\ Grant (023),\ Harney (025),\ Hood River (027),\ Jackson (029),\ Jefferson (031),\ Josephine (033),\ Klamath (035),\ Lake (037),\ Lane (039),\ Lincoln (041),\ Linn (043),\ Malheur (045),\ Marion (047),\ Morrow (049),\ Multnomah (051),\ Polk (053),\ Sherman (055),\ Tillamook (057),\ Umatilla (059),\ Union (061),\ Wallowa (063),\ Wasco (065),\ Washington (067),\ Wheeler (069),\ Yamhill (071),\ OR,\ PA,\ Adams (001),\ Allegheny (003),\ Armstrong (005),\ Beaver (007),\ Bedford (009),\ Berks (011),\ Blair (013),\ Bradford (015),\ Bucks (017),\ Butler (019),\ Cambria (021),\ Cameron (023),\ Carbon (025),\ Centre (027),\ Chester (029),\ Clarion (031),\ Clearfield (033),\ Clinton (035),\ Columbia (037),\ Crawford (039),\ Cumberland (041),\ Dauphin (043),\ Delaware (045),\ Elk (047),\ Erie (049),\ Fayette (051),\ Forest (053),\ Franklin (055),\ Fulton (057),\ Greene (059),\ Huntingdon (061),\ Indiana (063),\ Jefferson (065),\ Juniata (067),\ Lackawanna (069),\ Lancaster (071),\ Lawrence (073),\ Lebanon (075),\ Lehigh (077),\ Luzerne (079),\ Lycoming (081),\ McKean (083),\ Mercer (085),\ Mifflin (087),\ Monroe (089),\ Montgomery (091),\ Montour (093),\ Northampton (095),\ Northumberland (097),\ Perry (099),\ Philadelphia (101),\ Pike (103),\ Potter (105),\ Schuylkill (107),\ Snyder (109),\ Somerset (111),\ Sullivan (113),\ Susquehanna (115),\ Tioga (117),\ Union (119),\ Venango (121),\ Warren (123),\ Washington (125),\ Wayne (127),\ Westmoreland (129),\ Wyoming (131),\ York (133),\ PA,\ RI,\ Bristol (001),\ Kent (003 ),\ Newport (005),\ Providence (007),\ Washington (009),\ RI,\ SC,\ Abbeville (001),\ Aiken (003),\ Allendale (005),\ Anderson (007),\ Bamberg (009),\ Barnwell (011),\ Beaufort (013),\ Berkeley (015),\ Calhoun (017),\ Charleston (019),\ Cherokee (021),\ Chester (023),\ Chesterfield (025),\ Clarendon (027),\ Colleton (029),\ Darlington (031),\ Dillon (033),\ Dorchester (035),\ Edgefield (037),\ Fairfield (039),\ Florence (041),\ Georgetown (043),\ Greenville (045),\ Greenwood (047),\ Hampton (049),\ Horry (051),\ Jasper (053),\ Kershaw (055),\ Lancaster (057),\ Laurens (059),\ Lee (061),\ Lexington (063),\ McCormick (065),\ Marion (067),\ Marlboro (069),\ Newberry (071),\ Oconee (073),\ Orangeburg (075),\ Pickens (077),\ Richland (079),\ Saluda (081),\ Spartanburg (083),\ Sumter (085),\ Union (087),\ Williamsburg (089),\ York (091),\ SC,\ SD,\ Aurora (003),\ Beadle (005),\ Bennett (007),\ Bon Homme (009),\ Brookings (011),\ Brown (013),\ Brule (015),\ Buffalo (017),\ Butte (019),\ Campbell (021),\ Charles Mix (023),\ Clark (025),\ Clay (027),\ Codington (029),\ Corson (031),\ Custer (033),\ Davison (035),\ Day (037),\ Deuel (039),\ Dewey (041),\ Douglas (043),\ Edmunds (045),\ Fall River (047),\ Faulk (049),\ Grant (051),\ Gregory (053),\ Haakon (055),\ Hamlin (057),\ Hand (059),\ Hanson (061),\ Harding (063),\ Hughes (065),\ Hutchinson (067),\ Hyde (069),\ Jackson (071),\ Jerauld (073),\ Jones (075),\ Kingsbury (077),\ Lake (079),\ Lawrence (081),\ Lincoln (083),\ Lyman (085),\ McCook (087),\ McPherson (089),\ Marshall (091),\ Meade (093),\ Mellette (095),\ Miner (097),\ Minnehaha (099),\ Moody (101),\ Pennington (103),\ Perkins (105),\ Potter (107),\ Roberts (109),\ Sanborn (111),\ Shannon (113),\ Spink (115),\ Stanley (117),\ Sully (119),\ Todd (121),\ Tripp (123),\ Turner (125),\ Union (127),\ Walworth (129),\ Yankton (135),\ Ziebach (137),\ SD,\ TN,\ Anderson (001),\ Bedford (003),\ Benton (005),\ Bledsoe (007),\ Blount (009),\ Bradley (011),\ Campbell (013),\ Cannon (015),\ Carroll (017),\ Carter (019),\ Cheatham (021),\ Chester (023),\ Claiborne (025),\ Clay (027),\ Cocke (029),\ Coffee (031),\ Crockett (033),\ Cumberland (035),\ Davidson (037),\ Decatur (039),\ DeKalb (041),\ Dickson (043),\ Dyer (045),\ Fayette (047),\ Fentress (049),\ Franklin (051),\ Gibson (053),\ Giles (055),\ Grainger (057),\ Greene (059),\ Grundy (061),\ Hamblen (063),\ Hamilton (065),\ Hancock (067),\ Hardeman (069),\ Hardin (071),\ Hawkins (073),\ Haywood (075),\ Henderson (077),\ Henry (079),\ Hickman (081),\ Houston (083),\ Humphreys (085),\ Jackson (087),\ Jefferson (089),\ Johnson (091),\ Knox (093),\ Lake (095),\ Lauderdale (097),\ Lawrence (099),\ Lewis (101),\ Lincoln (103),\ Loudon (105),\ McMinn (107),\ McNairy (109),\ Macon (111),\ Madison (113),\ Marion (115),\ Marshall (117),\ Maury (119),\ Meigs (121),\ Monroe (123),\ Montgomery (125),\ Moore (127),\ Morgan (129),\ Obion (131),\ Overton (133),\ Perry (135),\ Pickett (137),\ Polk (139),\ Putnam (141),\ Rhea (143),\ Roane (145),\ Robertson (147),\ Rutherford (149),\ Scott (151),\ Sequatchie (153),\ Sevier (155),\ Shelby (157),\ Smith (159),\ Stewart (161),\ Sullivan (163),\ Sumner (165),\ Tipton (167),\ Trousdale (169),\ Unicoi (171),\ Union (173),\ Van Buren (175),\ Warren (177),\ Washington (179),\ Wayne (181),\ Weakley (183),\ White (185),\ Williamson (187),\ Wilson (189),\ TN,\ TX,\ Anderson (001),\ Andrews (003),\ Angelina (005),\ Aransas (007),\ Archer (009),\ Armstrong (011),\ Atascosa (013),\ Austin (015),\ Bailey (017),\ Bandera (019),\ Bastrop (021),\ Baylor (023),\ Bee (025),\ Bell (027),\ Bexar (029),\ Blanco (031),\ Borden (033),\ Bosque (035),\ Bowie (037),\ Brazoria (039),\ Brazos (041),\ Brewster (043),\ Briscoe (045),\ Brooks (047),\ Brown (049),\ Burleson (051),\ Burnet (053),\ Caldwell (055),\ Calhoun (057),\ Callahan (059),\ Cameron (061),\ Camp (063),\ Carson (065),\ Cass (067),\ Castro (069),\ Chambers (071),\ Cherokee (073),\ Childress (075),\ Clay (077),\ Cochran (079),\ Coke (081),\ Coleman (083),\ Collin (085),\ Collingsworth (087),\ Colorado (089),\ Comal (091),\ Comanche (093),\ Concho (095),\ Cooke (097),\ Coryell (099),\ Cottle (101),\ Crane (103),\ Crockett (105),\ Crosby (107),\ Culberson (109),\ Dallam (111),\ Dallas (113),\ Dawson (115),\ Deaf Smith (117),\ Delta (119),\ Denton (121),\ DeWitt (123),\ Dickens (125),\ Dimmit (127),\ Donley (129),\ Duval (131),\ Eastland (133),\ Ector (135),\ Edwards (137),\ Ellis (139),\ El Paso (141),\ Erath (143),\ Falls (145),\ Fannin (147),\ Fayette (149),\ Fisher (151),\ Floyd (153),\ Foard (155),\ Fort Bend (157),\ Franklin (159),\ Freestone (161),\ Frio (163),\ Gaines (165),\ Galveston (167),\ Garza (169),\ Gillespie (171),\ Glasscock (173),\ Goliad (175),\ Gonzales (177),\ Gray (179),\ Grayson (181),\ Gregg (183),\ Grimes (185),\ Guadalupe (187),\ Hale (189),\ Hall (191),\ Hamilton (193),\ Hansford (195),\ Hardeman (197),\ Hardin (199),\ Harris (201),\ Harrison (203),\ Hartley (205),\ Haskell (207),\ Hays (209),\ Hemphill (211),\ Henderson (213),\ Hidalgo (215),\ Hill (217),\ Hockley (219),\ Hood (221),\ Hopkins (223),\ Houston (225),\ Howard (227),\ Hudspeth (229),\ Hunt (231),\ Hutchinson (233),\ Irion (235),\ Jack (237),\ Jackson (239),\ Jasper (241),\ Jeff Davis (243),\ Jefferson (245),\ Jim Hogg (247),\ Jim Wells (249),\ Johnson (251),\ Jones (253),\ Karnes (255),\ Kaufman (257),\ Kendall (259),\ Kenedy (261),\ Kent (263),\ Kerr (265),\ Kimble (267),\ King (269),\ Kinney (271),\ Kleberg (273),\ Knox (275),\ Lamar (277),\ Lamb (279),\ Lampasas (281),\ La Salle (283),\ Lavaca (285),\ Lee (287),\ Leon (289),\ Liberty (291),\ Limestone (293),\ Lipscomb (295),\ Live Oak (297),\ Llano (299),\ Loving (301),\ Lubbock (303),\ Lynn (305),\ McCulloch (307),\ McLennan (309),\ McMullen (311),\ Madison (313),\ Marion (315),\ Martin (317),\ Mason (319),\ Matagorda (321),\ Maverick (323),\ Medina (325),\ Menard (327),\ Midland (329),\ Milam (331),\ Mills (333),\ Mitchell (335),\ Montague (337),\ Montgomery (339),\ Moore (341),\ Morris (343),\ Motley (345),\ Nacogdoches (347),\ Navarro (349),\ Newton (351),\ Nolan (353),\ Nueces (355),\ Ochiltree (357),\ Oldham (359),\ Orange (361),\ Palo Pinto (363),\ Panola (365),\ Parker (367),\ Parmer (369),\ Pecos (371),\ Polk (373),\ Potter (375),\ Presidio (377),\ Rains (379),\ Randall (381),\ Reagan (383),\ Real (385),\ Red River (387),\ Reeves (389),\ Refugio (391),\ Roberts (393),\ Robertson (395),\ Rockwall (397),\ Runnels (399),\ Rusk (401),\ Sabine (403),\ San Augustine (405),\ San Jacinto (407),\ San Patricio (409),\ San Saba (411),\ Schleicher (413),\ Scurry (415),\ Shackelford (417),\ Shelby (419),\ Sherman (421),\ Smith (423),\ Somervell (425),\ Starr (427),\ Stephens (429),\ Sterling (431),\ Stonewall (433),\ Sutton (435),\ Swisher (437),\ Tarrant (439),\ Taylor (441),\ Terrell (443),\ Terry (445),\ Throckmorton (447),\ Titus (449),\ Tom Green (451),\ Travis (453),\ Trinity (455),\ Tyler (457),\ Upshur (459),\ Upton (461),\ Uvalde (463),\ Val Verde (465),\ Van Zandt (467),\ Victoria (469),\ Walker (471),\ Waller (473),\ Ward (475),\ Washington (477),\ Webb (479),\ Wharton (481),\ Wheeler (483),\ Wichita (485),\ Wilbarger (487),\ Willacy (489),\ Williamson (491),\ Wilson (493),\ Winkler (495),\ Wise (497),\ Wood (499),\ Yoakum (501),\ Young (503),\ Zapata (505),\ Zavala (507),\ TX,\ UT,\ Beaver (001),\ Box Elder (003),\ Cache (005),\ Carbon (007),\ Daggett (009),\ Davis (011),\ Duchesne (013),\ Emery (015),\ Garfield (017),\ Grand (019),\ Iron (021),\ Juab (023),\ Kane (025),\ Millard (027),\ Morgan (029),\ Piute (031),\ Rich (033),\ Salt Lake (035),\ San Juan (037),\ Sanpete (039),\ Sevier (041),\ Summit (043),\ Tooele (045),\ Uintah (047),\ Utah (049),\ Wasatch (051),\ Washington (053),\ Wayne (055),\ Weber (057),\ UT,\ VT,\ Addison (001),\ Bennington (003),\ Caledonia (005),\ Chittenden (007),\ Essex (009),\ Franklin (011),\ Grand Isle (013),\ Lamoille (015),\ Orange (017),\ Orleans (019),\ Rutland (021),\ Washington (023),\ Windham (025),\ Windsor (027),\ VT,\ VA,\ Accomack (001),\ Albemarle (003),\ Alleghany (005),\ Amelia (007),\ Amherst (009),\ Appomattox (011),\ Arlington (013),\ Augusta (015),\ Bath (017),\ Bedford (019),\ Bland (021),\ Botetourt (023),\ Brunswick (025),\ Buchanan (027),\ Buckingham (029),\ Campbell (031),\ Caroline (033),\ Carroll (035),\ Charles City (036),\ Charlotte (037),\ Chesterfield (041),\ Clarke (043),\ Craig (045),\ Culpeper (047),\ Cumberland (049),\ Dickenson (051),\ Dinwiddie (053),\ Essex (057),\ Fairfax (059),\ Fauquier (061),\ Floyd (063),\ Fluvanna (065),\ Franklin (067),\ Frederick (069),\ Giles (071),\ Gloucester (073),\ Goochland (075),\ Grayson (077),\ Greene (079),\ Greensville (081),\ Halifax (083),\ Hanover (085),\ Henrico (087),\ Henry (089),\ Highland (091),\ Isle of Wight (093),\ James City (095),\ King and Queen (097),\ King George (099),\ King William (101),\ Lancaster (103),\ Lee (105),\ Loudoun (107),\ Louisa (109),\ Lunenburg (111),\ Madison (113),\ Mathews (115),\ Mecklenburg (117),\ Middlesex (119),\ Montgomery (121),\ Nelson (125),\ New Kent (127),\ Northampton (131),\ Northumberland (133),\ Nottoway (135),\ Orange (137),\ Page (139),\ Patrick (141),\ Pittsylvania (143),\ Powhatan (145),\ Prince Edward (147),\ Prince George (149),\ Prince William (153),\ Pulaski (155),\ Rappahannock (157),\ Richmond (159),\ Roanoke (161),\ Rockbridge (163),\ Rockingham (165),\ Russell (167),\ Scott (169),\ Shenandoah (171),\ Smyth (173),\ Southampton (175),\ Spotsylvania (177),\ Stafford (179),\ Surry (181),\ Sussex (183),\ Tazewell (185),\ Warren (187),\ Washington (191),\ Westmoreland (193),\ Wise (195),\ Wythe (197),\ York (199),\ Alexandria - city (510),\ Bedford - city (515),\ Bristol - city (520),\ Buena Vista - city (530),\ Charlottesville - city (540),\ Chesapeake - city (550),\ Clifton Forge - city (560),\ Colonial Heights - city (570),\ Covington - city (580),\ Danville - city (590),\ Emporia - city (595),\ Fairfax - city (600),\ Falls Church - city (610),\ Franklin - city (620),\ Fredericksburg - city (630),\ Galax - city (640),\ Hampton - city (650),\ Harrisonburg - city (660),\ Hopewell - city (670),\ Lexington - city (678),\ Lynchburg - city (680),\ Manassas - city (683),\ Manassas Park - city (685),\ Martinsville - city (690),\ Newport News - city (700),\ Norfolk - city (710),\ Norton - city (720),\ Petersburg - city (730),\ Poquoson - city (735),\ Portsmouth - city (740),\ Radford - city (750),\ Richmond - city (760),\ Roanoke - city (770),\ Salem - city (775),\ South Boston - city (780),\ Staunton - city (790),\ Suffolk - city (800),\ Virginia Beach - city (810),\ Waynesboro - city (820),\ Williamsburg - city (830),\ Winchester - city (840),\ VA,\ WA,\ Adams (001),\ Asotin (003),\ Benton (005),\ Chelan (007),\ Clallam (009),\ Clark (011),\ Columbia (013),\ Cowlitz (015),\ Douglas (017),\ Ferry (019),\ Franklin (021),\ Garfield (023),\ Grant (025),\ Grays Harbor (027),\ Island (029),\ Jefferson (031),\ King (033),\ Kitsap (035),\ Kittitas (037),\ Klickitat (039),\ Lewis (041),\ Lincoln (043),\ Mason (045),\ Okanogan (047),\ Pacific (049),\ Pend Oreille (051),\ Pierce (053),\ San Juan (055),\ Skagit (057),\ Skamania (059),\ Snohomish (061),\ Spokane (063),\ Stevens (065),\ Thurston (067),\ Wahkiakum (069),\ Walla Walla (071),\ Whatcom (073),\ Whitman (075),\ Yakima (077),\ WA,\ WV,\ Barbour (001),\ Berkeley (003),\ Boone (005),\ Braxton (007),\ Brooke (009),\ Cabell (011),\ Calhoun (013),\ Clay (015),\ Doddridge (017),\ Fayette (019),\ Gilmer (021),\ Grant (023),\ Greenbrier (025),\ Hampshire (027),\ Hancock (029),\ Hardy (031),\ Harrison (033),\ Jackson (035),\ Jefferson (037),\ Kanawha (039),\ Lewis (041),\ Lincoln (043),\ Logan (045),\ McDowell (047),\ Marion (049),\ Marshall (051),\ Mason (053),\ Mercer (055),\ Mineral (057),\ Mingo (059),\ Monongalia (061),\ Monroe (063),\ Morgan (065),\ Nicholas (067),\ Ohio (069),\ Pendleton (071),\ Pleasants (073),\ Pocahontas (075),\ Preston (077),\ Putnam (079),\ Raleigh (081),\ Randolph (083),\ Ritchie (085),\ Roane (087),\ Summers (089),\ Taylor (091),\ Tucker (093),\ Tyler (095),\ Upshur (097),\ Wayne (099),\ Webster (101),\ Wetzel (103),\ Wirt (105),\ Wood (107),\ Wyoming (109),\ WV,\ WI,\ Adams (001),\ Ashland (003),\ Barron (005),\ Bayfield (007),\ Brown (009),\ Buffalo (011),\ Burnett (013),\ Calumet (015),\ Chippewa (017),\ Clark (019),\ Columbia (021),\ Crawford (023),\ Dane (025),\ Dodge (027),\ Door (029),\ Douglas (031),\ Dunn (033),\ Eau Claire (035),\ Florence (037),\ Fond du Lac (039),\ Forest (041),\ Grant (043),\ Green (045),\ Green Lake (047),\ Iowa (049),\ Iron (051),\ Jackson (053),\ Jefferson (055),\ Juneau (057),\ Kenosha (059),\ Kewaunee (061),\ La Crosse (063),\ Lafayette (065),\ Langlade (067),\ Lincoln (069),\ Manitowoc (071),\ Marathon (073),\ Marinette (075),\ Marquette (077),\ Menominee (078),\ Milwaukee (079),\ Monroe (081),\ Oconto (083),\ Oneida (085),\ Outagamie (087),\ Ozaukee (089),\ Pepin (091),\ Pierce (093),\ Polk (095),\ Portage (097),\ Price (099),\ Racine (101),\ Richland (103),\ Rock (105),\ Rusk (107),\ St. Croix (109),\ Sauk (111),\ Sawyer (113),\ Shawano (115),\ Sheboygan (117),\ Taylor (119),\ Trempealeau (121),\ Vernon (123),\ Vilas (125),\ Walworth (127),\ Washburn (129),\ Washington (131),\ Waukesha (133),\ Waupaca (135),\ Waushara (137),\ Winnebago (139),\ Wood (141),\ WI,\ WY,\ Albany (001),\ Big Horn (003),\ Campbell (005),\ Carbon (007),\ Converse (009),\ Crook (011),\ Fremont (013),\ Goshen (015),\ Hot Springs (017),\ Johnson (019),\ Laramie (021),\ Lincoln (023),\ Natrona (025),\ Niobrara (027),\ Park (029),\ Platte (031),\ Sheridan (033),\ Sublette (035),\ Sweetwater (037),\ Teton (039),\ Uinta (041),\ Washakie (043),\ Weston (045),\ WY,\ AS,\ Eastern District (010),\ Swains Island (040),\ Manu'a District (020),\ Western District (050),\ Rose Island (030),\ AS,\ GU,\ Guam (010),\ GU,\ MP,\ 085 Northern Islands (085),\ 100 Rota (100),\ 110 Saipan (110),\ 120 Tinian (120),\ MP,\ PR,\ Adjuntas (001),\ Aguada (003),\ Aguadilla (005),\ Aguas Buenas (007),\ Aibonito (009),\ Anasco (011),\ Arecibo (013),\ Arroyo (015),\ Barceloneta (017),\ Barranquitas (019),\ Bayamo'n (021),\ Cabo Rojo (023),\ Caguas (025),\ Camuy (027),\ Canovanas (029),\ Carolina (031),\ Catano (033),\ Cayey (035),\ Ceiba (037),\ Ciales (039),\ Cidra (041),\ Coamo (043),\ Comerio (045),\ Corozal (047),\ Culebra (049),\ Dorado (051),\ Fajardo (053),\ Florida (054),\ Guanica (055),\ Guayama (057),\ Guayanilla (059),\ Guaynabo (061),\ Gurabo (063),\ Hatillo (065),\ Hormigueros (067),\ Humacao (069),\ lsabela (071),\ Jayuya (073),\ Juana Diaz (075),\ Juncos (077),\ Lajas (079),\ Lares (081),\ Las Marias (083),\ Las Piedras (085),\ Loiza (087),\ Luquillo (089),\ Manati (091),\ Maricao (093),\ Maunabo (095),\ Mayaguez (097),\ Moca (099),\ Morovis (101),\ Naguabo (103),\ Naranjito (105),\ Orocovis (107),\ Patillas (109),\ Penuelas (111),\ Ponce (113),\ Quebradillas (115),\ Rincon (117),\ Rio Grande (119),\ Sabana Grande (121),\ Salinas (123),\ San German (125),\ San Juan (127),\ San Lorenzo (129),\ San Sebastian (131),\ Santa Isabel (133),\ Toa Alta (135),\ Toa Baja (137),\ Trujillo Alto (139),\ Utuado (141),\ Vega Alta (143),\ Vega Baja (145),\ Vieques (147),\ Villalba (149),\ Yabucoa (151),\ Yauco (153),\ PR,\ PW,\ Aimeliik (002),\ Airai (004),\ Melekeok (212),\ Ngaraard (214),\ Ngernmlengui (227),\ Ngiwal (228),\ PW,\ UM,\ Baker Island (050),\ Howland Island (100),\ Jarvis Island (150),\ Johnston Island (200),\ Kingman Reef (250),\ Midway Islands (300),\ Navassa Island (350),\ Palmyra Atoll (400),\ Wake Island (450),\ UM,\ VI,\ St. Croix (010),\ St. John (020),\ St. Thomas (030),\ Angaur (010),\ Hatoboheit (050),\ Kayangel (100),\ Koror (150),\ Ngarchelong (218),\ Ngardmau (222),\ Ngatpang (224),\ Ngchesar (226),\ Peleliu (350),\ Sonsorol (370),\ VI,\ FM,\ Chuuk (002),\ Kosrae (005),\ Pohnpeit (040),\ Yap (060),\ FM,\ MH,\ Ailinginae (007),\ Ailinglaplap (010),\ Ailuk (030),\ Arno (040),\ Aur (050),\ Bikar (060),\ Bikini (070),\ Bokak (073),\ Ebon (080),\ Enewetak (090),\ Erikub (100),\ Jabat (110),\ Jaluit (120),\ Jemo (130),\ Kili (140),\ Kwajalein (150),\ Lae (160),\ Lib (170),\ Likiep (180),\ Majuro (190),\ Maloelap (300),\ Mejit (310),\ Mili (320),\ Namorik (330),\ Namu (340),\ Rongelap (350),\ Rongrik (360),\ Toke (385),\ Ujae (390),\ Ujelang (400),\ Utrik (410),\ Wotho (420),\ Wotle (430),\ MH,"; const std::string states[] = { "--,Select State", "AL,Alabama", "AK,Alaska", "AZ,Arizona", "AR,Arkansas", "CA,California", "CO,Colorado", "CT,Connecticut", "DE,Delaware", "DC,District of Columbia", "FL,Florida", "GA,Georgia", "HI,Hawaii", "ID,Idaho", "IL,Illinois", "IN,Indiana", "IA,Iowa", "KS,Kansas", "KY,Kentucky", "LA,Louisiana", "ME,Maine", "MD,Maryland", "MA,Massachusetts", "MI,Michigan", "MN,Minnesota", "MS,Mississippi", "MO,Missouri", "MT,Montana", "NE,Nebraska", "NV,Nevada", "NH,New Hampshire", "NJ,New Jersey", "NM,New Mexico", "NY,New York", "NC,North Carolina", "ND,North Dakota", "OH,Ohio", "OK,Oklahoma", "OR,Oregon", "PA,Pennsylvania", "RI,Rhode Island", "SC,South Carolina", "SD,South Dakota", "TN,Tennessee", "TX,Texas", "UT,Utah", "VT,Vermont", "VA,Virginia", "WA,Washington", "WV,West Virginia", "WI,Wisconsin", "WY,Wyoming", "AS,America Somoa", "GU,Guam", "MP,Northern Mariana Islands", "PR,Puerto Rico", "PW,Palua", "UM,U.S. Minor outlying islands", "VI,U.S. Virgin Islands", "FM,Federated States of Micronesia", "MH,Marshall Islands" }; int numstates = (int)(sizeof(states) / sizeof(std::string)); const std::string tzones[] = { "--Time Zone--", "ACDT, Australian Central Daylight Time, UTC+10:30", "ACST, Australian Central Standard Time, UTC+09:30", "ACT, ASEAN Common Time, UTC+08", "ADT, Atlantic Daylight Time, UTC-03", "AEDT, Australian Eastern Daylight Time, UTC+11", "AEST, Australian Eastern Standard Time, UTC+10", "AFT, Afghanistan Time, UTC+04:30", "AKDT, Alaska Daylight Time, UTC-08", "AKST, Alaska Standard Time, UTC-09", "AMST, Amazon Summer Time (Brazil)[1], UTC-03", "AMST, Armenia Summer Time, UTC+05", "AMT, Amazon Time (Brazil)[2], UTC-04", "AMT, Armenia Time, UTC+04", "ART, Argentina Time, UTC-03", "AST, Arabia Standard Time, UTC+03", "AST, Atlantic Standard Time, UTC-04", "AWDT, Australian Western Daylight Time, UTC+09", "AWST, Australian Western Standard Time, UTC+08", "AZOST, Azores Standard Time, UTC-01", "AZT, Azerbaijan Time, UTC+04", "BDT, Brunei Time, UTC+08", "BIOT, British Indian Ocean Time, UTC+06", "BIT, Baker Island Time, UTC-12", "BOT, Bolivia Time, UTC-04", "BRT, Brasilia Time, UTC-03", "BST, Bangladesh Standard Time, UTC+06", "BST, British Summer Time, UTC+01", "BTT, Bhutan Time, UTC+06", "CAT, Central Africa Time, UTC+02", "CCT, Cocos Islands Time, UTC+06:30", "CDT, Central Daylight Time (North America), UTC-05", "CDT, Cuba Daylight Time[3], UTC-04", "CEDT, Central European Daylight Time, UTC+02", "CEST, Central European Summer Time (Cf. HAEC), UTC+02", "CET, Central European Time, UTC+01", "CHADT, Chatham Daylight Time, UTC+13:45", "CHAST, Chatham Standard Time, UTC+12:45", "CHOT, Choibalsan, UTC+08", "ChST, Chamorro Standard Time, UTC+10", "CHUT, Chuuk Time, UTC+10", "CIST, Clipperton Island Standard Time, UTC-08", "CIT, Central Indonesia Time, UTC+08", "CKT, Cook Island Time, UTC-10", "CLST, Chile Summer Time, UTC-03", "CLT, Chile Standard Time, UTC-04", "COST, Colombia Summer Time, UTC-04", "COT, Colombia Time, UTC-05", "CST, Central Standard Time (North America), UTC-06", "CST, China Standard Time, UTC+08", "CST, Central Standard Time (Australia), UTC+09:30", "CST, Central Summer Time (Australia), UTC+10:30", "CST, Cuba Standard Time, UTC-05", "CT, China time, UTC+08", "CVT, Cape Verde Time, UTC-01", "CWST, Central Western Standard Time (Australia) unofficial, UTC+08:45", "CXT, Christmas Island Time, UTC+07", "DAVT, Davis Time, UTC+07", "DDUT, Dumont d'Urville Time, UTC+10", "DFT, AIX specific equivalent of Central European Time[4], UTC+01", "EASST, Easter Island Standard Summer Time, UTC-05", "EAST, Easter Island Standard Time, UTC-06", "EAT, East Africa Time, UTC+03", "ECT, Eastern Caribbean Time (does not recognise DST), UTC-04", "ECT, Ecuador Time, UTC-05", "EDT, Eastern Daylight Time (North America), UTC-04", "EEDT, Eastern European Daylight Time, UTC+03", "EEST, Eastern European Summer Time, UTC+03", "EET, Eastern European Time, UTC+02", "EGST, Eastern Greenland Summer Time, UTC+00", "EGT, Eastern Greenland Time, UTC-01", "EIT, Eastern Indonesian Time, UTC+09", "EST, Eastern Standard Time (North America), UTC-05", "EST, Eastern Standard Time (Australia), UTC+10", "FET, Further-eastern European Time, UTC+03", "FJT, Fiji Time, UTC+12", "FKST, Falkland Islands Standard Time, UTC-03", "FKST, Falkland Islands Summer Time, UTC-03", "FKT, Falkland Islands Time, UTC-04", "FNT, Fernando de Noronha Time, UTC-02", "GALT, Galapagos Time, UTC-06", "GAMT, Gambier Islands, UTC-09", "GET, Georgia Standard Time, UTC+04", "GFT, French Guiana Time, UTC-03", "GILT, Gilbert Island Time, UTC+12", "GIT, Gambier Island Time, UTC-09", "GMT, Greenwich Mean Time, UTC", "GST, South Georgia and the South Sandwich Islands, UTC-02", "GST, Gulf Standard Time, UTC+04", "GYT, Guyana Time, UTC-04", "HADT, Hawaii-Aleutian Daylight Time, UTC-09", "HAEC, Heure Avancée d'Europe Centrale francised name for CEST, UTC+02", "HAST, Hawaii-Aleutian Standard Time, UTC-10", "HKT, Hong Kong Time, UTC+08", "HMT, Heard and McDonald Islands Time, UTC+05", "HOVT, Khovd Time, UTC+07", "HST, Hawaii Standard Time, UTC-10", "ICT, Indochina Time, UTC+07", "IDT, Israel Daylight Time, UTC+03", "IOT, Indian Ocean Time, UTC+03", "IRDT, Iran Daylight Time, UTC+08", "IRKT, Irkutsk Time, UTC+09", "IRST, Iran Standard Time, UTC+03:30", "IST, Indian Standard Time, UTC+05:30", "IST, Irish Standard Time[5], UTC+01", "IST, Israel Standard Time, UTC+02", "JST, Japan Standard Time, UTC+09", "KGT, Kyrgyzstan time, UTC+06", "KOST, Kosrae Time, UTC+11", "KRAT, Krasnoyarsk Time, UTC+07", "KST, Korea Standard Time, UTC+09", "LHST, Lord Howe Standard Time, UTC+10:30", "LHST, Lord Howe Summer Time, UTC+11", "LINT, Line Islands Time, UTC+14", "MAGT, Magadan Time, UTC+12", "MART, Marquesas Islands Time, UTC-09:30", "MAWT, Mawson Station Time, UTC+05", "MDT, Mountain Daylight Time (North America), UTC-06", "MET, Middle European Time Same zone as CET, UTC+01", "MEST, Middle European Saving Time Same zone as CEST, UTC+02", "MHT, Marshall Islands, UTC+12", "MIST, Macquarie Island Station Time, UTC+11", "MIT, Marquesas Islands Time, UTC-09:30", "MMT, Myanmar Time, UTC+06:30", "MSK, Moscow Time, UTC+04", "MST, Malaysia Standard Time, UTC+08", "MST, Mountain Standard Time (North America), UTC-07", "MST, Myanmar Standard Time, UTC+06:30", "MUT, Mauritius Time, UTC+04", "MVT, Maldives Time, UTC+05", "MYT, Malaysia Time, UTC+08", "NCT, New Caledonia Time, UTC+11", "NDT, Newfoundland Daylight Time, UTC-02:30", "NFT, Norfolk Time, UTC+11:30", "NPT, Nepal Time, UTC+05:45", "NST, Newfoundland Standard Time, UTC-03:30", "NT, Newfoundland Time, UTC-03:30", "NUT, Niue Time, UTC-11", "NZDT, New Zealand Daylight Time, UTC+13", "NZST, New Zealand Standard Time, UTC+12", "OMST, Omsk Time, UTC+07", "ORAT, Oral Time, UTC+05", "PDT, Pacific Daylight Time (North America), UTC-07", "PET, Peru Time, UTC-05", "PETT, Kamchatka Time, UTC+12", "PGT, Papua New Guinea Time, UTC+10", "PHOT, Phoenix Island Time, UTC+13", "PHT, Philippine Time, UTC+08", "PKT, Pakistan Standard Time, UTC+05", "PMDT, Saint Pierre and Miquelon Daylight time, UTC-02", "PMST, Saint Pierre and Miquelon Standard Time, UTC-03", "PONT, Pohnpei Standard Time, UTC+11", "PST, Pacific Standard Time (North America), UTC-08", "PYST, Paraguay Summer Time (South America)[6], UTC-03", "PYT, Paraguay Time (South America)[7], UTC-04", "RET, Réunion Time, UTC+04", "ROTT, Rothera Research Station Time, UTC-03", "SAKT, Sakhalin Island time, UTC+11", "SAMT, Samara Time, UTC+04", "SAST, South African Standard Time, UTC+02", "SBT, Solomon Islands Time, UTC+11", "SCT, Seychelles Time, UTC+04", "SGT, Singapore Time, UTC+08", "SLST, Sri Lanka Time, UTC+05:30", "SRT, Suriname Time, UTC-03", "SST, Samoa Standard Time, UTC-11", "SST, Singapore Standard Time, UTC+08", "SYOT, Showa Station Time, UTC+03", "TAHT, Tahiti Time, UTC-10", "THA, Thailand Standard Time, UTC+07", "TFT, Indian/Kerguelen, UTC+05", "TJT, Tajikistan Time, UTC+05", "TKT, Tokelau Time, UTC+13", "TLT, Timor Leste Time, UTC+09", "TMT, Turkmenistan Time, UTC+05", "TOT, Tonga Time, UTC+13", "TVT, Tuvalu Time, UTC+12", "UCT, Coordinated Universal Time, UTC", "ULAT, Ulaanbaatar Time, UTC+08", "UTC, Coordinated Universal Time, UTC", "UYST, Uruguay Summer Time, UTC-02", "UYT, Uruguay Standard Time, UTC-03", "UZT, Uzbekistan Time, UTC+05", "VET, Venezuelan Standard Time, UTC-04:30", "VLAT, Vladivostok Time, UTC+10", "VOLT, Volgograd Time, UTC+04", "VOST, Vostok Station Time, UTC+06", "VUT, Vanuatu Time, UTC+11", "WAKT, Wake Island Time, UTC+12", "WAST, West Africa Summer Time, UTC+02", "WAT, West Africa Time, UTC+01", "WEDT, Western European Daylight Time, UTC+01", "WEST, Western European Summer Time, UTC+01", "WET, Western European Time, UTC", "WST, Western Standard Time, UTC+08", "YAKT, Yakutsk Time, UTC+10", "YEKT, Yekaterinburg Time, UTC+06", "Z, Zulu Time (Coordinated Universal Time), UTC" }; int num_tzones = (int)(sizeof(tzones) / sizeof(std::string)); const std::string us_tzones[] = { "--Zone--", "ADT", "AKDT", "AKST", "AST", "CDT", "CST", "EDT", "EST", "GMT", "HADT", "HAST", "HST", "MDT", "MST", "PDT", "PST", "Z" "UTC-11", "UTC-10", "UTC-09", "UTC-08", "UTC-07", "UTC-06", "UTC-05", "UTC-04", "UTC-03", "UTC-02", "UTC-01", "UTC", "UTC+01", "UTC+02", "UTC+03", "UTC+04", "UTC+05", "UTC+06", "UTC+07", "UTC+08", "UTC+09", "UTC+10", "UTC+11" }; int num_us_tzones = (int)(sizeof(us_tzones) / sizeof(std::string)); const std::string flood_categories[] = { "--Select flooding category--", "Minor Street Flooding", "Low Water Crossings Flooded", "Widespread Flooding", "Home/Business Flooded", "Creek/Stream out of Banks", "River out of Banks", "Other (please elaborate below)" }; int num_flood_categories = (int)(sizeof(flood_categories)/sizeof(std::string)); const std::string hail_size[] = { "--Select Hail size--", "0.25 (Pea)", "0.50 (0.5\")", "0.75 (Penny)", "0.88 (Nickel)", "1.00 (Quarter)", "1.25 (Half Dollar)", "1.50 (Walnut)", "1.75 (Golf Ball)", "2.00 (Hen Egg)", "2.50 (Tennis Ball)", "2.75 (Baseball)", "3.00 (Tea Cup)", "4.00 (Grapefruit)", "4.50 (Softball)", "larger, describe" }; int num_hail_size = (int)(sizeof(hail_size) / sizeof(std::string)); const std::string wind_speeds[] = { "--Select Wind speed--", "50 mph", "55 mph", "60 mph", "65 mph", "70 mph", "75 mph", "80 mph", "Stronger than 80 mph" }; int num_wind_speeds = (int)(sizeof(wind_speeds)/sizeof(std::string)); const std::string damage[] = { "--Select Wind Damage Description--", "Small Tree Limbs Down (<2\")", "Large Tree Limbs/Branches Down (>=2\")", "Trees snapped or uprooted", "Power Lines Down", "Roof or Structural Damage", "Other (please elaborate below)" }; int num_damage = (int)(sizeof(damage)/sizeof(std::string)); const std::string snow_tot[] = { "--Select snow tot--", "Less than 1\"", "1\"", "2\"", "3\"", "4\"", "5\"", "6\"", "7\"", "8\"", "9\"", "10\"", "11\"", "12\"", "More than 12\"" }; int num_snow_tot = (int)(sizeof(snow_tot)/sizeof(std::string)); const std::string snow_dur[] = { "--Select duration--", "15 minutes", "30 minutes", "45 minutes", "1 hour ", "1 hour 15 minutes", "1 hour 30 minutes", "1 hour 45 minutes", "2 hours ", "2 hours 15 minutes", "2 hours 30 minutes", "3 hours ", "4 hours ", "5 hours ", "6 hours ", "7 hours ", "8 hours ", "9 hours ", "10 hours ", "11 hours ", "12 hours ", "> 12 hours " }; int num_snow_dur = (int)(sizeof(snow_dur)/sizeof(std::string)); const std::string ice_tot[] = { "--Select ice total--", "0.10\"", "0.20\"", "0.25\"", "0.30\"", "0.40\"", "0.50\"", "0.60\"", "0.70\"", "0.75\"", "0.80\"", "0.90\"", "1.00\"", "More than 1\"" }; int num_ice_tot = (int)(sizeof(ice_tot)/sizeof(std::string)); const std::string ice_dur[] = { "--Select duration--", "5 minutes", "10 minutes", "15 minutes", "20 minutes", "30 minutes", "40 minutes", "45 minutes", "50 minutes", "1 hour ", "1 hour 15 minutes", "1 hour 30 minutes", "1 hour 45 minutes", "2 hours ", "2 hours 15 minutes", "2 hours 30 minutes", "2 hours 45 minutes", "3 hours ", "4 hours ", "5 hours ", "6 hours ", "> 6 hours " }; int num_ice_dur = (int)(sizeof(ice_dur)/sizeof(std::string)); const std::string rainfall[] = { "--Select rainfall total--", "0.01-0.09\"", "0.10-0.24\"", "0.25-0.49\"", "0.50-0.74\"", "0.75-0.99\"", "1.00-1.24\"", "1.25-1.49\"", "1.50-1.74\"", "1.75-1.99\"", "2.00-2.24\"", "2.25-2.49\"", "2.50-2.74\"", "2.75-2.99\"", "3.00-3.24\"", "3.25-3.49\"", "3.50-3.74\"", "3.75-3.99\"", "4.00\" or more" }; int num_rainfall = (int)(sizeof(rainfall)/sizeof(std::string)); const std::string rainfall_dur[] = { "--Select duration--", "5 minutes", "10 minutes", "15 minutes", "20 minutes", "30 minutes", "40 minutes", "45 minutes", "50 minutes", "1 hour ", "1 hour 15 minutes", "1 hour 30 minutes", "1 hour 45 minutes", "2 hours ", "2 hours 15 minutes", "2 hours 30 minutes", "2 hours 45 minutes", "3 hours ", "4 hours ", "5 hours ", "6 hours ", "> 6 hours " }; int num_rainfall_dur = (int)(sizeof(rainfall_dur) / sizeof(std::string)); const std::string profiles[] = { "--Select Profile--", "COOP Observer", "Emergency Manager", "Fire and Rescue", "General Public", "HAM Operator", "Law Enforcement", "Media", "NWS Employee", "NWS Storm Spotter", "Storm Chaser" }; int num_profiles = (int)(sizeof(profiles) / sizeof(std::string)); const std::string tornado_categories[] = { "--Select report--", "Funnel cloud", "Tornado" }; int num_tornado_categories = (int)(sizeof(tornado_categories) / sizeof(std::string)); �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/hurricane_template.cxx����������������������������������������������������������0000664�0001750�0001750�00000012630�12330516146�015454� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char wxhc_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head>\n\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\n\ <title>Hurricane Wx Report</title>\n\ </head>\n\ <body>\n\ <center>\n\ <table style=\"text-align: left; width: 80%;\" border=0 cellpadding=0 cellspacing=0>\n\ <tbody>\n\ <tr><td COLSPAN=\"2\"><H2><center>Hurricane Weather Report Form</center></H2></td></tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left; width: 25%\">Reporting Station</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:rptsta:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Email Address</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:email:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Phone Number</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:phone:</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\" COLSPAN=\"2\">Geographic Location</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Address</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:addr:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">City</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:city:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">State</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:state:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Country</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:country:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Location (Lat/Lon)</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:lat: Degrees North : :long: Degrees West</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Date</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:date: (month-day-year)</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Time of observation</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:time:</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Wind measurements</td>\n\ <td style=\"vertical-align: top; text-align: left;\">[:meas:] Measured, [:est:] Estimated</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><br></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Sustained Wind Speed</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:wspd: :wsunits:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Gust speed</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:wgst: :wgunits:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Wind Direction</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:wdir:, :wdeg: Degrees</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\">Barometric pressure</td>\n\ <td style=\"vertical-align: top; text-align: left;\">:baro: :bunits:</td>\n\ </tr>\n\ <tr><td COLSPAN=\"2\"><hr width=\"80%\"></td></tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\" COLSPAN=\"2\">Comments:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left;\" COLSPAN=\"2\"><p>:cmmts:</p></td>\n\ </tr>\n\ </td>\n\ </tbody>\n\ </table>\n\ </center>\n\ </body>\n\ </html>\n\ "; const char wxhc_text_template[] = " Hurricane Weather Report Form\n\ Reporting Station: :rptsta:\n\ Email Address : :email:\n\ Phone Number: :phone:\n\ \n\ Geographic Location:\n\ Address: :addr:\n\ City: :city: State: :state:\n\ Country: :country:\n\ \n\ Location (Lat/Lon): :lat: Degrees North :long: Degrees West\n\ Date: :date: (month-day-year)\n\ Time of observation: :time:\n\ \n\ Wind measurements are:\n\ [:meas:] Measured, [:est:] Estimated\n\ \n\ Sustained Wind Speed: :wspd: :wsunits:\n\ \n\ Gust speed: :wgst: :wgunits:\n\ \n\ Wind Direction: :wdir:, :wdeg: Degrees\n\ \n\ Barometric pressure: :baro: :bunits:\n\ \n\ Comments:\n\ :cmmts:\n"; ��������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/severe_wx_tab.cxx���������������������������������������������������������������0000664�0001750�0001750�00000031471�12330516146�014442� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" #include "calendar.h" Fl_Group *tab_severe_wx = (Fl_Group *)0; Fl_Tabs *tab_severe_wx_type = (Fl_Tabs *)0; Fl_Group *tab_severe_wx_1 = (Fl_Group *)0; Fl_DateInput *w_severe_wx_date = (Fl_DateInput *)0; Fl_Input2 *w_severe_wx_time = (Fl_Input2 *)0; Fl_Button *w_severe_wx_btn_time = (Fl_Button *)0; Fl_ListBox *w_severe_wx_zone = (Fl_ListBox *)0; Fl_Check_Button *w_severe_wx_meas = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_est = (Fl_Check_Button *)0; Fl_ListBox *w_severe_wx_state = (Fl_ListBox *)0; Fl_ListBox *w_severe_wx_county = (Fl_ListBox *)0; Fl_Input2 *w_severe_wx_city = (Fl_Input2 *)0; Fl_Button *use_default = (Fl_Button *)0; Fl_Button *make_default = (Fl_Button *)0; Fl_Input2 *w_severe_wx_wind_speed = (Fl_Input2 *)0; Fl_ListBox *w_severe_wx_hail_size = (Fl_ListBox *)0; Fl_Check_Button *w_severe_wx_exact = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_not_exact = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_tornado = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_funnel_cloud = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_wall_cloud = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_hail = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_high_wind = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_measured = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_estimated = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_flood = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_flash_flood = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_other = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_dmg_yes = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_dmg_no = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_inj_yes = (Fl_Check_Button *)0; Fl_Check_Button *w_severe_wx_inj_no = (Fl_Check_Button *)0; Fl_Group *tab_severe_wx_2 = (Fl_Group *)0; FTextEdit *w_severe_wx_narrative = (FTextEdit *)0; //---------------------------------------------------------------------- // widget callbacks & support //---------------------------------------------------------------------- static void cb_btn_time(Fl_Button*, void*) { w_severe_wx_time->value(szTime(7)); } static void cb_exact(Fl_Check_Button*, void*) { w_severe_wx_not_exact->value(!w_severe_wx_exact->value()); estimate(); } static void cb_not_exact(Fl_Check_Button*, void*) { w_severe_wx_exact->value(!w_severe_wx_not_exact->value()); estimate(); } static void cb_severe_wx_measured(Fl_Check_Button*, void*) { w_severe_wx_estimated->value(!w_severe_wx_measured->value()); estimate(); } static void cb_severe_wx_estimated(Fl_Check_Button*, void*) { w_severe_wx_measured->value(!w_severe_wx_estimated->value()); estimate(); } static void cb_dmg_yes(Fl_Check_Button*, void*) { w_severe_wx_dmg_no->value(!w_severe_wx_dmg_yes->value()); estimate(); } static void cb_dmg_no(Fl_Check_Button*, void*) { w_severe_wx_dmg_yes->value(!w_severe_wx_dmg_no->value()); estimate(); } static void cb_inj_yes(Fl_Check_Button*, void*) { w_severe_wx_inj_no->value(!w_severe_wx_inj_yes->value()); estimate(); } static void cb_inj_no(Fl_Check_Button*, void*) { w_severe_wx_inj_yes->value(!w_severe_wx_inj_no->value()); estimate(); } static void cb_make_default(Fl_Button*, void*) { progStatus.swx_index_default_county = w_severe_wx_county->index(); progStatus.swx_index_default_state = w_severe_wx_state->index(); progStatus.swx_default_city = w_severe_wx_city->value(); progStatus.swx_default_zone = w_severe_wx_zone->value(); } static void cb_use_default(Fl_Button*, void*) { w_severe_wx_state->index(progStatus.swx_index_default_state); set_severe_wx_counties(progStatus.swx_index_default_state); w_severe_wx_county->index(progStatus.swx_index_default_county); w_severe_wx_city->value(progStatus.swx_default_city.c_str()); w_severe_wx_zone->value(progStatus.swx_default_zone.c_str()); } void severe_wx_changed(Fl_Widget *, void *) { estimate(); } void cb_state(Fl_Widget *, void *) { int n = w_severe_wx_state->index(); set_severe_wx_counties(n); estimate(); } void cb_hail_changed(Fl_Widget *, void *) { w_severe_wx_hail_size->index(0); if (w_severe_wx_hail->value()) w_severe_wx_hail_size->activate(); else w_severe_wx_hail_size->deactivate(); } void create_severe_wx_tab() { int Y = tab_top; tab_severe_wx = new Fl_Group(0, Y, 570, 390, "tab_severe_wx"); tab_severe_wx->begin(); tab_severe_wx->copy_label(""); tab_severe_wx->align(FL_ALIGN_INSIDE); tab_severe_wx_type = new Fl_Tabs(0, Y+2, 570, 387, "wx_tabs"); tab_severe_wx_type->selection_color((Fl_Color)246); tab_severe_wx_type->copy_label(""); tab_severe_wx_type->align(FL_ALIGN_INSIDE); tab_severe_wx_1 = new Fl_Group(0, Y+25, 570, 360, "Report"); tab_severe_wx_1->begin(); Y += 35; w_severe_wx_date = new Fl_DateInput(50, Y, 140, 22, _("Date")); w_severe_wx_date->tooltip(_("Observation date : month/day/year")); w_severe_wx_date->callback(severe_wx_changed); w_severe_wx_date->box(FL_DOWN_BOX); w_severe_wx_date->color((Fl_Color)FL_BACKGROUND2_COLOR); w_severe_wx_date->selection_color((Fl_Color)FL_SELECTION_COLOR); w_severe_wx_date->labeltype(FL_NORMAL_LABEL); w_severe_wx_date->labelfont(0); w_severe_wx_date->labelsize(14); w_severe_wx_date->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); w_severe_wx_date->when(FL_WHEN_RELEASE); w_severe_wx_date->align(FL_ALIGN_LEFT); w_severe_wx_date->local_datetime(); w_severe_wx_time = new Fl_Input2(230, Y, 60, 22, _("Time")); w_severe_wx_time->tooltip(_("Observation time : HHMM")); w_severe_wx_time->callback(severe_wx_changed); w_severe_wx_time->when(FL_WHEN_RELEASE); w_severe_wx_time->align(FL_ALIGN_LEFT); w_severe_wx_btn_time = new Fl_Button(292, Y, 22, 22, _("...")); w_severe_wx_btn_time->tooltip(_("Current local time")); w_severe_wx_btn_time->callback((Fl_Callback*)cb_btn_time); w_severe_wx_zone = new Fl_ListBox(316, Y, 80, 22, "Zone"); w_severe_wx_zone->copy_label(_("")); w_severe_wx_zone->align(FL_ALIGN_TOP || FL_ALIGN_INSIDE); w_severe_wx_zone->tooltip(_("Time Zone, ie: EDT")); w_severe_wx_zone->when(FL_WHEN_RELEASE); w_severe_wx_zone->align(FL_ALIGN_RIGHT); for (int n = 0; n < num_us_tzones; n++) w_severe_wx_zone->add(us_tzones[n].c_str()); w_severe_wx_zone->callback(severe_wx_changed); w_severe_wx_exact = new Fl_Check_Button(410, Y, 22, 22, ""); w_severe_wx_exact->copy_label(_("Meas.")); w_severe_wx_exact->tooltip(_("Date time exact")); w_severe_wx_exact->callback((Fl_Callback*)cb_exact); w_severe_wx_not_exact = new Fl_Check_Button(480, Y, 22, 22, ""); w_severe_wx_not_exact->copy_label(_("Est.")); w_severe_wx_not_exact->tooltip(_("Date time estimated")); w_severe_wx_not_exact->callback((Fl_Callback*)cb_not_exact); Y += 25; w_severe_wx_state = new Fl_ListBox(50, Y, 200, 22, "State"); w_severe_wx_state->copy_label(_("State")); w_severe_wx_state->tooltip(_("Select state / territory")); w_severe_wx_state->align(FL_ALIGN_LEFT); w_severe_wx_state->when(FL_WHEN_RELEASE); w_severe_wx_state->callback((Fl_Callback*)cb_state); w_severe_wx_county = new Fl_ListBox(315, Y, 240, 22, "County"); w_severe_wx_county->copy_label(_("County")); w_severe_wx_county->tooltip(_("Select county")); w_severe_wx_county->align(FL_ALIGN_LEFT); w_severe_wx_county->when(FL_WHEN_RELEASE); w_severe_wx_county->callback((Fl_Callback*)severe_wx_changed); Y += 25; w_severe_wx_city = new Fl_Input2(50, Y, 250, 22, "City"); w_severe_wx_city->copy_label(_("City")); w_severe_wx_city->tooltip(_("Enter city/town")); w_severe_wx_city->align(FL_ALIGN_LEFT); w_severe_wx_city->when(FL_WHEN_RELEASE); w_severe_wx_city->callback((Fl_Callback*)severe_wx_changed); make_default = new Fl_Button(410, Y, 70, 24, _("Store")); make_default->tooltip(_("Store state/county/city/time-zone as default")); make_default->callback((Fl_Callback*)cb_make_default); use_default = new Fl_Button(485, Y, 70, 24, _("Default")); use_default->tooltip(_("Use default state/county/city/time-zone")); use_default->callback((Fl_Callback*)cb_use_default); Y += 35; w_severe_wx_tornado = new Fl_Check_Button(50, Y, 150, 22, _("Tornado")); w_severe_wx_tornado->tooltip(_("Report tornado sighting")); w_severe_wx_tornado->callback((Fl_Callback*)severe_wx_changed); Y += 25; w_severe_wx_funnel_cloud = new Fl_Check_Button(50, Y, 150, 22, _("Funnel cloud")); w_severe_wx_funnel_cloud->tooltip(_("Report funnel cloud sighting")); w_severe_wx_funnel_cloud->callback((Fl_Callback*)severe_wx_changed); Y += 25; w_severe_wx_wall_cloud = new Fl_Check_Button(50, Y, 150, 22, _("Wall cloud")); w_severe_wx_wall_cloud->tooltip(_("Report wall cloud sighting")); w_severe_wx_wall_cloud->callback((Fl_Callback*)severe_wx_changed); Fl_Group lbl1(200, Y, 200, 22, _("Note if there is rotation in narrative")); lbl1.begin(); lbl1.box(FL_FLAT_BOX); lbl1.end(); Y += 25; w_severe_wx_hail = new Fl_Check_Button(50, Y, 150, 22, _("Hail")); w_severe_wx_hail->tooltip(_("Report incidence of hail")); w_severe_wx_hail->callback((Fl_Callback*)cb_hail_changed); w_severe_wx_hail_size = new Fl_ListBox(150, Y, 150, 22, "hail size"); w_severe_wx_hail_size->copy_label(_("Size")); w_severe_wx_hail_size->align(FL_ALIGN_LEFT); w_severe_wx_hail_size->when(FL_WHEN_RELEASE); w_severe_wx_hail_size->callback((Fl_Callback*)severe_wx_changed); w_severe_wx_hail_size->deactivate(); Y += 25; w_severe_wx_high_wind = new Fl_Check_Button(50, Y, 60, 22, _("High Wind")); w_severe_wx_high_wind->tooltip(_("Report high winds")); w_severe_wx_high_wind->callback((Fl_Callback*)severe_wx_changed); w_severe_wx_wind_speed = new Fl_Input2(150, Y, 50, 22, _("MPH")); w_severe_wx_wind_speed->align(FL_ALIGN_RIGHT); w_severe_wx_wind_speed->tooltip(_("Enter wind speed")); w_severe_wx_wind_speed->callback((Fl_Callback*)severe_wx_changed); w_severe_wx_measured = new Fl_Check_Button(250, Y, 50, 22, _("Meas'")); w_severe_wx_measured->tooltip(_("Winds were measured")); w_severe_wx_measured->value(0); w_severe_wx_measured->callback((Fl_Callback*)cb_severe_wx_measured); w_severe_wx_estimated = new Fl_Check_Button(325, Y, 50, 22, _("Est'")); w_severe_wx_estimated->tooltip(_("Winds are estimated")); w_severe_wx_estimated->value(1); w_severe_wx_estimated->callback((Fl_Callback*)cb_severe_wx_estimated); Y += 25; w_severe_wx_flood = new Fl_Check_Button(50, Y, 80, 22, _("Flood")); w_severe_wx_flood->tooltip(_("Report flooding")); w_severe_wx_flood->callback((Fl_Callback*)severe_wx_changed); Y += 25; w_severe_wx_flash_flood = new Fl_Check_Button(50, Y, 80, 22, _("Flash Flood")); w_severe_wx_flash_flood->tooltip(_("Report flash flooding")); w_severe_wx_flash_flood->callback((Fl_Callback*)severe_wx_changed); w_severe_wx_dmg_yes = new Fl_Check_Button(350, Y, 22, 22, _("Any damage? Yes ")); w_severe_wx_dmg_yes->align(FL_ALIGN_LEFT); w_severe_wx_dmg_yes->tooltip(""); w_severe_wx_dmg_yes->callback((Fl_Callback*)cb_dmg_yes); w_severe_wx_dmg_no = new Fl_Check_Button(400, Y, 22, 22, _("No ")); w_severe_wx_dmg_no->align(FL_ALIGN_LEFT); w_severe_wx_dmg_no->tooltip(""); w_severe_wx_dmg_no->value(1); w_severe_wx_dmg_no->callback((Fl_Callback*)cb_dmg_no); Y += 25; w_severe_wx_other = new Fl_Check_Button(50, Y, 80, 22, _("Other")); w_severe_wx_other->tooltip(_("Report other in narrative")); w_severe_wx_other->callback((Fl_Callback*)severe_wx_changed); w_severe_wx_inj_yes = new Fl_Check_Button(350, Y, 22, 22, _("Any injuries? Yes ")); w_severe_wx_inj_yes->align(FL_ALIGN_LEFT); w_severe_wx_inj_yes->tooltip(""); w_severe_wx_inj_yes->callback((Fl_Callback*)cb_inj_yes); w_severe_wx_inj_no = new Fl_Check_Button(400, Y, 22, 22, _("No ")); w_severe_wx_inj_no->align(FL_ALIGN_LEFT); w_severe_wx_inj_no->tooltip(""); w_severe_wx_inj_no->value(1); w_severe_wx_inj_no->callback((Fl_Callback*)cb_inj_no); tab_severe_wx_1->end(); Y = tab_top; tab_severe_wx_2 = new Fl_Group(0, Y+25, 570, 360, "Narrative"); tab_severe_wx_2->begin(); Y += 35; w_severe_wx_narrative = new FTextEdit(5, Y, 560, 340, _("")); tab_severe_wx_2->end(); tab_severe_wx->end(); set_severe_wx_combos(); tab_severe_wx->hide(); }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/storm_report.cxx����������������������������������������������������������������0000664�0001750�0001750�00000064100�12330516146�014337� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "combo.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> #include "wx_strings.h" string buffstorm; string def_storm_filename = ""; string base_storm_filename = ""; string def_storm_TemplateName = ""; string storm_date; string storm_time; string storm_zone; string storm_state; string storm_county; string storm_location; bool storm_tornado; string storm_tornado_cat; bool storm_hail; string storm_hail_size; bool storm_wind; string storm_wind_cat; bool storm_flood; string storm_flood_cat; bool storm_damage; string storm_damage_cat; bool storm_snow; string storm_snow_tot; string storm_snow_dur; bool storm_f_rain; string storm_f_rain_tot; string storm_f_rain_dur; bool storm_h_rain; string storm_h_rain_tot; string storm_h_rain_dur; string storm_o_name; string storm_o_email; string storm_o_tele; string storm_o_profile; string storm_details; // could not use real names ... WIN32 barfs enum STORM_QTYPE { B, D, S, M, T, I, F, C, O, E }; // bool, string, multi-line string, text, int, float, character, cOmbo, empty struct STORM_QUAD { STORM_QTYPE qtype; // type of field string html_fld; void *ptr; Fl_Widget *widget; }; STORM_QUAD sQ[] = { { D, ":date:", &storm_date, w_storm_date }, { S, ":time:", &storm_time, w_storm_time }, { O, ":zone:", &storm_zone, w_storm_zone }, { O, ":state:", &storm_state, w_storm_state }, { O, ":county:", &storm_county, w_storm_county }, { S, ":location:", &storm_location, w_storm_location }, { B, ":tornado:", &storm_tornado, w_storm_tornado }, { O, ":tornado_cat:", &storm_tornado_cat, w_storm_tornado_cat }, { B, ":hail:", &storm_hail, w_storm_hail }, { O, ":hail_size:", &storm_hail_size, w_storm_hail_size }, { B, ":high_wind:", &storm_wind, w_storm_wind }, { O, ":speed:", &storm_wind_cat, w_storm_wind_cat }, { B, ":flood:", &storm_flood, w_storm_flood }, { O, ":flood_cat:", &storm_flood_cat, w_storm_flood_cat }, { B, ":damage:", &storm_damage, w_storm_damage }, { O, ":damage_cat:", &storm_damage_cat, w_storm_damage_cat }, { B, ":snow:", &storm_snow, w_storm_snow }, { O, ":snow_tot:", &storm_snow_tot, w_storm_snow_tot }, { O, ":snow_dur:", &storm_snow_dur, w_storm_snow_dur }, { B, ":f_rain:", &storm_f_rain, w_storm_f_rain }, { O, ":f_rain_tot:", &storm_f_rain_tot, w_storm_f_rain_tot }, { O, ":f_rain_dur:", &storm_f_rain_dur, w_storm_f_rain_dur }, { B, ":h_rain:", &storm_h_rain, w_storm_h_rain }, { O, ":h_rain_tot:", &storm_h_rain_tot, w_storm_h_rain_tot }, { O, ":h_rain_dur:", &storm_h_rain_dur, w_storm_h_rain_dur }, { S, ":o_name:", &storm_o_name, w_storm_o_name }, { S, ":o_email:", &storm_o_email, w_storm_o_email }, { S, ":o_tele:", &storm_o_tele, w_storm_o_tele }, { O, ":o_profile:", &storm_o_profile, w_storm_o_profile }, { T, ":details:", &storm_details, w_storm_details } }; int num_quads = (int)(sizeof(sQ) / sizeof(STORM_QUAD)); bool using_storm_template = false; //------------------------------------------------------------------------------ // required to initialize the control pointers in the QUAD array //------------------------------------------------------------------------------ static bool fields_initialized = false; static void init_widget(string s, Fl_Widget * w) { for (int i = 0; i < num_quads; i++) { if (sQ[i].html_fld == s) { sQ[i].widget = w; break; } } } static void init_widgets() { init_widget(":date:", (Fl_Widget *)w_storm_date); init_widget(":time:", (Fl_Widget *)w_storm_time); init_widget(":zone:", (Fl_Widget *)w_storm_zone); init_widget(":state:", (Fl_Widget *)w_storm_state); init_widget(":county:", (Fl_Widget *)w_storm_county); init_widget(":location:", (Fl_Widget *)w_storm_location); init_widget(":flood:", (Fl_Widget *)w_storm_flood); init_widget(":flood_cat:", (Fl_Widget *)w_storm_flood_cat); init_widget(":hail:", (Fl_Widget *)w_storm_hail); init_widget(":hail_size:", (Fl_Widget *)w_storm_hail_size); init_widget(":high_wind:", (Fl_Widget *)w_storm_wind); init_widget(":speed:", (Fl_Widget *)w_storm_wind_cat); init_widget(":tornado:", (Fl_Widget *)w_storm_tornado); init_widget(":tornado_cat:", (Fl_Widget *)w_storm_tornado_cat); init_widget(":damage:", (Fl_Widget *)w_storm_damage); init_widget(":damage_cat:", (Fl_Widget *)w_storm_damage_cat); init_widget(":snow:", (Fl_Widget *)w_storm_snow); init_widget(":snow_tot:", (Fl_Widget *)w_storm_snow_tot); init_widget(":snow_dur:", (Fl_Widget *)w_storm_snow_dur); init_widget(":f_rain:", (Fl_Widget *)w_storm_f_rain); init_widget(":f_rain_tot:", (Fl_Widget *)w_storm_f_rain_tot); init_widget(":f_rain_dur:", (Fl_Widget *)w_storm_f_rain_dur); init_widget(":h_rain:", (Fl_Widget *)w_storm_h_rain); init_widget(":h_rain_tot:", (Fl_Widget *)w_storm_h_rain_tot); init_widget(":h_rain_dur:", (Fl_Widget *)w_storm_h_rain_dur); init_widget(":o_name:", (Fl_Widget *)w_storm_o_name); init_widget(":o_email:", (Fl_Widget *)w_storm_o_email); init_widget(":o_tele:", (Fl_Widget *)w_storm_o_tele); init_widget(":o_profile:", (Fl_Widget *)w_storm_o_profile); init_widget(":details:", (Fl_Widget *)w_storm_details); fields_initialized = true; } //------------------------------------------------------------------------------ // bool, string, multi-line string, text, int, float, character, cOmbo, empty //enum STORM_QTYPE { B, D, S, M, T, I, F, C, O, E }; static void clearQUAD() { for (int i = 0; i < num_quads; i++) { switch (sQ[i].qtype) { case B : (*(bool *)(sQ[i].ptr)) = false; break; case S : case D : case M : ((string *)(sQ[i].ptr))->clear(); break; case T : ((string *)(sQ[i].ptr))->clear(); break; case C : (*(char *)(sQ[i].ptr)) = ' '; break; case I : (*(int *)(sQ[i].ptr)) = 0; break; case F : (*(float *)(sQ[i].ptr)) = 0.0; break; case O : ((string *)(sQ[i].ptr))->clear(); break; case E : return; } } } void clear_stormfields() { if (!fields_initialized) init_widgets(); clearQUAD(); } static bool checkQUAD() { float f = 0; char c = ' '; for (int i = 0; i < num_quads; i++) { switch (sQ[i].qtype) { case B: if (*((bool *)(sQ[i].ptr)) != ((Fl_Check_Button *)sQ[i].widget)->value()){ return true; } break; case S: case M: if (*((string *)(sQ[i].ptr)) != ((Fl_Input2 *)sQ[i].widget)->value()){ return true; } break; case D: if (*((string *)(sQ[i].ptr)) != ((Fl_DateInput *)sQ[i].widget)->value()){ return true; } break; case T: if (*((string *)(sQ[i].ptr)) != ((FTextEdit *)sQ[i].widget)->buffer()->text()){ return true; } break; case C: c = ' '; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) c = ((Fl_Input2 *)sQ[i].widget)->value()[0]; if (*((char *)(sQ[i].ptr)) != c){ return true; } break; case I: i = 0; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) sscanf( ((Fl_Input2 *)sQ[i].widget)->value(), "%d", &i); if (*((int *)(sQ[i].ptr)) != i){ return true; } break; case F: f = 0; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) sscanf( ((Fl_Input2 *)sQ[i].widget)->value(), "%f", &f); if (*((float *)(sQ[i].ptr)) != f) { return true; } break; case O: if (((Fl_ListBox *)sQ[i].widget)->index() == 0) break; if (*((string *)(sQ[i].ptr)) != ((Fl_ListBox *)sQ[i].widget)->value()) { return true; } break; case E: default: return false; } } return false; } bool check_stormfields() { return checkQUAD(); } static void updateQUAD() { float f = 0; char c = ' '; for (int i = 0; i < num_quads; i++) { switch (sQ[i].qtype) { case B: *((bool *)(sQ[i].ptr)) = ((Fl_Check_Button *)sQ[i].widget)->value(); break; case S: case M: *((string *)(sQ[i].ptr)) = ((Fl_Input2 *)sQ[i].widget)->value(); break; case D: *((string *)(sQ[i].ptr)) = ((Fl_DateInput *)sQ[i].widget)->value(); break; case O: { string s = ((Fl_ListBox *)sQ[i].widget)->value(); if (s.find("--") == 0) ((string *)(sQ[i].ptr))->clear(); else *((string *)(sQ[i].ptr)) = ((Fl_ListBox *)sQ[i].widget)->value(); } break; case T: *((string *)(sQ[i].ptr)) = ((FTextEdit *)sQ[i].widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) c = ((Fl_Input2 *)sQ[i].widget)->value()[0]; *((char *)(sQ[i].ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) sscanf( ((Fl_Input2 *)sQ[i].widget)->value(), "%d", &i); *((int *)(sQ[i].ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)sQ[i].widget)->value()[0]) sscanf( ((Fl_Input2 *)sQ[i].widget)->value(), "%f", &f); *((float *)(sQ[i].ptr)) = f; break; case E: default: return; } } } void update_stormfields() { if (!fields_initialized) init_widgets(); updateQUAD(); } static void activate_listbox() { if (w_storm_flood->value()) w_storm_flood_cat->activate(); else w_storm_flood_cat->deactivate(); if (w_storm_hail->value()) w_storm_hail_size->activate(); else w_storm_hail_size->deactivate(); if (w_storm_wind->value()) w_storm_wind_cat->activate(); else w_storm_wind_cat->deactivate(); if (w_storm_tornado->value()) w_storm_tornado_cat->activate(); else w_storm_tornado_cat->deactivate(); if (w_storm_damage->value()) w_storm_damage_cat->activate(); else w_storm_damage_cat->deactivate(); if (w_storm_snow->value()) { w_storm_snow_tot->activate(); w_storm_snow_dur->activate(); } else { w_storm_snow_tot->deactivate(); w_storm_snow_dur->deactivate(); } if (w_storm_f_rain->value()) { w_storm_f_rain_tot->activate(); w_storm_f_rain_dur->activate(); } else { w_storm_f_rain_tot->deactivate(); w_storm_f_rain_dur->deactivate(); } if (w_storm_h_rain->value()) { w_storm_h_rain_tot->activate(); w_storm_h_rain_dur->activate(); } else { w_storm_h_rain_tot->deactivate(); w_storm_h_rain_dur->deactivate(); } } static void updateFORM() { char val[20]; for (int i = 0; i < num_quads; i++ ) { switch (sQ[i].qtype) { case B: ((Fl_Check_Button *)sQ[i].widget)->value(*((bool *)(sQ[i].ptr))); break; case S: case M: ((Fl_Input2 *)sQ[i].widget)->value(((string *)(sQ[i].ptr))->c_str()); break; case D: ((Fl_DateInput *)sQ[i].widget)->value(((string *)(sQ[i].ptr))->c_str()); break; case O: if (((string *)(sQ[i].ptr))->empty()) ((Fl_ListBox *)sQ[i].widget)->index(0); else ((Fl_ListBox *)sQ[i].widget)->put_value(((string *)(sQ[i].ptr))->c_str()); break; case T: ((FTextEdit *)sQ[i].widget)->clear(); ((FTextEdit *)sQ[i].widget)->add(((string *)(sQ[i].ptr))->c_str()); break; case C: val[0] = *((char *)(sQ[i].ptr)); val[1] = 0; ((Fl_Input2 *)sQ[i].widget)->value(val); break; case I: if (*((int *)(sQ[i].ptr)) == 0) ((Fl_Input2 *)sQ[i].widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(sQ[i].ptr))); ((Fl_Input2 *)sQ[i].widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(sQ[i].ptr))); ((Fl_Input2 *)sQ[i].widget)->value(val); break; case E: default: return; } } } void update_stormform() { if (!fields_initialized) init_widgets(); updateFORM(); activate_listbox(); } void clear_storm_form() { clear_stormfields(); update_stormform(); w_storm_state->index(0); set_storm_counties(0); w_storm_o_profile->index(0); w_storm_location->index(0); w_storm_zone->index(0); } static string mbuff; static void make_buffQUAD() { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; for (int i = 0; i < num_quads; i++) { switch (sQ[i].qtype) { case B: if (*((bool *)(sQ[i].ptr)) == true) mbuff.append( lineout( sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? one : zero)); break; case O: case S: case D: case M: if (((string *)(sQ[i].ptr))->length()) mbuff.append( lineout( sQ[i].html_fld, *((string *)(sQ[i].ptr)))); break; case T: mbuff.append( lineout( sQ[i].html_fld, *((string *)(sQ[i].ptr)))); break; case C: if ((*(char *)(sQ[i].ptr)) != 0 && *((char *)(sQ[i].ptr)) != ' ') { sval = " "; sval[0] = *((char *)(sQ[i].ptr)); mbuff.append( lineout( sQ[i].html_fld, sval)); } break; case I: if (*((int*)(sQ[i].ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(sQ[i].ptr)) ); sval = szval; mbuff.append( lineout( sQ[i].html_fld, sval) ); } break; case F: if (*((float *)(sQ[i].ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(sQ[i].ptr))); sval = szval; mbuff.append( lineout( sQ[i].html_fld, sval) ); } break; case E: default: return; } } } void make_buff_storm(bool compress = false) { mbuff.clear(); make_buffQUAD(); if (compress) compress_maybe(mbuff); buffstorm.append(mbuff); } static void readQUAD(string data) { float f; for (int i = 0; i < num_quads; i++) { switch (sQ[i].qtype) { case B: *((bool *)(sQ[i].ptr)) = (findstr( data, sQ[i].html_fld ) == "1"); break; case D: case O: case S: case M: *((string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld ); break; case T: *((string *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld ); break; case C: *((char *)(sQ[i].ptr)) = findstr( data, sQ[i].html_fld )[0]; break; case I: i = 0; sscanf( findstr( data, sQ[i].html_fld ).c_str(), "%d", &i); *((int *)(sQ[i].ptr)) = i; break; case F: f = 0; sscanf( findstr( data, sQ[i].html_fld ).c_str(), "%f", &f); *((float *)(sQ[i].ptr)) = f; break; case E: default: return; } } } void read_storm_buffer(string data) { clear_stormfields(); read_header(data); readQUAD (data); update_stormform(); int idx = w_storm_state->index(); set_storm_counties(idx); w_storm_county->value( ((string *)(sQ[4].ptr))->c_str() ); } void cb_storm_new() { if (check_stormfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_storm_save(); } } clear_storm_form(); clear_header(); def_storm_filename = ICS_msg_dir; def_storm_filename.append("new"FSTRM_EXT); show_filename(def_storm_filename); using_storm_template = false; } void cb_storm_import() { fl_alert2("Not implemented"); } void cb_storm_export() { fl_alert2("Not implemented"); } void cb_storm_wrap_import(string wrapfilename, string inpbuffer) { clear_storm_form(); read_storm_buffer(inpbuffer); def_storm_filename = ICS_msg_dir; def_storm_filename.append(wrapfilename); show_filename(def_storm_filename); using_storm_template = false; } int eval_storm_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_storm_filename).append("]"); update_stormfields(); update_header(FROM); evalstr.append(header("<storm_wx>")); buffstorm.clear(); make_buff_storm(true); if (buffstorm.empty()) return 0; compress_maybe( buffstorm ); evalstr.append( buffstorm ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_storm_wrap_export() { if (check_stormfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_stormfields(); if (base_storm_filename == "new"FSTRM_EXT || base_storm_filename == "default"FSTRM_EXT) if (!cb_storm_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_storm_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffstorm.assign(header("<storm_wx>")); make_buff_storm(true); export_wrapfile(base_storm_filename, wrapfilename, buffstorm, pext != ".wrap"); buffstorm.assign(header("<storm_wx>")); make_buff_storm(false); write_storm(def_storm_filename); } } void cb_storm_wrap_autosend() { if (check_stormfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_stormfields(); if (base_storm_filename == "new"FSTRM_EXT || base_storm_filename == "default"FSTRM_EXT) if (!cb_storm_save_as()) return; update_header(FROM); buffstorm.assign(header("<storm_wx>")); make_buff_storm(true); xfr_via_socket(base_storm_filename, buffstorm); buffstorm.assign(header("<storm_wx>")); make_buff_storm(false); write_storm(def_storm_filename); } void cb_storm_load_template() { string def_storm_filename = def_storm_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TSTRM_EXT, def_storm_filename.c_str()); if (p) { clear_storm_form(); read_data_file(p); def_storm_TemplateName = p; show_filename(def_storm_TemplateName); using_storm_template = true; } } void cb_storm_save_template() { if (!using_storm_template) { cb_storm_save_as_template(); return; } string def_storm_filename = def_storm_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TSTRM_EXT, def_storm_filename.c_str()); if (p) { update_header(CHANGED); update_stormfields(); buffstorm.assign(header("<storm_wx>")); make_buff_storm(); write_storm(p); } } void cb_storm_save_as_template() { string def_storm_filename = def_storm_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TSTRM_EXT, def_storm_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_storm_TemplateName = p; if (strlen(pext) == 0) def_storm_TemplateName.append(TSTRM_EXT); remove_spaces_from_filename(def_storm_TemplateName); clear_header(); update_header(CHANGED); update_stormfields(); buffstorm.assign(header("<storm_wx>")); make_buff_storm(); write_storm(def_storm_TemplateName); show_filename(def_storm_TemplateName); using_storm_template = true; } } void cb_storm_open() { const char *p = FSEL::select(_("Open data file"), "ICS-storm\t*"FSTRM_EXT, def_storm_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_storm_form(); read_data_file(p); using_storm_template = false; def_storm_filename = p; show_filename(def_storm_filename); } void write_storm(string s) { FILE *filestorm = fopen(s.c_str(), "w"); if (!filestorm) return; fwrite(buffstorm.c_str(), buffstorm.length(), 1, filestorm); fclose(filestorm); } bool cb_storm_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FSTRM_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_storm_filename; p = FSEL::saveas(_("Save data file"), "ICS-storm\t*"FSTRM_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_storm_filename = p; if (strlen(pext) == 0) def_storm_filename.append(FSTRM_EXT); remove_spaces_from_filename(def_storm_filename); update_header(NEW); update_stormfields(); buffstorm.assign(header("<storm_wx>")); make_buff_storm(); write_storm(def_storm_filename); using_storm_template = false; show_filename(def_storm_filename); return true; } void cb_storm_save() { if (base_storm_filename == "new"FSTRM_EXT || base_storm_filename == "default"FSTRM_EXT || using_storm_template == true) { cb_storm_save_as(); return; } if (check_stormfields()) update_header(CHANGED); update_stormfields(); buffstorm.assign(header("<storm_wx>")); make_buff_storm(); write_storm(def_storm_filename); using_storm_template = false; } static string X = "x"; string SP = "_"; static string sval = " "; static string del = ""; static void quad_to_html(string &target) { char szval[20]; for (int i = 0; i < num_quads; i++) { if (sQ[i].qtype == B) replacestr(target, sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? X : SP); else if (sQ[i].qtype == O ) { string s = *((string *)(sQ[i].ptr)); if (sQ[i].html_fld == ":state:") { if (s.length() > 1) s.erase(2); replacestr(target, sQ[i].html_fld, s); } else if (sQ[i].html_fld == ":zone") { size_t cp = s.find(','); s.erase(cp); replacestr(target, sQ[i].html_fld, s); } else if (s.find("--") == 0) { replacestr(target, sQ[i].html_fld, del); } else { if (s.length()) replacestr(target, sQ[i].html_fld, s); else replacestr(target, sQ[i].html_fld, del); } } else if (sQ[i].qtype == S || sQ[i].qtype == M || sQ[i].qtype == D) { if (((string *)(sQ[i].ptr))->length()) replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr))); else replacestr(target, sQ[i].html_fld, del); } else if (sQ[i].qtype == M) { sval = *((string *)(sQ[i].ptr)); size_t np = string::npos; while ( (np = sval.find("\n")) != string::npos) sval.replace(np, 1, "<br>"); replacestr(target, sQ[i].html_fld, sval); } else if (sQ[i].qtype == T) replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr))); else if (sQ[i].qtype == C) { sval = " "; sval[0] = *((char *)(sQ[i].ptr)); replacestr(target, sQ[i].html_fld, sval); } else if (sQ[i].qtype == I) { if (*((int *)(sQ[i].ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(sQ[i].ptr)) ); sval = szval; } else sval.clear(); replacestr(target, sQ[i].html_fld, sval); } else if (sQ[i].qtype == F) { if (*((float *)(sQ[i].ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(sQ[i].ptr))); sval = szval; } else sval.clear(); replacestr(target, sQ[i].html_fld, sval); } } } void cb_storm_html() { string name_name = fl_filename_name(def_storm_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string storm_rptsta = ICS_dir; storm_rptsta.append(name_name); storm_rptsta.append(".html"); update_stormfields(); string formstorm = storm_html_template; replacestr(formstorm, TITLE, name_name); quad_to_html (formstorm); FILE *filestorm = fopen(storm_rptsta.c_str(), "w"); fprintf(filestorm,"%s", formstorm.c_str()); fclose(filestorm); open_url(storm_rptsta.c_str()); } static void quad_to_text( string &target) { char szval[20]; for (int i = 0; i < num_quads; i++) { if (sQ[i].qtype == B) replacestr(target, sQ[i].html_fld, *((bool *)(sQ[i].ptr)) ? X : del); else if (sQ[i].qtype == O ) { string s = *((string *)(sQ[i].ptr)); if (sQ[i].html_fld == ":state:") { if (s.length() > 1) s.erase(2); replacestr(target, sQ[i].html_fld, s); } else if (sQ[i].html_fld == ":zone") { size_t cp = s.find(','); s.erase(cp); replacestr(target, sQ[i].html_fld, s); } else if (s.find("--") == 0) { replacestr(target, sQ[i].html_fld, del); } else { if (s.length()) replacestr(target, sQ[i].html_fld, s); else replacestr(target, sQ[i].html_fld, del); } } else if (sQ[i].qtype == S || sQ[i].qtype == M || sQ[i].qtype == D) { if (((string *)(sQ[i].ptr))->length()) replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr))); else replacestr(target, sQ[i].html_fld, del); } else if (sQ[i].qtype == T) { if (((string *)(sQ[i].ptr))->length()) replacestr(target, sQ[i].html_fld, *((string *)(sQ[i].ptr))); else replacestr(target, sQ[i].html_fld, del); } else if (sQ[i].qtype == C) { sval = " "; sval[0] = *((char *)(sQ[i].ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, sQ[i].html_fld, sval); else replacestr(target, sQ[i].html_fld, del); } else if (sQ[i].qtype == I) { if (*((int *)(sQ[i].ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(sQ[i].ptr)) ); sval = szval; replacestr(target, sQ[i].html_fld, sval); } else replacestr(target, sQ[i].html_fld, del); } else if (sQ[i].qtype == F) { if (*((float *)(sQ[i].ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(sQ[i].ptr))); sval = szval; replacestr(target, sQ[i].html_fld, sval); } else replacestr(target, sQ[i].html_fld, del); } } } void cb_storm_textout() { string storm_rptsta = ICS_dir; storm_rptsta.append("storm.txt"); update_stormfields(); string formstorm = storm_text_template; quad_to_text (formstorm); FILE *filestorm = fopen(storm_rptsta.c_str(), "w"); fprintf(filestorm,"%s", formstorm.c_str()); fclose(filestorm); open_url(storm_rptsta.c_str()); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/storm_report_template.cxx�������������������������������������������������������0000664�0001750�0001750�00000015327�12330516146�016241� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char storm_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head>\n\ <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\ <title>Flmsg NWS - Storm Report</title>\n\ </head>\n\ \n\ <body>\n\ <div align=\"center\">\n\ <table style=\"width: 600px;\" border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td align=\"center\" bgcolor=\"#ffcc99\" valign=\"middle\">\n\ <div align=\"center\"><b>'Flmsg' Storm Report</b></div>\n\ </td>\n\ </tr>\n\ \n\ <tr>\n\ <td class=\"ODD\" valign=\"middle\">\n\ <table style=\"width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n\ <tbody>\n\ <tr align=\"left\">\n\ <td style=\"left;width: 25%\">Event Time</td><td style=\"left;width: 25%\">:time: :zone:</td>\n\ <td style=\"left;width: 25%\">Event Date</td><td style=\"left;width: 25%\">:date:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ \n\ <tr>\n\ <td class=\"HIGHLIGHT\" align=\"center\" valign=\"top\">Event Location<br><br>\n\ <table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\">\n\ <tbody>\n\ <tr align=\"left\">\n\ <td style=\"left;width: 25%\">County</td><td>:county:, :state:</td>\n\ </tr>\n\ <tr align=\"left\">\n\ <td>Location</td><td>:location:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ \n\ <tr>\n\ <td class=\"HIGHLIGHT\" align=\"left\" valign=\"top\">Event Type<br><br>\n\ <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:flood:|<br></td>\n\ <td style=\"vertical-align: top;\">Flood<br></td>\n\ <td style=\"vertical-align: top;\">:flood_cat:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:hail:|<br></td>\n\ <td style=\"vertical-align: top;\">Hail<br></td>\n\ <td style=\"vertical-align: top;\">:hail_size:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:high_wind:|<br></td>\n\ <td style=\"vertical-align: top;\">High Wind Speed<br></td>\n\ <td style=\"vertical-align: top;\">:speed:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:tornado:|<br></td>\n\ <td style=\"vertical-align: top;\">Tornado/Funnel Cloud<br></td>\n\ <td style=\"vertical-align: top;\">:tornado_cat:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:damage:|<br></td>\n\ <td style=\"vertical-align: top;\">Wind Damage<br></td>\n\ <td style=\"vertical-align: top;\">:damage_cat:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:snow:|<br></td>\n\ <td style=\"vertical-align: top;\">Snow<br></td>\n\ <td style=\"vertical-align: top;\">:snow_tot:</td>\n\ <td style=\"vertical-align: top;\">:snow_dur:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:f_rain:|<br></td>\n\ <td style=\"vertical-align: top;\">Freezing Rain/Icing<br></td>\n\ <td style=\"vertical-align: top;\">:f_rain_tot:</td>\n\ <td style=\"vertical-align: top;\">:f_rain_dur:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:h_rain:|<br></td>\n\ <td style=\"vertical-align: top;\">Heavy Rain<br></td>\n\ <td style=\"vertical-align: top;\">:h_rain_tot:</td>\n\ <td style=\"vertical-align: top;\">:h_rain_dur:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ \n\ <table style=\"width: 600px;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td>\n\ <table style=\"width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tbody>\n\ <tr>\n\ <td>Additional Details<br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:details:</td>\n\ </tr>\n\ </tbody></table>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ \n\ <table style=\"width: 600px;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td>Contact Information</td>\n\ </tr>\n\ <tr>\n\ <td>\n\ <table style=\"width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top;width: 25%\">Your Name:<br></td>\n\ <td style=\"vertical-align: top;\">:o_name:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">E-mail address:<br></td>\n\ <td style=\"vertical-align: top;\">:o_email:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">Phone Number:<br></td>\n\ <td style=\"vertical-align: top;\">:o_tele:</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">Observer Profile:<br></td>\n\ <td style=\"vertical-align: top;\">:o_profile:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ \n\ </body>\n\ </html>\n\ "; const char storm_text_template[] = "'Flmsg' Storm Report\n\n\ Date.....................:date:\n\ Time.....................:time:\n\ Zone.....................:zone:\n\ State....................:state:\n\ County...................:county:\n\ location.................:location:\n\n\ Flood....................:flood:\n\ Flood Cat................:flood_cat:\n\ Hail.....................:hail:\n\ Hail size................:hail_size:\n\ High wind................:high_wind:\n\ Wind speed...............:speed:\n\ Tornado..................:tornado:\n\ Tornado Cat..............:tornado_cat:\n\ Wind damage..............:damage:\n\ Wind damage cat..........:damage_cat:\n\ Snow.....................:snow:\n\ Snow total...............:snow_tot:\n\ Snow duration............:snow_dur:\n\ Freezing rain/ice........:f_rain:\n\ Freezing rain/ice total..:f_rain_tot:\n\ Freezing rain/ice dura...:f_rain_dur:\n\ Heavy rain...............:h_rain:\n\ Heavy rain total.........:h_rain_tot:\n\ Heavy rain dura..........:h_rain_dur:\n\ Observer name............:o_name:\n\ Observer email...........:o_email:\n\ Observer tele............:o_tele:\n\ Observer profile.........:o_profile:\n\ Additional Details:\n\ :details:\n"; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/severe_wx_template.cxx����������������������������������������������������������0000664�0001750�0001750�00000017263�12330516146�015512� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char severe_wx_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html>\n\ <head>\n\ <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\ <title>Flmsg NWS - Severe Wx</title>\n\ </head>\n\ \n\ <body>\n\ <div align=\"center\">\n\ <table style=\"width: 600px; height: 700px;\" border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td align=\"center\" bgcolor=\"#ffcc99\" valign=\"middle\">\n\ <div align=\"center\">\n\ <strong>'Flmsg' Severe Weather Report</strong>\n\ <font color=\"#ffffff\"></font>\n\ </div>\n\ <font color=\"#ffffff\"></font>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td class=\"HIGHLIGHT\" valign=\"middle\">\n\ <div align=\"center\">Date &amp; Time</div>\n\ </td>\n\ </tr>\n\ </tbody>\n\ \n\ <tbody>\n\ <tr>\n\ <td class=\"ODD\" valign=\"middle\">\n\ <table style=\"width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n\ <tbody>\n\ <tr align=\"center\">\n\ <td>Date</td>\n\ <td>Time</td>\n\ <td style=\"width: 20px; right\">|:not_exact:|</td>\n\ <td><div align=\"left\">Estimated</div></td>\n\ </tr>\n\ <tr align=\"center\">\n\ <td>:date:</td>\n\ <td>:time: :zone:</td>\n\ <td style=\"width: 20px; right\">|:exact:|</td>\n\ <td><div align=\"left\">Exact</div></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td class=\"HIGHLIGHT\" align=\"center\" valign=\"top\">Location</td>\n\ </tr>\n\ <tr>\n\ <td class=\"ODD\" valign=\"top\">\n\ <table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\">\n\ <tbody>\n\ <tr>\n\ <td>County, State</td>\n\ <td>City/Town</td>\n\ </tr>\n\ <tr>\n\ <td>:county:, :state:<br></td>\n\ <td>:city:<br></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td class=\"HIGHLIGHT\" align=\"center\" valign=\"top\">Weather<br>\n\ <table style=\"text-align: left; width: 100%;\" \n\ border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; width: 24px; text-align: center;\">|:tornado:|<br></td>\n\ <td style=\"vertical-align: top;\">Tornado<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:funnel_cloud:|<br></td>\n\ <td style=\"vertical-align: top;\">Funnel Cloud<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:wall_cloud:|<br></td>\n\ <td style=\"vertical-align: top;\">Wall Cloud<br></td>\n\ <td style=\"vertical-align: top;\">Note if there is rotation in narrative<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:hail:|<br></td>\n\ <td style=\"vertical-align: top;\">Hail<br></td>\n\ <td style=\"vertical-align: top;\">\n\ <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: right; width: 25%;\">Size:&nbsp;<br></td>\n\ <td style=\"vertical-align: top; text-align: left;\">:hail_size:<br></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:high_wind:|<br></td>\n\ <td style=\"vertical-align: top;\">High Wind<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top; text-align: center;\">|:measured:|<br></td>\n\ <td style=\"vertical-align: top;\">Measured<br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:flood:|<br></td>\n\ <td style=\"vertical-align: top;\">Flood<br></td>\n\ <td style=\"vertical-align: top;\">Speed :speed: MPH</td>\n\ <td style=\"vertical-align: top; text-align: center;\">|:estimated:|<br></td>\n\ <td style=\"vertical-align: top;\">Estimated<br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:flash_flood:|<br></td>\n\ <td style=\"vertical-align: top;\">Flash Flood<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">|:other:|<br></td>\n\ <td style=\"vertical-align: top;\">Other<br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ <td style=\"vertical-align: top;\"><br></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <br>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td class=\"HIGHLIGHT\" align=\"center\" valign=\"top\">Damage, Injuries, Narrative</td>\n\ </tr>\n\ <tr>\n\ <td class=\"ODD\" valign=\"top\">\n\ <div align=\"center\">\n\ <table style=\"width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td align=\"right\">Any Damage?</td>\n\ <td style=\"vertical-align: top; width: 24px; left\">|:dmg_yes:|<br></td>\n\ <td align=\"center; left\">Yes</td>\n\ <td style=\"vertical-align: top; width: 24px; left\">|:dmg_no:|<br></td>\n\ <td align=\"center; left\">No</td>\n\ </tr>\n\ <tr>\n\ <td align=\"right\">Was Anyone Hurt?</td>\n\ <td style=\"vertical-align: top; left\">|:inj_yes:|<br></td>\n\ <td align=\"center; left\">Yes</td>\n\ <td style=\"vertical-align: top; left\">|:inj_no:|<br></td>\n\ <td align=\"center; left\">No</td>\n\ </tr>\n\ </tbody>\n\ </table><br>\n\ Please describe what you observed,movement and any associated damage, including injuries, 2500 characters maximum:\n\ <br><br>\n\ <table style=\"text-align: left; width: 100%; height: 300px;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:narrative:<br></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ </div>\n\ </td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ \n\ </div><br><br>\n\ <span style=\"color: white; font-size: 9px;\">50.51.5.206</span>\n\ </body>\n\ </html>\n\ "; const char severe_wx_text_template[] = "'Flmsg' Severe Weather Report\n\ Date: :date:\n\ Time: :time:\n\ Zone: :zone:\n\ Exact: :exact:\n\ Not exact: :not_exact:\n\ State: :state:\n\ County: :county:\n\ City: :city:\n\ Tornado: :tornado:\n\ Funnel Cloud: :funnel_cloud:\n\ Wall Cloud: :wall_cloud:\n\ Hail: :hail:\n\ Hail size: :hail_size:\n\ High wind: :high_wind:\n\ Wind speed: :speed:\n\ Estimated: :estimated:\n\ Measured: :measured:\n\ Flood: :flood:\n\ Flash flood: :flash_flood:\n\ Other: :other:\n\ Damages (yes): :dmg_yes:\n\ Damages (no): :dmg_no:\n\ Injuries (yes): :inj_yes:\n\ Injuries (no): :inj_no:\n\ Narrative:\n\ :narrative:\n"; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/wx/hurricane_tab.cxx���������������������������������������������������������������0000664�0001750�0001750�00000015622�12330516146�014413� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_wxhc = (Fl_Group *)0; Fl_Tabs *tab_wxhc_type = (Fl_Tabs *)0; Fl_Group *tab_wxhc_1 = (Fl_Group *)0; Fl_Input2 *w_wxhc_rptsta; Fl_Input2 *w_wxhc_email; Fl_Input2 *w_wxhc_phone; Fl_Input2 *w_wxhc_addr; Fl_Input2 *w_wxhc_city; Fl_Input2 *w_wxhc_state; Fl_Input2 *w_wxhc_country; Fl_Input2 *w_wxhc_lat; Fl_Input2 *w_wxhc_long; Fl_Input2 *w_wxhc_date; Fl_Input2 *w_wxhc_time; Fl_Check_Button *w_wxhc_meas; Fl_Check_Button *w_wxhc_est; Fl_Input2 *w_wxhc_wind_speed; Fl_ListBox *w_wxhc_wind_speed_units; Fl_Input2 *w_wxhc_wind_gusts; Fl_ListBox *w_wxhc_wind_gusts_units; Fl_ListBox *w_wxhc_wind_dir; Fl_Input2 *w_wxhc_wind_degrees; Fl_Input2 *w_wxhc_baro_press; Fl_ListBox *w_wxhc_baro_units; Fl_Group *tab_wxhc_2 = (Fl_Group *)0; FTextEdit *w_wxhc_comments; //---------------------------------------------------------------------- // widget callbacks & support //---------------------------------------------------------------------- static void cb_measured(Fl_Check_Button*, void*) { w_wxhc_est->value(!w_wxhc_meas->value()); } static void cb_estimated(Fl_Check_Button*, void*) { w_wxhc_meas->value(!w_wxhc_est->value()); } void wxhc_changed(Fl_Widget *, void *) { estimate(); } void create_wxhc_tab() { int Y = tab_top; tab_wxhc = new Fl_Group(0, Y, 570, 390); tab_wxhc->begin(); tab_wxhc->align(FL_ALIGN_TOP); tab_wxhc_type = new Fl_Tabs(0, Y+2, 570, 387); tab_wxhc_type->selection_color((Fl_Color)246); tab_wxhc_1 = new Fl_Group(0, Y+25, 570, 360, _("Report")); tab_wxhc_1->begin(); Y += 35; w_wxhc_rptsta = new Fl_Input2(150, Y, 250, 22, _("Reporting Station")); w_wxhc_rptsta->tooltip(_("Amateur Radio Callsign or First & Last Name")); w_wxhc_rptsta->callback(wxhc_changed); w_wxhc_rptsta->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_email = new Fl_Input2(150, Y, 250, 22, _("Email address")); w_wxhc_email->tooltip(""); w_wxhc_email->callback(wxhc_changed); w_wxhc_email->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_phone = new Fl_Input2(150, Y, 250, 22, _("Phone number")); w_wxhc_phone->tooltip(""); w_wxhc_phone->callback(wxhc_changed); w_wxhc_phone->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_addr = new Fl_Input2(150, Y, 400, 22, _("Street address")); w_wxhc_addr->tooltip(""); w_wxhc_addr->callback(wxhc_changed); w_wxhc_addr->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_city = new Fl_Input2(150, Y, 250, 22, _("city")); w_wxhc_city->tooltip(""); w_wxhc_city->callback(wxhc_changed); w_wxhc_city->when(FL_WHEN_CHANGED); w_wxhc_state = new Fl_Input2(450, Y, 100, 22, _("State")); w_wxhc_state->tooltip(""); w_wxhc_state->callback(wxhc_changed); w_wxhc_state->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_country = new Fl_Input2(150, Y, 250, 22, _("Country")); w_wxhc_country->tooltip(""); w_wxhc_country->callback(wxhc_changed); w_wxhc_country->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_lat = new Fl_Input2(150, Y, 150, 22, _("Latitude")); w_wxhc_lat->tooltip(_("Latitude (degrees North)")); w_wxhc_lat->callback(wxhc_changed); w_wxhc_lat->when(FL_WHEN_CHANGED); w_wxhc_long = new Fl_Input2(400, Y, 150, 22, _("Longitude")); w_wxhc_long->tooltip(_("Longitude (degrees West)")); w_wxhc_long->callback(wxhc_changed); w_wxhc_long->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_date = new Fl_Input2(150, Y, 150, 22, _("Date")); w_wxhc_date->tooltip(_("Observation date : month-day-year")); w_wxhc_date->callback(wxhc_changed); w_wxhc_date->when(FL_WHEN_CHANGED); w_wxhc_time = new Fl_Input2(400, Y, 150, 22, _("Time")); w_wxhc_time->tooltip(_("Observation time : HHMM Z (GMT/UTC preferred)")); w_wxhc_time->callback(wxhc_changed); w_wxhc_time->when(FL_WHEN_CHANGED); Y += 25; w_wxhc_meas = new Fl_Check_Button(150, Y, 50, 22, _("Measured")); w_wxhc_meas->tooltip(_("Wind speed measured")); w_wxhc_meas->callback((Fl_Callback*)cb_measured); w_wxhc_est = new Fl_Check_Button(305, Y, 50, 22, _("Estimated")); w_wxhc_est->tooltip(_("Wind speed estimated")); w_wxhc_est->callback((Fl_Callback*)cb_estimated); Y += 25; w_wxhc_wind_speed = new Fl_Input2(150, Y, 80, 22, _("Wind speed")); w_wxhc_wind_speed->tooltip(_("Sustained wind speed")); w_wxhc_wind_speed->callback(wxhc_changed); w_wxhc_wind_speed->when(FL_WHEN_CHANGED); w_wxhc_wind_speed_units = new Fl_ListBox(230, Y, 80, 22, _("")); w_wxhc_wind_speed_units->begin(); w_wxhc_wind_speed_units->callback(wxhc_changed); w_wxhc_wind_speed_units->when(FL_WHEN_RELEASE); w_wxhc_wind_speed_units->end(); Y += 25; w_wxhc_wind_gusts = new Fl_Input2(150, Y, 80, 22, _("Wind gust")); w_wxhc_wind_gusts->tooltip(_("Less than 1 minute")); w_wxhc_wind_gusts->callback(wxhc_changed); w_wxhc_wind_gusts->when(FL_WHEN_CHANGED); w_wxhc_wind_gusts_units = new Fl_ListBox(230, Y, 80, 22, _("")); w_wxhc_wind_gusts_units->begin(); w_wxhc_wind_gusts_units->callback(wxhc_changed); w_wxhc_wind_gusts_units->when(FL_WHEN_RELEASE); w_wxhc_wind_gusts_units->end(); Y += 25; w_wxhc_wind_dir = new Fl_ListBox(150, Y, 50, 22, _("Wind direc'")); w_wxhc_wind_dir->begin(); w_wxhc_wind_dir->align(FL_ALIGN_LEFT); w_wxhc_wind_dir->callback(wxhc_changed); w_wxhc_wind_dir->when(FL_WHEN_RELEASE); w_wxhc_wind_dir->end(); w_wxhc_wind_degrees = new Fl_Input2(210, Y, 80, 22, _("Degrees")); w_wxhc_wind_degrees->align(FL_ALIGN_RIGHT); Y += 25; w_wxhc_baro_press = new Fl_Input2(150, Y, 80, 22, _("Baro Press")); w_wxhc_baro_press->tooltip(_("Must be measured with calibrated barometer")); w_wxhc_baro_press->align(FL_ALIGN_LEFT); w_wxhc_baro_press->callback(wxhc_changed); w_wxhc_baro_press->when(FL_WHEN_CHANGED); w_wxhc_baro_units = new Fl_ListBox(230, Y, 100, 22, _("")); w_wxhc_baro_units->begin(); w_wxhc_baro_units->when(FL_WHEN_RELEASE); w_wxhc_baro_units->callback(wxhc_changed); w_wxhc_baro_units->end(); tab_wxhc_1->end(); Y = tab_top; tab_wxhc_2 = new Fl_Group(0, Y+25, 570, 360, _("Comments")); Y += 35; w_wxhc_comments = new FTextEdit(5, Y, 560, 340, _("")); tab_wxhc_2->end(); tab_wxhc->end(); set_nhc_wx_combos(); tab_wxhc->hide(); }; ��������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/iaru/������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�011451� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/iaru/iaru_tab.cxx������������������������������������������������������������������0000664�0001750�0001750�00000032127�12330516146�013674� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_iaru = (Fl_Group *)0; Fl_Tabs *tabs_iaru = (Fl_Tabs *)0; Fl_Group *tab_iaru_message = (Fl_Group *)0; Fl_Group *tab_iaru_information = (Fl_Group *)0; Fl_Input2 *iaru_txt_nbr = (Fl_Input2 *)0; Fl_ListBox *iaru_sel_prec = (Fl_ListBox *)0; Fl_Input2 *iaru_txt_station = (Fl_Input2 *)0; Fl_Input2 *iaru_txt_orig = (Fl_Input2 *)0; Fl_Input2 *iaru_txt_t1 = (Fl_Input2 *)0; Fl_Button *iaru_btn_t1 = (Fl_Button *)0; Fl_Input2 *iaru_txt_d1 = (Fl_Input2 *)0; Fl_Button *iaru_btn_d1 = (Fl_Button *)0; Fl_Input2 *iaru_txt_check = (Fl_Input2 *)0; Fl_Button *iaru_btn_check = (Fl_Button *)0; Fl_Input2 *iaru_txt_to = (Fl_Input2 *)0; FTextEdit *iaru_txt_msg = (FTextEdit *)0; Fl_Input2 *iaru_txt_fm = (Fl_Input2 *)0; Fl_Input2 *iaru_txt_rcv_fm = (Fl_Input2 *)0; Fl_Input2 *iaru_txt_d2 = (Fl_Input2 *)0; Fl_Button *iaru_btn_d2 = (Fl_Button *)0; Fl_Input2 *iaru_txt_t2 = (Fl_Input2 *)0; Fl_Button *iaru_btn_t2 = (Fl_Button *)0; Fl_Input2 *iaru_txt_sent_to = (Fl_Input2 *)0; Fl_Input2 *iaru_txt_d3 = (Fl_Input2 *)0; Fl_Button *iaru_btn_d3 = (Fl_Button *)0; Fl_Input2 *iaru_txt_t3 = (Fl_Input2 *)0; Fl_Button *iaru_btn_t3 = (Fl_Button *)0; static void cb_iaru_txt_nbr(Fl_Input2*, void*) { iaru_cb_nbr(iaru_txt_nbr); } static void cb_iaru_txt_station(Fl_Input2*, void*) { iaru_cb_filter_input(iaru_txt_station); } static void cb_iaru_txt_orig(Fl_Input2*, void*) { iaru_cb_filter_input(iaru_txt_orig); } static void cb_iaru_btn_t1(Fl_Button*, void*) { iaru_cb_set_t1(); } static void cb_iaru_btn_d1(Fl_Button*, void*) { iaru_cb_set_d1(); } static void cb_iaru_btn_t2(Fl_Button*, void*) { iaru_cb_set_t2(); } static void cb_iaru_btn_d2(Fl_Button*, void*) { iaru_cb_set_d2(); } static void cb_iaru_btn_t3(Fl_Button*, void*) { iaru_cb_set_t3(); } static void cb_iaru_btn_d3(Fl_Button*, void*) { iaru_cb_set_d3(); } static void cb_iaru_txt_to(Fl_Input2*, void*) { iaru_cb_filter_input(iaru_txt_to); } static void cb_iaru_txt_fm(Fl_Input2*, void*) { iaru_cb_filter_input(iaru_txt_fm); } static void cb_iaru_txt_msg(FTextEdit*, void*) { iaru_btn_check->labelcolor(FL_RED); iaru_btn_check->redraw_label(); } static void cb_iaru_btn_check(Fl_Button*, void*) { iaru_cb_check(); } void iaru_changed(Fl_Widget *, void *) { estimate(); } void create_iaru_tab() { int Y = tab_top; tab_iaru = new Fl_Group(0, Y, 570, 404); tab_iaru->align(FL_ALIGN_TOP); iaru_txt_nbr = new Fl_Input2(4, Y+20, 102, 24, _("NR")); iaru_txt_nbr->tooltip(_("Message number at station of origin")); iaru_txt_nbr->box(FL_DOWN_BOX); iaru_txt_nbr->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_nbr->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_nbr->labeltype(FL_NORMAL_LABEL); iaru_txt_nbr->labelfont(0); iaru_txt_nbr->labelsize(14); iaru_txt_nbr->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_nbr->callback((Fl_Callback*)cb_iaru_txt_nbr); iaru_txt_nbr->align(FL_ALIGN_TOP); iaru_txt_nbr->callback(iaru_changed); iaru_txt_nbr->when(FL_WHEN_CHANGED); iaru_sel_prec = new Fl_ListBox(108, Y+20, 120, 24, _("PREC")); iaru_sel_prec->tooltip(_("Message Precedence")); iaru_sel_prec->align(FL_ALIGN_TOP); iaru_txt_station = new Fl_Input2(230, Y+20, 100, 24, _("STN OF ORIG")); iaru_txt_station->tooltip(_("Station call sign")); iaru_txt_station->box(FL_DOWN_BOX); iaru_txt_station->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_station->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_station->labeltype(FL_NORMAL_LABEL); iaru_txt_station->labelfont(0); iaru_txt_station->labelsize(14); iaru_txt_station->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_station->callback((Fl_Callback*)cb_iaru_txt_station); iaru_txt_station->align(FL_ALIGN_TOP); iaru_txt_station->callback(iaru_changed); iaru_txt_station->when(FL_WHEN_CHANGED); iaru_txt_orig = new Fl_Input2(332, Y+20, 230, 24, _("PLACE OF ORIG")); iaru_txt_orig->tooltip(_("Place of origin")); iaru_txt_orig->box(FL_DOWN_BOX); iaru_txt_orig->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_orig->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_orig->labeltype(FL_NORMAL_LABEL); iaru_txt_orig->labelfont(0); iaru_txt_orig->labelsize(14); iaru_txt_orig->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_orig->callback((Fl_Callback*)cb_iaru_txt_orig); iaru_txt_orig->align(FL_ALIGN_TOP_LEFT); iaru_txt_orig->callback(iaru_changed); iaru_txt_orig->when(FL_WHEN_CHANGED); iaru_txt_t1 = new Fl_Input2(90, Y+50, 80, 24, _("FILED TIME")); iaru_txt_t1->tooltip(_("Time of filing")); iaru_txt_t1->box(FL_DOWN_BOX); iaru_txt_t1->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_t1->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_t1->labeltype(FL_NORMAL_LABEL); iaru_txt_t1->labelfont(0); iaru_txt_t1->labelsize(14); iaru_txt_t1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_t1->align(FL_ALIGN_LEFT); iaru_txt_t1->callback(iaru_changed); iaru_txt_t1->when(FL_WHEN_CHANGED); iaru_btn_t1 = new Fl_Button(174, Y+52, 20, 20, _("...")); iaru_btn_t1->tooltip(_("Set time now")); iaru_btn_t1->callback((Fl_Callback*)cb_iaru_btn_t1); iaru_txt_d1 = new Fl_Input2(290, Y+50, 80, 24, _("FILED DATE")); iaru_txt_d1->tooltip(_("Date of filing")); iaru_txt_d1->box(FL_DOWN_BOX); iaru_txt_d1->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_d1->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_d1->labeltype(FL_NORMAL_LABEL); iaru_txt_d1->labelfont(0); iaru_txt_d1->labelsize(14); iaru_txt_d1->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_d1->align(FL_ALIGN_LEFT); iaru_txt_d1->callback(iaru_changed); iaru_txt_d1->when(FL_WHEN_CHANGED); iaru_btn_d1 = new Fl_Button(372, Y+52, 20, 20, _("...")); iaru_btn_d1->tooltip(_("Set today")); iaru_btn_d1->callback((Fl_Callback*)cb_iaru_btn_d1); iaru_txt_check = new Fl_Input2(460, Y+50, 50, 24, _("CHECK")); iaru_txt_check->tooltip(_("Message check count")); iaru_txt_check->box(FL_DOWN_BOX); iaru_txt_check->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_check->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_check->labeltype(FL_NORMAL_LABEL); iaru_txt_check->labelfont(0); iaru_txt_check->labelsize(14); iaru_txt_check->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_check->align(FL_ALIGN_LEFT); iaru_txt_check->callback(iaru_changed); iaru_txt_check->when(FL_WHEN_CHANGED); iaru_btn_check = new Fl_Button(512, Y+52, 22, 22, _("ck")); iaru_btn_check->tooltip(_("Compute check count")); iaru_btn_check->callback((Fl_Callback*)cb_iaru_btn_check); iaru_txt_to = new Fl_Input2(4, Y+93, 275, 60, _("TO")); iaru_txt_to->tooltip(_("Addressee")); iaru_txt_to->type(4); iaru_txt_to->box(FL_DOWN_BOX); iaru_txt_to->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_to->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_to->labeltype(FL_NORMAL_LABEL); iaru_txt_to->labelfont(0); iaru_txt_to->labelsize(14); iaru_txt_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_to->callback((Fl_Callback*)cb_iaru_txt_to); iaru_txt_to->align(FL_ALIGN_TOP_LEFT); iaru_txt_to->callback(iaru_changed); iaru_txt_to->when(FL_WHEN_CHANGED); iaru_txt_fm = new Fl_Input2(290, Y+93, 275, 60, _("FROM")); iaru_txt_fm->tooltip(_("Message originator")); iaru_txt_fm->type(4); iaru_txt_fm->box(FL_DOWN_BOX); iaru_txt_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_fm->labeltype(FL_NORMAL_LABEL); iaru_txt_fm->labelfont(0); iaru_txt_fm->labelsize(14); iaru_txt_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_fm->callback((Fl_Callback*)cb_iaru_txt_fm); iaru_txt_fm->align(FL_ALIGN_TOP_LEFT); iaru_txt_fm->callback(iaru_changed); iaru_txt_fm->when(FL_WHEN_CHANGED); iaru_txt_msg = new FTextEdit(4, Y+172, 562, 140, _("MESSAGE")); iaru_txt_msg->tooltip(_("Message contents")); iaru_txt_msg->box(FL_DOWN_BOX); iaru_txt_msg->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_msg->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_msg->labeltype(FL_NORMAL_LABEL); iaru_txt_msg->labelfont(0); iaru_txt_msg->labelsize(14); iaru_txt_msg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_msg->callback((Fl_Callback*)cb_iaru_txt_msg); iaru_txt_msg->align(FL_ALIGN_TOP_LEFT); iaru_txt_msg->callback(iaru_changed); iaru_txt_msg->when(FL_WHEN_CHANGED); iaru_txt_rcv_fm = new Fl_Input2(130, Y+315, 100, 24, _("RECEIVED FROM")); iaru_txt_rcv_fm->tooltip(_("Call sign of sender")); iaru_txt_rcv_fm->box(FL_DOWN_BOX); iaru_txt_rcv_fm->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_rcv_fm->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_rcv_fm->labeltype(FL_NORMAL_LABEL); iaru_txt_rcv_fm->labelfont(0); iaru_txt_rcv_fm->labelsize(14); iaru_txt_rcv_fm->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_rcv_fm->align(FL_ALIGN_LEFT); iaru_txt_rcv_fm->callback(iaru_changed); iaru_txt_rcv_fm->when(FL_WHEN_CHANGED); iaru_txt_d2 = new Fl_Input2(280, Y+315, 80, 24, _("DATE")); iaru_txt_d2->tooltip(_("date of receipt")); iaru_txt_d2->box(FL_DOWN_BOX); iaru_txt_d2->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_d2->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_d2->labeltype(FL_NORMAL_LABEL); iaru_txt_d2->labelfont(0); iaru_txt_d2->labelsize(14); iaru_txt_d2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_d2->align(FL_ALIGN_LEFT); iaru_txt_d2->callback(iaru_changed); iaru_txt_d2->when(FL_WHEN_CHANGED); iaru_btn_d2 = new Fl_Button(362, Y+317, 20, 20, _("...")); iaru_btn_d2->tooltip(_("Set today")); iaru_btn_d2->callback((Fl_Callback*)cb_iaru_btn_d2); iaru_txt_t2 = new Fl_Input2(440, Y+315, 80, 24, _("TIME")); iaru_txt_t2->tooltip(_("Time of receipt")); iaru_txt_t2->box(FL_DOWN_BOX); iaru_txt_t2->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_t2->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_t2->labeltype(FL_NORMAL_LABEL); iaru_txt_t2->labelfont(0); iaru_txt_t2->labelsize(14); iaru_txt_t2->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_t2->align(FL_ALIGN_LEFT); iaru_txt_t2->callback(iaru_changed); iaru_txt_t2->when(FL_WHEN_CHANGED); iaru_btn_t2 = new Fl_Button(522, Y+317, 20, 20, _("...")); iaru_btn_t2->tooltip(_("Set time now")); iaru_btn_t2->callback((Fl_Callback*)cb_iaru_btn_t2); iaru_txt_sent_to = new Fl_Input2(130, Y+340, 100, 24, _("SENT TO")); iaru_txt_sent_to->tooltip(_("Sent to call sign")); iaru_txt_sent_to->box(FL_DOWN_BOX); iaru_txt_sent_to->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_sent_to->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_sent_to->labeltype(FL_NORMAL_LABEL); iaru_txt_sent_to->labelfont(0); iaru_txt_sent_to->labelsize(14); iaru_txt_sent_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_sent_to->align(FL_ALIGN_LEFT); iaru_txt_sent_to->callback(iaru_changed); iaru_txt_sent_to->when(FL_WHEN_CHANGED); iaru_txt_d3 = new Fl_Input2(280, Y+340, 80, 24, _("DATE")); iaru_txt_d3->tooltip(_("date message sent")); iaru_txt_d3->box(FL_DOWN_BOX); iaru_txt_d3->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_d3->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_d3->labeltype(FL_NORMAL_LABEL); iaru_txt_d3->labelfont(0); iaru_txt_d3->labelsize(14); iaru_txt_d3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_d3->align(FL_ALIGN_LEFT); iaru_txt_d3->callback(iaru_changed); iaru_txt_d3->when(FL_WHEN_CHANGED); iaru_btn_d3 = new Fl_Button(362, Y+342, 20, 20, _("...")); iaru_btn_d3->tooltip(_("Set today")); iaru_btn_d3->callback((Fl_Callback*)cb_iaru_btn_d3); iaru_txt_t3 = new Fl_Input2(440, Y+340, 81, 24, _("TIME")); iaru_txt_t3->tooltip(_("Time sent")); iaru_txt_t3->box(FL_DOWN_BOX); iaru_txt_t3->color((Fl_Color)FL_BACKGROUND2_COLOR); iaru_txt_t3->selection_color((Fl_Color)FL_SELECTION_COLOR); iaru_txt_t3->labeltype(FL_NORMAL_LABEL); iaru_txt_t3->labelfont(0); iaru_txt_t3->labelsize(14); iaru_txt_t3->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); iaru_txt_t3->align(FL_ALIGN_LEFT); iaru_txt_t3->callback(iaru_changed); iaru_txt_t3->when(FL_WHEN_CHANGED); iaru_btn_t3 = new Fl_Button(522, Y+342, 20, 20, _("...")); iaru_btn_t3->tooltip(_("Set time now")); iaru_btn_t3->callback((Fl_Callback*)cb_iaru_btn_t3); tab_iaru->end(); tab_iaru->hide(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/iaru/iaru_templates.cxx������������������������������������������������������������0000664�0001750�0001750�00000012557�12330516146�015131� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char iaru_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>iaru</title>\n\ <meta content=\"w1hkj\" name=\"author\">\n\ <STYLE type=\"text/css\">\n\ p.F2 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 8pt }\n\ p.F3 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 14pt }\n\ p.F4 { FONT-FAMILY: \"monospace\"; FONT-SIZE: 12pt }\n\ p.F5 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 16pt }\n\ p.F6 { FONT-FAMILY: \"sans-serif\"; FONT-SIZE: 10pt }\n\ </STYLE>\n\ </head>\n\ <body>\n\ <table style=\"text-align: left; width: 100%;\" border=0 cellpadding=0 cellspacing=0>\n\ <tr>\n\ <td VALIGN=top ALIGN=center><p class=F5><b>IARU MESSAGE</b></p></td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ \n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ <p class=F2>NUMBER</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ <p class=F2>PRECEDENCE</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 20%;\">\n\ <p class=F2>STATION OF ORIGIN</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>CHECK</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 20%;\">\n\ <p class=F2>PLACE OF ORIGIN</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>FILING TIME</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>FILING DATE</p></td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:nbr:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:prec:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:sta:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:ck:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:org:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:t1:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:d1:<br></p></td>\n\ </tr>\n\ </table>\n\ <br>\n\ <table width=100% border=1 cellpadding=2 cellspacing=0>\n\ <tr><td>\n\ <table width=100% border=0 cellpadding=0 cellspacing=0>\n\ <col width = 98%><col width = 2%>\n\ <tr>\n\ <td VALIGN=top>\n\ <p class=F2><B>To:</B></p><br>\n\ <pre><p class=F4>:to:</p></pre></td>\n\ <td><br><br><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>\n\ <pre><p class=F4>:msg:</p></pre></td>\n\ <td><br><br><br><br><br><br><br><br><br></td>\n\ </tr>\n\ <tr>\n\ <td VALIGN=top>\n\ <p class=F2><B>From:</B></p>\n\ <pre><p class=F4>:fm:</p></pre></td>\n\ <td><br><br><br></td>\n\ </tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ <br>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center; width: 24%;\">\n\ <p class=F2>RECEIVED FROM</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>DATE</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>TIME</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 4%;\" ROWSPAN=2></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 24%;\">\n\ <p class=F2>SENT TO</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>DATE</p></td>\n\ <td style=\"vertical-align: top; text-align: center; width: 10%;\">\n\ <p class=F2>TIME</p></td>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:rcv:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:d2:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:t2:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:sto:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:d3:<br></p></td>\n\ <td style=\"vertical-align: top; text-align: center;\">\n\ <p class=F4>:t3:<br></p></td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ </table>\n\ <br>\n\ </body></html>\n\ "; const char iaru_txt_template[] = ":nbr: :prec: :sta: :ck: :org: :t1: :d1:\n\ :to:\n\ BT\n\ :msg:\n\ BT\n\ :fm:\n\ AR\n\ "; �������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/iaru/iaru.cxx����������������������������������������������������������������������0000664�0001750�0001750�00000045520�12330516146�013047� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string iaru_base_filename = ""; string iaru_def_filename = ""; string iaru_def_template_name = ""; static string iaru_buffer; // iaru iaru_fields const char *iaru_s_prec[] = {"ROUTINE", "PRIORITY", "EMERGENCY"}; const char iaru_prec_items[] = "ROUTINE|PRIORITY|EMERGENCY"; // new tag strings string iaru_nbr = ":nbr:"; // 0 string iaru_prec = ":prec:"; // 1 string iaru_station = ":sta:"; // 2 string iaru_check = ":ck:"; // 3 string iaru_orig = ":org:"; // 4 string iaru_d1 = ":d1:"; // 5 string iaru_t1 = ":t1:"; // 6 string iaru_to = ":to:"; // 7 string iaru_msg = ":msg:"; // 8 string iaru_fm = ":fm:"; // 9 string iaru_rcv_fm = ":rcv:"; // 10 string iaru_d2 = ":d2:"; // 11 string iaru_t2 = ":t2:"; // 12 string iaru_sent_to = ":sto:"; // 13 string iaru_d3 = ":d3:"; // 14 string iaru_t3 = ":t3:"; // 15 FIELD iaru_fields[] = { { iaru_nbr, "", (void **)&iaru_txt_nbr, 't' }, // 0 { iaru_prec, "0", (void **)&iaru_sel_prec, 's' }, // 1 { iaru_station, "", (void **)&iaru_txt_station, 't' }, // 2 { iaru_check, "", (void **)&iaru_txt_check, 't' }, // 3 { iaru_orig, "", (void **)&iaru_txt_orig, 't' }, // 4 { iaru_d1, "", (void **)&iaru_txt_d1, 't' }, // 5 { iaru_t1, "", (void **)&iaru_txt_t1, 't' }, // 6 { iaru_to, "", (void **)&iaru_txt_to, 't' }, // 7 { iaru_msg, "", (void **)&iaru_txt_msg, 'e' }, // 8 { iaru_fm, "", (void **)&iaru_txt_fm, 't' }, // 9 { iaru_rcv_fm, "", (void **)&iaru_txt_rcv_fm, 't' }, // 10 { iaru_d2, "", (void **)&iaru_txt_d2, 't' }, // 11 { iaru_t2, "", (void **)&iaru_txt_t2, 't' }, // 12 { iaru_sent_to, "", (void **)&iaru_txt_sent_to, 't' }, // 113 { iaru_d3, "", (void **)&iaru_txt_d3, 't' }, // 14 { iaru_t3, "", (void **)&iaru_txt_t3, 't' } // 15 }; bool iaru_using_template = false; int iaru_num_fields = sizeof(iaru_fields) / sizeof(FIELD); //====================================================================== void iaru_cb_set_d1() { iaru_txt_d1->value(szAbbrevDate()); } void iaru_cb_set_t1() { iaru_txt_t1->value(szTime(progStatus.UTC)); } void iaru_cb_set_d2() { iaru_txt_d2->value(szAbbrevDate()); } void iaru_cb_set_t2() { iaru_txt_t2->value(szTime(progStatus.UTC)); } void iaru_cb_set_d3() { iaru_txt_d3->value(szAbbrevDate()); } void iaru_cb_set_t3() { iaru_txt_t3->value(szTime(progStatus.UTC)); } void iaru_cb_nbr(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; string s = inp->value(); for (size_t n = 0; n < s.length(); n++) if (!isdigit(s[n])) s.erase(n,1); strip_leading_zeros(s); inp->value(s.c_str()); } static char valid_input[] = "0123456789/ ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"; void iaru_cb_filter_input(Fl_Widget *wdg) { Fl_Input2 *inp = (Fl_Input2 *)wdg; string s = inp->value(); ucase(s); for (size_t n = 0; n < s.length(); n++) if (strchr(valid_input, s[n]) == NULL) s.erase(n,1); inp->value(s.c_str()); } void iaru_clear_fields() { for (int i = 0; i < iaru_num_fields; i++) iaru_fields[i].f_data.clear(); } static string numeric(int n) { static char snum[10]; snprintf(snum, sizeof(snum), "%d", n); return snum; } void iaru_set_choices() { iaru_sel_prec->clear(); iaru_sel_prec->add(iaru_prec_items); iaru_sel_prec->index(0); } bool iaru_check_fields() { for (int i = 0; i < iaru_num_fields; i++) { if (iaru_fields[i].w_type == 'd') { if (iaru_fields[i].f_data != ((Fl_DateInput *)(*iaru_fields[i].w))->value()) return true; } else if (iaru_fields[i].w_type == 't') { if (iaru_fields[i].f_data != ((Fl_Input2 *)(*iaru_fields[i].w))->value()) return true; } else if (iaru_fields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*iaru_fields[i].w))->index(); if (choice >= 0) { if (iaru_fields[i].f_data != numeric(choice)) return true; } } else if (iaru_fields[i].w_type == 'e') { if (iaru_fields[i].f_data != ((FTextEdit *)(*iaru_fields[i].w))->buffer()->text()) return true; } else if (iaru_fields[i].w_type == 'b') { string val = ((Fl_Button *)(*iaru_fields[i].w))->value() ? "T" : "F"; if (iaru_fields[i].f_data != val) return true; } } return false; } void iaru_update_fields() { for (int i = 0; i < iaru_num_fields; i++) { if (iaru_fields[i].w_type == 'd') { iaru_fields[i].f_data = ((Fl_DateInput *)(*iaru_fields[i].w))->value(); } else if (iaru_fields[i].w_type == 't') { iaru_fields[i].f_data = ((Fl_Input2 *)(*iaru_fields[i].w))->value(); } else if (iaru_fields[i].w_type == 's') { int choice = ((Fl_ListBox *)(*iaru_fields[i].w))->index(); if (choice >= 0) { iaru_fields[i].f_data = numeric(choice); } } else if (iaru_fields[i].w_type == 'e') { iaru_fields[i].f_data = ((FTextEdit *)(*iaru_fields[i].w))->buffer()->text(); } else if (iaru_fields[i].w_type == 'b') { string val = ((Fl_Button *)(*iaru_fields[i].w))->value() ? "T" : "F"; iaru_fields[i].f_data = val; } } } void iaru_clear_form() { iaru_clear_fields(); if (progStatus.rgnbr_fname) iaru_txt_nbr->value(progStatus.rgnbr.c_str()); else iaru_txt_nbr->value(""); for (int i = 1; i < iaru_num_fields; i++) if (iaru_fields[i].w_type == 'd') ((Fl_DateInput *)(*iaru_fields[i].w))->value(""); else if (iaru_fields[i].w_type == 't') ((Fl_Input2 *)(*iaru_fields[i].w))->value(""); else if (iaru_fields[i].w_type == 's') ((Fl_ListBox *)(*iaru_fields[i].w))->index(0); else if (iaru_fields[i].w_type == 'e') ((FTextEdit *)(*iaru_fields[i].w))->clear(); else if (iaru_fields[i].w_type == 'b') ((Fl_Button *)(*iaru_fields[i].w))->value(0); iaru_update_fields(); } void iaru_update_form() { for (int i = 0; i < iaru_num_fields; i++) { if (iaru_fields[i].w_type == 'd') ((Fl_DateInput *)(*iaru_fields[i].w))->value(iaru_fields[i].f_data.c_str()); else if (iaru_fields[i].w_type == 't') ((Fl_Input2 *)(*iaru_fields[i].w))->value(iaru_fields[i].f_data.c_str()); else if (iaru_fields[i].w_type == 's') ((Fl_ListBox *)(*iaru_fields[i].w))->index(atoi(iaru_fields[i].f_data.c_str())); else if (iaru_fields[i].w_type == 'e') { ((FTextEdit *)(*iaru_fields[i].w))->clear(); ((FTextEdit *)(*iaru_fields[i].w))->add(iaru_fields[i].f_data.c_str()); } else if (iaru_fields[i].w_type == 'b') ((Fl_Button *)(*iaru_fields[i].w))->value(iaru_fields[i].f_data == "T" ? 1 : 0); } } void iaru_make_buffer(bool compress = false) { string mbuff; mbuff.clear(); for (int i = 0; i < iaru_num_fields; i++) mbuff.append( lineout( iaru_fields[i].f_type, iaru_fields[i].f_data ) ); if (compress) compress_maybe(mbuff); iaru_buffer.append(mbuff); } void iaru_read_buffer(string data) { clear_fields(); read_header(data); for (int i = 0; i < iaru_num_fields; i++) iaru_fields[i].f_data = findstr(data, iaru_fields[i].f_type); iaru_update_form(); } void iaru_cb_new() { if (iaru_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); iaru_cb_save(); } } iaru_update_fields(); iaru_clear_form(); clear_header(); iaru_def_filename = ICS_msg_dir; iaru_def_filename.append("new"IARU_FILE_EXT); iaru_using_template = false; show_filename(iaru_def_filename); } void iaru_cb_import() { fl_alert2("Not implemented"); } void iaru_cb_export() { fl_alert2("Not implemented"); } void iaru_cb_wrap_import(string wrapfilename, string inpbuffer) { iaru_clear_form(); iaru_read_buffer(inpbuffer); iaru_def_filename = ICS_msg_dir; iaru_def_filename.append(wrapfilename); show_filename(iaru_def_filename); iaru_using_template = false; } int eval_iaru_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(iaru_base_filename).append("]"); iaru_update_fields(); update_header(FROM); evalstr.append(header("<iaru>")); iaru_buffer.clear(); iaru_make_buffer(true); if (iaru_buffer.empty()) return 0; evalstr.append( iaru_buffer ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void iaru_cb_wrap_export() { if (iaru_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } iaru_update_fields(); if (iaru_base_filename == "new"IARU_FILE_EXT || iaru_base_filename == "default"IARU_FILE_EXT) if (!iaru_cb_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(iaru_base_filename); wrapfilename.append(WRAP_EXT); const char *p = FSEL::saveas( "Save as wrapped iaru file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(true); export_wrapfile(iaru_base_filename, wrapfilename, iaru_buffer, pext != WRAP_EXT); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(false); iaru_write(iaru_def_filename); } } void iaru_cb_wrap_autosend() { if (iaru_check_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } iaru_update_fields(); if (iaru_base_filename == "new"IARU_FILE_EXT || iaru_base_filename == "default"IARU_FILE_EXT) if (!iaru_cb_save_as()) return; update_header(FROM); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(true); xfr_via_socket(iaru_base_filename, iaru_buffer); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(false); iaru_write(iaru_def_filename); } void iaru_cb_load_template() { string iaru_def_filename = iaru_def_template_name; const char *p = FSEL::select( "Open template file", "Template file\t*"IARU_TEMP_EXT, iaru_def_filename.c_str()); if (p) { iaru_clear_form(); read_data_file(p); iaru_def_template_name = p; show_filename(iaru_def_template_name); iaru_using_template = true; } } void iaru_cb_save_template() { if (!iaru_using_template) { iaru_cb_save_as_template(); return; } string iaru_def_filename = iaru_def_template_name; const char *p = FSEL::saveas( "Save template file", "Template file\t*"IARU_TEMP_EXT, iaru_def_filename.c_str()); if (p) { update_header(CHANGED); iaru_update_fields(); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(); iaru_write(p); } } void iaru_cb_save_as_template() { string iaru_def_filename = iaru_def_template_name; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"IARU_TEMP_EXT, iaru_def_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); iaru_def_template_name = p; if (strlen(pext) == 0) iaru_def_template_name.append(IARU_TEMP_EXT); remove_spaces_from_filename(iaru_def_template_name); clear_header(); update_header(CHANGED); iaru_update_fields(); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(); iaru_write(iaru_def_template_name); show_filename(iaru_def_template_name); iaru_using_template = true; } } void iaru_cb_open() { const char *p = FSEL::select(_("Open data file"), "iaru\t*"IARU_FILE_EXT, iaru_def_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; iaru_clear_form(); read_data_file(p); iaru_using_template = false; iaru_def_filename = p; show_filename(iaru_def_filename); } void iaru_write(string s) { FILE *iaru_file = fopen(s.c_str(), "w"); if (!iaru_file) return; fwrite(iaru_buffer.c_str(), iaru_buffer.length(), 1, iaru_file); fclose(iaru_file); } bool iaru_cb_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(IARU_FILE_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = iaru_def_filename; p = FSEL::saveas(_("Save data file"), "iaru\t*"IARU_FILE_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.rgnbr_fname) { int n = atoi(progStatus.rgnbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.rgnbr = szn; txt_rgnbr->value(szn); txt_rgnbr->redraw(); } else if (progStatus.sernbr_fname) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } const char *pext = fl_filename_ext(p); iaru_def_filename = p; if (strlen(pext) == 0) iaru_def_filename.append(IARU_FILE_EXT); remove_spaces_from_filename(iaru_def_filename); update_header(NEW); iaru_update_fields(); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(); iaru_write(iaru_def_filename); iaru_using_template = false; show_filename(iaru_def_filename); return true; } void iaru_cb_save() { if (iaru_base_filename == "new"IARU_FILE_EXT || iaru_base_filename == "default"IARU_FILE_EXT || iaru_using_template == true) { iaru_cb_save_as(); return; } if (iaru_check_fields()) update_header(CHANGED); iaru_update_fields(); iaru_buffer.assign(header("<iaru>")); iaru_make_buffer(); iaru_write(iaru_def_filename); iaru_using_template = false; } const char *iaru_punctuation[] = { ". ", " X ", ",", " COMMA ", "?", " QUERY ", "\\", " BACKSLASH ", "://", " COLON SLASH SLASH ", "~", " TILDE ", "_", " UNDERSCORE ", "@", " AT ", "#", " POUNDSIGN ", "\"", " QUOTE ", "\'", "", 0, 0 }; void iaru_cb_check() { string temp = iaru_txt_msg->buffer()->text(); if (temp.empty()) { iaru_txt_check->value(""); iaru_btn_check->labelcolor(FL_BLACK); iaru_btn_check->redraw_label(); return; } // convert to uppercase for (size_t n = 0; n < temp.length(); n++) temp[n] = toupper(temp[n]); size_t pos = string::npos; strip_lfs(temp); // remove trailing period if (temp[temp.length()-1] == '.') temp.erase(temp.length()-1,1); // convert punctuation for (int n = 0; iaru_punctuation[n]; n += 2) while ((pos = temp.find(iaru_punctuation[n])) != string::npos) temp.replace(pos,1,iaru_punctuation[n+1]); //convert embedded periods while ((pos = temp.find(".")) != string::npos) if (isdigit(temp[pos-1]) || isdigit(temp[pos+1])) temp[pos] = 'R'; else temp.replace(pos, 1, " DOT "); // remove any user inserted end-of-lines while ((pos = temp.find('\n')) != string::npos) temp[pos] = ' '; // only single spaces no trailing spaces, no leading spaces while ((pos = temp.find(" ")) != string::npos) temp.erase(pos,1); while (temp[temp.length() -1] == ' ') temp.erase(temp.length()-1, 1); if (temp[0] == ' ') temp.erase(0,1); // count number of words in textiaru_def_filename int numwords = 1; if (temp.length()) { pos = 0; while ((pos = temp.find(" ", pos + 1)) != string::npos) numwords++; } // no more than 5 words to a line if (numwords > progStatus.wpl) { int wc = numwords; size_t pos = 0; while (wc > progStatus.wpl) { for (int i = 0; i < progStatus.wpl; i++) pos = temp.find(' ', pos + 1); temp[pos] = '\n'; wc -= progStatus.wpl; } } // insert trailing end-of-line temp += '\n'; // return converted text to editor iaru_txt_msg->clear(); iaru_txt_msg->addstr(temp.c_str()); char snum[10]; snprintf(snum, sizeof(snum), "%s%d", temp.find("ARL") != string::npos ? "ARL " : "", numwords); iaru_txt_check->value(snum); iaru_update_fields(); iaru_btn_check->labelcolor(FL_BLACK); iaru_btn_check->redraw_label(); } void iaru_cb_html() { string iaru_name; string html_text; size_t nbr; iaru_name = ICS_dir; iaru_name.append("iaru.html"); iaru_update_fields(); iaru_cb_check(); string form = iaru_html_template; for (int i = 0; i < iaru_num_fields; i++) { if (iaru_fields[i].f_type == iaru_prec) { sscanf(iaru_fields[i].f_data.c_str(), "%d", &nbr); if (nbr >= 0 && nbr < (sizeof(iaru_s_prec) / sizeof(*iaru_s_prec))) html_text = iaru_s_prec[nbr]; else html_text = ""; replacestr( form, iaru_fields[i].f_type, html_text ); } else if (iaru_fields[i].w_type == 'b') { replacestr( form, iaru_fields[i].f_type, iaru_fields[i].f_data == "T" ? yes : no); } else replacestr( form, iaru_fields[i].f_type, iaru_fields[i].f_data ); } string rxstr = ""; rxstr.append(progStatus.my_call).append(" ").append(progStatus.my_tel); rxstr.append("<br>").append(progStatus.my_name); rxstr.append("<br>").append(progStatus.my_addr); rxstr.append("<br>").append(progStatus.my_city); html_text = ":rx:"; replacestr( form, html_text, rxstr); html_text = ":exp:"; string arlmsgs = ""; if (progStatus.arl_desc) arlmsgs = expand_arl(iaru_fields[10].f_data); replacestr( form, html_text, arlmsgs); FILE *iaru_file = fopen(iaru_name.c_str(), "w"); fprintf(iaru_file,"%s", form.c_str()); fclose(iaru_file); open_url(iaru_name.c_str()); } void iaru_cb_textout() { string iaru_name; string lines; string str; int nbr = 0;//, fn; iaru_name = ICS_dir; iaru_name.append("iaru.txt"); iaru_update_fields(); iaru_cb_check(); string form = iaru_txt_template; for (int i = 0; i < iaru_num_fields; i++) { str.clear(); if (iaru_fields[i].f_type == iaru_prec) { sscanf(iaru_fields[i].f_data.c_str(), "%d", &nbr); str = iaru_s_prec[nbr]; if (str.find("EMERGENCY") == string::npos) str = str[0]; replacestr( form, iaru_fields[i].f_type, str); } else { str = iaru_fields[i].f_data; strip_lfs(str); replacestr( form, iaru_fields[i].f_type, str); } } FILE *iaru_file = fopen(iaru_name.c_str(), "w"); fprintf(iaru_file,"%s", form.c_str()); fclose(iaru_file); open_url(iaru_name.c_str()); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/��������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�012356� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServer.cpp����������������������������������������������������������0000664�0001750�0001750�00000033205�12515501705�015365� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcServer.h" #include "XmlRpcServerConnection.h" #include "XmlRpcServerMethod.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include "XmlRpcException.h" #include "XmlRpc.h" #include <stdio.h> using namespace XmlRpc; // Static data const char XmlRpcServer::METHODNAME_TAG[] = "methodName"; const char XmlRpcServer::PARAMS_TAG[] = "params"; const char XmlRpcServer::PARAM_TAG[] = "param"; const std::string XmlRpcServer::METHODNAME = "methodName"; const std::string XmlRpcServer::PARAMS = "params"; const std::string XmlRpcServer::FAULTCODE = "faultCode"; const std::string XmlRpcServer::FAULTSTRING = "faultString"; XmlRpcServer::XmlRpcServer() { _introspectionEnabled = false; _listMethods = 0; _methodHelp = 0; } XmlRpcServer::~XmlRpcServer() { this->shutdown(); _methods.clear(); delete _listMethods; delete _methodHelp; } // Add a command to the RPC server void XmlRpcServer::addMethod(XmlRpcServerMethod* method) { _methods[method->name()] = method; } // Remove a command from the RPC server void XmlRpcServer::removeMethod(XmlRpcServerMethod* method) { MethodMap::iterator i = _methods.find(method->name()); if (i != _methods.end()) _methods.erase(i); } // Remove a command from the RPC server by name void XmlRpcServer::removeMethod(const std::string& methodName) { MethodMap::iterator i = _methods.find(methodName); if (i != _methods.end()) _methods.erase(i); } // Look up a method by name XmlRpcServerMethod* XmlRpcServer::findMethod(const std::string& name) const { MethodMap::const_iterator i = _methods.find(name); if (i == _methods.end()) return 0; return i->second; } // Create a socket, bind to the specified port, and // set it in listen mode to make it available for clients. bool XmlRpcServer::bindAndListen(int port, int backlog /*= 5*/) { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (XmlRpcSocket::Invalid == fd) { XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } this->setfd(fd); // Don't block on reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Allow this port to be re-bound immediately so server re-starts are not delayed if ( ! XmlRpcSocket::setReuseAddr(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set SO_REUSEADDR socket option (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Bind to the specified port on the default interface if ( ! XmlRpcSocket::bind(fd, port)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not bind to specified port (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Set in listening mode if ( ! XmlRpcSocket::listen(fd, backlog)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket in listening mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(2, "XmlRpcServer::bindAndListen: server listening on port %d fd %d", port, fd); // Notify the dispatcher to listen on this source when we are in work() _disp.addSource(this, XmlRpcDispatch::ReadableEvent); return true; } // Get port number that this server is listening on int XmlRpcServer::getPort(void) const { return XmlRpcSocket::getPort(getfd()); } // Process client requests for the specified time (in seconds) void XmlRpcServer::work(double timeSeconds) { XmlRpcUtil::log(2, "XmlRpcServer::work: waiting for a connection"); _disp.work(timeSeconds); } // Handle input on the server socket by accepting the connection // and reading the rpc request. unsigned XmlRpcServer::handleEvent(unsigned mask) { acceptConnection(); return XmlRpcDispatch::ReadableEvent; // Continue to monitor this fd } // Accept a client connection request and create a connection to // handle method calls from the client. void XmlRpcServer::acceptConnection() { XmlRpcSocket::Socket s = XmlRpcSocket::accept(this->getfd()); XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: socket %d", s); if (XmlRpcSocket::Invalid == s) { //this->close(); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not accept connection (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else if ( ! XmlRpcSocket::setNonBlocking(s)) { XmlRpcSocket::close(s); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else // Notify the dispatcher to listen for input on this source when we are in work() { XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: creating a connection"); XmlRpcServerConnection* c = this->createConnection(s); if (c) this->dispatchConnection(c); } } // Create a new connection object for processing requests from a specific client. XmlRpcServerConnection* XmlRpcServer::createConnection(XmlRpcSocket::Socket s) { // Specify that the connection object be deleted when it is closed return new XmlRpcServerConnection(s, this, true); } // Hand off a new connection to a dispatcher void XmlRpcServer::dispatchConnection(XmlRpcServerConnection* sc) { _disp.addSource(sc, XmlRpcDispatch::ReadableEvent); } // Remove a connection. Called by the connection when it closes down. void XmlRpcServer::removeConnection(XmlRpcServerConnection* sc) { _disp.removeSource(sc); } // Stop processing client requests void XmlRpcServer::exit() { _disp.exit(); } // Close the server socket file descriptor and stop monitoring connections void XmlRpcServer::shutdown() { // This closes and destroys all connections as well as closing this socket _disp.clear(); } // Introspection support static const std::string LIST_METHODS("system.listMethods"); static const std::string METHOD_HELP("system.methodHelp"); static const std::string MULTICALL("system.multicall"); // List all methods available on a server class ListMethods : public XmlRpcServerMethod { public: ListMethods(XmlRpcServer* s) : XmlRpcServerMethod(LIST_METHODS, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { _server->listMethods(result); } std::string help() { return std::string("List all methods available on a server as an array of strings"); } }; // Retrieve the help string for a named method class MethodHelp : public XmlRpcServerMethod { public: MethodHelp(XmlRpcServer* s) : XmlRpcServerMethod(METHOD_HELP, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (params[0].getType() != XmlRpcValue::TypeString) throw XmlRpcException(METHOD_HELP + ": Invalid argument type"); XmlRpcServerMethod* m = _server->findMethod(params[0]); if ( ! m) throw XmlRpcException(METHOD_HELP + ": Unknown method name"); result = m->help(); } std::string help() { return std::string("Retrieve the help string for a named method"); } }; // Specify whether introspection is enabled or not. Default is enabled. void XmlRpcServer::enableIntrospection(bool enabled) { if (_introspectionEnabled == enabled) return; _introspectionEnabled = enabled; if (enabled) { if ( ! _listMethods) { _listMethods = new ListMethods(this); _methodHelp = new MethodHelp(this); } else { addMethod(_listMethods); addMethod(_methodHelp); } } else { removeMethod(LIST_METHODS); removeMethod(METHOD_HELP); } } void XmlRpcServer::listMethods(XmlRpcValue& result) { int i = 0; result.setSize(int(_methods.size())+1); for (MethodMap::iterator it=_methods.begin(); it != _methods.end(); ++it) result[i++] = it->first; // Multicall support is built into XmlRpcServer::executeRequest result[i] = MULTICALL; } // Parse the request, run the method, generate a response string. std::string XmlRpcServer::executeRequest(std::string const& request) { XmlRpcValue params, resultValue; std::string methodName = parseRequest(request, params); XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: server calling method '%s'", methodName.c_str()); std::string response; try { if ( ! executeMethod(methodName, params, resultValue) && ! executeMulticall(methodName, params, resultValue)) response = generateFaultResponse(methodName + ": unknown method name"); else response = generateResponse(resultValue.toXml()); } catch (const XmlRpcException& fault) { XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: fault %s.", fault.getMessage().c_str()); response = generateFaultResponse(fault.getMessage(), fault.getCode()); } return response; } // Parse the method name and the argument values from the request. std::string XmlRpcServer::parseRequest(std::string const& request, XmlRpcValue& params) { std::string methodName; int offset = 0; // Number of chars parsed from the request bool emptyTag; if (XmlRpcUtil::parseTag(METHODNAME_TAG, request, &offset, methodName) && XmlRpcUtil::findTag(PARAMS_TAG, request, &offset, &emptyTag) && ! emptyTag) { int nArgs = 0; while (XmlRpcUtil::nextTagIs(PARAM_TAG, request, &offset, &emptyTag)) { if (emptyTag) { params[nArgs++] = XmlRpcValue(""); } else { params[nArgs++] = XmlRpcValue(request, &offset); (void) XmlRpcUtil::nextTagIsEnd(PARAM_TAG, request, &offset); } } (void) XmlRpcUtil::nextTagIsEnd(PARAMS_TAG, request, &offset); } return methodName; } // Execute a named method with the specified params. bool XmlRpcServer::executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result) { XmlRpcServerMethod* method = findMethod(methodName); if ( ! method) return false; method->execute(params, result); // Ensure a valid result value if ( ! result.valid()) result = std::string(); return true; } // Execute multiple calls and return the results in an array. bool XmlRpcServer::executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result) { if (methodName != MULTICALL) return false; // There ought to be 1 parameter, an array of structs if (params.size() != 1 || params[0].getType() != XmlRpcValue::TypeArray) throw XmlRpcException(MULTICALL + ": Invalid argument (expected an array)"); int nc = params[0].size(); result.setSize(nc); for (int i=0; i<nc; ++i) { if ( ! params[0][i].hasMember(METHODNAME) || ! params[0][i].hasMember(PARAMS)) { result[i][FAULTCODE] = -1; result[i][FAULTSTRING] = MULTICALL + ": Invalid argument (expected a struct with members methodName and params)"; continue; } const std::string& methodName = params[0][i][METHODNAME]; XmlRpcValue& methodParams = params[0][i][PARAMS]; XmlRpcValue resultValue; resultValue.setSize(1); try { if ( ! executeMethod(methodName, methodParams, resultValue[0]) && ! executeMulticall(methodName, params, resultValue[0])) { result[i][FAULTCODE] = -1; result[i][FAULTSTRING] = methodName + ": unknown method name"; } else result[i] = resultValue; } catch (const XmlRpcException& fault) { result[i][FAULTCODE] = fault.getCode(); result[i][FAULTSTRING] = fault.getMessage(); } } return true; } // Create a response from results xml std::string XmlRpcServer::generateResponse(std::string const& resultXml) { const char RESPONSE_1[] = "<?xml version=\"1.0\"?>\r\n" "<methodResponse><params><param>\r\n\t"; const char RESPONSE_2[] = "\r\n</param></params></methodResponse>\r\n"; std::string body = RESPONSE_1 + resultXml + RESPONSE_2; std::string header = generateHeader(body); std::string response = header + body; XmlRpcUtil::log(5, "XmlRpcServer::generateResponse:\n%s\n", response.c_str()); return response; } // Prepend http headers std::string XmlRpcServer::generateHeader(std::string const& body) { std::string header = "HTTP/1.1 200 OK\r\n" "Server: "; header += XMLRPC_VERSION; header += "\r\n" "Content-Type: text/xml\r\n" "Content-length: "; char buffLen[40]; sprintf(buffLen,"%d\r\n\r\n", static_cast<int>(body.size())); return header + buffLen; } std::string XmlRpcServer::generateFaultResponse(std::string const& errorMsg, int errorCode) { const char RESPONSE_1[] = "<?xml version=\"1.0\"?>\r\n" "<methodResponse><fault>\r\n\t"; const char RESPONSE_2[] = "\r\n</fault></methodResponse>\r\n"; XmlRpcValue faultStruct; faultStruct[FAULTCODE] = errorCode; faultStruct[FAULTSTRING] = errorMsg; std::string body = RESPONSE_1 + faultStruct.toXml() + RESPONSE_2; std::string header = generateHeader(body); return header + body; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServerConnection.cpp������������������������������������������������0000664�0001750�0001750�00000015753�12515501705�017415� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcServerConnection.h" #include "XmlRpcDispatch.h" #include "XmlRpcServer.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> using namespace XmlRpc; // The server delegates handling client requests to a serverConnection object. XmlRpcServerConnection::XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose /*= false*/) : XmlRpcSource(fd, deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcServerConnection: new socket %d.", fd); _server = server; _connectionState = READ_HEADER; _keepAlive = true; } XmlRpcServerConnection::~XmlRpcServerConnection() { XmlRpcUtil::log(4,"XmlRpcServerConnection dtor."); _server->removeConnection(this); } // Handle input on the server socket by accepting the connection // and reading the rpc request. Return true to continue to monitor // the socket for events, false to remove it from the dispatcher. unsigned XmlRpcServerConnection::handleEvent(unsigned /*eventType*/) { if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_REQUEST) if ( ! readRequest()) return 0; if (_connectionState == WRITE_RESPONSE) if ( ! writeResponse()) return 0; return (_connectionState == WRITE_RESPONSE) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } bool XmlRpcServerConnection::readHeader() { // Read available data bool eof; if ( ! nbRead(_header, &eof)) { // Its only an error if we already have read some data if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: error while reading header (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: read %d bytes.", _header.length()); char *hp = (char*)_header.c_str(); // Start of header char *ep = hp + _header.length(); // End of string char *bp = 0; // Start of body char *lp = 0; // Start of content-length value char *kp = 0; // Start of connection value for (char *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) lp = cp + 16; else if ((ep - cp > 12) && (strncasecmp(cp, "Connection: ", 12) == 0)) kp = cp + 12; else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) bp = cp + 4; else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) bp = cp + 2; } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { // EOF in the middle of a request is an error, otherwise its ok if (eof) { XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: EOF"); if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: EOF while reading header"); return false; // Either way we close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::readHeader: specified content length is %d.", _contentLength); // Otherwise copy non-header data to request buffer and set state to read request. _request = bp; // Parse out any interesting bits from the header (HTTP version, connection) _keepAlive = true; if (_header.find("HTTP/1.0") != std::string::npos) { if (kp == 0 || strncasecmp(kp, "keep-alive", 10) != 0) _keepAlive = false; // Default for HTTP 1.0 is to close the connection } else { if (kp != 0 && strncasecmp(kp, "close", 5) == 0) _keepAlive = false; } XmlRpcUtil::log(3, "KeepAlive: %d", _keepAlive); _header = ""; _connectionState = READ_REQUEST; return true; // Continue monitoring this source } bool XmlRpcServerConnection::readRequest() { // If we dont have the entire request yet, read available data if (int(_request.length()) < _contentLength) { bool eof; if ( ! nbRead(_request, &eof)) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire request yet, return (keep reading) if (int(_request.length()) < _contentLength) { if (eof) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: EOF while reading request"); return false; // Either way we close the connection } return true; } } // Otherwise, parse and dispatch the request XmlRpcUtil::log(3, "XmlRpcServerConnection::readRequest read %d bytes.", _request.length()); //XmlRpcUtil::log(5, "XmlRpcServerConnection::readRequest:\n%s\n", _request.c_str()); _connectionState = WRITE_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcServerConnection::writeResponse() { if (_response.length() == 0) { executeRequest(); _bytesWritten = 0; if (_response.length() == 0) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: empty response."); return false; } } // Try to write the response if ( ! nbWrite(_response, &_bytesWritten)) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::writeResponse: wrote %d of %d bytes.", _bytesWritten, _response.length()); // Prepare to read the next request if (_bytesWritten == int(_response.length())) { _header = ""; _request = ""; _response = ""; _connectionState = READ_HEADER; } return _keepAlive; // Continue monitoring this source if true } //! Helper method to execute the client request void XmlRpcServerConnection::executeRequest() { _response = _server->executeRequest(_request); } ���������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcUtil.cpp������������������������������������������������������������0000664�0001750�0001750�00000020004�12515501705�015025� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcUtil.h" #include <ctype.h> #include <iostream> #include <stdarg.h> #include <stdio.h> #include <string.h> #include "XmlRpc.h" using namespace XmlRpc; //#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output #ifdef USE_WINDOWS_DEBUG #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif // Version id const char XmlRpc::XMLRPC_VERSION[] = "XMLRPC++ 0.8"; // Default log verbosity: 0 for no messages through 5 (writes everything) int XmlRpcLogHandler::_verbosity = 0; // Default log handler static class DefaultLogHandler : public XmlRpcLogHandler { public: void log(int level, const char* msg) { #ifdef USE_WINDOWS_DEBUG if (level <= _verbosity) { OutputDebugString(msg); OutputDebugString("\n"); } #else if (level <= _verbosity) std::cout << msg << std::endl; #endif } } defaultLogHandler; // Message log singleton XmlRpcLogHandler* XmlRpcLogHandler::_logHandler = &defaultLogHandler; // Default error handler static class DefaultErrorHandler : public XmlRpcErrorHandler { public: void error(const char* msg) { #ifdef USE_WINDOWS_DEBUG // OutputDebugString(msg); OutputDebugString("\n"); #else // std::cerr << msg << std::endl; #endif } } defaultErrorHandler; // Error handler singleton XmlRpcErrorHandler* XmlRpcErrorHandler::_errorHandler = &defaultErrorHandler; // Easy API for log verbosity int XmlRpc::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); } void XmlRpc::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); } void XmlRpcUtil::log(int level, const char* fmt, ...) { if (level <= XmlRpcLogHandler::getVerbosity()) { va_list va; char buf[1024]; va_start( va, fmt); vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcLogHandler::getLogHandler()->log(level, buf); } } void XmlRpcUtil::error(const char* fmt, ...) { va_list va; va_start(va, fmt); char buf[1024]; vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcErrorHandler::getErrorHandler()->error(buf); } // Returns true if the tag is parsed. No attributes are parsed. // Sets val to the contents between <tag> and </tag>, or an empty string if <tag/> is found. // Updates offset to char after </tag> bool XmlRpcUtil::parseTag(const char* tag, std::string const& xml, int* offset, std::string &val) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; // Find <tag (skips over anything preceeding...) std::string stag = "<"; stag += tag; size_t istart = xml.find(stag, *offset); if (istart == std::string::npos) return false; istart += stag.length(); // Advance istart past > or /> bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; val.clear(); if (lastSlash) // <tag/> { *offset = int(istart+1); // 1 after > } else // Find </tag> { std::string etag = "</"; etag += tag; etag += ">"; size_t iend = xml.find(etag, istart); if (iend == std::string::npos) return false; *offset = int(iend + etag.length()); ++ istart; val = xml.substr(istart, iend-istart); } return true; } // Returns true if the tag is found and updates offset to the char after the tag bool XmlRpcUtil::findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; std::string stag = "<"; stag += tag; size_t istart = xml.find(stag, *offset); if (istart == std::string::npos) return false; istart += stag.length(); // Advance istart past > or />, skips attribs bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; *emptyTag = lastSlash; *offset = int(istart+1); // char after > return true; } // Returns true if the <tag> or <tag/> is found at the specified offset (modulo any whitespace) // and updates offset to the char after the tag. *emptyTag is set to true if <tag/> is found, false otherwise bool XmlRpcUtil::nextTagIs(const char* tag, std::string const& xml, int* offset, bool *emptyTag) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && isspace(*cp)) { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && (strncmp(cp+1, tag, len) == 0)) { cp += len + 1; if (*cp == '>') // <tag> { *offset += nc + len + 2; *emptyTag = false; return true; } while (*cp && isspace(*cp)) { ++cp; ++nc; } if (*cp == '/' && *(cp + 1) == '>') // <tag /> { *offset += nc + len + 3; *emptyTag = true; return true; } } return false; } // Returns true if the next tag found at the specified offset is </tag> // and updates offset to the char after the tag. bool XmlRpcUtil::nextTagIsEnd(const char* tag, std::string const& xml, int* offset) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && *cp != '<') { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && *(cp+1) == '/' && (strncmp(cp+2, tag, len) == 0) && *(cp + len + 2) == '>') { *offset += nc + len + 3; return true; } return false; } // xml encodings (xml-encoded entities are preceded with '&') static const char AMP = '&'; static const char rawEntity[] = { '<', '>', '&', '\'', '\"', 0 }; static const char* xmlEntity[] = { "lt;", "gt;", "amp;", "apos;", "quot;", 0 }; static const int xmlEntLen[] = { 3, 3, 4, 5, 5 }; // Replace xml-encoded entities with the raw text equivalents. std::string XmlRpcUtil::xmlDecode(const std::string& encoded) { std::string::size_type iAmp = encoded.find(AMP); if (iAmp == std::string::npos) return encoded; std::string decoded(encoded, 0, iAmp); std::string::size_type iSize = encoded.size(); decoded.reserve(iSize); const char* ens = encoded.c_str(); while (iAmp != iSize) { if (encoded[iAmp] == AMP && iAmp+1 < iSize) { int iEntity; for (iEntity=0; xmlEntity[iEntity] != 0; ++iEntity) //if (encoded.compare(iAmp+1, xmlEntLen[iEntity], xmlEntity[iEntity]) == 0) if (strncmp(ens+iAmp+1, xmlEntity[iEntity], xmlEntLen[iEntity]) == 0) { decoded += rawEntity[iEntity]; iAmp += xmlEntLen[iEntity]+1; break; } if (xmlEntity[iEntity] == 0) // unrecognized sequence decoded += encoded[iAmp++]; } else { decoded += encoded[iAmp++]; } } return decoded; } // Replace raw text with xml-encoded entities. std::string XmlRpcUtil::xmlEncode(const std::string& raw) { std::string::size_type iRep = raw.find_first_of(rawEntity); if (iRep == std::string::npos) return raw; std::string encoded(raw, 0, iRep); std::string::size_type iSize = raw.size(); while (iRep != iSize) { int iEntity; for (iEntity=0; rawEntity[iEntity] != 0; ++iEntity) if (raw[iRep] == rawEntity[iEntity]) { encoded += AMP; encoded += xmlEntity[iEntity]; break; } if (rawEntity[iEntity] == 0) encoded += raw[iRep]; ++iRep; } return encoded; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcSocket.h������������������������������������������������������������0000664�0001750�0001750�00000005372�12515501705�015020� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOCKET_H_ #define _XMLRPCSOCKET_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> namespace XmlRpc { //! A platform-independent socket API. class XmlRpcSocket { public: // On windows, a socket is an unsigned int large enough to hold a ptr // This should match the definition of SOCKET in winsock2.h #if defined(_WINDOWS) # if defined(_WIN64) typedef unsigned __int64 Socket; # else typedef unsigned int Socket; # endif #else typedef int Socket; #endif //! An invalid socket constant. static const Socket Invalid = (Socket) -1; //! Creates a stream (TCP) socket. Returns XmlRpcSocket::Invalid on failure. static Socket socket(); //! Closes a socket. static void close(Socket socket); //! Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure. static bool setNonBlocking(Socket socket); // The next four methods are appropriate for servers. //! Allow the port the specified socket is bound to to be re-bound immediately so //! server re-starts are not delayed. Returns false on failure. static bool setReuseAddr(Socket socket); //! Bind to a specified port static bool bind(Socket socket, int port); //! Set socket in listen mode static bool listen(Socket socket, int backlog); //! Accept a client connection request static Socket accept(Socket socket); //! Connect a socket to a server (from a client) static bool connect(Socket socket, std::string& host, int port); //! Get the port of a bound socket static int getPort(Socket socket); //! Returns true if the last error was not a fatal one (eg, EWOULDBLOCK) static bool nonFatalError(); //! Returns last errno static int getError(); //! Returns message corresponding to last error static std::string getErrorMsg(); //! Returns message corresponding to error static std::string getErrorMsg(int error); }; } // namespace XmlRpc #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcMutex.cpp�����������������������������������������������������������0000664�0001750�0001750�00000003424�12515501705�015221� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #if defined(XMLRPC_THREADS) #include <config.h> #include "XmlRpcMutex.h" #if defined(_WINDOWS) # define WIN32_LEAN_AND_MEAN # include <windows.h> #else # include <pthread.h> #endif using namespace XmlRpc; //! Destructor. XmlRpcMutex::~XmlRpcMutex() { if (_pMutex) { #if defined(_WINDOWS) ::CloseHandle((HANDLE)_pMutex); #else ::pthread_mutex_destroy((pthread_mutex_t*)_pMutex); delete _pMutex; #endif _pMutex = 0; } } //! Wait for the mutex to be available and then acquire the lock. void XmlRpcMutex::acquire() { #if defined(_WINDOWS) if ( ! _pMutex) _pMutex = ::CreateMutex(0, TRUE, 0); else ::WaitForSingleObject(_pMutex, INFINITE); #else if ( ! _pMutex) { _pMutex = new pthread_mutex_t; ::pthread_mutex_init((pthread_mutex_t*)_pMutex, 0); } ::pthread_mutex_lock((pthread_mutex_t*)_pMutex); #endif } //! Release the mutex. void XmlRpcMutex::release() { if (_pMutex) #if defined(_WINDOWS) ::ReleaseMutex(_pMutex); #else ::pthread_mutex_unlock((pthread_mutex_t*)_pMutex); #endif } #endif // XMLRPC_THREADS ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpc.h������������������������������������������������������������������0000664�0001750�0001750�00000005772�12516460021�013647� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPC_H_ #define _XMLRPC_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> #include "XmlRpcClient.h" #include "XmlRpcException.h" #include "XmlRpcServer.h" #include "XmlRpcServerMethod.h" #include "XmlRpcValue.h" #include "XmlRpcUtil.h" namespace XmlRpc { //! An interface allowing custom handling of error message reporting. class XmlRpcErrorHandler { public: XmlRpcErrorHandler() {} virtual ~XmlRpcErrorHandler() {} //! Returns a pointer to the currently installed error handling object. static XmlRpcErrorHandler* getErrorHandler() { return _errorHandler; } //! Specifies the error handler. static void setErrorHandler(XmlRpcErrorHandler* eh) { _errorHandler = eh; } //! Report an error. Custom error handlers should define this method. virtual void error(const char* msg) = 0; protected: static XmlRpcErrorHandler* _errorHandler; }; //! An interface allowing custom handling of informational message reporting. class XmlRpcLogHandler { public: XmlRpcLogHandler() {} virtual ~XmlRpcLogHandler() {} //! Returns a pointer to the currently installed message reporting object. static XmlRpcLogHandler* getLogHandler() { return _logHandler; } //! Specifies the message handler. static void setLogHandler(XmlRpcLogHandler* lh) { _logHandler = lh; } //! Returns the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static int getVerbosity() { return _verbosity; } //! Specify the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static void setVerbosity(int v) { _verbosity = v; } //! Output a message. Custom error handlers should define this method. virtual void log(int level, const char* msg) = 0; protected: static XmlRpcLogHandler* _logHandler; static int _verbosity; }; //! Returns log message verbosity. This is short for XmlRpcLogHandler::getVerbosity() int getVerbosity(); //! Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level) void setVerbosity(int level); //! Version identifier extern const char XMLRPC_VERSION[]; } // namespace XmlRpc #endif // _XMLRPC_H_ ������flmsg-2.0.10/src/xmlrpcpp/XmlRpcSocket.cpp����������������������������������������������������������0000664�0001750�0001750�00000012015�12516460021�015337� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include <stdio.h> # include <winsock2.h> //# pragma lib(WS2_32.lib) # define EINPROGRESS WSAEINPROGRESS # define EWOULDBLOCK WSAEWOULDBLOCK # define ETIMEDOUT WSAETIMEDOUT typedef int socklen_t; #include "compat.h" #else extern "C" { # include <unistd.h> # include <stdio.h> # include <string.h> # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> # include <netdb.h> # include <errno.h> # include <fcntl.h> # include <signal.h> } #endif // _WINDOWS using namespace XmlRpc; // One-time initializations static bool initialized = false; static void initialize() { initialized = true; #if defined(_WINDOWS) { WORD wVersionRequested = MAKEWORD( 2, 0 ); WSADATA wsaData; WSAStartup(wVersionRequested, &wsaData); atexit((void(*)(void)) WSACleanup); } #else { // Ignore SIGPIPE (void) signal(SIGPIPE, SIG_IGN); } #endif // _WINDOWS } // These errors are not considered fatal for an IO operation; the operation will be re-tried. bool XmlRpcSocket::nonFatalError() { int err = XmlRpcSocket::getError(); return (err == EINPROGRESS || #if defined(EAGAIN) err == EAGAIN || #endif #if defined(EINTR) err == EINTR || #endif err == EWOULDBLOCK); } XmlRpcSocket::Socket XmlRpcSocket::socket() { if ( ! initialized) initialize(); return ::socket(AF_INET, SOCK_STREAM, 0); } void XmlRpcSocket::close(XmlRpcSocket::Socket fd) { XmlRpcUtil::log(4, "XmlRpcSocket::close: fd %d.", fd); #if defined(_WINDOWS) closesocket(fd); #else ::close(fd); #endif // _WINDOWS } bool XmlRpcSocket::setNonBlocking(XmlRpcSocket::Socket fd) { #if defined(_WINDOWS) unsigned long flag = 1; return (ioctlsocket(fd, FIONBIO, &flag) == 0); #else return (fcntl(fd, F_SETFL, O_NONBLOCK) == 0); #endif // _WINDOWS } bool XmlRpcSocket::setReuseAddr(XmlRpcSocket::Socket fd) { // Allow this port to be re-bound immediately so server re-starts are not delayed int sflag = 1; return (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&sflag, sizeof(sflag)) == 0); } // Bind to a specified port bool XmlRpcSocket::bind(XmlRpcSocket::Socket fd, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr.s_addr = htonl(INADDR_ANY); saddr.sin_port = htons((u_short) port); return (::bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) == 0); } // Set socket in listen mode bool XmlRpcSocket::listen(XmlRpcSocket::Socket fd, int backlog) { return (::listen(fd, backlog) == 0); } XmlRpcSocket::Socket XmlRpcSocket::accept(XmlRpcSocket::Socket fd) { struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); return ::accept(fd, (struct sockaddr*)&addr, &addrlen); } // Connect a socket to a server (from a client) bool XmlRpcSocket::connect(XmlRpcSocket::Socket fd, std::string& host, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; struct hostent *hp = gethostbyname(host.c_str()); if (hp == 0) return false; saddr.sin_family = hp->h_addrtype; memcpy(&saddr.sin_addr, hp->h_addr, hp->h_length); saddr.sin_port = htons((u_short) port); // For asynch operation, this will return EWOULDBLOCK (windows) or // EINPROGRESS (linux) and we just need to wait for the socket to be writable... int result = ::connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)); return result == 0 || nonFatalError(); } // Get the port of a bound socket int XmlRpcSocket::getPort(XmlRpcSocket::Socket socket) { struct sockaddr_in saddr; socklen_t saddr_len = sizeof(saddr); int port; int result = ::getsockname(socket, (sockaddr*) &saddr, &saddr_len); if (result != 0) { port = -1; } else { port = ntohs(saddr.sin_port); } return port; } // Returns last errno int XmlRpcSocket::getError() { #if defined(_WINDOWS) return WSAGetLastError(); #else return errno; #endif } // Returns message corresponding to last errno std::string XmlRpcSocket::getErrorMsg() { return getErrorMsg(getError()); } // Returns message corresponding to errno... well, it should anyway std::string XmlRpcSocket::getErrorMsg(int error) { char err[60]; snprintf(err,sizeof(err),"error %d", error); return std::string(err); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcValue.h�������������������������������������������������������������0000664�0001750�0001750�00000027212�12515501705�014641� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCVALUE_H_ #define _XMLRPCVALUE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <map> #include <string> #include <vector> #include <time.h> namespace XmlRpc { enum xmlrpc_nil_t { nil }; //! A class to represent RPC arguments and results. //! Each XmlRpcValue object contains a typed value, //! where the type is determined by the initial value //! assigned to the object. // should probably refcount them... class XmlRpcValue { public: //! XmlRpcValue types enum Type { TypeInvalid, TypeNil, TypeBoolean, TypeInt, TypeUnsigned, TypeLongLong, TypeDouble, TypeString, TypeDateTime, TypeBase64, TypeArray, TypeStruct }; // Non-primitive types typedef std::vector<unsigned char> BinaryData; typedef std::vector<XmlRpcValue> ValueArray; typedef std::map<std::string, XmlRpcValue> ValueStruct; // Constructors //! Construct an empty XmlRpcValue XmlRpcValue() : _type(TypeInvalid) { _value.asBinary = 0; } //! Construct an XmlRpcValue with a nil value XmlRpcValue(xmlrpc_nil_t value) : _type(TypeNil) { } //! Construct an XmlRpcValue with a bool value XmlRpcValue(bool value) : _type(TypeBoolean) { _value.asBool = value; } //! Construct an XmlRpcValue with an int value XmlRpcValue(int value) : _type(TypeInt) { _value.asInt = value; } XmlRpcValue(unsigned int value) : _type(TypeUnsigned) { _value.asUnsigned = value; } XmlRpcValue(long long value) : _type(TypeLongLong) { _value.asLongLong = value; } //! Construct an XmlRpcValue with a double value XmlRpcValue(double value) : _type(TypeDouble) { _value.asDouble = value; } //! Construct an XmlRpcValue with a string value XmlRpcValue(std::string const& value) : _type(TypeString) { _value.asString = new std::string(value); } //! Construct an XmlRpcValue with a string value. //! @param value A null-terminated (C) string. XmlRpcValue(const char* value) : _type(TypeString) { _value.asString = new std::string(value); } XmlRpcValue(BinaryData const& value) : _type(TypeBase64) { _value.asBinary = new BinaryData(value); } XmlRpcValue(ValueStruct const& value) : _type(TypeStruct) { _value.asStruct = new ValueStruct(value); } XmlRpcValue(ValueArray const& value) : _type(TypeArray) { _value.asArray = new ValueArray(value); } //! Construct an XmlRpcValue with a date/time value. //! @param value A pointer to a struct tm (see localtime) XmlRpcValue(struct tm* value) : _type(TypeDateTime) { _value.asTime = new struct tm(*value); } //! Construct an XmlRpcValue with a binary data value //! @param value A pointer to data //! @param nBytes The length of the data pointed to, in bytes XmlRpcValue(void* value, int nBytes) : _type(TypeBase64) { _value.asBinary = new BinaryData((char*)value, ((char*)value)+nBytes); } //! Construct from xml, beginning at *offset chars into the string, updates offset XmlRpcValue(std::string const& xml, int* offset) : _type(TypeInvalid) { if ( ! fromXml(xml,offset)) _type = TypeInvalid; } //! Copy constructor XmlRpcValue(XmlRpcValue const& rhs) : _type(TypeInvalid) { *this = rhs; } //! Destructor (make virtual if you want to subclass) /*virtual*/ ~XmlRpcValue() { invalidate(); } //! Erase the current value void clear() { invalidate(); } // Operators //! Assignment from one XmlRpcValue to this one. //! @param rhs The value in rhs is copied to this value. XmlRpcValue& operator=(XmlRpcValue const& rhs); //! Assign nil to this XmlRpcValue. XmlRpcValue& operator=(xmlrpc_nil_t const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a bool to this XmlRpcValue. XmlRpcValue& operator=(bool const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign an int to this XmlRpcValue. XmlRpcValue& operator=(int const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a double to this XmlRpcValue. XmlRpcValue& operator=(double const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a string to this XmlRpcValue. XmlRpcValue& operator=(const char* rhs) { return operator=(XmlRpcValue(std::string(rhs))); } //! Tests two XmlRpcValues for equality bool operator==(XmlRpcValue const& other) const; //! Tests two XmlRpcValues for inequality bool operator!=(XmlRpcValue const& other) const; //! Treat an XmlRpcValue as a bool. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBoolean. operator bool&() { assertType(TypeBoolean); return _value.asBool; } operator bool() const { assertType(TypeBoolean); return _value.asBool; } //! Treat an XmlRpcValue as an int. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeInt. operator int&() { assertType(TypeInt); return _value.asInt; } operator int() const { assertType(TypeInt); return _value.asInt; } operator unsigned int&() { assertType(TypeUnsigned); return _value.asUnsigned; } operator unsigned int() const { assertType(TypeUnsigned); return _value.asUnsigned; } operator long long&() { assertType(TypeLongLong); return _value.asLongLong; } operator long long() const { assertType(TypeLongLong); return _value.asLongLong; } //! Treat an XmlRpcValue as a double. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDouble. operator double&() { assertType(TypeDouble); return _value.asDouble; } operator double() const { assertType(TypeDouble); return _value.asDouble; } //! Treat an XmlRpcValue as a string. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeString. operator std::string&() { assertType(TypeString); return *_value.asString; } operator std::string const&() const { assertType(TypeString); return *_value.asString; } //! Access the BinaryData value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBase64. operator BinaryData&() { assertType(TypeBase64); return *_value.asBinary; } operator BinaryData const&() const { assertType(TypeBase64); return *_value.asBinary; } //! Access the DateTime value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDateTime. operator struct tm&() { assertType(TypeDateTime); return *_value.asTime; } operator struct tm const&() const { assertType(TypeDateTime); return *_value.asTime; } //! Const array value accessor. //! Access the ith value of the array. //! Throws XmlRpcException if the value is not an array or if the index i is //! not a valid index for the array. XmlRpcValue const& operator[](int i) const { assertArray(i+1); return _value.asArray->at(i); } //! Array value accessor. //! Access the ith value of the array, growing the array if necessary. //! Throws XmlRpcException if the value is not an array. XmlRpcValue& operator[](int i) { assertArray(i+1); return _value.asArray->at(i); } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](std::string const& k) { assertStruct(); return (*_value.asStruct)[k]; } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](const char* k) { assertStruct(); std::string s(k); return (*_value.asStruct)[s]; } //! Access the struct value map. //! Can be used to iterate over the entries in the map to find all defined entries. operator ValueStruct const&() { assertStruct(); return *_value.asStruct; } operator ValueArray const&() const { assertType(TypeArray); return *_value.asArray; } // Accessors //! Return true if the value has been set to something. bool valid() const { return _type != TypeInvalid; } //! Return the type of the value stored. \see Type. Type const &getType() const { return _type; } //! Return the size for string, base64, array, and struct values. int size() const; //! Specify the size for array values. Array values will grow beyond this size if needed. void setSize(int size) { assertArray(size); } //! Check for the existence of a struct member by name. bool hasMember(const std::string& name) const; //! Decode xml. Destroys any existing value. bool fromXml(std::string const& valueXml, int* offset); //! Encode the Value in xml std::string toXml() const; //! Write the value (no xml encoding) std::ostream& write(std::ostream& os) const; // Formatting //! Return the format used to write double values. static std::string const& getDoubleFormat() { return _doubleFormat; } //! Specify the format used to write double values. static void setDoubleFormat(const char* f) { _doubleFormat = f; } protected: // Clean up void invalidate(); // Type checking. Non-const versions coerce to the desired type if currently un-typed. void assertType(Type t) const; void assertType(Type t); void assertArray(int size) const; void assertArray(int size); void assertStruct(); // XML decoding bool boolFromXml(std::string const& valueXml, int* offset); bool intFromXml(std::string const& valueXml, int* offset); bool doubleFromXml(std::string const& valueXml, int* offset); bool stringFromXml(std::string const& valueXml, int* offset); bool timeFromXml(std::string const& valueXml, int* offset); bool binaryFromXml(std::string const& valueXml, int* offset); bool arrayFromXml(std::string const& valueXml, int* offset); bool structFromXml(std::string const& valueXml, int* offset); // XML encoding std::string nilToXml() const; std::string boolToXml() const; std::string intToXml() const; std::string doubleToXml() const; std::string stringToXml() const; std::string timeToXml() const; std::string binaryToXml() const; std::string arrayToXml() const; std::string structToXml() const; // Format strings static std::string _doubleFormat; // Type tag and values Type _type; // At some point I will split off Arrays and Structs into // separate ref-counted objects for more efficient copying. union { bool asBool; int asInt; unsigned int asUnsigned; long long asLongLong; double asDouble; struct tm* asTime; std::string* asString; BinaryData* asBinary; ValueArray* asArray; ValueStruct* asStruct; } _value; }; } // namespace XmlRpc std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v); #endif // _XMLRPCVALUE_H_ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcSource.h������������������������������������������������������������0000664�0001750�0001750�00000006422�12515501705�015025� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOURCE_H_ #define _XMLRPCSOURCE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include "XmlRpcSocket.h" namespace XmlRpc { //! Proxy for Ssl data to avoid including headers here. struct SslProxy; //! An RPC source represents a file descriptor to monitor class XmlRpcSource { public: //! Constructor //! @param fd The socket file descriptor to monitor. //! @param deleteOnClose If true, the object deletes itself when close is called. XmlRpcSource(XmlRpcSocket::Socket fd = XmlRpcSocket::Invalid, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcSource(); //! Return the file descriptor being monitored. XmlRpcSocket::Socket getfd() const { return _fd; } //! Specify the file descriptor to monitor. void setfd(XmlRpcSocket::Socket fd) { _fd = fd; } //! Return whether the file descriptor should be kept open if it is no longer monitored. bool getKeepOpen() const { return _keepOpen; } //! Specify whether the file descriptor should be kept open if it is no longer monitored. void setKeepOpen(bool b=true) { _keepOpen = b; } //! Return whether ssl is enabled. bool getSslEnabled() const { return _sslEnabled; } //! Specify whether to enable ssl. Use getSslEnabled() to verify that Ssl is available. void setSslEnabled(bool b=true); //! Close the owned fd. If deleteOnClose was specified at construction, the object is deleted. virtual void close(); //! Return true to continue monitoring this source virtual unsigned handleEvent(unsigned eventType) = 0; protected: // Execution processing helpers virtual bool doConnect(); //! Read text from the source. Returns false on error. bool nbRead(std::string& s, bool *eof); //! Write text to the source. Returns false on error. bool nbWrite(std::string const& s, int *bytesSoFar); private: // Socket. This is an int for linux/unix, and unsigned on win32, and unsigned __int64 on win64. // Casting to int/long/unsigned on win64 is a bad idea. XmlRpcSocket::Socket _fd; // In the server, a new source (XmlRpcServerConnection) is created // for each connected client. When each connection is closed, the // corresponding source object is deleted. bool _deleteOnClose; // In the client, keep connections open if you intend to make multiple calls. bool _keepOpen; // Enable use of SSL bool _sslEnabled; // SSL data SslProxy *_ssl; }; } // namespace XmlRpc #endif //_XMLRPCSOURCE_H_ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcClient.cpp����������������������������������������������������������0000664�0001750�0001750�00000036125�12515501705�015341� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcClient.h" #include "XmlRpcSocket.h" #include "XmlRpc.h" #include "XmlRpcBase64.h" // For HTTP authentication encoding #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <string> using namespace XmlRpc; using namespace std; // Static data const char REQUEST_BEGIN[] = "<?xml version=\"1.0\"?>\r\n" "<methodCall><methodName>"; const char REQUEST_END_METHODNAME[] = "</methodName>\r\n"; const char PARAMS_TAG[] = "<params>"; const char PARAMS_ETAG[] = "</params>"; const char PARAM_TAG[] = "<param>"; const char PARAM_ETAG[] = "</param>"; const char REQUEST_END[] = "</methodCall>\r\n"; XmlRpcClient::XmlRpcClient(const char* host, int port, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d.", host, port); _host = host; _port = port; if (uri && *uri) _uri = uri; else _uri = "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d, login %s.", host, port, login); _host = host; _port = port; _login = login ? login : ""; _password = password ? password : ""; _uri = uri ? uri : "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::~XmlRpcClient() { XmlRpcUtil::log(1, "XmlRpcClient dtor client: host %s, port %d.", _host.c_str(), _port); if (_connectionState != NO_CONNECTION) close(); } // Close the owned fd void XmlRpcClient::close() { XmlRpcUtil::log(4, "XmlRpcClient::close: fd %d.", getfd()); _connectionState = NO_CONNECTION; _disp.exit(); _disp.removeSource(this); XmlRpcSource::close(); } // Clear the referenced flag even if exceptions or errors occur. struct ClearFlagOnExit { ClearFlagOnExit(bool& flag) : _flag(flag) {} ~ClearFlagOnExit() { _flag = false; } bool& _flag; }; // Execute the named procedure on the remote server. // Params should be an array of the arguments for the method. // Returns true if the request was sent and a result received (although the result // might be a fault). bool XmlRpcClient::execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds) { XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s (_connectionState %d).", method, _connectionState); // This is not a thread-safe operation, if you want to do multithreading, use separate // clients for each thread. If you want to protect yourself from multiple threads // accessing the same client, replace this code with a real mutex. if (_executing) return false; _executing = true; ClearFlagOnExit cf(_executing); _sendAttempts = 0; _isFault = false; if ( ! setupConnection()) return false; if ( ! generateRequest(method, params)) return false; result.clear(); // Process until either a response is received or the timeout period passes _disp.work(timeoutSeconds); if (_connectionState != IDLE || ! parseResponse(result)) return false; XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s completed.", method); _response.clear(); return true; } // XmlRpcSource interface implementation // Handle server responses. Called by the event dispatcher during execute. unsigned XmlRpcClient::handleEvent(unsigned eventType) { if (eventType == XmlRpcDispatch::Exception) { //if (XmlRpcSocket::nonFatalError()) // return (_connectionState == WRITE_REQUEST) // ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; if (_connectionState == WRITE_REQUEST && _bytesWritten == 0) XmlRpcUtil::error("Error in XmlRpcClient::handleEvent: could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); else XmlRpcUtil::error("Error in XmlRpcClient::handleEvent (state %d): %s.", _connectionState, XmlRpcSocket::getErrorMsg().c_str()); return 0; } if (_connectionState == WRITE_REQUEST) if ( ! writeRequest()) return 0; if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_RESPONSE) if ( ! readResponse()) return 0; // This should probably always ask for Exception events too return (_connectionState == WRITE_REQUEST) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } // Create the socket connection to the server if necessary bool XmlRpcClient::setupConnection() { // If an error occurred last time through, or if the server closed the connection, close our end if ((_connectionState != NO_CONNECTION && _connectionState != IDLE) || _eof) close(); _eof = false; if (_connectionState == NO_CONNECTION) if (! doConnect()) return false; // Prepare to write the request _connectionState = WRITE_REQUEST; _bytesWritten = 0; // Notify the dispatcher to listen on this source (calls handleEvent when the socket is writable) _disp.removeSource(this); // Make sure nothing is left over _disp.addSource(this, XmlRpcDispatch::WritableEvent | XmlRpcDispatch::Exception); return true; } // Connect to the xmlrpc server bool XmlRpcClient::doConnect() { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (fd == XmlRpcSocket::Invalid) { XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::doConnect: fd %d.", fd); this->setfd(fd); // Don't block on connect/reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not set socket to non-blocking IO mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } if ( ! XmlRpcSocket::connect(fd, _host, _port)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } return XmlRpcSource::doConnect(); } // Encode the request to call the specified method with the specified parameters into xml bool XmlRpcClient::generateRequest(const char* methodName, XmlRpcValue const& params) { std::string body = REQUEST_BEGIN; body += methodName; body += REQUEST_END_METHODNAME; // If params is an array, each element is a separate parameter if (params.valid()) { body += PARAMS_TAG; if (params.getType() == XmlRpcValue::TypeArray) { for (int i=0; i<params.size(); ++i) { body += PARAM_TAG; body += params[i].toXml(); body += PARAM_ETAG; } } else { body += PARAM_TAG; body += params.toXml(); body += PARAM_ETAG; } body += PARAMS_ETAG; } body += REQUEST_END; std::string header = generateHeader(body); XmlRpcUtil::log(4, "XmlRpcClient::generateRequest: header is %d bytes, content-length is %d.", header.length(), body.length()); _request = header + body; return true; } // Prepend http headers std::string XmlRpcClient::generateHeader(std::string const& body) { std::string header = "POST " + _uri + " HTTP/1.1\r\n" "User-Agent: "; header += XMLRPC_VERSION; header += "\r\nHost: "; header += _host; char buff[40]; sprintf(buff,":%d\r\n", _port); header += buff; if (_login.length() != 0) { // convert to base64 std::vector<char> base64data; int iostatus = 0; xmlrpc_base64<char> encoder; std::back_insert_iterator<std::vector<char> > ins = std::back_inserter(base64data); std::string authBuf = _login + ":" + _password; encoder.put(authBuf.begin(), authBuf.end(), ins, iostatus, xmlrpc_base64<>::crlf()); header += "Authorization: Basic "; std::string authEnc(base64data.begin(), base64data.end()); // handle pesky linefeed characters string::size_type lf; while ( (lf = authEnc.find("\r")) != string::npos ) { authEnc.erase(lf, 1); } while ( (lf = authEnc.find("\n")) != string::npos ) { authEnc.erase(lf, 1); } header += authEnc; header += "\r\n"; } header += "Content-Type: text/xml\r\nContent-length: "; sprintf(buff,"%d\r\n\r\n", static_cast<int>(body.size())); return header + buff; } bool XmlRpcClient::writeRequest() { if (_bytesWritten == 0) XmlRpcUtil::log(5, "XmlRpcClient::writeRequest (attempt %d):\n%s\n", _sendAttempts+1, _request.c_str()); // Try to write the request if ( ! nbWrite(_request, &_bytesWritten)) { XmlRpcUtil::error("Error in XmlRpcClient::writeRequest: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::writeRequest: wrote %d of %d bytes.", _bytesWritten, _request.length()); // Wait for the result if (_bytesWritten == int(_request.length())) { _header = ""; _response = ""; _connectionState = READ_HEADER; } return true; } // Read the header from the response bool XmlRpcClient::readHeader() { // Read available data if ( ! nbRead(_header, &_eof) || (_eof && _header.length() == 0)) { // If we haven't read any data yet and this is a keep-alive connection, the server may // have timed out, so we try one more time. if (getKeepOpen() && _header.length() == 0 && _sendAttempts++ == 0) { XmlRpcUtil::log(4, "XmlRpcClient::readHeader: re-trying connection"); XmlRpcSource::close(); _connectionState = NO_CONNECTION; _eof = false; return setupConnection(); } XmlRpcUtil::error("Error in XmlRpcClient::readHeader: error while reading header (%s) on fd %d.", XmlRpcSocket::getErrorMsg().c_str(), getfd()); return false; } XmlRpcUtil::log(4, "XmlRpcClient::readHeader: client has read %d bytes", _header.length()); return parseHeader(); } bool XmlRpcClient::parseHeader() { char const *hp = _header.c_str(); // Start of header char const *ep = hp + _header.length(); // End of string char const *bp = 0; // Start of body char const *lp = 0; // Start of content-length value std::string const CONTINUE100("100 Continue"); int nc100 = int(CONTINUE100.length()); for (char const *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) { lp = cp + 16; } else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) cp += 3; else bp = cp + 4; } else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) ++ cp; else bp = cp + 2; } } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { if (_eof) // EOF in the middle of a response is an error { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: EOF while reading header"); return false; // Close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("Error XmlRpcClient::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(4, "client read content length: %d", _contentLength); // Otherwise copy non-header data to response buffer and set state to read response. _response = bp; _header = ""; // should parse out any interesting bits from the header (connection, etc)... _connectionState = READ_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcClient::readResponse() { // If we dont have the entire response yet, read available data if (int(_response.length()) < _contentLength) { if ( ! nbRead(_response, &_eof)) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire _response yet, return (keep reading) if (int(_response.length()) < _contentLength) { if (_eof) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: EOF while reading response"); return false; } return true; } } // Otherwise, parse and return the result XmlRpcUtil::log(3, "XmlRpcClient::readResponse (read %d bytes)", _response.length()); XmlRpcUtil::log(5, "response:\n%s", _response.c_str()); _connectionState = IDLE; return false; // Stop monitoring this source (causes return from work) } // Convert the response xml into a result value bool XmlRpcClient::parseResponse(XmlRpcValue& result) { std::string r; _response.swap(r); // Parse response xml into result bool emptyParam; int offset = 0; if ( ! XmlRpcUtil::findTag("methodResponse",r,&offset,&emptyParam) || emptyParam) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no methodResponse. Response:\n%s", r.c_str()); return false; } // Expect either <params><param>... or <fault>... if (XmlRpcUtil::nextTagIs("params",r,&offset,&emptyParam) && XmlRpcUtil::nextTagIs("param",r,&offset,&emptyParam)) { if (emptyParam) { result = 0; // No result? } else if ( ! result.fromXml(r, &offset)) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", r.c_str()); return false; } } else if (XmlRpcUtil::nextTagIs("fault",r,&offset,&emptyParam)) { _isFault = true; if (emptyParam || ! result.fromXml(r, &offset)) { result = 0; // No result? return false; } } else { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no param or fault tag. Response:\n%s", r.c_str()); return false; } return result.valid(); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcBase64.h������������������������������������������������������������0000664�0001750�0001750�00000020664�12515501705�014615� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #if !defined(__BASE64_H_INCLUDED__) #define __BASE64_H_INCLUDED__ 1 #include <iterator> static int _xmlrpc_base64Chars[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', '0','1','2','3','4','5','6','7','8','9', '+','/' }; #define _0000_0011 0x03 #define _1111_1100 0xFC #define _1111_0000 0xF0 #define _0011_0000 0x30 #define _0011_1100 0x3C #define _0000_1111 0x0F #define _1100_0000 0xC0 #define _0011_1111 0x3F #define _EQUAL_CHAR (-1) #define _UNKNOWN_CHAR (-2) #define _IOS_FAILBIT std::ios_base::failbit #define _IOS_EOFBIT std::ios_base::eofbit #define _IOS_BADBIT std::ios_base::badbit #define _IOS_GOODBIT std::ios_base::goodbit // TEMPLATE CLASS xmlrpc_base64_put template<class _E = char, class _Tr = std::char_traits<_E> > class xmlrpc_base64 { public: typedef unsigned char byte_t; typedef _E char_type; typedef _Tr traits_type; // xmlrpc_base64 requires max line length <= 72 characters // you can fill end of line // it may be crlf, crlfsp, noline or other class like it struct crlf { template<class _OI> _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; return (_To); } }; struct crlfsp { template<class _OI> _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; *_To = _Tr::to_char_type(' '); ++_To; return (_To); } }; struct noline { template<class _OI> _OI operator()(_OI _To) const{ return (_To); } }; struct three2four { void zero() { _data[0] = 0; _data[1] = 0; _data[2] = 0; } byte_t get_0() const { return _data[0]; } byte_t get_1() const { return _data[1]; } byte_t get_2() const { return _data[2]; } void set_0(byte_t _ch) { _data[0] = _ch; } void set_1(byte_t _ch) { _data[1] = _ch; } void set_2(byte_t _ch) { _data[2] = _ch; } // 0000 0000 1111 1111 2222 2222 // xxxx xxxx xxxx xxxx xxxx xxxx // 0000 0011 1111 2222 2233 3333 int b64_0() const {return (_data[0] & _1111_1100) >> 2;} int b64_1() const {return ((_data[0] & _0000_0011) << 4) + ((_data[1] & _1111_0000)>>4);} int b64_2() const {return ((_data[1] & _0000_1111) << 2) + ((_data[2] & _1100_0000)>>6);} int b64_3() const {return (_data[2] & _0011_1111);} void b64_0(int _ch) {_data[0] = ((_ch & _0011_1111) << 2) | (_0000_0011 & _data[0]);} void b64_1(int _ch) { _data[0] = ((_ch & _0011_0000) >> 4) | (_1111_1100 & _data[0]); _data[1] = ((_ch & _0000_1111) << 4) | (_0000_1111 & _data[1]); } void b64_2(int _ch) { _data[1] = ((_ch & _0011_1100) >> 2) | (_1111_0000 & _data[1]); _data[2] = ((_ch & _0000_0011) << 6) | (_0011_1111 & _data[2]); } void b64_3(int _ch){ _data[2] = (_ch & _0011_1111) | (_1100_0000 & _data[2]);} private: byte_t _data[3]; }; template<class _II, class _OI, class _State, class _Endline> _II put(_II _First, _II _Last, _OI _To, _State& _St, _Endline _Endl) const { three2four _3to4; int line_octets = 0; while(_First != _Last) { _3to4.zero(); // 3 _3to4.set_0(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_1(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_2(*_First); _First++; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_3()]); ++_To; if(line_octets == 17) // xmlrpc_base64 72 { //_To = _Endl(_To); *_To = '\n'; ++_To; line_octets = 0; } else ++line_octets; } __end: ; return (_First); } template<class _II, class _OI, class _State> _II get(_II _First, _II _Last, _OI _To, _State& _St) const { three2four _3to4; int _Char; while(_First != _Last) { // Take octet _3to4.zero(); // -- 0 -- // Search next valid char... while((_Char = _getCharType(*_First)) < 0 && _Char == _UNKNOWN_CHAR) { if(++_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; // unexpected EOF } } if(_Char == _EQUAL_CHAR){ // Error! First character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_0(_Char); // -- 1 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; // unexpected EOF return _First; } if(_Char == _EQUAL_CHAR){ // Error! Second character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_1(_Char); // -- 2 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Error! Unexpected EOF. Must be '=' or xmlrpc_base64 character _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR){ // OK! _3to4.b64_2(0); _3to4.b64_3(0); // chek for EOF if(++_First == _Last) { // Error! Unexpected EOF. Must be '='. Ignore it. //_St |= _IOS_BADBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; } else if(_getCharType(*_First) != _EQUAL_CHAR) { // Error! Must be '='. Ignore it. //_St |= _IOS_BADBIT; } else ++_First; // Skip '=' // write 1 byte to output *_To = (byte_t) _3to4.get_0(); return _First; } else _3to4.b64_2(_Char); // -- 3 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Unexpected EOF. It's error. But ignore it. //_St |= _IOS_FAILBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR) { // OK! _3to4.b64_3(0); // write to output 2 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); ++_First; // set position to next character return _First; } else _3to4.b64_3(_Char); // write to output 3 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); *_To = (byte_t) _3to4.get_2(); ++_First; } // while(_First != _Last) return (_First); } protected: int _getCharType(int _Ch) const { if(_xmlrpc_base64Chars[62] == _Ch) return 62; if(_xmlrpc_base64Chars[63] == _Ch) return 63; if((_xmlrpc_base64Chars[0] <= _Ch) && (_xmlrpc_base64Chars[25] >= _Ch)) return _Ch - _xmlrpc_base64Chars[0]; if((_xmlrpc_base64Chars[26] <= _Ch) && (_xmlrpc_base64Chars[51] >= _Ch)) return _Ch - _xmlrpc_base64Chars[26] + 26; if((_xmlrpc_base64Chars[52] <= _Ch) && (_xmlrpc_base64Chars[61] >= _Ch)) return _Ch - _xmlrpc_base64Chars[52] + 52; if(_Ch == _Tr::to_int_type('=')) return _EQUAL_CHAR; return _UNKNOWN_CHAR; } }; #endif ����������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServerMethod.cpp����������������������������������������������������0000664�0001750�0001750�00000002162�12515501705�016524� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcServerMethod.h" #include "XmlRpcServer.h" namespace XmlRpc { XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server) { _name = name; _server = server; if (_server) _server->addMethod(this); } XmlRpcServerMethod::~XmlRpcServerMethod() { if (_server) _server->removeMethod(this); } } // namespace XmlRpc ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServerConnection.h��������������������������������������������������0000664�0001750�0001750�00000005411�12515501705�017050� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERCONNECTION_H_ #define _XMLRPCSERVERCONNECTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> #include "XmlRpcValue.h" #include "XmlRpcSource.h" namespace XmlRpc { // The server waits for client connections and provides support for executing methods class XmlRpcServer; class XmlRpcServerMethod; //! A class to handle XML RPC requests from a particular client class XmlRpcServerConnection : public XmlRpcSource { public: //! Constructor XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcServerConnection(); // XmlRpcSource interface implementation //! Handle IO on the client connection socket. //! @param eventType Type of IO event that occurred. @see XmlRpcDispatch::EventType. virtual unsigned handleEvent(unsigned eventType); protected: //! Reads the http header bool readHeader(); //! Reads the request (based on the content-length header value) bool readRequest(); //! Executes the request and writes the resulting response bool writeResponse(); //! Helper method to execute the client request virtual void executeRequest(); //! The XmlRpc server that accepted this connection XmlRpcServer* _server; //! Possible IO states for the connection enum ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE }; //! Current IO state for the connection ServerConnectionState _connectionState; //! Request headers std::string _header; //! Number of bytes expected in the request body (parsed from header) int _contentLength; //! Request body std::string _request; //! Response std::string _response; //! Number of bytes of the response written so far int _bytesWritten; //! Whether to keep the current client connection open for further requests bool _keepAlive; }; } // namespace XmlRpc #endif // _XMLRPCSERVERCONNECTION_H_ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcValue.cpp�����������������������������������������������������������0000664�0001750�0001750�00000050371�12515501705�015176� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcValue.h" #include "XmlRpcException.h" #include "XmlRpcUtil.h" #include "XmlRpcBase64.h" #include <iostream> #include <ostream> #include <stdlib.h> #include <stdio.h> namespace XmlRpc { static const char VALUE_TAG[] = "value"; static const char NIL_TAG[] = "nil"; static const char BOOLEAN_TAG[] = "boolean"; static const char DOUBLE_TAG[] = "double"; static const char INT_TAG[] = "int"; static const char I4_TAG[] = "i4"; static const char STRING_TAG[] = "string"; static const char DATETIME_TAG[] = "dateTime.iso8601"; static const char BASE64_TAG[] = "base64"; static const char ARRAY_TAG[] = "array"; static const char DATA_TAG[] = "data"; static const char STRUCT_TAG[] = "struct"; static const char MEMBER_TAG[] = "member"; static const char NAME_TAG[] = "name"; // Format strings std::string XmlRpcValue::_doubleFormat("%f"); // Clean up void XmlRpcValue::invalidate() { switch (_type) { case TypeString: delete _value.asString; break; case TypeDateTime: delete _value.asTime; break; case TypeBase64: delete _value.asBinary; break; case TypeArray: delete _value.asArray; break; case TypeStruct: delete _value.asStruct; break; default: break; } _type = TypeInvalid; _value.asBinary = 0; } // Type checking void XmlRpcValue::assertType(Type t) const { if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertType(Type t) { if (_type == TypeInvalid) { _type = t; switch (_type) { // Ensure there is a valid value for the type case TypeString: _value.asString = new std::string(); break; case TypeDateTime: _value.asTime = new struct tm(); break; case TypeBase64: _value.asBinary = new BinaryData(); break; case TypeArray: _value.asArray = new ValueArray(); break; case TypeStruct: _value.asStruct = new ValueStruct(); break; default: _value.asBinary = 0; break; } } else if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertArray(int size) const { if (_type != TypeArray) throw XmlRpcException("type error: expected an array"); else if (int(_value.asArray->size()) < size) throw XmlRpcException("range error: array index too large"); } void XmlRpcValue::assertArray(int size) { if (_type == TypeInvalid) { _type = TypeArray; _value.asArray = new ValueArray(size); } else if (_type == TypeArray) { if (int(_value.asArray->size()) < size) _value.asArray->resize(size); } else throw XmlRpcException("type error: expected an array"); } void XmlRpcValue::assertStruct() { if (_type == TypeInvalid) { _type = TypeStruct; _value.asStruct = new ValueStruct(); } else if (_type != TypeStruct) throw XmlRpcException("type error: expected a struct"); } // Operators XmlRpcValue& XmlRpcValue::operator=(XmlRpcValue const& rhs) { if (this != &rhs) { invalidate(); _type = rhs._type; switch (_type) { case TypeBoolean: _value.asBool = rhs._value.asBool; break; case TypeInt: _value.asInt = rhs._value.asInt; break; case TypeDouble: _value.asDouble = rhs._value.asDouble; break; case TypeDateTime: _value.asTime = new struct tm(*rhs._value.asTime); break; case TypeString: _value.asString = new std::string(*rhs._value.asString); break; case TypeBase64: _value.asBinary = new BinaryData(*rhs._value.asBinary); break; case TypeArray: _value.asArray = new ValueArray(*rhs._value.asArray); break; case TypeStruct: _value.asStruct = new ValueStruct(*rhs._value.asStruct); break; default: _value.asBinary = 0; break; } } return *this; } // Predicate for tm equality static bool tmEq(struct tm const& t1, struct tm const& t2) { return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min && t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday && t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year; } bool XmlRpcValue::operator==(XmlRpcValue const& other) const { if (_type != other._type) return false; switch (_type) { case TypeBoolean: return ( !_value.asBool && !other._value.asBool) || ( _value.asBool && other._value.asBool); case TypeInt: return _value.asInt == other._value.asInt; case TypeDouble: return _value.asDouble == other._value.asDouble; case TypeDateTime: return tmEq(*_value.asTime, *other._value.asTime); case TypeString: return *_value.asString == *other._value.asString; case TypeBase64: return *_value.asBinary == *other._value.asBinary; case TypeArray: return *_value.asArray == *other._value.asArray; // The map<>::operator== requires the definition of value< for kcc case TypeStruct: //return *_value.asStruct == *other._value.asStruct; { if (_value.asStruct->size() != other._value.asStruct->size()) return false; ValueStruct::const_iterator it1=_value.asStruct->begin(); ValueStruct::const_iterator it2=other._value.asStruct->begin(); while (it1 != _value.asStruct->end()) { const XmlRpcValue& v1 = it1->second; const XmlRpcValue& v2 = it2->second; if ( ! (v1 == v2)) return false; it1++; it2++; } return true; } default: break; } return true; // Both invalid values ... } bool XmlRpcValue::operator!=(XmlRpcValue const& other) const { return !(*this == other); } // Works for strings, binary data, arrays, and structs. int XmlRpcValue::size() const { switch (_type) { case TypeString: return int(_value.asString->size()); case TypeBase64: return int(_value.asBinary->size()); case TypeArray: return int(_value.asArray->size()); case TypeStruct: return int(_value.asStruct->size()); default: break; } throw XmlRpcException("type error"); } // Checks for existence of struct member bool XmlRpcValue::hasMember(const std::string& name) const { return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end(); } // Set the value from xml. The chars at *offset into valueXml // should be the start of a <value> tag. Destroys any existing value. bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset) { int savedOffset = *offset; invalidate(); bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(VALUE_TAG, valueXml, offset, &emptyTag)) return false; // Not a value, offset not updated // No value? Pretend its an empty string... if (emptyTag) { *this = ""; return true; } // No type tag? Assume string // bool result = true; bool result = false; int valueOffset = *offset; if (XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { result = true; return stringFromXml(valueXml, &valueOffset); } else if (XmlRpcUtil::nextTagIs(NIL_TAG, valueXml, offset, &emptyTag)) { _type = TypeNil; result = true; } else if (XmlRpcUtil::nextTagIs(BOOLEAN_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = false; result = true; } else result = boolFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BOOLEAN_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(I4_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(I4_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(INT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(INT_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DOUBLE_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0.0; result = true; } else result = doubleFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DOUBLE_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRING_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = ""; result = true; } else result = stringFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRING_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DATETIME_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = timeFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DATETIME_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(BASE64_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = binaryFromXml("", 0); else result = binaryFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BASE64_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(ARRAY_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = arrayFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(ARRAY_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRUCT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = structFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRUCT_TAG, valueXml, offset); } // Unrecognized tag after <value> or no </value> if ( ! result || ! XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { *offset = savedOffset; return false; } return true; } // Encode the Value in xml std::string XmlRpcValue::toXml() const { switch (_type) { case TypeNil: return nilToXml(); case TypeBoolean: return boolToXml(); case TypeInt: return intToXml(); case TypeDouble: return doubleToXml(); case TypeString: return stringToXml(); case TypeDateTime: return timeToXml(); case TypeBase64: return binaryToXml(); case TypeArray: return arrayToXml(); case TypeStruct: return structToXml(); default: break; } return std::string(); // Invalid value } // Boolean bool XmlRpcValue::boolFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart || (ivalue != 0 && ivalue != 1)) return false; _type = TypeBoolean; _value.asBool = (ivalue == 1); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::nilToXml() const { return "<value><nil/></value>"; } std::string XmlRpcValue::boolToXml() const { static std::string booleanTrueXml("<value><boolean>1</boolean></value>"); static std::string booleanFalseXml("<value><boolean>0</boolean></value>"); return _value.asBool ? booleanTrueXml : booleanFalseXml; } // Int bool XmlRpcValue::intFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart) return false; _type = TypeInt; _value.asInt = int(ivalue); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::intToXml() const { char buf[256]; snprintf(buf, sizeof(buf)-1, "<value><i4>%d</i4></value>", _value.asInt); buf[sizeof(buf)-1] = 0; return std::string(buf); } // Double bool XmlRpcValue::doubleFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; double dvalue = strtod(valueStart, &valueEnd); if (valueEnd == valueStart) return false; _type = TypeDouble; _value.asDouble = dvalue; *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::doubleToXml() const { char fmtbuf[256], buf[256]; snprintf(fmtbuf, sizeof(fmtbuf)-1, "<value><double>%s</double></value>", getDoubleFormat().c_str()); fmtbuf[sizeof(fmtbuf)-1] = 0; snprintf(buf, sizeof(buf)-1, fmtbuf, _value.asDouble); buf[sizeof(buf)-1] = 0; return std::string(buf); } // String bool XmlRpcValue::stringFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeString; _value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset))); *offset += int(_value.asString->length()); return true; } std::string XmlRpcValue::stringToXml() const { return std::string("<value>") + XmlRpcUtil::xmlEncode(*_value.asString) + std::string("</value>"); } // DateTime (stored as a struct tm) bool XmlRpcValue::timeFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; std::string stime = valueXml.substr(*offset, valueEnd-*offset); struct tm t; if (sscanf(stime.c_str(),"%4d%2d%2dT%2d:%2d:%2d",&t.tm_year,&t.tm_mon,&t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec) != 6) return false; t.tm_isdst = -1; _type = TypeDateTime; _value.asTime = new struct tm(t); *offset += int(stime.length()); return true; } std::string XmlRpcValue::timeToXml() const { struct tm* t = _value.asTime; char buf[20]; snprintf(buf, sizeof(buf)-1, "%04d%02d%02dT%02d:%02d:%02d", 1900+t->tm_year,1+t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); buf[sizeof(buf)-1] = 0; return std::string("<value><dateTime.iso8601>") + buf + std::string("</dateTime.iso8601></value>"); } // Base64 bool XmlRpcValue::binaryFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeBase64; std::string asString = valueXml.substr(*offset, valueEnd-*offset); _value.asBinary = new BinaryData(); // check whether base64 encodings can contain chars xml encodes... // convert from base64 to binary int iostatus = 0; xmlrpc_base64<char> decoder; std::back_insert_iterator<BinaryData> ins = std::back_inserter(*(_value.asBinary)); decoder.get(asString.begin(), asString.end(), ins, iostatus); *offset += int(asString.length()); return true; } std::string XmlRpcValue::binaryToXml() const { // convert to base64 std::vector<char> base64data; int iostatus = 0; xmlrpc_base64<char> encoder; std::back_insert_iterator<std::vector<char> > ins = std::back_inserter(base64data); encoder.put(_value.asBinary->begin(), _value.asBinary->end(), ins, iostatus, xmlrpc_base64<>::crlf()); // Wrap with xml std::string xml = "<value><base64>"; xml.append(base64data.begin(), base64data.end()); xml += "</base64></value>"; return xml; } // Array bool XmlRpcValue::arrayFromXml(std::string const& valueXml, int* offset) { bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(DATA_TAG, valueXml, offset, &emptyTag)) return false; _type = TypeArray; _value.asArray = new ValueArray; if ( ! emptyTag) { XmlRpcValue v; while (v.fromXml(valueXml, offset)) _value.asArray->push_back(v); // copy... // Skip the trailing </data> (void) XmlRpcUtil::nextTagIsEnd(DATA_TAG, valueXml, offset); } return true; } // In general, its preferable to generate the xml of each element of the // array as it is needed rather than glomming up one big string. std::string XmlRpcValue::arrayToXml() const { std::string xml = "<value><array><data>"; int s = int(_value.asArray->size()); for (int i=0; i<s; ++i) xml += _value.asArray->at(i).toXml(); xml += "</data></array></value>"; return xml; } // Struct bool XmlRpcValue::structFromXml(std::string const& valueXml, int* offset) { _type = TypeStruct; _value.asStruct = new ValueStruct; std::string name; bool emptyTag; while (XmlRpcUtil::nextTagIs(MEMBER_TAG, valueXml, offset, &emptyTag)) { if ( ! emptyTag) { if (XmlRpcUtil::parseTag(NAME_TAG, valueXml, offset, name)) { // value XmlRpcValue val(valueXml, offset); if ( ! val.valid()) { invalidate(); return false; } const std::pair<const std::string, XmlRpcValue> p(name, val); _value.asStruct->insert(p); (void) XmlRpcUtil::nextTagIsEnd(MEMBER_TAG, valueXml, offset); } } } return true; } // In general, its preferable to generate the xml of each element // as it is needed rather than glomming up one big string. std::string XmlRpcValue::structToXml() const { std::string xml = "<value><struct>"; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { xml += "<member><name>"; xml += XmlRpcUtil::xmlEncode(it->first); xml += "</name>"; xml += it->second.toXml(); xml += "</member>"; } xml += "</struct></value>"; return xml; } // Write the value without xml encoding it std::ostream& XmlRpcValue::write(std::ostream& os) const { switch (_type) { default: break; case TypeBoolean: os << _value.asBool; break; case TypeInt: os << _value.asInt; break; case TypeDouble: os << _value.asDouble; break; case TypeString: os << *_value.asString; break; case TypeDateTime: { struct tm* t = _value.asTime; char buf[20]; snprintf(buf, sizeof(buf)-1, "%4d%02d%02dT%02d:%02d:%02d", t->tm_year,t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); buf[sizeof(buf)-1] = 0; os << buf; break; } case TypeBase64: { int iostatus = 0; std::ostreambuf_iterator<char> out(os); xmlrpc_base64<char> encoder; encoder.put(_value.asBinary->begin(), _value.asBinary->end(), out, iostatus, xmlrpc_base64<>::crlf()); break; } case TypeArray: { int s = int(_value.asArray->size()); os << '{'; for (int i=0; i<s; ++i) { if (i > 0) os << ','; _value.asArray->at(i).write(os); } os << '}'; break; } case TypeStruct: { os << '['; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { if (it!=_value.asStruct->begin()) os << ','; os << it->first << ':'; it->second.write(os); } os << ']'; break; } } return os; } } // namespace XmlRpc // ostream std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v) { // If you want to output in xml format: //return os << v.toXml(); return v.write(os); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcClient.h������������������������������������������������������������0000664�0001750�0001750�00000012700�12515501705�014777� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCCLIENT_H_ #define _XMLRPCCLIENT_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { // Arguments and results are represented by XmlRpcValues class XmlRpcValue; //! A class to send XML RPC requests to a server and return the results. class XmlRpcClient : public XmlRpcSource { public: //! Construct a client to connect to the server at the specified host:port address //! @param host The name of the remote machine hosting the server, eg "myserver.mycompany.com" //! @param port The port on the remote machine where the server is listening //! @param uri An optional string to be sent as the URI in the HTTP GET header //! Note that the host is not a URL, do not prepend "http://" or other protocol specifiers. XmlRpcClient(const char* host, int port, const char* uri=0); //! Construct a client to connect to the server at the specified host:port address including HTTP authentication //! @param host The name of the remote machine hosting the server //! @param port The port on the remote machine where the server is listening //! @param login The username passed to the server //! @param pass The password passed to the server //! @param uri An optional string to be sent as the URI in the HTTP GET header XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri=0); //! Destructor virtual ~XmlRpcClient(); //! Execute the named procedure on the remote server. //! @param method The name of the remote procedure to execute //! @param params An array of the arguments for the method //! @param result The result value to be returned to the client //! @param timeoutSeconds Seconds to wait for a response (defaults to forever) //! @return true if the request was sent and a result received //! (although the result might be a fault). //! //! Currently this is a synchronous (blocking) implementation (execute //! does not return until it receives a response or an error). Use isFault() //! to determine whether the result is a fault response. bool execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds = -1); //! Returns true if the result of the last execute() was a fault response. bool isFault() const { return _isFault; } //! Return the host name of the server const char* const host() const { return _host.c_str(); } //! Return the port int port() const { return _port; } //! Return the URI const char* const uri() const { return _uri.c_str(); } // XmlRpcSource interface implementation //! Close the connection virtual void close(); //! Handle server responses. Called by the event dispatcher during execute. //! @param eventType The type of event that occurred. //! @see XmlRpcDispatch::EventType virtual unsigned handleEvent(unsigned eventType); protected: // Execution processing helpers virtual bool doConnect(); virtual bool setupConnection(); virtual bool generateRequest(const char* method, XmlRpcValue const& params); virtual std::string generateHeader(std::string const& body); virtual bool writeRequest(); virtual bool readHeader(); virtual bool parseHeader(); virtual bool readResponse(); virtual bool parseResponse(XmlRpcValue& result); // Possible IO states for the connection enum ClientConnectionState { NO_CONNECTION, CONNECTING, WRITE_REQUEST, READ_HEADER, READ_RESPONSE, IDLE }; ClientConnectionState _connectionState; // Server location std::string _host; std::string _uri; int _port; // Login information for HTTP authentication std::string _login; std::string _password; // The xml-encoded request, http header of response, and response xml std::string _request; std::string _header; std::string _response; // Number of times the client has attempted to send the request int _sendAttempts; // Number of bytes of the request that have been written to the socket so far int _bytesWritten; // True if we are currently executing a request. If you want to multithread, // each thread should have its own client. bool _executing; // True if the server closed the connection bool _eof; // True if a fault response was returned by the server bool _isFault; // Number of bytes expected in the response body (parsed from response header) int _contentLength; // Event dispatcher XmlRpcDispatch _disp; }; // class XmlRpcClient } // namespace XmlRpc #endif // _XMLRPCCLIENT_H_ ����������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcSource.cpp����������������������������������������������������������0000664�0001750�0001750�00000011121�12515501705�015350� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include <stdio.h> # include <winsock2.h> #else extern "C" { # include <unistd.h> # include <stdio.h> } #endif #if USE_OPENSSL # include <openssl/crypto.h> # include <openssl/x509.h> # include <openssl/pem.h> # include <openssl/ssl.h> # include <openssl/err.h> #endif namespace XmlRpc { struct SslProxy { #if USE_OPENSSL SSL_CTX* _ssl_ctx; SSL_METHOD* _ssl_meth; SSL* _ssl_ssl; #endif }; XmlRpcSource::XmlRpcSource(XmlRpcSocket::Socket fd /*= -1*/, bool deleteOnClose /*= false*/) : _fd(fd) , _deleteOnClose(deleteOnClose) , _keepOpen(false) , _sslEnabled(false) , _ssl(0) { } XmlRpcSource::~XmlRpcSource() { delete _ssl; } void XmlRpcSource::setSslEnabled(bool b /*=true*/) { #if USE_OPENSSL _sslEnabled = b; #endif } bool XmlRpcSource::doConnect() { #if USE_OPENSSL // Perform SSL if needed if (_sslEnabled) { _ssl = new SslProxy; SSLeay_add_ssl_algorithms(); _ssl->_ssl_meth = SSLv23_client_method(); SSL_load_error_strings(); _ssl->_ssl_ctx = SSL_CTX_new(_ssl->_ssl_meth); _ssl->_ssl_ssl = SSL_new(_ssl->_ssl_ctx); SSL_set_fd(_ssl->_ssl_ssl, _fd); return SSL_connect(_ssl->_ssl_ssl) == 1; } #endif return true; } // Read available text from the specified socket. Returns false on error. bool XmlRpcSource::nbRead(std::string& s, bool *eof) { const int READ_SIZE = 4096; // Number of bytes to attempt to read at a time char readBuf[READ_SIZE]; bool wouldBlock = false; *eof = false; while ( ! wouldBlock && ! *eof) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_read(_ssl->_ssl_ssl, readBuf, READ_SIZE-1); } else #endif #if defined(_WINDOWS) n = recv(_fd, readBuf, READ_SIZE-1, 0); #else n = read(_fd, readBuf, READ_SIZE-1); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbRead: read/recv returned %d.", n); if (n > 0) { readBuf[n] = 0; s.append(readBuf, n); } else if (n == 0) { *eof = true; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } // Write text to the socket. Returns false on error. bool XmlRpcSource::nbWrite(std::string const& s, int *bytesSoFar) { int nToWrite = int(s.length()) - *bytesSoFar; const char *sp = s.c_str() + *bytesSoFar; bool wouldBlock = false; while ( nToWrite > 0 && ! wouldBlock ) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_write(_ssl->_ssl_ssl, sp, nToWrite); } else #endif #if defined(_WINDOWS) n = send(_fd, sp, nToWrite, 0); #else n = write(_fd, sp, nToWrite); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbWrite: send/write returned %d.", n); if (n > 0) { sp += n; *bytesSoFar += n; nToWrite -= n; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } void XmlRpcSource::close() { #if USE_OPENSSL if (_ssl && _ssl->_ssl_ssl) { SSL_shutdown(_ssl->_ssl_ssl); // Should close be called here ? ... SSL_free(_ssl->_ssl_ssl); SSL_CTX_free(_ssl->_ssl_ctx); delete _ssl; _ssl = 0; } #endif if ( (int)_fd != -1) { XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd); XmlRpcSocket::close(_fd); _fd = -1; } if (_deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this"); _deleteOnClose = false; delete this; } } } // namespace XmlRpc �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServerMethod.h������������������������������������������������������0000664�0001750�0001750�00000003535�12515501705�016176� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERMETHOD_H_ #define _XMLRPCSERVERMETHOD_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> namespace XmlRpc { // Representation of a parameter or result value class XmlRpcValue; // The XmlRpcServer processes client requests to call RPCs class XmlRpcServer; //! Abstract class representing a single RPC method class XmlRpcServerMethod { public: //! Constructor XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0); //! Destructor virtual ~XmlRpcServerMethod(); //! Returns the name of the method std::string& name() { return _name; } //! Execute the method. Subclasses must provide a definition for this method. virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0; //! Returns a help string for the method. //! Subclasses should define this method if introspection is being used. virtual std::string help() { return std::string(); } protected: std::string _name; XmlRpcServer* _server; }; } // namespace XmlRpc #endif // _XMLRPCSERVERMETHOD_H_ �������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcDispatch.h����������������������������������������������������������0000664�0001750�0001750�00000006462�12515501705�015330� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCDISPATCH_H_ #define _XMLRPCDISPATCH_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <vector> namespace XmlRpc { // An RPC source represents a file descriptor to monitor class XmlRpcSource; //! An object which monitors file descriptors for events and performs //! callbacks when interesting events happen. class XmlRpcDispatch { public: //! Constructor XmlRpcDispatch(); ~XmlRpcDispatch(); //! Values indicating the type of events a source is interested in enum EventType { ReadableEvent = 1, //!< data available to read WritableEvent = 2, //!< connected/data can be written without blocking Exception = 4 //!< uh oh }; //! Monitor this source for the event types specified by the event mask //! and call its event handler when any of the events occur. //! @param source The source to monitor //! @param eventMask Which event types to watch for. \see EventType void addSource(XmlRpcSource* source, unsigned eventMask); //! Stop monitoring this source. //! @param source The source to stop monitoring //! The source socket is not closed. void removeSource(XmlRpcSource* source); //! Modify the types of events to watch for on this source void setSourceEvents(XmlRpcSource* source, unsigned eventMask); //! Watch current set of sources and process events for the specified //! duration (in seconds, -1 implies wait forever, or until exit is called) void work(double timeSeconds); //! Exit from work routine void exit(); //! Clear all sources from the monitored sources list. Sources are closed. void clear(); protected: //! Wait for I/O on any source, timeout, or interrupt signal. bool waitForAndProcessEvents(double timeoutSeconds); //! Returns current time in seconds since something double getTime(); // A source to monitor and what to monitor it for struct MonitoredSource { MonitoredSource(XmlRpcSource* src, unsigned mask) : _src(src), _mask(mask) {} XmlRpcSource* getSource() const { return _src; } unsigned& getMask() { return _mask; } XmlRpcSource* _src; unsigned _mask; }; // A list of sources to monitor typedef std::vector< MonitoredSource > SourceList; // Sources being monitored SourceList _sources; // When work should stop (-1 implies wait forever, or until exit is called) double _endTime; bool _doClear; bool _inWork; }; } // namespace XmlRpc #endif // _XMLRPCDISPATCH_H_ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcMutex.h�������������������������������������������������������������0000664�0001750�0001750�00000003345�12515501705�014670� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCMUTEX_H_ #define _XMLRPCMUTEX_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif namespace XmlRpc { //! A simple platform-independent mutex API implemented for posix and windows. class XmlRpcMutex { public: //! Construct a Mutex object. XmlRpcMutex() : _pMutex(0) {} //! Destroy a Mutex object. ~XmlRpcMutex(); //! Wait for the mutex to be available and then acquire the lock. void acquire(); //! Release the mutex. void release(); //! Utility class to acquire a mutex at construction and release it when destroyed. struct AutoLock { //! Acquire the mutex at construction AutoLock(XmlRpcMutex& m) : _m(m) { _m.acquire(); } //! Release at destruction ~AutoLock() { _m.release(); } //! The mutex being held XmlRpcMutex& _m; }; private: //! Native Mutex object void* _pMutex; }; // class XmlRpcMutex } // namespace XmlRpc #endif // _XMLRPCMUTEX_H_ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcDispatch.cpp��������������������������������������������������������0000664�0001750�0001750�00000015274�12515501705�015664� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <config.h> #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #include <errno.h> #include <math.h> #if defined(__FreeBSD__) || defined(__OpenBSD__) # ifdef USE_FTIME # include <sys/timeb.h> # endif #else # include <sys/timeb.h> #endif // __FreeBSD__ #if defined(_WINDOWS) # include <winsock2.h> # define USE_FTIME # if defined(_MSC_VER) # define timeb _timeb # define ftime _ftime # endif #else # include <sys/time.h> #endif // _WINDOWS using namespace XmlRpc; XmlRpcDispatch::XmlRpcDispatch() { _endTime = -1.0; _doClear = false; _inWork = false; } XmlRpcDispatch::~XmlRpcDispatch() { } // Monitor this source for the specified events and call its event handler // when the event occurs void XmlRpcDispatch::addSource(XmlRpcSource* source, unsigned mask) { _sources.push_back(MonitoredSource(source, mask)); } // Stop monitoring this source. Does not close the source. void XmlRpcDispatch::removeSource(XmlRpcSource* source) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { _sources.erase(it); break; } } // Modify the types of events to watch for on this source void XmlRpcDispatch::setSourceEvents(XmlRpcSource* source, unsigned eventMask) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { it->getMask() = eventMask; break; } } // Watch current set of sources and process events void XmlRpcDispatch::work(double timeoutSeconds) { // Compute end time double timeNow = getTime(); _endTime = (timeoutSeconds < 0.0) ? -1.0 : (timeNow + timeoutSeconds); _doClear = false; _inWork = true; // Only work while there is something to monitor while (_sources.size() > 0) { // Wait for and dispatch events if ( ! waitForAndProcessEvents(timeoutSeconds)) { _inWork = false; return; } // Check whether to clear all sources if (_doClear) { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) { XmlRpcSource *src = it->getSource(); src->close(); } _doClear = false; } // Check whether end time has passed or exit has been called if (_endTime == 0.0) // Exit { break; } else if (_endTime > 0.0) // Check for timeout { double t = getTime(); if (t > _endTime) break; // Decrement timeout by elapsed time timeoutSeconds -= (t - timeNow); if (timeoutSeconds < 0.0) timeoutSeconds = 0.0; // Shouldn't happen but its fp math... timeNow = t; } } _inWork = false; } // Exit from work routine. Presumably this will be called from // one of the source event handlers. void XmlRpcDispatch::exit() { _endTime = 0.0; // Return from work asap } // Clear all sources from the monitored sources list void XmlRpcDispatch::clear() { if (_inWork) { _doClear = true; // Finish reporting current events before clearing } else { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) it->getSource()->close(); } } // Time utility- return time in seconds double XmlRpcDispatch::getTime() { #ifdef USE_FTIME struct timeb tbuff; ftime(&tbuff); return ((double) tbuff.time + ((double)tbuff.millitm / 1000.0) + ((double) tbuff.timezone * 60)); #else struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return (tv.tv_sec + tv.tv_usec / 1000000.0); #endif /* USE_FTIME */ } // Wait for I/O on any source, timeout, or interrupt signal. bool XmlRpcDispatch::waitForAndProcessEvents(double timeoutSeconds) { // Construct the sets of descriptors we are interested in fd_set inFd, outFd, excFd; FD_ZERO(&inFd); FD_ZERO(&outFd); FD_ZERO(&excFd); XmlRpcSocket::Socket maxFd = 0; for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) { XmlRpcSocket::Socket fd = it->getSource()->getfd(); if (it->getMask() & ReadableEvent) FD_SET(fd, &inFd); if (it->getMask() & WritableEvent) FD_SET(fd, &outFd); if (it->getMask() & Exception) FD_SET(fd, &excFd); if (it->getMask() && fd > maxFd) maxFd = fd; } // Check for events int nEvents; if (_endTime < 0.0) { nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, NULL); } else { struct timeval tv; tv.tv_sec = (int)floor(timeoutSeconds); tv.tv_usec = ((int)floor(1000000.0 * (timeoutSeconds-floor(timeoutSeconds)))) % 1000000; nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, &tv); } if (nEvents < 0 && errno != EINTR) { XmlRpcUtil::error("Error in XmlRpcDispatch::work: error in select (%d).", nEvents); return false; } // Process events. Copy source list to avoid invalidating iterator by removing sources. SourceList s(_sources); for (SourceList::iterator it=s.begin(); it != s.end(); ++it) { XmlRpcSource* src = it->getSource(); XmlRpcSocket::Socket fd = src->getfd(); if (fd <= maxFd) { // handleEvent is called once per event type signalled unsigned newMask = 0; int nset = 0; if (FD_ISSET(fd, &inFd)) { newMask |= src->handleEvent(ReadableEvent); ++nset; } if (FD_ISSET(fd, &outFd)) { newMask |= src->handleEvent(WritableEvent); ++nset; } if (FD_ISSET(fd, &excFd)) { newMask |= src->handleEvent(Exception); ++nset; } // Some event occurred if (nset) { // This bit is not terribly efficient if many connections are active... if (newMask) { setSourceEvents(src, newMask); } else // Stop monitoring this one { removeSource(src); if ( ! src->getKeepOpen()) src->close(); } } } } return true; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcException.h���������������������������������������������������������0000664�0001750�0001750�00000003131�12515501705�015515� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCEXCEPTION_H_ #define _XMLRPCEXCEPTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #ifndef MAKEDEPEND # include <string> #endif namespace XmlRpc { //! A class representing an error. //! If server methods throw this exception, a fault response is returned //! to the client. class XmlRpcException { public: //! Constructor //! @param message A descriptive error message //! @param code An integer error code XmlRpcException(const std::string& message, int code=-1) : _message(message), _code(code) {} //! Return the error message. const std::string& getMessage() const { return _message; } //! Return the error code. int getCode() const { return _code; } private: std::string _message; int _code; }; } #endif // _XMLRPCEXCEPTION_H_ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcUtil.h��������������������������������������������������������������0000664�0001750�0001750�00000005653�12515501705�014507� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCUTIL_H_ #define _XMLRPCUTIL_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <string> #if defined(_MSC_VER) # define snprintf _snprintf # define vsnprintf _vsnprintf # define strcasecmp _stricmp # define strncasecmp _strnicmp #elif defined(__BORLANDC__) # define strcasecmp stricmp # define strncasecmp strnicmp #endif namespace XmlRpc { //! Utilities for XML parsing, encoding, and decoding and message handlers. class XmlRpcUtil { public: //! Parses the specified tag. No attributes are parsed, no validation is done. //! Sets val to the contents between <tag> and </tag>, or an empty string if <tag/> is found. //! Returns true if the tag is parsed. Updates offset to char after </tag> static bool parseTag(const char* tag, std::string const& xml, int* offset, std::string &val); //! Returns true if the tag is found and updates offset to the char after the tag. //! If the tag is of the form <tag/>, emptyTag is set to true. static bool findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Returns true if the tag is found at the specified offset (modulo any whitespace) //! and updates offset to the char after the tag. If an empty tag is found (eg, //! <tag/>), true is returned, offset is updated to be after the close of the tag, and //! emptyTag is set to true. static bool nextTagIs(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Passes over the next tag found at the specified offset is </tag>, //! offset is updated to be after the close of the tag. //! Will skip over all characters until < is seen. static bool nextTagIsEnd(const char* tag, std::string const& xml, int* offset); //! Convert raw text to encoded xml. static std::string xmlEncode(const std::string& raw); //! Convert encoded xml to raw text static std::string xmlDecode(const std::string& encoded); //! Dump messages somewhere static void log(int level, const char* fmt, ...); //! Dump error messages somewhere static void error(const char* fmt, ...); }; } // namespace XmlRpc #endif // _XMLRPCUTIL_H_ �������������������������������������������������������������������������������������flmsg-2.0.10/src/xmlrpcpp/XmlRpcServer.h������������������������������������������������������������0000664�0001750�0001750�00000012666�12515501705�015042� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese <iam_w1hkj@w1hkj.com> // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVER_H_ #define _XMLRPCSERVER_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include <map> #include <string> #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { // An abstract class supporting XML RPC methods class XmlRpcServerMethod; // Class representing connections to specific clients class XmlRpcServerConnection; // Class representing argument and result values class XmlRpcValue; //! A class to handle XML RPC requests class XmlRpcServer : public XmlRpcSource { public: //! Create a server object. XmlRpcServer(); //! Destructor. virtual ~XmlRpcServer(); //! Specify whether introspection is enabled or not. Default is not enabled. void enableIntrospection(bool enabled=true); //! Add a command to the RPC server void addMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server void removeMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server by name void removeMethod(const std::string& methodName); //! Look up a method by name XmlRpcServerMethod* findMethod(const std::string& name) const; //! Create a socket, bind to the specified port, and //! set it in listen mode to make it available for clients. //! @param port The port to bind and listen on (zero to choose an arbitrary port) bool bindAndListen(int port, int backlog = 5); //! Get the port number this server is listening on. int getPort(void) const; //! Process client requests for the specified time (in seconds) void work(double timeSeconds); //! Temporarily stop processing client requests and exit the work() method. void exit(); //! Close all connections with clients and the socket file descriptor void shutdown(); //! Introspection support void listMethods(XmlRpcValue& result); //! Parses the request xml, runs the method, generates the response (header+xml). //! Returns a fault response if an error occurs during method execution. virtual std::string executeRequest(std::string const& request); // XmlRpcSource interface implementation //! Handle client connection requests virtual unsigned handleEvent(unsigned eventType); //! Remove a connection from the dispatcher virtual void removeConnection(XmlRpcServerConnection*); protected: // Static data static const char METHODNAME_TAG[]; static const char PARAMS_TAG[]; static const char PARAM_TAG[]; static const std::string SYSTEM_MULTICALL; static const std::string METHODNAME; static const std::string PARAMS; static const std::string FAULTCODE; static const std::string FAULTSTRING; //! Accept a client connection request virtual void acceptConnection(); //! Create a new connection object for processing requests from a specific client. //! If the client is not authorized to connect, close the socket and return 0. virtual XmlRpcServerConnection* createConnection(XmlRpcSocket::Socket socket); //! Hand off a new connection object to a dispatcher. virtual void dispatchConnection(XmlRpcServerConnection* sc); //! Parse the methodName and parameters from the request. //! @returns the methodName std::string parseRequest(std::string const& request, XmlRpcValue& params); //! Execute a named method with the specified params. bool executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Execute multiple calls and return the results in an array. //! System.multicall implementation bool executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Construct a response from the result XML. std::string generateResponse(std::string const& resultXml); //! Construct a fault response. std::string generateFaultResponse(std::string const& msg, int errorCode = -1); //! Return the appropriate headers for the response. std::string generateHeader(std::string const& body); //! Whether the introspection API is supported by this server bool _introspectionEnabled; //! Event dispatcher XmlRpcDispatch _disp; //! Collection of methods. This could be a set keyed on method name if we wanted... typedef std::map< std::string, XmlRpcServerMethod* > MethodMap; //! Registered RPC methods. MethodMap _methods; //! List all registered RPC methods (only available if introspection is enabled) XmlRpcServerMethod* _listMethods; //! Return help string for a specified method (only available if introspection is enabled) XmlRpcServerMethod* _methodHelp; }; } // namespace XmlRpc #endif //_XMLRPCSERVER_H_ ��������������������������������������������������������������������������flmsg-2.0.10/src/redx/������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011454� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_tab.cxx������������������������������������������������������������������0000664�0001750�0001750�00000002371�12330516146�013676� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" Fl_Group *tab_redx = (Fl_Group *)0; Fl_Tabs *tab_redx_type = (Fl_Tabs *)0; void redx_changed(Fl_Widget *, void *) { estimate(); } void create_redx_tab() { create_redx_snw(); create_redx_5739(); create_redx_5739A(); create_redx_5739B(); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739B_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000015661�12330516146�014475� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_redx_5739B = (Fl_Group *)0; Fl_Tabs *tab_redx_5739B_type = (Fl_Tabs *)0; Fl_Group *tab_redx_5739B_1 = (Fl_Group *)0; Fl_Input2 *rdx_5739B_nbr = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_name = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_state = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_cnty = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_city = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_date = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_street = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_georef = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_north = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_east = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_south = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_west = (Fl_Input2 *)0; Fl_Group *tab_redx_5739B_2 = (Fl_Group *)0; Fl_Input2 *rdx_5739B_dwell = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_ds = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_mj = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_mn = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_af = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_in = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_un = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_bs = (Fl_Input2 *)0; Fl_Input2 *rdx_5739B_gi = (Fl_Input2 *)0; //---------------------------------------------------------------------- // widget callbacks & support //---------------------------------------------------------------------- static void cb_btn_5739B_date(Fl_Button*, void*) { rdx_5739B_date->value(szDate()); estimate(); } void create_redx_5739B() { int Y = tab_top; tab_redx_5739B = new Fl_Group(0, Y, 570, 390); tab_redx_5739B->align(FL_ALIGN_TOP); tab_redx_5739B_type = new Fl_Tabs(0, Y+2, 570, 387); tab_redx_5739B_type->selection_color((Fl_Color)246); tab_redx_5739B_1 = new Fl_Group(0, Y+25, 570, 360, _("DR data")); Y += 35; Fl_Box *bx = new Fl_Box(50, Y, 200, 24, _("Red Cross Form 5739B")); bx->box(FL_FLAT_BOX); bx->align(FL_ALIGN_INSIDE | FL_ALIGN_CENTER); Y += 30; rdx_5739B_nbr = new Fl_Input2(100, Y, 150, 24, _("DR #")); rdx_5739B_nbr->tooltip(_("")); rdx_5739B_nbr->callback(redx_changed); rdx_5739B_nbr->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_name = new Fl_Input2(100, Y, 250, 24, _("DR Name")); rdx_5739B_name->tooltip(_("")); rdx_5739B_name->callback(redx_changed); rdx_5739B_name->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_state = new Fl_Input2(100, Y, 50, 24, _("State")); rdx_5739B_state->tooltip(_("")); rdx_5739B_state->callback(redx_changed); rdx_5739B_state->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_cnty = new Fl_Input2(100, Y, 250, 24, _("County")); rdx_5739B_cnty->tooltip(_("")); rdx_5739B_cnty->callback(redx_changed); rdx_5739B_cnty->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_city = new Fl_Input2(100, Y, 450, 24, _("City")); rdx_5739B_city->tooltip(_("")); rdx_5739B_city->callback(redx_changed); rdx_5739B_city->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_date = new Fl_Input2(100, Y, 150, 24, _("Date")); rdx_5739B_date->tooltip(_("")); rdx_5739B_date->callback(redx_changed); rdx_5739B_date->when(FL_WHEN_CHANGED); Fl_Button *btn_5739B_date = new Fl_Button(260, Y+2, 20, 20, _("...")); btn_5739B_date->tooltip(_("Set today")); btn_5739B_date->callback((Fl_Callback*)cb_btn_5739B_date); Y += 30; rdx_5739B_georef = new Fl_Input2(100, Y, 450, 24, _("Geo. Ref.")); rdx_5739B_georef->tooltip(_("")); rdx_5739B_georef->callback(redx_changed); rdx_5739B_georef->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_north = new Fl_Input2(175, Y, 225, 24, _("Boundaries, North:")); rdx_5739B_north->tooltip(_("")); rdx_5739B_north->callback(redx_changed); rdx_5739B_north->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_west = new Fl_Input2(50, Y, 225, 24, _("West:")); rdx_5739B_west->tooltip(_("")); rdx_5739B_west->callback(redx_changed); rdx_5739B_west->when(FL_WHEN_CHANGED); rdx_5739B_east = new Fl_Input2(325, Y, 225, 24, _("East:")); rdx_5739B_east->tooltip(_("")); rdx_5739B_east->callback(redx_changed); rdx_5739B_east->when(FL_WHEN_CHANGED); Y += 30; rdx_5739B_south = new Fl_Input2(175, Y, 225, 24, _("South:")); rdx_5739B_south->tooltip(_("")); rdx_5739B_south->callback(redx_changed); rdx_5739B_south->when(FL_WHEN_CHANGED); tab_redx_5739B_1->end(); Y = tab_top; tab_redx_5739B_2 = new Fl_Group(0, Y+25, 570, 360, _("Area")); Y += 35; rdx_5739B_dwell = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); rdx_5739B_dwell->tooltip(_("")); rdx_5739B_dwell->callback(redx_changed); rdx_5739B_dwell->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_ds = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); rdx_5739B_ds->tooltip(_("")); rdx_5739B_ds->callback(redx_changed); rdx_5739B_ds->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_mj = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); rdx_5739B_mj->tooltip(_("")); rdx_5739B_mj->callback(redx_changed); rdx_5739B_mj->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_mn = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); rdx_5739B_mn->tooltip(_("")); rdx_5739B_mn->callback(redx_changed); rdx_5739B_mn->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_af = new Fl_Input2(160, Y, 50, 24, _("Affected %")); rdx_5739B_af->tooltip(_("")); rdx_5739B_af->callback(redx_changed); rdx_5739B_af->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_in = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); rdx_5739B_in->tooltip(_("")); rdx_5739B_in->callback(redx_changed); rdx_5739B_in->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_un = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); rdx_5739B_un->tooltip(_("")); rdx_5739B_un->callback(redx_changed); rdx_5739B_un->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_bs = new Fl_Input2(160, Y, 50, 24, _("Basements?")); rdx_5739B_bs->tooltip(_("Yes/No")); rdx_5739B_bs->callback(redx_changed); rdx_5739B_bs->when(FL_WHEN_CHANGED); Y += 25; rdx_5739B_gi = new Fl_Input2(160, Y, 400, 96, _("General info:")); rdx_5739B_gi->align(FL_ALIGN_LEFT_TOP); rdx_5739B_gi->type(4); rdx_5739B_gi->tooltip(_("")); rdx_5739B_gi->callback(redx_changed); rdx_5739B_gi->when(FL_WHEN_CHANGED); tab_redx_5739B_2->end(); tab_redx_5739B->end(); tab_redx_5739B->hide(); }; �������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739A.cxx����������������������������������������������������������������0000664�0001750�0001750�00000055604�12330516146�013647� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string s_redx_5739A_nbr; string s_redx_5739A_name; string s_redx_5739A_state; string s_redx_5739A_cnty; string s_redx_5739A_city; string s_redx_5739A_date; string s_redx_5739A_street; string s_redx_5739A_georef; string s_redx_5739A_adrs0; string s_redx_5739A_dwell0; string s_redx_5739A_base0; string s_redx_5739A_ds0; string s_redx_5739A_mj0; string s_redx_5739A_mn0; string s_redx_5739A_af0; string s_redx_5739A_in0; string s_redx_5739A_un0; string s_redx_5739A_gd0; string s_redx_5739A_adrs1; string s_redx_5739A_dwell1; string s_redx_5739A_base1; string s_redx_5739A_ds1; string s_redx_5739A_mj1; string s_redx_5739A_mn1; string s_redx_5739A_af1; string s_redx_5739A_in1; string s_redx_5739A_un1; string s_redx_5739A_gd1; // could not use real names ... WIN32 barfs enum QTYPE_5739A { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty struct QUAD_5739A { QTYPE_5739A qtype; // type of field string htmnbr; void *ptr; Fl_Widget *widget; }; // singular entries in form QUAD_5739A redx_QUAD_5739A[] = { { S, ":drnbr:", &s_redx_5739A_nbr, rdx_5739A_nbr }, // 0 { S, ":drnam:", &s_redx_5739A_name, rdx_5739A_name }, // 1 { S, ":state:", &s_redx_5739A_state, rdx_5739A_state }, // 2 { S, ":cnty:", &s_redx_5739A_cnty, rdx_5739A_cnty }, // 3 { S, ":city:", &s_redx_5739A_city, rdx_5739A_city }, // 4 { S, ":date:", &s_redx_5739A_date, rdx_5739A_date }, // 5 { S, ":street:", &s_redx_5739A_street, rdx_5739A_street }, // 6 { S, ":georef:", &s_redx_5739A_georef, rdx_5739A_georef }, // 7 { S, ":adrs0:", &s_redx_5739A_adrs0, rdx_5739A_adrs0 }, // 8 { S, ":dwell0:", &s_redx_5739A_dwell0, rdx_5739A_dwell0 }, // 9 { S, ":base0:", &s_redx_5739A_base0, rdx_5739A_base0 }, // 10 { S, ":ds0:", &s_redx_5739A_ds0, rdx_5739A_ds0 }, // 11 { S, ":mj0:", &s_redx_5739A_mj0, rdx_5739A_mj0 }, // 12 { S, ":mn0:", &s_redx_5739A_mn0, rdx_5739A_mn0 }, // 13 { S, ":af0:", &s_redx_5739A_af0, rdx_5739A_af0 }, // 14 { S, ":in0:", &s_redx_5739A_in0, rdx_5739A_in0 }, // 15 { S, ":un0:", &s_redx_5739A_un0, rdx_5739A_un0 }, // 16 { S, ":gd0:", &s_redx_5739A_gd0, rdx_5739A_gd0 }, // 17 { S, ":adrs1:", &s_redx_5739A_adrs1, rdx_5739A_adrs1 }, // 18 { S, ":dwell1:", &s_redx_5739A_dwell1, rdx_5739A_dwell1 }, // 19 { S, ":base1:", &s_redx_5739A_base1, rdx_5739A_base1 }, // 20 { S, ":ds1:", &s_redx_5739A_ds1, rdx_5739A_ds1 }, // 21 { S, ":mj1:", &s_redx_5739A_mj1, rdx_5739A_mj1 }, // 22 { S, ":mn1:", &s_redx_5739A_mn1, rdx_5739A_mn1 }, // 23 { S, ":af1:", &s_redx_5739A_af1, rdx_5739A_af1 }, // 24 { S, ":in1:", &s_redx_5739A_in1, rdx_5739A_in1 }, // 25 { S, ":un1:", &s_redx_5739A_un1, rdx_5739A_un1 }, // 26 { S, ":gd1:", &s_redx_5739A_gd1, rdx_5739A_gd1 }, // 27 { E, "", NULL, NULL } }; string buffredx_5739A; string def_redx_5739A_filename = ""; string base_redx_5739A_filename = ""; string def_redx_5739A_TemplateName = ""; bool using_redx_5739A_template = false; static bool fields_initialized = false; // required to initialize the control pointers in the QUAD_5739A array static void init_widgets_5739A() { redx_QUAD_5739A[0].widget = rdx_5739A_nbr; redx_QUAD_5739A[1].widget = rdx_5739A_name; redx_QUAD_5739A[2].widget = rdx_5739A_state; redx_QUAD_5739A[3].widget = rdx_5739A_cnty; redx_QUAD_5739A[4].widget = rdx_5739A_city; redx_QUAD_5739A[5].widget = rdx_5739A_date; redx_QUAD_5739A[6].widget = rdx_5739A_street; redx_QUAD_5739A[7].widget = rdx_5739A_georef; redx_QUAD_5739A[8].widget = rdx_5739A_adrs0; redx_QUAD_5739A[9].widget = rdx_5739A_dwell0; redx_QUAD_5739A[10].widget = rdx_5739A_base0; redx_QUAD_5739A[11].widget = rdx_5739A_ds0; redx_QUAD_5739A[12].widget = rdx_5739A_mj0; redx_QUAD_5739A[13].widget = rdx_5739A_mn0; redx_QUAD_5739A[14].widget = rdx_5739A_af0; redx_QUAD_5739A[15].widget = rdx_5739A_in0; redx_QUAD_5739A[16].widget = rdx_5739A_un0; redx_QUAD_5739A[17].widget = rdx_5739A_gd0; redx_QUAD_5739A[18].widget = rdx_5739A_adrs1; redx_QUAD_5739A[19].widget = rdx_5739A_dwell1; redx_QUAD_5739A[20].widget = rdx_5739A_base1; redx_QUAD_5739A[21].widget = rdx_5739A_ds1; redx_QUAD_5739A[22].widget = rdx_5739A_mj1; redx_QUAD_5739A[23].widget = rdx_5739A_mn1; redx_QUAD_5739A[24].widget = rdx_5739A_af1; redx_QUAD_5739A[25].widget = rdx_5739A_in1; redx_QUAD_5739A[26].widget = rdx_5739A_un1; redx_QUAD_5739A[27].widget = rdx_5739A_gd1; fields_initialized = true; } //enum QTYPE_5739A { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty void clearQUAD_5739A(QUAD_5739A *p) { QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B : (*(bool *)(p->ptr)) = false; break; case S : ((string *)(p->ptr))->clear(); break; case T : ((string *)(p->ptr))->clear(); break; case C : (*(char *)(p->ptr)) = ' '; break; case I : (*(int *)(p->ptr)) = 0; break; case F : (*(float *)(p->ptr)) = 0.0; break; case E : return; } p++; } } void clear_redx_5739Afields() { if (!fields_initialized) init_widgets_5739A(); clearQUAD_5739A(redx_QUAD_5739A); } bool checkQUAD_5739A(QUAD_5739A *p) { int i = 0; float f = 0; char c = ' '; QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { if (p->widget == NULL) return false; switch (qt) { case B: if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true;; break; case S: if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; break; case T: if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; if (*((char *)(p->ptr)) != c) return true; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); if (*((int *)(p->ptr)) != i) return true; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); if (*((float *)(p->ptr)) != f) return true; break; case E: default: return false; } p++; } return false; } bool check_redx_5739Afields() { return checkQUAD_5739A(redx_QUAD_5739A); } void updateQUAD_5739A(QUAD_5739A *p) { int i = 0; float f = 0; char c = ' '; QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); break; case S: *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); break; case T: *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; *((char *)(p->ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void update_redx_5739Afields() { if (!fields_initialized) init_widgets_5739A(); updateQUAD_5739A(redx_QUAD_5739A); } void updateFORM_5739A(QUAD_5739A *p) { char val[20]; QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); break; case S: ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case T: ((FTextEdit *)p->widget)->clear(); ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); break; case C: val[0] = *((char *)(p->ptr)); val[1] = 0; ((Fl_Input2 *)p->widget)->value(val); break; case I: if (*((int *)(p->ptr)) == 0) ((Fl_Input2 *)p->widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); break; case E: default: return; } p++; } } void update_redx_5739Aform() { if (!fields_initialized) init_widgets_5739A(); updateFORM_5739A(redx_QUAD_5739A); } void clear_redx_5739A_form() { clear_redx_5739Afields(); update_redx_5739Aform(); } static string mbuff; void make_buffQUAD_5739A(QUAD_5739A *p) { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: if (*((bool *)(p->ptr)) == true) mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); break; case S: if (((string *)(p->ptr))->length()) mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case T: mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case C: if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { sval = " "; sval[0] = *((char *)(p->ptr)); mbuff.append( lineout( p->htmnbr, sval)); } break; case I: if (*((int*)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case F: if (*((float *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case E: default: return; } p++; } } void make_buffredx_5739A(bool compress = false) { mbuff.clear(); make_buffQUAD_5739A(redx_QUAD_5739A); if (compress) compress_maybe(mbuff); buffredx_5739A.append(mbuff); } void readQUAD_5739A(string data, QUAD_5739A *p) { int i = 0; float f; QTYPE_5739A qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); break; case S: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case T: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case C: *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; break; case I: i = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void read_redx_5739A_buffer(string data) { clear_redx_5739Afields(); read_header(data); readQUAD_5739A (data, redx_QUAD_5739A); update_redx_5739Aform(); } void cb_redx_5739A_new() { if (check_redx_5739Afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_redx_5739A_save(); } } clear_redx_5739A_form(); clear_header(); def_redx_5739A_filename = ICS_msg_dir; def_redx_5739A_filename.append("new"FREDX5739A_EXT); show_filename(def_redx_5739A_filename); using_redx_5739A_template = false; } void cb_redx_5739A_import() { fl_alert2("Not implemented"); } void cb_redx_5739A_export() { fl_alert2("Not implemented"); } void cb_redx_5739A_wrap_import(string wrapfilename, string inpbuffer) { clear_redx_5739A_form(); read_redx_5739A_buffer(inpbuffer); def_redx_5739A_filename = ICS_msg_dir; def_redx_5739A_filename.append(wrapfilename); show_filename(def_redx_5739A_filename); using_redx_5739A_template = false; } int eval_redx_5739A_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_redx_5739A_filename).append("]"); update_redx_5739Afields(); update_header(FROM); evalstr.append(header("<redx_5739A>")); buffredx_5739A.clear(); make_buffredx_5739A(true); if (buffredx_5739A.empty()) return 0; compress_maybe( buffredx_5739A ); evalstr.append( buffredx_5739A ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_redx_5739A_wrap_export() { if (check_redx_5739Afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739Afields(); if (base_redx_5739A_filename == "new"FREDX5739A_EXT || base_redx_5739A_filename == "default"FREDX5739A_EXT) if (!cb_redx_5739A_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_redx_5739A_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(true); export_wrapfile(base_redx_5739A_filename, wrapfilename, buffredx_5739A, pext != ".wrap"); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(false); write_redx_5739A(def_redx_5739A_filename); } } void cb_redx_5739A_wrap_autosend() { if (check_redx_5739Afields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739Afields(); if (base_redx_5739A_filename == "new"FREDX5739A_EXT || base_redx_5739A_filename == "default"FREDX5739A_EXT) if (!cb_redx_5739A_save_as()) return; update_header(FROM); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(true); xfr_via_socket(base_redx_5739A_filename, buffredx_5739A); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(false); write_redx_5739A(def_redx_5739A_filename); } void cb_redx_5739A_load_template() { string def_redx_5739A_filename = def_redx_5739A_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TREDX5739A_EXT, def_redx_5739A_filename.c_str()); if (p) { clear_redx_5739A_form(); read_data_file(p); def_redx_5739A_TemplateName = p; show_filename(def_redx_5739A_TemplateName); using_redx_5739A_template = true; } } void cb_redx_5739A_save_template() { if (!using_redx_5739A_template) { cb_redx_5739A_save_as_template(); return; } string def_redx_5739A_filename = def_redx_5739A_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TREDX5739A_EXT, def_redx_5739A_filename.c_str()); if (p) { update_header(CHANGED); update_redx_5739Afields(); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(); write_redx_5739A(p); } } void cb_redx_5739A_save_as_template() { string def_redx_5739A_filename = def_redx_5739A_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TREDX5739A_EXT, def_redx_5739A_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_redx_5739A_TemplateName = p; if (strlen(pext) == 0) def_redx_5739A_TemplateName.append(TREDX5739A_EXT); remove_spaces_from_filename(def_redx_5739A_TemplateName); clear_header(); update_header(CHANGED); update_redx_5739Afields(); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(); write_redx_5739A(def_redx_5739A_TemplateName); show_filename(def_redx_5739A_TemplateName); using_redx_5739A_template = true; } } void cb_redx_5739A_open() { const char *p = FSEL::select(_("Open data file"), "ICS-redx_5739A\t*"FREDX5739A_EXT, def_redx_5739A_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_redx_5739A_form(); read_data_file(p); using_redx_5739A_template = false; def_redx_5739A_filename = p; show_filename(def_redx_5739A_filename); } void write_redx_5739A(string s) { FILE *fileredx_5739A = fopen(s.c_str(), "w"); if (!fileredx_5739A) return; fwrite(buffredx_5739A.c_str(), buffredx_5739A.length(), 1, fileredx_5739A); fclose(fileredx_5739A); } bool cb_redx_5739A_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FREDX5739A_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_redx_5739A_filename; p = FSEL::saveas(_("Save data file"), "ICS-redx_5739A\t*"FREDX5739A_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_redx_5739A_filename = p; if (strlen(pext) == 0) def_redx_5739A_filename.append(FREDX5739A_EXT); remove_spaces_from_filename(def_redx_5739A_filename); update_header(NEW); update_redx_5739Afields(); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(); write_redx_5739A(def_redx_5739A_filename); using_redx_5739A_template = false; show_filename(def_redx_5739A_filename); return true; } void cb_redx_5739A_save() { if (base_redx_5739A_filename == "new"FREDX5739A_EXT || base_redx_5739A_filename == "default"FREDX5739A_EXT || using_redx_5739A_template == true) { cb_redx_5739A_save_as(); return; } if (check_redx_5739Afields()) update_header(CHANGED); update_redx_5739Afields(); buffredx_5739A.assign(header("<redx_5739A>")); make_buffredx_5739A(); write_redx_5739A(def_redx_5739A_filename); using_redx_5739A_template = false; } void quad_to_html_5739A( string &target, QUAD_5739A *p) { string X = "X"; string SP = " "; string sval = " "; char szval[20]; while (p->qtype != E) { if (p->qtype == B) replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); else if (p->qtype == S) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == T) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); replacestr(target, p->htmnbr, sval); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } p++; } } void cb_redx_5739A_html() { string name_name = fl_filename_name(def_redx_5739A_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string redx_5739A_name = ICS_dir; redx_5739A_name.append(name_name); redx_5739A_name.append(".html"); update_redx_5739Afields(); string formredx_5739A = redx_5739A_html_template; replacestr(formredx_5739A, TITLE, name_name); quad_to_html_5739A (formredx_5739A, redx_QUAD_5739A); FILE *fileredx_5739A = fopen(redx_5739A_name.c_str(), "w"); fprintf(fileredx_5739A,"%s", formredx_5739A.c_str()); fclose(fileredx_5739A); open_url(redx_5739A_name.c_str()); } void cb_5739A_msg_type() { if (selected_form == REDX5739A ) { show_filename(def_redx_5739A_filename); } else { show_filename(def_rg_filename); } } void quad_to_text( string &target, QUAD_5739A *p) { string X = "X"; string SP = " "; string sval = " "; string del = "DELETE"; char szval[20]; while (p->qtype != E) { if (p->qtype == B) { bool b = *((bool *)(p->ptr)); if (b) replacestr(target, p->htmnbr, X); else replacestr(target, p->htmnbr, del); } else if (p->qtype == S) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == T) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, p->htmnbr, sval); else replacestr(target, p->htmnbr, del); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } p++; } } void strip_text_5739A( string &target ) { size_t p = 0, p1, p2; while ((p = target.find ("DELETE"), p) != string::npos) { p1 = target.rfind ("\n", p); p2 = target.find ("\n", p); if (p1 != string::npos && p2 != string::npos) target.erase( p1, p2 - p1 ); p++; } } void cb_redx_5739A_textout() { string redx_5739A_name = ICS_dir; redx_5739A_name.append("redx_5739A.txt"); update_redx_5739Afields(); string formredx_5739A = redx_5739A_text_template; quad_to_text (formredx_5739A, redx_QUAD_5739A); strip_text_5739A (formredx_5739A); FILE *fileredx_5739A = fopen(redx_5739A_name.c_str(), "w"); fprintf(fileredx_5739A,"%s", formredx_5739A.c_str()); fclose(fileredx_5739A); open_url(redx_5739A_name.c_str()); } ����������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000106607�12330516146�013546� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string s_redx_5739_nbr; string s_redx_5739_name; string s_redx_5739_state; string s_redx_5739_cnty; string s_redx_5739_city; string s_redx_5739_date; string s_redx_5739_street; string s_redx_5739_georef; string s_redx_5739_add_info; string s_redx_5739_worker; string s_redx_5739_supervisor; int sf_destroyed; int sf_major; int sf_minor; int sf_affected; int sf_inaccessible; int mh_destroyed; int mh_major; int mh_minor; int mh_affected; int mh_inaccessible; int ap_destroyed; int ap_major; int ap_minor; int ap_affected; int ap_inaccessible; string s_redx_5739_house_nbr[10]; string s_redx_5739_apt_nbr[10]; char c_redx_5739_destroyed[10]; char c_redx_5739_major[10]; char c_redx_5739_minor[10]; char c_redx_5739_affected[10]; char c_redx_5739_inaccessible[10]; int i_redx_5739_floors[10]; bool b_redx_5739_basement[10]; int i_redx_5739_waterlevel[10]; int i_redx_5739_basement_water[10]; bool b_redx_5739_electricity[10]; char c_redx_5739_occupancy[10]; bool b_redx_5739_OR[10]; bool b_redx_5739_901[10]; string s_redx_5739_desc[10]; string s_redx_5739_nam[10]; // could not use real names ... WIN32 barfs enum QTYPE { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty struct QUAD { QTYPE qtype; // type of field string htmnbr; void *ptr; Fl_Widget *widget; }; // singular entries in form QUAD redx_QUAD[] = { { S, ":nbr:", &s_redx_5739_nbr, rdx_5739_nbr }, // 0 { S, ":name:", &s_redx_5739_name, rdx_5739_name }, // 1 { S, ":state:", &s_redx_5739_state, rdx_5739_state }, // 2 { S, ":cnty:", &s_redx_5739_cnty, rdx_5739_cnty }, // 3 { S, ":city:", &s_redx_5739_city, rdx_5739_city }, // 4 { S, ":date:", &s_redx_5739_date, rdx_5739_date }, // 5 { S, ":street:", &s_redx_5739_street, rdx_5739_street }, // 6 { S, ":georef:", &s_redx_5739_georef, rdx_5739_georef }, // 7 { I, ":sf_des:", &sf_destroyed, rdx_sf_destroyed }, // 8 { I, ":sf_maj:", &sf_major, rdx_sf_major }, // 9 { I, ":sf_min:", &sf_minor, rdx_sf_minor }, // 10 { I, ":sf_aff:", &sf_affected, rdx_sf_affected }, // 11 { I, ":sf_ina:", &sf_inaccessible, rdx_sf_inaccessible }, // 12 { I, ":mh_des:", &mh_destroyed, rdx_mh_destroyed }, // 13 { I, ":mh_maj:", &mh_major, rdx_mh_major }, // 14 { I, ":mh_min:", &mh_minor, rdx_mh_minor }, // 15 { I, ":mh_aff:", &mh_affected, rdx_mh_affected }, // 16 { I, ":mh_ina:", &mh_inaccessible, rdx_mh_inaccessible }, // 17 { I, ":ap_des:", &ap_destroyed, rdx_ap_destroyed }, // 18 { I, ":ap_maj:", &ap_major, rdx_ap_major }, // 19 { I, ":ap_min:", &ap_minor, rdx_ap_minor }, // 20 { I, ":ap_aff:", &ap_affected, rdx_ap_affected }, // 21 { I, ":ap_ina:", &ap_inaccessible, rdx_ap_inaccessible }, // 22 { T, ":addinf:", &s_redx_5739_add_info, rdx_5739_add_info }, // 23 { S, ":worker:", &s_redx_5739_worker, rdx_5739_worker }, // 24 { S, ":supervisor:", &s_redx_5739_supervisor, rdx_5739_supervisor }, // 25 { E, "", NULL, NULL } }; // array entries in form QUAD redx_QUAD1[] = { { S, ":hb[0]:", &s_redx_5739_house_nbr[0], redx_5739_house_nbr[0] }, // 0 { S, ":ap[0]:", &s_redx_5739_apt_nbr[0], redx_5739_apt_nbr[0] }, // 1 { C, ":des[0]:", &c_redx_5739_destroyed[0], redx_5739_destroyed[0] }, // 2 { C, ":maj[0]:", &c_redx_5739_major[0], redx_5739_major[0] }, // 3 { C, ":min[0]:", &c_redx_5739_minor[0], redx_5739_minor[0] }, // 4 { C, ":aff[0]:", &c_redx_5739_affected[0], redx_5739_affected[0] }, // 5 { C, ":acc[0]:", &c_redx_5739_inaccessible[0], redx_5739_inaccessible[0] }, // 6 { I, ":flr[0]:", &i_redx_5739_floors[0], redx_5739_floors[0] }, // 7 { C, ":bas[0]:", &b_redx_5739_basement[0], redx_5739_basement[0] }, // 8 { I, ":wtr[0]:", &i_redx_5739_waterlevel[0], redx_5739_waterlevel[0] }, // 9 { I, ":bwl[0]:", &i_redx_5739_basement_water[0], redx_5739_basement_water[0] }, // 10 { C, ":ele[0]:", &b_redx_5739_electricity[0], redx_5739_electricity[0] }, // 11 { C, ":occ[0]:", &c_redx_5739_occupancy[0], redx_5739_occupancy[0] }, // 12 { C, ":or[0]:", &b_redx_5739_OR[0], redx_5739_OR[0] }, // 13 { C, ":901[0]:", &b_redx_5739_901[0], redx_5739_901[0] }, // 14 { S, ":desc[0]:", &s_redx_5739_desc[0], redx_5739_desc[0] }, // 15 { S, ":nam[0]:", &s_redx_5739_nam[0], redx_5739_nam[0] }, // 16 { S, ":hb[1]:", &s_redx_5739_house_nbr[1], redx_5739_house_nbr[1] }, { S, ":ap[1]:", &s_redx_5739_apt_nbr[1], redx_5739_apt_nbr[1] }, { C, ":des[1]:", &c_redx_5739_destroyed[1], redx_5739_destroyed[1] }, { C, ":maj[1]:", &c_redx_5739_major[1], redx_5739_major[1] }, { C, ":min[1]:", &c_redx_5739_minor[1], redx_5739_minor[1] }, { C, ":aff[1]:", &c_redx_5739_affected[1], redx_5739_affected[1] }, { C, ":acc[1]:", &c_redx_5739_inaccessible[1], redx_5739_inaccessible[1] }, { I, ":flr[1]:", &i_redx_5739_floors[1], redx_5739_floors[1] }, { C, ":bas[1]:", &b_redx_5739_basement[1], redx_5739_basement[1] }, { I, ":wtr[1]:", &i_redx_5739_waterlevel[1], redx_5739_waterlevel[1] }, { I, ":bwl[1]:", &i_redx_5739_basement_water[1], redx_5739_basement_water[1] }, { C, ":ele[1]:", &b_redx_5739_electricity[1], redx_5739_electricity[1] }, { C, ":occ[1]:", &c_redx_5739_occupancy[1], redx_5739_occupancy[1] }, { C, ":or[1]:", &b_redx_5739_OR[1], redx_5739_OR[1] }, { C, ":901[1]:", &b_redx_5739_901[1], redx_5739_901[1] }, { S, ":desc[1]:", &s_redx_5739_desc[1], redx_5739_desc[1] }, { S, ":nam[1]:", &s_redx_5739_nam[1], redx_5739_nam[1] }, { S, ":hb[2]:", &s_redx_5739_house_nbr[2], redx_5739_house_nbr[2] }, { S, ":ap[2]:", &s_redx_5739_apt_nbr[2], redx_5739_apt_nbr[2] }, { C, ":des[2]:", &c_redx_5739_destroyed[2], redx_5739_destroyed[2] }, { C, ":maj[2]:", &c_redx_5739_major[2], redx_5739_major[2] }, { C, ":min[2]:", &c_redx_5739_minor[2], redx_5739_minor[2] }, { C, ":aff[2]:", &c_redx_5739_affected[2], redx_5739_affected[2] }, { C, ":acc[2]:", &c_redx_5739_inaccessible[2], redx_5739_inaccessible[2] }, { I, ":flr[2]:", &i_redx_5739_floors[2], redx_5739_floors[2] }, { C, ":bas[2]:", &b_redx_5739_basement[2], redx_5739_basement[2] }, { I, ":wtr[2]:", &i_redx_5739_waterlevel[2], redx_5739_waterlevel[2] }, { I, ":bwl[2]:", &i_redx_5739_basement_water[2], redx_5739_basement_water[2] }, { C, ":ele[2]:", &b_redx_5739_electricity[2], redx_5739_electricity[2] }, { C, ":occ[2]:", &c_redx_5739_occupancy[2], redx_5739_occupancy[2] }, { C, ":or[2]:", &b_redx_5739_OR[2], redx_5739_OR[2] }, { C, ":901[2]:", &b_redx_5739_901[2], redx_5739_901[2] }, { S, ":desc[2]:", &s_redx_5739_desc[2], redx_5739_desc[2] }, { S, ":nam[2]:", &s_redx_5739_nam[2], redx_5739_nam[2] }, { S, ":hb[3]:", &s_redx_5739_house_nbr[3], redx_5739_house_nbr[3] }, { S, ":ap[3]:", &s_redx_5739_apt_nbr[3], redx_5739_apt_nbr[3] }, { C, ":des[3]:", &c_redx_5739_destroyed[3], redx_5739_destroyed[3] }, { C, ":maj[3]:", &c_redx_5739_major[3], redx_5739_major[3] }, { C, ":min[3]:", &c_redx_5739_minor[3], redx_5739_minor[3] }, { C, ":aff[3]:", &c_redx_5739_affected[3], redx_5739_affected[3] }, { C, ":acc[3]:", &c_redx_5739_inaccessible[3], redx_5739_inaccessible[3] }, { I, ":flr[3]:", &i_redx_5739_floors[3], redx_5739_floors[3] }, { C, ":bas[3]:", &b_redx_5739_basement[3], redx_5739_basement[3] }, { I, ":wtr[3]:", &i_redx_5739_waterlevel[3], redx_5739_waterlevel[3] }, { I, ":bwl[3]:", &i_redx_5739_basement_water[3], redx_5739_basement_water[3] }, { C, ":ele[3]:", &b_redx_5739_electricity[3], redx_5739_electricity[3] }, { C, ":occ[3]:", &c_redx_5739_occupancy[3], redx_5739_occupancy[3] }, { C, ":or[3]:", &b_redx_5739_OR[3], redx_5739_OR[3] }, { C, ":901[3]:", &b_redx_5739_901[3], redx_5739_901[3] }, { S, ":desc[3]:", &s_redx_5739_desc[3], redx_5739_desc[3] }, { S, ":nam[3]:", &s_redx_5739_nam[3], redx_5739_nam[3] }, { S, ":hb[4]:", &s_redx_5739_house_nbr[4], redx_5739_house_nbr[4] }, { S, ":ap[4]:", &s_redx_5739_apt_nbr[4], redx_5739_apt_nbr[4] }, { C, ":des[4]:", &c_redx_5739_destroyed[4], redx_5739_destroyed[4] }, { C, ":maj[4]:", &c_redx_5739_major[4], redx_5739_major[4] }, { C, ":min[4]:", &c_redx_5739_minor[4], redx_5739_minor[4] }, { C, ":aff[4]:", &c_redx_5739_affected[4], redx_5739_affected[4] }, { C, ":acc[4]:", &c_redx_5739_inaccessible[4], redx_5739_inaccessible[4] }, { I, ":flr[4]:", &i_redx_5739_floors[4], redx_5739_floors[4] }, { C, ":bas[4]:", &b_redx_5739_basement[4], redx_5739_basement[4] }, { I, ":wtr[4]:", &i_redx_5739_waterlevel[4], redx_5739_waterlevel[4] }, { I, ":bwl[4]:", &i_redx_5739_basement_water[4], redx_5739_basement_water[4] }, { C, ":ele[4]:", &b_redx_5739_electricity[4], redx_5739_electricity[4] }, { C, ":occ[4]:", &c_redx_5739_occupancy[4], redx_5739_occupancy[4] }, { C, ":or[4]:", &b_redx_5739_OR[4], redx_5739_OR[4] }, { C, ":901[4]:", &b_redx_5739_901[4], redx_5739_901[4] }, { S, ":desc[4]:", &s_redx_5739_desc[4], redx_5739_desc[4] }, { S, ":nam[4]:", &s_redx_5739_nam[4], redx_5739_nam[4] }, { S, ":hb[5]:", &s_redx_5739_house_nbr[5], redx_5739_house_nbr[5] }, { S, ":ap[5]:", &s_redx_5739_apt_nbr[5], redx_5739_apt_nbr[5] }, { C, ":des[5]:", &c_redx_5739_destroyed[5], redx_5739_destroyed[5] }, { C, ":maj[5]:", &c_redx_5739_major[5], redx_5739_major[5] }, { C, ":min[5]:", &c_redx_5739_minor[5], redx_5739_minor[5] }, { C, ":aff[5]:", &c_redx_5739_affected[5], redx_5739_affected[5] }, { C, ":acc[5]:", &c_redx_5739_inaccessible[5], redx_5739_inaccessible[5] }, { I, ":flr[5]:", &i_redx_5739_floors[5], redx_5739_floors[5] }, { C, ":bas[5]:", &b_redx_5739_basement[5], redx_5739_basement[5] }, { I, ":wtr[5]:", &i_redx_5739_waterlevel[5], redx_5739_waterlevel[5] }, { I, ":bwl[5]:", &i_redx_5739_basement_water[5], redx_5739_basement_water[5] }, { C, ":ele[5]:", &b_redx_5739_electricity[5], redx_5739_electricity[5] }, { C, ":occ[5]:", &c_redx_5739_occupancy[5], redx_5739_occupancy[5] }, { C, ":or[5]:", &b_redx_5739_OR[5], redx_5739_OR[5] }, { C, ":901[5]:", &b_redx_5739_901[5], redx_5739_901[5] }, { S, ":desc[5]:", &s_redx_5739_desc[5], redx_5739_desc[5] }, { S, ":nam[5]:", &s_redx_5739_nam[5], redx_5739_nam[5] }, { S, ":hb[6]:", &s_redx_5739_house_nbr[6], redx_5739_house_nbr[6] }, { S, ":ap[6]:", &s_redx_5739_apt_nbr[6], redx_5739_apt_nbr[6] }, { C, ":des[6]:", &c_redx_5739_destroyed[6], redx_5739_destroyed[6] }, { C, ":maj[6]:", &c_redx_5739_major[6], redx_5739_major[6] }, { C, ":min[6]:", &c_redx_5739_minor[6], redx_5739_minor[6] }, { C, ":aff[6]:", &c_redx_5739_affected[6], redx_5739_affected[6] }, { C, ":acc[6]:", &c_redx_5739_inaccessible[6], redx_5739_inaccessible[6] }, { I, ":flr[6]:", &i_redx_5739_floors[6], redx_5739_floors[6] }, { C, ":bas[6]:", &b_redx_5739_basement[6], redx_5739_basement[6] }, { I, ":wtr[6]:", &i_redx_5739_waterlevel[6], redx_5739_waterlevel[6] }, { I, ":bwl[6]:", &i_redx_5739_basement_water[6], redx_5739_basement_water[6] }, { C, ":ele[6]:", &b_redx_5739_electricity[6], redx_5739_electricity[6] }, { C, ":occ[6]:", &c_redx_5739_occupancy[6], redx_5739_occupancy[6] }, { C, ":or[6]:", &b_redx_5739_OR[6], redx_5739_OR[6] }, { C, ":901[6]:", &b_redx_5739_901[6], redx_5739_901[6] }, { S, ":desc[6]:", &s_redx_5739_desc[6], redx_5739_desc[6] }, { S, ":nam[6]:", &s_redx_5739_nam[6], redx_5739_nam[6] }, { S, ":hb[7]:", &s_redx_5739_house_nbr[7], redx_5739_house_nbr[7] }, { S, ":ap[7]:", &s_redx_5739_apt_nbr[7], redx_5739_apt_nbr[7] }, { C, ":des[7]:", &c_redx_5739_destroyed[7], redx_5739_destroyed[7] }, { C, ":maj[7]:", &c_redx_5739_major[7], redx_5739_major[7] }, { C, ":min[7]:", &c_redx_5739_minor[7], redx_5739_minor[7] }, { C, ":aff[7]:", &c_redx_5739_affected[7], redx_5739_affected[7] }, { C, ":acc[7]:", &c_redx_5739_inaccessible[7], redx_5739_inaccessible[7] }, { I, ":flr[7]:", &i_redx_5739_floors[7], redx_5739_floors[7] }, { C, ":bas[7]:", &b_redx_5739_basement[7], redx_5739_basement[7] }, { I, ":wtr[7]:", &i_redx_5739_waterlevel[7], redx_5739_waterlevel[7] }, { I, ":bwl[7]:", &i_redx_5739_basement_water[7], redx_5739_basement_water[7] }, { C, ":ele[7]:", &b_redx_5739_electricity[7], redx_5739_electricity[7] }, { C, ":occ[7]:", &c_redx_5739_occupancy[7], redx_5739_occupancy[7] }, { C, ":or[7]:", &b_redx_5739_OR[7], redx_5739_OR[7] }, { C, ":901[7]:", &b_redx_5739_901[7], redx_5739_901[7] }, { S, ":desc[7]:", &s_redx_5739_desc[7], redx_5739_desc[7] }, { S, ":nam[7]:", &s_redx_5739_nam[7], redx_5739_nam[7] }, { S, ":hb[8]:", &s_redx_5739_house_nbr[8], redx_5739_house_nbr[8] }, { S, ":ap[8]:", &s_redx_5739_apt_nbr[8], redx_5739_apt_nbr[8] }, { C, ":des[8]:", &c_redx_5739_destroyed[8], redx_5739_destroyed[8] }, { C, ":maj[8]:", &c_redx_5739_major[8], redx_5739_major[8] }, { C, ":min[8]:", &c_redx_5739_minor[8], redx_5739_minor[8] }, { C, ":aff[8]:", &c_redx_5739_affected[8], redx_5739_affected[8] }, { C, ":acc[8]:", &c_redx_5739_inaccessible[8], redx_5739_inaccessible[8] }, { I, ":flr[8]:", &i_redx_5739_floors[8], redx_5739_floors[8] }, { C, ":bas[8]:", &b_redx_5739_basement[8], redx_5739_basement[8] }, { I, ":wtr[8]:", &i_redx_5739_waterlevel[8], redx_5739_waterlevel[8] }, { I, ":bwl[8]:", &i_redx_5739_basement_water[8], redx_5739_basement_water[8] }, { C, ":ele[8]:", &b_redx_5739_electricity[8], redx_5739_electricity[8] }, { C, ":occ[8]:", &c_redx_5739_occupancy[8], redx_5739_occupancy[8] }, { C, ":or[8]:", &b_redx_5739_OR[8], redx_5739_OR[8] }, { C, ":901[8]:", &b_redx_5739_901[8], redx_5739_901[8] }, { S, ":desc[8]:", &s_redx_5739_desc[8], redx_5739_desc[8] }, { S, ":nam[8]:", &s_redx_5739_nam[8], redx_5739_nam[8] }, { S, ":hb[9]:", &s_redx_5739_house_nbr[9], redx_5739_house_nbr[9] }, { S, ":ap[9]:", &s_redx_5739_apt_nbr[9], redx_5739_apt_nbr[9] }, { C, ":des[9]:", &c_redx_5739_destroyed[9], redx_5739_destroyed[9] }, { C, ":maj[9]:", &c_redx_5739_major[9], redx_5739_major[9] }, { C, ":min[9]:", &c_redx_5739_minor[9], redx_5739_minor[9] }, { C, ":aff[9]:", &c_redx_5739_affected[9], redx_5739_affected[9] }, { C, ":acc[9]:", &c_redx_5739_inaccessible[9], redx_5739_inaccessible[9] }, { I, ":flr[9]:", &i_redx_5739_floors[9], redx_5739_floors[9] }, { C, ":bas[9]:", &b_redx_5739_basement[9], redx_5739_basement[9] }, { I, ":wtr[9]:", &i_redx_5739_waterlevel[9], redx_5739_waterlevel[9] }, { I, ":bwl[9]:", &i_redx_5739_basement_water[9], redx_5739_basement_water[9] }, { C, ":ele[9]:", &b_redx_5739_electricity[9], redx_5739_electricity[9] }, { C, ":occ[9]:", &c_redx_5739_occupancy[9], redx_5739_occupancy[9] }, { C, ":or[9]:", &b_redx_5739_OR[9], redx_5739_OR[9] }, { C, ":901[9]:", &b_redx_5739_901[9], redx_5739_901[9] }, { S, ":desc[9]:", &s_redx_5739_desc[9], redx_5739_desc[9] }, { S, ":nam[9]:", &s_redx_5739_nam[9], redx_5739_nam[9] }, { E, "", NULL, NULL } }; string buffredx_5739; string def_redx_5739_filename = ""; string base_redx_5739_filename = ""; string def_redx_5739_TemplateName = ""; bool using_redx_5739_template = false; static bool fields_initialized = false; // required to initialize the control pointers in the QUAD arrays static void init_widgets() { for (int i = 0; i < 10; i++ ) { redx_QUAD1[i*17 + 0].widget = redx_5739_house_nbr[i]; redx_QUAD1[i*17 + 1].widget = redx_5739_apt_nbr[i]; redx_QUAD1[i*17 + 2].widget = redx_5739_destroyed[i]; redx_QUAD1[i*17 + 3].widget = redx_5739_major[i]; redx_QUAD1[i*17 + 4].widget = redx_5739_minor[i]; redx_QUAD1[i*17 + 5].widget = redx_5739_affected[i]; redx_QUAD1[i*17 + 6].widget = redx_5739_inaccessible[i]; redx_QUAD1[i*17 + 7].widget = redx_5739_floors[i]; redx_QUAD1[i*17 + 8].widget = redx_5739_basement[i]; redx_QUAD1[i*17 + 9].widget = redx_5739_waterlevel[i]; redx_QUAD1[i*17 + 10].widget = redx_5739_basement_water[i]; redx_QUAD1[i*17 + 11].widget = redx_5739_electricity[i]; redx_QUAD1[i*17 + 12].widget = redx_5739_occupancy[i]; redx_QUAD1[i*17 + 13].widget = redx_5739_OR[i]; redx_QUAD1[i*17 + 14].widget = redx_5739_901[i]; redx_QUAD1[i*17 + 15].widget = redx_5739_desc[i]; redx_QUAD1[i*17 + 16].widget = redx_5739_nam[i]; } redx_QUAD[0].widget = rdx_5739_nbr; redx_QUAD[1].widget = rdx_5739_name; redx_QUAD[2].widget = rdx_5739_state; redx_QUAD[3].widget = rdx_5739_cnty; redx_QUAD[4].widget = rdx_5739_city; redx_QUAD[5].widget = rdx_5739_date; redx_QUAD[6].widget = rdx_5739_street; redx_QUAD[7].widget = rdx_5739_georef; redx_QUAD[8].widget = rdx_sf_destroyed; redx_QUAD[9].widget = rdx_sf_major; redx_QUAD[10].widget = rdx_sf_minor; redx_QUAD[11].widget = rdx_sf_affected; redx_QUAD[12].widget = rdx_sf_inaccessible; redx_QUAD[13].widget = rdx_mh_destroyed; redx_QUAD[14].widget = rdx_mh_major; redx_QUAD[15].widget = rdx_mh_minor; redx_QUAD[16].widget = rdx_mh_affected; redx_QUAD[17].widget = rdx_mh_inaccessible; redx_QUAD[18].widget = rdx_ap_destroyed; redx_QUAD[19].widget = rdx_ap_major; redx_QUAD[20].widget = rdx_ap_minor; redx_QUAD[21].widget = rdx_ap_affected; redx_QUAD[22].widget = rdx_ap_inaccessible; redx_QUAD[23].widget = rdx_5739_add_info; redx_QUAD[24].widget = rdx_5739_worker; redx_QUAD[25].widget = rdx_5739_supervisor; fields_initialized = true; } //enum QTYPE { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty void clearQUAD(QUAD *p) { QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B : (*(bool *)(p->ptr)) = false; break; case S : ((string *)(p->ptr))->clear(); break; case T : ((string *)(p->ptr))->clear(); break; case C : (*(char *)(p->ptr)) = ' '; break; case I : (*(int *)(p->ptr)) = 0; break; case F : (*(float *)(p->ptr)) = 0.0; break; case E : return; } p++; } } void clear_redx_5739fields() { if (!fields_initialized) init_widgets(); clearQUAD(redx_QUAD); clearQUAD(redx_QUAD1); } bool checkQUAD(QUAD *p) { int i = 0; float f = 0; char c = ' '; QTYPE qt = E; while ((qt = p->qtype) != E) { if (p->widget == NULL) return false; switch (qt) { case B: if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true; break; case S: if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; break; case T: if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; if (*((char *)(p->ptr)) != c) return true; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); if (*((int *)(p->ptr)) != i) return true; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); if (*((float *)(p->ptr)) != f) return true;; break; case E: default: return false; } p++; } return false; } bool check_redx_5739fields() { if (checkQUAD(redx_QUAD)) return true; return checkQUAD(redx_QUAD1); } void updateQUAD(QUAD *p) { int i = 0; float f = 0; char c = ' '; QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); break; case S: *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); break; case T: *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; *((char *)(p->ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void update_redx_5739fields() { if (!fields_initialized) init_widgets(); updateQUAD(redx_QUAD); updateQUAD(redx_QUAD1); } void updateFORM(QUAD *p) { char val[20]; QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); break; case S: ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case T: ((FTextEdit *)p->widget)->clear(); ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); break; case C: val[0] = *((char *)(p->ptr)); val[1] = 0; ((Fl_Input2 *)p->widget)->value(val); break; case I: if (*((int *)(p->ptr)) == 0) ((Fl_Input2 *)p->widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); break; case E: default: return; } p++; } } void update_redx_5739form() { if (!fields_initialized) init_widgets(); updateFORM(redx_QUAD); updateFORM(redx_QUAD1); redx_5739_compute(NULL, NULL); } void clear_redx_5739_form() { clear_redx_5739fields(); update_redx_5739form(); } static string mbuff; void make_buffQUAD(QUAD *p) { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: if (*((bool *)(p->ptr)) == true) mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); break; case S: if (((string *)(p->ptr))->length()) mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case T: mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case C: if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { sval = " "; sval[0] = *((char *)(p->ptr)); mbuff.append( lineout( p->htmnbr, sval)); } break; case I: if (*((int*)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case F: if (*((float *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case E: default: return; } p++; } } void make_buffredx_5739(bool compress = false) { mbuff.clear(); make_buffQUAD(redx_QUAD); make_buffQUAD(redx_QUAD1); if (compress) compress_maybe(mbuff); buffredx_5739.append(mbuff); } void readQUAD(string data, QUAD *p) { int i = 0; float f; QTYPE qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); break; case S: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case T: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case C: *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; break; case I: i = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void read_redx_5739_buffer(string data) { clear_redx_5739fields(); read_header(data); // search the file buffer for each of the redx_5739 fields readQUAD (data, redx_QUAD); readQUAD (data, redx_QUAD1); update_redx_5739form(); } void cb_redx_5739_new() { if (check_redx_5739fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_redx_5739_save(); } } clear_redx_5739_form(); clear_header(); def_redx_5739_filename = ICS_msg_dir; def_redx_5739_filename.append("new"FREDX5739_EXT); show_filename(def_redx_5739_filename); using_redx_5739_template = false; } void cb_redx_5739_import() { fl_alert2("Not implemented"); } void cb_redx_5739_export() { fl_alert2("Not implemented"); } void cb_redx_5739_wrap_import(string wrapfilename, string inpbuffer) { clear_redx_5739_form(); read_redx_5739_buffer(inpbuffer); def_redx_5739_filename = ICS_msg_dir; def_redx_5739_filename.append(wrapfilename); show_filename(def_redx_5739_filename); using_redx_5739_template = false; } int eval_redx_5739_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_redx_5739_filename).append("]"); update_redx_5739fields(); update_header(FROM); evalstr.append(header("<redx_5739>")); buffredx_5739.clear(); make_buffredx_5739(true); if (buffredx_5739.empty()) return 0; compress_maybe( buffredx_5739 ); evalstr.append( buffredx_5739 ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_redx_5739_wrap_export() { if (check_redx_5739fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739fields(); if (base_redx_5739_filename == "new"FREDX5739_EXT || base_redx_5739_filename == "default"FREDX5739_EXT) if (!cb_redx_5739_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_redx_5739_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(true); export_wrapfile(base_redx_5739_filename, wrapfilename, buffredx_5739, pext != ".wrap"); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(false); write_redx_5739(def_redx_5739_filename); } } void cb_redx_5739_wrap_autosend() { if (check_redx_5739fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739fields(); if (base_redx_5739_filename == "new"FREDX5739_EXT || base_redx_5739_filename == "default"FREDX5739_EXT) if (!cb_redx_5739_save_as()) return; update_header(FROM); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(true); xfr_via_socket(base_redx_5739_filename, buffredx_5739); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(false); write_redx_5739(def_redx_5739_filename); } void cb_redx_5739_load_template() { string def_redx_5739_filename = def_redx_5739_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TREDX5739_EXT, def_redx_5739_filename.c_str()); if (p) { clear_redx_5739_form(); read_data_file(p); def_redx_5739_TemplateName = p; show_filename(def_redx_5739_TemplateName); using_redx_5739_template = true; } } void cb_redx_5739_save_template() { if (!using_redx_5739_template) { cb_redx_5739_save_as_template(); return; } string def_redx_5739_filename = def_redx_5739_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TREDX5739_EXT, def_redx_5739_filename.c_str()); if (p) { update_header(CHANGED); update_redx_5739fields(); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(); write_redx_5739(p); } } void cb_redx_5739_save_as_template() { string def_redx_5739_filename = def_redx_5739_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TREDX5739_EXT, def_redx_5739_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_redx_5739_TemplateName = p; if (strlen(pext) == 0) def_redx_5739_TemplateName.append(TREDX5739_EXT); remove_spaces_from_filename(def_redx_5739_TemplateName); clear_header(); update_header(CHANGED); update_redx_5739fields(); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(); write_redx_5739(def_redx_5739_TemplateName); show_filename(def_redx_5739_TemplateName); using_redx_5739_template = true; } } void cb_redx_5739_open() { const char *p = FSEL::select(_("Open data file"), "ICS-redx_5739\t*"FREDX5739_EXT, def_redx_5739_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_redx_5739_form(); read_data_file(p); using_redx_5739_template = false; def_redx_5739_filename = p; show_filename(def_redx_5739_filename); } void write_redx_5739(string s) { FILE *fileredx_5739 = fopen(s.c_str(), "w"); if (!fileredx_5739) return; fwrite(buffredx_5739.c_str(), buffredx_5739.length(), 1, fileredx_5739); fclose(fileredx_5739); } bool cb_redx_5739_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FREDX5739_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_redx_5739_filename; p = FSEL::saveas(_("Save data file"), "ICS-redx_5739\t*"FREDX5739_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_redx_5739_filename = p; if (strlen(pext) == 0) def_redx_5739_filename.append(FREDX5739_EXT); remove_spaces_from_filename(def_redx_5739_filename); update_header(NEW); update_redx_5739fields(); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(); write_redx_5739(def_redx_5739_filename); using_redx_5739_template = false; show_filename(def_redx_5739_filename); return true; } void cb_redx_5739_save() { if (base_redx_5739_filename == "new"FREDX5739_EXT || base_redx_5739_filename == "default"FREDX5739_EXT || using_redx_5739_template == true) { cb_redx_5739_save_as(); return; } if (check_redx_5739fields()) update_header(CHANGED); update_redx_5739fields(); buffredx_5739.assign(header("<redx_5739>")); make_buffredx_5739(); write_redx_5739(def_redx_5739_filename); using_redx_5739_template = false; } void quad_to_html( string &target, QUAD *p) { string X = "X"; string SP = " "; string sval = " "; char szval[20]; while (p->qtype != E) { if (p->qtype == B) replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); else if (p->qtype == S) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == T) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); replacestr(target, p->htmnbr, sval); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } p++; } } void cb_redx_5739_html() { string name_name = fl_filename_name(def_redx_5739_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string redx_5739_name = ICS_dir; redx_5739_name.append(name_name); redx_5739_name.append(".html"); update_redx_5739fields(); string formredx_5739 = redx_5739_html_template; replacestr(formredx_5739, TITLE, name_name); quad_to_html (formredx_5739, redx_QUAD); quad_to_html (formredx_5739, redx_QUAD1); FILE *fileredx_5739 = fopen(redx_5739_name.c_str(), "w"); fprintf(fileredx_5739,"%s", formredx_5739.c_str()); fclose(fileredx_5739); open_url(redx_5739_name.c_str()); } void cb_5739_msg_type() { if (selected_form == REDX5739 ) { show_filename(def_redx_5739_filename); } else { show_filename(def_rg_filename); } } void quad_to_text( string &target, QUAD *p) { string X = "X"; string SP = " "; string sval = " "; string del = "DELETE"; char szval[20]; while (p->qtype != E) { if (p->qtype == B) { bool b = *((bool *)(p->ptr)); if (b) replacestr(target, p->htmnbr, X); else replacestr(target, p->htmnbr, del); } else if (p->qtype == S) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == T) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, p->htmnbr, sval); else replacestr(target, p->htmnbr, del); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } p++; } } void strip_text( string &target ) { size_t p = 0, p1, p2; while ((p = target.find ("DELETE"), p) != string::npos) { p1 = target.rfind ("\n", p); p2 = target.find ("\n", p); if (p1 != string::npos && p2 != string::npos) target.erase( p1, p2 - p1 ); p++; } } void cb_redx_5739_textout() { string redx_5739_name = ICS_dir; redx_5739_name.append("redx_5739.txt"); update_redx_5739fields(); string formredx_5739 = redx_5739_text_template; quad_to_text (formredx_5739, redx_QUAD); quad_to_text (formredx_5739, redx_QUAD1); strip_text (formredx_5739); FILE *fileredx_5739 = fopen(redx_5739_name.c_str(), "w"); fprintf(fileredx_5739,"%s", formredx_5739.c_str()); fclose(fileredx_5739); open_url(redx_5739_name.c_str()); } �������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739B.cxx����������������������������������������������������������������0000664�0001750�0001750�00000054124�12330516146�013644� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string s_redx_5739B_nbr; string s_redx_5739B_name; string s_redx_5739B_state; string s_redx_5739B_cnty; string s_redx_5739B_city; string s_redx_5739B_date; string s_redx_5739B_georef; string s_redx_5739B_north; string s_redx_5739B_east; string s_redx_5739B_south; string s_redx_5739B_west; string s_redx_5739B_dwell; string s_redx_5739B_ds; string s_redx_5739B_mj; string s_redx_5739B_mn; string s_redx_5739B_af; string s_redx_5739B_in; string s_redx_5739B_un; string s_redx_5739B_bs; string s_redx_5739B_gi; // could not use real names ... WIN32 barfs enum QTYPE_5739B { B, S, M, T, I, F, C, E }; // bool, string, multi-line string, text, int, float, character, empty struct QUAD_5739B { QTYPE_5739B qtype; // type of field string htmnbr; void *ptr; Fl_Widget *widget; }; // singular entries in form QUAD_5739B redx_QUAD_5739B[] = { { S, ":drnbr:", &s_redx_5739B_nbr, rdx_5739B_nbr }, // 0 { S, ":drnam:", &s_redx_5739B_name, rdx_5739B_name }, // 1 { S, ":state:", &s_redx_5739B_state, rdx_5739B_state }, // 2 { S, ":cnty:", &s_redx_5739B_cnty, rdx_5739B_cnty }, // 3 { S, ":city:", &s_redx_5739B_city, rdx_5739B_city }, // 4 { S, ":date:", &s_redx_5739B_date, rdx_5739B_date }, // 5 { S, ":georef:", &s_redx_5739B_georef, rdx_5739B_georef }, // 6 { S, ":nbr:", &s_redx_5739B_dwell, rdx_5739B_dwell }, // 7 { S, ":d:", &s_redx_5739B_ds, rdx_5739B_ds }, // 8 { S, ":j:", &s_redx_5739B_mj, rdx_5739B_mj }, // 9 { S, ":n:", &s_redx_5739B_mn, rdx_5739B_mn }, // 10 { S, ":a:", &s_redx_5739B_af, rdx_5739B_af }, // 11 { S, ":i:", &s_redx_5739B_in, rdx_5739B_in }, // 12 { S, ":u:", &s_redx_5739B_un, rdx_5739B_un }, // 13 { S, ":b:", &s_redx_5739B_bs, rdx_5739B_bs }, // 14 { S, ":nb:", &s_redx_5739B_north, rdx_5739B_north }, // 15 { S, ":eb:", &s_redx_5739B_east, rdx_5739B_east }, // 16 { S, ":sb:", &s_redx_5739B_south, rdx_5739B_south }, // 17 { S, ":wb:", &s_redx_5739B_west, rdx_5739B_west }, // 18 { M, ":gi:", &s_redx_5739B_gi, rdx_5739B_gi }, // 19 { E, "", NULL, NULL } }; string buffredx_5739B; string def_redx_5739B_filename = ""; string base_redx_5739B_filename = ""; string def_redx_5739B_TemplateName = ""; bool using_redx_5739B_template = false; static bool fields_initialized = false; // required to initialize the control pointers in the QUAD_5739B array static void init_widgets_5739B() { redx_QUAD_5739B[0].widget = rdx_5739B_nbr; redx_QUAD_5739B[1].widget = rdx_5739B_name; redx_QUAD_5739B[2].widget = rdx_5739B_state; redx_QUAD_5739B[3].widget = rdx_5739B_cnty; redx_QUAD_5739B[4].widget = rdx_5739B_city; redx_QUAD_5739B[5].widget = rdx_5739B_date; redx_QUAD_5739B[6].widget = rdx_5739B_georef; redx_QUAD_5739B[7].widget = rdx_5739B_dwell; redx_QUAD_5739B[8].widget = rdx_5739B_ds; redx_QUAD_5739B[9].widget = rdx_5739B_mj; redx_QUAD_5739B[10].widget = rdx_5739B_mn; redx_QUAD_5739B[11].widget = rdx_5739B_af; redx_QUAD_5739B[12].widget = rdx_5739B_in; redx_QUAD_5739B[13].widget = rdx_5739B_un; redx_QUAD_5739B[14].widget = rdx_5739B_bs; redx_QUAD_5739B[15].widget = rdx_5739B_north; redx_QUAD_5739B[16].widget = rdx_5739B_east; redx_QUAD_5739B[17].widget = rdx_5739B_south; redx_QUAD_5739B[18].widget = rdx_5739B_west; redx_QUAD_5739B[19].widget = rdx_5739B_gi; fields_initialized = true; } //enum QTYPE_5739B { B, S, T, I, F, C, E }; // bool, string, text, int, float, character, empty void clearQUAD_5739B(QUAD_5739B *p) { QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B : (*(bool *)(p->ptr)) = false; break; case S : case M : ((string *)(p->ptr))->clear(); break; case T : ((string *)(p->ptr))->clear(); break; case C : (*(char *)(p->ptr)) = ' '; break; case I : (*(int *)(p->ptr)) = 0; break; case F : (*(float *)(p->ptr)) = 0.0; break; case E : return; } p++; } } void clear_redx_5739Bfields() { if (!fields_initialized) init_widgets_5739B(); clearQUAD_5739B(redx_QUAD_5739B); } bool checkQUAD_5739B(QUAD_5739B *p) { int i = 0; float f = 0; char c = ' '; QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { if (p->widget == NULL) return false; switch (qt) { case B: if (*((bool *)(p->ptr)) != ((Fl_Check_Button *)p->widget)->value()) return true; break; case S: case M: if (*((string *)(p->ptr)) != ((Fl_Input2 *)p->widget)->value()) return true; break; case T: if (*((string *)(p->ptr)) != ((FTextEdit *)p->widget)->buffer()->text()) return true; break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; if (*((char *)(p->ptr)) != c) return true; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); if (*((int *)(p->ptr)) != i) return true; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); if (*((float *)(p->ptr)) != f) return true; break; case E: default: return false; } p++; } return false; } bool check_redx_5739Bfields() { return checkQUAD_5739B(redx_QUAD_5739B); } void updateQUAD_5739B(QUAD_5739B *p) { int i = 0; float f = 0; char c = ' '; QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = ((Fl_Check_Button *)p->widget)->value(); break; case S: case M: *((string *)(p->ptr)) = ((Fl_Input2 *)p->widget)->value(); break; case T: *((string *)(p->ptr)) = ((FTextEdit *)p->widget)->buffer()->text(); break; case C: c = ' '; if (((Fl_Input2 *)p->widget)->value()[0]) c = ((Fl_Input2 *)p->widget)->value()[0]; *((char *)(p->ptr)) = c; break; case I: i = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; if (((Fl_Input2 *)p->widget)->value()[0]) sscanf( ((Fl_Input2 *)p->widget)->value(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void update_redx_5739Bfields() { if (!fields_initialized) init_widgets_5739B(); updateQUAD_5739B(redx_QUAD_5739B); } void updateFORM_5739B(QUAD_5739B *p) { char val[20]; QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: ((Fl_Check_Button *)p->widget)->value(*((bool *)(p->ptr))); break; case S: case M: ((Fl_Input2 *)p->widget)->value(((string *)(p->ptr))->c_str()); break; case T: ((FTextEdit *)p->widget)->clear(); ((FTextEdit *)p->widget)->add(((string *)(p->ptr))->c_str()); break; case C: val[0] = *((char *)(p->ptr)); val[1] = 0; ((Fl_Input2 *)p->widget)->value(val); break; case I: if (*((int *)(p->ptr)) == 0) ((Fl_Input2 *)p->widget)->value(""); else { snprintf(val, sizeof(val), "%d", *((int *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); } break; case F: snprintf(val, sizeof(val), "%f", *((float *)(p->ptr))); ((Fl_Input2 *)p->widget)->value(val); break; case E: default: return; } p++; } } void update_redx_5739Bform() { if (!fields_initialized) init_widgets_5739B(); updateFORM_5739B(redx_QUAD_5739B); } void clear_redx_5739B_form() { clear_redx_5739Bfields(); update_redx_5739Bform(); } static string mbuff; void make_buffQUAD_5739B(QUAD_5739B *p) { string one = "1"; string zero = "0"; string sval = " "; char szval[20]; QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: if (*((bool *)(p->ptr)) == true) mbuff.append( lineout( p->htmnbr, *((bool *)(p->ptr)) ? one : zero)); break; case S: case M: if (((string *)(p->ptr))->length()) mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case T: mbuff.append( lineout( p->htmnbr, *((string *)(p->ptr)))); break; case C: if ((*(char *)(p->ptr)) != 0 && *((char *)(p->ptr)) != ' ') { sval = " "; sval[0] = *((char *)(p->ptr)); mbuff.append( lineout( p->htmnbr, sval)); } break; case I: if (*((int*)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case F: if (*((float *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; mbuff.append( lineout( p->htmnbr, sval) ); } break; case E: default: return; } p++; } } void make_buffredx_5739B(bool compress = false) { mbuff.clear(); make_buffQUAD_5739B(redx_QUAD_5739B); if (compress) compress_maybe(mbuff); buffredx_5739B.append(mbuff); } void readQUAD_5739B(string data, QUAD_5739B *p) { int i = 0; float f; QTYPE_5739B qt = E; while ((qt = p->qtype) != E) { switch (qt) { case B: *((bool *)(p->ptr)) = (findstr( data, p->htmnbr ) == "1"); break; case S: case M: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case T: *((string *)(p->ptr)) = findstr( data, p->htmnbr ); break; case C: *((char *)(p->ptr)) = findstr( data, p->htmnbr )[0]; break; case I: i = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%d", &i); *((int *)(p->ptr)) = i; break; case F: f = 0; sscanf( findstr( data, p->htmnbr ).c_str(), "%f", &f); *((float *)(p->ptr)) = f; break; case E: default: return; } p++; } } void read_redx_5739B_buffer(string data) { clear_redx_5739Bfields(); read_header(data); readQUAD_5739B (data, redx_QUAD_5739B); update_redx_5739Bform(); } void cb_redx_5739B_new() { if (check_redx_5739Bfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_redx_5739B_save(); } } clear_redx_5739B_form(); clear_header(); def_redx_5739B_filename = ICS_msg_dir; def_redx_5739B_filename.append("new"FREDX5739B_EXT); show_filename(def_redx_5739B_filename); using_redx_5739B_template = false; } void cb_redx_5739B_import() { fl_alert2("Not implemented"); } void cb_redx_5739B_export() { fl_alert2("Not implemented"); } void cb_redx_5739B_wrap_import(string wrapfilename, string inpbuffer) { clear_redx_5739B_form(); read_redx_5739B_buffer(inpbuffer); def_redx_5739B_filename = ICS_msg_dir; def_redx_5739B_filename.append(wrapfilename); show_filename(def_redx_5739B_filename); using_redx_5739B_template = false; } int eval_redx_5739B_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_redx_5739B_filename).append("]"); update_redx_5739Bfields(); update_header(FROM); evalstr.append(header("<redx_5739B>")); buffredx_5739B.clear(); make_buffredx_5739B(true); if (buffredx_5739B.empty()) return 0; compress_maybe( buffredx_5739B ); evalstr.append( buffredx_5739B ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_redx_5739B_wrap_export() { if (check_redx_5739Bfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739Bfields(); if (base_redx_5739B_filename == "new"FREDX5739B_EXT || base_redx_5739B_filename == "default"FREDX5739B_EXT) if (!cb_redx_5739B_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_redx_5739B_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(true); export_wrapfile(base_redx_5739B_filename, wrapfilename, buffredx_5739B, pext != ".wrap"); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(false); write_redx_5739B(def_redx_5739B_filename); } } void cb_redx_5739B_wrap_autosend() { if (check_redx_5739Bfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_5739Bfields(); if (base_redx_5739B_filename == "new"FREDX5739B_EXT || base_redx_5739B_filename == "default"FREDX5739B_EXT) if (!cb_redx_5739B_save_as()) return; update_header(FROM); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(true); xfr_via_socket(base_redx_5739B_filename, buffredx_5739B); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(false); write_redx_5739B(def_redx_5739B_filename); } void cb_redx_5739B_load_template() { string def_redx_5739B_filename = def_redx_5739B_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TREDX5739B_EXT, def_redx_5739B_filename.c_str()); if (p) { clear_redx_5739B_form(); read_data_file(p); def_redx_5739B_TemplateName = p; show_filename(def_redx_5739B_TemplateName); using_redx_5739B_template = true; } } void cb_redx_5739B_save_template() { if (!using_redx_5739B_template) { cb_redx_5739B_save_as_template(); return; } string def_redx_5739B_filename = def_redx_5739B_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TREDX5739B_EXT, def_redx_5739B_filename.c_str()); if (p) { update_header(CHANGED); update_redx_5739Bfields(); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(); write_redx_5739B(p); } } void cb_redx_5739B_save_as_template() { string def_redx_5739B_filename = def_redx_5739B_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TREDX5739B_EXT, def_redx_5739B_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_redx_5739B_TemplateName = p; if (strlen(pext) == 0) def_redx_5739B_TemplateName.append(TREDX5739B_EXT); remove_spaces_from_filename(def_redx_5739B_TemplateName); clear_header(); update_header(CHANGED); update_redx_5739Bfields(); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(); write_redx_5739B(def_redx_5739B_TemplateName); show_filename(def_redx_5739B_TemplateName); using_redx_5739B_template = true; } } void cb_redx_5739B_open() { const char *p = FSEL::select(_("Open data file"), "ICS-redx_5739B\t*"FREDX5739B_EXT, def_redx_5739B_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_redx_5739B_form(); read_data_file(p); using_redx_5739B_template = false; def_redx_5739B_filename = p; show_filename(def_redx_5739B_filename); } void write_redx_5739B(string s) { FILE *fileredx_5739B = fopen(s.c_str(), "w"); if (!fileredx_5739B) return; fwrite(buffredx_5739B.c_str(), buffredx_5739B.length(), 1, fileredx_5739B); fclose(fileredx_5739B); } bool cb_redx_5739B_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FREDX5739B_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_redx_5739B_filename; p = FSEL::saveas(_("Save data file"), "ICS-redx_5739B\t*"FREDX5739B_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_redx_5739B_filename = p; if (strlen(pext) == 0) def_redx_5739B_filename.append(FREDX5739B_EXT); remove_spaces_from_filename(def_redx_5739B_filename); update_header(NEW); update_redx_5739Bfields(); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(); write_redx_5739B(def_redx_5739B_filename); using_redx_5739B_template = false; show_filename(def_redx_5739B_filename); return true; } void cb_redx_5739B_save() { if (base_redx_5739B_filename == "new"FREDX5739B_EXT || base_redx_5739B_filename == "default"FREDX5739B_EXT || using_redx_5739B_template == true) { cb_redx_5739B_save_as(); return; } if (check_redx_5739Bfields()) update_header(CHANGED); update_redx_5739Bfields(); buffredx_5739B.assign(header("<redx_5739B>")); make_buffredx_5739B(); write_redx_5739B(def_redx_5739B_filename); using_redx_5739B_template = false; } void quad_to_html_5739B( string &target, QUAD_5739B *p) { string X = "X"; string SP = " "; string sval = " "; char szval[20]; while (p->qtype != E) { if (p->qtype == B) replacestr(target, p->htmnbr, *((bool *)(p->ptr)) ? X : SP); else if (p->qtype == S) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == M) { sval = *((string *)(p->ptr)); size_t np = string::npos; while ( (np = sval.find("\n")) != string::npos) sval.replace(np, 1, "<br>"); replacestr(target, p->htmnbr, sval); } else if (p->qtype == T) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); replacestr(target, p->htmnbr, sval); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; } else sval.clear(); replacestr(target, p->htmnbr, sval); } p++; } } void cb_redx_5739B_html() { string name_name = fl_filename_name(def_redx_5739B_filename.c_str()); size_t p = name_name.rfind('.'); if (p != string::npos) name_name.erase(p); string redx_5739B_name = ICS_dir; redx_5739B_name.append(name_name); redx_5739B_name.append(".html"); update_redx_5739Bfields(); string formredx_5739B = redx_5739B_html_template; replacestr(formredx_5739B, TITLE, name_name); quad_to_html_5739B (formredx_5739B, redx_QUAD_5739B); FILE *fileredx_5739B = fopen(redx_5739B_name.c_str(), "w"); fprintf(fileredx_5739B,"%s", formredx_5739B.c_str()); fclose(fileredx_5739B); open_url(redx_5739B_name.c_str()); } void cb_5739B_msg_type() { if (selected_form == REDX5739B ) { show_filename(def_redx_5739B_filename); } else { show_filename(def_rg_filename); } } void quad_to_text( string &target, QUAD_5739B *p) { string X = "X"; string SP = " "; string sval = " "; string del = "DELETE"; char szval[20]; while (p->qtype != E) { if (p->qtype == B) { bool b = *((bool *)(p->ptr)); if (b) replacestr(target, p->htmnbr, X); else replacestr(target, p->htmnbr, del); } else if (p->qtype == S || p->qtype == M) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == T) { if (((string *)(p->ptr))->length()) replacestr(target, p->htmnbr, *((string *)(p->ptr))); else replacestr(target, p->htmnbr, del); } else if (p->qtype == C) { sval = " "; sval[0] = *((char *)(p->ptr)); if (sval[0] != 0 && sval[0] != ' ') replacestr(target, p->htmnbr, sval); else replacestr(target, p->htmnbr, del); } else if (p->qtype == I) { if (*((int *)(p->ptr)) > 0) { snprintf(szval, sizeof(szval), "%d", *((int *)(p->ptr)) ); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } else if (p->qtype == F) { if (*((float *)(p->ptr)) != 0) { snprintf(szval, sizeof(szval), "%f", *((float *)(p->ptr))); sval = szval; replacestr(target, p->htmnbr, sval); } else replacestr(target, p->htmnbr, del); } p++; } } void strip_text_5739B( string &target ) { size_t p = 0, p1, p2; while ((p = target.find ("DELETE"), p) != string::npos) { p1 = target.rfind ("\n", p); p2 = target.find ("\n", p); if (p1 != string::npos && p2 != string::npos) target.erase( p1, p2 - p1 ); p++; } } void cb_redx_5739B_textout() { string redx_5739B_name = ICS_dir; redx_5739B_name.append("redx_5739B.txt"); update_redx_5739Bfields(); string formredx_5739B = redx_5739B_text_template; quad_to_text (formredx_5739B, redx_QUAD_5739B); strip_text_5739B (formredx_5739B); FILE *fileredx_5739B = fopen(redx_5739B_name.c_str(), "w"); fprintf(fileredx_5739B,"%s", formredx_5739B.c_str()); fclose(fileredx_5739B); open_url(redx_5739B_name.c_str()); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739A_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000022047�12330516146�014470� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_redx_5739A = (Fl_Group *)0; Fl_Tabs *tab_redx_5739A_type = (Fl_Tabs *)0; Fl_Group *tab_redx_5739A_1 = (Fl_Group *)0; Fl_Input2 *rdx_5739A_nbr = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_name = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_state = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_cnty = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_city = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_date = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_street = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_georef = (Fl_Input2 *)0; Fl_Group *tab_redx_5739A_2 = (Fl_Group *)0; Fl_Input2 *rdx_5739A_adrs0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_dwell0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_base0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_ds0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_mj0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_mn0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_af0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_in0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_un0 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_gd0 = (Fl_Input2 *)0; Fl_Group *tab_redx_5739A_3 = (Fl_Group *)0; Fl_Input2 *rdx_5739A_adrs1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_dwell1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_base1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_ds1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_mj1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_mn1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_af1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_in1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_un1 = (Fl_Input2 *)0; Fl_Input2 *rdx_5739A_gd1 = (Fl_Input2 *)0; //---------------------------------------------------------------------- // widget callbacks & support //---------------------------------------------------------------------- static void cb_btn_5739A_date(Fl_Button*, void*) { rdx_5739A_date->value(szDate()); estimate(); } void create_redx_5739A() { int Y = tab_top; tab_redx_5739A = new Fl_Group(0, Y, 570, 390); tab_redx_5739A->align(FL_ALIGN_TOP); tab_redx_5739A_type = new Fl_Tabs(0, Y+2, 570, 387); tab_redx_5739A_type->selection_color((Fl_Color)246); tab_redx_5739A_1 = new Fl_Group(0, Y+25, 570, 360, _("DR data")); Y += 35; Fl_Box *bx = new Fl_Box(50, Y, 200, 24, _("Red Cross Form 5739A")); bx->box(FL_FLAT_BOX); bx->align(FL_ALIGN_INSIDE | FL_ALIGN_CENTER); Y += 30; rdx_5739A_nbr = new Fl_Input2(100, Y, 150, 24, _("DR #")); rdx_5739A_nbr->tooltip(_("")); rdx_5739A_nbr->callback(redx_changed); rdx_5739A_nbr->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_name = new Fl_Input2(100, Y, 250, 24, _("DR Name")); rdx_5739A_name->tooltip(_("")); rdx_5739A_name->callback(redx_changed); rdx_5739A_name->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_state = new Fl_Input2(100, Y, 50, 24, _("State")); rdx_5739A_state->tooltip(_("")); rdx_5739A_state->callback(redx_changed); rdx_5739A_state->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_cnty = new Fl_Input2(100, Y, 250, 24, _("County")); rdx_5739A_cnty->tooltip(_("")); rdx_5739A_cnty->callback(redx_changed); rdx_5739A_cnty->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_city = new Fl_Input2(100, Y, 450, 24, _("City")); rdx_5739A_city->tooltip(_("")); rdx_5739A_city->callback(redx_changed); rdx_5739A_city->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_date = new Fl_Input2(100, Y, 150, 24, _("Date")); rdx_5739A_date->tooltip(_("")); rdx_5739A_date->callback(redx_changed); rdx_5739A_date->when(FL_WHEN_CHANGED); Fl_Button *btn_5739A_date = new Fl_Button(260, Y+2, 20, 20, _("...")); btn_5739A_date->tooltip(_("Set today")); btn_5739A_date->callback((Fl_Callback*)cb_btn_5739A_date); Y += 30; rdx_5739A_street = new Fl_Input2(100, Y, 450, 24, _("Street")); rdx_5739A_street->tooltip(_("")); rdx_5739A_street->callback(redx_changed); rdx_5739A_street->when(FL_WHEN_CHANGED); Y += 30; rdx_5739A_georef = new Fl_Input2(100, Y, 450, 24, _("Geo. Ref.")); rdx_5739A_georef->tooltip(_("")); rdx_5739A_georef->callback(redx_changed); rdx_5739A_georef->when(FL_WHEN_CHANGED); tab_redx_5739A_1->end(); Y = tab_top; tab_redx_5739A_2 = new Fl_Group(0, Y+25, 570, 360, _("Area-1")); Y += 35; rdx_5739A_adrs0 = new Fl_Input2(160, Y, 300, 24, _("range of address #'s")); rdx_5739A_adrs0->tooltip(_("")); rdx_5739A_adrs0->callback(redx_changed); rdx_5739A_adrs0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_dwell0 = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); rdx_5739A_dwell0->tooltip(_("")); rdx_5739A_dwell0->callback(redx_changed); rdx_5739A_dwell0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_base0 = new Fl_Input2(160, Y, 50, 24, _("Basements y/n?")); rdx_5739A_base0->tooltip(_("")); rdx_5739A_base0->callback(redx_changed); rdx_5739A_base0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_ds0 = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); rdx_5739A_ds0->tooltip(_("")); rdx_5739A_ds0->callback(redx_changed); rdx_5739A_ds0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_mj0 = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); rdx_5739A_mj0->tooltip(_("")); rdx_5739A_mj0->callback(redx_changed); rdx_5739A_mj0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_mn0 = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); rdx_5739A_mn0->tooltip(_("")); rdx_5739A_mn0->callback(redx_changed); rdx_5739A_mn0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_af0 = new Fl_Input2(160, Y, 50, 24, _("Affected %")); rdx_5739A_af0->tooltip(_("")); rdx_5739A_af0->callback(redx_changed); rdx_5739A_af0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_in0 = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); rdx_5739A_in0->tooltip(_("")); rdx_5739A_in0->callback(redx_changed); rdx_5739A_in0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_un0 = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); rdx_5739A_un0->tooltip(_("")); rdx_5739A_un0->callback(redx_changed); rdx_5739A_un0->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_gd0 = new Fl_Input2(160, Y, 400, 76, _("General desc.")); rdx_5739A_gd0->align(FL_ALIGN_LEFT_TOP); rdx_5739A_gd0->type(4); rdx_5739A_gd0->tooltip(_("")); rdx_5739A_gd0->callback(redx_changed); rdx_5739A_gd0->when(FL_WHEN_CHANGED); tab_redx_5739A_2->end(); Y = tab_top; tab_redx_5739A_3 = new Fl_Group(0, Y+25, 570, 360, _("Area-2")); Y += 35; rdx_5739A_adrs1 = new Fl_Input2(160, Y, 300, 24, _("range of address #'s")); rdx_5739A_adrs1->tooltip(_("")); rdx_5739A_adrs1->callback(redx_changed); rdx_5739A_adrs1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_dwell1 = new Fl_Input2(160, Y, 50, 24, _("# affected dwellings")); rdx_5739A_dwell1->tooltip(_("")); rdx_5739A_dwell1->callback(redx_changed); rdx_5739A_dwell1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_base1 = new Fl_Input2(160, Y, 50, 24, _("Basements y/n?")); rdx_5739A_base1->tooltip(_("")); rdx_5739A_base1->callback(redx_changed); rdx_5739A_base1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_ds1 = new Fl_Input2(160, Y, 50, 24, _("Destroyed %")); rdx_5739A_ds1->tooltip(_("")); rdx_5739A_ds1->callback(redx_changed); rdx_5739A_ds1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_mj1 = new Fl_Input2(160, Y, 50, 24, _("Major damage %")); rdx_5739A_mj1->tooltip(_("")); rdx_5739A_mj1->callback(redx_changed); rdx_5739A_mj1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_mn1 = new Fl_Input2(160, Y, 50, 24, _("Minor damage %")); rdx_5739A_mn1->tooltip(_("")); rdx_5739A_mn1->callback(redx_changed); rdx_5739A_mn1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_af1 = new Fl_Input2(160, Y, 50, 24, _("Affected %")); rdx_5739A_af1->tooltip(_("")); rdx_5739A_af1->callback(redx_changed); rdx_5739A_af1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_in1 = new Fl_Input2(160, Y, 50, 24, _("Inaccessible %")); rdx_5739A_in1->tooltip(_("")); rdx_5739A_in1->callback(redx_changed); rdx_5739A_in1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_un1 = new Fl_Input2(160, Y, 50, 24, _("Unknown/None %")); rdx_5739A_un1->tooltip(_("")); rdx_5739A_un1->callback(redx_changed); rdx_5739A_un1->when(FL_WHEN_CHANGED); Y += 25; rdx_5739A_gd1 = new Fl_Input2(160, Y, 400, 76, _("General desc.")); rdx_5739A_gd1->align(FL_ALIGN_LEFT_TOP); rdx_5739A_gd1->type(4); rdx_5739A_gd1->tooltip(_("")); rdx_5739A_gd1->callback(redx_changed); rdx_5739A_gd1->when(FL_WHEN_CHANGED); tab_redx_5739A_3->end(); tab_redx_5739A->end(); tab_redx_5739A->hide(); }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_snw.cxx������������������������������������������������������������������0000664�0001750�0001750�00000043404�12330516146�013741� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; string s_redx_snw_lname; string s_redx_snw_fname; string s_redx_snw_area1; string s_redx_snw_xchg1; string s_redx_snw_suffix1; string s_redx_snw_area2; string s_redx_snw_xchg2; string s_redx_snw_suffix2; string s_redx_snw_area3; string s_redx_snw_xchg3; string s_redx_snw_suffix3; string s_redx_snw_pdline1; string s_redx_snw_pdline2; string s_redx_snw_pdcity; string s_redx_snw_pdst; string s_redx_snw_pdzip; string s_redx_snw_haline1; string s_redx_snw_haline2; string s_redx_snw_hacity; string s_redx_snw_hast; string s_redx_snw_hazip; string s_redx_snw_cmsg; bool b_redx_snw_nophone; bool b_snw_m1; bool b_snw_m2; bool b_snw_m3; bool b_snw_m4; bool b_snw_m5; bool b_snw_m6; bool b_snw_m7; bool b_snw_m8; bool b_snw_m9; bool b_snw_m10; bool b_snw_m11; bool b_snw_m12; bool b_snw_m13; bool b_snw_m14; bool b_snw_m15; // could not use real names ... WIN32 barfs enum FTYPE { B, S, T, E }; // bool, string, text, empty struct TRIAD { FTYPE ftype; string htmlname; string *ps; bool *pb; Fl_Widget *control; }; TRIAD redx_triad[] = { { S, ":lname:", &s_redx_snw_lname, NULL, snw_lname }, { S, ":fname:", &s_redx_snw_fname, NULL, snw_fname }, { B, ":nophone:", NULL, &b_redx_snw_nophone, snw_nophone }, { S, ":area1:", &s_redx_snw_area1, NULL, snw_area1 }, { S, ":xchg1:", &s_redx_snw_xchg1, NULL, snw_xchg1 }, { S, ":suffix1:", &s_redx_snw_suffix1, NULL, snw_suffix1 }, { S, ":area2:", &s_redx_snw_area2, NULL, snw_area2 }, { S, ":xchg2:", &s_redx_snw_xchg2, NULL, snw_xchg2 }, { S, ":suffix2:", &s_redx_snw_suffix2, NULL, snw_suffix2 }, { S, ":area3:", &s_redx_snw_area3, NULL, snw_area3 }, { S, ":xchg3:", &s_redx_snw_xchg3, NULL, snw_xchg3 }, { S, ":suffix3:", &s_redx_snw_suffix3, NULL, snw_suffix3 }, { S, ":pdline1:", &s_redx_snw_pdline1, NULL, snw_pdline1 }, { S, ":pdline2:", &s_redx_snw_pdline2, NULL, snw_pdline2 }, { S, ":pdcity:", &s_redx_snw_pdcity, NULL, snw_pdcity }, { S, ":pdst:", &s_redx_snw_pdst, NULL, snw_pdst }, { S, ":pdzip:", &s_redx_snw_pdzip, NULL, snw_pdzip }, { S, ":haline1:", &s_redx_snw_haline1, NULL, snw_haline1 }, { S, ":haline2:", &s_redx_snw_haline2, NULL, snw_haline2 }, { S, ":hacity:", &s_redx_snw_hacity, NULL, snw_hacity }, { S, ":hast:", &s_redx_snw_hast, NULL, snw_hast }, { S, ":hazip:", &s_redx_snw_hazip, NULL, snw_hazip }, { B, ":m1:", NULL, &b_snw_m1, snw_m1 }, { B, ":m2:", NULL, &b_snw_m2, snw_m2 }, { B, ":m3:", NULL, &b_snw_m3, snw_m3 }, { B, ":m4:", NULL, &b_snw_m4, snw_m4 }, { B, ":m5:", NULL, &b_snw_m5, snw_m5 }, { B, ":m6:", NULL, &b_snw_m6, snw_m6 }, { B, ":m7:", NULL, &b_snw_m7, snw_m7 }, { B, ":m8:", NULL, &b_snw_m8, snw_m8 }, { B, ":m9:", NULL, &b_snw_m9, snw_m9 }, { B, ":m10:", NULL, &b_snw_m10, snw_m10 }, { B, ":m11:", NULL, &b_snw_m11, snw_m11 }, { B, ":m12:", NULL, &b_snw_m12, snw_m12 }, { B, ":m13:", NULL, &b_snw_m13, snw_m13 }, { B, ":m14:", NULL, &b_snw_m14, snw_m14 }, { B, ":m15:", NULL, &b_snw_m15, snw_m15 }, { T, ":cmsg:", &s_redx_snw_cmsg, NULL, snw_cmsg }, { E, "", NULL, NULL, NULL } }; string buffredx_snw; string def_redx_snw_filename = ""; string base_redx_snw_filename = ""; string def_redx_snw_TemplateName = ""; bool using_redx_snw_template = false; static bool fields_initialized = false; static void init_fields() { redx_triad[0].control = snw_lname; redx_triad[1].control = snw_fname; redx_triad[2].control = snw_nophone; redx_triad[3].control = snw_area1; redx_triad[4].control = snw_xchg1; redx_triad[5].control = snw_suffix1; redx_triad[6].control = snw_area2; redx_triad[7].control = snw_xchg2; redx_triad[8].control = snw_suffix2; redx_triad[9].control = snw_area3; redx_triad[10].control = snw_xchg3; redx_triad[11].control = snw_suffix3; redx_triad[12].control = snw_pdline1; redx_triad[13].control = snw_pdline2; redx_triad[14].control = snw_pdcity; redx_triad[15].control = snw_pdst; redx_triad[16].control = snw_pdzip; redx_triad[17].control = snw_haline1; redx_triad[18].control = snw_haline2; redx_triad[19].control = snw_hacity; redx_triad[20].control = snw_hast; redx_triad[21].control = snw_hazip; redx_triad[22].control = snw_m1; redx_triad[23].control = snw_m2; redx_triad[24].control = snw_m3; redx_triad[25].control = snw_m4; redx_triad[26].control = snw_m5; redx_triad[27].control = snw_m6; redx_triad[28].control = snw_m7; redx_triad[29].control = snw_m8; redx_triad[30].control = snw_m9; redx_triad[31].control = snw_m10; redx_triad[32].control = snw_m11; redx_triad[33].control = snw_m12; redx_triad[34].control = snw_m13; redx_triad[35].control = snw_m14; redx_triad[36].control = snw_m15; redx_triad[37].control = snw_cmsg; fields_initialized = true; } void clear_redx_snwfields() { if (!fields_initialized) init_fields(); TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == B) *(ptriad->pb) = false; else if (ptriad->ftype == S) (ptriad->ps)->clear(); else if (ptriad->ftype == T) (ptriad->ps)->clear(); ptriad++; } } bool check_redx_snwfields() { TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->control == NULL) return false; if (ptriad->ftype == B) { if (*(ptriad->pb) != ((Fl_Check_Button *)ptriad->control)->value()) return true; } else if (ptriad->ftype == S) { if (*(ptriad->ps) != ((Fl_Input2 *)ptriad->control)->value()) return true; } else if (ptriad->ftype == T){ if (*(ptriad->ps) != ((FTextEdit *)ptriad->control)->buffer()->text()) return true; } ptriad++; } return false; } void update_redx_snwfields() { if (!fields_initialized) init_fields(); TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == B) *(ptriad->pb) = ((Fl_Check_Button *)ptriad->control)->value(); else if (ptriad->ftype == S) *(ptriad->ps) = ((Fl_Input2 *)ptriad->control)->value(); else if (ptriad->ftype == T) *(ptriad->ps) = ((FTextEdit *)ptriad->control)->buffer()->text(); ptriad++; } } void update_redx_snwform() { if (!fields_initialized) init_fields(); TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == B) ((Fl_Check_Button *)ptriad->control)->value(*(ptriad->pb)); else if (ptriad->ftype == S) ((Fl_Input2 *)ptriad->control)->value((ptriad->ps)->c_str()); else if (ptriad->ftype == T) { ((FTextEdit *)ptriad->control)->clear(); ((FTextEdit *)ptriad->control)->add((ptriad->ps)->c_str()); } ptriad++; } } void clear_redx_snw_form() { clear_redx_snwfields(); update_redx_snwform(); } void make_buffredx_snw(bool compress = false) { string one = "1"; string zero = "0"; TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == B) buffredx_snw.append( lineout( ptriad->htmlname, (*(ptriad->pb) ? one : zero))); else if (ptriad->ftype == S) buffredx_snw.append( lineout( ptriad->htmlname, *(ptriad->ps))); else if (ptriad->ftype == T) buffredx_snw.append( lineout( ptriad->htmlname, *(ptriad->ps))); ptriad++; } if (compress) compress_maybe(buffredx_snw); } void read_redx_snw_buffer(string data) { clear_redx_snwfields(); read_header(data); TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == B) *(ptriad->pb) = (findstr( data, ptriad->htmlname ) == "1"); else if (ptriad->ftype == S) *(ptriad->ps) = findstr( data, ptriad->htmlname ); else if (ptriad->ftype == T) *(ptriad->ps) = findstr( data, ptriad->htmlname ); ptriad++; } update_redx_snwform(); } void cb_redx_snw_new() { if (check_redx_snwfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_redx_snw_save(); } } clear_redx_snw_form(); clear_header(); def_redx_snw_filename = ICS_msg_dir; def_redx_snw_filename.append("new"FREDXSNW_EXT); show_filename(def_redx_snw_filename); using_redx_snw_template = false; } void cb_redx_snw_import() { fl_alert2("Not implemented"); } void cb_redx_snw_export() { fl_alert2("Not implemented"); } void cb_redx_snw_wrap_import(string wrapfilename, string inpbuffer) { clear_redx_snw_form(); read_redx_snw_buffer(inpbuffer); def_redx_snw_filename = ICS_msg_dir; def_redx_snw_filename.append(wrapfilename); show_filename(def_redx_snw_filename); using_redx_snw_template = false; } int eval_redx_snw_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_redx_snw_filename).append("]"); update_redx_snwfields(); update_header(FROM); evalstr.append(header("<redx_snw>")); buffredx_snw.clear(); make_buffredx_snw(true); if (buffredx_snw.empty()) return 0; compress_maybe( buffredx_snw ); evalstr.append( buffredx_snw ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_redx_snw_wrap_export() { if (check_redx_snwfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_snwfields(); if (base_redx_snw_filename == "new"FREDXSNW_EXT || base_redx_snw_filename == "default"FREDXSNW_EXT) if (!cb_redx_snw_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_redx_snw_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(true); export_wrapfile(base_redx_snw_filename, wrapfilename, buffredx_snw, pext != ".wrap"); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(false); write_redx_snw(def_redx_snw_filename); } } void cb_redx_snw_wrap_autosend() { if (check_redx_snwfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_redx_snwfields(); if (base_redx_snw_filename == "new"FREDXSNW_EXT || base_redx_snw_filename == "default"FREDXSNW_EXT) if (!cb_redx_snw_save_as()) return; update_header(FROM); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(true); xfr_via_socket(base_redx_snw_filename, buffredx_snw); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(false); write_redx_snw(def_redx_snw_filename); } void cb_redx_snw_load_template() { string def_redx_snw_filename = def_redx_snw_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TREDXSNW_EXT, def_redx_snw_filename.c_str()); if (p) { clear_redx_snw_form(); read_data_file(p); def_redx_snw_TemplateName = p; show_filename(def_redx_snw_TemplateName); using_redx_snw_template = true; } } void cb_redx_snw_save_template() { if (!using_redx_snw_template) { cb_redx_snw_save_as_template(); return; } string def_redx_snw_filename = def_redx_snw_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TREDXSNW_EXT, def_redx_snw_filename.c_str()); if (p) { update_header(CHANGED); update_redx_snwfields(); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(); write_redx_snw(p); } } void cb_redx_snw_save_as_template() { string def_redx_snw_filename = def_redx_snw_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TREDXSNW_EXT, def_redx_snw_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_redx_snw_TemplateName = p; if (strlen(pext) == 0) def_redx_snw_TemplateName.append(TREDXSNW_EXT); remove_spaces_from_filename(def_redx_snw_TemplateName); clear_header(); update_header(CHANGED); update_redx_snwfields(); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(); write_redx_snw(def_redx_snw_TemplateName); show_filename(def_redx_snw_TemplateName); using_redx_snw_template = true; } } void cb_redx_snw_open() { const char *p = FSEL::select(_("Open data file"), "ICS-redx_snw\t*"FREDXSNW_EXT, def_redx_snw_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_redx_snw_form(); read_data_file(p); using_redx_snw_template = false; def_redx_snw_filename = p; show_filename(def_redx_snw_filename); } void write_redx_snw(string s) { FILE *fileredx_snw = fopen(s.c_str(), "w"); if (!fileredx_snw) return; fwrite(buffredx_snw.c_str(), buffredx_snw.length(), 1, fileredx_snw); fclose(fileredx_snw); } bool cb_redx_snw_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FREDXSNW_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_redx_snw_filename; p = FSEL::saveas(_("Save data file"), "ICS-redx_snw\t*"FREDXSNW_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_redx_snw_filename = p; if (strlen(pext) == 0) def_redx_snw_filename.append(FREDXSNW_EXT); remove_spaces_from_filename(def_redx_snw_filename); update_header(NEW); update_redx_snwfields(); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(); write_redx_snw(def_redx_snw_filename); using_redx_snw_template = false; show_filename(def_redx_snw_filename); return true; } void cb_redx_snw_save() { if (base_redx_snw_filename == "new"FREDXSNW_EXT || base_redx_snw_filename == "default"FREDXSNW_EXT || using_redx_snw_template == true) { cb_redx_snw_save_as(); return; } if (check_redx_snwfields()) update_header(CHANGED); update_redx_snwfields(); buffredx_snw.assign(header("<redx_snw>")); make_buffredx_snw(); write_redx_snw(def_redx_snw_filename); using_redx_snw_template = false; } void cb_redx_snw_html() { string fname_name = fl_filename_name(def_redx_snw_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string redx_snw_fname = ICS_dir; redx_snw_fname.append(fname_name); redx_snw_fname.append(".html"); update_redx_snwfields(); string formredx_snw = redx_snw_html_template; replacestr(formredx_snw, TITLE, fname_name); string X = "X"; string SP = " "; TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == S) replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); else if (ptriad->ftype == T) { // change if <pre> ... </pre> is ever used for this field // string temp = *(ptriad->ps); // if (progStatus.autowordwrap) // temp = wordwrap(temp, progStatus.charcount); // replacestr(formredx_snw, ptriad->htmlname, temp); replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); } else if (ptriad->ftype == B) replacestr(formredx_snw, ptriad->htmlname, (*(ptriad->pb) ? X : SP)); ptriad++; } FILE *fileredx_snw = fopen(redx_snw_fname.c_str(), "w"); fprintf(fileredx_snw,"%s", formredx_snw.c_str()); fclose(fileredx_snw); open_url(redx_snw_fname.c_str()); } void cb_snw_msg_type() { if (tabs_msg_type->value() == tab_redx_snw ) { show_filename(def_redx_snw_filename); } else { show_filename(def_rg_filename); } } void cb_redx_snw_textout() { string redx_snw_fname = ICS_dir; redx_snw_fname.append("redx_snw.txt"); update_redx_snwfields(); string formredx_snw = redx_snw_text_template; string X = "X"; string SP = " "; TRIAD *ptriad = redx_triad; while (ptriad->ftype != E) { if (ptriad->ftype == S || ptriad->ftype == T) replacestr(formredx_snw, ptriad->htmlname, *(ptriad->ps) ); else if (ptriad->ftype == B) replacestr(formredx_snw, ptriad->htmlname, (*(ptriad->pb) ? X : SP)); ptriad++; } FILE *fileredx_snw = fopen(redx_snw_fname.c_str(), "w"); fprintf(fileredx_snw,"%s", formredx_snw.c_str()); fclose(fileredx_snw); open_url(redx_snw_fname.c_str()); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739_template.cxx��������������������������������������������������������0000664�0001750�0001750�00000101757�12330516146�015442� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char redx_5739_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head>\n\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739</title></head><body>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; width: 9%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ <td style=\"vertical-align: top; width: 7%;\"></td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"7\" style=\"vertical-align: top;\">American Red Cross Form 5739</td>\n\ <td colspan=\"7\" style=\"vertical-align: top; text-align: right;\">On-Site Detailed Damage Assessment Worksheet (Street Sheet)</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">DR #:<br>:nbr:</td>\n\ \n\ <td colspan=\"3\" style=\"vertical-align: top;\">DR Name:<br>:name:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">State:<br>:state:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">County:<br>:cnty:</td>\n\ <td colspan=\"3\" style=\"vertical-align: top;\">City/Community:<br>:city:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">Date:<br>:date:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"5\" style=\"vertical-align: top;\">Street name: :street:</td>\n\ <td colspan=\"9\" style=\"vertical-align: top;\">Geographical Reference: :georef:</td>\n\ \n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">House #</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Apt<br>/ Unit #</td>\n\ <td colspan=\"5\" style=\"vertical-align: top; text-align: center; background-color: rgb(207, 207, 207);\">Damage Classification</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\"># floors in<br>dwelling</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Basement<br>Y/N</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Water Level<br>inches</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Water Level<br>in basement</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Electric<br>Y/N</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">Own/Rent/<br>Seasonal</td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align: center;\">OR<br>/ 901</td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center;\">Destroyed</td>\n\ <td style=\"vertical-align: top; text-align: center;\">Major</td>\n\ <td style=\"vertical-align: top; text-align: center;\">Minor</td>\n\ <td style=\"vertical-align: top; text-align: center;\">Affected</td>\n\ <td style=\"vertical-align: top; text-align: center;\"><small>Inaccessible</small></td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[0]:</td>\n\ <td style=\"vertical-align: top;\">:ap[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[0]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[0]:</td>\n\ <td style=\"vertical-align: top;\">:or[0]:/:901[0]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[0]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[0]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[1]:</td>\n\ <td style=\"vertical-align: top;\">:ap[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[1]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[1]:</td>\n\ <td style=\"vertical-align: top;\">:or[1]:/:901[1]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[1]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[1]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[2]:</td>\n\ <td style=\"vertical-align: top;\">:ap[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[2]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[2]:</td>\n\ <td style=\"vertical-align: top;\">:or[2]:/:901[2]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[2]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[2]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[3]:</td>\n\ <td style=\"vertical-align: top;\">:ap[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[3]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[3]:</td>\n\ <td style=\"vertical-align: top;\">:or[3]:/:901[3]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[3]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[3]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[4]:</td>\n\ <td style=\"vertical-align: top;\">:ap[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[4]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[4]:</td>\n\ <td style=\"vertical-align: top;\">:or[4]:/:901[4]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[4]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[4]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[5]:</td>\n\ <td style=\"vertical-align: top;\">:ap[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[5]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[5]:</td>\n\ <td style=\"vertical-align: top;\">:or[5]:/:901[5]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[5]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[5]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[6]:</td>\n\ <td style=\"vertical-align: top;\">:ap[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[6]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[6]:</td>\n\ <td style=\"vertical-align: top;\">:or[6]:/:901[6]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[6]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[6]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[7]:</td>\n\ <td style=\"vertical-align: top;\">:ap[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[7]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[7]:</td>\n\ <td style=\"vertical-align: top;\">:or[7]:/:901[7]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[7]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[7]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[8]:</td>\n\ <td style=\"vertical-align: top;\">:ap[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[8]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[8]:</td>\n\ <td style=\"vertical-align: top;\">:or[8]:/:901[8]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[8]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[8]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top;\">:hb[9]:</td>\n\ <td style=\"vertical-align: top;\">:ap[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:des[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:maj[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:min[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:aff[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:acc[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:flr[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bas[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:wtr[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:bwl[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ele[9]:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:occ[9]:</td>\n\ <td style=\"vertical-align: top;\">:or[9]:/:901[9]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"10\" style=\"vertical-align: top;\">Description: :desc[9]:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top;\">Name: :nam[9]:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"14\" style=\"vertical-align: top;\">\n\ <hr style=\"width: 90%; height: 2px;\"></td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">Total single family:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:sf_des:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:sf_maj:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:sf_min:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:sf_aff:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:sf_ina:</td>\n\ <td colspan=\"7\" rowspan=\"2\" style=\"vertical-align: top;\">Additional information: :addinf:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">Total mobile home:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:mh_des:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:mh_maj:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:mh_min:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:mh_aff:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:mh_ina:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">Total apartment:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ap_des:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ap_maj:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ap_min:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ap_aff:</td>\n\ <td style=\"vertical-align: top; text-align: center;\">:ap_ina:</td>\n\ <td colspan=\"5\" style=\"vertical-align: top;\">Worker completing form: :worker:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top;\">Supervisor: :supervisor:</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <br>\n\ <br>\n\ </body></html>"; const char redx_5739_text_template[] = " On-Site Detailed Damage Assessment Worksheet\n\ DR #: :nbr:\n\ DR Name: :name:\n\ State: :state:\n\ County: :cnty:\n\ City: :city:\n\ Date: :date:\n\ Street: :street:\n\ Geo ref: :georef:\n\ \n\ House #: :hb[0]:\n\ Apt/Unit #: :ap[0]:\n\ Destroyed: :des[0]:\n\ Major: :maj[0]:\n\ Minor: :min[0]:\n\ Affected: :aff[0]:\n\ Inaccessible: :acc[0]:\n\ # floors: :flr[0]:\n\ Basement: :bas[0]:\n\ Water level: :wtr[0]:\n\ Bsmnt water: :bwl[0]:\n\ Electric: :ele[0]:\n\ Occupancy type: :occ[0]:\n\ OR: :or[0]:\n\ 901: :901[0]:\n\ Description: :desc[0]:\n\ Name: :nam[0]:\n\ House #: :hb[1]:\n\ Apt/Unit #: :ap[1]:\n\ Destroyed: :des[1]:\n\ Major: :maj[1]:\n\ Minor: :min[1]:\n\ Affected: :aff[1]:\n\ Inaccessible: :acc[1]:\n\ # floors: :flr[1]:\n\ Basement: :bas[1]:\n\ Water level: :wtr[1]:\n\ Bsmnt water: :bwl[1]:\n\ Electric: :ele[1]:\n\ Occupancy type: :occ[1]:\n\ OR: :or[1]:\n\ 901: :901[1]:\n\ Description: :desc[1]:\n\ Name: :nam[1]:\n\ House #: :hb[2]:\n\ Apt/Unit #: :ap[2]:\n\ Destroyed: :des[2]:\n\ Major: :maj[2]:\n\ Minor: :min[2]:\n\ Affected: :aff[2]:\n\ Inaccessible: :acc[2]:\n\ # floors: :flr[2]:\n\ Basement: :bas[2]:\n\ Water level: :wtr[2]:\n\ Bsmnt water: :bwl[2]:\n\ Electric: :ele[2]:\n\ Occupancy type: :occ[2]:\n\ OR: :or[2]:\n\ 901: :901[2]:\n\ Description: :desc[2]:\n\ Name: :nam[2]:\n\ House #: :hb[3]:\n\ Apt/Unit #: :ap[3]:\n\ Destroyed: :des[3]:\n\ Major: :maj[3]:\n\ Minor: :min[3]:\n\ Affected: :aff[3]:\n\ Inaccessible: :acc[3]:\n\ # floors: :flr[3]:\n\ Basement: :bas[3]:\n\ Water level: :wtr[3]:\n\ Bsmnt water: :bwl[3]:\n\ Electric: :ele[3]:\n\ Occupancy type: :occ[3]:\n\ OR: :or[3]:\n\ 901: :901[3]:\n\ Description: :desc[3]:\n\ Name: :nam[3]:\n\ House #: :hb[4]:\n\ Apt/Unit #: :ap[4]:\n\ Destroyed: :des[4]:\n\ Major: :maj[4]:\n\ Minor: :min[4]:\n\ Affected: :aff[4]:\n\ Inaccessible: :acc[4]:\n\ # floors: :flr[4]:\n\ Basement: :bas[4]:\n\ Water level: :wtr[4]:\n\ Bsmnt water: :bwl[4]:\n\ Electric: :ele[4]:\n\ Occupancy type: :occ[4]:\n\ OR: :or[4]:\n\ 901: :901[4]:\n\ Description: :desc[4]:\n\ Name: :nam[4]:\n\ House #: :hb[5]:\n\ Apt/Unit #: :ap[5]:\n\ Destroyed: :des[5]:\n\ Major: :maj[5]:\n\ Minor: :min[5]:\n\ Affected: :aff[5]:\n\ Inaccessible: :acc[5]:\n\ # floors: :flr[5]:\n\ Basement: :bas[5]:\n\ Water level: :wtr[5]:\n\ Bsmnt water: :bwl[5]:\n\ Electric: :ele[5]:\n\ Occupancy type: :occ[5]:\n\ OR: :or[5]:\n\ 901: :901[5]:\n\ Description: :desc[5]:\n\ Name: :nam[5]:\n\ House #: :hb[6]:\n\ Apt/Unit #: :ap[6]:\n\ Destroyed: :des[6]:\n\ Major: :maj[6]:\n\ Minor: :min[6]:\n\ Affected: :aff[6]:\n\ Inaccessible: :acc[6]:\n\ # floors: :flr[6]:\n\ Basement: :bas[6]:\n\ Water level: :wtr[6]:\n\ Bsmnt water: :bwl[6]:\n\ Electric: :ele[6]:\n\ Occupancy type: :occ[6]:\n\ OR: :or[6]:\n\ 901: :901[6]:\n\ Description: :desc[6]:\n\ Name: :nam[6]:\n\ House #: :hb[7]:\n\ Apt/Unit #: :ap[7]:\n\ Destroyed: :des[7]:\n\ Major: :maj[7]:\n\ Minor: :min[7]:\n\ Affected: :aff[7]:\n\ Inaccessible: :acc[7]:\n\ # floors: :flr[7]:\n\ Basement: :bas[7]:\n\ Water level: :wtr[7]:\n\ Bsmnt water: :bwl[7]:\n\ Electric: :ele[7]:\n\ Occupancy type: :occ[7]:\n\ OR: :or[7]:\n\ 901: :901[7]:\n\ Description: :desc[7]:\n\ Name: :nam[7]:\n\ House #: :hb[8]:\n\ Apt/Unit #: :ap[8]:\n\ Destroyed: :des[8]:\n\ Major: :maj[8]:\n\ Minor: :min[8]:\n\ Affected: :aff[8]:\n\ Inaccessible: :acc[8]:\n\ # floors: :flr[8]:\n\ Basement: :bas[8]:\n\ Water level: :wtr[8]:\n\ Bsmnt water: :bwl[8]:\n\ Electric: :ele[8]:\n\ Occupancy type: :occ[8]:\n\ OR: :or[8]:\n\ 901: :901[8]:\n\ Description: :desc[8]:\n\ Name: :nam[8]:\n\ House #: :hb[9]:\n\ Apt/Unit #: :ap[9]:\n\ Destroyed: :des[9]:\n\ Major: :maj[9]:\n\ Minor: :min[9]:\n\ Affected: :aff[9]:\n\ Inaccessible: :acc[9]:\n\ # floors: :flr[9]:\n\ Basement: :bas[9]:\n\ Water level: :wtr[9]:\n\ Bsmnt water: :bwl[9]:\n\ Electric: :ele[9]:\n\ Occupancy type: :occ[9]:\n\ OR: :or[9]:\n\ 901: :901[9]:\n\ Description: :desc[9]:\n\ Name: :nam[9]:\n\ \n\ Total Single Family:\n\ destroyed: :sf_des:\n\ major: :sf_maj:\n\ minor: :sf_min:\n\ affected: :sf_aff:\n\ inaccessible: :sf_ina:\n\ Total Mobile Home:\n\ destroyed: :mh_des:\n\ major: :mh_maj:\n\ minor: :mh_min:\n\ affected: :mh_aff:\n\ inaccessible: :mh_ina:\n\ Total Apartment:\n\ destroyed: :ap_des:\n\ major: :ap_maj:\n\ minor: :ap_min:\n\ affected: :ap_aff:\n\ inaccessible: :ap_ina:\n\ \n\ Additional info: :add_info:\n\ Worker: :worker:\n\ Supervisor: :supervisor:\n\ \n"; //====================================================================== // 5739A form //====================================================================== const char redx_5739A_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head>\n\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739A</title></head><body>\n\ <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; width: 50%; text-align: left;\">American Red Cross 5739A</td>\n\ <td style=\"vertical-align: top; width: 50%; text-align: right;\">Detailed Damage Assessment Supplemental Worksheet</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tr>\n\ <td>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; width: 8%;\">DR #:<br>:drnbr:</td>\n\ <td style=\"vertical-align: top; width: 22%;\">DR Name:<br>:drnam:</td>\n\ <td style=\"vertical-align: top; width: 8%;\">State:<br>:state:</td>\n\ <td style=\"vertical-align: top; width: 22%;\">County:<br>:cnty:</td>\n\ <td style=\"vertical-align: top; width: 30%;\">City/Community:<br>:city:</td>\n\ <td style=\"vertical-align: top; width: 10%;\">Date:<br>:date:</td>\n\ </tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top\">Street Name: :street:</td>\n\ <td colspan=\"4\" style=\"vertical-align: top\">Geographic Reference: :georef:</td> \n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td>\n\ <table style = \"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left; width: 30%;\">\n\ <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center; width: 100%;\">\n\ Address Range:<br>:adrs0:<br><br><br><br></td>\n\ </tr>\n\ <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Primary Dwelling Type: :dwell0:</td></tr>\n\ <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Basements Prevalent?: :base0:</td></tr>\n\ </table>\n\ </td>\n\ <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ Approximate<br>number of<br>dwellings/units in<br>this range of<br>addresses:\n\ </td>\n\ <td style=\"vertical-align: top; text-align: center; width: 55%\">\n\ <table style=\"width: 100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\">\n\ Description of Damage\n\ </td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left; width: 35%\">\n\ <table style=\"width: 100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align:left; width: 70%\">\n\ Destroyed:<br>\n\ Major:<br>\n\ Minor:<br>\n\ Affected:<br>\n\ Inaccessible:<br>\n\ Unknown/None:<br>\n\ </td>\n\ <td style=\"vertical-align: top; text-align:right; width: 30%\">\n\ :ds0: %<br>\n\ :mj0: %<br>\n\ :mn0: %<br>\n\ :af0: %<br>\n\ :in0: %<br>\n\ :un0: %<br>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ <td style=\"vertical-align: top; text-align: left; width: 65%\">\n\ or general description:<br>\n\ :gd0:\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ <tr>\n\ <td>\n\ <table style = \"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left; width: 30%;\">\n\ <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: center; width: 100%;\">\n\ Address Range:<br>:adrs1:<br><br><br><br></td>\n\ </tr>\n\ <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Primary Dwelling Type: :dwell1:</td></tr>\n\ <tr><td style=\"vertical-align: top; text-align: left; width: 100%;\">Basements Prevalent?: :base1:</td></tr>\n\ </table>\n\ </td>\n\ <td style=\"vertical-align: top; text-align: center; width: 15%;\">\n\ Approximate<br>\n\ number of<br>\n\ dwellings/units in<br>\n\ this range of<br>\n\ addresses:\n\ </td>\n\ <td style=\"vertical-align: top; text-align: center; width: 55%\">\n\ <table style=\"width: 100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\">\n\ Description of Damage\n\ </td>\n\ </tr>\n\ <tr>\n\ <td style=\"vertical-align: top; text-align: left; width: 35%\">\n\ <table style=\"width: 100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; text-align:left; width: 70%\">\n\ Destroyed:<br>\n\ Major:<br>\n\ Minor:<br>\n\ Affected:<br>\n\ Inaccessible:<br>\n\ Unknown/None:<br>\n\ </td>\n\ <td style=\"vertical-align: top; text-align:left; width: 30%\">\n\ :ds1: %<br>\n\ :mj1: %<br>\n\ :mn1: %<br>\n\ :af1: %<br>\n\ :in1: %<br>\n\ :un1: %<br>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ <td style=\"vertical-align: top; text-align: left; width: 65%\">\n\ or general description:<br>\n\ :gd1:\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ </table>\n\ </td>\n\ </tr>\n\ </table>\n\ </body>\n\ </html>\n\ "; const char redx_5739A_text_template[] = " Detailed Damage Assessment Supplemental Worksheet\n\ DR #: :drnbr:\n\ DR Name: :drnam:</td>\n\ State: :state:</td>\n\ County: :cnty:</td>\n\ City/Community: :city:</td>\n\ Date: :date:</td>\n\ Street Name: :street:</td>\n\ Geographic Reference: :georef:</td> \n\ Address range: :adrs0:\n\ Primary Dwelling Type: :dwell0:\n\ Basements Prevalent?: :base0:\n\ Destroyed: :ds0:\n\ Major: :mj0:\n\ Minor: :mn0:\n\ Affected: :af0:\n\ Inaccessible: :in0:\n\ Unknown/None: :un0:\n\ general description: :gd0:\n\ Address range: :adrs1:\n\ Primary Dwelling Type: :dwell1:\n\ Basements Prevalent?: :base1:\n\ Destroyed: :ds1:\n\ Major: :mj1:\n\ Minor: :mn1:\n\ Affected: :af1:\n\ Inaccessible: :in1:\n\ Unknown/None: :un1:\n\ general description: :gd1:\n\ "; //====================================================================== // 5739B form //====================================================================== const char redx_5739B_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\ <html><head>\n\ <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"><title>RedCross-5739B</title></head><body>\n\ <table style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\ <tbody>\n\ <tr>\n\ <td style=\"vertical-align: top; width: 50%; text-align: left;\">American Red Cross 5739B</td>\n\ <td style=\"vertical-align: top; width: 50%; text-align: right;\">Area Assessment Worksheet</td>\n\ </tr>\n\ </tbody>\n\ </table>\n\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n\ <tr>\n\ <td style=\"vertical-align: top; width: 10%;\">DR #:<br>:drnbr:</td>\n\ <td style=\"vertical-align: top; width: 25%;\">DR Name:<br>:drnam:</td>\n\ <td style=\"vertical-align: top; width: 5%;\">State:<br>:state:</td>\n\ <td style=\"vertical-align: top; width: 25%;\">County:<br>:cnty:</td>\n\ <td style=\"vertical-align: top; width: 25%;\">City/Community:<br>:city:</td>\n\ <td style=\"vertical-align: top; width: 10%;\">Date:<br>:date:</td>\n\ </tr>\n\ <tr><td colspan=\"6\" style=\"vertical-align: top; text-align: left\">Geographic reference: :georef:</td></tr>\n\ <tr><td colspan=\"6\" style=\"vertical-align: top; text-align: center\">BOUNDARIES</td></tr>\n\ <tr>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">North: :nb:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ </tr>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">West: :wb:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">East: :eb:</td>\n\ </tr>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\">South: :sb:</td>\n\ <td colspan=\"2\" style=\"vertical-align: top; text-align: left;\"></td>\n\ </tr>\n\ <tr>\n\ <td rowspan=\"3\"></td>\n\ <td colspan=\"2\">Approximate # dwellings/units impacted: :nbr:</td>\n\ <td colspan=\"2\">General information:</td>\n\ <td rowspan=\"3\"></td>\n\ </tr>\n\ <tr>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align:left;\">\n\ Destroyed:<br>\n\ Major:<br>\n\ Minor:<br>\n\ Affected:<br>\n\ Inaccessible:<br>\n\ Unknown/None:<br>\n\ </td>\n\ <td rowspan=\"2\" style=\"vertical-align: top; text-align:right;\">\n\ :d: %<br>\n\ :j: %<br>\n\ :n: %<br>\n\ :a: %<br>\n\ :i: %<br>\n\ :u: %<br>\n\ </td>\n\ <td colspan=\"2\">:gi:</td>\n\ </tr>\n\ <tr><td colspan=\"2\">Basements prevalent? :b:</td></tr>\n\ </table>\n\ </body>\n\ </html>\n\ "; const char redx_5739B_text_template[] = " Area Assessment Worksheet\n\ DR #:<br>:drnbr:\n\ DR Name:<br>:drnam:\n\ State:<br>:state:\n\ County:<br>:cnty:\n\ City/Community:<br>:city:\n\ Date:<br>:date:\n\ Geographic reference: :georef:</tr>\n\ BOUNDARIES\n\ North: :nb:\n\ West: :wb:\n\ East: :eb:\n\ South: :sb:\n\ Approximate # dwellings/units impacted: :nbr:\n\ Destroyed: :d: %\n\ Major: :j: %\n\ Minor: :n: %\n\ Affected: :a: %\n\ Inaccessible: :i: %\n\ Unknown/None: :u: %\n\ General info: :gi:\n\ Basements prevalent? :b:\n\ "; �����������������flmsg-2.0.10/src/redx/redx_snw_template.cxx���������������������������������������������������������0000664�0001750�0001750�00000014215�12330516146�015632� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char redx_snw_html_template[] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\ <html><head>\ <meta http-equiv=\"CONTENT-TYPE\" content=\"text/html; charset=UTF-8\"><title>Red Cross Safe &amp; Well Registry Information Sheet</title>\n\ <meta name=\"GENERATOR\" content=\"OpenOffice.org 3.2(Linux)\">\ <meta name=\"AUTHOR\" content=\"DCC\">\ <meta name=\"CREATED\" content=\"20110906;5060000\">\ <meta name=\"CHANGEDBY\" content=\"DCC\">\ <meta name=\"CHANGED\" content=\"20110906;5070000\">\ <meta name=\"Info 1\" content=\"\">\ <meta name=\"Info 2\" content=\"\">\ <meta name=\"Info 3\" content=\"\">\ <meta name=\"Info 4\" content=\"\">\ <style type=\"text/css\">\ <!--\ @page { margin-right: 0.2in; margin-top: 0.1in; margin-bottom: 0.1in }\ P { margin-bottom: 0.08in; direction: ltr; color: #000000; widows: 2; orphans: 2 }\ P.western { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt; so-language: en-US }\ P.cjk { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt }\ P.ctl { font-family: \"Times New Roman\", \"Serif\"; font-size: 12pt; so-language: ar-SA }\ -->\ </style></head><body dir=\"ltr\" lang=\"en-US\" text=\"#000000\">\ <table style=\"text-align: left; width: 100%;\" border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\ <tbody>\ <tr align=\"center\">\ <td colspan=\"2\" style=\"vertical-align: top;\"><font face=\"ArialMT,Bold, sans-serif\"><font size=\"5\"><b>Red Cross Safe &amp; Well Registry Information Sheet</b></font></font></td>\ </tr>\ <tr>\ <td style=\"vertical-align: top; width: 50%;\">Last Name: <big>:lname:</big><br>\ </td>\ <td style=\"vertical-align: top;\">First Name: <big>:fname:</big><br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\"><font face=\"ArialMT, sans-serif\">Pre-disaster phone #'s;&nbsp; [:nophone:] no phone number recorded<br>\ </font></td>\ <td style=\"vertical-align: top;\"><big>:area1: - :xchg1: - :suffix1:</big><br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\"><big>:area2: - :xchg2: - :suffix2:</big></td>\ <td style=\"vertical-align: top;\"><big>:area3: - :xchg3: - :suffix3:</big></td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">Pre-disaster home address<br><big>\ :pdline1:<br>\ :pdline2:<br>\ :pdcity:, :pdst:&nbsp; :pdzip:</big><br>\ </td>\ <td style=\"vertical-align: top;\">Current home address<br><big>\ :haline1:<br>\ :haline2:<br>\ :hacity:, :hast:&nbsp; :hazip:</big><br>\ </td>\ </tr>\ <tr>\ <td colspan=\"2\" style=\"vertical-align: top; text-align: center;\"><big><span style=\"font-weight: bold;\">Safe and Well Messages</span></big><br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m1:] I am safe and well.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m8:] Will email when able.<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m2:] Family and I are safe and well.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m9:] Will mail letter / postcard when able.<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m3:] Currently at shelter. <br>\ </td>\ <td style=\"vertical-align: top;\">[:m10:] I am safe and in the process of evacuating.<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m4:] Currently at home.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m11:] I have evacuated and I am safe.<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m5:] Currently at friend / family / neighbor's.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m12:] I am evacuating to a shelter.<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m6:] I am evacuating to the house of a family member / friend.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m13:] I am currently at a hotel<br>\ </td>\ </tr>\ <tr>\ <td style=\"vertical-align: top;\">[:m7:] Will make phone call when able.<br>\ </td>\ <td style=\"vertical-align: top;\">[:m14:] I am currently remaining at home<br>\ </td>\ </tr>\ <tr>\ <td colspan=\"2\" style=\"vertical-align: top;\">[:m15:] Custom message<br>\ :cmsg:<br>\ </td>\ </tr>\ </tbody>\ </table>\ <br>\ </body></html>"; const char redx_snw_text_template[] = " Red Cross Safe & Well Registry Information Sheet\n\ \n\ Last Name: First Name\n\ :lname: :fname:\n\ \n\ Pre-disaster phone #'s\n\ [:nophone:] no phone number recorded\n\ Phone #1: :area1: - :xchg1: - :suffix1:\n\ Phone #2: :area2: - :xchg2: - :suffix2:\n\ Phone #3: :area3: - :xchg3: - :suffix3:\n\ \n\ Pre-disaster home address:\n\ :pdline1:\n\ :pdline2:\n\ :pdcity:, :pdst: :pdzip:\n\ \n\ Current home address:\n\ :haline1:\n\ :haline2:\n\ :hacity:, :hast: :hazip:\n\ \n\ Safe and Well Messages\n\ \n\ [:m1:] I am safe and well.\n\ [:m2:] Family and I are safe and well.\n\ [:m3:] Currently at shelter.\n\ [:m4:] Currently at home.\n\ [:m5:] Currently at friend / family / neighbor's.\n\ [:m6:] I am evacuating to the house of a family member / friend.\n\ [:m7:] Will make phone call when able.\n\ [:m8:] Will email when able.\n\ [:m9:] Will mail letter / postcard when able.\n\ [:m10:] I am safe and in the process of evacuating.\n\ [:m11:] I have evacuated and I am safe.\n\ [:m12:] I am evacuating to a shelter.\n\ [:m13:] I am currently at a hotel.\n\ [:m14:] I am currently remaining at home.\n\ [:m15:] Custom message :\n\ :cmsg:\n"; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_snw_tab.cxx��������������������������������������������������������������0000664�0001750�0001750�00000025372�12330516146�014573� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_redx_snw = (Fl_Group *)0; Fl_Tabs *tab_redx_snw_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_redx_snw_1 = (Fl_Group *)0; Fl_Input2 *snw_lname = (Fl_Input2 *)0; Fl_Input2 *snw_fname = (Fl_Input2 *)0; Fl_Input2 *snw_area1 = (Fl_Input2 *)0; Fl_Check_Button *snw_nophone = (Fl_Check_Button *)0; Fl_Input2 *snw_xchg1 = (Fl_Input2 *)0; Fl_Input2 *snw_suffix1 = (Fl_Input2 *)0; Fl_Input2 *snw_area2 = (Fl_Input2 *)0; Fl_Input2 *snw_xchg2 = (Fl_Input2 *)0; Fl_Input2 *snw_suffix2 = (Fl_Input2 *)0; Fl_Input2 *snw_area3 = (Fl_Input2 *)0; Fl_Input2 *snw_xchg3 = (Fl_Input2 *)0; Fl_Input2 *snw_suffix3 = (Fl_Input2 *)0; Fl_Input2 *snw_pdline1 = (Fl_Input2 *)0; Fl_Input2 *snw_pdline2 = (Fl_Input2 *)0; Fl_Input2 *snw_pdcity = (Fl_Input2 *)0; Fl_Input2 *snw_pdst = (Fl_Input2 *)0; Fl_Input2 *snw_pdzip = (Fl_Input2 *)0; Fl_Input2 *snw_haline1 = (Fl_Input2 *)0; Fl_Input2 *snw_haline2 = (Fl_Input2 *)0; Fl_Input2 *snw_hacity = (Fl_Input2 *)0; Fl_Input2 *snw_hast = (Fl_Input2 *)0; Fl_Input2 *snw_hazip = (Fl_Input2 *)0; //---------------------------------------------------------------------- Fl_Group *tab_redx_snw_2 = (Fl_Group *)0; Fl_Check_Button *snw_m1 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m2 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m3 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m4 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m5 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m6 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m7 = (Fl_Check_Button *)0; //---------------------------------------------------------------------- Fl_Group *tab_redx_snw_3 = (Fl_Group *)0; Fl_Check_Button *snw_m8 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m9 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m10 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m11 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m12 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m13 = (Fl_Check_Button *)0; Fl_Check_Button *snw_m14 = (Fl_Check_Button *)0; //---------------------------------------------------------------------- Fl_Group *tab_redx_snw_4 = (Fl_Group *)0; Fl_Check_Button *snw_m15 = (Fl_Check_Button *)0; FTextEdit *snw_cmsg = (FTextEdit *)0; //---------------------------------------------------------------------- // widget callbacks & support void snw_changed() { estimate(); } //---------------------------------------------------------------------- void create_redx_snw() { int Y = tab_top; tab_redx_snw = new Fl_Group(0, Y, 570, 390); tab_redx_snw->align(FL_ALIGN_TOP); tab_redx_snw_type = new Fl_Tabs(0, Y, 570, 387); tab_redx_snw_type->selection_color((Fl_Color)246); tab_redx_snw_1 = new Fl_Group(0, Y+25, 570, 360, _("Respondee")); Y += 30; snw_lname = new Fl_Input2(100, Y, 150, 24, _("Lname")); snw_lname->tooltip(_("")); snw_lname->callback(redx_changed); snw_lname->when(FL_WHEN_CHANGED); snw_fname = new Fl_Input2(320, Y, 150, 24, _("Fname")); snw_fname->tooltip(_("")); snw_fname->callback(redx_changed); snw_fname->when(FL_WHEN_CHANGED); Y += 25; snw_nophone = new Fl_Check_Button(10, Y, 24, 24, _("No phone #")); Y += 50; int X = 10; snw_area1 = new Fl_Input2( X, Y, 50, 24, _("Phone #1")); snw_area1->align(FL_ALIGN_TOP_LEFT); snw_area1->callback(redx_changed); snw_area1->when(FL_WHEN_CHANGED); snw_area1->tooltip(_("Area code")); snw_xchg1 = new Fl_Input2( X = X+54, Y, 50, 24, ""); snw_xchg1->tooltip(_("exchange")); snw_xchg1->callback(redx_changed); snw_xchg1->when(FL_WHEN_CHANGED); snw_suffix1 = new Fl_Input2( X = X+54, Y, 50, 24, ""); snw_suffix1->tooltip(_("suffix")); snw_suffix1->callback(redx_changed); snw_suffix1->when(FL_WHEN_CHANGED); snw_area2 = new Fl_Input2( X=X+86, Y, 50, 24, _("Phone #2")); snw_area2->align(FL_ALIGN_TOP_LEFT); snw_area2->tooltip(_("Area code")); snw_area2->callback(redx_changed); snw_area2->when(FL_WHEN_CHANGED); snw_xchg2 = new Fl_Input2( X=X+54, Y, 50, 24, ""); snw_xchg2->tooltip(_("exchange")); snw_xchg2->callback(redx_changed); snw_xchg2->when(FL_WHEN_CHANGED); snw_suffix2 = new Fl_Input2( X=X+54, Y, 50, 24, ""); snw_suffix2->tooltip(_("suffix")); snw_suffix2->callback(redx_changed); snw_suffix2->when(FL_WHEN_CHANGED); snw_area3 = new Fl_Input2( X=X+86, Y, 50, 24, _("Phone #3")); snw_area3->align(FL_ALIGN_TOP_LEFT); snw_area3->tooltip(_("Area code")); snw_area3->callback(redx_changed); snw_area3->when(FL_WHEN_CHANGED); snw_xchg3 = new Fl_Input2( X=X+54, Y, 50, 24, ""); snw_xchg3->tooltip(_("exchange")); snw_xchg3->callback(redx_changed); snw_xchg3->when(FL_WHEN_CHANGED); snw_suffix3 = new Fl_Input2( X+54, Y, 50, 24, ""); snw_suffix3->tooltip(_("suffix")); snw_suffix3->callback(redx_changed); snw_suffix3->when(FL_WHEN_CHANGED); Y += 25; Fl_Box *bx = new Fl_Box(100, Y, 200, 24, _("Pre disaster address:")); bx->box(FL_FLAT_BOX); bx->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); Y += 25; snw_pdline1 = new Fl_Input2(100, Y, 400, 24, _("Addr line 1")); snw_pdline1->tooltip(""); snw_pdline1->callback(redx_changed); snw_pdline1->when(FL_WHEN_CHANGED); Y += 25; snw_pdline2 = new Fl_Input2(100, Y, 400, 24, _("Addr line 2")); snw_pdline2->tooltip(""); snw_pdline2->callback(redx_changed); snw_pdline2->when(FL_WHEN_CHANGED); Y += 25; snw_pdcity = new Fl_Input2(100, Y, 246, 24, _("City")); snw_pdcity->tooltip(""); snw_pdcity->callback(redx_changed); snw_pdcity->when(FL_WHEN_CHANGED); snw_pdst = new Fl_Input2(348, Y, 50, 24, ""); snw_pdst->tooltip(_("State")); snw_pdst->callback(redx_changed); snw_pdst->when(FL_WHEN_CHANGED); snw_pdzip = new Fl_Input2(400, Y, 100, 24, ""); snw_pdzip->tooltip(_("Zip")); snw_pdzip->callback(redx_changed); snw_pdzip->when(FL_WHEN_CHANGED); Y += 25; bx = new Fl_Box(100, Y, 200, 24, _("Current home address:")); bx->box(FL_FLAT_BOX); bx->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); Y += 25; snw_haline1 = new Fl_Input2(100, Y, 400, 24, _("Addr line 1")); snw_haline1->tooltip(""); snw_haline1->callback(redx_changed); snw_haline1->when(FL_WHEN_CHANGED); Y += 25; snw_haline2 = new Fl_Input2(100, Y, 400, 24, _("Addr line 2")); snw_haline2->tooltip(""); snw_haline2->callback(redx_changed); snw_haline2->when(FL_WHEN_CHANGED); Y += 25; snw_hacity = new Fl_Input2(100, Y, 246, 24, _("City")); snw_hacity->tooltip(""); snw_hacity->callback(redx_changed); snw_hacity->when(FL_WHEN_CHANGED); snw_hast = new Fl_Input2(348, Y, 50, 24, ""); snw_hast->tooltip(_("State")); snw_hast->callback(redx_changed); snw_hast->when(FL_WHEN_CHANGED); snw_hazip = new Fl_Input2(400, Y, 100, 24, ""); snw_hazip->tooltip(_("Zip")); snw_hazip->callback(redx_changed); snw_hazip->when(FL_WHEN_CHANGED); tab_redx_snw_1->end(); tab_redx_snw_2 = new Fl_Group(0, 95, 570, 360, _("Msgs-1")); Y = 140; snw_m1 = new Fl_Check_Button(100, Y, 24, 24, _("I am safe and well.")); snw_m1->callback(redx_changed); snw_m1->when(FL_WHEN_CHANGED); Y += 25; snw_m2 = new Fl_Check_Button(100, Y, 24, 24, _("Family and I are safe and well.")); snw_m2->callback(redx_changed); snw_m2->when(FL_WHEN_CHANGED); Y += 25; snw_m3 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at shelter.")); snw_m3->callback(redx_changed); snw_m3->when(FL_WHEN_CHANGED); Y += 25; snw_m4 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at home.")); snw_m4->callback(redx_changed); snw_m4->when(FL_WHEN_CHANGED); Y += 25; snw_m5 = new Fl_Check_Button(100, Y, 24, 24, _("Currently at friend / family / neighbor's.")); snw_m5->callback(redx_changed); snw_m5->when(FL_WHEN_CHANGED); Y += 25; snw_m6 = new Fl_Check_Button(100, Y, 24, 24, _("I am evacuating to the house of a family member / friend.")); snw_m6->callback(redx_changed); snw_m6->when(FL_WHEN_CHANGED); Y += 25; snw_m7 = new Fl_Check_Button(100, Y, 24, 24, _("Will make phone call when able.")); snw_m7->callback(redx_changed); snw_m7->when(FL_WHEN_CHANGED); tab_redx_snw_2->end(); tab_redx_snw_3 = new Fl_Group(0, 95, 570, 360, _("Msgs-2")); Y = 140; snw_m8 = new Fl_Check_Button(100, Y, 24, 24, _("Will email when able.")); snw_m8->callback(redx_changed); snw_m8->when(FL_WHEN_CHANGED); Y += 25; snw_m9 = new Fl_Check_Button(100, Y, 24, 24, _("Will mail letter / postcard when able.")); snw_m9->callback(redx_changed); snw_m9->when(FL_WHEN_CHANGED); Y += 25; snw_m10 = new Fl_Check_Button(100, Y, 24, 24, _("I am safe and in the process of evacuating.")); snw_m10->callback(redx_changed); snw_m10->when(FL_WHEN_CHANGED); Y += 25; snw_m11 = new Fl_Check_Button(100, Y, 24, 24, _("I have evacuated and I am safe.")); snw_m11->callback(redx_changed); snw_m11->when(FL_WHEN_CHANGED); Y += 25; snw_m12 = new Fl_Check_Button(100, Y, 24, 24, _("I am evacuating to a shelter.")); snw_m12->callback(redx_changed); snw_m12->when(FL_WHEN_CHANGED); Y += 25; snw_m13 = new Fl_Check_Button(100, Y, 24, 24, _("I am currently at a hotel.")); snw_m13->callback(redx_changed); snw_m13->when(FL_WHEN_CHANGED); Y += 25; snw_m14 = new Fl_Check_Button(100, Y, 24, 24, _("I am currently remaining at home.")); snw_m14->callback(redx_changed); snw_m14->when(FL_WHEN_CHANGED); tab_redx_snw_3->end(); Y = tab_top; tab_redx_snw_4 = new Fl_Group(0, Y+25, 570, 360, _("Msgs-3")); Y += 30; snw_m15 = new Fl_Check_Button(10, Y, 24, 24, _("Custom message:")); snw_m15->callback(redx_changed); snw_m15->when(FL_WHEN_CHANGED); Y += 25; snw_cmsg = new FTextEdit(10, Y, 550, 320, _("")); snw_cmsg->tooltip(_("Enter custom message")); snw_cmsg->box(FL_DOWN_FRAME); snw_cmsg->color((Fl_Color)FL_BACKGROUND2_COLOR); snw_cmsg->selection_color((Fl_Color)FL_SELECTION_COLOR); snw_cmsg->labeltype(FL_NORMAL_LABEL); snw_cmsg->labelfont(0); snw_cmsg->labelsize(14); snw_cmsg->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); snw_cmsg->align(FL_ALIGN_TOP_LEFT); snw_cmsg->callback(redx_changed); snw_cmsg->when(FL_WHEN_CHANGED); tab_redx_snw_4->end(); tab_redx_snw->end(); tab_redx_snw->hide(); }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/redx/redx_5739_tab.cxx�������������������������������������������������������������0000664�0001750�0001750�00000043336�12330516146�014373� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_redx_5739 = (Fl_Group *)0; Fl_Tabs *tab_redx_5739_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_redx_5739_1 = (Fl_Group *)0; Fl_Group *tab_redx_5739_2 = (Fl_Group *)0; Fl_Input2 *rdx_5739_nbr = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_name = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_state = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_cnty = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_city = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_date = (Fl_Input2 *)0; Fl_Button *btn_5739_date = (Fl_Button *)0; Fl_Input2 *rdx_5739_street = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_georef = (Fl_Input2 *)0; FTextEdit *rdx_5739_add_info = (FTextEdit *)0; Fl_Input2 *rdx_5739_worker = (Fl_Input2 *)0; Fl_Input2 *rdx_5739_supervisor = (Fl_Input2 *)0; Fl_Input2 *rdx_sf_destroyed = (Fl_Input2 *)0; Fl_Input2 *rdx_sf_major = (Fl_Input2 *)0; Fl_Input2 *rdx_sf_minor = (Fl_Input2 *)0; Fl_Input2 *rdx_sf_affected = (Fl_Input2 *)0; Fl_Input2 *rdx_sf_inaccessible = (Fl_Input2 *)0; Fl_Input2 *rdx_mh_destroyed = (Fl_Input2 *)0; Fl_Input2 *rdx_mh_major = (Fl_Input2 *)0; Fl_Input2 *rdx_mh_minor = (Fl_Input2 *)0; Fl_Input2 *rdx_mh_affected = (Fl_Input2 *)0; Fl_Input2 *rdx_mh_inaccessible = (Fl_Input2 *)0; Fl_Input2 *rdx_ap_destroyed = (Fl_Input2 *)0; Fl_Input2 *rdx_ap_major = (Fl_Input2 *)0; Fl_Input2 *rdx_ap_minor = (Fl_Input2 *)0; Fl_Input2 *rdx_ap_affected = (Fl_Input2 *)0; Fl_Input2 *rdx_ap_inaccessible = (Fl_Input2 *)0; Fl_Input2 *redx_5739_house_nbr[10]; Fl_Input2 *redx_5739_apt_nbr[10]; Fl_Input2 *redx_5739_desc[10]; Fl_Input2 *redx_5739_nam[10]; Fl_Input2 *redx_5739_destroyed[10]; Fl_Input2 *redx_5739_major[10]; Fl_Input2 *redx_5739_minor[10]; Fl_Input2 *redx_5739_affected[10]; Fl_Input2 *redx_5739_inaccessible[10]; Fl_Input2 *redx_5739_floors[10]; Fl_Input2 *redx_5739_basement[10]; Fl_Input2 *redx_5739_waterlevel[10]; Fl_Input2 *redx_5739_basement_water[10]; Fl_Input2 *redx_5739_electricity[10]; Fl_Input2 *redx_5739_occupancy[10]; Fl_Input2 *redx_5739_OR[10]; Fl_Input2 *redx_5739_901[10]; static void cb_btn_5739_date(Fl_Button*, void*) { rdx_5739_date->value(szDateTime()); } void redx_5739_compute(Fl_Widget * w, void *) { int stotal, mtotal, atotal; static char strtotal[5]; stotal = mtotal = atotal = 0; strtotal[0] = 0; for (int i = 0; i < 10; i++) { if (redx_5739_destroyed[i]->value()[0] == 'S') stotal++; if (redx_5739_destroyed[i]->value()[0] == 'M') mtotal++; if (redx_5739_destroyed[i]->value()[0] == 'A') atotal++; } if (stotal) { snprintf(strtotal, sizeof(strtotal), "%d", stotal); rdx_sf_destroyed->value(strtotal); } else rdx_sf_destroyed->value(""); if (mtotal) { snprintf(strtotal, sizeof(strtotal), "%d", mtotal); rdx_mh_destroyed->value(strtotal); } else rdx_mh_destroyed->value(""); if (atotal) { snprintf(strtotal, sizeof(strtotal), "%d", atotal); rdx_ap_destroyed->value(strtotal); } else rdx_ap_destroyed->value(""); stotal = mtotal = atotal = 0; strtotal[0] = 0; for (int i = 0; i < 10; i++) { if (redx_5739_major[i]->value()[0] == 'S') stotal++; if (redx_5739_major[i]->value()[0] == 'M') mtotal++; if (redx_5739_major[i]->value()[0] == 'A') atotal++; } if (stotal) { snprintf(strtotal, sizeof(strtotal), "%d", stotal); rdx_sf_major->value(strtotal); } else rdx_sf_major->value(""); if (mtotal) { snprintf(strtotal, sizeof(strtotal), "%d", mtotal); rdx_mh_major->value(strtotal); } else rdx_mh_major->value(""); if (atotal) { snprintf(strtotal, sizeof(strtotal), "%d", atotal); rdx_ap_major->value(strtotal); } else rdx_ap_major->value(""); stotal = mtotal = atotal = 0; strtotal[0] = 0; for (int i = 0; i < 10; i++) { if (redx_5739_minor[i]->value()[0] == 'S') stotal++; if (redx_5739_minor[i]->value()[0] == 'M') mtotal++; if (redx_5739_minor[i]->value()[0] == 'A') atotal++; } if (stotal) { snprintf(strtotal, sizeof(strtotal), "%d", stotal); rdx_sf_minor->value(strtotal); } else rdx_sf_minor->value(""); if (mtotal) { snprintf(strtotal, sizeof(strtotal), "%d", mtotal); rdx_mh_minor->value(strtotal); } else rdx_mh_minor->value(""); if (atotal) { snprintf(strtotal, sizeof(strtotal), "%d", atotal); rdx_ap_minor->value(strtotal); } else rdx_ap_minor->value(""); stotal = mtotal = atotal = 0; strtotal[0] = 0; for (int i = 0; i < 10; i++) { if (redx_5739_affected[i]->value()[0] == 'S') stotal++; if (redx_5739_affected[i]->value()[0] == 'M') mtotal++; if (redx_5739_affected[i]->value()[0] == 'A') atotal++; } if (stotal) { snprintf(strtotal, sizeof(strtotal), "%d", stotal); rdx_sf_affected->value(strtotal); } else rdx_sf_affected->value(""); if (mtotal) { snprintf(strtotal, sizeof(strtotal), "%d", mtotal); rdx_mh_affected->value(strtotal); } else rdx_mh_affected->value(""); if (atotal) { snprintf(strtotal, sizeof(strtotal), "%d", atotal); rdx_ap_affected->value(strtotal); } else rdx_ap_affected->value(""); stotal = mtotal = atotal = 0; strtotal[0] = 0; for (int i = 0; i < 10; i++) { if (redx_5739_inaccessible[i]->value()[0] == 'S') stotal++; if (redx_5739_inaccessible[i]->value()[0] == 'M') mtotal++; if (redx_5739_inaccessible[i]->value()[0] == 'A') atotal++; } if (stotal) { snprintf(strtotal, sizeof(strtotal), "%d", stotal); rdx_sf_inaccessible->value(strtotal); } else rdx_sf_inaccessible->value(""); if (mtotal) { snprintf(strtotal, sizeof(strtotal), "%d", mtotal); rdx_mh_inaccessible->value(strtotal); } else rdx_mh_inaccessible->value(""); if (atotal) { snprintf(strtotal, sizeof(strtotal), "%d", atotal); rdx_ap_inaccessible->value(strtotal); } else rdx_ap_inaccessible->value(""); } static void redx_5739_dmgtype(Fl_Widget * w, void * n) { Fl_Input2 * me = (Fl_Input2 *)w; int tnbr = (int)reinterpret_cast<long>(n); char cdmg = me->value()[0]; redx_5739_destroyed[tnbr]->value(""); redx_5739_major[tnbr]->value(""); redx_5739_minor[tnbr]->value(""); redx_5739_affected[tnbr]->value(""); redx_5739_inaccessible[tnbr]->value(""); switch (cdmg) { case 's': case 'S': me->value("S"); break; case 'm': case 'M': me->value("M"); break; case 'a': case 'A': me->value("A"); break; default: break; } redx_5739_compute(w, NULL); } static void redx_5739_yn(Fl_Widget *w, void *) { Fl_Input2 *me = (Fl_Input2 *)w; if (me->value()[0]) { switch (me->value()[0]) { case 'y': case 'Y': me->value("Y"); break; case 'n': case 'N': default: me->value("N"); } } else me->value(""); } static void redx_5739_or(Fl_Widget *w, void *) { Fl_Input2 *me = (Fl_Input2 *)w; if (me->value()[0]) { switch (me->value()[0]) { case 'o': case 'O': me->value("O"); break; default: me->value(""); } } else me->value(""); } static void redx_5739_inches(Fl_Widget *w, void *) { Fl_Input2 *me = (Fl_Input2 *)w; int val = 0; if (me->value()[0] != 0) sscanf(me->value(), "%d", &val); if (val) { static char sval[5]; sval[0] = 0; snprintf(sval, sizeof(sval), "%d", val); me->value(sval); } else me->value(""); } static void redx_5739_occ_check(Fl_Widget *w, void *) { Fl_Input2 *me = (Fl_Input2 *)w; if (me->value()[0]) { switch (me->value()[0]) { case 'o': case 'O': me->value("O"); break; case 'r': case 'R': me->value("R"); break; case 's': case 'S': me->value("S"); break; default: me->value(""); } } else me->value(""); } void create_redx_5739() { int Y = tab_top; tab_redx_5739 = new Fl_Group(0, Y, 570, 390); tab_redx_5739->align(FL_ALIGN_TOP); tab_redx_5739_type = new Fl_Tabs(0, Y, 570, 387); tab_redx_5739_type->selection_color((Fl_Color)246); tab_redx_5739_1 = new Fl_Group(0, Y+=25, 570, 360, _("5739-1")); rdx_5739_nbr = new Fl_Input2(100, Y+=8, 100, 24, "DR #"); rdx_5739_nbr->tooltip(_("Damage report record number")); rdx_5739_name = new Fl_Input2(100, Y+=26, 300, 24, "DR Name"); rdx_5739_name->tooltip(""); rdx_5739_state = new Fl_Input2(100, Y+=26, 300, 24, "State"); rdx_5739_state->tooltip(""); rdx_5739_cnty = new Fl_Input2(100, Y+=26, 300, 24, "County"); rdx_5739_cnty->tooltip(""); rdx_5739_city = new Fl_Input2(100, Y+=26, 300, 24, "City"); rdx_5739_city->tooltip(""); rdx_5739_street = new Fl_Input2(100, Y+=26, 300, 24, "Street"); rdx_5739_street->tooltip(""); rdx_5739_georef = new Fl_Input2(100, Y+=26, 400, 24, "Geo' Ref'"); rdx_5739_georef->tooltip(_("geographic reference, GPS lat/lon etc.")); rdx_5739_date = new Fl_Input2(100, Y+=26, 200, 24, "Date"); rdx_5739_date->tooltip(""); btn_5739_date = new Fl_Button(302, Y, 24, 24, _("...")); btn_5739_date->tooltip(_("Set today")); btn_5739_date->callback((Fl_Callback*)cb_btn_5739_date); rdx_5739_add_info = new FTextEdit(4, Y+=40, 560, 60, "Add' Info"); rdx_5739_add_info->type(FL_MULTILINE_INPUT); rdx_5739_add_info->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_5739_add_info->tooltip(""); rdx_5739_worker = new Fl_Input2(100, Y+=62, 300, 24, "Worker"); rdx_5739_worker->tooltip(""); rdx_5739_supervisor = new Fl_Input2(100, Y+=26, 300, 24, "Supervisor"); rdx_5739_supervisor->tooltip(""); tab_redx_5739_1->end(); tab_redx_5739_2 = new Fl_Group(0, tab_top + 25, 570, 360, _("5739-2")); Y = tab_top; Fl_Box *title = new Fl_Box(0,Y+30, 200, 24, _("Damage totals")); title->box(FL_FLAT_BOX); title->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); rdx_sf_destroyed = new Fl_Input2(54, Y+=80, 100, 24, "SF destroyed"); rdx_sf_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_sf_destroyed->tooltip(_("computed value")); rdx_sf_destroyed->callback(redx_5739_compute, NULL); rdx_sf_major = new Fl_Input2(54, Y+=50, 100, 24, "SF major"); rdx_sf_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_sf_major->tooltip(_("computed value")); rdx_sf_major->callback(redx_5739_compute, NULL); rdx_sf_minor = new Fl_Input2(54, Y+=50, 100, 24, "SF minor"); rdx_sf_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_sf_minor->tooltip(_("computed value")); rdx_sf_minor->callback(redx_5739_compute, NULL); rdx_sf_affected = new Fl_Input2(54, Y+=50, 100, 24, "SF affected"); rdx_sf_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_sf_affected->tooltip(_("computed value")); rdx_sf_affected->callback(redx_5739_compute, NULL); rdx_sf_inaccessible = new Fl_Input2(54, Y+=50, 100, 24, "SF inacc'"); rdx_sf_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_sf_inaccessible->tooltip(_("computed value")); rdx_sf_inaccessible->callback(redx_5739_compute, NULL); Y = tab_top; rdx_mh_destroyed = new Fl_Input2(235, Y+=80, 100, 24, "MH destroyed"); rdx_mh_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_mh_destroyed->tooltip(_("computed value")); rdx_mh_destroyed->callback(redx_5739_compute, NULL); rdx_mh_major = new Fl_Input2(235, Y+=50, 100, 24, "MH major"); rdx_mh_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_mh_major->tooltip(_("computed value")); rdx_mh_major->callback(redx_5739_compute, NULL); rdx_mh_minor = new Fl_Input2(235, Y+=50, 100, 24, "MH minor"); rdx_mh_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_mh_minor->tooltip(_("computed value")); rdx_mh_minor->callback(redx_5739_compute, NULL); rdx_mh_affected = new Fl_Input2(235, Y+=50, 100, 24, "MH affected"); rdx_mh_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_mh_affected->tooltip(_("computed value")); rdx_mh_affected->callback(redx_5739_compute, NULL); rdx_mh_inaccessible = new Fl_Input2(235, Y+=50, 100, 24, "MH inacc'"); rdx_mh_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_mh_inaccessible->tooltip(_("computed value")); rdx_mh_inaccessible->callback(redx_5739_compute, NULL); Y = tab_top; rdx_ap_destroyed = new Fl_Input2(416, Y+=80, 100, 24, "Apt destroyed"); rdx_ap_destroyed->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_ap_destroyed->tooltip(_("computed value")); rdx_ap_destroyed->callback(redx_5739_compute, NULL); rdx_ap_major = new Fl_Input2(416, Y+=50, 100, 24, "Apt major"); rdx_ap_major->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_ap_major->tooltip(_("computed value")); rdx_ap_major->callback(redx_5739_compute, NULL); rdx_ap_minor = new Fl_Input2(416, Y+=50, 100, 24, "Apt minor"); rdx_ap_minor->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_ap_major->tooltip(_("computed value")); rdx_ap_minor->callback(redx_5739_compute, NULL); rdx_ap_affected = new Fl_Input2(416, Y+=50, 100, 24, "Apt affected"); rdx_ap_affected->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_ap_affected->tooltip(_("computed value")); rdx_ap_affected->callback(redx_5739_compute, NULL); rdx_ap_inaccessible = new Fl_Input2(416, Y+=50, 100, 24, "Apt inacc'"); rdx_ap_inaccessible->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); rdx_ap_inaccessible->tooltip(_("computed value")); rdx_ap_inaccessible->callback(redx_5739_compute, NULL); tab_redx_5739_2->end(); for (int i = 0; i < 10; i++) { static char tabnbr[10][10]; snprintf(tabnbr[i], sizeof(tabnbr[i]), "# %d", i+1); Fl_Group *o = new Fl_Group(0, tab_top + 25, 570, 360, tabnbr[i]); Fl_Box *title = new Fl_Box(0, tab_top+30, 200, 24, _("Damage Classification")); title->box(FL_FLAT_BOX); title->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); redx_5739_house_nbr[i] = new Fl_Input2(14, Y = tab_top + 70, 150, 24, _("House nbr")); redx_5739_house_nbr[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); redx_5739_house_nbr[i]->tooltip(""); redx_5739_apt_nbr[i] = new Fl_Input2(220, Y, 150, 24, _("Apt nbr")); redx_5739_apt_nbr[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); redx_5739_apt_nbr[i]->tooltip(""); int X = 95; redx_5739_destroyed[i] = new Fl_Input2(X-=12, Y+=45, 24, 24, _("Destroyed")); redx_5739_destroyed[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_destroyed[i]->tooltip("S/M/A"); redx_5739_destroyed[i]->callback(redx_5739_dmgtype, (void *)i); redx_5739_major[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Major")); redx_5739_major[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_major[i]->tooltip("S/M/A"); redx_5739_major[i]->callback(redx_5739_dmgtype, (void *)i); redx_5739_minor[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Minor")); redx_5739_minor[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_minor[i]->tooltip("S/M/A"); redx_5739_minor[i]->callback(redx_5739_dmgtype, (void *)i); redx_5739_affected[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Affected")); redx_5739_affected[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_affected[i]->tooltip("S/M/A"); redx_5739_affected[i]->callback(redx_5739_dmgtype, (void *)i); redx_5739_inaccessible[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Inacc'")); redx_5739_inaccessible[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_inaccessible[i]->tooltip("S/M/A"); redx_5739_inaccessible[i]->callback(redx_5739_dmgtype, (void *)i); X = 95; redx_5739_floors[i] = new Fl_Input2(X-=40, Y+=45, 80, 24, _("# Floors")); redx_5739_floors[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_floors[i]->tooltip(""); redx_5739_basement[i] = new Fl_Input2(X+=(95+40-12), Y, 24, 24, _("Basement ?")); redx_5739_basement[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_basement[i]->tooltip(_("Y/N")); redx_5739_basement[i]->callback(redx_5739_yn, NULL); X = 95; redx_5739_waterlevel[i] = new Fl_Input2(X-=40, Y+=45, 80, 24, _("Water level")); redx_5739_waterlevel[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_waterlevel[i]->tooltip(_("in inches")); redx_5739_waterlevel[i]->callback(redx_5739_inches, NULL); redx_5739_basement_water[i] = new Fl_Input2(X+=(95), Y, 80, 24, _("W.L. in base'")); redx_5739_basement_water[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_basement_water[i]->tooltip(_("in inches")); redx_5739_basement_water[i]->callback(redx_5739_inches, NULL); X = 95; redx_5739_electricity[i] = new Fl_Input2(X-=12, Y+=45, 24, 24, _("Elect'?")); redx_5739_electricity[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_electricity[i]->tooltip(("Y/N")); redx_5739_electricity[i]->callback(redx_5739_yn, NULL); redx_5739_occupancy[i] = new Fl_Input2(X+=95, Y, 24, 24, _("Occ. Type")); redx_5739_occupancy[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_occupancy[i]->tooltip(_("O/R/S")); redx_5739_occupancy[i]->callback(redx_5739_occ_check, NULL); redx_5739_OR[i] = new Fl_Input2(X+=95, Y, 24, 24, _("OR")); redx_5739_OR[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_OR[i]->tooltip(_("O-outreach assigned")); redx_5739_OR[i]->callback(redx_5739_or, NULL); redx_5739_901[i] = new Fl_Input2(X+=95, Y, 24, 24, _("901")); redx_5739_901[i]->align(FL_ALIGN_CENTER | FL_ALIGN_TOP); redx_5739_901[i]->tooltip(_("case record assigned?")); redx_5739_901[i]->callback(redx_5739_yn, NULL); redx_5739_desc[i] = new Fl_Input2(4, Y+=45, 562, 24, _("Description:")); redx_5739_desc[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); redx_5739_desc[i]->tooltip(_("Useful info for assistance providers")); redx_5739_nam[i] = new Fl_Input2(4, Y+=45, 562, 24, _("Name:")); redx_5739_nam[i]->align(FL_ALIGN_LEFT | FL_ALIGN_TOP); redx_5739_nam[i]->tooltip(_("last name of resident family (if known)")); o->end(); } tab_redx_5739_type->end(); tab_redx_5739->end(); tab_redx_5739->hide(); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011454� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_tab.cxx������������������������������������������������������������������0000664�0001750�0001750�00000012064�12330516146�013676� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" //Fl_Group *tab_mars = (Fl_Group *)0; //Fl_Tabs *tab_mars_type = (Fl_Tabs *)0; void mars_changed(Fl_Widget *, void *) { estimate(); } void create_mars_tab() { create_mars_daily(); create_mars_ineei(); create_mars_net(); create_mars_army(); create_mars_navy(); } //====================================================================== // MARS support functions //====================================================================== Fl_Double_Window *mars_list_window = 0; Fl_Hold_Browser *brws_mars_list = (Fl_Hold_Browser *)0; const int mars_list_widths[] = {160, 100, 40, 160, 0}; string mars_list_lname; string mars_list_call; string mars_list_state; string mars_list_bcall; string mars_list_position; static bool mars_list_ok = false; void cb_list_ok(Fl_Widget *w, void *d) { string retstr = brws_mars_list->text(brws_mars_list->value()); mars_list_window->hide(); mars_list_call.clear(); mars_list_lname.clear(); mars_list_state.clear(); mars_list_bcall.clear(); mars_list_position.clear(); size_t p = retstr.find('\t'); if (p != string::npos) { mars_list_call = retstr.substr(0, p); retstr.erase(0,p+1); } p = retstr.find('\t'); if (p != string::npos) { mars_list_lname = retstr.substr(0, p); retstr.erase(0,p+1); } p = retstr.find('\t'); if (p != string::npos) { mars_list_state = retstr.substr(0, p); retstr.erase(0,p+1); } p = retstr.find('\t'); if (p != string::npos) { mars_list_bcall = retstr.substr(0, p); retstr.erase(0,p+1); } if (!retstr.empty()) { mars_list_position = retstr; } mars_list_ok = true; } void cb_list_cancel(Fl_Widget *w, void *d) { mars_list_window->hide(); mars_list_ok = false; } Fl_Double_Window* mars_list_dialog() { Fl_Double_Window* w = new Fl_Double_Window(562, 280, _("Roster")); brws_mars_list = new Fl_Hold_Browser(1,1,560,250,""); brws_mars_list->column_widths(mars_list_widths); Fl_Button *cancel = new Fl_Button(280, 252, 80, 24, "cancel"); cancel->callback((Fl_Callback*)cb_list_cancel); Fl_Button *ok = new Fl_Button(370, 252, 80, 24, "select"); ok->callback((Fl_Callback*)cb_list_ok); FILE *flist = fopen(progStatus.mars_roster_file.c_str(), "r"); if (flist) { char line[80]; char *retstr = fgets(line, 80, flist); // header line[0] = 0; if (retstr) { while(fgets(line, 80, flist)) { while( line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; while( line[strlen(line)-1] == '\r') line[strlen(line)-1] = 0; for (size_t i = 0; i < strlen(line); i++) if (line[i] == ',') line[i] = '\t'; if (strlen(line)) brws_mars_list->add(line); line[0] = 0; } } fclose(flist); } else printf("could not open %s\n", progStatus.mars_roster_file.c_str()); w->set_modal(); w->end(); return w; } bool get_mars_list_text() { if (!mars_list_window) mars_list_window = mars_list_dialog(); mars_list_window->show(); while (mars_list_window->visible()) Fl::wait(); return mars_list_ok; } void cb_mars_fl_input2(Fl_Widget *w, void *d) { Fl_Input2 *inp = (Fl_Input2 *)w; int pos = inp->position(); string text = inp->value(); ucase(text); inp->value(text.c_str()); inp->position(pos); estimate(); } void cb_mars_text(Fl_Widget *w, void *d) { FTextEdit *inp = (FTextEdit *)w; int pos = inp->insert_position(); string text = inp->buffer()->text(); ucase(text); inp->clear(); inp->add(text.c_str()); inp->insert_position(pos); estimate(); } string notail(string s) { static string str; str = s; while (str[str.length()-1] == '\n') str.erase(str.length()-1, 1); return str; } string maxchars(string s, unsigned int nchars, int indent) { static string str; str = notail(s); if (str.length() <= nchars) return str; size_t ccount = 0; size_t lastspace = -1; size_t p = 0; while ( p < str.length() ) { if (str[p] == '\n') { ccount = 0; if (indent) { str.insert(lastspace+1, indent, ' '); p += indent; ccount = indent; } } else if (str[p] == ' ') lastspace = p; p++; ccount++; if (ccount > nchars - 1) { str[lastspace] = '\n'; if (indent) str.insert(lastspace+1, indent, ' '); p = lastspace+1; ccount = 0; } } return str; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_net.cxx������������������������������������������������������������������0000664�0001750�0001750�00000055333�12330516146�013724� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; const char mars_net_precedent[] = "RPOZ"; string buffnet; string def_mars_net_filename = ""; string base_mars_net_filename = ""; string def_mars_net_TemplateName = ""; bool using_mars_net_template = false; // mars_net fields string mars_net_DE = ":de:"; string mars_net_NBR = ":nbr:"; string mars_net_PREC = ":prec:"; string mars_net_DTG = ":dtg:"; string mars_net_FMNAME = ":fmname:"; string mars_net_FMCALL = ":fmcall:"; string mars_net_FMSTATE = ":fmstate:"; string mars_net_TOPOS = ":topos:"; string mars_net_TOCALL = ":tocall:"; string mars_net_TOSTATE = ":tostate:"; string mars_net_INFOPOS = ":INFOpos:"; string mars_net_INFOCALL = ":INFOcall:"; string mars_net_INFOSTATE = ":INFOstate:"; string mars_net_INCIDENT = ":incident:"; string mars_net_DND = ":dnd:"; string mars_net_NETCALL = ":netcall:"; string mars_net_DTGSTART = ":dtgstart:"; string mars_net_DTGEND = ":dtgend:"; string mars_net_NETSB = ":netsb:"; string mars_net_NCSCALL = ":ncscall:"; string mars_net_NBRSTAS = ":nbrstas:"; string mars_net_CALLS = ":calls:"; string mars_net_NBRMSGS = ":nbrmsgs:"; string mars_net_COMMENTS = ":comments:"; string s_mars_net_DE; string s_mars_net_NBR; string s_mars_net_PREC = "R"; string s_mars_net_DTG; string s_mars_net_FMNAME; string s_mars_net_FMCALL; string s_mars_net_FMSTATE; string s_mars_net_TOPOS; string s_mars_net_TOCALL; string s_mars_net_TOSTATE; string s_mars_net_INFOPOS; string s_mars_net_INFOCALL; string s_mars_net_INFOSTATE; string s_mars_net_INCIDENT; string s_mars_net_DND; string s_mars_net_NETCALL; string s_mars_net_DTGSTART; string s_mars_net_DTGEND; string s_mars_net_NETSB; string s_mars_net_NCSCALL; string s_mars_net_NBRSTAS; string s_mars_net_CALLS; string s_mars_net_NBRMSGS; string s_mars_net_COMMENTS; void cb_mars_net_SetDTG() { txt_mars_net_DTG->value(szDateTime()); } void cb_mars_net_SetDTGSTART() { txt_mars_net_DTGSTART->value(szDateTime()); } void cb_mars_net_SetDTGEND() { txt_mars_net_DTGEND->value(szDateTime()); } void clear_mars_net_fields() { s_mars_net_DE.clear(); s_mars_net_NBR.clear(); s_mars_net_PREC = "R"; s_mars_net_DTG.clear(); s_mars_net_FMNAME.clear(); s_mars_net_FMCALL.clear(); s_mars_net_FMSTATE.clear(); s_mars_net_TOPOS.clear(); s_mars_net_TOCALL.clear(); s_mars_net_TOSTATE.clear(); s_mars_net_INFOPOS.clear(); s_mars_net_INFOCALL.clear(); s_mars_net_INFOSTATE.clear(); s_mars_net_INCIDENT.clear(); s_mars_net_DND.clear(); s_mars_net_NETCALL.clear(); s_mars_net_DTGSTART.clear(); s_mars_net_DTGEND.clear(); s_mars_net_NETSB.clear(); s_mars_net_NCSCALL.clear(); s_mars_net_NBRSTAS.clear(); s_mars_net_CALLS.clear(); s_mars_net_NBRMSGS.clear(); s_mars_net_COMMENTS.clear(); } bool check_mars_net_fields() { string temp; if (s_mars_net_DE != txt_mars_net_DE->value()) return true; if (s_mars_net_NBR != txt_mars_net_NBR->value()) return true; temp = mars_net_precedent[sel_mars_net_PREC->index()]; if (s_mars_net_PREC != temp) return true; if (s_mars_net_DTG != txt_mars_net_DTG->value()) return true; if (s_mars_net_FMNAME != txt_mars_net_FMNAME->value()) return true; if (s_mars_net_FMCALL != txt_mars_net_FMCALL->value()) return true; if (s_mars_net_FMSTATE != txt_mars_net_FMSTATE->value()) return true; if (s_mars_net_TOPOS != txt_mars_net_TOPOS->value()) return true; if (s_mars_net_TOCALL != txt_mars_net_TOCALL->value()) return true; if (s_mars_net_TOSTATE != txt_mars_net_TOSTATE->value()) return true; if (s_mars_net_INFOPOS != txt_mars_net_INFOPOS->value()) return true; if (s_mars_net_INFOCALL != txt_mars_net_INFOCALL->value()) return true; if (s_mars_net_INFOSTATE != txt_mars_net_INFOSTATE->value()) return true; if (s_mars_net_INCIDENT != txt_mars_net_INCIDENT->value()) return true; if (s_mars_net_DND != txt_mars_net_DND->value()) return true; if (s_mars_net_NETCALL != txt_mars_net_NETCALL->value()) return true; if (s_mars_net_DTGSTART != txt_mars_net_DTGSTART->value()) return true; if (s_mars_net_DTGEND != txt_mars_net_DTGEND->value()) return true; if (s_mars_net_NETSB != txt_mars_net_NETSB->value()) return true; if (s_mars_net_NCSCALL != txt_mars_net_NCSCALL->value()) return true; if (s_mars_net_NBRSTAS != txt_mars_net_NBRSTAS->value()) return true; if (s_mars_net_CALLS != txt_mars_net_CALLS->value()) return true; if (s_mars_net_NBRMSGS != txt_mars_net_NBRMSGS->value()) return true; if (s_mars_net_COMMENTS != txt_mars_net_COMMENTS->value()) return true; return false; } void update_mars_net_fields() { s_mars_net_DE = txt_mars_net_DE->value(); s_mars_net_NBR = txt_mars_net_NBR->value(); s_mars_net_PREC.clear(); s_mars_net_PREC = mars_net_precedent[sel_mars_net_PREC->index()]; s_mars_net_DTG = txt_mars_net_DTG->value(); s_mars_net_FMNAME = txt_mars_net_FMNAME->value(); s_mars_net_FMCALL = txt_mars_net_FMCALL->value(); s_mars_net_FMSTATE = txt_mars_net_FMSTATE->value(); s_mars_net_TOPOS = txt_mars_net_TOPOS->value(); s_mars_net_TOCALL = txt_mars_net_TOCALL->value(); s_mars_net_TOSTATE = txt_mars_net_TOSTATE->value(); s_mars_net_INFOPOS = txt_mars_net_INFOPOS->value(); s_mars_net_INFOCALL = txt_mars_net_INFOCALL->value(); s_mars_net_INFOSTATE = txt_mars_net_INFOSTATE->value(); s_mars_net_INCIDENT = txt_mars_net_INCIDENT->value(); s_mars_net_DND = txt_mars_net_DND->value(); s_mars_net_NETCALL = txt_mars_net_NETCALL->value(); s_mars_net_DTGSTART = txt_mars_net_DTGSTART->value(); s_mars_net_DTGEND = txt_mars_net_DTGEND->value(); s_mars_net_NETSB = txt_mars_net_NETSB->value(); s_mars_net_NCSCALL = txt_mars_net_NCSCALL->value(); s_mars_net_NBRSTAS = txt_mars_net_NBRSTAS->value(); s_mars_net_CALLS = txt_mars_net_CALLS->value(); s_mars_net_NBRMSGS = txt_mars_net_NBRMSGS->value(); s_mars_net_COMMENTS = txt_mars_net_COMMENTS->value(); } void update_mars_netform() { txt_mars_net_DE->value(s_mars_net_DE.c_str()); txt_mars_net_NBR->value(s_mars_net_NBR.c_str()); size_t n = strchr(mars_net_precedent, s_mars_net_PREC[0]) - mars_net_precedent; if (n < 0) n = 0; if (n > 4) n = 4; sel_mars_net_PREC->index(n); txt_mars_net_DTG->value(s_mars_net_DTG.c_str()); txt_mars_net_FMNAME->value(s_mars_net_FMNAME.c_str()); txt_mars_net_FMCALL->value(s_mars_net_FMCALL.c_str()); txt_mars_net_FMSTATE->value(s_mars_net_FMSTATE.c_str()); txt_mars_net_TOPOS->value(s_mars_net_TOPOS.c_str()); txt_mars_net_TOCALL->value(s_mars_net_TOCALL.c_str()); txt_mars_net_TOSTATE->value(s_mars_net_TOSTATE.c_str()); txt_mars_net_INFOPOS->value(s_mars_net_INFOPOS.c_str()); txt_mars_net_INFOCALL->value(s_mars_net_INFOCALL.c_str()); txt_mars_net_INFOSTATE->value(s_mars_net_INFOSTATE.c_str()); txt_mars_net_INCIDENT->value(s_mars_net_INCIDENT.c_str()); txt_mars_net_DND->value(s_mars_net_DND.c_str()); txt_mars_net_NETCALL->value(s_mars_net_NETCALL.c_str()); txt_mars_net_DTGSTART->value(s_mars_net_DTGSTART.c_str()); txt_mars_net_DTGEND->value(s_mars_net_DTGEND.c_str()); txt_mars_net_NETSB->value(s_mars_net_NETSB.c_str()); txt_mars_net_NCSCALL->value(s_mars_net_NCSCALL.c_str()); txt_mars_net_NBRSTAS->value(s_mars_net_NBRSTAS.c_str()); txt_mars_net_CALLS->value(s_mars_net_CALLS.c_str()); txt_mars_net_NBRMSGS->value(s_mars_net_NBRMSGS.c_str()); txt_mars_net_COMMENTS->value(s_mars_net_COMMENTS.c_str()); } void clear_mars_net_form() { clear_mars_net_fields(); txt_mars_net_DE->value(""); txt_mars_net_NBR->value(""); sel_mars_net_PREC->index(4); txt_mars_net_DTG->value(""); txt_mars_net_FMNAME->value(""); txt_mars_net_FMCALL->value(""); txt_mars_net_FMSTATE->value(""); txt_mars_net_TOPOS->value(""); txt_mars_net_TOCALL->value(""); txt_mars_net_TOSTATE->value(""); txt_mars_net_INFOPOS->value(""); txt_mars_net_INFOCALL->value(""); txt_mars_net_INFOSTATE->value(""); txt_mars_net_INCIDENT->value(""); txt_mars_net_DND->value(""); txt_mars_net_NETCALL->value(""); txt_mars_net_DTGSTART->value(""); txt_mars_net_DTGEND->value(""); txt_mars_net_NETSB->value(""); txt_mars_net_NCSCALL->value(""); txt_mars_net_NBRSTAS->value(""); txt_mars_net_CALLS->value(""); txt_mars_net_NBRMSGS->value(""); txt_mars_net_COMMENTS->value(""); } void make_mars_buffnet(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( mars_net_DE, s_mars_net_DE ) ); mbuff.append( lineout( mars_net_NBR, s_mars_net_NBR ) ); mbuff.append( lineout( mars_net_PREC, s_mars_net_PREC ) ); mbuff.append( lineout( mars_net_DTG, s_mars_net_DTG ) ); mbuff.append( lineout( mars_net_FMNAME, s_mars_net_FMNAME ) ); mbuff.append( lineout( mars_net_FMCALL, s_mars_net_FMCALL ) ); mbuff.append( lineout( mars_net_FMSTATE, s_mars_net_FMSTATE ) ); mbuff.append( lineout( mars_net_TOPOS, s_mars_net_TOPOS ) ); mbuff.append( lineout( mars_net_TOCALL, s_mars_net_TOCALL ) ); mbuff.append( lineout( mars_net_TOSTATE, s_mars_net_TOSTATE ) ); mbuff.append( lineout( mars_net_INFOPOS, s_mars_net_INFOPOS ) ); mbuff.append( lineout( mars_net_INFOCALL, s_mars_net_INFOCALL ) ); mbuff.append( lineout( mars_net_INFOSTATE, s_mars_net_INFOSTATE ) ); mbuff.append( lineout( mars_net_INCIDENT, s_mars_net_INCIDENT ) ); mbuff.append( lineout( mars_net_DND, s_mars_net_DND ) ); mbuff.append( lineout( mars_net_NETCALL, s_mars_net_NETCALL ) ); mbuff.append( lineout( mars_net_DTGSTART, s_mars_net_DTGSTART ) ); mbuff.append( lineout( mars_net_DTGEND, s_mars_net_DTGEND ) ); mbuff.append( lineout( mars_net_NETSB, s_mars_net_NETSB ) ); mbuff.append( lineout( mars_net_NCSCALL, s_mars_net_NCSCALL ) ); mbuff.append( lineout( mars_net_NBRSTAS, s_mars_net_NBRSTAS ) ); mbuff.append( lineout( mars_net_CALLS, s_mars_net_CALLS ) ); mbuff.append( lineout( mars_net_NBRMSGS, s_mars_net_NBRMSGS ) ); mbuff.append( lineout( mars_net_COMMENTS, s_mars_net_COMMENTS ) ); if (compress) compress_maybe(mbuff); buffnet.append(mbuff); } void read_mars_net_buffer(string data) { clear_mars_net_fields(); // search the file buffer for each of the mars_net fields s_mars_net_DE = findstr(data, mars_net_DE); s_mars_net_NBR = findstr(data, mars_net_NBR); s_mars_net_PREC = findstr(data, mars_net_PREC); s_mars_net_DTG = findstr(data, mars_net_DTG); s_mars_net_FMNAME = findstr(data, mars_net_FMNAME); s_mars_net_FMCALL = findstr(data, mars_net_FMCALL); s_mars_net_FMSTATE = findstr(data, mars_net_FMSTATE); s_mars_net_TOPOS = findstr(data, mars_net_TOPOS); s_mars_net_TOCALL = findstr(data, mars_net_TOCALL); s_mars_net_TOSTATE = findstr(data, mars_net_TOSTATE); s_mars_net_INFOPOS = findstr(data, mars_net_INFOPOS); s_mars_net_INFOCALL = findstr(data, mars_net_INFOCALL); s_mars_net_INFOSTATE = findstr(data, mars_net_INFOSTATE); s_mars_net_INCIDENT = findstr(data, mars_net_INCIDENT); s_mars_net_DND = findstr(data, mars_net_DND); s_mars_net_NETCALL = findstr(data, mars_net_NETCALL); s_mars_net_DTGSTART = findstr(data, mars_net_DTGSTART); s_mars_net_DTGEND = findstr(data, mars_net_DTGEND); s_mars_net_NETSB = findstr(data, mars_net_NETSB); s_mars_net_NCSCALL = findstr(data, mars_net_NCSCALL); s_mars_net_NBRSTAS = findstr(data, mars_net_NBRSTAS); s_mars_net_CALLS = findstr(data, mars_net_CALLS); s_mars_net_NBRMSGS = findstr(data, mars_net_NBRMSGS); s_mars_net_COMMENTS = findstr(data, mars_net_COMMENTS); update_mars_netform(); } void cb_mars_net_new() { if (check_mars_net_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_mars_net_save(); } } clear_mars_net_form(); def_mars_net_filename = ICS_msg_dir; def_mars_net_filename.append("new"FMARSNET_EXT); show_filename(def_mars_net_filename); using_mars_net_template = false; } void cb_mars_net_import() { fl_alert2("Not implemented"); } void cb_mars_net_export() { fl_alert2("Not implemented"); } void cb_mars_net_wrap_import(string wrapfilename, string inpbuffer) { clear_mars_net_form(); read_mars_net_buffer(inpbuffer); def_mars_net_filename = ICS_msg_dir; def_mars_net_filename.append(wrapfilename); show_filename(def_mars_net_filename); using_mars_net_template = false; } int eval_mars_net_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_mars_net_filename).append("]"); update_mars_net_fields(); update_header(FROM); evalstr.append(header("<mars_net>")); buffnet.clear(); make_mars_buffnet(true); if (buffnet.empty()) return 0; compress_maybe( buffnet ); evalstr.append( buffnet ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_mars_net_wrap_export() { if (check_mars_net_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_net_fields(); if (base_mars_net_filename == "new"FMARSNET_EXT || base_mars_net_filename == "default"FMARSNET_EXT) if (!cb_mars_net_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_mars_net_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffnet.assign(header("<mars_net>")); make_mars_buffnet(true); export_wrapfile(base_mars_net_filename, wrapfilename, buffnet, pext != ".wrap"); buffnet.assign(header("<mars_net>")); make_mars_buffnet(false); write_mars_net(def_mars_net_filename); } } void cb_mars_net_wrap_autosend() { if (check_mars_net_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_net_fields(); if (base_mars_net_filename == "new"FMARSNET_EXT || base_mars_net_filename == "default"FMARSNET_EXT) if (!cb_mars_net_save_as()) return; update_header(FROM); buffnet.assign(header("<mars_net>")); make_mars_buffnet(true); xfr_via_socket(base_mars_net_filename, buffnet); buffnet.assign(header("<mars_net>")); make_mars_buffnet(false); write_mars_net(def_mars_net_filename); } void cb_mars_net_load_template() { string def_mars_net_filename = def_mars_net_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TMARSNET_EXT, def_mars_net_filename.c_str()); if (p) { clear_mars_net_form(); read_data_file(p); def_mars_net_TemplateName = p; show_filename(def_mars_net_TemplateName); using_mars_net_template = true; } } void cb_mars_net_save_template() { if (!using_mars_net_template) { cb_mars_net_save_as_template(); return; } string def_mars_net_filename = def_mars_net_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TMARSNET_EXT, def_mars_net_filename.c_str()); if (p) { update_header(CHANGED); update_mars_net_fields(); buffnet.assign(header("<mars_net>")); make_mars_buffnet(); write_mars_net(p); } } void cb_mars_net_save_as_template() { string def_mars_net_filename = def_mars_net_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TMARSNET_EXT, def_mars_net_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_mars_net_TemplateName = p; if (strlen(pext) == 0) def_mars_net_TemplateName.append(TMARSNET_EXT); remove_spaces_from_filename(def_mars_net_TemplateName); clear_header(); update_header(CHANGED); update_mars_net_fields(); buffnet.assign(header("<mars_net>")); make_mars_buffnet(); write_mars_net(def_mars_net_TemplateName); show_filename(def_mars_net_TemplateName); using_mars_net_template = true; } } void cb_mars_net_open() { const char *p = FSEL::select(_("Open data file"), "ICS-net\t*"FMARSNET_EXT, def_mars_net_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_mars_net_form(); read_data_file(p); using_mars_net_template = false; def_mars_net_filename = p; show_filename(def_mars_net_filename); } void write_mars_net(string s) { FILE *filenet = fopen(s.c_str(), "w"); if (!filenet) return; make_mars_buffnet(); fwrite(buffnet.c_str(), buffnet.length(), 1, filenet); fclose(filenet); } bool cb_mars_net_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FMARSNET_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_mars_net_filename; p = FSEL::saveas(_("Save data file"), "ICS-net\t*"FMARSNET_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_mars_net_filename = p; if (strlen(pext) == 0) def_mars_net_filename.append(FMARSNET_EXT); remove_spaces_from_filename(def_mars_net_filename); update_header(NEW); update_mars_net_fields(); buffnet.assign(header("<mars_net>")); make_mars_buffnet(); write_mars_net(def_mars_net_filename); using_mars_net_template = false; show_filename(def_mars_net_filename); return true; } void cb_mars_net_save() { if (base_mars_net_filename == "new"FMARSNET_EXT || base_mars_net_filename == "default"FMARSNET_EXT || using_mars_net_template == true) { cb_mars_net_save_as(); return; } if (check_mars_net_fields()) update_header(CHANGED); update_mars_net_fields(); buffnet.assign(header("<mars_net>")); make_mars_buffnet(); write_mars_net(def_mars_net_filename); using_mars_net_template = false; } void cb_mars_net_html() { string fname_name = fl_filename_name(def_mars_net_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string mars_net_fname = ICS_dir; mars_net_fname.append(fname_name); mars_net_fname.append(".html"); string formnet = mars_net_html_template; replacestr(formnet, mars_net_DE, s_mars_net_DE); replacestr(formnet, mars_net_NBR, s_mars_net_NBR); replacestr(formnet, mars_net_PREC, s_mars_net_PREC); replacestr(formnet, mars_net_DTG, s_mars_net_DTG); replacestr(formnet, mars_net_FMNAME, s_mars_net_FMNAME); replacestr(formnet, mars_net_FMCALL, s_mars_net_FMCALL); replacestr(formnet, mars_net_FMSTATE, s_mars_net_FMSTATE); replacestr(formnet, mars_net_TOPOS, s_mars_net_TOPOS); replacestr(formnet, mars_net_TOCALL, s_mars_net_TOCALL); replacestr(formnet, mars_net_TOSTATE, s_mars_net_TOSTATE); replacestr(formnet, mars_net_INFOPOS, s_mars_net_INFOPOS); replacestr(formnet, mars_net_INFOCALL, s_mars_net_INFOCALL); replacestr(formnet, mars_net_INFOSTATE, s_mars_net_INFOSTATE); replacestr(formnet, mars_net_INCIDENT, s_mars_net_INCIDENT); replacestr(formnet, mars_net_INCIDENT, s_mars_net_INCIDENT); // 2 in form replacestr(formnet, mars_net_DND, s_mars_net_DND); replacestr(formnet, mars_net_NETCALL, s_mars_net_NETCALL); replacestr(formnet, mars_net_DTGSTART, s_mars_net_DTGSTART); replacestr(formnet, mars_net_DTGEND, s_mars_net_DTGEND); replacestr(formnet, mars_net_NETSB, s_mars_net_NETSB); replacestr(formnet, mars_net_NCSCALL, s_mars_net_NCSCALL); replacestr(formnet, mars_net_NBRSTAS, s_mars_net_NBRSTAS); replacestr(formnet, mars_net_CALLS, s_mars_net_CALLS); replacestr(formnet, mars_net_NBRMSGS, s_mars_net_NBRMSGS); replacestr(formnet, mars_net_COMMENTS, s_mars_net_COMMENTS); FILE *filenet = fopen(mars_net_fname.c_str(), "w"); fprintf(filenet,"%s", formnet.c_str()); fclose(filenet); open_url(mars_net_fname.c_str()); } void cb_mars_net_textout() { string temp = ""; string mars_net_fname = ICS_dir; mars_net_fname.append("mars_net.txt"); string formnet = mars_net_text_template; replacestr(formnet, mars_net_DE, s_mars_net_DE); replacestr(formnet, mars_net_NBR, s_mars_net_NBR); replacestr(formnet, mars_net_PREC, s_mars_net_PREC); replacestr(formnet, mars_net_DTG, s_mars_net_DTG); replacestr(formnet, mars_net_FMNAME, s_mars_net_FMNAME); replacestr(formnet, mars_net_FMCALL, s_mars_net_FMCALL); replacestr(formnet, mars_net_FMSTATE, s_mars_net_FMSTATE); replacestr(formnet, mars_net_TOPOS, s_mars_net_TOPOS); replacestr(formnet, mars_net_TOCALL, s_mars_net_TOCALL); replacestr(formnet, mars_net_TOSTATE, s_mars_net_TOSTATE); replacestr(formnet, mars_net_INFOPOS, s_mars_net_INFOPOS); replacestr(formnet, mars_net_INFOCALL, s_mars_net_INFOCALL); replacestr(formnet, mars_net_INFOSTATE, s_mars_net_INFOSTATE); replacestr(formnet, mars_net_INCIDENT, s_mars_net_INCIDENT); replacestr(formnet, mars_net_INCIDENT, s_mars_net_INCIDENT); // 2 in form replacestr(formnet, mars_net_DND, s_mars_net_DND); replacestr(formnet, mars_net_NETCALL, s_mars_net_NETCALL); replacestr(formnet, mars_net_DTGSTART, s_mars_net_DTGSTART); replacestr(formnet, mars_net_DTGEND, s_mars_net_DTGEND); replacestr(formnet, mars_net_NETSB, s_mars_net_NETSB); replacestr(formnet, mars_net_NCSCALL, s_mars_net_NCSCALL); replacestr(formnet, mars_net_NBRSTAS, s_mars_net_NBRSTAS); replacestr(formnet, mars_net_CALLS, s_mars_net_CALLS); replacestr(formnet, mars_net_NBRMSGS, s_mars_net_NBRMSGS); replacestr(formnet, mars_net_COMMENTS, s_mars_net_COMMENTS); FILE *filenet = fopen(mars_net_fname.c_str(), "w"); fprintf(filenet,"%s", formnet.c_str()); fclose(filenet); open_url(mars_net_fname.c_str()); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/navy_mars_tab.cxx�������������������������������������������������������������0000664�0001750�0001750�00000023737�12330516146�014744� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Multi_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" extern Fl_Double_Window* mars_navy_list_dialog(); extern Fl_Double_Window *mars_navy_list_window; extern Fl_Multi_Browser *brws_mars_navy_list; extern string mars_navy_list_text; extern bool mars_navy_list_ok; Fl_Group *tab_mars_navy = (Fl_Group *)0; Fl_Tabs *tab_mars_navy_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_navy_1 = (Fl_Group *)0; Fl_Group *tab_mars_navy_2 = (Fl_Group *)0; Fl_Input2 *txt_mars_navy_de = (Fl_Input2 *)0; Fl_Input2 *txt_mars_navy_serno = (Fl_Input2 *)0; Fl_Input2 *txt_mars_navy_dtg = (Fl_Input2 *)0; Fl_Input2 *txt_mars_navy_fm = (Fl_Input2 *)0; Fl_Input2 *txt_mars_navy_subj = (Fl_Input2 *)0; Fl_Button *btn_mars_navy_dtg = (Fl_Button *)0; Fl_Button *btn_mars_navy_pick_fm = (Fl_Button *)0; Fl_Button *btn_mars_navy_pick_to = (Fl_Button *)0; Fl_Button *btn_mars_navy_pick_info = (Fl_Button *)0; FTextEdit *txt_mars_navy_to = (FTextEdit *)0; FTextEdit *txt_mars_navy_info = (FTextEdit *)0; FTextEdit *txt_mars_navy_text = (FTextEdit *)0; Fl_ListBox *sel_mars_navy_prec = (Fl_ListBox *)0; //---------------------------------------------------------------------- // widget callbacks & support bool get_mars_navy_list_text() { if (!mars_navy_list_window) mars_navy_list_window = mars_navy_list_dialog(); brws_mars_navy_list->deselect(); mars_navy_list_window->show(); while (mars_navy_list_window->visible()) Fl::wait(); return mars_navy_list_ok; } void cb_btn_mars_navy_pick_fm(Fl_Widget *w, void *d) { if (!get_mars_navy_list_text()) return; string s = mars_navy_list_text; size_t p; if ((p = s.rfind('\n')) != string::npos) s.erase(p); txt_mars_navy_fm->value(s.c_str()); } void cb_btn_mars_navy_pick_to(Fl_Widget *w, void *d) { if (!get_mars_navy_list_text()) return; string s = txt_mars_navy_to->buffer()->text(); if (s.length()) s += '\n'; s.append(mars_navy_list_text); txt_mars_navy_to->clear(); txt_mars_navy_to->add(s.c_str()); } void cb_btn_mars_navy_pick_info(Fl_Widget *w, void *d) { if (!get_mars_navy_list_text()) return; string s = txt_mars_navy_info->buffer()->text(); if (s.length()) s += '\n'; s.append(mars_navy_list_text); txt_mars_navy_info->clear(); txt_mars_navy_info->add(s.c_str()); } void cb_btn_mars_navy_dtg(Fl_Widget *w, void *d) { txt_mars_navy_dtg->value(szMarsDateTime()); } void create_mars_navy() { int Y = tab_top; tab_mars_navy = new Fl_Group(0, Y, 570, 390); tab_mars_navy->align(FL_ALIGN_TOP); tab_mars_navy_type = new Fl_Tabs(0, Y+2, 570, 387); tab_mars_navy_type->selection_color((Fl_Color)246); tab_mars_navy_1 = new Fl_Group(0, Y+25, 570, 360, _("Header")); Y += 40; txt_mars_navy_de = new Fl_Input2(50, Y, 259, 24, _("DE")); txt_mars_navy_de->tooltip(_("Enter personal MARS callsign")); txt_mars_navy_de->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_navy_de->when(FL_WHEN_CHANGED); txt_mars_navy_serno = new Fl_Input2(400, Y, 100, 24, _("Ser. No.")); txt_mars_navy_serno->tooltip(_("Enter personal serial number")); Y += 36; sel_mars_navy_prec = new Fl_ListBox(50, Y, 45, 24, _("PREC")); sel_mars_navy_prec->tooltip( _("R - Routine\nP - Priority\nO - Immediate\nZ - Flash")); sel_mars_navy_prec->add("R|P|O|Z"); sel_mars_navy_prec->align(FL_ALIGN_LEFT); sel_mars_navy_prec->index(0); txt_mars_navy_dtg = new Fl_Input2(135, Y, 150, 24, _("DTG")); txt_mars_navy_dtg->tooltip(_("")); btn_mars_navy_dtg = new Fl_Button(285, Y, 22, 24, _("...")); btn_mars_navy_dtg->tooltip(_("Set Date/Time Group")); btn_mars_navy_dtg->callback((Fl_Callback*)cb_btn_mars_navy_dtg); Y += 26; btn_mars_navy_pick_fm = new Fl_Button(4, Y, 44, 24, _("FM")); btn_mars_navy_pick_fm->tooltip(_("Select from list")); btn_mars_navy_pick_fm->callback((Fl_Callback*)cb_btn_mars_navy_pick_fm); txt_mars_navy_fm = new Fl_Input2(50, Y, 259, 24, _("")); txt_mars_navy_fm->tooltip(_("use pick list button")); Y += 26; btn_mars_navy_pick_to = new Fl_Button(4, Y, 44, 24, _("TO")); btn_mars_navy_pick_to->tooltip(_("Select from list")); btn_mars_navy_pick_to->callback((Fl_Callback*)cb_btn_mars_navy_pick_to); txt_mars_navy_to = new FTextEdit(50, Y, 500, 100, _("")); txt_mars_navy_to->tooltip(_("use pick list button")); txt_mars_navy_to->textfont(FL_HELVETICA); txt_mars_navy_to->box(FL_DOWN_FRAME); txt_mars_navy_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_navy_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_navy_to->labeltype(FL_NORMAL_LABEL); txt_mars_navy_to->labelfont(0); txt_mars_navy_to->labelsize(14); txt_mars_navy_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_navy_to->align(FL_ALIGN_TOP_LEFT); txt_mars_navy_to->callback((Fl_Callback*)cb_mars_text); txt_mars_navy_to->when(FL_WHEN_CHANGED); Y += 102; btn_mars_navy_pick_info = new Fl_Button(4, Y, 44, 24, _("INFO")); btn_mars_navy_pick_info->tooltip(_("Select from list")); btn_mars_navy_pick_info->callback((Fl_Callback*)cb_btn_mars_navy_pick_info); txt_mars_navy_info = new FTextEdit(50, Y, 500, 100, _("")); txt_mars_navy_info->tooltip(_("use pick list button")); txt_mars_navy_info->textfont(FL_HELVETICA); txt_mars_navy_info->box(FL_DOWN_FRAME); txt_mars_navy_info->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_navy_info->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_navy_info->labeltype(FL_NORMAL_LABEL); txt_mars_navy_info->labelfont(0); txt_mars_navy_info->labelsize(14); txt_mars_navy_info->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_navy_info->align(FL_ALIGN_TOP_LEFT); txt_mars_navy_info->callback((Fl_Callback*)cb_mars_text); txt_mars_navy_info->when(FL_WHEN_CHANGED); Y += 102; Fl_Box *label = new Fl_Box(0, Y, 50, 24, "SUBJ"); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_navy_subj = new Fl_Input2(50, Y, 500, 24, _("")); txt_mars_navy_subj->tooltip(_("message subject")); txt_mars_navy_subj->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_navy_subj->when(FL_WHEN_CHANGED); tab_mars_navy_1->end(); tab_mars_navy_2 = new Fl_Group(0, 95, 570, 355, _("Body")); Y = tab_top; txt_mars_navy_text = new FTextEdit(2, Y+30, 566, 350, ""); txt_mars_navy_text->tooltip("enter text of message"); txt_mars_navy_text->textfont(FL_HELVETICA); txt_mars_navy_text->box(FL_DOWN_FRAME); txt_mars_navy_text->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_navy_text->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_navy_text->labeltype(FL_NORMAL_LABEL); txt_mars_navy_text->labelfont(0); txt_mars_navy_text->labelsize(14); txt_mars_navy_text->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_navy_text->align(FL_ALIGN_TOP_LEFT); txt_mars_navy_text->callback((Fl_Callback*)cb_mars_text); txt_mars_navy_text->when(FL_WHEN_CHANGED); tab_mars_navy_2->end(); tab_mars_navy_type->end(); tab_mars_navy->end(); tab_mars_navy->hide(); }; //====================================================================== //====================================================================== Fl_Double_Window *mars_navy_list_window = 0; Fl_Multi_Browser *brws_mars_navy_list = (Fl_Multi_Browser *)0; const int mars_navy_list_widths[] = {180, 170, 30, 0}; string mars_navy_list_text; bool mars_navy_list_ok = false; void cb_navy_list_ok(Fl_Widget *w, void *d) { string retstr; mars_navy_list_text.clear(); size_t p; for (int i = 1; i <= brws_mars_navy_list->size(); i++) { if (brws_mars_navy_list->selected(i)) { if (mars_navy_list_text.length()) mars_navy_list_text += '\n'; retstr = brws_mars_navy_list->text(i); p = retstr.find('\t'); mars_navy_list_text.append(retstr.substr(0, p)); // CALL retstr.erase(0,p+1); p = retstr.find('\t'); // LNAME if (p != string::npos) { retstr.erase(0,p+1); p = retstr.find('\t'); // STATE if (p != string::npos) mars_navy_list_text.append(" ").append(retstr.substr(0, p)); } } } mars_navy_list_window->hide(); mars_navy_list_ok = true; } void cb_navy_list_cancel(Fl_Widget *w, void *d) { mars_navy_list_window->hide(); mars_navy_list_ok = false; } Fl_Double_Window* mars_navy_list_dialog() { Fl_Double_Window* w = new Fl_Double_Window(452, 280, _("Roster")); brws_mars_navy_list = new Fl_Multi_Browser(1,1,450,250,""); brws_mars_navy_list->column_widths(mars_navy_list_widths); Fl_Button *cancel = new Fl_Button(280, 252, 80, 24, "cancel"); cancel->callback((Fl_Callback*)cb_navy_list_cancel); Fl_Button *ok = new Fl_Button(370, 252, 80, 24, "select"); ok->callback((Fl_Callback*)cb_navy_list_ok); FILE *flist = fopen(progStatus.mars_roster_file.c_str(), "r"); char *retstr; if (flist) { char line[80]; retstr = fgets(line, 80, flist); // header line[0] = 0; if (retstr) { while(fgets(line, 80, flist)) { while( line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; while( line[strlen(line)-1] == '\r') line[strlen(line)-1] = 0; for (size_t i = 0; i < strlen(line); i++) if (line[i] == ',') line[i] = '\t'; if (strlen(line)) brws_mars_navy_list->add(line); line[0] = 0; } } fclose(flist); } else printf("could not open %s\n", progStatus.mars_roster_file.c_str()); w->set_modal(); w->end(); return w; } ���������������������������������flmsg-2.0.10/src/mars/mars_navy.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000037352�12330516146�014114� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; const char navy_precedent[] = "RPIF"; string mars_navy_de = ":de:"; string mars_navy_serno = ":serno:"; string mars_navy_prec = ":pre:"; string mars_navy_dtg = ":dtg:"; string mars_navy_fm = ":fm:"; string mars_navy_to = ":to:"; string mars_navy_info = ":info:"; string mars_navy_subj = ":subj:"; string mars_navy_text = ":text:"; string s_mars_navy_de; string s_mars_navy_serno; string s_mars_navy_prec = "R"; string s_mars_navy_dtg; string s_mars_navy_fm; string s_mars_navy_to; string s_mars_navy_subj; string s_mars_navy_info; string s_mars_navy_text; string buffmars_navy; string def_mars_navy_filename = ""; string base_mars_navy_filename = ""; string def_mars_navy_TemplateName = ""; bool using_mars_navy_template = false; void clear_mars_navyfields() { s_mars_navy_de.clear(); s_mars_navy_serno.clear(); s_mars_navy_prec = "R"; s_mars_navy_dtg.clear(); s_mars_navy_fm.clear(); s_mars_navy_to.clear(); s_mars_navy_subj.clear(); s_mars_navy_info.clear(); s_mars_navy_text.clear(); } bool check_mars_navyfields() { string temp; temp = navy_precedent[sel_mars_navy_prec->index()]; if (s_mars_navy_prec != temp) return true; if (s_mars_navy_de != txt_mars_navy_de->value()) return true; if (s_mars_navy_serno != txt_mars_navy_serno->value()) return true; if (s_mars_navy_dtg != txt_mars_navy_dtg->value()) return true; if (s_mars_navy_fm != txt_mars_navy_fm->value()) return true; if (s_mars_navy_serno != txt_mars_navy_serno->value()) return true; if (s_mars_navy_to != txt_mars_navy_to->buffer()->text()) return true; if (s_mars_navy_info != txt_mars_navy_info->buffer()->text()) return true; if (s_mars_navy_subj != txt_mars_navy_subj->value()) return true; if (s_mars_navy_text != txt_mars_navy_text->buffer()->text()) return true; return false; } void update_mars_navyfields() { s_mars_navy_de = txt_mars_navy_de->value(); s_mars_navy_serno = txt_mars_navy_serno->value(); s_mars_navy_prec.clear(); s_mars_navy_prec = navy_precedent[sel_mars_navy_prec->index()]; s_mars_navy_dtg = txt_mars_navy_dtg->value(); s_mars_navy_fm = txt_mars_navy_fm->value(); s_mars_navy_to = txt_mars_navy_to->buffer()->text(); s_mars_navy_info = txt_mars_navy_info->buffer()->text(); s_mars_navy_subj = txt_mars_navy_subj->value(); s_mars_navy_text = txt_mars_navy_text->buffer()->text(); } void update_mars_navyform() { size_t n = strchr(navy_precedent, s_mars_navy_prec[0]) - navy_precedent; if (n < 0) n = 0; if (n > 4) n = 4; sel_mars_navy_prec->index(n); txt_mars_navy_de->value(s_mars_navy_de.c_str()); txt_mars_navy_serno->value(s_mars_navy_serno.c_str()); txt_mars_navy_dtg->value(s_mars_navy_dtg.c_str()); txt_mars_navy_fm->value(s_mars_navy_fm.c_str()); txt_mars_navy_to->add(s_mars_navy_to.c_str()); txt_mars_navy_info->add(s_mars_navy_info.c_str()); txt_mars_navy_subj->value(s_mars_navy_subj.c_str()); txt_mars_navy_text->add(s_mars_navy_text.c_str()); } void clear_mars_navy_form() { clear_mars_navyfields(); txt_mars_navy_de->value(""); txt_mars_navy_serno->value(""); sel_mars_navy_prec->index(0); txt_mars_navy_dtg->value(""); txt_mars_navy_fm->value(""); txt_mars_navy_to->clear(); txt_mars_navy_info->clear(); txt_mars_navy_subj->value(""); txt_mars_navy_text->clear(); } void make_buffmars_navy(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( mars_navy_de, s_mars_navy_de ) ); mbuff.append( lineout( mars_navy_serno, s_mars_navy_serno ) ); mbuff.append( lineout( mars_navy_prec, s_mars_navy_prec ) ); mbuff.append( lineout( mars_navy_dtg, s_mars_navy_dtg ) ); mbuff.append( lineout( mars_navy_fm, s_mars_navy_fm ) ); mbuff.append( lineout( mars_navy_to, s_mars_navy_to ) ); mbuff.append( lineout( mars_navy_info, s_mars_navy_info ) ); mbuff.append( lineout( mars_navy_subj, s_mars_navy_subj ) ); mbuff.append( lineout( mars_navy_text, s_mars_navy_text ) ); if (compress) compress_maybe(mbuff); buffmars_navy.append(mbuff); } void read_mars_navy_buffer(string data) { clear_mars_navyfields(); s_mars_navy_de = findstr( data, mars_navy_de ); s_mars_navy_serno = findstr( data, mars_navy_serno ); s_mars_navy_prec = findstr( data, mars_navy_prec ); s_mars_navy_dtg = findstr( data, mars_navy_dtg ); s_mars_navy_fm = findstr( data, mars_navy_fm ); s_mars_navy_to = findstr( data, mars_navy_to ); s_mars_navy_info = findstr( data, mars_navy_info ); s_mars_navy_subj = findstr( data, mars_navy_subj ); s_mars_navy_text = findstr( data, mars_navy_text ); update_mars_navyform(); } void cb_mars_navy_new() { if (check_mars_navyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_mars_navy_save(); } } clear_mars_navy_form(); def_mars_navy_filename = ICS_msg_dir; def_mars_navy_filename.append("new"FMARSNAVY_EXT); show_filename(def_mars_navy_filename); using_mars_navy_template = false; } void cb_mars_navy_import() { fl_alert2("Not implemented"); } void cb_mars_navy_export() { fl_alert2("Not implemented"); } void cb_mars_navy_wrap_import(string wrapfilename, string inpbuffer) { clear_mars_navy_form(); read_mars_navy_buffer(inpbuffer); def_mars_navy_filename = ICS_msg_dir; def_mars_navy_filename.append(wrapfilename); show_filename(def_mars_navy_filename); using_mars_navy_template = false; } int eval_mars_navy_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_mars_navy_filename).append("]"); update_mars_navyfields(); update_header(FROM); evalstr.append(header("<mars_navy>")); buffmars_navy.clear(); make_buffmars_navy(true); if (buffmars_navy.empty()) return 0; compress_maybe( buffmars_navy ); evalstr.append( buffmars_navy ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_mars_navy_wrap_export() { if (check_mars_navyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_navyfields(); if (base_mars_navy_filename == "new"FMARSNAVY_EXT || base_mars_navy_filename == "default"FMARSNAVY_EXT) if (!cb_mars_navy_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_mars_navy_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(true); export_wrapfile(base_mars_navy_filename, wrapfilename, buffmars_navy, pext != ".wrap"); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(false); write_mars_navy(def_mars_navy_filename); } } void cb_mars_navy_wrap_autosend() { if (check_mars_navyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_navyfields(); if (base_mars_navy_filename == "new"FMARSNAVY_EXT || base_mars_navy_filename == "default"FMARSNAVY_EXT) cb_mars_navy_save_as(); update_header(FROM); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(true); xfr_via_socket(base_mars_navy_filename, buffmars_navy); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(false); write_mars_navy(def_mars_navy_filename); } void cb_mars_navy_load_template() { string def_mars_navy_filename = def_mars_navy_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TMARSNAVY_EXT, def_mars_navy_filename.c_str()); if (p) { clear_mars_navy_form(); read_data_file(p); def_mars_navy_TemplateName = p; show_filename(def_mars_navy_TemplateName); using_mars_navy_template = true; } } void cb_mars_navy_save_template() { if (!using_mars_navy_template) { cb_mars_navy_save_as_template(); return; } string def_mars_navy_filename = def_mars_navy_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TMARSNAVY_EXT, def_mars_navy_filename.c_str()); if (p) { update_header(CHANGED); update_mars_navyfields(); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(); write_mars_navy(p); } } void cb_mars_navy_save_as_template() { string def_mars_navy_filename = def_mars_navy_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TMARSNAVY_EXT, def_mars_navy_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_mars_navy_TemplateName = p; if (strlen(pext) == 0) def_mars_navy_TemplateName.append(TMARSNAVY_EXT); remove_spaces_from_filename(def_mars_navy_TemplateName); clear_header(); update_header(CHANGED); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(); write_mars_navy(def_mars_navy_TemplateName); show_filename(def_mars_navy_TemplateName); using_mars_navy_template = true; } } void cb_mars_navy_open() { const char *p = FSEL::select(_("Open data file"), "ICS-mars_navy\t*"FMARSNAVY_EXT, def_mars_navy_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_mars_navy_form(); read_data_file(p); using_mars_navy_template = false; def_mars_navy_filename = p; show_filename(def_mars_navy_filename); } void write_mars_navy(string s) { FILE *filemars_navy = fopen(s.c_str(), "w"); if (!filemars_navy) return; fwrite(buffmars_navy.c_str(), buffmars_navy.length(), 1, filemars_navy); fclose(filemars_navy); } bool cb_mars_navy_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FMARSNAVY_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_mars_navy_filename; p = FSEL::saveas(_("Save data file"), "ICS-mars_navy\t*"FMARSNAVY_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_mars_navy_filename = p; if (strlen(pext) == 0) def_mars_navy_filename.append(FMARSNAVY_EXT); remove_spaces_from_filename(def_mars_navy_filename); update_header(NEW); update_mars_navyfields(); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(); write_mars_navy(def_mars_navy_filename); using_mars_navy_template = false; show_filename(def_mars_navy_filename); return true; } void cb_mars_navy_save() { if (base_mars_navy_filename == "new"FMARSNAVY_EXT || base_mars_navy_filename == "default"FMARSNAVY_EXT || using_mars_navy_template == true) { cb_mars_navy_save_as(); return; } if (check_mars_navyfields()) update_header(CHANGED); update_mars_navyfields(); buffmars_navy.assign(header("<mars_navy>")); make_buffmars_navy(); write_mars_navy(def_mars_navy_filename); using_mars_navy_template = false; } void cb_mars_navy_html() { string fname_name = fl_filename_name(def_mars_navy_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string mars_navy_fname = ICS_dir; mars_navy_fname.append(fname_name); mars_navy_fname.append(".html"); update_mars_navyfields(); string formmars_navy = mars_navy_html_template; replacestr(formmars_navy, TITLE, fname_name); string temp = s_mars_navy_prec; if (!s_mars_navy_de.empty()) { temp.assign("DE ").append(s_mars_navy_de).append(" "); if (!s_mars_navy_serno.empty()) { if (s_mars_navy_serno.length() < 4) temp.append(4-s_mars_navy_serno.length(),'0'); temp.append(s_mars_navy_serno); } temp.append("\n"); temp.append(s_mars_navy_prec); } replacestr(formmars_navy, mars_navy_prec, temp ); replacestr(formmars_navy, mars_navy_dtg, s_mars_navy_dtg ); replacestr(formmars_navy, mars_navy_fm, s_mars_navy_fm ); temp = s_mars_navy_to; if (!s_mars_navy_info.empty()) temp.append("\nINFO ").append(s_mars_navy_info); replacestr(formmars_navy, mars_navy_to, temp ); string text = ""; temp = ""; if (!s_mars_navy_subj.empty()) { temp = "SUBJ: "; temp.append(s_mars_navy_subj); temp = maxchars(temp, 69, 6); text = temp; text += '\n'; } temp = maxchars(s_mars_navy_text, 69); text.append(temp); replacestr(formmars_navy, mars_navy_text, text ); FILE *filemars_navy = fopen(mars_navy_fname.c_str(), "w"); fprintf(filemars_navy,"%s", formmars_navy.c_str()); fclose(filemars_navy); open_url(mars_navy_fname.c_str()); } void cb_mars_navy_msg_type() { if (tabs_msg_type->value() == tab_mars_navy ) { show_filename(def_mars_navy_filename); } else { show_filename(def_rg_filename); } } void cb_mars_navy_textout() { string mars_navy_fname = ICS_dir; mars_navy_fname.append("mars_navy.txt"); update_mars_navyfields(); string formmars_navy = mars_navy_text_template; string temp = s_mars_navy_prec; if (!s_mars_navy_de.empty()) { temp.assign("DE ").append(s_mars_navy_de).append(" "); if (!s_mars_navy_serno.empty()) { if (s_mars_navy_serno.length() < 4) temp.append(4-s_mars_navy_serno.length(),'0'); temp.append(s_mars_navy_serno); } temp.append("\n"); temp.append(s_mars_navy_prec); } replacestr(formmars_navy, mars_navy_prec, temp ); replacestr(formmars_navy, mars_navy_dtg, s_mars_navy_dtg ); replacestr(formmars_navy, mars_navy_fm, s_mars_navy_fm ); temp = s_mars_navy_to; if (!s_mars_navy_info.empty()) temp.append("\nINFO ").append(s_mars_navy_info); replacestr(formmars_navy, mars_navy_to, temp ); string text = ""; temp = ""; if (!s_mars_navy_subj.empty()) { temp = "SUBJ: "; temp.append(s_mars_navy_subj); temp = maxchars(temp, 69, 6); text = temp; text += '\n'; } temp = maxchars(s_mars_navy_text, 69); text.append(temp); replacestr(formmars_navy, mars_navy_text, text ); FILE *filemars_navy = fopen(mars_navy_fname.c_str(), "w"); fprintf(filemars_navy,"%s", formmars_navy.c_str()); fclose(filemars_navy); open_url(mars_navy_fname.c_str()); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_net_tab.cxx��������������������������������������������������������������0000664�0001750�0001750�00000032011�12330516146�014536� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_mars_net = (Fl_Group *)0; Fl_Tabs *tab_mars_net_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_net_1 = (Fl_Group *)0;// Fl_Input2 *txt_mars_net_DE = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_NBR = (Fl_Input2 *)0;// Fl_ListBox *sel_mars_net_PREC = (Fl_ListBox *)0;// Fl_Input2 *txt_mars_net_DTG = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_FMNAME = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_FMCALL = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_FMSTATE = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_TOPOS = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_TOCALL = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_TOSTATE = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_INFOPOS = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_INFOCALL = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_INFOSTATE = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_INCIDENT = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_DND = (Fl_Input2 *)0;// date net designator Fl_Input2 *txt_mars_net_NETCALL = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_DTGSTART = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_DTGEND = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_NETSB = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_NCSCALL = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_NBRSTAS = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_CALLS = (Fl_Input2 *)0;// Fl_Input2 *txt_mars_net_NBRMSGS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_net_COMMENTS = (Fl_Input2 *)0; Fl_Button *btn_mars_net_DE = (Fl_Button*)0; Fl_Button *btn_mars_net_DTG = (Fl_Button*)0; Fl_Button *btn_mars_net_pick_fm = (Fl_Button*)0; Fl_Button *btn_mars_net_pick_to = (Fl_Button*)0; Fl_Button *btn_mars_net_pick_INFO = (Fl_Button*)0; Fl_Button *btn_mars_net_pick_NETCALL = (Fl_Button*)0; Fl_Button *btn_mars_net_DTGSTART = (Fl_Button*)0; Fl_Button *btn_mars_net_DTGEND = (Fl_Button*)0; Fl_Button *btn_mars_net_pick_NCSCALL = (Fl_Button*)0; Fl_Button *btn_mars_net_add_calls = (Fl_Button*)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_net_2 = (Fl_Group *)0; // widget callbacks & support void cb_btn_mars_net_DE(Fl_Widget *w, void *d) { txt_mars_net_DE->value(progStatus.my_call.c_str()); } void cb_btn_mars_net_DTG(Fl_Widget *w, void *d) { txt_mars_net_DTG->value(szMarsDateTime()); } void cb_btn_mars_net_pick_fm(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_net_FMCALL->value(mars_list_call.c_str()); txt_mars_net_FMNAME->value(mars_list_lname.c_str()); txt_mars_net_FMSTATE->value(mars_list_state.c_str()); } void cb_btn_mars_net_pick_to(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_net_TOCALL->value(mars_list_bcall.c_str()); txt_mars_net_TOPOS->value(mars_list_position.c_str()); txt_mars_net_TOSTATE->value(mars_list_state.c_str()); } void cb_btn_mars_net_pick_INFO(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_net_INFOCALL->value(mars_list_bcall.c_str()); txt_mars_net_INFOPOS->value(mars_list_position.c_str()); txt_mars_net_INFOSTATE->value(mars_list_state.c_str()); } void cb_btn_mars_net_pick_NETCALL(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_net_NETCALL->value(mars_list_bcall.c_str()); } void cb_btn_mars_net_DTGSTART(Fl_Widget *w, void *d) { txt_mars_net_DTGSTART->value(szMarsDateTime()); } void cb_btn_mars_net_DTGEND(Fl_Widget *w, void *d) { txt_mars_net_DTGEND->value(szMarsDateTime()); } void cb_btn_mars_net_pick_NCSCALL(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_net_NCSCALL->value(mars_list_call.c_str()); } void cb_btn_mars_net_add_calls(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; string calls = txt_mars_net_CALLS->value(); if (calls.length() && (calls[calls.length()-1] != '\n')) calls.append(" "); calls.append(mars_list_call); txt_mars_net_CALLS->value(calls.c_str()); } //---------------------------------------------------------------------- void create_mars_net() { int Y = tab_top; tab_mars_net = new Fl_Group(0, Y, 570, 355); tab_mars_net->align(FL_ALIGN_TOP); tab_mars_net_type = new Fl_Tabs(0, Y+2, 570, 352); tab_mars_net_type->selection_color((Fl_Color)246); tab_mars_net_1 = new Fl_Group(0, Y+25, 570, 325, _("Header")); Y += 30; txt_mars_net_DE = new Fl_Input2(100, Y, 150, 24, _("DE")); txt_mars_net_DE->tooltip(_("")); txt_mars_net_DE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_DE->when(FL_WHEN_CHANGED); btn_mars_net_DE = new Fl_Button(252, Y, 30, 24, _("ME")); btn_mars_net_DE->callback((Fl_Callback*)cb_btn_mars_net_DE); txt_mars_net_NBR = new Fl_Input2(370, Y, 150, 24, _("MSG NBR")); txt_mars_net_NBR->tooltip(_("")); txt_mars_net_NBR->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_NBR->when(FL_WHEN_CHANGED); Y += 25; sel_mars_net_PREC = new Fl_ListBox(100, Y, 45, 24, _("PREC")); sel_mars_net_PREC->tooltip( _("R - Routine\nP - Priority\nO - Immediate\nZ - Flash")); sel_mars_net_PREC->add("R|P|O|Z"); sel_mars_net_PREC->align(FL_ALIGN_LEFT); sel_mars_net_PREC->index(0); txt_mars_net_DTG = new Fl_Input2(185, Y, 150, 24, _("DTG")); txt_mars_net_DTG->tooltip(_("")); btn_mars_net_DTG = new Fl_Button(335, Y, 22, 24, _("...")); btn_mars_net_DTG->tooltip(_("Set Date/Time Group")); btn_mars_net_DTG->callback((Fl_Callback*)cb_btn_mars_net_DTG); Y += 25; txt_mars_net_FMNAME = new Fl_Input2(100, Y, 150, 24, _("FM")); txt_mars_net_FMNAME->tooltip(_("Name")); txt_mars_net_FMNAME->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_FMNAME->when(FL_WHEN_CHANGED); txt_mars_net_FMCALL = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_net_FMCALL->tooltip(_("Call")); txt_mars_net_FMCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_FMCALL->when(FL_WHEN_CHANGED); txt_mars_net_FMSTATE = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_net_FMSTATE->tooltip(_("State")); txt_mars_net_FMSTATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_FMSTATE->when(FL_WHEN_CHANGED); btn_mars_net_pick_fm = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_net_pick_fm->tooltip(_("Select from list")); btn_mars_net_pick_fm->callback((Fl_Callback*)cb_btn_mars_net_pick_fm); Y += 25; txt_mars_net_TOPOS = new Fl_Input2(100, Y, 150, 24, _("TO")); txt_mars_net_TOPOS->tooltip(_("Position")); txt_mars_net_TOPOS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_TOPOS->when(FL_WHEN_CHANGED); txt_mars_net_TOCALL = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_net_TOCALL->tooltip(_("Call")); txt_mars_net_TOCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_TOCALL->when(FL_WHEN_CHANGED); txt_mars_net_TOSTATE = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_net_TOSTATE->tooltip(_("State")); txt_mars_net_TOSTATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_TOSTATE->when(FL_WHEN_CHANGED); btn_mars_net_pick_to = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_net_pick_to->tooltip(_("Select from list")); btn_mars_net_pick_to->callback((Fl_Callback*)cb_btn_mars_net_pick_to); Y += 25; txt_mars_net_INFOPOS = new Fl_Input2(100, Y, 150, 24, _("INFO")); txt_mars_net_INFOPOS->tooltip(_("Position")); txt_mars_net_INFOPOS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_INFOPOS->when(FL_WHEN_CHANGED); txt_mars_net_INFOCALL = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_net_INFOCALL->tooltip(_("Call")); txt_mars_net_INFOCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_INFOCALL->when(FL_WHEN_CHANGED); txt_mars_net_INFOSTATE = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_net_INFOSTATE->tooltip(_("State")); txt_mars_net_INFOSTATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_INFOSTATE->when(FL_WHEN_CHANGED); btn_mars_net_pick_INFO = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_net_pick_INFO->tooltip(_("Select from list")); btn_mars_net_pick_INFO->callback((Fl_Callback*)cb_btn_mars_net_pick_INFO); Y += 49; txt_mars_net_INCIDENT = new Fl_Input2(100, Y, 450, 24, _("INCIDENT")); txt_mars_net_INCIDENT->tooltip(_("Incident\nleave blank for normal ops")); txt_mars_net_INCIDENT->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_INCIDENT->when(FL_WHEN_CHANGED); Y += 49; txt_mars_net_DND = new Fl_Input2(100, Y, 80, 24, _("NET REPORT")); txt_mars_net_DND->tooltip(_("date net designator")); txt_mars_net_DND->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_DND->when(FL_WHEN_CHANGED); tab_mars_net_1->end(); tab_mars_net_2 = new Fl_Group(0, 95, 570, 325, _("Body")); Y = 100; Fl_Box *label = new Fl_Box(40, Y, 40, 24, "1."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_NETCALL = new Fl_Input2(40, Y, 150, 24, ""); txt_mars_net_NETCALL->tooltip(_("net call")); txt_mars_net_NETCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_NETCALL->when(FL_WHEN_CHANGED); btn_mars_net_pick_NETCALL = new Fl_Button(192, Y, 30, 24, _("List")); btn_mars_net_pick_NETCALL->tooltip(_("Select from list")); btn_mars_net_pick_NETCALL->callback((Fl_Callback*)cb_btn_mars_net_pick_NETCALL); Y += 25; label = new Fl_Box(40, Y, 40, 24, "2."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_DTGSTART = new Fl_Input2(40, Y, 150, 24, ""); txt_mars_net_DTGSTART->tooltip(_("DTG start")); btn_mars_net_DTGSTART = new Fl_Button(192, Y, 22, 24, _("...")); btn_mars_net_DTGSTART->tooltip(_("Set Date/Time Group")); btn_mars_net_DTGSTART->callback((Fl_Callback*)cb_btn_mars_net_DTGSTART); txt_mars_net_DTGEND = new Fl_Input2(220, Y, 150, 24, _("")); txt_mars_net_DTGEND->tooltip(_("DTG end")); btn_mars_net_DTGEND = new Fl_Button(372, Y, 22, 24, _("...")); btn_mars_net_DTGEND->tooltip(_("Set Date/Time Group")); btn_mars_net_DTGEND->callback((Fl_Callback*)cb_btn_mars_net_DTGEND); Y += 25; label = new Fl_Box(40, Y, 40, 24, "3."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_NETSB = new Fl_Input2(40, Y, 80, 24, ""); txt_mars_net_NETSB->tooltip(_("USB / LSB")); txt_mars_net_NETSB->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_NETSB->when(FL_WHEN_CHANGED); Y += 25; label = new Fl_Box(40, Y, 40, 24, "4."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_NCSCALL = new Fl_Input2(40, Y, 150, 24, ""); txt_mars_net_NCSCALL->tooltip(_("net call")); txt_mars_net_NCSCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_NCSCALL->when(FL_WHEN_CHANGED); btn_mars_net_pick_NCSCALL = new Fl_Button(192, Y, 30, 24, _("List")); btn_mars_net_pick_NCSCALL->tooltip(_("Select from list")); btn_mars_net_pick_NCSCALL->callback((Fl_Callback*)cb_btn_mars_net_pick_NCSCALL); Y += 25; label = new Fl_Box(40, Y, 40, 24, "5."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_NBRSTAS = new Fl_Input2(40, Y, 120, 24, ""); txt_mars_net_NBRSTAS->tooltip(_("# stations IN NET")); btn_mars_net_add_calls = new Fl_Button(480, Y, 80, 24, _("Add Call")); btn_mars_net_add_calls->tooltip(_("Add from list")); btn_mars_net_add_calls->callback((Fl_Callback*)cb_btn_mars_net_add_calls); Y += 25; txt_mars_net_CALLS = new Fl_Input2(40, Y, 520, 72, ""); txt_mars_net_CALLS->tooltip(_("Station calls\nstarting with alternate NCS")); txt_mars_net_CALLS->type(4); txt_mars_net_CALLS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_CALLS->when(FL_WHEN_CHANGED); Y += 73; label = new Fl_Box(40, Y, 40, 24, "6."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); label = new Fl_Box(40, Y, 2, 24, "N/A"); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT); Y += 25; label = new Fl_Box(40, Y, 40, 24, "7. A."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_NBRMSGS = new Fl_Input2(40, Y, 120, 24, ""); txt_mars_net_NBRMSGS->tooltip(_("# messages")); Y += 25; label = new Fl_Box(40, Y, 40, 24, "B."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT); txt_mars_net_COMMENTS = new Fl_Input2(40, Y, 520, 72, ""); txt_mars_net_COMMENTS->tooltip(_("Comments")); txt_mars_net_COMMENTS->type(4); txt_mars_net_COMMENTS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_net_COMMENTS->when(FL_WHEN_CHANGED); tab_mars_net_2->end(); // tab_mars_type->end(); tab_mars_net->end(); tab_mars_net->hide(); }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_army.cxx�����������������������������������������������������������������0000664�0001750�0001750�00000037544�12330516146�014112� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; const char army_precedent[] = "RPOZM"; string mars_army_de = ":de:"; string mars_army_nbr = ":nbr:"; string mars_army_prec = ":pre:"; string mars_army_dtg = ":dtg:"; string mars_army_fm = ":fm:"; string mars_army_to = ":to:"; string mars_army_info = ":info:"; string mars_army_subj = ":subj:"; string mars_army_text = ":text:"; string s_mars_army_de; string s_mars_army_nbr; string s_mars_army_prec = "R"; string s_mars_army_dtg; string s_mars_army_fm; string s_mars_army_to; string s_mars_army_subj; string s_mars_army_info; string s_mars_army_text; string buffmars_army; string def_mars_army_filename = ""; string base_mars_army_filename = ""; string def_mars_army_TemplateName = ""; bool using_mars_army_template = false; void clear_mars_armyfields() { s_mars_army_prec = "R"; s_mars_army_dtg.clear(); s_mars_army_fm.clear(); s_mars_army_de.clear(); s_mars_army_nbr.clear(); s_mars_army_to.clear(); s_mars_army_subj.clear(); s_mars_army_info.clear(); s_mars_army_text.clear(); } bool check_mars_armyfields() { string temp; temp = army_precedent[sel_mars_army_prec->index()]; if (s_mars_army_prec != temp) return true; if (s_mars_army_dtg != txt_mars_army_dtg->value()) return true; if (s_mars_army_fm != txt_mars_army_fm->value()) return true; if (s_mars_army_de != txt_mars_army_de->value()) return true; if (s_mars_army_nbr != txt_mars_army_nbr->value()) return true; if (s_mars_army_to != txt_mars_army_to->buffer()->text()) return true; if (s_mars_army_info != txt_mars_army_info->buffer()->text()) return true; if (s_mars_army_subj != txt_mars_army_subj->value()) return true; if (s_mars_army_text != txt_mars_army_text->buffer()->text()) return true; return false; } void update_mars_armyfields() { s_mars_army_prec.clear(); s_mars_army_prec = army_precedent[sel_mars_army_prec->index()]; s_mars_army_dtg = txt_mars_army_dtg->value(); s_mars_army_fm = txt_mars_army_fm->value(); s_mars_army_de = txt_mars_army_de->value(); s_mars_army_nbr = txt_mars_army_nbr->value(); s_mars_army_to = txt_mars_army_to->buffer()->text(); s_mars_army_info = txt_mars_army_info->buffer()->text(); s_mars_army_subj = txt_mars_army_subj->value(); s_mars_army_text = txt_mars_army_text->buffer()->text(); striplf (s_mars_army_dtg); striplf (s_mars_army_de); striplf (s_mars_army_fm); striplf (s_mars_army_nbr); striplf (s_mars_army_to); striplf (s_mars_army_info); striplf (s_mars_army_subj); striplf (s_mars_army_text); } void update_mars_armyform() { size_t n = strchr(army_precedent, s_mars_army_prec[0]) - army_precedent; if (n < 0) n = 0; if (n > 4) n = 4; sel_mars_army_prec->index(n); txt_mars_army_dtg->value(s_mars_army_dtg.c_str()); txt_mars_army_fm->value(s_mars_army_fm.c_str()); txt_mars_army_de->value(s_mars_army_de.c_str()); txt_mars_army_nbr->value(s_mars_army_nbr.c_str()); txt_mars_army_to->add(s_mars_army_to.c_str()); txt_mars_army_info->add(s_mars_army_info.c_str()); txt_mars_army_subj->value(s_mars_army_subj.c_str()); txt_mars_army_text->add(s_mars_army_text.c_str()); } void clear_mars_army_form() { clear_mars_armyfields(); sel_mars_army_prec->index(0); txt_mars_army_dtg->value(""); txt_mars_army_fm->value(""); txt_mars_army_de->value(""); txt_mars_army_nbr->value(""); txt_mars_army_to->clear(); txt_mars_army_info->clear(); txt_mars_army_subj->value(""); txt_mars_army_text->clear(); } void make_buffmars_army(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( mars_army_prec, s_mars_army_prec ) ); mbuff.append( lineout( mars_army_dtg, s_mars_army_dtg ) ); mbuff.append( lineout( mars_army_fm, s_mars_army_fm ) ); mbuff.append( lineout( mars_army_de, s_mars_army_de ) ); mbuff.append( lineout( mars_army_nbr, s_mars_army_nbr ) ); mbuff.append( lineout( mars_army_to, s_mars_army_to ) ); mbuff.append( lineout( mars_army_info, s_mars_army_info ) ); mbuff.append( lineout( mars_army_subj, s_mars_army_subj ) ); mbuff.append( lineout( mars_army_text, s_mars_army_text ) ); if (compress) compress_maybe(mbuff); buffmars_army.append(mbuff); } void read_mars_army_buffer(string data) { clear_mars_armyfields(); // search the file buffer for each of the mars_army fields s_mars_army_prec = findstr( data, mars_army_prec ); s_mars_army_dtg = findstr( data, mars_army_dtg ); s_mars_army_fm = findstr( data, mars_army_fm ); s_mars_army_de = findstr( data, mars_army_de ); s_mars_army_nbr = findstr( data, mars_army_nbr ); s_mars_army_to = findstr( data, mars_army_to ); s_mars_army_info = findstr( data, mars_army_info ); s_mars_army_subj = findstr( data, mars_army_subj ); s_mars_army_text = findstr( data, mars_army_text ); update_mars_armyform(); } void cb_mars_army_new() { if (check_mars_armyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_mars_army_save(); } } clear_mars_army_form(); def_mars_army_filename = ICS_msg_dir; def_mars_army_filename.append("new"FMARSARMY_EXT); show_filename(def_mars_army_filename); using_mars_army_template = false; } void cb_mars_army_import() { fl_alert2("Not implemented"); } void cb_mars_army_export() { fl_alert2("Not implemented"); } void cb_mars_army_wrap_import(string wrapfilename, string inpbuffer) { clear_mars_army_form(); read_mars_army_buffer(inpbuffer); def_mars_army_filename = ICS_msg_dir; def_mars_army_filename.append(wrapfilename); show_filename(def_mars_army_filename); using_mars_army_template = false; } int eval_mars_army_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_mars_army_filename).append("]"); update_mars_armyfields(); update_header(FROM); evalstr.append(header("<mars_army>")); buffmars_army.clear(); make_buffmars_army(true); if (buffmars_army.empty()) return 0; compress_maybe( buffmars_army ); evalstr.append( buffmars_army ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_mars_army_wrap_export() { if (check_mars_armyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_armyfields(); if (base_mars_army_filename == "new"FMARSARMY_EXT || base_mars_army_filename == "default"FMARSARMY_EXT) if (!cb_mars_army_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_mars_army_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(true); export_wrapfile(base_mars_army_filename, wrapfilename, buffmars_army, pext != ".wrap"); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(false); write_mars_army(def_mars_army_filename); } } void cb_mars_army_wrap_autosend() { if (check_mars_armyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_armyfields(); if (base_mars_army_filename == "new"FMARSARMY_EXT || base_mars_army_filename == "default"FMARSARMY_EXT) if (!cb_mars_army_save_as()) return; update_header(FROM); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(true); xfr_via_socket(base_mars_army_filename, buffmars_army); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(false); write_mars_army(def_mars_army_filename); } void cb_mars_army_load_template() { string def_mars_army_filename = def_mars_army_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TMARSARMY_EXT, def_mars_army_filename.c_str()); if (p) { clear_mars_army_form(); read_data_file(p); def_mars_army_TemplateName = p; show_filename(def_mars_army_TemplateName); using_mars_army_template = true; } } void cb_mars_army_save_template() { if (!using_mars_army_template) { cb_mars_army_save_as_template(); return; } string def_mars_army_filename = def_mars_army_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TMARSARMY_EXT, def_mars_army_filename.c_str()); if (p) write_mars_army(p); if (p) { update_header(CHANGED); update_mars_armyfields(); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(); write_mars_army(p); } } void cb_mars_army_save_as_template() { string def_mars_army_filename = def_mars_army_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TMARSARMY_EXT, def_mars_army_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_mars_army_TemplateName = p; if (strlen(pext) == 0) def_mars_army_TemplateName.append(TMARSARMY_EXT); remove_spaces_from_filename(def_mars_army_TemplateName); clear_header(); update_header(CHANGED); update_mars_armyfields(); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(); write_mars_army(def_mars_army_TemplateName); show_filename(def_mars_army_TemplateName); using_mars_army_template = true; } } void cb_mars_army_open() { const char *p = FSEL::select(_("Open data file"), "ICS-mars_army\t*"FMARSARMY_EXT, def_mars_army_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_mars_army_form(); read_data_file(p); using_mars_army_template = false; def_mars_army_filename = p; show_filename(def_mars_army_filename); } void write_mars_army(string s) { FILE *filemars_army = fopen(s.c_str(), "w"); if (!filemars_army) return; make_buffmars_army(); fwrite(buffmars_army.c_str(), buffmars_army.length(), 1, filemars_army); fclose(filemars_army); } bool cb_mars_army_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FMARSARMY_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_mars_army_filename; p = FSEL::saveas(_("Save data file"), "ICS-mars_army\t*"FMARSARMY_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_mars_army_filename = p; if (strlen(pext) == 0) def_mars_army_filename.append(FMARSARMY_EXT); remove_spaces_from_filename(def_mars_army_filename); update_header(NEW); update_mars_armyfields(); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(); write_mars_army(def_mars_army_filename); using_mars_army_template = false; show_filename(def_mars_army_filename); return true; } void cb_mars_army_save() { if (base_mars_army_filename == "new"FMARSARMY_EXT || base_mars_army_filename == "default"FMARSARMY_EXT || using_mars_army_template == true) { cb_mars_army_save_as(); return; } if (check_mars_armyfields()) update_header(CHANGED); update_mars_armyfields(); buffmars_army.assign(header("<mars_army>")); make_buffmars_army(); write_mars_army(def_mars_army_filename); using_mars_army_template = false; } void cb_mars_army_html() { string fname_name = fl_filename_name(def_mars_army_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string mars_army_fname = ICS_dir; mars_army_fname.append(fname_name); mars_army_fname.append(".html"); update_mars_armyfields(); string formmars_army = mars_army_html_template; replacestr(formmars_army, TITLE, fname_name); replacestr(formmars_army, mars_army_prec, s_mars_army_prec ); replacestr(formmars_army, mars_army_dtg, s_mars_army_dtg ); replacestr(formmars_army, mars_army_fm, s_mars_army_fm ); replacestr(formmars_army, mars_army_de, s_mars_army_de ); replacestr(formmars_army, mars_army_nbr, s_mars_army_nbr ); replacestr(formmars_army, mars_army_to, s_mars_army_to ); if (s_mars_army_info.empty()) { size_t p = formmars_army.find("INFO"); size_t p2 = formmars_army.find('\n', p); formmars_army.erase(p, p2 - p + 1); } else replacestr(formmars_army, mars_army_info, s_mars_army_info ); string text = ""; string temp = ""; if (!s_mars_army_subj.empty()) { temp = "SUBJ: "; temp.append(s_mars_army_subj); temp = maxchars(temp, 69, 6); text = temp; text += '\n'; } temp = maxchars(s_mars_army_text, 69); text.append(temp); replacestr(formmars_army, mars_army_text, text ); FILE *filemars_army = fopen(mars_army_fname.c_str(), "w"); fprintf(filemars_army,"%s", formmars_army.c_str()); fclose(filemars_army); open_url(mars_army_fname.c_str()); } void cb_mars_army_msg_type() { if (tabs_msg_type->value() == tab_mars_army ) { show_filename(def_mars_army_filename); } else { show_filename(def_rg_filename); } } void cb_mars_army_textout() { string mars_army_fname = ICS_dir; mars_army_fname.append("mars_army.txt"); update_mars_armyfields(); string formmars_army = mars_army_text_template; replacestr(formmars_army, mars_army_prec, s_mars_army_prec ); replacestr(formmars_army, mars_army_dtg, s_mars_army_dtg ); replacestr(formmars_army, mars_army_fm, s_mars_army_fm ); replacestr(formmars_army, mars_army_de, s_mars_army_de ); replacestr(formmars_army, mars_army_nbr, s_mars_army_nbr ); replacestr(formmars_army, mars_army_to, s_mars_army_to ); if (s_mars_army_info.empty()) { size_t p = formmars_army.find("INFO"); size_t p2 = formmars_army.find('\n', p); formmars_army.erase(p, p2 - p + 1); } else replacestr(formmars_army, mars_army_info, s_mars_army_info ); string text = ""; string temp = ""; if (!s_mars_army_subj.empty()) { temp = "SUBJ: "; temp.append(s_mars_army_subj); temp = maxchars(temp, 69, 6); text = temp; text += '\n'; } temp = maxchars(s_mars_army_text, 69); text.append(temp); replacestr(formmars_army, mars_army_text, text ); FILE *filemars_army = fopen(mars_army_fname.c_str(), "w"); fprintf(filemars_army,"%s", formmars_army.c_str()); fclose(filemars_army); open_url(mars_army_fname.c_str()); } ������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_ineei_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000066530�12330516146�015056� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Hold_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_mars_ineei = (Fl_Group *)0; Fl_Tabs *tab_mars_ineei_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_ineei_1 = (Fl_Group *)0; Fl_Input2 *txt_mars_ineei_DE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_NBR = (Fl_Input2 *)0; Fl_ListBox *sel_mars_ineei_PREC = (Fl_ListBox *)0; Fl_Input2 *txt_mars_ineei_DTG = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_FMNAME = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_FMCALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_FMSTATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_TOPOS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_TOCALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_TOSTATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO1POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO1CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO1STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO2POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO2CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO2STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO3POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO3CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO3STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO4POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO4CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO4STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO5POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO5CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO5STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO6POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO6CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO6STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO7POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO7CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO7STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO8POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO8CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO8STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO9POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO9CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO9STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO10POS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO10CALL = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INFO10STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_INCIDENT = (Fl_Input2 *)0; Fl_Button *btn_mars_ineei_DE = (Fl_Button*)0; Fl_Button *btn_mars_ineei_DTG = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_fm = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_to = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO1 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO2 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO3 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO4 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO5 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO6 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO7 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO8 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO9 = (Fl_Button*)0; Fl_Button *btn_mars_ineei_pick_INFO10 = (Fl_Button*)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_ineei_2 = (Fl_Group *)0; Fl_Input2 *txt_mars_ineei_REF = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_STATE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1A_INCIDENT = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1A_LOCATION = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1A_TIME = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1B_MEDFACSTS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1C_TRNPSTS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1D_DAMAGE = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1E_UTILSTS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1F_COMMSTS = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1G_INFOSRC = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1G_INFOTIME = (Fl_Input2 *)0; Fl_Input2 *txt_mars_ineei_1H_REMARKS = (Fl_Input2 *)0; //---------------------------------------------------------------------- // widget callbacks & support void cb_btn_mars_ineei_DE(Fl_Widget *w, void *d) { txt_mars_ineei_DE->value(progStatus.my_call.c_str()); } void cb_btn_mars_ineei_DTG(Fl_Widget *w, void *d) { txt_mars_ineei_DTG->value(szMarsDateTime()); } void cb_btn_mars_ineei_pick_fm(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_ineei_FMCALL->value(mars_list_call.c_str()); txt_mars_ineei_FMNAME->value(mars_list_lname.c_str()); txt_mars_ineei_FMSTATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_to(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_TOCALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_TOCALL->value(mars_list_call.c_str()); txt_mars_ineei_TOPOS->value(mars_list_position.c_str()); txt_mars_ineei_TOSTATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO1(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO1CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO1CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO1POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO1STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO2(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO2CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO2CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO2POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO2STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO3(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO3CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO3CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO3POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO3STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO4(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO4CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO4CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO4POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO4STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO5(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO5CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO5CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO5POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO5STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO6(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO6CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO6CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO6POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO6STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO7(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO7CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO7CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO7POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO7STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO8(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO8CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO8CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO8POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO8STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO9(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO9CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO9CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO9POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO9STATE->value(mars_list_state.c_str()); } void cb_btn_mars_ineei_pick_INFO10(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; if (!mars_list_bcall.empty()) txt_mars_ineei_INFO10CALL->value(mars_list_bcall.c_str()); else txt_mars_ineei_INFO10CALL->value(mars_list_call.c_str()); txt_mars_ineei_INFO10POS->value(mars_list_position.c_str()); txt_mars_ineei_INFO10STATE->value(mars_list_state.c_str()); } //---------------------------------------------------------------------- void create_mars_ineei() { int Y = tab_top; tab_mars_ineei = new Fl_Group(0, Y, 570, 390); tab_mars_ineei->align(FL_ALIGN_TOP); tab_mars_ineei_type = new Fl_Tabs(0, Y+2, 570, 387); tab_mars_ineei_type->selection_color((Fl_Color)246); //-----------tab 1------------- tab_mars_ineei_1 = new Fl_Group(0, Y+25, 570, 360, _("Header")); Y += 36; txt_mars_ineei_DE = new Fl_Input2(80, Y, 150, 20, _("DE")); txt_mars_ineei_DE->tooltip(_("")); txt_mars_ineei_DE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_DE->when(FL_WHEN_CHANGED); btn_mars_ineei_DE = new Fl_Button(232, Y, 30, 20, _("ME")); btn_mars_ineei_DE->callback((Fl_Callback*)cb_btn_mars_ineei_DE); txt_mars_ineei_NBR = new Fl_Input2(350, Y, 150, 20, _("MSG NBR")); txt_mars_ineei_NBR->tooltip(_("")); txt_mars_ineei_NBR->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_NBR->when(FL_WHEN_CHANGED); Y += 22; sel_mars_ineei_PREC = new Fl_ListBox(80, Y, 45, 20, _("PREC")); sel_mars_ineei_PREC->tooltip( _("R - Routine\nP - Priority\nO - Immediate\nZ - Flash")); sel_mars_ineei_PREC->add("R|P|O|Z"); sel_mars_ineei_PREC->align(FL_ALIGN_LEFT); sel_mars_ineei_PREC->index(0); txt_mars_ineei_DTG = new Fl_Input2(165, Y, 150, 20, _("DTG")); txt_mars_ineei_DTG->tooltip(_("")); btn_mars_ineei_DTG = new Fl_Button(315, Y, 22, 20, _("...")); btn_mars_ineei_DTG->tooltip(_("Set Date/Time Group")); btn_mars_ineei_DTG->callback((Fl_Callback*)cb_btn_mars_ineei_DTG); Y += 22; txt_mars_ineei_FMNAME = new Fl_Input2(80, Y, 150, 20, _("FM")); txt_mars_ineei_FMNAME->tooltip(_("Name")); txt_mars_ineei_FMNAME->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_FMNAME->when(FL_WHEN_CHANGED); txt_mars_ineei_FMCALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_FMCALL->tooltip(_("Call")); txt_mars_ineei_FMCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_FMCALL->when(FL_WHEN_CHANGED); txt_mars_ineei_FMSTATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_FMSTATE->tooltip(_("State")); txt_mars_ineei_FMSTATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_FMSTATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_fm = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_fm->tooltip(_("Select from list")); btn_mars_ineei_pick_fm->callback((Fl_Callback*)cb_btn_mars_ineei_pick_fm); Y += 22; txt_mars_ineei_TOPOS = new Fl_Input2(80, Y, 150, 20, _("TO")); txt_mars_ineei_TOPOS->tooltip(_("Position")); txt_mars_ineei_TOPOS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_TOPOS->when(FL_WHEN_CHANGED); txt_mars_ineei_TOCALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_TOCALL->tooltip(_("Call")); txt_mars_ineei_TOCALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_TOCALL->when(FL_WHEN_CHANGED); txt_mars_ineei_TOSTATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_TOSTATE->tooltip(_("State")); txt_mars_ineei_TOSTATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_TOSTATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_to = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_to->tooltip(_("Select from list")); btn_mars_ineei_pick_to->callback((Fl_Callback*)cb_btn_mars_ineei_pick_to); Y += 22; txt_mars_ineei_INFO1POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO1POS->tooltip(_("Position")); txt_mars_ineei_INFO1POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO1POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO1CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO1CALL->tooltip(_("Call")); txt_mars_ineei_INFO1CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO1CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO1STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO1STATE->tooltip(_("State")); txt_mars_ineei_INFO1STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO1STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO1 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO1->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO1->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO1); Y += 22; txt_mars_ineei_INFO2POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO2POS->tooltip(_("Position")); txt_mars_ineei_INFO2POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO2POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO2CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO2CALL->tooltip(_("Call")); txt_mars_ineei_INFO2CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO2CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO2STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO2STATE->tooltip(_("State")); txt_mars_ineei_INFO2STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO2STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO2 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO2->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO2->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO2); Y += 22; txt_mars_ineei_INFO3POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO3POS->tooltip(_("Position")); txt_mars_ineei_INFO3POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO3POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO3CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO3CALL->tooltip(_("Call")); txt_mars_ineei_INFO3CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO3CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO3STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO3STATE->tooltip(_("State")); txt_mars_ineei_INFO3STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO3STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO3 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO3->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO3->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO3); Y += 22; txt_mars_ineei_INFO4POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO4POS->tooltip(_("Position")); txt_mars_ineei_INFO4POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO4POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO4CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO4CALL->tooltip(_("Call")); txt_mars_ineei_INFO4CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO4CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO4STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO4STATE->tooltip(_("State")); txt_mars_ineei_INFO4STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO4STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO4 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO4->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO4->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO4); Y += 22; txt_mars_ineei_INFO5POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO5POS->tooltip(_("Position")); txt_mars_ineei_INFO5POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO5POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO5CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO5CALL->tooltip(_("Call")); txt_mars_ineei_INFO5CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO5CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO5STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO5STATE->tooltip(_("State")); txt_mars_ineei_INFO5STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO5STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO5 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO5->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO5->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO5); Y += 22; txt_mars_ineei_INFO6POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO6POS->tooltip(_("Position")); txt_mars_ineei_INFO6POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO6POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO6CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO6CALL->tooltip(_("Call")); txt_mars_ineei_INFO6CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO6CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO6STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO6STATE->tooltip(_("State")); txt_mars_ineei_INFO6STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO6STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO6 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO6->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO6->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO6); Y += 22; txt_mars_ineei_INFO7POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO7POS->tooltip(_("Position")); txt_mars_ineei_INFO7POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO7POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO7CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO7CALL->tooltip(_("Call")); txt_mars_ineei_INFO7CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO7CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO7STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO7STATE->tooltip(_("State")); txt_mars_ineei_INFO7STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO7STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO7 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO7->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO7->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO7); Y += 22; txt_mars_ineei_INFO8POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO8POS->tooltip(_("Position")); txt_mars_ineei_INFO8POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO8POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO8CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO8CALL->tooltip(_("Call")); txt_mars_ineei_INFO8CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO8CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO8STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO8STATE->tooltip(_("State")); txt_mars_ineei_INFO8STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO8STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO8 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO8->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO8->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO8); Y += 22; txt_mars_ineei_INFO9POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO9POS->tooltip(_("Position")); txt_mars_ineei_INFO9POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO9POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO9CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO9CALL->tooltip(_("Call")); txt_mars_ineei_INFO9CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO9CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO9STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO9STATE->tooltip(_("State")); txt_mars_ineei_INFO9STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO9STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO9 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO9->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO9->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO9); Y += 22; txt_mars_ineei_INFO10POS = new Fl_Input2(80, Y, 150, 20, _("INFO")); txt_mars_ineei_INFO10POS->tooltip(_("Position")); txt_mars_ineei_INFO10POS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO10POS->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO10CALL = new Fl_Input2(232, Y, 150, 20, _("")); txt_mars_ineei_INFO10CALL->tooltip(_("Call")); txt_mars_ineei_INFO10CALL->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO10CALL->when(FL_WHEN_CHANGED); txt_mars_ineei_INFO10STATE = new Fl_Input2(384, Y, 30, 20, _("")); txt_mars_ineei_INFO10STATE->tooltip(_("State")); txt_mars_ineei_INFO10STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INFO10STATE->when(FL_WHEN_CHANGED); btn_mars_ineei_pick_INFO10 = new Fl_Button(416, Y, 30, 20, _("List")); btn_mars_ineei_pick_INFO10->tooltip(_("Select from list")); btn_mars_ineei_pick_INFO10->callback((Fl_Callback*)cb_btn_mars_ineei_pick_INFO10); Y += 34; txt_mars_ineei_INCIDENT = new Fl_Input2(80, Y, 450, 20, _("INCIDENT")); txt_mars_ineei_INCIDENT->tooltip(_("Incident\nleave blank for normal ops")); txt_mars_ineei_INCIDENT->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_INCIDENT->when(FL_WHEN_CHANGED); tab_mars_ineei_1->end(); //-----------tab 2------------- Y = tab_top; tab_mars_ineei_2 = new Fl_Group(0, Y+25, 570, 360, _("Body")); Fl_Box *label = (Fl_Box *)0; Y += 30; label = new Fl_Box(0, Y, 28, 20, "1."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); txt_mars_ineei_REF = new Fl_Input2(80, Y, 160, 20, "REF"); txt_mars_ineei_REF->tooltip("Use appropriate event identifier"); txt_mars_ineei_REF->align(FL_ALIGN_LEFT); txt_mars_ineei_REF->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_REF->when(FL_WHEN_CHANGED); txt_mars_ineei_STATE = new Fl_Input2(280, Y, 40, 20, "ST"); txt_mars_ineei_STATE->tooltip("State"); txt_mars_ineei_STATE->align(FL_ALIGN_LEFT); txt_mars_ineei_STATE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_STATE->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "A."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1A_INCIDENT = new Fl_Input2(80, Y, 160, 20, "INC"); txt_mars_ineei_1A_INCIDENT->tooltip("Incident"); txt_mars_ineei_1A_INCIDENT->align(FL_ALIGN_LEFT); txt_mars_ineei_1A_INCIDENT->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1A_INCIDENT->when(FL_WHEN_CHANGED); txt_mars_ineei_1A_LOCATION = new Fl_Input2(280, Y, 160, 20, "LOC"); txt_mars_ineei_1A_LOCATION->tooltip("Incident Location"); txt_mars_ineei_1A_LOCATION->align(FL_ALIGN_LEFT); txt_mars_ineei_1A_LOCATION->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1A_LOCATION->when(FL_WHEN_CHANGED); txt_mars_ineei_1A_TIME = new Fl_Input2(480, Y, 80, 20, "TIME"); txt_mars_ineei_1A_TIME->tooltip("Incident time"); txt_mars_ineei_1A_TIME->align(FL_ALIGN_LEFT); txt_mars_ineei_1A_TIME->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1A_TIME->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "B."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1B_MEDFACSTS = new Fl_Input2(80, Y, 480, 20, "MED"); txt_mars_ineei_1B_MEDFACSTS->align(FL_ALIGN_LEFT); txt_mars_ineei_1B_MEDFACSTS->tooltip("Emergency Medical Facility Status"); txt_mars_ineei_1B_MEDFACSTS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1B_MEDFACSTS->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "C."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1C_TRNPSTS = new Fl_Input2(80, Y, 480, 20, "TRNS"); txt_mars_ineei_1C_TRNPSTS->align(FL_ALIGN_LEFT); txt_mars_ineei_1C_TRNPSTS->tooltip("Local Transportation Status"); txt_mars_ineei_1C_TRNPSTS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1C_TRNPSTS->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "D."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1D_DAMAGE = new Fl_Input2(80, Y, 480, 20, "DMG"); txt_mars_ineei_1D_DAMAGE->align(FL_ALIGN_LEFT); txt_mars_ineei_1D_DAMAGE->tooltip("General Damage Characteristics"); txt_mars_ineei_1D_DAMAGE->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1D_DAMAGE->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "E."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1E_UTILSTS = new Fl_Input2(80, Y, 480, 20, "UTIL"); txt_mars_ineei_1E_UTILSTS->align(FL_ALIGN_LEFT); txt_mars_ineei_1E_UTILSTS->tooltip("Area Utulity Status"); txt_mars_ineei_1E_UTILSTS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1E_UTILSTS->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "F."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1F_COMMSTS = new Fl_Input2(80, Y, 480, 20, "COMM"); txt_mars_ineei_1F_COMMSTS->align(FL_ALIGN_LEFT); txt_mars_ineei_1F_COMMSTS->tooltip("Communication Status"); txt_mars_ineei_1F_COMMSTS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1F_COMMSTS->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y, 28, 20, "G."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1G_INFOSRC = new Fl_Input2(80, Y, 360, 20, "INFO"); txt_mars_ineei_1G_INFOSRC->align(FL_ALIGN_LEFT); txt_mars_ineei_1G_INFOSRC->tooltip("Information Source"); txt_mars_ineei_1G_INFOSRC->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1G_INFOSRC->when(FL_WHEN_CHANGED); txt_mars_ineei_1G_INFOTIME = new Fl_Input2(480, Y, 80, 20, "TIME"); txt_mars_ineei_1G_INFOTIME->align(FL_ALIGN_LEFT); txt_mars_ineei_1G_INFOTIME->tooltip("Information Time"); txt_mars_ineei_1G_INFOTIME->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1G_INFOTIME->when(FL_WHEN_CHANGED); Y += 22; label = new Fl_Box(0, Y+20, 28, 20, "H."); label->box(FL_FLAT_BOX); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_ineei_1H_REMARKS = new Fl_Input2(28, Y+20, 560 - 28, 130, "Remarks"); txt_mars_ineei_1H_REMARKS->type(4); txt_mars_ineei_1H_REMARKS->align(FL_ALIGN_TOP_LEFT); txt_mars_ineei_1H_REMARKS->tooltip("enter remarks"); txt_mars_ineei_1H_REMARKS->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_ineei_1H_REMARKS->when(FL_WHEN_CHANGED); tab_mars_ineei_2->end(); // tab_mars_type->end(); tab_mars_ineei->end(); tab_mars_ineei->hide(); }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_templates.cxx������������������������������������������������������������0000664�0001750�0001750�00000016366�12330516146�015137� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "templates.h" const char mars_daily_html_template[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9><big>MARS DAILY REPORT</big><br></td>\ </tr>\ </table><br>\ <FONT face=monospace size=5><b><pre>\ DE :md_de_: NR :md_nbr:\n\ :md_pre: :md_dtg:\n\ FM :md_fnm: :md_fcl: :md_fst:\n\ TO :md_tps:/:md_tcl: :md_tst:\n\ INFO :md_ps1:/:md_cl1: :md_st1:\n\ INFO :md_ps2:/:md_cl2: :md_st2:\n\ INFO :md_ps3:/:md_cl3: :md_st3:\n\ BT\n\ :md_inc:\n\ SUBJECT: SITREP / :md_sid: / :md_slo:\n\ 1. :md_22h:\n\ 2. :md_ncl: / :md_e_x:\n\ 3. :md_dta:/:md_dtd: :md_nst:\n\ A. :md_det:\n\ B. :md_acs:\n\ 4. :md_agy:\n\ 5. :md_rem:\n\ :md_inc:\n\ BT\n\ /EX\n\ NNNN\n\ </pre></b></FONT>\ </body>\ </html>"; const char mars_daily_text_template[] = "DE :md_de_: NR :md_nbr:\n\ :md_pre: :md_dtg:\n\ FM :md_fnm: :md_fcl: :md_fst:\n\ TO :md_tps:/:md_tcl: :md_tst:\n\ INFO :md_ps1:/:md_cl1: :md_st1:\n\ INFO :md_ps2:/:md_cl2: :md_st2:\n\ INFO :mars_state_sd:/:call_sign_st:\n\ BT\n\ :md_inc:\n\ SUBJECT: SITREP / :md_sid: / :md_slo:\n\ 1. :md_22h:\n\ 2. :md_ncl: / :md_e_x:\n\ 3. :md_dta:/:md_dtd: :md_nst:\n\ A. :md_det:\n\ B. :md_acs:\n\ 4. :md_agy:\n\ 5. :md_rem:\n\ :md_inc:\n\ BT\n\ /EX\n\ NNNN\n"; //====================================================================== // Net report templates //====================================================================== const char mars_net_html_template[] = "\ <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9><big>MARS NET REPORT</big><br></td>\ </tr>\ </table><br>\ <FONT face=monospace size=5><b><pre>\ DE :de: :nbr:\n\ :prec: :dtg:\n\ FM :fmname: :fmcall: :fmstate:\n\ TO :topos:/:tocall: :tostate:\n\ INFO :info1pos:/:info1call: :info1state:\n\ BT\n\ :incident:\n\ SUBJECT: NET REPORT :dnd:\n\ 1. :netcall:\n\ 2. :dtgstart: :dtgend:\n\ 3. :netsb:\n\ 4. :ncscall:\n\ 5. :nbrstas:, :calls:\n\ 6. NA\n\ 7. A. :nbrmsgs:\n\ B. :comments:\n\ :incident:\n\ BT\n\ /EX\n\ NNNN\n\ </pre></b></FONT>\ </body>\ </html>"; const char mars_net_text_template[] = "\ DE :de: :nbr:\n\ :prec: :dtg:\n\ FM :fmname: :fmcall: :fmstate:\n\ TO :topos:/:tocall: :tostate:\n\ INFO :info1pos:/:info1call: :info1state:\n\ BT\n\ :incident:\n\ SUBJECT: NET REPORT :dnd:\n\ 1. :netcall:\n\ 2. :dtgstart: :dtgend:\n\ 3. :netsb:\n\ 4. :ncscall:\n\ 5. :nbrstas:, :calls:\n\ 6. NA\n\ 7. A. :nbrmsgs:\n\ B. :comments:\n\ :incident:\n\ BT\n\ /EX\n\ NNNN\n\ "; //====================================================================== // IN/IEE report templates //====================================================================== const char mars_ineei_html_template[] = "\ <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9><big>MARS IN/EEI REPORT</big><br></td>\ </tr>\ </table><br>\ <FONT face=monospace size=5><b><pre>\ DE :de: :nbr:\n\ :prec: :dtg:\n\ FM :fm:\n\ TO: :to::info:\n\ BT\n\ :incident:\n\ SUBJECT: IN/EEI REPORT\n\ 1. REF EVENT IDENTIFIER: :1ref:\n\ A. INCIDENT LOCATION TIME: :1a:\n\ B. EMERGENCY MEDICAL: :1b_medfacsts:\n\ C. LOCAL TRANSPORTATION: :1c_trnpsts:\n\ D. GENERAL DAMAGE DESCRIPTION: :1d_damage:\n\ E. UTILITY STATUS: :1e_utilsts:\n\ F. COMMUNICATIONS STATUS: :1f_commsts:\n\ G. SOURCE OF INFO: :1g:\n\ H. REMARKS: :1h_remarks:\n\ :incident:\n\ BT\n\ /EX\n\ NNNN\n\ </pre></b></FONT>\ </body>\ </html>"; const char mars_ineei_text_template[] = "\ DE :de: :nbr:\n\ :prec: :dtg:\n\ FM :fm:\n\ TO: :to::info:\n\ BT\n\ :incident:\n\ SUBJECT: IN/EEI REPORT\n\ 1. REF EVENT IDENTIFIER: :1ref:\n\ A. INCIDENT LOCATION TIME: :1a:\n\ B. EMERGENCY MEDICAL: :1b_medfacsts:\n\ C. LOCAL TRANSPORTATION: :1c_trnpsts:\n\ D. GENERAL DAMAGE DESCRIPTION: :1d_damage:\n\ E. UTILITY STATUS: :1e_utilsts:\n\ F. COMMUNICATIONS STATUS: :1f_commsts:\n\ G. SOURCE OF INFO: :1g:\n\ H. REMARKS: :1h_remarks:\n\ :incident:\n\ BT\n\ /EX\n\ NNNN\n\ "; //====================================================================== // ARMY message templates //====================================================================== const char mars_army_html_template[] = "\ <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9><big>ARMY MARS STD MSG</big><br></td>\ </tr>\ </table><br>\ <FONT face=monospace size=5><b><pre>\ DE :de: NR :nbr:\n\ :pre: :dtg:\n\ FM :fm:\n\ TO :to:\n\ INFO :info:\n\ BT\n\ :text:\n\ BT\n\ NNNN\n\ </pre></b></FONT>\ </body>\ </html>"; const char mars_army_text_template[] = "\ DE :de: NR :nbr:\n\ :pre: :dtg:\n\ FM :fm:\n\ TO :to:\n\ INFO :info:\n\ BT\n\ :text:\n\ BT\n\ NNNN\n\ "; //====================================================================== // NAVY message templates //====================================================================== const char mars_navy_html_template[] = "\ <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\ <html>\ <head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">\ <title>:TITLE:</title>\ </head><body>\ <table WIDTH=1000px BORDER=1 CELLPADDING=0 CELLSPACING=0>\ <tbody>\ <tr ALIGN=center>\ <td COLSPAN=3 VALIGN=top BGCOLOR=#E9E9E9><big>NAVY MARS STD MSG</big><br></td>\ </tr>\ </table><br>\ <FONT face=monospace size=5><b><pre>\ :pre: :dtg:\n\ FM :fm:\n\ TO :to:\n\ BT\n\ UNCLAS\n\ :text:\n\ BT\n\ NNNN\n\ </pre></b></FONT>\ </body>\ </html>"; const char mars_navy_text_template[] = "\ :pre: :dtg:\n\ FM :fm:\n\ TO :to:\n\ BT\n\ UNCLAS\n\ :text:\n\ BT\n\ NNNN\n\ "; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_ineei.cxx����������������������������������������������������������������0000664�0001750�0001750�00000132313�12330516146�014221� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; const char mars_ineei_precedent[] = "RPIFM"; string ineei_buff; string def_mars_ineei_filename = ""; string base_mars_ineei_filename = ""; string def_mars_ineei_TemplateName = ""; bool using_mars_ineei_template = false; // mars_ineei fields string mars_ineei_DE = ":de:"; string mars_ineei_NBR = ":nbr:"; string mars_ineei_PREC = ":prec:"; string mars_ineei_DTG = ":dtg:"; string mars_ineei_FMNAME = ":fmname:"; string mars_ineei_FMCALL = ":fmcall:"; string mars_ineei_FMSTATE = ":fmstate:"; string mars_ineei_TOPOS = ":topos:"; string mars_ineei_TOCALL = ":tocall:"; string mars_ineei_TOSTATE = ":tostate:"; string mars_ineei_INFO1POS = ":info1pos:"; string mars_ineei_INFO1CALL = ":info1call:"; string mars_ineei_INFO1STATE = ":info1state:"; string mars_ineei_INFO2POS = ":info2pos:"; string mars_ineei_INFO2CALL = ":info2call:"; string mars_ineei_INFO2STATE = ":info2state:"; string mars_ineei_INFO3POS = ":info3pos:"; string mars_ineei_INFO3CALL = ":info3call:"; string mars_ineei_INFO3STATE = ":info3state:"; string mars_ineei_INFO4POS = ":info4pos:"; string mars_ineei_INFO4CALL = ":info4call:"; string mars_ineei_INFO4STATE = ":info4state:"; string mars_ineei_INFO5POS = ":info5pos:"; string mars_ineei_INFO5CALL = ":info5call:"; string mars_ineei_INFO5STATE = ":info5state:"; string mars_ineei_INFO6POS = ":info6pos:"; string mars_ineei_INFO6CALL = ":info6call:"; string mars_ineei_INFO6STATE = ":info6state:"; string mars_ineei_INFO7POS = ":info7pos:"; string mars_ineei_INFO7CALL = ":info7call:"; string mars_ineei_INFO7STATE = ":info7state:"; string mars_ineei_INFO8POS = ":info8pos:"; string mars_ineei_INFO8CALL = ":info8call:"; string mars_ineei_INFO8STATE = ":info8state:"; string mars_ineei_INFO9POS = ":info9pos:"; string mars_ineei_INFO9CALL = ":info9call:"; string mars_ineei_INFO9STATE = ":info9state:"; string mars_ineei_INFO10POS = ":info10pos:"; string mars_ineei_INFO10CALL = ":info10call:"; string mars_ineei_INFO10STATE = ":info10state:"; string mars_ineei_INCIDENT = ":incident:"; string mars_ineei_REF = ":ref:"; string mars_ineei_STATE = ":state:"; string mars_ineei_1A_INCIDENT = ":1a_incident:"; string mars_ineei_1A_LOCATION = ":1a_location:"; string mars_ineei_1A_TIME = ":1a_time:"; string mars_ineei_1B_MEDFACSTS = ":1b_medfacsts:"; string mars_ineei_1C_TRNPSTS = ":1c_trnpsts:"; string mars_ineei_1D_DAMAGE = ":1d_damage:"; string mars_ineei_1E_UTILSTS = ":1e_utilsts:"; string mars_ineei_1F_COMMSTS = ":1f_commsts:"; string mars_ineei_1G_INFOSRC = ":1g_infosrc:"; string mars_ineei_1G_INFOTIME = ":1g_infotime:"; string mars_ineei_1H_REMARKS = ":1h_remarks:"; string s_mars_ineei_DE; string s_mars_ineei_NBR; string s_mars_ineei_PREC = "R"; string s_mars_ineei_DTG; string s_mars_ineei_FMNAME; string s_mars_ineei_FMCALL; string s_mars_ineei_FMSTATE; string s_mars_ineei_TOPOS; string s_mars_ineei_TOCALL; string s_mars_ineei_TOSTATE; string s_mars_ineei_INFO1POS; string s_mars_ineei_INFO1CALL; string s_mars_ineei_INFO1STATE; string s_mars_ineei_INFO2POS; string s_mars_ineei_INFO2CALL; string s_mars_ineei_INFO2STATE; string s_mars_ineei_INFO3POS; string s_mars_ineei_INFO3CALL; string s_mars_ineei_INFO3STATE; string s_mars_ineei_INFO4POS; string s_mars_ineei_INFO4CALL; string s_mars_ineei_INFO4STATE; string s_mars_ineei_INFO5POS; string s_mars_ineei_INFO5CALL; string s_mars_ineei_INFO5STATE; string s_mars_ineei_INFO6POS; string s_mars_ineei_INFO6CALL; string s_mars_ineei_INFO6STATE; string s_mars_ineei_INFO7POS; string s_mars_ineei_INFO7CALL; string s_mars_ineei_INFO7STATE; string s_mars_ineei_INFO8POS; string s_mars_ineei_INFO8CALL; string s_mars_ineei_INFO8STATE; string s_mars_ineei_INFO9POS; string s_mars_ineei_INFO9CALL; string s_mars_ineei_INFO9STATE; string s_mars_ineei_INFO10POS; string s_mars_ineei_INFO10CALL; string s_mars_ineei_INFO10STATE; string s_mars_ineei_INCIDENT; string s_mars_ineei_REF; string s_mars_ineei_STATE; string s_mars_ineei_1A_INCIDENT; string s_mars_ineei_1A_LOCATION; string s_mars_ineei_1A_TIME; string s_mars_ineei_1B_MEDFACSTS; string s_mars_ineei_1C_TRNPSTS; string s_mars_ineei_1D_DAMAGE; string s_mars_ineei_1E_UTILSTS; string s_mars_ineei_1F_COMMSTS; string s_mars_ineei_1G_INFOSRC; string s_mars_ineei_1G_INFOTIME; string s_mars_ineei_1H_REMARKS; void cb_mars_ineei_SetDTG() { txt_mars_ineei_DTG->value(szDateTime()); } void clear_mars_ineei_fields() { s_mars_ineei_DE.clear(); s_mars_ineei_NBR.clear(); s_mars_ineei_PREC = "M"; s_mars_ineei_DTG.clear(); s_mars_ineei_FMNAME.clear(); s_mars_ineei_FMCALL.clear(); s_mars_ineei_FMSTATE.clear(); s_mars_ineei_TOPOS.clear(); s_mars_ineei_TOCALL.clear(); s_mars_ineei_TOSTATE.clear(); s_mars_ineei_INFO1POS.clear(); s_mars_ineei_INFO1CALL.clear(); s_mars_ineei_INFO1STATE.clear(); s_mars_ineei_INFO2POS.clear(); s_mars_ineei_INFO2CALL.clear(); s_mars_ineei_INFO2STATE.clear(); s_mars_ineei_INFO3POS.clear(); s_mars_ineei_INFO3CALL.clear(); s_mars_ineei_INFO3STATE.clear(); s_mars_ineei_INFO4POS.clear(); s_mars_ineei_INFO4CALL.clear(); s_mars_ineei_INFO4STATE.clear(); s_mars_ineei_INFO5POS.clear(); s_mars_ineei_INFO5CALL.clear(); s_mars_ineei_INFO5STATE.clear(); s_mars_ineei_INFO6POS.clear(); s_mars_ineei_INFO6CALL.clear(); s_mars_ineei_INFO6STATE.clear(); s_mars_ineei_INFO7POS.clear(); s_mars_ineei_INFO7CALL.clear(); s_mars_ineei_INFO7STATE.clear(); s_mars_ineei_INFO8POS.clear(); s_mars_ineei_INFO8CALL.clear(); s_mars_ineei_INFO8STATE.clear(); s_mars_ineei_INFO9POS.clear(); s_mars_ineei_INFO9CALL.clear(); s_mars_ineei_INFO9STATE.clear(); s_mars_ineei_INFO10POS.clear(); s_mars_ineei_INFO10CALL.clear(); s_mars_ineei_INFO10STATE.clear(); s_mars_ineei_INCIDENT.clear(); s_mars_ineei_REF.clear(); s_mars_ineei_STATE.clear(); s_mars_ineei_1A_INCIDENT.clear(); s_mars_ineei_1A_LOCATION.clear(); s_mars_ineei_1A_TIME.clear(); s_mars_ineei_1B_MEDFACSTS.clear(); s_mars_ineei_1C_TRNPSTS.clear(); s_mars_ineei_1D_DAMAGE.clear(); s_mars_ineei_1E_UTILSTS.clear(); s_mars_ineei_1F_COMMSTS.clear(); s_mars_ineei_1G_INFOSRC.clear(); s_mars_ineei_1G_INFOTIME.clear(); s_mars_ineei_1H_REMARKS.clear(); } bool check_mars_ineei_fields() { string temp; if (s_mars_ineei_DE != txt_mars_ineei_DE->value()) return true; if (s_mars_ineei_NBR != txt_mars_ineei_NBR->value()) return true; temp = mars_ineei_precedent[sel_mars_ineei_PREC->index()]; if (s_mars_ineei_PREC != temp) return true; if (s_mars_ineei_DTG != txt_mars_ineei_DTG->value()) return true; if (s_mars_ineei_FMNAME != txt_mars_ineei_FMNAME->value()) return true; if (s_mars_ineei_FMCALL != txt_mars_ineei_FMCALL->value()) return true; if (s_mars_ineei_FMSTATE != txt_mars_ineei_FMSTATE->value()) return true; if (s_mars_ineei_TOPOS != txt_mars_ineei_TOPOS->value()) return true; if (s_mars_ineei_TOCALL != txt_mars_ineei_TOCALL->value()) return true; if (s_mars_ineei_TOSTATE != txt_mars_ineei_TOSTATE->value()) return true; if (s_mars_ineei_INFO1POS != txt_mars_ineei_INFO1POS->value()) return true; if (s_mars_ineei_INFO1CALL != txt_mars_ineei_INFO1CALL->value()) return true; if (s_mars_ineei_INFO1STATE != txt_mars_ineei_INFO1STATE->value()) return true; if (s_mars_ineei_INFO2POS != txt_mars_ineei_INFO2POS->value()) return true; if (s_mars_ineei_INFO2CALL != txt_mars_ineei_INFO2CALL->value()) return true; if (s_mars_ineei_INFO2STATE != txt_mars_ineei_INFO2STATE->value()) return true; if (s_mars_ineei_INFO3POS != txt_mars_ineei_INFO3POS->value()) return true; if (s_mars_ineei_INFO3CALL != txt_mars_ineei_INFO3CALL->value()) return true; if (s_mars_ineei_INFO3STATE != txt_mars_ineei_INFO3STATE->value()) return true; if (s_mars_ineei_INFO4POS != txt_mars_ineei_INFO4POS->value()) return true; if (s_mars_ineei_INFO4CALL != txt_mars_ineei_INFO4CALL->value()) return true; if (s_mars_ineei_INFO4STATE != txt_mars_ineei_INFO4STATE->value()) return true; if (s_mars_ineei_INFO5POS != txt_mars_ineei_INFO5POS->value()) return true; if (s_mars_ineei_INFO5CALL != txt_mars_ineei_INFO5CALL->value()) return true; if (s_mars_ineei_INFO5STATE != txt_mars_ineei_INFO5STATE->value()) return true; if (s_mars_ineei_INFO6POS != txt_mars_ineei_INFO6POS->value()) return true; if (s_mars_ineei_INFO6CALL != txt_mars_ineei_INFO6CALL->value()) return true; if (s_mars_ineei_INFO6STATE != txt_mars_ineei_INFO6STATE->value()) return true; if (s_mars_ineei_INFO7POS != txt_mars_ineei_INFO7POS->value()) return true; if (s_mars_ineei_INFO7CALL != txt_mars_ineei_INFO7CALL->value()) return true; if (s_mars_ineei_INFO7STATE != txt_mars_ineei_INFO7STATE->value()) return true; if (s_mars_ineei_INFO8POS != txt_mars_ineei_INFO8POS->value()) return true; if (s_mars_ineei_INFO8CALL != txt_mars_ineei_INFO8CALL->value()) return true; if (s_mars_ineei_INFO8STATE != txt_mars_ineei_INFO8STATE->value()) return true; if (s_mars_ineei_INFO9POS != txt_mars_ineei_INFO9POS->value()) return true; if (s_mars_ineei_INFO9CALL != txt_mars_ineei_INFO9CALL->value()) return true; if (s_mars_ineei_INFO9STATE != txt_mars_ineei_INFO9STATE->value()) return true; if (s_mars_ineei_INFO10POS != txt_mars_ineei_INFO10POS->value()) return true; if (s_mars_ineei_INFO10CALL != txt_mars_ineei_INFO10CALL->value()) return true; if (s_mars_ineei_INFO10STATE != txt_mars_ineei_INFO10STATE->value()) return true; if (s_mars_ineei_INCIDENT != txt_mars_ineei_INCIDENT->value()) return true; if (s_mars_ineei_REF != txt_mars_ineei_REF->value()) return true; if (s_mars_ineei_STATE != txt_mars_ineei_STATE->value()) return true; if (s_mars_ineei_1A_INCIDENT != txt_mars_ineei_1A_INCIDENT->value()) return true; if (s_mars_ineei_1A_LOCATION != txt_mars_ineei_1A_LOCATION->value()) return true; if (s_mars_ineei_1A_TIME != txt_mars_ineei_1A_TIME->value()) return true; if (s_mars_ineei_1B_MEDFACSTS != txt_mars_ineei_1B_MEDFACSTS->value()) return true; if (s_mars_ineei_1C_TRNPSTS != txt_mars_ineei_1C_TRNPSTS->value()) return true; if (s_mars_ineei_1D_DAMAGE != txt_mars_ineei_1D_DAMAGE->value()) return true; if (s_mars_ineei_1E_UTILSTS != txt_mars_ineei_1E_UTILSTS->value()) return true; if (s_mars_ineei_1F_COMMSTS != txt_mars_ineei_1F_COMMSTS->value()) return true; if (s_mars_ineei_1G_INFOSRC != txt_mars_ineei_1G_INFOSRC->value()) return true; if (s_mars_ineei_1G_INFOTIME != txt_mars_ineei_1G_INFOTIME->value()) return true; if (s_mars_ineei_1H_REMARKS != txt_mars_ineei_1H_REMARKS->value()) return true; return false; } void update_mars_ineei_fields() { s_mars_ineei_DE = txt_mars_ineei_DE->value(); s_mars_ineei_NBR = txt_mars_ineei_NBR->value(); s_mars_ineei_PREC.clear(); s_mars_ineei_PREC = mars_ineei_precedent[sel_mars_ineei_PREC->index()]; s_mars_ineei_DTG = txt_mars_ineei_DTG->value(); s_mars_ineei_FMNAME = txt_mars_ineei_FMNAME->value(); s_mars_ineei_FMCALL = txt_mars_ineei_FMCALL->value(); s_mars_ineei_FMSTATE = txt_mars_ineei_FMSTATE->value(); s_mars_ineei_TOPOS = txt_mars_ineei_TOPOS->value(); s_mars_ineei_TOCALL = txt_mars_ineei_TOCALL->value(); s_mars_ineei_TOSTATE = txt_mars_ineei_TOSTATE->value(); s_mars_ineei_INFO1POS = txt_mars_ineei_INFO1POS->value(); s_mars_ineei_INFO1CALL = txt_mars_ineei_INFO1CALL->value(); s_mars_ineei_INFO1STATE = txt_mars_ineei_INFO1STATE->value(); s_mars_ineei_INFO2POS = txt_mars_ineei_INFO2POS->value(); s_mars_ineei_INFO2CALL = txt_mars_ineei_INFO2CALL->value(); s_mars_ineei_INFO2STATE = txt_mars_ineei_INFO2STATE->value(); s_mars_ineei_INFO3POS = txt_mars_ineei_INFO3POS->value(); s_mars_ineei_INFO3CALL = txt_mars_ineei_INFO3CALL->value(); s_mars_ineei_INFO3STATE = txt_mars_ineei_INFO3STATE->value(); s_mars_ineei_INFO4POS = txt_mars_ineei_INFO4POS->value(); s_mars_ineei_INFO4CALL = txt_mars_ineei_INFO4CALL->value(); s_mars_ineei_INFO4STATE = txt_mars_ineei_INFO4STATE->value(); s_mars_ineei_INFO5POS = txt_mars_ineei_INFO5POS->value(); s_mars_ineei_INFO5CALL = txt_mars_ineei_INFO5CALL->value(); s_mars_ineei_INFO5STATE = txt_mars_ineei_INFO5STATE->value(); s_mars_ineei_INFO6POS = txt_mars_ineei_INFO6POS->value(); s_mars_ineei_INFO6CALL = txt_mars_ineei_INFO6CALL->value(); s_mars_ineei_INFO6STATE = txt_mars_ineei_INFO6STATE->value(); s_mars_ineei_INFO7POS = txt_mars_ineei_INFO7POS->value(); s_mars_ineei_INFO7CALL = txt_mars_ineei_INFO7CALL->value(); s_mars_ineei_INFO7STATE = txt_mars_ineei_INFO7STATE->value(); s_mars_ineei_INFO8POS = txt_mars_ineei_INFO8POS->value(); s_mars_ineei_INFO8CALL = txt_mars_ineei_INFO8CALL->value(); s_mars_ineei_INFO8STATE = txt_mars_ineei_INFO8STATE->value(); s_mars_ineei_INFO9POS = txt_mars_ineei_INFO9POS->value(); s_mars_ineei_INFO9CALL = txt_mars_ineei_INFO9CALL->value(); s_mars_ineei_INFO9STATE = txt_mars_ineei_INFO9STATE->value(); s_mars_ineei_INFO10POS = txt_mars_ineei_INFO10POS->value(); s_mars_ineei_INFO10CALL = txt_mars_ineei_INFO10CALL->value(); s_mars_ineei_INFO10STATE = txt_mars_ineei_INFO10STATE->value(); s_mars_ineei_INCIDENT = txt_mars_ineei_INCIDENT->value(); s_mars_ineei_REF = txt_mars_ineei_REF->value(); s_mars_ineei_STATE = txt_mars_ineei_STATE->value(); s_mars_ineei_1A_INCIDENT = txt_mars_ineei_1A_INCIDENT->value(); s_mars_ineei_1A_LOCATION = txt_mars_ineei_1A_LOCATION->value(); s_mars_ineei_1A_TIME = txt_mars_ineei_1A_TIME->value(); s_mars_ineei_1B_MEDFACSTS = txt_mars_ineei_1B_MEDFACSTS->value(); s_mars_ineei_1C_TRNPSTS = txt_mars_ineei_1C_TRNPSTS->value(); s_mars_ineei_1D_DAMAGE = txt_mars_ineei_1D_DAMAGE->value(); s_mars_ineei_1E_UTILSTS = txt_mars_ineei_1E_UTILSTS->value(); s_mars_ineei_1F_COMMSTS = txt_mars_ineei_1F_COMMSTS->value(); s_mars_ineei_1G_INFOSRC = txt_mars_ineei_1G_INFOSRC->value(); s_mars_ineei_1G_INFOTIME = txt_mars_ineei_1G_INFOTIME->value(); s_mars_ineei_1H_REMARKS = txt_mars_ineei_1H_REMARKS->value(); } void update_mars_ineeiform() { txt_mars_ineei_DE->value(s_mars_ineei_DE.c_str()); txt_mars_ineei_NBR->value(s_mars_ineei_NBR.c_str()); size_t n = strchr(mars_ineei_precedent, s_mars_ineei_PREC[0]) - mars_ineei_precedent; if (n < 0) n = 0; if (n > 4) n = 4; sel_mars_ineei_PREC->index(n); txt_mars_ineei_DTG->value(s_mars_ineei_DTG.c_str()); txt_mars_ineei_FMNAME->value(s_mars_ineei_FMNAME.c_str()); txt_mars_ineei_FMCALL->value(s_mars_ineei_FMCALL.c_str()); txt_mars_ineei_FMSTATE->value(s_mars_ineei_FMSTATE.c_str()); txt_mars_ineei_TOPOS->value(s_mars_ineei_TOPOS.c_str()); txt_mars_ineei_TOCALL->value(s_mars_ineei_TOCALL.c_str()); txt_mars_ineei_TOSTATE->value(s_mars_ineei_TOSTATE.c_str()); txt_mars_ineei_INFO1POS->value(s_mars_ineei_INFO1POS.c_str()); txt_mars_ineei_INFO1CALL->value(s_mars_ineei_INFO1CALL.c_str()); txt_mars_ineei_INFO1STATE->value(s_mars_ineei_INFO1STATE.c_str()); txt_mars_ineei_INFO2POS->value(s_mars_ineei_INFO2POS.c_str()); txt_mars_ineei_INFO2CALL->value(s_mars_ineei_INFO2CALL.c_str()); txt_mars_ineei_INFO2STATE->value(s_mars_ineei_INFO2STATE.c_str()); txt_mars_ineei_INFO3POS->value(s_mars_ineei_INFO3POS.c_str()); txt_mars_ineei_INFO3CALL->value(s_mars_ineei_INFO3CALL.c_str()); txt_mars_ineei_INFO3STATE->value(s_mars_ineei_INFO3STATE.c_str()); txt_mars_ineei_INFO4POS->value(s_mars_ineei_INFO4POS.c_str()); txt_mars_ineei_INFO4CALL->value(s_mars_ineei_INFO4CALL.c_str()); txt_mars_ineei_INFO4STATE->value(s_mars_ineei_INFO4STATE.c_str()); txt_mars_ineei_INFO5POS->value(s_mars_ineei_INFO5POS.c_str()); txt_mars_ineei_INFO5CALL->value(s_mars_ineei_INFO5CALL.c_str()); txt_mars_ineei_INFO5STATE->value(s_mars_ineei_INFO5STATE.c_str()); txt_mars_ineei_INFO6POS->value(s_mars_ineei_INFO6POS.c_str()); txt_mars_ineei_INFO6CALL->value(s_mars_ineei_INFO6CALL.c_str()); txt_mars_ineei_INFO6STATE->value(s_mars_ineei_INFO6STATE.c_str()); txt_mars_ineei_INFO7POS->value(s_mars_ineei_INFO7POS.c_str()); txt_mars_ineei_INFO7CALL->value(s_mars_ineei_INFO7CALL.c_str()); txt_mars_ineei_INFO7STATE->value(s_mars_ineei_INFO7STATE.c_str()); txt_mars_ineei_INFO8POS->value(s_mars_ineei_INFO8POS.c_str()); txt_mars_ineei_INFO8CALL->value(s_mars_ineei_INFO8CALL.c_str()); txt_mars_ineei_INFO8STATE->value(s_mars_ineei_INFO8STATE.c_str()); txt_mars_ineei_INFO9POS->value(s_mars_ineei_INFO9POS.c_str()); txt_mars_ineei_INFO9CALL->value(s_mars_ineei_INFO9CALL.c_str()); txt_mars_ineei_INFO9STATE->value(s_mars_ineei_INFO9STATE.c_str()); txt_mars_ineei_INFO10POS->value(s_mars_ineei_INFO10POS.c_str()); txt_mars_ineei_INFO10CALL->value(s_mars_ineei_INFO10CALL.c_str()); txt_mars_ineei_INFO10STATE->value(s_mars_ineei_INFO10STATE.c_str()); txt_mars_ineei_INCIDENT->value(s_mars_ineei_INCIDENT.c_str()); txt_mars_ineei_REF->value(s_mars_ineei_REF.c_str()); txt_mars_ineei_STATE->value(s_mars_ineei_STATE.c_str()); txt_mars_ineei_1A_INCIDENT->value(s_mars_ineei_1A_INCIDENT.c_str()); txt_mars_ineei_1A_LOCATION->value(s_mars_ineei_1A_LOCATION.c_str()); txt_mars_ineei_1A_TIME->value(s_mars_ineei_1A_TIME.c_str()); txt_mars_ineei_1B_MEDFACSTS->value(s_mars_ineei_1B_MEDFACSTS.c_str()); txt_mars_ineei_1C_TRNPSTS->value(s_mars_ineei_1C_TRNPSTS.c_str()); txt_mars_ineei_1D_DAMAGE->value(s_mars_ineei_1D_DAMAGE.c_str()); txt_mars_ineei_1E_UTILSTS->value(s_mars_ineei_1E_UTILSTS.c_str()); txt_mars_ineei_1F_COMMSTS->value(s_mars_ineei_1F_COMMSTS.c_str()); txt_mars_ineei_1G_INFOSRC->value(s_mars_ineei_1G_INFOSRC.c_str()); txt_mars_ineei_1G_INFOTIME->value(s_mars_ineei_1G_INFOTIME.c_str()); txt_mars_ineei_1H_REMARKS->value(s_mars_ineei_1H_REMARKS.c_str()); } void clear_mars_ineei_form() { clear_mars_ineei_fields(); txt_mars_ineei_DE->value(""); txt_mars_ineei_NBR->value(""); sel_mars_ineei_PREC->index(4); txt_mars_ineei_DTG->value(""); txt_mars_ineei_FMNAME->value(""); txt_mars_ineei_FMCALL->value(""); txt_mars_ineei_FMSTATE->value(""); txt_mars_ineei_TOPOS->value(""); txt_mars_ineei_TOCALL->value(""); txt_mars_ineei_TOSTATE->value(""); txt_mars_ineei_INFO1POS->value(""); txt_mars_ineei_INFO1CALL->value(""); txt_mars_ineei_INFO1STATE->value(""); txt_mars_ineei_INFO2POS->value(""); txt_mars_ineei_INFO2CALL->value(""); txt_mars_ineei_INFO2STATE->value(""); txt_mars_ineei_INFO3POS->value(""); txt_mars_ineei_INFO3CALL->value(""); txt_mars_ineei_INFO3STATE->value(""); txt_mars_ineei_INFO4POS->value(""); txt_mars_ineei_INFO4CALL->value(""); txt_mars_ineei_INFO4STATE->value(""); txt_mars_ineei_INFO5POS->value(""); txt_mars_ineei_INFO5CALL->value(""); txt_mars_ineei_INFO5STATE->value(""); txt_mars_ineei_INFO6POS->value(""); txt_mars_ineei_INFO6CALL->value(""); txt_mars_ineei_INFO6STATE->value(""); txt_mars_ineei_INFO7POS->value(""); txt_mars_ineei_INFO7CALL->value(""); txt_mars_ineei_INFO7STATE->value(""); txt_mars_ineei_INFO8POS->value(""); txt_mars_ineei_INFO8CALL->value(""); txt_mars_ineei_INFO8STATE->value(""); txt_mars_ineei_INFO9POS->value(""); txt_mars_ineei_INFO9CALL->value(""); txt_mars_ineei_INFO9STATE->value(""); txt_mars_ineei_INFO10POS->value(""); txt_mars_ineei_INFO10CALL->value(""); txt_mars_ineei_INFO10STATE->value(""); txt_mars_ineei_INCIDENT->value(""); txt_mars_ineei_REF->value(""); txt_mars_ineei_STATE->value(""); txt_mars_ineei_1A_INCIDENT->value(""); txt_mars_ineei_1A_LOCATION->value(""); txt_mars_ineei_1A_TIME->value(""); txt_mars_ineei_1B_MEDFACSTS->value(""); txt_mars_ineei_1C_TRNPSTS->value(""); txt_mars_ineei_1D_DAMAGE->value(""); txt_mars_ineei_1E_UTILSTS->value(""); txt_mars_ineei_1F_COMMSTS->value(""); txt_mars_ineei_1G_INFOSRC->value(""); txt_mars_ineei_1G_INFOTIME->value(""); txt_mars_ineei_1H_REMARKS->value(""); } void make_mars_ineei_buff(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( mars_ineei_DE, s_mars_ineei_DE ) ); mbuff.append( lineout( mars_ineei_NBR, s_mars_ineei_NBR ) ); mbuff.append( lineout( mars_ineei_PREC, s_mars_ineei_PREC ) ); mbuff.append( lineout( mars_ineei_DTG, s_mars_ineei_DTG ) ); mbuff.append( lineout( mars_ineei_FMNAME, s_mars_ineei_FMNAME ) ); mbuff.append( lineout( mars_ineei_FMCALL, s_mars_ineei_FMCALL ) ); mbuff.append( lineout( mars_ineei_FMSTATE, s_mars_ineei_FMSTATE ) ); mbuff.append( lineout( mars_ineei_TOPOS, s_mars_ineei_TOPOS ) ); mbuff.append( lineout( mars_ineei_TOCALL, s_mars_ineei_TOCALL ) ); mbuff.append( lineout( mars_ineei_TOSTATE, s_mars_ineei_TOSTATE ) ); mbuff.append( lineout( mars_ineei_INFO1POS, s_mars_ineei_INFO1POS ) ); mbuff.append( lineout( mars_ineei_INFO1CALL, s_mars_ineei_INFO1CALL ) ); mbuff.append( lineout( mars_ineei_INFO1STATE, s_mars_ineei_INFO1STATE ) ); mbuff.append( lineout( mars_ineei_INFO2POS, s_mars_ineei_INFO2POS ) ); mbuff.append( lineout( mars_ineei_INFO2CALL, s_mars_ineei_INFO2CALL ) ); mbuff.append( lineout( mars_ineei_INFO2STATE, s_mars_ineei_INFO2STATE ) ); mbuff.append( lineout( mars_ineei_INFO3POS, s_mars_ineei_INFO3POS ) ); mbuff.append( lineout( mars_ineei_INFO3CALL, s_mars_ineei_INFO3CALL ) ); mbuff.append( lineout( mars_ineei_INFO3STATE, s_mars_ineei_INFO3STATE ) ); mbuff.append( lineout( mars_ineei_INFO4POS, s_mars_ineei_INFO4POS ) ); mbuff.append( lineout( mars_ineei_INFO4CALL, s_mars_ineei_INFO4CALL ) ); mbuff.append( lineout( mars_ineei_INFO4STATE, s_mars_ineei_INFO4STATE ) ); mbuff.append( lineout( mars_ineei_INFO5POS, s_mars_ineei_INFO5POS ) ); mbuff.append( lineout( mars_ineei_INFO5CALL, s_mars_ineei_INFO5CALL ) ); mbuff.append( lineout( mars_ineei_INFO5STATE, s_mars_ineei_INFO5STATE ) ); mbuff.append( lineout( mars_ineei_INFO6POS, s_mars_ineei_INFO6POS ) ); mbuff.append( lineout( mars_ineei_INFO6CALL, s_mars_ineei_INFO6CALL ) ); mbuff.append( lineout( mars_ineei_INFO6STATE, s_mars_ineei_INFO6STATE ) ); mbuff.append( lineout( mars_ineei_INFO7POS, s_mars_ineei_INFO7POS ) ); mbuff.append( lineout( mars_ineei_INFO7CALL, s_mars_ineei_INFO7CALL ) ); mbuff.append( lineout( mars_ineei_INFO7STATE, s_mars_ineei_INFO7STATE ) ); mbuff.append( lineout( mars_ineei_INFO8POS, s_mars_ineei_INFO8POS ) ); mbuff.append( lineout( mars_ineei_INFO8CALL, s_mars_ineei_INFO8CALL ) ); mbuff.append( lineout( mars_ineei_INFO8STATE, s_mars_ineei_INFO8STATE ) ); mbuff.append( lineout( mars_ineei_INFO9POS, s_mars_ineei_INFO9POS ) ); mbuff.append( lineout( mars_ineei_INFO9CALL, s_mars_ineei_INFO9CALL ) ); mbuff.append( lineout( mars_ineei_INFO9STATE, s_mars_ineei_INFO9STATE ) ); mbuff.append( lineout( mars_ineei_INFO10POS, s_mars_ineei_INFO10POS ) ); mbuff.append( lineout( mars_ineei_INFO10CALL, s_mars_ineei_INFO10CALL ) ); mbuff.append( lineout( mars_ineei_INFO10STATE, s_mars_ineei_INFO10STATE ) ); mbuff.append( lineout( mars_ineei_INCIDENT, s_mars_ineei_INCIDENT ) ); mbuff.append( lineout( mars_ineei_REF, s_mars_ineei_REF)); mbuff.append( lineout( mars_ineei_STATE, s_mars_ineei_STATE)); mbuff.append( lineout( mars_ineei_1A_INCIDENT, s_mars_ineei_1A_INCIDENT)); mbuff.append( lineout( mars_ineei_1A_LOCATION, s_mars_ineei_1A_LOCATION)); mbuff.append( lineout( mars_ineei_1A_TIME, s_mars_ineei_1A_TIME)); mbuff.append( lineout( mars_ineei_1B_MEDFACSTS, s_mars_ineei_1B_MEDFACSTS)); mbuff.append( lineout( mars_ineei_1C_TRNPSTS, s_mars_ineei_1C_TRNPSTS)); mbuff.append( lineout( mars_ineei_1D_DAMAGE, s_mars_ineei_1D_DAMAGE)); mbuff.append( lineout( mars_ineei_1E_UTILSTS, s_mars_ineei_1E_UTILSTS)); mbuff.append( lineout( mars_ineei_1F_COMMSTS, s_mars_ineei_1F_COMMSTS)); mbuff.append( lineout( mars_ineei_1G_INFOSRC, s_mars_ineei_1G_INFOSRC)); mbuff.append( lineout( mars_ineei_1G_INFOTIME, s_mars_ineei_1G_INFOTIME)); mbuff.append( lineout( mars_ineei_1H_REMARKS, s_mars_ineei_1H_REMARKS ) ); if (compress) compress_maybe(mbuff); ineei_buff.append(mbuff); } void read_mars_ineei_buffer(string data) { clear_mars_ineei_fields(); // search the file buffer for each of the mars_ineei fields s_mars_ineei_DE = findstr(data, mars_ineei_DE); s_mars_ineei_NBR = findstr(data, mars_ineei_NBR); s_mars_ineei_PREC = findstr(data, mars_ineei_PREC); s_mars_ineei_DTG = findstr(data, mars_ineei_DTG); s_mars_ineei_FMNAME = findstr(data, mars_ineei_FMNAME); s_mars_ineei_FMCALL = findstr(data, mars_ineei_FMCALL); s_mars_ineei_FMSTATE = findstr(data, mars_ineei_FMSTATE); s_mars_ineei_TOPOS = findstr(data, mars_ineei_TOPOS); s_mars_ineei_TOCALL = findstr(data, mars_ineei_TOCALL); s_mars_ineei_TOSTATE = findstr(data, mars_ineei_TOSTATE); s_mars_ineei_INFO1POS = findstr(data, mars_ineei_INFO1POS); s_mars_ineei_INFO1CALL = findstr(data, mars_ineei_INFO1CALL); s_mars_ineei_INFO1STATE = findstr(data, mars_ineei_INFO1STATE); s_mars_ineei_INFO2POS = findstr(data, mars_ineei_INFO2POS); s_mars_ineei_INFO2CALL = findstr(data, mars_ineei_INFO2CALL); s_mars_ineei_INFO2STATE = findstr(data, mars_ineei_INFO2STATE); s_mars_ineei_INFO3POS = findstr(data, mars_ineei_INFO3POS); s_mars_ineei_INFO3CALL = findstr(data, mars_ineei_INFO3CALL); s_mars_ineei_INFO3STATE = findstr(data, mars_ineei_INFO3STATE); s_mars_ineei_INFO4POS = findstr(data, mars_ineei_INFO4POS); s_mars_ineei_INFO4CALL = findstr(data, mars_ineei_INFO4CALL); s_mars_ineei_INFO4STATE = findstr(data, mars_ineei_INFO4STATE); s_mars_ineei_INFO5POS = findstr(data, mars_ineei_INFO5POS); s_mars_ineei_INFO5CALL = findstr(data, mars_ineei_INFO5CALL); s_mars_ineei_INFO5STATE = findstr(data, mars_ineei_INFO5STATE); s_mars_ineei_INFO6POS = findstr(data, mars_ineei_INFO6POS); s_mars_ineei_INFO6CALL = findstr(data, mars_ineei_INFO6CALL); s_mars_ineei_INFO6STATE = findstr(data, mars_ineei_INFO6STATE); s_mars_ineei_INFO7POS = findstr(data, mars_ineei_INFO7POS); s_mars_ineei_INFO7CALL = findstr(data, mars_ineei_INFO7CALL); s_mars_ineei_INFO7STATE = findstr(data, mars_ineei_INFO7STATE); s_mars_ineei_INFO8POS = findstr(data, mars_ineei_INFO8POS); s_mars_ineei_INFO8CALL = findstr(data, mars_ineei_INFO8CALL); s_mars_ineei_INFO8STATE = findstr(data, mars_ineei_INFO8STATE); s_mars_ineei_INFO9POS = findstr(data, mars_ineei_INFO9POS); s_mars_ineei_INFO9CALL = findstr(data, mars_ineei_INFO9CALL); s_mars_ineei_INFO9STATE = findstr(data, mars_ineei_INFO9STATE); s_mars_ineei_INFO10POS = findstr(data, mars_ineei_INFO10POS); s_mars_ineei_INFO10CALL = findstr(data, mars_ineei_INFO10CALL); s_mars_ineei_INFO10STATE = findstr(data, mars_ineei_INFO10STATE); s_mars_ineei_INCIDENT = findstr(data, mars_ineei_INCIDENT); s_mars_ineei_REF = findstr(data, mars_ineei_REF); s_mars_ineei_STATE = findstr(data, mars_ineei_STATE); s_mars_ineei_1A_INCIDENT = findstr(data, mars_ineei_1A_INCIDENT); s_mars_ineei_1A_LOCATION = findstr(data, mars_ineei_1A_LOCATION); s_mars_ineei_1A_TIME = findstr(data, mars_ineei_1A_TIME); s_mars_ineei_1B_MEDFACSTS = findstr(data, mars_ineei_1B_MEDFACSTS); s_mars_ineei_1C_TRNPSTS = findstr(data, mars_ineei_1C_TRNPSTS); s_mars_ineei_1D_DAMAGE = findstr(data, mars_ineei_1D_DAMAGE); s_mars_ineei_1E_UTILSTS = findstr(data, mars_ineei_1E_UTILSTS); s_mars_ineei_1F_COMMSTS = findstr(data, mars_ineei_1F_COMMSTS); s_mars_ineei_1G_INFOSRC = findstr(data, mars_ineei_1G_INFOSRC); s_mars_ineei_1G_INFOTIME = findstr(data, mars_ineei_1G_INFOTIME); s_mars_ineei_1H_REMARKS = findstr(data, mars_ineei_1H_REMARKS); update_mars_ineeiform(); } void cb_mars_ineei_new() { if (check_mars_ineei_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_mars_ineei_save(); } } clear_mars_ineei_form(); def_mars_ineei_filename = ICS_msg_dir; def_mars_ineei_filename.append("new"FMARSINEEI_EXT); show_filename(def_mars_ineei_filename); using_mars_ineei_template = false; } void cb_mars_ineei_import() { fl_alert2("Not implemented"); } void cb_mars_ineei_export() { fl_alert2("Not implemented"); } void cb_mars_ineei_wrap_import(string wrapfilename, string inpbuffer) { clear_mars_ineei_form(); read_mars_ineei_buffer(inpbuffer); def_mars_ineei_filename = ICS_msg_dir; def_mars_ineei_filename.append(wrapfilename); show_filename(def_mars_ineei_filename); using_mars_ineei_template = false; } int eval_mars_ineei_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_mars_ineei_filename).append("]"); update_mars_ineei_fields(); update_header(FROM); evalstr.append(header("<mars_ineei>")); ineei_buff.clear(); make_mars_ineei_buff(true); if (ineei_buff.empty()) return 0; compress_maybe( ineei_buff ); evalstr.append( ineei_buff ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_mars_ineei_wrap_export() { if (check_mars_ineei_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_ineei_fields(); if (base_mars_ineei_filename == "new"FMARSINEEI_EXT || base_mars_ineei_filename == "default"FMARSINEEI_EXT) if (!cb_mars_ineei_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_mars_ineei_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(true); export_wrapfile(base_mars_ineei_filename, wrapfilename, ineei_buff, pext != ".wrap"); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(false); write_mars_ineei(def_mars_ineei_filename); } } void cb_mars_ineei_wrap_autosend() { if (check_mars_ineei_fields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_ineei_fields(); if (base_mars_ineei_filename == "new"FMARSINEEI_EXT || base_mars_ineei_filename == "default"FMARSINEEI_EXT) if (!cb_mars_ineei_save_as()) return; update_header(FROM); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(true); xfr_via_socket(base_mars_ineei_filename, ineei_buff); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(false); write_mars_ineei(def_mars_ineei_filename); } void cb_mars_ineei_load_template() { string def_mars_ineei_filename = def_mars_ineei_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TMARSINEEI_EXT, def_mars_ineei_filename.c_str()); if (p) { clear_mars_ineei_form(); read_data_file(p); def_mars_ineei_TemplateName = p; show_filename(def_mars_ineei_TemplateName); using_mars_ineei_template = true; } } void cb_mars_ineei_save_template() { if (!using_mars_ineei_template) { cb_mars_ineei_save_as_template(); return; } string def_mars_ineei_filename = def_mars_ineei_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TMARSINEEI_EXT, def_mars_ineei_filename.c_str()); if (p) { update_header(CHANGED); update_mars_ineei_fields(); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(); write_mars_ineei(p); } } void cb_mars_ineei_save_as_template() { string def_mars_ineei_filename = def_mars_ineei_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TMARSINEEI_EXT, def_mars_ineei_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_mars_ineei_TemplateName = p; if (strlen(pext) == 0) def_mars_ineei_TemplateName.append(TMARSINEEI_EXT); remove_spaces_from_filename(def_mars_ineei_TemplateName); clear_header(); update_header(CHANGED); update_mars_ineei_fields(); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(); write_mars_ineei(def_mars_ineei_TemplateName); show_filename(def_mars_ineei_TemplateName); using_mars_ineei_template = true; } } void cb_mars_ineei_open() { const char *p = FSEL::select(_("Open data file"), "ICS-net\t*"FMARSINEEI_EXT, def_mars_ineei_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_mars_ineei_form(); read_data_file(p); using_mars_ineei_template = false; def_mars_ineei_filename = p; show_filename(def_mars_ineei_filename); } void write_mars_ineei(string s) { FILE *filenet = fopen(s.c_str(), "w"); if (!filenet) return; make_mars_ineei_buff(); fwrite(ineei_buff.c_str(), ineei_buff.length(), 1, filenet); fclose(filenet); } bool cb_mars_ineei_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FMARSINEEI_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_mars_ineei_filename; p = FSEL::saveas(_("Save data file"), "ICS-net\t*"FMARSINEEI_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_mars_ineei_filename = p; if (strlen(pext) == 0) def_mars_ineei_filename.append(FMARSINEEI_EXT); remove_spaces_from_filename(def_mars_ineei_filename); update_header(NEW); update_mars_ineei_fields(); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(); write_mars_ineei(def_mars_ineei_filename); using_mars_ineei_template = false; show_filename(def_mars_ineei_filename); return true; } void cb_mars_ineei_save() { if (base_mars_ineei_filename == "new"FMARSINEEI_EXT || base_mars_ineei_filename == "default"FMARSINEEI_EXT || using_mars_ineei_template == true) { cb_mars_ineei_save_as(); return; } if (check_mars_ineei_fields()) update_header(CHANGED); update_mars_ineei_fields(); ineei_buff.assign(header("<mars_ineei>")); make_mars_ineei_buff(); write_mars_ineei(def_mars_ineei_filename); using_mars_ineei_template = false; } string justify_remarks(string instr, int start_count) { // strip new lines string tmp = instr; size_t nl = 0; while ((nl = tmp.find("\n")) != string::npos) if (nl == tmp.length() -1) tmp.erase(nl,1); else tmp[nl] = ' '; size_t dsp = 0; while ((dsp = tmp.find(" ")) != string::npos) tmp.erase(dsp, 1); while ((dsp = tmp.find(" .")) != string::npos) tmp.erase(dsp, 1); // limit line lengths int cc = start_count; size_t sp = 0; while (sp < tmp.length()) { if (tmp[sp] == ' ' && cc == progStatus.charcount) { tmp[sp] = '\n'; cc = 0; } else if (cc > progStatus.charcount) { // back up to previous space int n = 0; while (sp && cc && tmp[sp] != '\n') { sp--; cc--; if (++n > 20) { // oops tmp.insert(sp, 1, '\n'); cc = 0; } else if (tmp[sp] == ' ') { tmp[sp] = '\n'; cc = 0; } } } sp++; cc++; } return tmp; } string formated_output( string target ) { string formnet = target; string temp; string field_str; string to_str = ":to:"; string fm_str = ":fm:"; string info_str = ":info:"; string ref_str = ":1ref:"; string onea_str = ":1a:"; string oneg_str = ":1g:"; replacestr(formnet, mars_ineei_DE, s_mars_ineei_DE); replacestr(formnet, mars_ineei_NBR, s_mars_ineei_NBR); replacestr(formnet, mars_ineei_PREC, s_mars_ineei_PREC); replacestr(formnet, mars_ineei_DTG, s_mars_ineei_DTG); field_str.clear(); if (!s_mars_ineei_FMNAME.empty()) field_str.append(s_mars_ineei_FMNAME).append(" / "); if (!s_mars_ineei_FMCALL.empty()) field_str.append(s_mars_ineei_FMCALL).append(" / "); if (!s_mars_ineei_FMSTATE.empty()) field_str.append(s_mars_ineei_FMSTATE); replacestr(formnet, fm_str, field_str); field_str.clear(); if (!s_mars_ineei_TOPOS.empty()) field_str.append(s_mars_ineei_TOPOS).append(" / "); if (!s_mars_ineei_TOCALL.empty()) field_str.append(s_mars_ineei_TOCALL).append(" / "); if (!s_mars_ineei_TOSTATE.empty()) field_str.append(s_mars_ineei_TOSTATE); replacestr(formnet, to_str, field_str); field_str.clear(); if (!s_mars_ineei_INFO1CALL.empty() || !s_mars_ineei_INFO1POS.empty()) { field_str.append("\nINFO: "); if (!s_mars_ineei_INFO1POS.empty()) field_str.append(s_mars_ineei_INFO1POS).append(" / "); field_str.append(s_mars_ineei_INFO1CALL); if (!s_mars_ineei_INFO1STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO1STATE); } if (!s_mars_ineei_INFO2CALL.empty() || !s_mars_ineei_INFO2POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO2POS.empty()) field_str.append(s_mars_ineei_INFO2POS).append(" / "); field_str.append(s_mars_ineei_INFO2CALL); if (!s_mars_ineei_INFO2STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO2STATE); } if (!s_mars_ineei_INFO3CALL.empty() || !s_mars_ineei_INFO3POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO3POS.empty()) field_str.append(s_mars_ineei_INFO3POS).append(" / "); field_str.append(s_mars_ineei_INFO3CALL); if (!s_mars_ineei_INFO3STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO3STATE); } if (!s_mars_ineei_INFO4CALL.empty() || !s_mars_ineei_INFO4POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO4POS.empty()) field_str.append(s_mars_ineei_INFO4POS).append(" / "); field_str.append(s_mars_ineei_INFO4CALL); if (!s_mars_ineei_INFO4STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO4STATE); } if (!s_mars_ineei_INFO5CALL.empty() || !s_mars_ineei_INFO5POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO5POS.empty()) field_str.append(s_mars_ineei_INFO5POS).append(" / "); field_str.append(s_mars_ineei_INFO5CALL); if (!s_mars_ineei_INFO5STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO5STATE); } if (!s_mars_ineei_INFO6CALL.empty() || !s_mars_ineei_INFO6POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO6POS.empty()) field_str.append(s_mars_ineei_INFO6POS).append("/"); field_str.append(s_mars_ineei_INFO6CALL); if (!s_mars_ineei_INFO6STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO6STATE); } if (!s_mars_ineei_INFO7CALL.empty() || !s_mars_ineei_INFO7POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO7POS.empty()) field_str.append(s_mars_ineei_INFO7POS).append("/"); field_str.append(s_mars_ineei_INFO7CALL); if (!s_mars_ineei_INFO7STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO7STATE); } if (!s_mars_ineei_INFO8CALL.empty() || !s_mars_ineei_INFO8POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO8POS.empty()) field_str.append(s_mars_ineei_INFO8POS).append("/"); field_str.append(s_mars_ineei_INFO8CALL); if (!s_mars_ineei_INFO8STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO8STATE); } if (!s_mars_ineei_INFO9CALL.empty() || !s_mars_ineei_INFO9POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO9POS.empty()) field_str.append(s_mars_ineei_INFO9POS).append("/"); field_str.append(s_mars_ineei_INFO9CALL); if (!s_mars_ineei_INFO9STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO9STATE); } if (!s_mars_ineei_INFO10CALL.empty() || !s_mars_ineei_INFO10POS.empty()) { if (field_str.empty()) field_str.append("\nINFO: "); else field_str.append("\n "); if (!s_mars_ineei_INFO10POS.empty()) field_str.append(s_mars_ineei_INFO10POS).append("/"); field_str.append(s_mars_ineei_INFO10CALL); if (!s_mars_ineei_INFO10STATE.empty()) field_str.append(" / ").append(s_mars_ineei_INFO10STATE); } replacestr(formnet, info_str, field_str); replacestr(formnet, mars_ineei_INCIDENT, s_mars_ineei_INCIDENT); replacestr(formnet, mars_ineei_INCIDENT, s_mars_ineei_INCIDENT); // 2 in form field_str.clear(); if (!s_mars_ineei_REF.empty()) field_str.append(s_mars_ineei_REF); if (!s_mars_ineei_STATE.empty()) field_str.append(" ").append(s_mars_ineei_STATE); temp = justify_remarks(field_str, strlen("1. REF EVENT IDENTIFIER: ")); replacestr(formnet, ref_str, temp); field_str.clear(); if (!s_mars_ineei_1A_INCIDENT.empty()) field_str.append(s_mars_ineei_1A_INCIDENT); if (!s_mars_ineei_1A_LOCATION.empty()) field_str.append(s_mars_ineei_1A_LOCATION); if (!s_mars_ineei_1A_TIME.empty()) field_str.append(s_mars_ineei_1A_TIME); temp = justify_remarks(field_str, strlen("A. INCIDENT LOCATION TIME: ")); replacestr(formnet, onea_str, temp); temp = justify_remarks(s_mars_ineei_1B_MEDFACSTS, strlen("B. EMERGENCY MEDICAL: ")); replacestr(formnet, mars_ineei_1B_MEDFACSTS, temp); temp = justify_remarks(s_mars_ineei_1C_TRNPSTS, strlen("C. LOCAL TRANSPORTATION: ")); replacestr(formnet, mars_ineei_1C_TRNPSTS, temp); temp = justify_remarks(s_mars_ineei_1D_DAMAGE, strlen("D. GENERAL DAMAGE DESCRIPTION: ")); replacestr(formnet, mars_ineei_1D_DAMAGE, temp); temp = justify_remarks(s_mars_ineei_1E_UTILSTS, strlen("E. UTILITY STATUS: ")); replacestr(formnet, mars_ineei_1E_UTILSTS, temp); temp = justify_remarks(s_mars_ineei_1F_COMMSTS, strlen("F. COMMUNICATIONS STATUS: ")); replacestr(formnet, mars_ineei_1F_COMMSTS, temp); field_str.clear(); if (!s_mars_ineei_1G_INFOSRC.empty()) field_str.append(s_mars_ineei_1G_INFOSRC); if (!s_mars_ineei_1G_INFOTIME.empty()) field_str.append(" ").append(s_mars_ineei_1G_INFOTIME); temp = justify_remarks(field_str, strlen("G. SOURCE OF INFO: ")); replacestr(formnet, oneg_str, temp); temp = justify_remarks(s_mars_ineei_1H_REMARKS, strlen("H. REMARKS: ")); replacestr(formnet, mars_ineei_1H_REMARKS, temp); return formnet; } void cb_mars_ineei_html() { string fname_name = fl_filename_name(def_mars_ineei_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); update_mars_ineei_fields(); string mars_ineei_fname = ICS_dir; mars_ineei_fname.append(fname_name); mars_ineei_fname.append(".html"); string textout = formated_output( mars_ineei_html_template ); FILE *filenet = fopen(mars_ineei_fname.c_str(), "w"); fprintf(filenet,"%s", textout.c_str()); fclose(filenet); open_url(mars_ineei_fname.c_str()); } void cb_mars_ineei_textout() { string mars_ineei_fname = ICS_dir; mars_ineei_fname.append("mars_ineei.txt"); update_mars_ineei_fields(); string textout = formated_output( mars_ineei_text_template ); FILE *filenet = fopen(mars_ineei_fname.c_str(), "w"); fprintf(filenet,"%s", textout.c_str()); fclose(filenet); open_url(mars_ineei_fname.c_str()); } /* ======================================================================== DE (CALL SIGN MSG NUMBER) (PRECEDENCE) (DTG OF MSG IN Z TIME FORMAT: DYTTTTZ MON YEAR) FM (LAST NAME/CALL SIGN ST OF SENDING STATION) TO RD/AAA1RD MA (POSITION/CALLSIGN ST OF RECIPIENT) INFO REOO/AAM1RE NH (POSITION/CALLSIGN ST OF INFO COPY) INFO (POSITION/CALL SIGN ST OF INFO COPY STATION) BT (MARS EXERCISE OR ACTUAL INCIDENT) SUBJECT: IN/EEI REPORT 1. REF (USE APPOPRIATE EVENT IDENTIFIER) / STATE A. (INCIDENT & LOCATION & TIME) B. (EMERGENCY MEDICAL FACILITY STATUS) C. (LOCAL TRANSPORTATION STATUS) D. (GENERAL DAMAGE CHARACTERISTICS) E. (AREA UTILITY STATUS) F. (COMMUNICATION STATUS) G. (INFORMATION SOURCE/TIME) H. (1H_REMARKS) (MARS EXERCISE OR ACTUAL INCIDENT) BT /EX NNNN ======================================================================== DE AFA5FE/T NR 1 R 061535Z OCT 2012 FM DAVE ANTRY / AFA5FE/T IL TO: AFN2EC NY INFO: AFD4EC SC AFE5EC WI AFF5IL IL BT REF. MARS EXERCISE SUBJ. EEI REPORT 1. REF EVENT IDENTIFIER: BLACK ICE A. INCIDENT LOCATION TIME: ST. CLAIR COUNTY ILLINOIS B. EMERGENCY MEDICAL: NOT AFFECTED C. LOCAL TRANSPORTATION: ALL SECONDARY ROADS ICE COVERED AND IMPASSABLE D. GENERAL DAMAGE DESCRIPTION: MAJOR WINTER ICE STORM. E. UTILITY STATUS: LOCALIZED POWER OUTAGES ARE ALREADY OCCURING. F. COMMUNICATIONS STATUS: OPERATIONAL G. SOURCE OF INFO: ST. CLAIR COUNTY EMERGENCY SERVICES DISASTER AGENCY OFFICAL H. REMARKS: SECONDARY ROADS IMPASSABLE DUE TO PLOWS CONCENTRATING ON MAIN HIGHWAYS. EXPECT MAIN HIGHWAYS TO BECOME IMPASSABLE AND MAJOR POWER OUTAGES PUTTING MOST COMMUNICATIONS CENTERS ON EMERGENCY BACKUP POWER IF FORECASTED ICE ACCUMLATIONS OF UP TO 2 INCHES DURING OVERNIGHT HOURS OCCURS. MARS EXERCISE BT NNNN */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_daily.cxx����������������������������������������������������������������0000664�0001750�0001750�00000073454�12330516146�014244� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "parse_xml.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; const char mars_precedent[] = "RPOZ"; const char mars_e_x[] = "EX"; string mars_daily_incident = ":md_inc:"; string mars_daily_de = ":md_de_:"; string mars_daily_nbr = ":md_nbr:"; string mars_daily_prec = ":md_pre:"; string mars_daily_dtg = ":md_dtg:"; string mars_daily_fm_name = ":md_fnm:"; string mars_daily_fm_call = ":md_fcl:"; string mars_daily_fm_state = ":md_fst:"; string mars_daily_to_pos = ":md_tps:"; string mars_daily_to_call = ":md_tcl:"; string mars_daily_to_state = ":md_tst:"; string mars_daily_pos1 = ":md_ps1:"; string mars_daily_call1 = ":md_cl1:"; string mars_daily_state1 = ":md_st1:"; string mars_daily_pos2 = ":md_ps2:"; string mars_daily_call2 = ":md_cl2:"; string mars_daily_state2 = ":md_st2:"; string mars_daily_pos3 = ":md_ps3:"; string mars_daily_call3 = ":md_cl3:"; string mars_daily_state3 = ":md_st3:"; string mars_daily_sitrep_id = ":md_sid:"; string mars_daily_sitrep_loc = ":md_slo:"; string mars_daily_24hr = ":md_22h:"; string mars_daily_netcall = ":md_ncl:"; string mars_daily_e_x = ":md_e_x:"; string mars_daily_dtg_active = ":md_dta:"; string mars_daily_dtg_deactive = ":md_dtd:"; string mars_daily_nbr_stations = ":md_nst:"; string mars_daily_details = ":md_det:"; string mars_daily_activations = ":md_acs:"; string mars_daily_agencies = ":md_agy:"; string mars_daily_remarks = ":md_rem:"; string s_mars_daily_incident; string s_mars_daily_de; string s_mars_daily_nbr; string s_mars_daily_prec = "R"; string s_mars_daily_dtg; string s_mars_daily_fm_name; string s_mars_daily_fm_call; string s_mars_daily_fm_state; string s_mars_daily_to_pos; string s_mars_daily_to_call; string s_mars_daily_to_state; string s_mars_daily_pos1; string s_mars_daily_call1; string s_mars_daily_state1; string s_mars_daily_pos2; string s_mars_daily_call2; string s_mars_daily_state2; string s_mars_daily_pos3; string s_mars_daily_call3; string s_mars_daily_state3; string s_mars_daily_sitrep_id; string s_mars_daily_sitrep_loc; string s_mars_daily_24hr; string s_mars_daily_netcall; string s_mars_daily_e_x = "X"; string s_mars_daily_dtg_active; string s_mars_daily_dtg_deactive; string s_mars_daily_nbr_stations; string s_mars_daily_details; string s_mars_daily_activations; string s_mars_daily_agencies; string s_mars_daily_remarks; string buffmars_daily; string def_mars_daily_filename = ""; string base_mars_daily_filename = ""; string def_mars_daily_TemplateName = ""; bool using_mars_daily_template = false; void clear_mars_dailyfields() { s_mars_daily_incident.clear(); s_mars_daily_de.clear(); s_mars_daily_nbr.clear(); s_mars_daily_prec = "R"; s_mars_daily_dtg.clear(); s_mars_daily_fm_name.clear(); s_mars_daily_fm_call.clear(); s_mars_daily_fm_state.clear(); s_mars_daily_to_pos.clear(); s_mars_daily_to_call.clear(); s_mars_daily_to_state.clear(); s_mars_daily_pos1.clear(); s_mars_daily_call1.clear(); s_mars_daily_state1.clear(); s_mars_daily_pos2.clear(); s_mars_daily_call2.clear(); s_mars_daily_state2.clear(); s_mars_daily_pos3.clear(); s_mars_daily_call3.clear(); s_mars_daily_state3.clear(); s_mars_daily_sitrep_id.clear(); s_mars_daily_sitrep_loc.clear(); s_mars_daily_24hr.clear(); s_mars_daily_netcall.clear(); s_mars_daily_e_x = "X"; s_mars_daily_dtg_active.clear(); s_mars_daily_dtg_deactive.clear(); s_mars_daily_nbr_stations.clear(); s_mars_daily_details.clear(); s_mars_daily_activations.clear(); s_mars_daily_agencies.clear(); s_mars_daily_remarks.clear(); } bool check_mars_dailyfields() { string temp; if (s_mars_daily_incident != txt_mars_daily_incident->value()) return true; if (s_mars_daily_de != txt_mars_daily_de->value()) return true; if (s_mars_daily_nbr != txt_mars_daily_nbr->value()) return true; int val = sel_mars_daily_prec->index(); temp.clear(); temp += mars_precedent[val]; if (s_mars_daily_prec != temp) return true; if (s_mars_daily_dtg != txt_mars_daily_dtg->value()) return true; if (s_mars_daily_fm_name != txt_mars_daily_fm_name->value()) return true; if (s_mars_daily_fm_call != txt_mars_daily_fm_call->value()) return true; if (s_mars_daily_fm_state != txt_mars_daily_fm_state->value()) return true; if (s_mars_daily_to_pos != txt_mars_daily_to_pos->value()) return true; if (s_mars_daily_to_call != txt_mars_daily_to_call->value()) return true; if (s_mars_daily_to_state != txt_mars_daily_to_state->value()) return true; if (s_mars_daily_pos1 != txt_mars_daily_pos1->value()) return true; if (s_mars_daily_call1 != txt_mars_daily_call1->value()) return true; if (s_mars_daily_state1 != txt_mars_daily_state1->value()) return true; if (s_mars_daily_pos2 != txt_mars_daily_pos2->value()) return true; if (s_mars_daily_call2 != txt_mars_daily_call2->value()) return true; if (s_mars_daily_state2 != txt_mars_daily_state2->value()) return true; if (s_mars_daily_pos3 != txt_mars_daily_pos3->value()) return true; if (s_mars_daily_call3 != txt_mars_daily_call3->value()) return true; if (s_mars_daily_state3 != txt_mars_daily_state3->value()) return true; if (s_mars_daily_sitrep_id != txt_mars_daily_sitrep_id->value()) return true; if (s_mars_daily_sitrep_loc != txt_mars_daily_sitrep_loc->value()) return true; if (s_mars_daily_24hr != txt_mars_daily_dtg_24hr->value()) return true; if (s_mars_daily_netcall != txt_mars_daily_netcall->value()) return true; temp.clear(); temp += mars_e_x[sel_mars_daily_e_x->index()]; if (s_mars_daily_e_x != temp) return true; if (s_mars_daily_dtg_active != txt_mars_daily_dtg_active->value()) return true; if (s_mars_daily_dtg_deactive != txt_mars_daily_dtg_deactive->value()) return true; if (s_mars_daily_nbr_stations != txt_mars_daily_nbr_stations->value()) return true; if (s_mars_daily_details != txt_mars_daily_details->value()) return true; if (s_mars_daily_activations != txt_mars_daily_activations->value()) return true; if (s_mars_daily_agencies != txt_mars_daily_agencies->value()) return true; if (s_mars_daily_remarks != txt_mars_daily_remarks->value()) return true; return false; } void update_mars_dailyfields() { s_mars_daily_incident = txt_mars_daily_incident->value(); s_mars_daily_de = txt_mars_daily_de->value(); s_mars_daily_nbr = txt_mars_daily_nbr->value(); size_t n = sel_mars_daily_prec->index(); if (n < 0) n = 0; if (n >= strlen(mars_precedent)) n = strlen(mars_precedent) - 1; s_mars_daily_prec = mars_precedent[n]; s_mars_daily_dtg = txt_mars_daily_dtg->value(); s_mars_daily_fm_name = txt_mars_daily_fm_name->value(); s_mars_daily_fm_call = txt_mars_daily_fm_call->value(); s_mars_daily_fm_state = txt_mars_daily_fm_state->value(); s_mars_daily_to_pos = txt_mars_daily_to_pos->value(); s_mars_daily_to_call = txt_mars_daily_to_call->value(); s_mars_daily_to_state = txt_mars_daily_to_state->value(); s_mars_daily_pos1 = txt_mars_daily_pos1->value(); s_mars_daily_call1 = txt_mars_daily_call1->value(); s_mars_daily_state1 = txt_mars_daily_state1->value(); s_mars_daily_pos2 = txt_mars_daily_pos2->value(); s_mars_daily_call2 = txt_mars_daily_call2->value(); s_mars_daily_state2 = txt_mars_daily_state2->value(); s_mars_daily_pos3 = txt_mars_daily_pos3->value(); s_mars_daily_call3 = txt_mars_daily_call3->value(); s_mars_daily_state3 = txt_mars_daily_state3->value(); s_mars_daily_sitrep_id = txt_mars_daily_sitrep_id->value(); s_mars_daily_sitrep_loc = txt_mars_daily_sitrep_loc->value(); s_mars_daily_24hr = txt_mars_daily_dtg_24hr->value(); s_mars_daily_netcall = txt_mars_daily_netcall->value(); n = sel_mars_daily_e_x->index(); if (n < 0) n = 0; if (n >= strlen(mars_e_x)) n = strlen(mars_e_x) - 1; s_mars_daily_e_x = mars_e_x[n]; s_mars_daily_dtg_active = txt_mars_daily_dtg_active->value(); s_mars_daily_dtg_deactive = txt_mars_daily_dtg_deactive->value(); s_mars_daily_nbr_stations = txt_mars_daily_nbr_stations->value(); s_mars_daily_details = txt_mars_daily_details->value(); s_mars_daily_activations = txt_mars_daily_activations->value(); s_mars_daily_agencies = txt_mars_daily_agencies->value(); s_mars_daily_remarks = txt_mars_daily_remarks->value(); } void update_mars_dailyform() { txt_mars_daily_incident->value(s_mars_daily_incident.c_str()); txt_mars_daily_de->value(s_mars_daily_de.c_str()); txt_mars_daily_nbr->value(s_mars_daily_nbr.c_str()); size_t n = strchr(mars_precedent, s_mars_daily_prec[0]) - mars_precedent; if (n < 0) n = 0; if (n >= strlen(mars_precedent)) n = strlen(mars_precedent) - 1; sel_mars_daily_prec->index(n); txt_mars_daily_dtg->value(s_mars_daily_dtg.c_str()); txt_mars_daily_fm_name->value(s_mars_daily_fm_name.c_str()); txt_mars_daily_fm_call->value(s_mars_daily_fm_call.c_str()); txt_mars_daily_fm_state->value(s_mars_daily_fm_state.c_str()); txt_mars_daily_to_pos->value(s_mars_daily_to_pos.c_str()); txt_mars_daily_to_call->value(s_mars_daily_to_call.c_str()); txt_mars_daily_to_state->value(s_mars_daily_to_state.c_str()); txt_mars_daily_pos1->value(s_mars_daily_pos1.c_str()); txt_mars_daily_call1->value(s_mars_daily_call1.c_str()); txt_mars_daily_state1->value(s_mars_daily_state1.c_str()); txt_mars_daily_pos2->value(s_mars_daily_pos2.c_str()); txt_mars_daily_call2->value(s_mars_daily_call2.c_str()); txt_mars_daily_state2->value(s_mars_daily_state2.c_str()); txt_mars_daily_pos3->value(s_mars_daily_pos3.c_str()); txt_mars_daily_call3->value(s_mars_daily_call3.c_str()); txt_mars_daily_state3->value(s_mars_daily_state3.c_str()); txt_mars_daily_sitrep_id->value(s_mars_daily_sitrep_id.c_str()); txt_mars_daily_sitrep_loc->value(s_mars_daily_sitrep_loc.c_str()); txt_mars_daily_dtg_24hr->value(s_mars_daily_24hr.c_str()); txt_mars_daily_netcall->value(s_mars_daily_netcall.c_str()); n = strchr(mars_e_x, s_mars_daily_e_x[0]) - mars_e_x; if (n < 0) n = 0; if (n >= strlen(mars_e_x)) n = strlen(mars_e_x) - 1; sel_mars_daily_e_x->index(n); txt_mars_daily_dtg_active->value(s_mars_daily_dtg_active.c_str()); txt_mars_daily_dtg_deactive->value(s_mars_daily_dtg_deactive.c_str()); txt_mars_daily_nbr_stations->value(s_mars_daily_nbr_stations.c_str()); txt_mars_daily_details->value(s_mars_daily_details.c_str()); txt_mars_daily_activations->value(s_mars_daily_activations.c_str()); txt_mars_daily_agencies->value(s_mars_daily_agencies.c_str()); txt_mars_daily_remarks->value(s_mars_daily_remarks.c_str()); } void clear_mars_daily_form() { clear_mars_dailyfields(); txt_mars_daily_incident->value(""); txt_mars_daily_de->value(""); txt_mars_daily_nbr->value(""); sel_mars_daily_prec->index(0); txt_mars_daily_dtg->value(""); txt_mars_daily_fm_name->value(""); txt_mars_daily_fm_call->value(""); txt_mars_daily_fm_state->value(""); txt_mars_daily_to_pos->value(""); txt_mars_daily_to_call->value(""); txt_mars_daily_to_state->value(""); txt_mars_daily_pos1->value(""); txt_mars_daily_call1->value(""); txt_mars_daily_state1->value(""); txt_mars_daily_pos2->value(""); txt_mars_daily_call2->value(""); txt_mars_daily_state2->value(""); txt_mars_daily_pos3->value(""); txt_mars_daily_call3->value(""); txt_mars_daily_state3->value(""); txt_mars_daily_sitrep_id->value(""); txt_mars_daily_sitrep_loc->value(""); txt_mars_daily_dtg_24hr->value(""); txt_mars_daily_netcall->value(""); sel_mars_daily_e_x->index(1); txt_mars_daily_dtg_active->value(""); txt_mars_daily_dtg_deactive->value(""); txt_mars_daily_nbr_stations->value(""); txt_mars_daily_details->value(""); txt_mars_daily_activations->value(""); txt_mars_daily_agencies->value(""); txt_mars_daily_remarks->value(""); } void make_buffmars_daily(bool compress = false) { string mbuff; mbuff.clear(); mbuff.append( lineout( mars_daily_incident, s_mars_daily_incident ) ); mbuff.append( lineout( mars_daily_de, s_mars_daily_de ) ); mbuff.append( lineout( mars_daily_nbr, s_mars_daily_nbr ) ); mbuff.append( lineout( mars_daily_prec, s_mars_daily_prec ) ); mbuff.append( lineout( mars_daily_dtg, s_mars_daily_dtg ) ); mbuff.append( lineout( mars_daily_fm_name, s_mars_daily_fm_name ) ); mbuff.append( lineout( mars_daily_fm_call, s_mars_daily_fm_call ) ); mbuff.append( lineout( mars_daily_fm_state, s_mars_daily_fm_state ) ); mbuff.append( lineout( mars_daily_to_pos, s_mars_daily_to_pos ) ); mbuff.append( lineout( mars_daily_to_call, s_mars_daily_to_call ) ); mbuff.append( lineout( mars_daily_to_state, s_mars_daily_to_state ) ); mbuff.append( lineout( mars_daily_pos1, s_mars_daily_pos1 ) ); mbuff.append( lineout( mars_daily_call1, s_mars_daily_call1 ) ); mbuff.append( lineout( mars_daily_state1, s_mars_daily_state1 ) ); mbuff.append( lineout( mars_daily_pos2, s_mars_daily_pos2 ) ); mbuff.append( lineout( mars_daily_call2, s_mars_daily_call2 ) ); mbuff.append( lineout( mars_daily_state2, s_mars_daily_state2 ) ); mbuff.append( lineout( mars_daily_pos3, s_mars_daily_pos3 ) ); mbuff.append( lineout( mars_daily_call3, s_mars_daily_call3 ) ); mbuff.append( lineout( mars_daily_state3, s_mars_daily_state3 ) ); mbuff.append( lineout( mars_daily_sitrep_id, s_mars_daily_sitrep_id ) ); mbuff.append( lineout( mars_daily_sitrep_loc, s_mars_daily_sitrep_loc ) ); mbuff.append( lineout( mars_daily_24hr, s_mars_daily_24hr ) ); mbuff.append( lineout( mars_daily_netcall, s_mars_daily_netcall ) ); mbuff.append( lineout( mars_daily_e_x, s_mars_daily_e_x ) ); mbuff.append( lineout( mars_daily_dtg_active, s_mars_daily_dtg_active ) ); mbuff.append( lineout( mars_daily_dtg_deactive,s_mars_daily_dtg_deactive ) ); mbuff.append( lineout( mars_daily_nbr_stations,s_mars_daily_nbr_stations ) ); mbuff.append( lineout( mars_daily_details, s_mars_daily_details ) ); mbuff.append( lineout( mars_daily_activations, s_mars_daily_activations ) ); mbuff.append( lineout( mars_daily_agencies, s_mars_daily_agencies ) ); mbuff.append( lineout( mars_daily_remarks, s_mars_daily_remarks ) ); if (compress) compress_maybe(mbuff); buffmars_daily.append(mbuff); } void read_mars_daily_buffer(string data) { clear_mars_dailyfields(); s_mars_daily_incident = findstr( data, mars_daily_incident ); s_mars_daily_de = findstr( data, mars_daily_de ); s_mars_daily_nbr = findstr( data, mars_daily_nbr ); s_mars_daily_prec = findstr( data, mars_daily_prec ); s_mars_daily_dtg = findstr( data, mars_daily_dtg ); s_mars_daily_fm_name = findstr( data, mars_daily_fm_name ); s_mars_daily_fm_call = findstr( data, mars_daily_fm_call ); s_mars_daily_fm_state = findstr( data, mars_daily_fm_state ); s_mars_daily_to_pos = findstr( data, mars_daily_to_pos ); s_mars_daily_to_call = findstr( data, mars_daily_to_call ); s_mars_daily_to_state = findstr( data, mars_daily_to_state ); s_mars_daily_pos1 = findstr( data, mars_daily_pos1 ); s_mars_daily_call1 = findstr( data, mars_daily_call1 ); s_mars_daily_state1 = findstr( data, mars_daily_state1 ); s_mars_daily_pos2 = findstr( data, mars_daily_pos2 ); s_mars_daily_call2 = findstr( data, mars_daily_call2 ); s_mars_daily_state2 = findstr( data, mars_daily_state2 ); s_mars_daily_pos3 = findstr( data, mars_daily_pos3 ); s_mars_daily_call3 = findstr( data, mars_daily_call3 ); s_mars_daily_state3 = findstr( data, mars_daily_state3 ); s_mars_daily_sitrep_id = findstr( data, mars_daily_sitrep_id ); s_mars_daily_sitrep_loc = findstr( data, mars_daily_sitrep_loc ); s_mars_daily_24hr = findstr( data, mars_daily_24hr ); s_mars_daily_netcall = findstr( data, mars_daily_netcall ); s_mars_daily_e_x = findstr( data, mars_daily_e_x ); s_mars_daily_dtg_active = findstr( data, mars_daily_dtg_active ); s_mars_daily_dtg_deactive = findstr( data, mars_daily_dtg_deactive ); s_mars_daily_nbr_stations = findstr( data, mars_daily_nbr_stations ); s_mars_daily_details = findstr( data, mars_daily_details ); s_mars_daily_activations = findstr( data, mars_daily_activations ); s_mars_daily_agencies = findstr( data, mars_daily_agencies ); s_mars_daily_remarks = findstr( data, mars_daily_remarks ); update_mars_dailyform(); } void cb_mars_daily_new() { if (check_mars_dailyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 1) { update_header(CHANGED); cb_mars_daily_save(); } } clear_mars_daily_form(); def_mars_daily_filename = ICS_msg_dir; def_mars_daily_filename.append("new"FMARSDAILY_EXT); show_filename(def_mars_daily_filename); using_mars_daily_template = false; } void cb_mars_daily_import() { fl_alert2("Not implemented"); } void cb_mars_daily_export() { fl_alert2("Not implemented"); } void cb_mars_daily_wrap_import(string wrapfilename, string inpbuffer) { clear_mars_daily_form(); read_mars_daily_buffer(inpbuffer); def_mars_daily_filename = ICS_msg_dir; def_mars_daily_filename.append(wrapfilename); show_filename(def_mars_daily_filename); using_mars_daily_template = false; } int eval_mars_daily_fsize() { Ccrc16 chksum; evalstr.assign("[WRAP:beg][WRAP:lf][WRAP:fn "); evalstr.append(base_mars_daily_filename).append("]"); update_mars_dailyfields(); update_header(FROM); evalstr.append(header("<mars_daily>")); buffmars_daily.clear(); make_buffmars_daily(true); if (buffmars_daily.empty()) return 0; compress_maybe( buffmars_daily ); evalstr.append( buffmars_daily ); evalstr.append("[WRAP:chksum ").append(chksum.scrc16(evalstr)).append("][WRAP:end]"); return evalstr.length(); } void cb_mars_daily_wrap_export() { if (check_mars_dailyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_dailyfields(); if (base_mars_daily_filename == "new"FMARSDAILY_EXT || base_mars_daily_filename == "default"FMARSDAILY_EXT) if (!cb_mars_daily_save_as()) return; string wrapfilename = WRAP_send_dir; wrapfilename.append(base_mars_daily_filename); wrapfilename.append(".wrap"); const char *p = FSEL::saveas( "Save as wrap file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) { string pext = fl_filename_ext(p); wrapfilename = p; update_header(FROM); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(true); export_wrapfile(base_mars_daily_filename, wrapfilename, buffmars_daily, pext != ".wrap"); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(false); write_mars_daily(def_mars_daily_filename); } } void cb_mars_daily_wrap_autosend() { if (check_mars_dailyfields()) { if (fl_choice2("Form modified, save?", "No", "Yes", NULL) == 0) return; update_header(CHANGED); } update_mars_dailyfields(); if (base_mars_daily_filename == "new"FMARSDAILY_EXT || base_mars_daily_filename == "default"FMARSDAILY_EXT) if (!cb_mars_daily_save_as()) return; update_header(FROM); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(true); xfr_via_socket(base_mars_daily_filename, buffmars_daily); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(false); write_mars_daily(def_mars_daily_filename); } void cb_mars_daily_load_template() { string def_mars_daily_filename = def_mars_daily_TemplateName; const char *p = FSEL::select( "Open template file", "Template file\t*"TMARSDAILY_EXT, def_mars_daily_filename.c_str()); if (p) { clear_mars_daily_form(); read_data_file(p); def_mars_daily_TemplateName = p; show_filename(def_mars_daily_TemplateName); using_mars_daily_template = true; } } void cb_mars_daily_save_template() { if (!using_mars_daily_template) { cb_mars_daily_save_as_template(); return; } string def_mars_daily_filename = def_mars_daily_TemplateName; const char *p = FSEL::saveas( "Save template file", "Template file\t*"TMARSDAILY_EXT, def_mars_daily_filename.c_str()); if (p) { update_header(CHANGED); update_mars_dailyfields(); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(); write_mars_daily(p); } } void cb_mars_daily_save_as_template() { string def_mars_daily_filename = def_mars_daily_TemplateName; const char *p = FSEL::saveas( "Save as template file", "Template file\t*"TMARSDAILY_EXT, def_mars_daily_filename.c_str()); if (p) { const char *pext = fl_filename_ext(p); def_mars_daily_TemplateName = p; if (strlen(pext) == 0) def_mars_daily_TemplateName.append(TMARSDAILY_EXT); remove_spaces_from_filename(def_mars_daily_TemplateName); clear_header(); update_header(CHANGED); update_mars_dailyfields(); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(); write_mars_daily(def_mars_daily_TemplateName); show_filename(def_mars_daily_TemplateName); using_mars_daily_template = true; } } void cb_mars_daily_open() { const char *p = FSEL::select(_("Open data file"), "ICS-mars_daily\t*"FMARSDAILY_EXT, def_mars_daily_filename.c_str()); if (!p) return; if (strlen(p) == 0) return; clear_mars_daily_form(); read_data_file(p); using_mars_daily_template = false; def_mars_daily_filename = p; show_filename(def_mars_daily_filename); } void write_mars_daily(string s) { FILE *filemars_daily = fopen(s.c_str(), "w"); if (!filemars_daily) return; fwrite(buffmars_daily.c_str(), buffmars_daily.length(), 1, filemars_daily); fclose(filemars_daily); } bool cb_mars_daily_save_as() { const char *p; string newfilename; string name = named_file(); if (!name.empty()) { name.append(FMARSDAILY_EXT); newfilename = ICS_msg_dir; newfilename.append(name); } else newfilename = def_mars_daily_filename; p = FSEL::saveas(_("Save data file"), "ICS-mars_daily\t*"FMARSDAILY_EXT, newfilename.c_str()); if (!p) return false; if (strlen(p) == 0) return false; if (progStatus.sernbr_fname) { string haystack = p; if (haystack.find(newfilename) != string::npos) { int n = atoi(progStatus.sernbr.c_str()); n++; char szn[10]; snprintf(szn, sizeof(szn), "%d", n); progStatus.sernbr = szn; txt_sernbr->value(szn); txt_sernbr->redraw(); } } const char *pext = fl_filename_ext(p); def_mars_daily_filename = p; if (strlen(pext) == 0) def_mars_daily_filename.append(FMARSDAILY_EXT); remove_spaces_from_filename(def_mars_daily_filename); update_header(NEW); update_mars_dailyfields(); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(); write_mars_daily(def_mars_daily_filename); using_mars_daily_template = false; show_filename(def_mars_daily_filename); return true; } void cb_mars_daily_save() { if (base_mars_daily_filename == "new"FMARSDAILY_EXT || base_mars_daily_filename == "default"FMARSDAILY_EXT || using_mars_daily_template == true) { cb_mars_daily_save_as(); return; } if (check_mars_dailyfields()) update_header(CHANGED); update_mars_dailyfields(); buffmars_daily.assign(header("<mars_daily>")); make_buffmars_daily(); write_mars_daily(def_mars_daily_filename); using_mars_daily_template = false; } void cb_mars_daily_html() { string fname_name = fl_filename_name(def_mars_daily_filename.c_str()); size_t p = fname_name.rfind('.'); if (p != string::npos) fname_name.erase(p); string mars_daily_fname = ICS_dir; mars_daily_fname.append(fname_name); mars_daily_fname.append(".html"); string html_text = ""; update_mars_dailyfields(); string formmars_daily = mars_daily_html_template; replacestr(formmars_daily, TITLE, fname_name); replacestr(formmars_daily, mars_daily_incident, s_mars_daily_incident ); replacestr(formmars_daily, mars_daily_incident, s_mars_daily_incident ); replacestr(formmars_daily, mars_daily_de, s_mars_daily_de ); replacestr(formmars_daily, mars_daily_nbr, s_mars_daily_nbr ); replacestr(formmars_daily, mars_daily_prec, s_mars_daily_prec ); replacestr(formmars_daily, mars_daily_dtg, s_mars_daily_dtg ); replacestr(formmars_daily, mars_daily_fm_name, s_mars_daily_fm_name ); replacestr(formmars_daily, mars_daily_fm_call, s_mars_daily_fm_call ); replacestr(formmars_daily, mars_daily_fm_state, s_mars_daily_fm_state ); replacestr(formmars_daily, mars_daily_to_pos, s_mars_daily_to_pos ); replacestr(formmars_daily, mars_daily_to_call, s_mars_daily_to_call ); replacestr(formmars_daily, mars_daily_to_state, s_mars_daily_to_state ); replacestr(formmars_daily, mars_daily_pos1, s_mars_daily_pos1 ); replacestr(formmars_daily, mars_daily_call1, s_mars_daily_call1 ); replacestr(formmars_daily, mars_daily_state1, s_mars_daily_state1 ); replacestr(formmars_daily, mars_daily_pos2, s_mars_daily_pos2 ); replacestr(formmars_daily, mars_daily_call2, s_mars_daily_call2 ); replacestr(formmars_daily, mars_daily_state2, s_mars_daily_state2 ); replacestr(formmars_daily, mars_daily_pos3, s_mars_daily_pos3 ); replacestr(formmars_daily, mars_daily_call3, s_mars_daily_call3 ); replacestr(formmars_daily, mars_daily_state3, s_mars_daily_state3 ); replacestr(formmars_daily, mars_daily_sitrep_id, s_mars_daily_sitrep_id ); replacestr(formmars_daily, mars_daily_sitrep_loc, s_mars_daily_sitrep_loc ); replacestr(formmars_daily, mars_daily_24hr, s_mars_daily_24hr ); replacestr(formmars_daily, mars_daily_netcall, s_mars_daily_netcall ); replacestr(formmars_daily, mars_daily_e_x, s_mars_daily_e_x ); replacestr(formmars_daily, mars_daily_dtg_active, s_mars_daily_dtg_active ); replacestr(formmars_daily, mars_daily_dtg_deactive, s_mars_daily_dtg_deactive ); replacestr(formmars_daily, mars_daily_nbr_stations, s_mars_daily_nbr_stations ); replacestr(formmars_daily, mars_daily_details, s_mars_daily_details ); replacestr(formmars_daily, mars_daily_activations, s_mars_daily_activations ); replacestr(formmars_daily, mars_daily_agencies, s_mars_daily_agencies ); replacestr(formmars_daily, mars_daily_remarks, s_mars_daily_remarks ); FILE *filemars_daily = fopen(mars_daily_fname.c_str(), "w"); fprintf(filemars_daily,"%s", formmars_daily.c_str()); fclose(filemars_daily); open_url(mars_daily_fname.c_str()); } void cb_mars_daily_msg_type() { if (tabs_msg_type->value() == tab_mars_daily ) { show_filename(def_mars_daily_filename); } else { show_filename(def_rg_filename); } } void cb_mars_daily_textout() { string temp = ""; string mars_daily_fname = ICS_dir; mars_daily_fname.append("mars_daily.txt"); update_mars_dailyfields(); string formmars_daily = mars_daily_text_template; replacestr(formmars_daily, mars_daily_incident, s_mars_daily_incident ); replacestr(formmars_daily, mars_daily_incident, s_mars_daily_incident ); replacestr(formmars_daily, mars_daily_de, s_mars_daily_de ); replacestr(formmars_daily, mars_daily_nbr, s_mars_daily_nbr ); replacestr(formmars_daily, mars_daily_prec, s_mars_daily_prec ); replacestr(formmars_daily, mars_daily_dtg, s_mars_daily_dtg ); replacestr(formmars_daily, mars_daily_fm_name, s_mars_daily_fm_name ); replacestr(formmars_daily, mars_daily_fm_call, s_mars_daily_fm_call ); replacestr(formmars_daily, mars_daily_fm_state, s_mars_daily_fm_state ); replacestr(formmars_daily, mars_daily_to_pos, s_mars_daily_to_pos ); replacestr(formmars_daily, mars_daily_to_call, s_mars_daily_to_call ); replacestr(formmars_daily, mars_daily_to_state, s_mars_daily_to_state ); replacestr(formmars_daily, mars_daily_pos1, s_mars_daily_pos1 ); replacestr(formmars_daily, mars_daily_call1, s_mars_daily_call1 ); replacestr(formmars_daily, mars_daily_state1, s_mars_daily_state1 ); replacestr(formmars_daily, mars_daily_pos2, s_mars_daily_pos2 ); replacestr(formmars_daily, mars_daily_call2, s_mars_daily_call2 ); replacestr(formmars_daily, mars_daily_state2, s_mars_daily_state2 ); replacestr(formmars_daily, mars_daily_pos3, s_mars_daily_pos3 ); replacestr(formmars_daily, mars_daily_call3, s_mars_daily_call3 ); replacestr(formmars_daily, mars_daily_state3, s_mars_daily_state3 ); replacestr(formmars_daily, mars_daily_sitrep_id, s_mars_daily_sitrep_id ); replacestr(formmars_daily, mars_daily_sitrep_loc, s_mars_daily_sitrep_loc ); replacestr(formmars_daily, mars_daily_24hr, s_mars_daily_24hr ); replacestr(formmars_daily, mars_daily_netcall, s_mars_daily_netcall ); replacestr(formmars_daily, mars_daily_e_x, s_mars_daily_e_x ); replacestr(formmars_daily, mars_daily_dtg_active, s_mars_daily_dtg_active ); replacestr(formmars_daily, mars_daily_dtg_deactive, s_mars_daily_dtg_deactive ); replacestr(formmars_daily, mars_daily_nbr_stations, s_mars_daily_nbr_stations ); replacestr(formmars_daily, mars_daily_details, s_mars_daily_details ); replacestr(formmars_daily, mars_daily_activations, s_mars_daily_activations ); replacestr(formmars_daily, mars_daily_agencies, s_mars_daily_agencies ); replacestr(formmars_daily, mars_daily_remarks, s_mars_daily_remarks ); FILE *filemars_daily = fopen(mars_daily_fname.c_str(), "w"); fprintf(filemars_daily,"%s", formmars_daily.c_str()); fclose(filemars_daily); open_url(mars_daily_fname.c_str()); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/mars/mars_daily_tab.cxx������������������������������������������������������������0000664�0001750�0001750�00000041760�12330516146�015065� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" Fl_Group *tab_mars_daily = (Fl_Group *)0; Fl_Tabs *tab_mars_daily_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_daily_1 = (Fl_Group *)0; Fl_Input2 *txt_mars_daily_incident = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_de = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_nbr = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_dtg = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_fm_name = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_fm_call = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_fm_state = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_to_pos = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_to_call = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_to_state = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_pos1 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_call1 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_state1 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_pos2 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_call2 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_state2 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_pos3 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_call3 = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_state3 = (Fl_Input2 *)0; Fl_Button *btn_mars_daily_de_me = (Fl_Button *)0; Fl_Button *btn_mars_daily_dtg = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_fm = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_to = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_info1 = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_info2 = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_info3 = (Fl_Button *)0; Fl_ListBox *sel_mars_daily_prec = (Fl_ListBox *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_daily_2 = (Fl_Group *)0; Fl_Input2 *txt_mars_daily_sitrep_id = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_sitrep_loc = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_dtg_24hr = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_netcall = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_dtg_active = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_dtg_deactive = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_nbr_stations = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_details = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_activations = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_agencies = (Fl_Input2 *)0; Fl_Input2 *txt_mars_daily_remarks = (Fl_Input2 *)0; Fl_Button *btn_mars_daily_dtg_24hr = (Fl_Button *)0; Fl_Button *btn_mars_daily_pick_netcall = (Fl_Button *)0; Fl_Button *btn_mars_daily_dtg_active = (Fl_Button *)0; Fl_Button *btn_mars_daily_dtg_deactive = (Fl_Button *)0; Fl_ListBox *sel_mars_daily_e_x = (Fl_ListBox *)0; //---------------------------------------------------------------------- // widget callbacks & support void cb_btn_mars_daily_de_me(Fl_Widget *w, void *d) { txt_mars_daily_de->value(progStatus.my_call.c_str()); } void cb_btn_mars_daily_pick_fm(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_fm_call->value(mars_list_call.c_str()); txt_mars_daily_fm_name->value(mars_list_lname.c_str()); txt_mars_daily_fm_state->value(mars_list_state.c_str()); } void cb_btn_mars_daily_pick_to(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_to_call->value(mars_list_bcall.c_str()); txt_mars_daily_to_pos->value(mars_list_position.c_str()); txt_mars_daily_to_state->value(mars_list_state.c_str()); } void cb_btn_mars_daily_pick_info1(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_call1->value(mars_list_bcall.c_str()); txt_mars_daily_pos1->value(mars_list_position.c_str()); txt_mars_daily_state1->value(mars_list_state.c_str()); } void cb_btn_mars_daily_pick_info2(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_call2->value(mars_list_bcall.c_str()); txt_mars_daily_pos2->value(mars_list_position.c_str()); txt_mars_daily_state2->value(mars_list_state.c_str()); } void cb_btn_mars_daily_pick_info3(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_call3->value(mars_list_bcall.c_str()); txt_mars_daily_pos3->value(mars_list_position.c_str()); txt_mars_daily_state3->value(mars_list_state.c_str()); } void cb_btn_mars_daily_dtg(Fl_Widget *w, void *d) { txt_mars_daily_dtg->value(szMarsDateTime()); } void cb_btn_mars_daily_dtg_24hr(Fl_Widget *w, void *d) { txt_mars_daily_dtg_24hr->value(szMarsDateTime()); } void cb_btn_mars_daily_dtg_active(Fl_Widget *w, void *d) { txt_mars_daily_dtg_active->value(szMarsDateTime()); } void cb_btn_mars_daily_dtg_deactive(Fl_Widget *w, void *d) { txt_mars_daily_dtg_deactive->value(szMarsDateTime()); } void cb_btn_mars_daily_pick_netcall(Fl_Widget *w, void *d) { if (!get_mars_list_text()) return; txt_mars_daily_netcall->value(mars_list_bcall.c_str()); } void create_mars_daily() { int Y = tab_top; tab_mars_daily = new Fl_Group(0, Y, 570, 390); tab_mars_daily->align(FL_ALIGN_TOP); tab_mars_daily_type = new Fl_Tabs(0, Y+2, 570, 387); tab_mars_daily_type->selection_color((Fl_Color)246); tab_mars_daily_1 = new Fl_Group(0, Y+25, 570, 360, _("Header")); Y += 30; txt_mars_daily_incident = new Fl_Input2(100, Y, 450, 24, _("INCIDENT")); txt_mars_daily_incident->tooltip(_("Incident")); txt_mars_daily_incident->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_incident->when(FL_WHEN_CHANGED); Y += 25; txt_mars_daily_de = new Fl_Input2(100, Y, 150, 24, _("DE")); txt_mars_daily_de->tooltip(_("")); txt_mars_daily_de->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_de->when(FL_WHEN_CHANGED); btn_mars_daily_de_me = new Fl_Button(252, Y, 30, 24, _("ME")); btn_mars_daily_de_me->callback((Fl_Callback*)cb_btn_mars_daily_de_me); txt_mars_daily_nbr = new Fl_Input2(370, Y, 150, 24, _("MSG NBR")); txt_mars_daily_nbr->tooltip(_("")); txt_mars_daily_nbr->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_nbr->when(FL_WHEN_CHANGED); Y += 25; sel_mars_daily_prec = new Fl_ListBox(100, Y, 45, 24, _("PREC")); sel_mars_daily_prec->tooltip( _("R - Routine\nP - Priority\nO - Immediate\nZ - Flash")); sel_mars_daily_prec->add("R|P|O|Z"); sel_mars_daily_prec->align(FL_ALIGN_LEFT); sel_mars_daily_prec->index(0); txt_mars_daily_dtg = new Fl_Input2(185, Y, 150, 24, _("DTG")); txt_mars_daily_dtg->tooltip(_("")); btn_mars_daily_dtg = new Fl_Button(335, Y, 22, 24, _("...")); btn_mars_daily_dtg->tooltip(_("Set Date/Time Group")); btn_mars_daily_dtg->callback((Fl_Callback*)cb_btn_mars_daily_dtg); Y += 25; txt_mars_daily_fm_name = new Fl_Input2(100, Y, 150, 24, _("FM")); txt_mars_daily_fm_name->tooltip(_("Name")); txt_mars_daily_fm_name->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_fm_name->when(FL_WHEN_CHANGED); txt_mars_daily_fm_call = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_fm_call->tooltip(_("Call")); txt_mars_daily_fm_call->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_fm_call->when(FL_WHEN_CHANGED); txt_mars_daily_fm_state = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_daily_fm_state->tooltip(_("State")); txt_mars_daily_fm_state->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_fm_state->when(FL_WHEN_CHANGED); btn_mars_daily_pick_fm = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_daily_pick_fm->tooltip(_("Select from list")); btn_mars_daily_pick_fm->callback((Fl_Callback*)cb_btn_mars_daily_pick_fm); Y += 25; txt_mars_daily_to_pos = new Fl_Input2(100, Y, 150, 24, _("TO")); txt_mars_daily_to_pos->tooltip(_("Position")); txt_mars_daily_to_pos->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_to_pos->when(FL_WHEN_CHANGED); txt_mars_daily_to_call = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_to_call->tooltip(_("Call")); txt_mars_daily_to_call->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_to_call->when(FL_WHEN_CHANGED); txt_mars_daily_to_state = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_daily_to_state->tooltip(_("State")); txt_mars_daily_to_state->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_to_state->when(FL_WHEN_CHANGED); btn_mars_daily_pick_to = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_daily_pick_to->tooltip(_("Select from list")); btn_mars_daily_pick_to->callback((Fl_Callback*)cb_btn_mars_daily_pick_to); Y += 25; txt_mars_daily_pos1 = new Fl_Input2(100, Y, 150, 24, _("INFO1")); txt_mars_daily_pos1->tooltip(_("Position")); txt_mars_daily_pos1->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_pos1->when(FL_WHEN_CHANGED); txt_mars_daily_call1 = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_call1->tooltip(_("Call")); txt_mars_daily_call1->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_call1->when(FL_WHEN_CHANGED); txt_mars_daily_state1 = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_daily_state1->tooltip(_("State")); txt_mars_daily_state1->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_state1->when(FL_WHEN_CHANGED); btn_mars_daily_pick_info1 = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_daily_pick_info1->tooltip(_("Select from list")); btn_mars_daily_pick_info1->callback((Fl_Callback*)cb_btn_mars_daily_pick_info1); Y += 25; txt_mars_daily_pos2 = new Fl_Input2(100, Y, 150, 24, _("INFO2")); txt_mars_daily_pos2->tooltip(_("Position")); txt_mars_daily_pos2->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_pos2->when(FL_WHEN_CHANGED); txt_mars_daily_call2 = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_call2->tooltip(_("Call")); txt_mars_daily_call2->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_call2->when(FL_WHEN_CHANGED); txt_mars_daily_state2 = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_daily_state2->tooltip(_("State")); txt_mars_daily_state2->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_state2->when(FL_WHEN_CHANGED); btn_mars_daily_pick_info2 = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_daily_pick_info2->tooltip(_("Select from list")); btn_mars_daily_pick_info2->callback((Fl_Callback*)cb_btn_mars_daily_pick_info2); Y += 25; txt_mars_daily_pos3 = new Fl_Input2(100, Y, 150, 24, _("INFO3")); txt_mars_daily_pos3->tooltip(_("Position")); txt_mars_daily_pos3->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_pos3->when(FL_WHEN_CHANGED); txt_mars_daily_call3 = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_call3->tooltip(_("Call")); txt_mars_daily_call3->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_call3->when(FL_WHEN_CHANGED); txt_mars_daily_state3 = new Fl_Input2(404, Y, 30, 24, _("")); txt_mars_daily_state3->tooltip(_("State")); txt_mars_daily_state3->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_state3->when(FL_WHEN_CHANGED); btn_mars_daily_pick_info3 = new Fl_Button(436, Y, 30, 24, _("List")); btn_mars_daily_pick_info3->tooltip(_("Select from list")); btn_mars_daily_pick_info3->callback((Fl_Callback*)cb_btn_mars_daily_pick_info3); Y += 25; txt_mars_daily_sitrep_id = new Fl_Input2(100, Y, 150, 24, _("SUBJECT")); txt_mars_daily_sitrep_id->tooltip(_("Sitrep Id")); txt_mars_daily_sitrep_id->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_sitrep_id->when(FL_WHEN_CHANGED); txt_mars_daily_sitrep_loc = new Fl_Input2(252, Y, 150, 24, _("")); txt_mars_daily_sitrep_loc->tooltip(_("Sitrep location")); txt_mars_daily_sitrep_loc->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_sitrep_loc->when(FL_WHEN_CHANGED); Y += 25; tab_mars_daily_1->end(); Y = tab_top; tab_mars_daily_2 = new Fl_Group(0, Y+25, 570, 360, _("Body")); Y += 30; txt_mars_daily_dtg_24hr = new Fl_Input2(30, Y, 150, 24, _("1.")); txt_mars_daily_dtg_24hr->tooltip(_("DTG 24 HR PERIOD")); btn_mars_daily_dtg_24hr = new Fl_Button(182, Y, 22, 24, _("...")); btn_mars_daily_dtg_24hr->tooltip(_("Set Date/Time Group")); btn_mars_daily_dtg_24hr->callback((Fl_Callback*)cb_btn_mars_daily_dtg_24hr); Y += 25; txt_mars_daily_netcall = new Fl_Input2(30, Y, 150, 24, _("2.")); txt_mars_daily_netcall->tooltip(_("Net call")); txt_mars_daily_netcall->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_netcall->when(FL_WHEN_CHANGED); btn_mars_daily_pick_netcall = new Fl_Button(182, Y, 30, 24, _("List")); btn_mars_daily_pick_netcall->tooltip(_("Select from list")); btn_mars_daily_pick_netcall->callback((Fl_Callback*)cb_btn_mars_daily_pick_netcall); sel_mars_daily_e_x = new Fl_ListBox(214, Y, 40, 24, _("E/X")); sel_mars_daily_e_x->tooltip( _("E - Emergency\nX - eXercise")); sel_mars_daily_e_x->add("E|X"); sel_mars_daily_e_x->index(1); sel_mars_daily_e_x->align(FL_ALIGN_RIGHT); Y += 25; txt_mars_daily_dtg_active = new Fl_Input2(30, Y, 150, 24, _("3.")); txt_mars_daily_dtg_active->tooltip(_("DTG activation")); btn_mars_daily_dtg_active = new Fl_Button(182, Y, 22, 24, _("...")); btn_mars_daily_dtg_active->tooltip(_("Set Date/Time Group")); btn_mars_daily_dtg_active->callback((Fl_Callback*)cb_btn_mars_daily_dtg_active); txt_mars_daily_dtg_deactive = new Fl_Input2(210, Y, 150, 24, _("")); txt_mars_daily_dtg_deactive->tooltip(_("DTG deactivation")); btn_mars_daily_dtg_deactive = new Fl_Button(362, Y, 22, 24, _("...")); btn_mars_daily_dtg_deactive->tooltip(_("Set Date/Time Group")); btn_mars_daily_dtg_deactive->callback((Fl_Callback*)cb_btn_mars_daily_dtg_deactive); txt_mars_daily_nbr_stations = new Fl_Input2(390, Y, 120, 24, _("")); txt_mars_daily_nbr_stations->tooltip(_("# stations")); Y += 25; Fl_Box *label = new Fl_Box(0, Y, 30, 24, "A."); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_daily_details = new Fl_Input2(30, Y, 530, 58, ""); txt_mars_daily_details->tooltip(_("DETAILS")); txt_mars_daily_details->type(4); txt_mars_daily_details->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_daily_details->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_daily_details->labeltype(FL_NORMAL_LABEL); txt_mars_daily_details->labelfont(0); txt_mars_daily_details->labelsize(14); txt_mars_daily_details->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_daily_details->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_details->when(FL_WHEN_CHANGED); Y += 60; label = new Fl_Box(0, Y, 30, 24, "B."); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_daily_activations = new Fl_Input2(30, Y, 530, 58, ""); txt_mars_daily_activations->tooltip(_("Activitations")); txt_mars_daily_activations->type(4); txt_mars_daily_activations->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_daily_activations->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_daily_activations->labeltype(FL_NORMAL_LABEL); txt_mars_daily_activations->labelfont(0); txt_mars_daily_activations->labelsize(14); txt_mars_daily_activations->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_daily_activations->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_activations->when(FL_WHEN_CHANGED); Y += 60; label = new Fl_Box(0, Y, 30, 24, "4."); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_daily_agencies = new Fl_Input2(30, Y, 530, 58, ""); txt_mars_daily_agencies->tooltip(_("AGENCIES")); txt_mars_daily_agencies->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_daily_agencies->type(4); txt_mars_daily_agencies->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_daily_agencies->labeltype(FL_NORMAL_LABEL); txt_mars_daily_agencies->labelfont(0); txt_mars_daily_agencies->labelsize(14); txt_mars_daily_agencies->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_daily_agencies->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_agencies->when(FL_WHEN_CHANGED); Y += 60; label = new Fl_Box(0, Y, 30, 24, "5."); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_daily_remarks = new Fl_Input2(30, Y, 530, 58, ""); txt_mars_daily_remarks->tooltip(_("REMARKS")); txt_mars_daily_remarks->type(4); txt_mars_daily_remarks->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_daily_remarks->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_daily_remarks->labeltype(FL_NORMAL_LABEL); txt_mars_daily_remarks->labelfont(0); txt_mars_daily_remarks->labelsize(14); txt_mars_daily_remarks->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_daily_remarks->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_daily_remarks->when(FL_WHEN_CHANGED); tab_mars_daily_2->end(); tab_mars_daily_type->end(); tab_mars_daily->end(); tab_mars_daily->hide(); }; ����������������flmsg-2.0.10/src/mars/mars_army_tab.cxx�������������������������������������������������������������0000664�0001750�0001750�00000024542�12330516146�014732� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <FL/Fl_Multi_Browser.H> #include "gettext.h" #include "status.h" #include "util.h" #include "flmsg_dialog.h" #include "flmsg.h" #include "fileselect.h" extern Fl_Double_Window* mars_army_list_dialog(); extern Fl_Double_Window *mars_army_list_window; extern Fl_Multi_Browser *brws_mars_army_list; extern string mars_army_list_text; extern bool mars_army_list_ok; Fl_Group *tab_mars_army = (Fl_Group *)0; Fl_Tabs *tab_mars_army_type = (Fl_Tabs *)0; //---------------------------------------------------------------------- Fl_Group *tab_mars_army_1 = (Fl_Group *)0; Fl_Group *tab_mars_army_2 = (Fl_Group *)0; Fl_Input2 *txt_mars_army_dtg = (Fl_Input2 *)0; Fl_Input2 *txt_mars_army_fm = (Fl_Input2 *)0; Fl_Input2 *txt_mars_army_de = (Fl_Input2 *)0; Fl_Input2 *txt_mars_army_nbr = (Fl_Input2 *)0; Fl_Input2 *txt_mars_army_subj = (Fl_Input2 *)0; Fl_Button *btn_mars_army_dtg = (Fl_Button *)0; Fl_Button *btn_mars_army_pick_fm = (Fl_Button *)0; Fl_Button *btn_mars_army_pick_to = (Fl_Button *)0; Fl_Button *btn_mars_army_pick_info = (Fl_Button *)0; FTextEdit *txt_mars_army_to = (FTextEdit *)0; FTextEdit *txt_mars_army_info = (FTextEdit *)0; FTextEdit *txt_mars_army_text = (FTextEdit *)0; Fl_Button *btn_mars_army_de_me = (Fl_Button *)0; Fl_ListBox *sel_mars_army_prec = (Fl_ListBox *)0; //---------------------------------------------------------------------- // widget callbacks & support bool get_mars_army_list_text() { if (!mars_army_list_window) mars_army_list_window = mars_army_list_dialog(); brws_mars_army_list->deselect(); mars_army_list_window->show(); while (mars_army_list_window->visible()) Fl::wait(); return mars_army_list_ok; } void cb_btn_mars_army_pick_fm(Fl_Widget *w, void *d) { if (!get_mars_army_list_text()) return; string s = mars_army_list_text; size_t p; if ((p = s.find('\n')) != string::npos) s.erase(p); txt_mars_army_fm->value(s.c_str()); estimate(); } void cb_btn_mars_army_pick_to(Fl_Widget *w, void *d) { if (!get_mars_army_list_text()) return; string s = txt_mars_army_to->buffer()->text(); if (s.length()) s += '\n'; s.append(mars_army_list_text); txt_mars_army_to->clear(); txt_mars_army_to->add(s.c_str()); estimate(); } void cb_btn_mars_army_pick_info(Fl_Widget *w, void *d) { if (!get_mars_army_list_text()) return; string s = txt_mars_army_info->buffer()->text(); if (s.length()) s += '\n'; s.append(mars_army_list_text); txt_mars_army_info->clear(); txt_mars_army_info->add(s.c_str()); estimate(); } void cb_btn_mars_army_dtg(Fl_Widget *w, void *d) { txt_mars_army_dtg->value(szMarsDateTime()); estimate(); } void cb_btn_mars_army_de_me(Fl_Widget *w, void *d) { txt_mars_army_de->value(progStatus.my_call.c_str()); estimate(); } void create_mars_army() { int Y = tab_top; tab_mars_army = new Fl_Group(0, Y, 570, 390); tab_mars_army->align(FL_ALIGN_TOP); tab_mars_army_type = new Fl_Tabs(0, Y+2, 570, 387); tab_mars_army_1 = new Fl_Group(0, Y+25, 570, 360, _("Header")); Y += 35; txt_mars_army_de = new Fl_Input2(50, Y, 200, 24, _("DE")); txt_mars_army_de->tooltip(_("")); txt_mars_army_de->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_army_de->when(FL_WHEN_CHANGED); btn_mars_army_de_me = new Fl_Button(252, Y, 30, 24, _("ME")); btn_mars_army_de_me->callback((Fl_Callback*)cb_btn_mars_army_de_me); btn_mars_army_de_me->tooltip(_("insert operator callsign")); txt_mars_army_nbr = new Fl_Input2(320, Y, 150, 24, _("NR")); txt_mars_army_nbr->tooltip(_("")); txt_mars_army_nbr->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_army_nbr->when(FL_WHEN_CHANGED); Y += 35; sel_mars_army_prec = new Fl_ListBox(50, Y, 45, 24, _("PREC")); sel_mars_army_prec->tooltip( _("R - Routine\nP - Priority\nO - Immediate\nZ - Flash")); sel_mars_army_prec->add("R|P|O|Z"); sel_mars_army_prec->align(FL_ALIGN_LEFT); sel_mars_army_prec->index(0); txt_mars_army_dtg = new Fl_Input2(135, Y, 150, 24, _("DTG")); txt_mars_army_dtg->tooltip(_("")); btn_mars_army_dtg = new Fl_Button(285, Y, 22, 24, _("...")); btn_mars_army_dtg->tooltip(_("Set Date/Time Group")); btn_mars_army_dtg->callback((Fl_Callback*)cb_btn_mars_army_dtg); Y += 26; btn_mars_army_pick_fm = new Fl_Button(4, Y, 44, 24, _("FM")); btn_mars_army_pick_fm->tooltip(_("Select from list")); btn_mars_army_pick_fm->callback((Fl_Callback*)cb_btn_mars_army_pick_fm); txt_mars_army_fm = new Fl_Input2(50, Y, 500, 24, _("")); txt_mars_army_fm->tooltip(_("use pick list button")); txt_mars_army_fm->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_army_fm->when(FL_WHEN_CHANGED); Y += 26; btn_mars_army_pick_to = new Fl_Button(4, Y, 44, 24, _("TO")); btn_mars_army_pick_to->tooltip(_("Select from list")); btn_mars_army_pick_to->callback((Fl_Callback*)cb_btn_mars_army_pick_to); txt_mars_army_to = new FTextEdit(50, Y, 500, 100, _("")); txt_mars_army_to->tooltip(_("use pick list button")); txt_mars_army_to->textfont(FL_HELVETICA); txt_mars_army_to->box(FL_DOWN_FRAME); txt_mars_army_to->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_army_to->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_army_to->labeltype(FL_NORMAL_LABEL); txt_mars_army_to->labelfont(0); txt_mars_army_to->labelsize(14); txt_mars_army_to->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_army_to->align(FL_ALIGN_TOP_LEFT); txt_mars_army_to->callback((Fl_Callback*)cb_mars_text); txt_mars_army_to->when(FL_WHEN_CHANGED); Y += 102; btn_mars_army_pick_info = new Fl_Button(4, Y, 44, 24, _("INFO")); btn_mars_army_pick_info->tooltip(_("Select from list")); btn_mars_army_pick_info->callback((Fl_Callback*)cb_btn_mars_army_pick_info); txt_mars_army_info = new FTextEdit(50, Y, 500, 100, _("")); txt_mars_army_info->tooltip(_("use pick list button")); txt_mars_army_info->textfont(FL_HELVETICA); txt_mars_army_info->box(FL_DOWN_FRAME); txt_mars_army_info->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_army_info->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_army_info->labeltype(FL_NORMAL_LABEL); txt_mars_army_info->labelfont(0); txt_mars_army_info->labelsize(14); txt_mars_army_info->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_army_info->align(FL_ALIGN_TOP_LEFT); txt_mars_army_info->callback((Fl_Callback*)cb_mars_text); txt_mars_army_info->when(FL_WHEN_CHANGED); Y += 102; Fl_Box *label = new Fl_Box(0, Y, 50, 24, "SUBJ"); label->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE); txt_mars_army_subj = new Fl_Input2(50, Y, 500, 24, _("")); txt_mars_army_subj->tooltip(_("message subject")); txt_mars_army_subj->callback((Fl_Callback*)cb_mars_fl_input2); txt_mars_army_subj->when(FL_WHEN_CHANGED); tab_mars_army_1->end(); Y = tab_top; tab_mars_army_2 = new Fl_Group(0, Y+25, 570, 355, _("Body")); Y += 30; txt_mars_army_text = new FTextEdit(2, Y, 566, 350, ""); txt_mars_army_text->tooltip("enter text of message"); txt_mars_army_text->textfont(FL_HELVETICA); txt_mars_army_text->box(FL_DOWN_FRAME); txt_mars_army_text->color((Fl_Color)FL_BACKGROUND2_COLOR); txt_mars_army_text->selection_color((Fl_Color)FL_SELECTION_COLOR); txt_mars_army_text->labeltype(FL_NORMAL_LABEL); txt_mars_army_text->labelfont(0); txt_mars_army_text->labelsize(14); txt_mars_army_text->labelcolor((Fl_Color)FL_FOREGROUND_COLOR); txt_mars_army_text->align(FL_ALIGN_TOP_LEFT); txt_mars_army_text->callback((Fl_Callback*)cb_mars_text); txt_mars_army_text->when(FL_WHEN_CHANGED); tab_mars_army_2->end(); tab_mars_army_type->end(); tab_mars_army->end(); tab_mars_army->hide(); }; //====================================================================== //====================================================================== Fl_Double_Window *mars_army_list_window = 0; Fl_Multi_Browser *brws_mars_army_list = (Fl_Multi_Browser *)0; const int mars_army_list_widths[] = {80, 170, 30, 0}; string mars_army_list_text; bool mars_army_list_ok = false; void cb_army_list_ok(Fl_Widget *w, void *d) { string retstr; mars_army_list_text.clear(); size_t p; for (int i = 1; i <= brws_mars_army_list->size(); i++) { if (brws_mars_army_list->selected(i)) { if (mars_army_list_text.length()) mars_army_list_text += '\n'; retstr = brws_mars_army_list->text(i); p = retstr.find('\t'); mars_army_list_text.append(retstr.substr(0, p)); retstr.erase(0,p+1); p = retstr.find('\t'); retstr.erase(0,p+1); mars_army_list_text.append(" ").append(retstr); } } mars_army_list_window->hide(); mars_army_list_ok = true; } void cb_army_list_cancel(Fl_Widget *w, void *d) { mars_army_list_window->hide(); mars_army_list_ok = false; } Fl_Double_Window* mars_army_list_dialog() { Fl_Double_Window* w = new Fl_Double_Window(452, 280, _("Roster")); brws_mars_army_list = new Fl_Multi_Browser(1,1,450,250,""); brws_mars_army_list->column_widths(mars_army_list_widths); Fl_Button *cancel = new Fl_Button(280, 252, 80, 24, "cancel"); cancel->callback((Fl_Callback*)cb_army_list_cancel); Fl_Button *ok = new Fl_Button(370, 252, 80, 24, "select"); ok->callback((Fl_Callback*)cb_army_list_ok); FILE *flist = fopen(progStatus.mars_roster_file.c_str(), "r"); char *retstr; if (flist) { char line[80]; retstr = fgets(line, 80, flist); // header line[0] = 0; if (retstr) { while(fgets(line, 80, flist)) { while( line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0; while( line[strlen(line)-1] == '\r') line[strlen(line)-1] = 0; for (size_t i = 0; i < strlen(line); i++) if (line[i] == ',') line[i] = '\t'; if (strlen(line)) brws_mars_army_list->add(line); line[0] = 0; } } fclose(flist); } else printf("could not open %s\n", progStatus.mars_roster_file.c_str()); w->set_modal(); w->end(); return w; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/src/flmsg.cxx��������������������������������������������������������������������������0000664�0001750�0001750�00000234040�12462242604�012255� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flmsg // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ---------------------------------------------------------------------------- #include <stdlib.h> #include <unistd.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <errno.h> #include <FL/Fl.H> #include <FL/Enumerations.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> #include <FL/Fl_Sys_Menu_Bar.H> #include <FL/x.H> #include <FL/Fl_Help_Dialog.H> #include <FL/Fl_Menu_Item.H> #include <FL/Fl_File_Icon.H> #include "config.h" #include "flmsg_config.h" #include "flmsg.h" #include "templates.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "flmsg_dialog.h" #include "flinput2.h" #include "date.h" #include "calendar.h" #include "icons.h" #include "fileselect.h" #include "wrap.h" #include "status.h" #include "pixmaps.h" #include "threads.h" #include "xml_io.h" #include "socket.h" #include "mongoose.h" #include "timeops.h" #ifdef WIN32 # include "flmsgrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include <FL/filename.H> #include "dirent-check.h" #include <FL/x.H> #include <FL/Fl_Pixmap.H> #include <FL/Fl_Image.H> using namespace std; //------------------------------------------------------------------------------ // Mongoose web server struct mg_server *server = (mg_server *)NULL; void *poll_server(void *); int start_web_server(); void close_server(); char *mongoose_msg; string mongoose_msgs; int srvr_portnbr = 8080; char sz_srvr_portnbr[6]; //------------------------------------------------------------------------------ const char *options[] = {\ "flmsg unique options", "--help", "--version", "--server-port\tstarting port number for forms web server [8080]", "--flmsg-dir\tfull-path-name-of-folder for all FLMSG folders", "--auto-dir\tfull-path-name-of-folder for autosend files", "\tauto-dir, flmsg-dir can be separate and unique", "--p FILENAME\tprint and exit", "--b FILENAME\tprint and stay open", "Fltk UI options", "-bg\t-background [COLOR]", "-bg2\t-background2 [COLOR]", "-di\t-display [host:n.n]", "-dn\t-dnd : enable drag and drop", "-nodn\t-nodnd : disable drag and drop", "-fg\t-foreground [COLOR]", "-g\t-geometry [WxH+X+Y]", "-i\t-iconic", "-k\t-kbd : enable keyboard focus:", "-nok\t-nokbd : en/disable keyboard focus", "-na\t-name [CLASSNAME]", "-s\t-scheme [none | gtk+ | plastic]", " default = gtk+", "-ti\t-title [WINDOWTITLE]", "-to\t-tooltips : enable tooltips", "-not\t-notooltips : disable tooltips\n", 0 }; Fl_Double_Window *mainwindow = 0; Fl_Double_Window *optionswindow = 0; Fl_Double_Window *arlwindow = 0; Fl_Double_Window *config_dialog = 0; Fl_Double_Window *hxwindow = 0; Fl_Double_Window *header_window = 0; pthread_t *xmlrpc_thread = 0; pthread_mutex_t mutex_xmlrpc = PTHREAD_MUTEX_INITIALIZER; bool printme = false; bool exit_after_print = false; int selected_form = NONE; string title; string errtext; // fldigi, flmsg share a common files directory structure #ifdef __WIN32__ string FLMSG_dir_default = "$USERPROFILE/NBEMS.files/"; #else string FLMSG_dir_default = "$HOME/.nbems/"; #endif string FLMSG_dir = ""; string ARQ_dir = ""; string ARQ_files_dir = ""; string ARQ_recv_dir = ""; string ARQ_send_dir = ""; string WRAP_dir = ""; string WRAP_recv_dir = ""; string WRAP_send_dir = ""; string WRAP_auto_dir = ""; string ICS_dir = ""; string ICS_msg_dir = ""; string ICS_tmp_dir = ""; string CSV_dir = ""; string CUSTOM_dir = ""; string XFR_dir = ""; string FLMSG_temp_dir = ""; string FLMSG_custom_dir = ""; string cmd_fname = ""; string TITLE = ":TITLE:"; string evalstr = ""; string parse_info = ""; //string defRTFname = ""; // utility functions //---------------------------------------------------------------------- // header fields //---------------------------------------------------------------------- string hdr_from = ""; string hdr_edit = ""; static string szFrom = ":hdr_fm:"; static string szEdit = ":hdr_ed:"; bool check_mycall() { if (!progStatus.my_call.empty()) return true; if (!config_dialog->visible()) cb_config_personal(); return false; } // create flmsg line output for string data string lineout(string &field, string &data) { static string sout; static char sznum[80]; if (data.empty()) return ""; snprintf(sznum, sizeof(sznum), "%0d", (int)data.length()); sout.assign(field); sout.append(sznum).append(" ").append(data).append("\n"); return sout; } // create flmsg line output for binary data string binout( string &field, bool &data) { static string sout; if (!data) return ""; sout = field; sout.append(" ").append( data ? "T" : "F").append("\n"); return sout; } //---------------------------------------------------------------------- // header for flmsg output file //---------------------------------------------------------------------- void clear_header() { hdr_from.clear(); hdr_edit.clear(); } string header(const char *msgtype ) { string hdr; hdr.assign("<flmsg>").append (PACKAGE_VERSION).append("\n"); hdr.append(lineout(szFrom, hdr_from)); hdr.append(lineout(szEdit, hdr_edit)); hdr.append(msgtype).append("\n"); return hdr; } void read_header(string &str) { clear_header(); hdr_from = findstr(str, szFrom); hdr_edit = findstr(str, szEdit); } void update_header(hdr_reason reason) { if (progStatus.my_call.empty()) return; static string dt; int utc = progStatus.UTC; int dtf = progStatus.dtformat; progStatus.UTC = 2; progStatus.dtformat = 4; dt.assign(szDate()).append(szTime(6)); progStatus.UTC = utc; progStatus.dtformat = dtf; switch (reason) { case NEW : clear_header(); hdr_edit.assign("\n").append(progStatus.my_call).append(" ").append(dt); break; case CHANGED: if (!hdr_edit.empty()) { size_t p1 = string::npos, p2 = string::npos; while( (p1 = hdr_edit.find(progStatus.my_call)) != string::npos) { p2 = hdr_edit.find("\n", p1); if (p2 != string::npos) hdr_edit.erase(p1, p2 - p1 + 1); else hdr_edit.erase(p1); } } hdr_edit.append("\n").append(progStatus.my_call).append(" ").append(dt); break; case FROM: if (!hdr_from.empty()) { size_t p1 = string::npos, p2 = string::npos; while( (p1 = hdr_from.find(progStatus.my_call)) != string::npos) { p2 = hdr_from.find("\n", p1); if (p2 != string::npos) hdr_from.erase(p1, p2 - p1 + 1); else hdr_from.erase(p1); } } hdr_from.append("\n").append(progStatus.my_call).append(" ").append(dt); break; default: ; } size_t p; p = hdr_from.find("\n\n"); while(hdr_from.find("\n\n") != string::npos) { hdr_from.replace(p, 2, "\n"); p = hdr_from.find("\n\n"); } p = hdr_edit.find("\n\n"); while(hdr_edit.find("\n\n") != string::npos) { hdr_edit.replace(p, 2, "\n"); p = hdr_edit.find("\n\n"); } } // find string data associated with a field specifier string findstr(string &haystack, string &needle) { size_t p = haystack.find(needle, 0); if (p == string::npos) return ""; p += needle.length(); int nchar; sscanf(&haystack[p], "%d", &nchar); if (nchar) { p = haystack.find(' ', p); p++; return haystack.substr(p, nchar); } return ""; } // find boolean data associated with a field specifier bool findbin(string &haystack, string &needle) { size_t p = haystack.find(needle, 0); if (p == string::npos) return false; p += needle.length() + 1; if (haystack.find("F", p) == p) return false; if (haystack.find("T", p) == p) return true; return false; } // replace string void replacestr(string &form, string &where, string &what) { size_t p = form.find(where); while (p != string::npos) { form.replace(p, where.length(), what); p = form.find(where); } } void replacelf(string &form, int n) { size_t p = 0; int i = 0; while ( (p = form.find("\n", p)) != string::npos) { form.insert(p, "<br>"); p += 5; i++; } if (n) for (int j = i; j < n; j++) form.append("<br>\n"); } void substitutestr(string &form, string &where, string &what) { size_t p = 0; p = form.find(where, p); while (p != string::npos) { form.replace(p, where.length(), what); p++; p = form.find(where, p); } } void striplf(string &what) { while (*what.rbegin() == '\n') what.erase(what.end()-1); } void strip_html(string &buffer) { string amp = "&"; string amprep = "&#38;"; string quote = "\""; string quoterep = "&#34;"; string less = "<"; string lessrep = "&#60;"; string more = ">"; string morerep = "&#62;"; substitutestr(buffer, amp, amprep); substitutestr(buffer, quote, quoterep); substitutestr(buffer, less, lessrep); substitutestr(buffer, more, morerep); } void remove_cr(string &buffer) { size_t p = string::npos; while ((p = buffer.find('\r')) != string::npos) buffer.erase(p,1); } //---------------------------------------------------------------------- void remove_spaces_from_filename(string &fname) { size_t n = fname.length(); char szfname[n + 1]; char *p; memset(szfname, 0, n + 1); strcpy(szfname, fname.c_str()); p = (char *)fl_filename_name(szfname); while (*p) { if (*p == ' ') *p = '_'; p++; } fname = szfname; } char *szTime(int typ) { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); switch (typ) { case 0: localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%H%ML", &sTime); break; case 1: localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%H:%ML", &sTime); break; case 2: gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%H%MZ", &sTime); break; case 3: gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%H:%MZ", &sTime); break; case 4: gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%H%M UTC", &sTime); break; case 5: gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%H:%M UTC", &sTime); break; case 6: gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%H%M%S", &sTime); break; case 7: localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%H%M", &sTime); break; default: localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%H%ML", &sTime); } return szDt; } char *szDate() { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); if (progStatus.UTC > 1) { gmtime_r (&tmptr, &sTime); } else { localtime_r(&tmptr, &sTime); } switch (progStatus.dtformat) { case 0: strftime(szDt, 79, "%Y-%m-%d", &sTime); break; case 1: strftime(szDt, 79, "%m/%d/%y", &sTime); break; case 2: strftime(szDt, 79, "%d/%m/%y", &sTime); break; case 3: strftime(szDt, 79, "%Y-%d-%m", &sTime); break; case 4: strftime(szDt, 79, "%Y%d%m", &sTime); break; default: strftime(szDt, 79, "%Y-%m-%d", &sTime); } return szDt; } char *szAbbrevDate() { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); if (progStatus.UTC) { gmtime_r (&tmptr, &sTime); } else { localtime_r(&tmptr, &sTime); } strftime(szDt, 79, "%b %d", &sTime); for (int i = 0; i < 3; i++) szDt[i] = toupper(szDt[i]); return szDt; } char *szDateTime() { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); if (progStatus.UTC) { gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%d%H%MZ %b %Y", &sTime); } else { localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%d%H%ML %b %Y", &sTime); } for (size_t i = 0; i < strlen(szDt); i++) szDt[i] = toupper(szDt[i]); return szDt; } char *szMarsDateTime() { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%d%H%MZ %b %Y", &sTime); for (size_t i = 0; i < strlen(szDt); i++) szDt[i] = toupper(szDt[i]); return szDt; } char *szCAPDateTime() { static char szDt[80]; time_t tmptr; tm sTime; time (&tmptr); if (progStatus.caplocal) { localtime_r(&tmptr, &sTime); strftime(szDt, 79, "%d %H%ML %b %y", &sTime); } else { gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%d %H%MZ %b %y", &sTime); } for (size_t i = 0; i < strlen(szDt); i++) szDt[i] = toupper(szDt[i]); return szDt; } char *named_file() { static char szfname[200]; static char szDt[80]; szfname[0] = 0; if (!progStatus.call_fname && !progStatus.dt_fname && !progStatus.sernbr_fname) return szfname; time_t tmptr; tm sTime; time (&tmptr); gmtime_r (&tmptr, &sTime); strftime(szDt, 79, "%Y%m%d-%H%M%SZ", &sTime); szfname[0] = 0; if (progStatus.call_fname) strcat(szfname, progStatus.my_call.c_str()); if (selected_form == RADIOGRAM && progStatus.rgnbr_fname) { if (szfname[0]) strcat(szfname, "-"); strcat(szfname, progStatus.rgnbr.c_str()); } else { if (progStatus.dt_fname) { if (szfname[0]) strcat(szfname, "-"); strcat(szfname, szDt); } if (progStatus.sernbr_fname) { if (szfname[0]) strcat(szfname, "-"); strcat(szfname, progStatus.sernbr.c_str()); } } return szfname; } void extract_text(string &buffer, const char *fname) { string sfname = fname; remove_cr(buffer); if (buffer.find("<radiogram>") != string::npos) { selected_form = RADIOGRAM; read_rg_buffer(buffer); if (fname) def_rg_filename = fname; select_form(selected_form); } else if (buffer.find("<iaru>") != string::npos) { selected_form = IARU; iaru_read_buffer(buffer); if (fname) iaru_def_filename = fname; select_form(selected_form); } else if (buffer.find("<cap105>") != string::npos) { selected_form = CAP105; cap105_read_buffer(buffer); if (fname) cap105_def_filename = fname; select_form(selected_form); } else if (buffer.find("<cap110>") != string::npos) { selected_form = CAP110; read_c110_buffer(buffer); if (fname) cap110_def_filename = fname; select_form(selected_form); } else if (buffer.find("<mars_daily>") != string::npos) { selected_form = MARSDAILY; read_mars_daily_buffer(buffer); if (fname) def_mars_daily_filename = fname; select_form(selected_form); } else if (buffer.find("<mars_ineei>") != string::npos) { selected_form = MARSINEEI; read_mars_ineei_buffer(buffer); if (fname) def_mars_ineei_filename = fname; select_form(selected_form); } else if (buffer.find("<mars_net>") != string::npos) { selected_form = MARSNET; read_mars_net_buffer(buffer); if (fname) def_mars_net_filename = fname; select_form(selected_form); } else if (buffer.find("<mars_army>") != string::npos) { selected_form = MARSARMY; read_mars_army_buffer(buffer); if (fname) def_mars_army_filename = fname; select_form(selected_form); } else if (buffer.find("<mars_navy>") != string::npos) { selected_form = MARSNAVY; read_mars_navy_buffer(buffer); if (fname) def_mars_navy_filename = fname; select_form(selected_form); } else if (buffer.find("<nhc_wx>") != string::npos) { selected_form = WXHC; read_wxhc_buffer(buffer); if (fname) def_wxhc_filename = fname; select_form(selected_form); } else if (buffer.find("<severe_wx>") != string::npos) { selected_form = SEVEREWX; read_severe_wx_buffer(buffer); if (fname) def_severe_wx_filename = fname; select_form(selected_form); } else if (buffer.find("<storm_wx>") != string::npos) { selected_form = STORMREP; read_storm_buffer(buffer); if (fname) def_storm_filename = fname; select_form(selected_form); } else if (buffer.find("<redx_snw>") != string::npos) { selected_form = REDXSNW; read_redx_snw_buffer(buffer); if (fname) def_redx_snw_filename = fname; select_form(selected_form); } else if (buffer.find("<redx_5739>") != string::npos) { selected_form = REDX5739; read_redx_5739_buffer(buffer); if (fname) def_redx_5739_filename = fname; select_form(selected_form); } else if (buffer.find("<redx_5739A>") != string::npos) { selected_form = REDX5739A; read_redx_5739A_buffer(buffer); if (fname) def_redx_5739A_filename = fname; select_form(selected_form); } else if (buffer.find("<redx_5739B>") != string::npos) { selected_form = REDX5739B; read_redx_5739B_buffer(buffer); if (fname) def_redx_5739B_filename = fname; select_form(selected_form); } else if (buffer.find("<hics203>") != string::npos) { selected_form = HICS203; read_hics203_buffer(buffer); if (fname) def_hics203_filename = fname; select_form(selected_form); } else if (buffer.find("<hics206>") != string::npos) { selected_form = HICS206; h206_read_buffer(buffer); if (fname) h206_def_filename = fname; select_form(selected_form); } else if (buffer.find("<hics213>") != string::npos) { selected_form = HICS213; h213_read_buffer(buffer); if (fname) h213_def_filename = fname; select_form(selected_form); } else if (buffer.find("<hics214>") != string::npos) { selected_form = HICS214; hics214_read_buffer(buffer); if (fname) hics214_def_filename = fname; select_form(selected_form); } else if (buffer.find("<ics203>") != string::npos) { selected_form = ICS203; read_203_buffer(buffer); if (fname) def_203_filename = fname; select_form(selected_form); } else if (buffer.find("<ics205>") != string::npos) { selected_form = ICS205; read_205_buffer(buffer); if (fname) def_205_filename= fname; select_form(selected_form); } else if (buffer.find("<ics205a>") != string::npos) { selected_form = ICS205A; read_205a_buffer(buffer); if (fname) def_205a_filename = fname; select_form(selected_form); } else if (buffer.find("<ics206>") != string::npos) { selected_form = ICS206; read_206_buffer(buffer); if (fname) def_206_filename = fname; select_form(selected_form); } else if (buffer.find("<ics213>") != string::npos) { selected_form = ICS213; read_213_buffer(buffer); if (fname) def_213_filename = fname; select_form(selected_form); } else if (buffer.find("<ics214>") != string::npos) { selected_form = ICS214; read_214_buffer(buffer); if (fname) def_214_filename = fname; select_form(selected_form); } else if (buffer.find("<ics216>") != string::npos) { selected_form = ICS216; read_216_buffer(buffer); if (fname) def_216_filename = fname; select_form(selected_form); } else if (buffer.find("<ics309>") != string::npos) { selected_form = ICS309; read_309_buffer(buffer); if (fname) def_309_filename = fname; select_form(selected_form); } else if (buffer.find("<plaintext>") != string::npos) { selected_form = PLAINTEXT; read_ptbuffer(buffer); if (fname) def_pt_filename = fname; select_form(selected_form); } else if (buffer.find("<blankform>") != string::npos) { selected_form = BLANK; read_blankbuffer(buffer); if (fname) def_blank_filename = fname; select_form(selected_form); } else if (buffer.find("<csvform>") != string::npos) { selected_form = CSV; read_csvbuffer(buffer); if (fname) def_csv_filename = fname; select_form(selected_form); } else if (buffer.find("<customform>") != string::npos) { selected_form = CUSTOM; read_custombuffer(buffer); if (fname) def_custom_filename = fname; select_form(selected_form); } else if (!exit_after_print) fl_alert2(_("Not an flmsg data file")); } // void read_data_file(string s) { long filesize = 0; // char *buff, *buffend; int retval; FILE *icsfile; icsfile = fopen (s.c_str(), "rb");// "r"); if (!icsfile) return; // determine its size for buffer creation fseek (icsfile, 0, SEEK_END); filesize = ftell (icsfile); // test file integrity if (filesize == 0) { fl_alert2(_("Empty file")); return; } // read the entire file into the buffer string buffer; buffer.resize(filesize); fseek(icsfile, 0, SEEK_SET); retval = fread( (void*)buffer.c_str(), 1, filesize, icsfile); fclose(icsfile); if (retval != filesize) { fl_alert2(_("Read error")); return; } extract_text(buffer, s.c_str()); } int eval_transfer_size() { switch (selected_form) { case ICS203: return eval_203_fsize(); case ICS205: return eval_205_fsize(); case ICS205A: return eval_205a_fsize(); case ICS206: return eval_206_fsize(); case ICS213: return eval_213_fsize(); case ICS214: return eval_214_fsize(); case ICS216: return eval_216_fsize(); case ICS309: return eval_309_fsize(); case HICS203: return eval_hics203_fsize(); case HICS206: return eval_h206_fsize(); case HICS213: return eval_h213_fsize(); case HICS214: return eval_hics214_fsize(); case RADIOGRAM: return eval_rg_fsize(); case IARU: return eval_iaru_fsize(); case CAP105: return eval_cap105_fsize(); case CAP110: return eval_cap110_fsize(); case PLAINTEXT: return eval_pt_fsize(); case BLANK: return eval_blank_fsize(); case CSV: return eval_csv_fsize(); case CUSTOM: return eval_custom_fsize(); case TRANSFER: return eval_transfer_fsize(); case CUSTOM_TRANSFER: return eval_transfer_custom_form_fsize(); case MARSDAILY: return eval_mars_daily_fsize(); case MARSINEEI: return eval_mars_ineei_fsize(); case MARSNET: return eval_mars_net_fsize(); case MARSARMY: return eval_mars_army_fsize(); case MARSNAVY: return eval_mars_navy_fsize(); case WXHC: return eval_wxhc_fsize(); case SEVEREWX: return eval_severe_wx_fsize(); case STORMREP: return eval_storm_fsize(); case REDXSNW: return eval_redx_snw_fsize(); case REDX5739: return eval_redx_5739_fsize(); case REDX5739A: return eval_redx_5739A_fsize(); case REDX5739B: return eval_redx_5739B_fsize(); default : ; } return 0; } void cb_new() { switch (selected_form) { case ICS203: cb_203_new(); break; case ICS205: cb_205_new(); break; case ICS205A: cb_205a_new(); break; case ICS206: cb_206_new(); break; case ICS213: cb_213_new(); break; case ICS214: cb_214_new(); break; case ICS216: cb_216_new(); break; case ICS309: cb_309_new(); break; case HICS203: cb_hics203_new(); break; case HICS206: h206_cb_new(); break; case HICS213: h213_cb_new(); break; case HICS214: hics214_cb_new(); break; case RADIOGRAM: cb_rg_new(); break; case IARU: iaru_cb_new(); break; case CAP105: cap105_cb_new(); break; case CAP110: cap110_cb_new(); break; case PLAINTEXT: cb_pt_new(); break; case BLANK: cb_blank_new(); break; case TRANSFER: cb_transfer_new(); break; case CSV: cb_csv_new(); break; case CUSTOM: cb_custom_new(); break; case MARSDAILY: cb_mars_daily_new(); break; case MARSINEEI: cb_mars_ineei_new(); break; case MARSNET: cb_mars_net_new(); break; case MARSARMY: cb_mars_army_new(); break; case MARSNAVY: cb_mars_navy_new(); break; case WXHC: cb_wxhc_new(); break; case SEVEREWX: cb_severe_wx_new(); break; case STORMREP: cb_storm_new(); break; case REDXSNW: cb_redx_snw_new(); break; case REDX5739: cb_redx_5739_new(); break; case REDX5739A: cb_redx_5739A_new(); break; case REDX5739B: cb_redx_5739B_new(); break; default : return; } clear_estimate(); } void cb_import() { switch (selected_form) { case ICS203: cb_203_import(); break; case ICS205: cb_205_import(); break; case ICS205A: cb_205a_import(); break; case ICS206: cb_206_import(); break; case ICS213: cb_213_import(); break; case ICS214: cb_214_import(); break; case ICS216: cb_216_import(); break; case ICS309: cb_309_import(); break; case HICS203: cb_hics203_import(); break; case HICS206: h206_cb_import(); break; case HICS213: h213_cb_import(); break; case HICS214: hics214_cb_import(); break; case RADIOGRAM: cb_rg_import(); break; case IARU: iaru_cb_import(); break; case CAP105: cap105_cb_import(); break; case CAP110: cap110_cb_import(); break; case PLAINTEXT: case BLANK: case CSV: case CUSTOM: case REDXSNW: case REDX5739: case REDX5739A: case REDX5739B: case MARSDAILY: case MARSINEEI: case MARSNET: case MARSARMY: case MARSNAVY: case WXHC: case SEVEREWX: case STORMREP: default: fl_alert2("Not implemented"); } estimate(); } void cb_export() { switch (selected_form) { case ICS203: cb_203_export(); break; case ICS205: cb_205_export(); break; case ICS205A: cb_205a_export(); break; case ICS206: cb_206_export(); break; case ICS213: cb_213_export(); break; case ICS214: cb_214_export(); break; case ICS216: cb_216_export(); break; case ICS309: cb_309_export(); break; case HICS203: cb_hics203_export(); break; case HICS206: h206_cb_export(); break; case HICS213: h213_cb_export(); break; case HICS214: hics214_cb_export(); break; case RADIOGRAM: cb_rg_export(); break; case IARU: iaru_cb_export(); break; case CAP105: cap105_cb_export(); break; case CAP110: cap110_cb_export(); break; case PLAINTEXT: case BLANK: case CSV: case CUSTOM: case REDXSNW: case REDX5739: case REDX5739A: case REDX5739B: case MARSDAILY: case MARSINEEI: case MARSNET: case MARSARMY: case MARSNAVY: case WXHC: case SEVEREWX: case STORMREP: default: fl_alert2("Not implemented"); } } void wrap_import(const char *fname) { string filename; string inpbuffer; bool isok = import_wrapfile(fname, filename, inpbuffer); if (!isok && !exit_after_print) { isok = !fl_choice2(_("Checksum failed\n\nIgnore errors?"), "yes", "no", NULL); } if (isok) { if (!(inpbuffer.find("<transfer>") != string::npos && inpbuffer.find("<html_file>") != string::npos) ) remove_cr( inpbuffer ); if (inpbuffer.find("<flics") != string::npos || inpbuffer.find("<flmsg") != string::npos) { if (inpbuffer.find("<ics203>") != string::npos) { selected_form = ICS203; cb_203_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<hics203>") != string::npos) { selected_form = HICS203; cb_hics203_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<hics206>") != string::npos) { selected_form = HICS206; h206_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<hics213>") != string::npos) { selected_form = HICS213; h213_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<hics214>") != string::npos) { selected_form = HICS214; hics214_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics205>") != string::npos) { selected_form = ICS205; cb_205_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics205a>") != string::npos) { selected_form = ICS205A; cb_205a_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics206>") != string::npos) { selected_form = ICS206; cb_206_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics213>") != string::npos) { selected_form = ICS213; cb_213_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics214>") != string::npos) { selected_form = ICS214; cb_214_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics216>") != string::npos) { selected_form = ICS216; cb_216_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<ics309>") != string::npos) { selected_form = ICS309; cb_309_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<radiogram>") != string::npos) { selected_form = RADIOGRAM; cb_rg_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<iaru>") != string::npos) { selected_form = IARU; iaru_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<cap105>") != string::npos) { selected_form = CAP105; cap105_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<cap110>") != string::npos) { selected_form = CAP110; cap110_cb_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<plaintext>") != string::npos) { selected_form = PLAINTEXT; cb_pt_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<blankform>") != string::npos) { selected_form = BLANK; cb_blank_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<csvform>") != string::npos) { selected_form = CSV; cb_csv_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<customform>") != string::npos) { selected_form = CUSTOM; cb_custom_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<mars_daily>") != string::npos) { selected_form = MARSDAILY; cb_mars_daily_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<mars_ineei>") != string::npos) { selected_form = MARSINEEI; cb_mars_ineei_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<mars_net>") != string::npos) { selected_form = MARSNET; cb_mars_net_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<mars_army>") != string::npos) { selected_form = MARSARMY; cb_mars_army_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<mars_navy>") != string::npos) { selected_form = MARSNAVY; cb_mars_navy_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<nhc_wx>") != string::npos) { selected_form = WXHC; cb_wxhc_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<severe_wx>") != string::npos) { selected_form = SEVEREWX; cb_severe_wx_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<storm_wx>") != string::npos) { selected_form = STORMREP; cb_storm_wrap_import(filename, inpbuffer);; } else if (inpbuffer.find("<redx_snw>") != string::npos) { selected_form = REDXSNW; cb_redx_snw_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<redx_5739>") != string::npos) { selected_form = REDX5739; cb_redx_5739_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<redx_5739A>") != string::npos) { selected_form = REDX5739A; cb_redx_5739A_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<redx_5739B>") != string::npos) { selected_form = REDX5739B; cb_redx_5739B_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<transfer>") != string::npos) { selected_form = TRANSFER; cb_transfer_wrap_import(filename, inpbuffer); } else if (inpbuffer.find("<html_form>") != string::npos) { selected_form = CUSTOM_TRANSFER; cb_custom_form_wrap_import(filename, inpbuffer); } else if (!exit_after_print) { selected_form = NONE; if (!fl_choice2(_("Cannot identify file type\n\nOpen as text file?"), "yes", "no", NULL)) { filename = fname; filename.append(".txt"); FILE *badfile = fopen(filename.c_str(), "w"); fwrite(inpbuffer.c_str(), inpbuffer.length(), 1, badfile); fclose(badfile); open_url(filename.c_str()); } } } select_form(selected_form); estimate(); return; } if (printme) { string badform = baddata_html_template; string mgstr = "<txt:"; string badfile_name = ICS_dir; badfile_name.append("err."); badfile_name.append(fl_filename_name(fname)); badfile_name.append(".html"); string badbuffer = "Error in file: "; badbuffer.append(fname).append("\n\n"); badbuffer.append(errtext); replacelf(badbuffer); string title = "Err:"; title.append(fl_filename_name(fname)); size_t p = title.rfind('.'); if (p != string::npos) title.erase(p); replacestr(badform, TITLE, title); replacestr(badform, mgstr, badbuffer); FILE *badfile = fopen(badfile_name.c_str(), "w"); fprintf(badfile,"%s", badform.c_str()); fclose(badfile); open_url(badfile_name.c_str()); if (exit_after_print) return; estimate(); } if (!fl_choice2(_("Open as text file?"), "yes", "no", NULL)) { filename = fname; filename.append(".txt"); FILE *badfile = fopen(filename.c_str(), "w"); fwrite(inpbuffer.c_str(), inpbuffer.length(), 1, badfile); fclose(badfile); open_url(filename.c_str()); } } void cb_wrap_import() { string wrapfilename = WRAP_recv_dir; wrapfilename.append("default"WRAP_EXT); const char *p = FSEL::select( "Import wrapped flmsg file", "Wrap file\t*.{wrap,WRAP}", wrapfilename.c_str()); if (p) wrap_import(p); } void cb_wrap_export() { switch (selected_form) { case ICS203: cb_203_wrap_export(); break; case ICS205: cb_205_wrap_export(); break; case ICS205A: cb_205a_wrap_export(); break; case ICS206: cb_206_wrap_export(); break; case ICS213: cb_213_wrap_export(); break; case ICS214: cb_214_wrap_export(); break; case ICS216: cb_216_wrap_export(); break; case ICS309: cb_309_wrap_export(); break; case HICS203: cb_hics203_wrap_export(); break; case HICS206: h206_cb_wrap_export(); break; case HICS213: h213_cb_wrap_export(); break; case HICS214: hics214_cb_wrap_export(); break; case RADIOGRAM: cb_rg_wrap_export(); break; case IARU: iaru_cb_wrap_export(); break; case CAP105: cap105_cb_wrap_export(); break; case CAP110: cap110_cb_wrap_export(); break; case PLAINTEXT: cb_pt_wrap_export(); break; case BLANK: cb_blank_wrap_export(); break; case CSV: cb_csv_wrap_export(); break; case CUSTOM: cb_custom_wrap_export(); break; case TRANSFER: cb_transfer_wrap_export(); break; case MARSDAILY: cb_mars_daily_wrap_export(); break; case MARSINEEI: cb_mars_ineei_wrap_export(); break; case MARSNET: cb_mars_net_wrap_export(); break; case MARSARMY: cb_mars_army_wrap_export(); break; case MARSNAVY: cb_mars_navy_wrap_export(); break; case WXHC: cb_wxhc_wrap_export(); break; case SEVEREWX: cb_severe_wx_wrap_export(); break; case STORMREP: cb_storm_wrap_export(); break; case REDXSNW: cb_redx_snw_wrap_export(); break; case REDX5739: cb_redx_5739_wrap_export(); break; case REDX5739A: cb_redx_5739A_wrap_export(); break; case REDX5739B: cb_redx_5739B_wrap_export(); break; default: return; } if (!progStatus.open_on_export) return; string location = wrap_outfilename; size_t p = location.rfind('/'); if (p != string::npos) location.erase(p+1); open_url(location.c_str()); } void cb_wrap_autosend() { if (progStatus.change_modem_with_autosend) send_new_modem(); switch (selected_form) { case ICS203: cb_203_wrap_autosend(); break; case ICS205: cb_205_wrap_autosend(); break; case ICS205A: cb_205a_wrap_autosend(); break; case ICS206: cb_206_wrap_autosend(); break; case ICS213: cb_213_wrap_autosend(); break; case ICS214: cb_214_wrap_autosend(); break; case ICS216: cb_216_wrap_autosend(); break; case ICS309: cb_309_wrap_autosend(); break; case HICS203: cb_hics203_wrap_autosend(); break; case HICS206: h206_cb_wrap_autosend(); break; case HICS213: h213_cb_wrap_autosend(); break; case HICS214: hics214_cb_wrap_autosend(); break; case RADIOGRAM: cb_rg_wrap_autosend(); break; case IARU: iaru_cb_wrap_autosend(); break; case CAP105: cap105_cb_wrap_autosend(); break; case CAP110: cap110_cb_wrap_autosend(); break; case PLAINTEXT: cb_pt_wrap_autosend(); break; case BLANK: cb_blank_wrap_autosend(); break; case CSV: cb_csv_wrap_autosend(); break; case CUSTOM: cb_custom_wrap_autosend(); break; case TRANSFER: cb_transfer_wrap_autosend(); break; case CUSTOM_TRANSFER: cb_transfer_custom_html(); break; case MARSDAILY: cb_mars_daily_wrap_autosend(); break; case MARSINEEI: cb_mars_ineei_wrap_autosend(); break; case MARSNET: cb_mars_net_wrap_autosend(); break; case MARSARMY: cb_mars_army_wrap_autosend(); break; case MARSNAVY: cb_mars_navy_wrap_autosend(); break; case WXHC: cb_wxhc_wrap_autosend(); break; case SEVEREWX: cb_severe_wx_wrap_autosend(); break; case STORMREP: cb_storm_wrap_autosend(); break; case REDXSNW: cb_redx_snw_wrap_autosend(); break; case REDX5739: cb_redx_5739_wrap_autosend(); break; case REDX5739A: cb_redx_5739A_wrap_autosend(); break; case REDX5739B: cb_redx_5739B_wrap_autosend(); break; default: return; } } void cb_load_template() { switch (selected_form) { case ICS203: cb_203_load_template(); break; case ICS205: cb_205_load_template(); break; case ICS205A: cb_205a_load_template(); break; case ICS206: cb_206_load_template(); break; case ICS213: cb_213_load_template(); break; case ICS214: cb_214_load_template(); break; case ICS216: cb_216_load_template(); break; case ICS309: cb_309_load_template(); break; case HICS203: cb_hics203_load_template(); break; case HICS206: h206_cb_load_template(); break; case HICS213: h213_cb_load_template(); break; case HICS214: hics214_cb_load_template(); break; case RADIOGRAM: cb_rg_load_template(); break; case IARU: iaru_cb_load_template(); break; case CAP105: cap105_cb_load_template(); break; case CAP110: cap110_cb_load_template(); break; case PLAINTEXT: cb_pt_load_template(); break; case BLANK: cb_blank_load_template(); break; case CSV: cb_csv_load_template(); break; case CUSTOM: cb_custom_load_template(); break; case MARSDAILY: cb_mars_daily_load_template(); break; case MARSINEEI: cb_mars_ineei_load_template(); break; case MARSNET: cb_mars_net_load_template(); break; case MARSARMY: cb_mars_army_load_template(); break; case MARSNAVY: cb_mars_navy_load_template(); break; case WXHC: cb_wxhc_load_template(); break; case SEVEREWX: cb_severe_wx_load_template(); break; case STORMREP: cb_storm_load_template(); break; case REDXSNW: cb_redx_snw_load_template(); break; case REDX5739: cb_redx_5739_load_template(); break; case REDX5739A: cb_redx_5739A_load_template(); break; case REDX5739B: cb_redx_5739B_load_template(); break; default: return; } estimate(); } void cb_save_template() { switch (selected_form) { case ICS203: cb_203_save_template(); break; case ICS205: cb_205_save_template(); break; case ICS205A: cb_205a_save_template(); break; case ICS206: cb_206_save_template(); break; case ICS213: cb_213_save_template(); break; case ICS214: cb_214_save_template(); break; case ICS216: cb_216_save_template(); break; case ICS309: cb_309_save_template(); break; case HICS203: cb_hics203_save_template(); break; case HICS206: h206_cb_save_template(); break; case HICS213: h213_cb_save_template(); break; case HICS214: hics214_cb_save_template(); break; case RADIOGRAM: cb_rg_save_template(); break; case IARU: iaru_cb_save_template(); break; case CAP105: cap105_cb_save_template(); break; case CAP110: cap110_cb_save_template(); break; case PLAINTEXT: cb_pt_save_template(); break; case BLANK: cb_blank_save_template(); break; case CSV: cb_csv_save_template(); break; case CUSTOM: cb_custom_save_template(); break; case MARSDAILY: cb_mars_daily_save_template(); break; case MARSINEEI: cb_mars_ineei_save_template(); break; case MARSNET: cb_mars_net_save_template(); break; case MARSARMY: cb_mars_army_save_template(); break; case MARSNAVY: cb_mars_navy_save_template(); break; case WXHC: cb_wxhc_save_template(); break; case SEVEREWX: cb_severe_wx_save_template(); break; case STORMREP: cb_storm_save_template(); break; case REDXSNW: cb_redx_snw_save_template(); break; case REDX5739: cb_redx_5739_save_template(); break; case REDX5739A: cb_redx_5739A_save_template(); break; case REDX5739B: cb_redx_5739B_save_template(); break; default: return; } } void cb_save_as_template() { switch (selected_form) { case ICS203: cb_203_save_as_template(); break; case ICS205: cb_205_save_as_template(); break; case ICS205A: cb_205a_save_as_template(); break; case ICS206: cb_206_save_as_template(); break; case ICS213: cb_213_save_as_template(); break; case ICS214: cb_214_save_as_template(); break; case ICS216: cb_216_save_as_template(); break; case ICS309: cb_309_save_as_template(); break; case HICS203: cb_hics203_save_as_template(); break; case HICS206: h206_cb_save_as_template(); break; case HICS213: h213_cb_save_as_template(); break; case HICS214: hics214_cb_save_as_template(); break; case RADIOGRAM: cb_rg_save_as_template(); break; case IARU: iaru_cb_save_as_template(); break; case CAP105: cap105_cb_save_as_template(); break; case CAP110: cap110_cb_save_as_template(); break; case PLAINTEXT: cb_pt_save_as_template(); break; case BLANK: cb_blank_save_as_template(); break; case CSV: cb_csv_save_as_template(); break; case CUSTOM: cb_custom_save_as_template(); break; case MARSDAILY: cb_mars_daily_save_as_template(); break; case MARSINEEI: cb_mars_ineei_save_as_template(); break; case MARSNET: cb_mars_net_save_as_template(); break; case MARSARMY: cb_mars_army_save_as_template(); break; case MARSNAVY: cb_mars_navy_save_as_template(); break; case WXHC: cb_wxhc_save_as_template(); break; case SEVEREWX: cb_severe_wx_save_as_template(); break; case STORMREP: cb_storm_save_as_template(); break; case REDXSNW: cb_redx_snw_save_as_template(); break; case REDX5739: cb_redx_5739_save_as_template(); break; case REDX5739A: cb_redx_5739A_save_as_template(); break; case REDX5739B: cb_redx_5739B_save_as_template(); break; default: return; } } void cb_open() { switch (selected_form) { case ICS203: cb_203_open(); break; case ICS205: cb_205_open(); break; case ICS205A: cb_205a_open(); break; case ICS206: cb_206_open(); break; case ICS213: cb_213_open(); break; case ICS214: cb_214_open(); break; case ICS216: cb_216_open(); break; case ICS309: cb_309_open(); break; case HICS203: cb_hics203_open(); break; case HICS206: h206_cb_open(); break; case HICS213: h213_cb_open(); break; case HICS214: hics214_cb_open(); break; case RADIOGRAM: cb_rg_open(); break; case IARU: iaru_cb_open(); break; case CAP105: cap105_cb_open(); break; case CAP110: cap110_cb_open(); break; case PLAINTEXT: cb_pt_open(); break; case BLANK: cb_blank_open(); break; case CSV: cb_csv_open(); break; case CUSTOM: cb_custom_open(); break; case MARSDAILY: cb_mars_daily_open(); break; case MARSINEEI: cb_mars_ineei_open(); break; case MARSNET: cb_mars_net_open(); break; case MARSARMY: cb_mars_army_open(); break; case MARSNAVY: cb_mars_navy_open(); break; case WXHC: cb_wxhc_open(); break; case SEVEREWX: cb_severe_wx_open(); break; case STORMREP: cb_storm_open(); break; case REDXSNW: cb_redx_snw_open(); break; case REDX5739: cb_redx_5739_open(); break; case REDX5739A: cb_redx_5739A_open(); break; case REDX5739B: cb_redx_5739B_open(); break; default : return; } estimate(); } void cb_save_as() { switch (selected_form) { case ICS203: cb_203_save_as(); break; case ICS205: cb_205_save_as(); break; case ICS205A: cb_205a_save_as(); break; case ICS206: cb_206_save_as(); break; case ICS213: cb_213_save_as(); break; case ICS214: cb_214_save_as(); break; case ICS216: cb_216_save_as(); break; case ICS309: cb_309_save_as(); break; case HICS203: cb_hics203_save_as(); break; case HICS206: h206_cb_save_as(); break; case HICS213: h213_cb_save_as(); break; case HICS214: hics214_cb_save_as(); break; case RADIOGRAM: cb_rg_save_as(); break; case IARU: iaru_cb_save_as(); break; case CAP105: cap105_cb_save_as(); break; case CAP110: cap110_cb_save_as(); break; case PLAINTEXT: cb_pt_save_as(); break; case MARSDAILY: cb_mars_daily_save_as(); break; case MARSINEEI: cb_mars_ineei_save_as(); break; case MARSNET: cb_mars_net_save_as(); break; case MARSARMY: cb_mars_army_save_as(); break; case MARSNAVY: cb_mars_navy_save_as(); break; case WXHC: cb_wxhc_save_as(); break; case SEVEREWX: cb_severe_wx_save_as(); break; case STORMREP: cb_storm_save_as(); break; case REDXSNW: cb_redx_snw_save_as(); break; case REDX5739: cb_redx_5739_save_as(); break; case REDX5739A: cb_redx_5739A_save_as(); break; case REDX5739B: cb_redx_5739B_save_as(); break; case BLANK: cb_blank_save_as(); break; case CSV: cb_csv_save_as(); break; case CUSTOM: cb_custom_save_as(); break; default: return; } } void cb_save() { switch (selected_form) { case ICS203: cb_203_save(); break; case ICS205: cb_205_save(); break; case ICS205A: cb_205a_save(); break; case ICS206: cb_206_save(); break; case ICS213: cb_213_save(); break; case ICS214: cb_214_save(); break; case ICS216: cb_216_save(); break; case ICS309: cb_309_save(); break; case HICS203: cb_hics203_save(); break; case HICS206: h206_cb_save(); break; case HICS213: h213_cb_save(); break; case HICS214: hics214_cb_save(); break; case RADIOGRAM: cb_rg_save(); break; case IARU: iaru_cb_save(); break; case CAP105: cap105_cb_save(); break; case CAP110: cap110_cb_save(); break; case PLAINTEXT: cb_pt_save(); break; case MARSDAILY: cb_mars_daily_save(); break; case MARSINEEI: cb_mars_ineei_save(); break; case MARSNET: cb_mars_net_save(); break; case MARSARMY: cb_mars_army_save(); break; case MARSNAVY: cb_mars_navy_save(); break; case WXHC: cb_wxhc_save(); break; case SEVEREWX: cb_severe_wx_save(); break; case STORMREP: cb_storm_save(); break; case REDXSNW: cb_redx_snw_save(); break; case REDX5739: cb_redx_5739_save(); break; case REDX5739A: cb_redx_5739A_save(); break; case REDX5739B: cb_redx_5739B_save(); break; case BLANK: cb_blank_save(); break; case CSV: cb_csv_save(); break; case CUSTOM: cb_custom_save(); break; default: return; } } void cb_html() { switch (selected_form) { case ICS203: cb_203_html(); break; case ICS205: cb_205_html(); break; case ICS205A: cb_205a_html(); break; case ICS206: cb_206_html(); break; case ICS213: cb_213_html(); break; case ICS214: cb_214_html(); break; case ICS216: cb_216_html(); break; case ICS309: cb_309_html(); break; case HICS203: cb_hics203_html(); break; case HICS206: h206_cb_html(); break; case HICS213: h213_cb_html(); break; case HICS214: hics214_cb_html(); break; case RADIOGRAM: cb_rg_html(); break; case IARU : iaru_cb_html(); break; case CAP105: cap105_cb_html(); break; case CAP110: cap110_cb_html(); break; case PLAINTEXT: cb_pt_html(); break; case MARSDAILY: cb_mars_daily_html(); break; case MARSINEEI: cb_mars_ineei_html(); break; case MARSNET: cb_mars_net_html(); break; case MARSARMY: cb_mars_army_html(); break; case MARSNAVY: cb_mars_navy_html(); break; case WXHC: cb_wxhc_html(); break; case SEVEREWX: cb_severe_wx_html(); break; case STORMREP: cb_storm_html(); break; case REDXSNW: cb_redx_snw_html(); break; case REDX5739: cb_redx_5739_html(); break; case REDX5739A: cb_redx_5739A_html(); break; case REDX5739B: cb_redx_5739B_html(); break; case BLANK: cb_blank_html(); break; case CSV: cb_csv_html(); break; case CUSTOM: cb_custom_html(); break; default: return; } } void cb_html_fcopy() { switch (selected_form) { case ICS203: cb_203_html(); break; case ICS205: cb_205_html(); break; case ICS205A: cb_205a_html(); break; case ICS206: cb_206_html(); break; case ICS213: cb_213_html(); break; case ICS214: cb_214_html(); break; case ICS216: cb_216_html(); break; case ICS309: cb_309_html(); break; case HICS203: cb_hics203_html(); break; case HICS206: h206_cb_html(); break; case HICS213: h213_cb_html(); break; case HICS214: hics214_cb_html(); break; case RADIOGRAM: cb_rg_html_fcopy(); break; default: fl_alert2("Not implemented for this form type"); } } void cb_text() { switch (selected_form) { case ICS203: cb_203_textout(); break; case ICS205: cb_205_textout(); break; case ICS205A: cb_205a_textout(); break; case ICS206: cb_206_textout(); break; case ICS213: cb_213_textout(); break; case ICS214: cb_214_textout(); break; case ICS216: cb_216_textout(); break; case ICS309: cb_309_textout(); break; case HICS203: cb_hics203_textout(); break; case HICS206: h206_cb_textout(); break; case HICS213: h213_cb_textout(); break; case HICS214: hics214_cb_textout(); break; case RADIOGRAM: cb_rg_textout(); break; case IARU: iaru_cb_textout(); break; case CAP105: cap105_cb_textout(); break; case CAP110: cap110_cb_textout(); break; case PLAINTEXT: cb_pt_textout(); break; case MARSDAILY: cb_mars_daily_textout(); break; case MARSINEEI: cb_mars_ineei_textout(); break; case MARSNET: cb_mars_net_textout(); break; case MARSARMY: cb_mars_army_textout(); break; case MARSNAVY: cb_mars_navy_textout(); break; case WXHC: cb_wxhc_textout(); break; case SEVEREWX: cb_severe_wx_textout(); break; case STORMREP: cb_storm_textout(); break; case REDXSNW: cb_redx_snw_textout(); break; case REDX5739: cb_redx_5739_textout(); break; case REDX5739A: cb_redx_5739A_textout(); break; case REDX5739B: cb_redx_5739B_textout(); break; case CSV: cb_csv_textout(); break; case CUSTOM: cb_custom_textout(); break; case BLANK: cb_blank_textout(); break; default : return; } } extern void disconnect_from_fldigi(); void cb_exit() { progStatus.saveLastState(); FSEL::destroy(); try { disconnect_from_fldigi(); } catch (...) { } close_xmlrpc(); close_server(); debug::stop(); exit(0); } void exit_main(Fl_Widget *w) { if (Fl::event_key() == FL_Escape) return; cb_exit(); } void cb_About() { fl_alert2(_("Version "PACKAGE_VERSION)); } void cb_folders() { open_url(FLMSG_dir.c_str()); } void show_filename(string p) { switch (selected_form) { case ICS203: base_203_filename = fl_filename_name(p.c_str()); break; case ICS205: base_205_filename = fl_filename_name(p.c_str()); break; case ICS205A: base_205a_filename = fl_filename_name(p.c_str()); break; case ICS206: base_206_filename = fl_filename_name(p.c_str()); break; case ICS213: base_213_filename = fl_filename_name(p.c_str()); break; case ICS214: base_214_filename = fl_filename_name(p.c_str()); break; case ICS216: base_216_filename = fl_filename_name(p.c_str()); break; case ICS309: base_309_filename = fl_filename_name(p.c_str()); break; case HICS203: base_hics203_filename = fl_filename_name(p.c_str()); break; case HICS206: h206_base_filename = fl_filename_name(p.c_str()); break; case HICS213: h213_base_filename = fl_filename_name(p.c_str()); break; case HICS214: hics214_base_filename = fl_filename_name(p.c_str()); break; case RADIOGRAM: base_rg_filename = fl_filename_name(p.c_str()); break; case IARU: iaru_base_filename = fl_filename_name(p.c_str()); break; case CAP105: cap105_base_filename = fl_filename_name(p.c_str()); break; case CAP110: cap110_base_filename = fl_filename_name(p.c_str()); break; case PLAINTEXT: base_pt_filename = fl_filename_name(p.c_str()); break; case MARSDAILY: base_mars_daily_filename = fl_filename_name(p.c_str()); break; case MARSINEEI: base_mars_ineei_filename = fl_filename_name(p.c_str()); break; case MARSNET: base_mars_net_filename = fl_filename_name(p.c_str()); break; case MARSARMY: base_mars_army_filename = fl_filename_name(p.c_str()); break; case MARSNAVY: base_mars_navy_filename = fl_filename_name(p.c_str()); break; case WXHC: base_wxhc_filename = fl_filename_name(p.c_str()); break; case SEVEREWX: base_severe_wx_filename = fl_filename_name(p.c_str()); break; case STORMREP: base_storm_filename = fl_filename_name(p.c_str()); break; case REDXSNW: base_redx_snw_filename = fl_filename_name(p.c_str()); break; case REDX5739: base_redx_5739_filename = fl_filename_name(p.c_str()); break; case REDX5739A: base_redx_5739A_filename = fl_filename_name(p.c_str()); break; case REDX5739B: base_redx_5739B_filename = fl_filename_name(p.c_str()); break; case BLANK: base_blank_filename = fl_filename_name(p.c_str()); break; case CSV: base_csv_filename = fl_filename_name(p.c_str()); break; case CUSTOM: base_custom_filename = fl_filename_name(p.c_str()); break; case TRANSFER: base_transfer_filename = fl_filename_name(p.c_str()); break; case CUSTOM_TRANSFER: break; default: return; } txt_filename->value(fl_filename_name(p.c_str())); txt_filename->redraw(); } #define KNAME "fllog" #if !defined(__APPLE__) && !defined(__WOE32__) && USE_X Pixmap flmsg_icon_pixmap; void make_pixmap(Pixmap *xpm, const char **data) { Fl_Window w(0,0, KNAME); w.xclass(KNAME); w.show(); w.make_current(); Fl_Pixmap icon(data); int maxd = (icon.w() > icon.h()) ? icon.w() : icon.h(); *xpm = fl_create_offscreen(maxd, maxd); fl_begin_offscreen(*xpm); fl_color(FL_BACKGROUND_COLOR); fl_rectf(0, 0, maxd, maxd); icon.draw(maxd - icon.w(), maxd - icon.h()); fl_end_offscreen(); } #endif void default_form() { selected_form = progStatus.tab; select_form(selected_form); cb_new(); } #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 int default_handler(int event) { if (event != FL_SHORTCUT) return 0; else if (Fl::event_ctrl()) { Fl_Widget* w = Fl::focus(); return w->handle(FL_KEYBOARD); } return 0; } #endif #ifdef __APPLE__ // registered file drop call back to operating system void open_callback(const char *param) { LOG_INFO("OS file drop callback %s", param); string pathname = param; if (pathname.find(WRAP_EXT) != string::npos) wrap_import(pathname.c_str()); else { read_data_file(pathname); show_filename(pathname); } } #endif void after_start(void *) { check_mycall(); def_203_filename = ICS_msg_dir; def_203_filename.append("default"F203_EXT); def_203_TemplateName = ICS_tmp_dir; def_203_TemplateName.append("default"T203_EXT); def_205_filename = ICS_msg_dir; def_205_filename.append("default"F205_EXT); def_205_TemplateName = ICS_tmp_dir; def_205_TemplateName.append("default"T205_EXT); def_205a_filename = ICS_msg_dir; def_205a_filename.append("default"F205A_EXT); def_205a_TemplateName = ICS_tmp_dir; def_205a_TemplateName.append("default"T205A_EXT); def_206_filename = ICS_msg_dir; def_206_filename.append("default"F206_EXT); def_206_TemplateName = ICS_tmp_dir; def_206_TemplateName.append("default"T206_EXT); def_213_filename = ICS_msg_dir; def_213_filename.append("default"F213_EXT); def_213_TemplateName = ICS_tmp_dir; def_213_TemplateName.append("default"T213_EXT); def_214_filename = ICS_msg_dir; def_214_filename.append("default"F214_EXT); def_214_TemplateName = ICS_tmp_dir; def_214_TemplateName.append("default"T214_EXT); def_216_filename = ICS_msg_dir; def_216_filename.append("default"F216_EXT); def_216_TemplateName = ICS_tmp_dir; def_216_TemplateName.append("default"T216_EXT); def_309_filename = ICS_msg_dir; def_309_filename.append("default"F309_EXT); def_309_TemplateName = ICS_tmp_dir; def_309_TemplateName.append("default"T309_EXT); def_hics203_filename = ICS_msg_dir; def_hics203_filename.append("default"HF203_EXT); def_hics203_TemplateName = ICS_tmp_dir; def_hics203_TemplateName.append("default"HT203_EXT); h206_def_filename = ICS_msg_dir; h206_def_filename.append("default"HF206_EXT); h206_def_template_name = ICS_tmp_dir; h206_def_template_name.append("default"HT206_EXT); h213_def_filename = ICS_msg_dir; h213_def_filename.append("default"HF213_EXT); h213_def_template_name = ICS_tmp_dir; h213_def_template_name.append("default"HT213_EXT); hics214_def_filename = ICS_msg_dir; hics214_def_filename.append("default"HF214_EXT); hics214_template_name = ICS_tmp_dir; hics214_template_name.append("default"HT214_EXT); def_rg_filename = ICS_msg_dir; def_rg_filename.append("default"RGFILE_EXT); def_rg_TemplateName = ICS_tmp_dir; def_rg_TemplateName.append("default"RGTEMP_EXT); iaru_def_filename = ICS_msg_dir; iaru_def_filename.append("default"IARU_FILE_EXT); iaru_def_template_name = ICS_tmp_dir; iaru_def_template_name.append("default"IARU_TEMP_EXT); cap105_def_filename = ICS_msg_dir; cap105_def_filename.append("default"CAP105_FILE_EXT); cap105_def_template_name = ICS_tmp_dir; cap105_def_template_name.append("default"CAP105_TEMP_EXT); cap105_set_choices(); cap110_def_filename = ICS_msg_dir; cap110_def_filename.append("default"CAP105_FILE_EXT); cap110_def_template_name = ICS_tmp_dir; cap110_def_template_name.append("default"CAP105_TEMP_EXT); def_pt_filename = ICS_msg_dir; def_pt_filename.append("default"PTFILE_EXT); def_pt_TemplateName = ICS_tmp_dir; def_pt_TemplateName.append("default"PTTEMP_EXT); def_blank_filename = ICS_msg_dir; def_blank_filename.append("default"BLANKFILE_EXT); def_blank_TemplateName = ICS_tmp_dir; def_blank_TemplateName.append("default"BLANKTEMP_EXT); def_csv_filename = ICS_msg_dir; def_csv_filename.append("default"CSVFILE_EXT); def_csv_TemplateName = ICS_tmp_dir; def_csv_TemplateName.append("default"CSVTEMP_EXT); def_custom_filename = ICS_msg_dir; def_custom_filename.append("default"CUSTOMFILE_EXT); def_custom_TemplateName = ICS_tmp_dir; def_custom_TemplateName.append("default"CUSTOMTEMP_EXT); def_mars_daily_filename = ICS_msg_dir; def_mars_daily_filename.append("default"FMARSDAILY_EXT); def_mars_daily_TemplateName = ICS_tmp_dir; def_mars_daily_TemplateName.append("default"TMARSDAILY_EXT); def_mars_ineei_filename = ICS_msg_dir; def_mars_ineei_filename.append("default"FMARSINEEI_EXT); def_mars_ineei_TemplateName = ICS_tmp_dir; def_mars_ineei_TemplateName.append("default"TMARSINEEI_EXT); def_mars_net_filename = ICS_msg_dir; def_mars_net_filename.append("default"FMARSNET_EXT); def_mars_net_TemplateName = ICS_tmp_dir; def_mars_net_TemplateName.append("default"TMARSNET_EXT); def_mars_army_filename = ICS_msg_dir; def_mars_army_filename.append("default"FMARSARMY_EXT); def_mars_army_TemplateName = ICS_tmp_dir; def_mars_army_TemplateName.append("default"TMARSARMY_EXT); def_mars_navy_filename = ICS_msg_dir; def_mars_navy_filename.append("default"FMARSNAVY_EXT); def_mars_navy_TemplateName = ICS_tmp_dir; def_mars_navy_TemplateName.append("default"TMARSNAVY_EXT); def_wxhc_filename = ICS_msg_dir; def_wxhc_filename.append("default"FWXHC_EXT); def_wxhc_TemplateName = ICS_tmp_dir; def_wxhc_TemplateName.append("default"TWXHC_EXT); def_severe_wx_filename = ICS_msg_dir; def_severe_wx_filename.append("default"FSWX_EXT); def_severe_wx_TemplateName = ICS_tmp_dir; def_severe_wx_TemplateName.append("default"TSWX_EXT); def_storm_filename = ICS_msg_dir; def_storm_filename.append("default"FSTRM_EXT); def_storm_TemplateName = ICS_tmp_dir; def_storm_TemplateName.append("default"TSTRM_EXT); def_redx_snw_filename = ICS_msg_dir; def_redx_snw_filename.append("default"FREDXSNW_EXT); def_redx_snw_TemplateName = ICS_tmp_dir; def_redx_snw_TemplateName.append("default"TREDXSNW_EXT); def_redx_5739_filename = ICS_msg_dir; def_redx_5739_filename.append("default"FREDX5739_EXT); def_redx_5739_TemplateName = ICS_tmp_dir; def_redx_5739_TemplateName.append("default"TREDX5739_EXT); def_redx_5739A_filename = ICS_msg_dir; def_redx_5739A_filename.append("default"FREDX5739A_EXT); def_redx_5739A_TemplateName = ICS_tmp_dir; def_redx_5739A_TemplateName.append("default"TREDX5739A_EXT); def_redx_5739B_filename = ICS_msg_dir; def_redx_5739B_filename.append("default"FREDX5739B_EXT); def_redx_5739B_TemplateName = ICS_tmp_dir; def_redx_5739B_TemplateName.append("default"TREDX5739B_EXT); if (!cmd_fname.empty()) { if (cmd_fname.find(WRAP_EXT) != string::npos) wrap_import(cmd_fname.c_str()); else { read_data_file(cmd_fname); show_filename(cmd_fname); } estimate(); } else default_form(); // Check to see what io mode FLDIGI is in. std::string io_mode = get_io_mode(); int flag = 0; if(!io_mode.empty()) { flag = strncmp(io_mode.c_str(), "ARQ", 3); if(flag != 0) { flag = fl_choice2(_("KISS interface active! Switch FLDIGI to ARQ?"), _("No"), _("Yes"), NULL); if(flag == 1) enable_arq(); } } #ifdef __APPLE__ fl_open_callback(open_callback); #endif try { connect_to_fldigi(); } catch (...) { } } int main(int argc, char *argv[]) { if (argc > 1) { if (strcasecmp("--help", argv[1]) == 0) { int i = 0; while (options[i] != NULL) { printf("%s\n", options[i]); i++; } return 0; } if (strcasecmp("--version", argv[1]) == 0) { printf("Version: "VERSION"\n"); return 0; } } Fl::lock(); Fl::scheme("gtk+"); int arg_idx; FLMSG_dir.clear(); if (Fl::args(argc, argv, arg_idx, parse_args) != argc) showoptions(); { size_t p; string appdir; char dirbuf[FL_PATH_MAX + 1]; fl_filename_expand(dirbuf, FL_PATH_MAX, argv[0]); appdir.assign(dirbuf); #ifdef __WOE32__ p = appdir.rfind("flmsg.exe"); appdir.erase(p); p = appdir.find("FL_APPS/"); if (p != string::npos) { FLMSG_dir.assign(appdir.substr(0, p + 8)); } else { fl_filename_expand(dirbuf, FL_PATH_MAX, "$USERPROFILE/"); FLMSG_dir.assign(dirbuf); } FLMSG_dir.append("NBEMS.files/"); #else fl_filename_absolute(dirbuf, FL_PATH_MAX, argv[0]); appdir.assign(dirbuf); p = appdir.rfind("flmsg"); if (p != string::npos) appdir.erase(p); p = appdir.find("FL_APPS/"); if (p != string::npos) FLMSG_dir.assign(appdir.substr(0, p + 8)); else { fl_filename_expand(dirbuf, FL_PATH_MAX, "$HOME/"); FLMSG_dir = dirbuf; } DIR *isdir = 0; string test_dir; test_dir.assign(FLMSG_dir).append("NBEMS.files/"); isdir = opendir(test_dir.c_str()); if (isdir) { FLMSG_dir = test_dir; closedir(isdir); } else { FLMSG_dir.append(".nbems/"); } #endif } progStatus.loadLastState(); mainwindow = flmsg_dialog(); mainwindow->callback(exit_main); set_rg_choices(); iaru_set_choices(); #if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR == 3 Fl::add_handler(default_handler); #endif config_dialog = create_config_dialog(); header_window = headers_dialog(); btn_utc_format0->value(progStatus.UTC == 0); btn_utc_format1->value(progStatus.UTC == 1); btn_utc_format2->value(progStatus.UTC == 2); btn_utc_format3->value(progStatus.UTC == 3); btn_utc_format4->value(progStatus.UTC == 4); btn_utc_format5->value(progStatus.UTC == 5); btn_dtformat0->value(progStatus.dtformat == 0); btn_dtformat1->value(progStatus.dtformat == 1); btn_dtformat2->value(progStatus.dtformat == 2); btn_dtformat3->value(progStatus.dtformat == 3); cnt_wpl->value(progStatus.wpl); Fl_File_Icon::load_system_icons(); FSEL::create(); checkdirectories(); load_custom_menu(); string debug_file = FLMSG_dir; debug_file.append("debug_log_").append(sz_srvr_portnbr).append(".txt"); debug::start(debug_file.c_str()); LOG_INFO("FLMSG_dir %s", FLMSG_dir.c_str()); LOG_INFO("ARQ_dir %s", ARQ_dir.c_str()); LOG_INFO("ARQ_files_dir %s", ARQ_files_dir.c_str()); LOG_INFO("ARQ_recv_dir %s", ARQ_recv_dir.c_str()); LOG_INFO("ARQ_send_dir %s", ARQ_send_dir.c_str()); LOG_INFO("WRAP_dir %s", WRAP_dir.c_str()); LOG_INFO("WRAP_recv_dir %s", WRAP_recv_dir.c_str()); LOG_INFO("WRAP_send_dir %s", WRAP_send_dir.c_str()); LOG_INFO("WRAP_auto_dir %s", WRAP_auto_dir.c_str()); LOG_INFO("ICS_dir %s", ICS_dir.c_str()); LOG_INFO("ICS_msg_dir %s", ICS_msg_dir.c_str()); LOG_INFO("ICS_tmp_dir %s", ICS_tmp_dir.c_str()); LOG_INFO("CSV_dir %s", CSV_dir.c_str()); LOG_INFO("CUSTOM_dir %s", CUSTOM_dir.c_str()); LOG_INFO("Transfer dir %s", XFR_dir.c_str()); LOG_INFO("FLMSG_temp_dir %s", FLMSG_temp_dir.c_str()); if (!parse_info.empty()) LOG_INFO("%s", parse_info.c_str()); start_web_server(); if (!mongoose_msgs.empty()) LOG_INFO("%s", mongoose_msgs.c_str()); if (printme) { #ifdef __APPLE_ fl_open_display(); #endif print_and_exit(); if (exit_after_print && selected_form != CUSTOM) return 0; } open_xmlrpc(); xmlrpc_thread = new pthread_t; if (pthread_create(xmlrpc_thread, NULL, xmlrpc_loop, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } mainwindow->resize( progStatus.mainX, progStatus.mainY, mainwindow->w(), mainwindow->h()); #if defined(__WOE32__) # ifndef IDI_ICON # define IDI_ICON 101 # endif mainwindow->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON))); mainwindow->show (argc, argv); #elif !defined(__APPLE__) make_pixmap(&flmsg_icon_pixmap, flmsg_icon); mainwindow->icon((char *)flmsg_icon_pixmap); mainwindow->show(argc, argv); #else mainwindow->show(argc, argv); #endif if (string(mainwindow->label()) == "") { string main_label = PACKAGE_NAME; main_label.append(": ").append(PACKAGE_VERSION); mainwindow->label(main_label.c_str()); } Fl::add_timeout(0.10, after_start); int result = Fl::run(); if (server) mg_destroy_server(&server); return result; } void print_and_exit() { if (!cmd_fname.empty()) { if (cmd_fname.find(WRAP_EXT) != string::npos) { wrap_import(cmd_fname.c_str()); } else { read_data_file(cmd_fname); } switch (selected_form) { case ICS203 : cb_203_save(); cb_203_html(); break; case ICS205 : cb_205_save(); cb_205_html(); break; case ICS205A : cb_205a_save(); cb_205a_html(); break; case ICS206 : cb_206_save(); cb_206_html(); break; case ICS213 : cb_213_save(); cb_213_html(); break; case ICS214 : cb_214_save(); cb_214_html(); break; case ICS216 : cb_216_save(); cb_216_html(); break; case ICS309 : cb_309_save(); cb_309_html(); break; case HICS203 : cb_hics203_save(); cb_hics203_html(); break; case HICS206 : h206_cb_save(); h206_cb_html(); break; case HICS213 : h213_cb_save(); h213_cb_html(); break; case HICS214 : hics214_cb_save(); hics214_cb_html(); break; case RADIOGRAM : cb_rg_save(); cb_rg_html(); break; case PLAINTEXT : cb_pt_save(); cb_pt_html(); break; case BLANK : cb_blank_save(); cb_blank_html(); break; case CSV : cb_csv_save(); cb_csv_html(); break; case CUSTOM : cb_custom_save(); cb_custom_html(); break; case MARSDAILY : cb_mars_daily_save(); cb_mars_daily_html(); break; case MARSINEEI : cb_mars_ineei_save(); cb_mars_ineei_html(); break; case MARSNET : cb_mars_net_save(); cb_mars_net_html(); break; case MARSARMY : cb_mars_army_save(); cb_mars_army_html(); break; case MARSNAVY : cb_mars_navy_save(); cb_mars_navy_html(); break; case WXHC : cb_wxhc_save(); cb_wxhc_html(); break; case SEVEREWX : cb_severe_wx_save(); cb_severe_wx_html(); break; case STORMREP : cb_storm_save(); cb_storm_html(); break; case REDXSNW : cb_redx_snw_save(); cb_redx_snw_html(); break; case REDX5739 : cb_redx_5739_save(); cb_redx_5739_html(); break; case REDX5739A : cb_redx_5739A_save(); cb_redx_5739A_html(); break; case REDX5739B : cb_redx_5739B_save(); cb_redx_5739B_html(); break; } } } void drop_box_changed() { string buffer = drop_box->value(); size_t n; drop_box->value(""); drop_box->redraw(); if ((n = buffer.find("file:///")) != string::npos) buffer.erase(0, n + 7); if ((buffer.find(":\\")) != string::npos || (buffer.find("/") == 0)) { while ((n = buffer.find('\n')) != string::npos) buffer.erase(n, 1); while ((n = buffer.find('\r')) != string::npos) buffer.erase(n, 1); if (buffer.find(WRAP_EXT) != string::npos) wrap_import(buffer.c_str()); else read_data_file(buffer.c_str()); } else // try to extract as a text buffer extract_text(buffer, NULL); estimate(); } void drop_file_changed() { string buffer = drop_file->value(); size_t n; drop_file->value(""); drop_file->redraw(); if ((n = buffer.find("file:///")) != string::npos) buffer.erase(0, n + 7); if ((buffer.find(":\\")) != string::npos || (buffer.find("/") == 0)) { while ((n = buffer.find('\n')) != string::npos) buffer.erase(n, 1); while ((n = buffer.find('\r')) != string::npos) buffer.erase(n, 1); if (buffer.find(WRAP_EXT) != string::npos) wrap_import(buffer.c_str()); else read_data_file(buffer.c_str()); } else // try to extract as a text buffer extract_text(buffer, NULL); estimate(); } void checkdirectories(void) { struct DIRS { string& dir; const char* suffix; void (*new_dir_func)(void); }; DIRS FLMSG_dirs[] = { { FLMSG_dir, 0, 0 }, { ARQ_dir, "ARQ", 0 }, { ARQ_files_dir, "ARQ/files", 0 }, { ARQ_recv_dir, "ARQ/recv", 0 }, { ARQ_send_dir, "ARQ/send", 0 }, { WRAP_dir, "WRAP", 0 }, { WRAP_recv_dir, "WRAP/recv", 0 }, { WRAP_send_dir, "WRAP/send", 0 }, { WRAP_auto_dir, "WRAP/auto", 0 }, { ICS_dir, "ICS", 0 }, { ICS_msg_dir, "ICS/messages", 0 }, { ICS_tmp_dir, "ICS/templates", 0 }, { CSV_dir, "CSV", 0}, { CUSTOM_dir, "CUSTOM", 0}, { XFR_dir, "TRANSFERS", 0}, { FLMSG_temp_dir, "temp_files", 0 } }; int r; for (size_t i = 0; i < sizeof(FLMSG_dirs)/sizeof(*FLMSG_dirs); i++) { if (FLMSG_dirs[i].dir.empty() && FLMSG_dirs[i].suffix) FLMSG_dirs[i].dir.assign(FLMSG_dir).append(FLMSG_dirs[i].suffix).append(PATH_SEP); if ((r = mkdir(FLMSG_dirs[i].dir.c_str(), 0777)) == -1 && errno != EEXIST) { cerr << _("Could not make directory") << ' ' << FLMSG_dirs[i].dir << ": " << strerror(errno) << '\n'; exit(EXIT_FAILURE); } else if (r == 0 && FLMSG_dirs[i].new_dir_func) FLMSG_dirs[i].new_dir_func(); } } void showoptions() { if (!optionswindow) { optionswindow = optionsdialog(); for (int i = 0; options[i] != 0; i++) brwsOptions->add(options[i]); } optionswindow->show(); } void closeoptions() { optionswindow->hide(); } //extern Fl_Group *tab_headers; void set_config_values() { btn_dtformat0->value(progStatus.dtformat == 0); btn_dtformat1->value(progStatus.dtformat == 1); btn_dtformat2->value(progStatus.dtformat == 2); btn_utc_format0->value(progStatus.UTC == 0); btn_utc_format1->value(progStatus.UTC == 1); btn_utc_format2->value(progStatus.UTC == 2); btn_utc_format3->value(progStatus.UTC == 3); btn_utc_format4->value(progStatus.UTC == 4); btn_utc_format5->value(progStatus.UTC == 5); txt_my_call->value(progStatus.my_call.c_str()); txt_my_name->value(progStatus.my_name.c_str()); txt_my_addr->value(progStatus.my_addr.c_str()); txt_my_city->value(progStatus.my_city.c_str()); txt_my_tel->value(progStatus.my_tel.c_str()); cnt_wpl->value(progStatus.wpl); txt_rgnbr->value(progStatus.rgnbr.c_str()); btn_rgnbr_fname->value(progStatus.rgnbr_fname); btn_open_on_export->value(progStatus.open_on_export); btn_use_compression->value(progStatus.use_compression); txt_sernbr->value(progStatus.sernbr.c_str()); btn_sernbr_fname->value(progStatus.sernbr_fname); btn_call_fname->value(progStatus.call_fname); btn_dt_fname->value(progStatus.dt_fname); txt_mars_roster_file->value(progStatus.mars_roster_file.c_str()); txt_socket_addr->value(progStatus.socket_addr.c_str()); txt_socket_port->value(progStatus.socket_port.c_str()); txt_web_port->value(sz_srvr_portnbr); } void cb_config_date_time() { set_config_values(); tabs_config->value(tab_date_time); config_dialog->show(); } void cb_config_personal() { set_config_values(); tabs_config->value(tab_personal); config_dialog->show(); } void cb_config_radiogram() { set_config_values(); tabs_config->value(tab_config_radiogram); config_dialog->show(); } void cb_config_files() { set_config_values(); tabs_config->value(tab_files); config_dialog->show(); } void cb_config_socket() { set_config_values(); tabs_config->value(tab_socket); config_dialog->show(); } void show_help() { open_url("http://www.w1hkj.com/flmsg-help/index.html"); } void custom_download() { open_url("https://groups.yahoo.com/neo/groups/NBEMSham/files/Custom_flmsg_forms/"); } int parse_args(int argc, char **argv, int& idx) { if (strstr(argv[idx], "--p")) { printme = true; exit_after_print = true; idx++; parse_info.append("parsed --p\n"); return 1; } if (strstr(argv[idx], "--b")) { printme = true; idx++; parse_info.append("parsed --b\n"); return 1; } if (strstr(argv[idx], "--flmsg-dir")) { idx++; string tmp = argv[idx]; if (!tmp.empty()) FLMSG_dir_default = tmp; size_t p = string::npos; while ( (p = FLMSG_dir_default.find("\\")) != string::npos) FLMSG_dir_default[p] = '/'; if (FLMSG_dir_default[FLMSG_dir_default.length() - 1] != '/') FLMSG_dir_default += '/'; FLMSG_dir = FLMSG_dir_default; parse_info.append("parsed --flmsg-dir "); parse_info.append(FLMSG_dir).append("\n"); idx++; return 2; } if (strstr(argv[idx], "--server-port")) { idx++; int port = 0; if (sscanf(argv[idx], "%d", &port) == 1) srvr_portnbr = port; idx++; return 2; } if (strstr(argv[idx], "--auto-dir")) { idx++; string tmp = argv[idx]; if (!tmp.empty()) WRAP_auto_dir = tmp; size_t p = string::npos; while ( (p = WRAP_auto_dir.find("\\")) != string::npos) WRAP_auto_dir[p] = '/'; parse_info.append("parsed --autodir "); parse_info.append(WRAP_auto_dir).append("\n"); idx++; return 2; } if ( argv[idx][0] == '-' ) return 0; parse_info.append("parsed filename: ").append(argv[idx]).append("\n"); string fname = argv[idx]; if (fname.find(DATAFILE_EXT) != string::npos || fname.find(DATATEMP_EXT) != string::npos || fname.find(F203_EXT) != string::npos || fname.find(T203_EXT) != string::npos || fname.find(F205_EXT) != string::npos || fname.find(T205_EXT) != string::npos || fname.find(F205A_EXT) != string::npos || fname.find(T205A_EXT) != string::npos || fname.find(F206_EXT) != string::npos || fname.find(T206_EXT) != string::npos || fname.find(F213_EXT) != string::npos || fname.find(T213_EXT) != string::npos || fname.find(F214_EXT) != string::npos || fname.find(T214_EXT) != string::npos || fname.find(F216_EXT) != string::npos || fname.find(T216_EXT) != string::npos || fname.find(F309_EXT) != string::npos || fname.find(T309_EXT) != string::npos || fname.find(HF203_EXT) != string::npos || fname.find(HT203_EXT) != string::npos || fname.find(HF206_EXT) != string::npos || fname.find(HT206_EXT) != string::npos || fname.find(HF213_EXT) != string::npos || fname.find(HT213_EXT) != string::npos || fname.find(HF214_EXT) != string::npos || fname.find(HT214_EXT) != string::npos || fname.find(RGFILE_EXT) != string::npos || fname.find(RGTEMP_EXT) != string::npos || fname.find(PTFILE_EXT) != string::npos || fname.find(PTTEMP_EXT) != string::npos || fname.find(BLANKFILE_EXT) != string::npos || fname.find(BLANKTEMP_EXT) != string::npos || fname.find(CSVFILE_EXT) != string::npos || fname.find(CSVTEMP_EXT) != string::npos || fname.find(CUSTOMFILE_EXT) != string::npos || fname.find(CUSTOMTEMP_EXT) != string::npos || fname.find(FMARSDAILY_EXT) != string::npos || fname.find(TMARSDAILY_EXT) != string::npos || fname.find(FMARSINEEI_EXT) != string::npos || fname.find(TMARSINEEI_EXT) != string::npos || fname.find(FMARSNET_EXT) != string::npos || fname.find(TMARSNET_EXT) != string::npos || fname.find(FMARSARMY_EXT) != string::npos || fname.find(TMARSARMY_EXT) != string::npos || fname.find(FMARSNAVY_EXT) != string::npos || fname.find(TMARSNAVY_EXT) != string::npos || fname.find(FWXHC_EXT) != string::npos || fname.find(TWXHC_EXT) != string::npos || fname.find(FSWX_EXT) != string::npos || fname.find(TSWX_EXT) != string::npos || fname.find(FREDXSNW_EXT) != string::npos || fname.find(TREDXSNW_EXT) != string::npos || fname.find(FREDX5739_EXT) != string::npos || fname.find(TREDX5739_EXT) != string::npos || fname.find(FREDX5739A_EXT) != string::npos || fname.find(TREDX5739A_EXT) != string::npos || fname.find(FREDX5739B_EXT) != string::npos || fname.find(TREDX5739B_EXT) != string::npos || fname.find(IARU_FILE_EXT) != string::npos || fname.find(IARU_TEMP_EXT) != string::npos || fname.find(CAP105_FILE_EXT) != string::npos || fname.find(CAP105_TEMP_EXT) != string::npos || fname.find(CAP110_FILE_EXT) != string::npos || fname.find(CAP110_TEMP_EXT) != string::npos || fname.find(TRANSFER_EXT) != string::npos || fname.find(WRAP_EXT) != string::npos ) { cmd_fname = fname; } idx++; return 1; } void open_url(const char* url) { LOG_INFO("%s", url); #ifndef __WOE32__ const char* browsers[] = { # ifdef __APPLE__ getenv("FLDIGI_BROWSER"), // valid for any OS - set by user "open" // OS X # else "fl-xdg-open", // Puppy Linux "xdg-open", // other Unix-Linux distros getenv("FLDIGI_BROWSER"), // force use of spec'd browser getenv("BROWSER"), // most Linux distributions "sensible-browser", "firefox", "mozilla" // must be something out there! # endif }; switch (fork()) { case 0: # ifndef NDEBUG unsetenv("MALLOC_CHECK_"); unsetenv("MALLOC_PERTURB_"); # endif for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++) if (browsers[i]) execlp(browsers[i], browsers[i], url, (char*)0); exit(EXIT_FAILURE); case -1: fl_alert2(_("Could not run a web browser:\n%s\n\n" "Open this URL manually:\n%s"), strerror(errno), url); } #else if ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32) fl_alert2(_("Could not open url:\n%s\n"), url); #endif } //------------------------------------------------------------------------------ // mongoose server support //------------------------------------------------------------------------------ bool exit_server = false; pthread_t *web_server_thread = 0; pthread_mutex_t mutex_web_server = PTHREAD_MUTEX_INITIALIZER; int handle_type = HANDLE_WAITING; static const char *html_waiting = "<html><body>\n\ Custom form not posted<br>\n\ </html>"; void load_custom(void *) { load_custom_menu(); } void * poll_server(void *d) { int n = 10; exit_server = false; while(!exit_server) { pthread_mutex_lock(&mutex_web_server); mg_poll_server(server, 200); pthread_mutex_unlock(&mutex_web_server); n--; if (!n) { Fl::awake(load_custom, 0); n = 100; } MilliSleep(10); } return NULL; } void close_server() { pthread_mutex_lock(&mutex_web_server); exit_server = true; pthread_mutex_unlock(&mutex_web_server); MilliSleep(200); } extern void get_html_vars(struct mg_connection *conn); static int web_handler(struct mg_connection *conn) { if (strcmp(conn->uri, "/handle_post_request") == 0) { get_html_vars(conn); custom_viewer(conn); } else { if (handle_type == HANDLE_EDIT) { custom_editor(conn); } else if (handle_type == HANDLE_VIEW) { custom_viewer(conn); } else if (handle_type == HANDLE_WAITING) // Show HTML waiting mg_send_data(conn, html_waiting, strlen(html_waiting)); } handle_type = HANDLE_NONE; return MG_REQUEST_PROCESSED; } extern char *mg_open_msg; int start_web_server() { if ((server = mg_create_server(NULL)) == NULL) { fl_alert2("%s", "Failed to start web server"); exit(EXIT_FAILURE); return 0; } mongoose_msgs.clear(); char retmsg[500]; int ret = mg_set_option(server, "document_root", CUSTOM_dir.c_str(), retmsg); if (ret) { fl_alert2("%s", "Failed to set file server root directory"); exit(EXIT_FAILURE); return 0; } int last_portnbr = srvr_portnbr + 100; int test_portnbr = srvr_portnbr; while (test_portnbr < last_portnbr) { snprintf(sz_srvr_portnbr, sizeof(sz_srvr_portnbr), "%d", test_portnbr); ret = mg_set_option(server, "listening_port", sz_srvr_portnbr, retmsg); if (ret == 0) break; mongoose_msgs.append(retmsg).append(" ") .append(sz_srvr_portnbr); test_portnbr++; Fl::awake(); } if (test_portnbr == last_portnbr) { LOG_ERROR("%s", mongoose_msgs.c_str()); fl_alert2( "Web server port bind failed.\n\ Range %d - %d", srvr_portnbr, last_portnbr - 1); exit(EXIT_FAILURE); return 0; } else { if (!mongoose_msgs.empty()) mongoose_msgs.append("\n"); mongoose_msgs.append("Listening on port "). append(sz_srvr_portnbr); } mg_set_request_handler(server, web_handler); web_server_thread = new pthread_t; if (pthread_create(web_server_thread, NULL, poll_server, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } return 1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/configure.ac���������������������������������������������������������������������������0000664�0001750�0001750�00000007635�12516662741�012140� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Generic support for FLTK applications AC_COPYRIGHT([Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)]) AC_PREREQ([2.63]) dnl major and minor must be integers; patch may dnl contain other characters or be empty m4_define(FLMSG_MAJOR, [2]) m4_define(FLMSG_MINOR, [0]) m4_define(FLMSG_PATCH, [.10]) AC_INIT([FLMSG], FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH, [w1hkj AT w1hkj DOT com]) AC_SUBST([FLMSG_VERSION_MAJOR], [FLMSG_MAJOR]) AC_SUBST([FLMSG_VERSION_MINOR], [FLMSG_MINOR]) AC_SUBST([FLMSG_VERSION_PATCH], [FLMSG_PATCH]) AC_SUBST([FLMSG_VERSION], [FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH]) AC_DEFINE([FLMSG_VERSION_MAJOR], [FLMSG_MAJOR], [major version number]) AC_DEFINE([FLMSG_VERSION_MINOR], [FLMSG_MINOR], [minor version number]) AC_DEFINE([FLMSG_VERSION_PATCH], ["FLMSG_PATCH"], [patch/alpha version string]) AC_DEFINE([FLMSG_VERSION], ["FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH"], [version string]) AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args]) AC_CONFIG_AUX_DIR([build-aux]) # define build, build_cpu, build_vendor, build_os AC_CANONICAL_BUILD # define host, host_cpu, host_vendor, host_os AC_CANONICAL_HOST # define target, target_cpu, target_vendor, target_os AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign std-options subdir-objects 1.9.6]) #change the next config item for the specific application src's AC_CONFIG_SRCDIR([src/flmsg.cxx]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS # Checks for libraries. # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf]) ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile AC_FL_STATIC ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile AC_FL_OPT ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile AC_FL_DEBUG ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile AC_FL_MACOSX ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile AC_FL_WIN32 ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 AC_FLMSG_NP_COMPAT ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional AC_CHECK_FLTK ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then AC_FLMSG_PKG_CHECK([x], [x11], [no], [yes]) fi ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile AC_FLMSG_PKG_CHECK([flxmlrpc], [flxmlrpc >= 0.1.0], [yes], [yes], [use external flxmlrpc library @<:@autodetect@:>@], [ENABLE_FLXMLRPC]) ### build info # Define various build variables in config.h AC_FLMSG_BUILD_INFO AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT ### summary AC_MSG_RESULT([ Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug ]) ���������������������������������������������������������������������������������������������������flmsg-2.0.10/scripts/�������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011412� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/scripts/builddist.sh�������������������������������������������������������������������0000775�0001750�0001750�00000000632�12453506346�013647� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������autoreconf make clean ./configure \ $PKGCFG \ $CROSSCFG \ --with-ptw32=/opt/mxe/usr/i686-pc-mingw32 \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ FLTK_CONFIG=$PREFIX/bin/i686-pc-mingw32-fltk-config make $PREFIX/bin/i686-pc-mingw32-strip src/flmsg.exe make nsisinst mv src/*setup*exe . make clean # build the distribution tarball ./configure make distcheck make clean ������������������������������������������������������������������������������������������������������flmsg-2.0.10/scripts/build4mingw.sh�����������������������������������������������������������������0000775�0001750�0001750�00000000555�12330516146�014106� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ### Script to build a win32 installation ./configure \ $PKGCFG \ $CROSSCFG \ --with-ptw32=/opt/mxe/usr/i686-pc-mingw32 \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ FLTK_CONFIG=$PREFIX/bin/i686-pc-mingw32-fltk-config \ make make $PREFIX/bin/i686-pc-mingw32-strip src/flmsg.exe make nsisinst mv src/*setup*exe . ���������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/scripts/mkappbundle.sh�����������������������������������������������������������������0000775�0001750�0001750�00000006701�12330516146�014162� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ### Script to create the .app structure for osx ### 20090730 Stelios Bounanos M0GLD if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" bundle_dir="$APPBUNDLE_NOLIBS" static_bundle_dir="$APPBUNDLE" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi plist="${data}/mac/Info.plist.in" FLMSG_icon="${data}/mac/FLMSG.icns" for f in "$plist" "$FLMSG_icon"; do test -r "$f" && continue echo "E: ${f}: not readable" >&2 exit 1 done # aaaaaaaaaargh => Aaaaaaaaaargh upcase1() { sed 'h; s/\(^.\).*/\1/; y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/; G; s/\n.//' } function copy_libs() { list="$1" while test "x$list" != "x"; do change="$list" list="" for obj in $change; do for lib in `otool -L $obj | \ sed -n 's!^.*[[:space:]]\([^[:space:]]*\.dylib\).*$!\1!p' | \ grep -Ev '^/(usr/lib|System)'`; do libfn="`basename $lib`" if ! test -f "Frameworks/$libfn"; then cp "$lib" "Frameworks/$libfn" install_name_tool -id "@executable_path/../Frameworks/$libfn" "Frameworks/$libfn" list="$list Frameworks/$libfn" fi install_name_tool -change "$lib" "@executable_path/../Frameworks/$libfn" "$obj" done done done } function bundle() { appname="${binary}-${appversion}.app" cd "$build" # bundle the binary echo "creating ${build}/$bundle_dir/$appname" $mkinstalldirs "$bundle_dir/$appname/Contents/MacOS" "$bundle_dir/$appname/Contents/Resources" cd "$bundle_dir" $INSTALL_PROGRAM "${build}/$binary" "$appname/Contents/MacOS" test "x$NOSTRIP" = "x" && ${STRIP:-strip} -S "$appname/Contents/MacOS/$binary" $INSTALL_DATA "$icon" "$appname/Contents/Resources" echo "APPL${signature}" > "$appname/Contents/PkgInfo" sed -e "s!%%IDENTIFIER%%!${identifier}!g; s!%%NAME%%!${name}!g;\ s!%%SIGNATURE%%!${signature}!g; s!%%BINARY%%!${binary}!g;\ s!%%VERSION%%!${version}!g; s!%%ICON%%!${icon##*/}!g;" < "$plist" > "$appname/Contents/Info.plist" if grep '%%[A-Z]*%%' "$appname/Contents/Info.plist"; then echo "E: unsubstituted variables in $appname/Contents/Info.plist" >&2 exit 1 fi # bundle the binary and its non-standard dependencies echo "creating ${build}/$static_bundle_dir/$appname" cd .. $mkinstalldirs "$static_bundle_dir" cp -pR "$bundle_dir/$appname" "$static_bundle_dir" $mkinstalldirs "$static_bundle_dir/$appname/Contents/Frameworks" cd "$static_bundle_dir/$appname/Contents" copy_libs "MacOS/$binary" } set -e identifier="com.w1hkj.$PACKAGE_TARNAME" name=$(echo "$PACKAGE_TARNAME" | upcase1) # we'll use the first four consonants as the signature signature="$(echo $PACKAGE_TARNAME | sed 's/[aeiouAEIOU]//g; s/\(^....\).*/\1/')" binary="$PACKAGE_TARNAME" icon="$FLMSG_icon" version="${FLMSG_VERSION_MAJOR}.${FLMSG_VERSION_MINOR}" appversion="$FLMSG_VERSION" bundle cd "$build" echo $ECHO_N "creating disk image" hdiutil create -ov -srcfolder "$bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}-nolibs.dmg" echo $ECHO_N "creating disk image" hdiutil create -ov -srcfolder "$static_bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}.dmg" ���������������������������������������������������������������flmsg-2.0.10/scripts/mknsisinst.sh������������������������������������������������������������������0000775�0001750�0001750�00000001702�12330516146�014056� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh ### Script to create a win32 installer file ### 20090510 Stelios Bounanos M0GLD, Dave Freese W1HKJ ### change for the target application flmsg_name=flmsg flmsg_bin=flmsg.exe if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi set -e test "x$NOSTRIP" = "x" && $STRIP -S "$flmsg_bin" def="-Dflmsg_NAME=$flmsg_name -Dflmsg_BINARY=$flmsg_bin -Dflmsg_VERSION=$PACKAGE_VERSION" $MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \ -D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi" ��������������������������������������������������������������flmsg-2.0.10/INSTALL��������������������������������������������������������������������������������0000664�0001750�0001750�00000025001�12330516146�010655� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions for flmsg ************************************ To compile flmsg you will need: * A recent C++ compiler. The GNU C++ compilers in the 4.x series are known to work. * Version 1.1.x of the Fast Light Tool Kit (FLTK), with its development library and headers. Versions 1.1.7 to 1.1.9 are known to work. FLTK's multi-threading support is recommended but not required. Once you have installed the required packages, the following commands should be sufficient to compile flmsg and install it under /usr/local: ./configure make make install (you may need superuser privileges for installation) The `install' target installs the executable, an icon, and a .desktop file. After installation, an flmsg launcher should appear somewhere in your applications menu. Create the desktop launcher. flmsg is designed as a desktop application that accepts target files to be wrapped or unwrapped by dropping the file onto the desktop launcher. Windows installation notes ************************** flmsg supports win32 systems as a cross compiled application using the MinGW win32 environment. To build an internationalized version of flmsg, install these additional packages: gettext gettext-devel libiconv libiconv2 ========== Generic installation instructions follow ========== Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/������������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�010242� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/funcs.m4����������������������������������������������������������������������������0000664�0001750�0001750�00000000761�12330516146�011532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# args: function, search-libs, other-libraries AC_DEFUN([AC_FLMSG_SEARCH_LIBS], [ m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z])) LIBS_search_libs_save="$LIBS" LIBS="" AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3) if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1]) LIBS="$LIBS_search_libs_save" ]) ���������������flmsg-2.0.10/m4/static.m4���������������������������������������������������������������������������0000664�0001750�0001750�00000000620�12330516146�011675� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FL_STATIC], [ AC_ARG_ENABLE([static], AC_HELP_STRING([--enable-static], [enable static linking for some libraries]), [case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;; esac], [ac_cv_static=no]) ]) ����������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/pkg-config.m4�����������������������������������������������������������������������0000664�0001750�0001750�00000002664�12330516146�012444� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# name, version, show-in-help?, optional?, help-text, [am-cond] AC_DEFUN([AC_FLMSG_PKG_CHECK], [ m4_define([PKG_NAME_UC], m4_translit([$1], [a-z], [A-Z])) m4_if([$3], [yes], [ AC_ARG_WITH($1, AC_HELP_STRING([--with-[]$1], [$5]), [case "${withval}" in yes|no) ac_cv_want_[]$1="${withval}" ;; *) AC_MSG_ERROR([bad value "${withval}" for --with-[]$1]) ;; esac], [ac_cv_want_[]$1=check]) ]) m4_if([$4], [no], [ac_cv_want_[]$1=yes]) test "x$ac_cv_want_[]$1" = "x" && ac_cv_want_[]$1="check" case "x$ac_cv_want_[]$1" in "xno") ac_cv_[]$1=no ;; "xcheck") PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [ac_cv_[]$1=yes], [ac_cv_[]$1=no]) ;; "xyes") PKG_CHECK_MODULES(PKG_NAME_UC, [$2]) # if we get here the test has succeeded ac_cv_[]$1=yes ;; esac if test "x$ac_cv_[]$1" = "xyes"; then AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1]) pkg_[]$1_version=`$PKG_CONFIG --modversion "$2" 2>/dev/null` else AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1]) pkg_[]$1_version="" fi AC_SUBST(PKG_NAME_UC[_CFLAGS]) AC_SUBST(PKG_NAME_UC[_LIBS]) AC_DEFINE_UNQUOTED(PKG_NAME_UC[_BUILD_VERSION], ["$pkg_[]$1_version"], [$1 version]) m4_ifval([$6], [ AM_CONDITIONAL([$6], [test "x$ac_cv_[]$1" = "xyes"]) ], [:]) ]) ����������������������������������������������������������������������������flmsg-2.0.10/m4/debug.m4����������������������������������������������������������������������������0000664�0001750�0001750�00000007067�12330516146�011510� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FL_RDYNAMIC], [ LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_CHECKING([whether $CC supports -rdynamic]) AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no]) AC_MSG_RESULT([$ac_cv_rdynamic]) AC_LANG_PUSH(C++) AC_MSG_CHECKING([whether $CXX supports -rdynamic]) AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no]) AC_MSG_RESULT([$ac_cv_rdynamic]) AC_LANG_POP(C++) LDFLAGS="$LDFLAGS_saved" ]) AC_DEFUN([AC_FL_DEBUG], [ AC_REQUIRE([AC_FL_OPT]) AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [turn on debugging]), [case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac], [ac_cv_debug=no]) AC_ARG_VAR([BFD_CFLAGS], [C compiler flags for libbfd]) AC_ARG_VAR([BFD_LIBS], [linker flags for libbfd]) AC_ARG_WITH([bfd], AC_HELP_STRING([--with-bfd@<:@=DIR@:>@], [search for libbfd in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_bfd="$withval"], [ac_cv_want_bfd=yes]) if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" AC_CHECK_HEADER([bfd.h], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"]) if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" AC_CHECK_LIB([bfd], [bfd_set_format], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"], [$bfd_other_libs]) fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then AC_MSG_CHECKING([for debug info flag]) if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi AC_MSG_RESULT([$gflag]) DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" AC_FL_RDYNAMIC if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" AC_MSG_NOTICE([debugging enabled; overriding CXXFLAGS]) if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) else ac_cv_compat_stack=no AC_DEFINE([HAVE_DBG_STACK], 0, [Define to 0 if not using dbg::stack]) fi fi AM_CONDITIONAL([ENABLE_DEBUG], [test "x$ac_cv_debug" = "xyes"]) AC_SUBST([DEBUG_CFLAGS]) AC_SUBST([RDYNAMIC]) AM_CONDITIONAL([COMPAT_STACK], [test "x$ac_cv_compat_stack" = "xyes"]) ]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/opt.m4������������������������������������������������������������������������������0000664�0001750�0001750�00000001634�12330516146�011216� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FL_OPT], [ AC_ARG_ENABLE([optimizations], AC_HELP_STRING([--enable-optimizations], [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]), [case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;; esac], [ac_cv_opt=none]) OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac AC_SUBST([OPT_CFLAGS]) ]) ����������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/build.m4����������������������������������������������������������������������������0000664�0001750�0001750�00000005203�12515555125�011514� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FLMSG_SH_DQ], [ ac_sh_dq="\"`$1 | sed 's/"/\\\\"/g'`\"" ]) AC_DEFUN([AC_FLMSG_BUILD_INFO], [ # Define build flags and substitute in Makefile.in # CPPFLAGS FLMSG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLMSG_BUILD_CPPFLAGS="$FLMSG_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLMSG_BUILD_CPPFLAGS="$FLMSG_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLMSG_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLMSG_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLMSG_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLMSG_BUILD_CXXFLAGS="-mthreads $FLMSG_BUILD_CXXFLAGS" fi # LDFLAGS FLMSG_BUILD_LDFLAGS= # LDADD FLMSG_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLMSG_BUILD_CXXFLAGS="$FLMSG_BUILD_CXXFLAGS -UNDEBUG" FLMSG_BUILD_LDFLAGS="$FLMSG_BUILD_LDFLAGS $RDYNAMIC" else FLMSG_BUILD_CXXFLAGS="$FLMSG_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLMSG_BUILD_LDFLAGS="-mthreads $FLMSG_BUILD_LDFLAGS" fi AC_SUBST([FLMSG_BUILD_CPPFLAGS]) AC_SUBST([FLMSG_BUILD_CXXFLAGS]) AC_SUBST([FLMSG_BUILD_LDFLAGS]) AC_SUBST([FLMSG_BUILD_LDADD]) #define build variables for config.h AC_DEFINE_UNQUOTED([BUILD_BUILD_PLATFORM], ["$build"], [Build platform]) AC_DEFINE_UNQUOTED([BUILD_HOST_PLATFORM], ["$host"], [Host platform]) AC_DEFINE_UNQUOTED([BUILD_TARGET_PLATFORM], ["$target"], [Target platform]) test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL AC_FLMSG_SH_DQ([echo $ac_configure_args]) AC_DEFINE_UNQUOTED([BUILD_CONFIGURE_ARGS], [$ac_sh_dq], [Configure arguments]) AC_FLMSG_SH_DQ([date]) AC_DEFINE_UNQUOTED([BUILD_DATE], [$ac_sh_dq], [Build date]) AC_FLMSG_SH_DQ([whoami]) AC_DEFINE_UNQUOTED([BUILD_USER], [$ac_sh_dq], [Build user]) AC_FLMSG_SH_DQ([hostname]) AC_DEFINE_UNQUOTED([BUILD_HOST], [$ac_sh_dq], [Build host]) AC_FLMSG_SH_DQ([$CXX -v 2>&1 | tail -1]) AC_DEFINE_UNQUOTED([BUILD_COMPILER], [$ac_sh_dq], [Compiler]) AC_FLMSG_SH_DQ([echo $FLMSG_BUILD_CPPFLAGS $FLMSG_BUILD_CXXFLAGS]) AC_DEFINE_UNQUOTED([FLMSG_BUILD_CXXFLAGS], [$ac_sh_dq], [FLMSG compiler flags]) AC_FLMSG_SH_DQ([echo $FLMSG_BUILD_LDFLAGS $FLMSG_BUILD_LDADD]) AC_DEFINE_UNQUOTED([FLMSG_BUILD_LDFLAGS], [$ac_sh_dq], [FLMSG linker flags]) if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi ]) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/macosx.m4���������������������������������������������������������������������������0000664�0001750�0001750�00000002452�12330516146�011705� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FL_MACOSX], [ case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac AC_ARG_ENABLE([mac-universal], AC_HELP_STRING([--enable-mac-universal], [build a universal binary on Mac OS X @<:@no@:>@]), [case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) AC_MSG_ERROR([bad value "${enableval}" for --enable-mac-universal]) ;; esac], [ac_cv_mac_universal=no]) if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" ;; *) mac_arches="" mac_sysroot="" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion" MAC_UNIVERSAL_LDFLAGS="$mac_arches" fi AC_SUBST([MAC_UNIVERSAL_CFLAGS]) AC_SUBST([MAC_UNIVERSAL_LDFLAGS]) AM_CONDITIONAL([DARWIN], [test "x$target_darwin" = "xyes"]) ]) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/np-compat.m4������������������������������������������������������������������������0000664�0001750�0001750�00000002036�12330516146�012307� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FLMSG_NP_COMPAT], [ AC_REQUIRE([AC_FL_MACOSX]) AC_REQUIRE([AC_FL_WIN32]) AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"]) if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi AC_FLMSG_SEARCH_LIBS([dlopen], [dl], [$other_libs]) AC_FLMSG_SEARCH_LIBS([clock_gettime], [rt], [$other_libs]) AC_FLMSG_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs]) AC_FLMSG_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs]) if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi AC_SUBST([EXTRA_LIBS]) AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"]) ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/m4/fltk.m4�����������������������������������������������������������������������������0000664�0001750�0001750�00000004737�12330516146�011363� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_CHECK_FLTK], [ AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility]) AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config]) AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config]) if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no]) else AC_MSG_CHECKING([for fltk-config]) AC_MSG_RESULT([$FLTK_CONFIG]) fi if test "$FLTK_CONFIG" = "no"; then AC_MSG_ERROR([ *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that *** contains fltk-config. ]) fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then AC_MSG_ERROR([$FLTK_CONFIG failed]) fi if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then HAVE_FLTK_API_VERSION=yes fi FLTK_VERSION="`$FLTK_CONFIG --version`" FLMSG_FLTK_API_MAJOR=${FLTK_VERSION%%.*} FLMSG_FLTK_API_MINOR=${FLTK_VERSION#*.}; FLMSG_FLTK_API_MINOR=${FLMSG_FLTK_API_MINOR%%.*} FLMSG_FLTK_API_PATCH=${FLTK_VERSION#*.}; FLMSG_FLTK_API_PATCH=${FLMSG_FLTK_API_PATCH#*.}; if test "${HAVE_FLTK_API_VERSION}" = "no"; then AC_MSG_ERROR([ *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3. ]) fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else AC_MSG_NOTICE([not checking for FLTK]) fi AC_SUBST([FLTK_CFLAGS]) AC_SUBST([FLTK_LIBS]) AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version]) AC_DEFINE_UNQUOTED([FLMSG_FLTK_API_MAJOR], [$FLMSG_FLTK_API_MAJOR], [FLTK API major version]) AC_DEFINE_UNQUOTED([FLMSG_FLTK_API_MINOR], [$FLMSG_FLTK_API_MINOR], [FLTK API minor version]) AC_DEFINE_UNQUOTED([FLMSG_FLTK_API_PATCH], [$FLMSG_FLTK_API_PATCH], [FLTK API patch]) AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer]) AC_CHECK_PROG([FLUID], [fluid], [fluid]) AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"]) ]) ���������������������������������flmsg-2.0.10/m4/win32.m4����������������������������������������������������������������������������0000664�0001750�0001750�00000003611�12330516146�011353� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_FL_WIN32], [ case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres]) if [ test "x$WINDRES" = "x" ]; then AC_MSG_WARN([The windres utility could not be found]) fi AC_DEFINE([__WOE32__], 1, [Define to 1 if we are building on mingw]) fi if test "x$target_mingw32" = "xyes"; then AC_CHECK_PROG([MAKENSIS], [makensis], [makensis]) fi AC_SUBST([WINDRES]) AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "x"]) AC_SUBST([MAKENSIS]) AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"]) AM_CONDITIONAL([WIN32], [test "x$target_win32" = "xyes"]) AM_CONDITIONAL([MINGW32], [test "x$target_mingw32" = "xyes"]) AC_ARG_VAR([PTW32_CFLAGS], [C compiler flags for pthreads-w32]) AC_ARG_VAR([PTW32_LIBS], [linker flags for pthreads-w32]) AC_ARG_WITH([ptw32], AC_HELP_STRING([--with-ptw32@<:@=DIR@:>@], [search for pthreads-w32 in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_ptw32="$withval"], [ac_cv_want_ptw32=no]) if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_cflags="-DPTW32_STATIC_LIB $ptw32_default_cflags" ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" fi AC_SUBST([PTW32_CFLAGS]) AC_SUBST([PTW32_LIBS]) ]) �����������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/configure������������������������������������������������������������������������������0000775�0001750�0001750�00000717153�12516663007�011560� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for FLMSG 2.0.10. # # Report bugs to <w1hkj AT w1hkj DOT com>. # # Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and w1hkj AT w1hkj DOT $0: com about your system, including any error possibly $0: output before this message. Then install a modern $0: shell, or manually run the script under such a shell if $0: you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FLMSG' PACKAGE_TARNAME='flmsg' PACKAGE_VERSION='2.0.10' PACKAGE_STRING='FLMSG 2.0.10' PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com' PACKAGE_URL='' ac_unique_file="src/flmsg.cxx" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS FLMSG_BUILD_LDADD FLMSG_BUILD_LDFLAGS FLMSG_BUILD_CXXFLAGS FLMSG_BUILD_CPPFLAGS ENABLE_FLXMLRPC_FALSE ENABLE_FLXMLRPC_TRUE FLXMLRPC_LIBS FLXMLRPC_CFLAGS X_LIBS X_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_FLUID_FALSE HAVE_FLUID_TRUE FLUID FLTK_LIBS FLTK_CFLAGS FLTK_CONFIG COMPAT_STRCASESTR_FALSE COMPAT_STRCASESTR_TRUE EXTRA_LIBS COMPAT_REGEX_FALSE COMPAT_REGEX_TRUE PTW32_LIBS PTW32_CFLAGS MINGW32_FALSE MINGW32_TRUE WIN32_FALSE WIN32_TRUE HAVE_NSIS_FALSE HAVE_NSIS_TRUE HAVE_WINDRES_FALSE HAVE_WINDRES_TRUE MAKENSIS WINDRES DARWIN_FALSE DARWIN_TRUE MAC_UNIVERSAL_LDFLAGS MAC_UNIVERSAL_CFLAGS COMPAT_STACK_FALSE COMPAT_STACK_TRUE RDYNAMIC DEBUG_CFLAGS ENABLE_DEBUG_FALSE ENABLE_DEBUG_TRUE BFD_LIBS BFD_CFLAGS OPT_CFLAGS EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build AC_CONFIG_ARGS FLMSG_VERSION FLMSG_VERSION_PATCH FLMSG_VERSION_MINOR FLMSG_VERSION_MAJOR target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_static enable_optimizations enable_debug with_bfd enable_mac_universal with_ptw32 with_flxmlrpc ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP BFD_CFLAGS BFD_LIBS PTW32_CFLAGS PTW32_LIBS FLTK_CONFIG FLTK_CFLAGS FLTK_LIBS FLUID PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR X_CFLAGS X_LIBS FLXMLRPC_CFLAGS FLXMLRPC_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures FLMSG 2.0.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/flmsg] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of FLMSG 2.0.10:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static enable static linking for some libraries --enable-optimizations use x86 optimizations (none|sse|sse2|sse3|native) [none] --enable-debug turn on debugging --enable-mac-universal build a universal binary on Mac OS X [no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-bfd[=DIR] search for libbfd in DIR/include and DIR/lib [mingw32 only] --with-ptw32[=DIR] search for pthreads-w32 in DIR/include and DIR/lib [mingw32 only] --with-flxmlrpc use external flxmlrpc library [autodetect] Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CC C compiler command CFLAGS C compiler flags CPP C preprocessor BFD_CFLAGS C compiler flags for libbfd BFD_LIBS linker flags for libbfd PTW32_CFLAGS C compiler flags for pthreads-w32 PTW32_LIBS linker flags for pthreads-w32 FLTK_CONFIG Path to fltk-config utility FLTK_CFLAGS C compiler flags for FLTK, overriding fltk-config FLTK_LIBS linker flags for FLTK, overriding fltk-config FLUID Fast Light User-Interface Designer PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path X_CFLAGS C compiler flags for X, overriding pkg-config X_LIBS linker flags for X, overriding pkg-config FLXMLRPC_CFLAGS C compiler flags for FLXMLRPC, overriding pkg-config FLXMLRPC_LIBS linker flags for FLXMLRPC, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <w1hkj AT w1hkj DOT com>. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF FLMSG configure 2.0.10 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to w1hkj AT w1hkj DOT com ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by FLMSG $as_me 2.0.10, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu FLMSG_VERSION_MAJOR=2 FLMSG_VERSION_MINOR=0 FLMSG_VERSION_PATCH=.10 FLMSG_VERSION=2.0.10 $as_echo "#define FLMSG_VERSION_MAJOR 2" >>confdefs.h $as_echo "#define FLMSG_VERSION_MINOR 0" >>confdefs.h $as_echo "#define FLMSG_VERSION_PATCH \".10\"" >>confdefs.h $as_echo "#define FLMSG_VERSION \"2.0.10\"" >>confdefs.h AC_CONFIG_ARGS=$ac_configure_args ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # define build, build_cpu, build_vendor, build_os # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # define host, host_cpu, host_vendor, host_os { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # define target, target_cpu, target_vendor, target_os { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='flmsg' VERSION='2.0.10' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' #change the next config item for the specific application src's ac_config_headers="$ac_config_headers src/config.h" # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # Checks for libraries. # Checks for header files. for ac_header in stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdbool.h> #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;; esac else ac_cv_static=no fi ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile # Check whether --enable-optimizations was given. if test "${enable_optimizations+set}" = set; then : enableval=$enable_optimizations; case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-optimizations" "$LINENO" 5 ;; esac else ac_cv_opt=none fi OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else ac_cv_debug=no fi # Check whether --with-bfd was given. if test "${with_bfd+set}" = set; then : withval=$with_bfd; ac_cv_want_bfd="$withval" else ac_cv_want_bfd=yes fi if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" if test "x$ac_cv_header_bfd_h" = xyes; then : ac_cv_have_bfd="yes" else ac_cv_have_bfd="no" fi if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_set_format in -lbfd" >&5 $as_echo_n "checking for bfd_set_format in -lbfd... " >&6; } if ${ac_cv_lib_bfd_bfd_set_format+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfd $bfd_other_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_set_format (); int main () { return bfd_set_format (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfd_bfd_set_format=yes else ac_cv_lib_bfd_bfd_set_format=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_set_format" >&5 $as_echo "$ac_cv_lib_bfd_bfd_set_format" >&6; } if test "x$ac_cv_lib_bfd_bfd_set_format" = xyes; then : ac_cv_have_bfd="yes" else ac_cv_have_bfd="no" fi fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug info flag" >&5 $as_echo_n "checking for debug info flag... " >&6; } if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gflag" >&5 $as_echo "$gflag" >&6; } DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5 $as_echo_n "checking whether $CC supports -rdynamic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_rdynamic=yes else ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 $as_echo "$ac_cv_rdynamic" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -rdynamic" >&5 $as_echo_n "checking whether $CXX supports -rdynamic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_rdynamic=yes else ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 $as_echo "$ac_cv_rdynamic" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: debugging enabled; overriding CXXFLAGS" >&5 $as_echo "$as_me: debugging enabled; overriding CXXFLAGS" >&6;} if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes $as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes $as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h else ac_cv_compat_stack=no $as_echo "#define HAVE_DBG_STACK 0" >>confdefs.h fi fi if test "x$ac_cv_debug" = "xyes"; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi if test "x$ac_cv_compat_stack" = "xyes"; then COMPAT_STACK_TRUE= COMPAT_STACK_FALSE='#' else COMPAT_STACK_TRUE='#' COMPAT_STACK_FALSE= fi ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac # Check whether --enable-mac-universal was given. if test "${enable_mac_universal+set}" = set; then : enableval=$enable_mac_universal; case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) as_fn_error $? "bad value \"${enableval}\" for --enable-mac-universal" "$LINENO" 5 ;; esac else ac_cv_mac_universal=no fi if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" ;; *) mac_arches="" mac_sysroot="" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion" MAC_UNIVERSAL_LDFLAGS="$mac_arches" fi if test "x$target_darwin" = "xyes"; then DARWIN_TRUE= DARWIN_FALSE='#' else DARWIN_TRUE='#' DARWIN_FALSE= fi ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 $as_echo "$WINDRES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$WINDRES" = "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The windres utility could not be found" >&5 $as_echo "$as_me: WARNING: The windres utility could not be found" >&2;} fi $as_echo "#define __WOE32__ 1" >>confdefs.h fi if test "x$target_mingw32" = "xyes"; then # Extract the first word of "makensis", so it can be a program name with args. set dummy makensis; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKENSIS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKENSIS"; then ac_cv_prog_MAKENSIS="$MAKENSIS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MAKENSIS="makensis" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAKENSIS=$ac_cv_prog_MAKENSIS if test -n "$MAKENSIS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKENSIS" >&5 $as_echo "$MAKENSIS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$WINDRES" != "x"; then HAVE_WINDRES_TRUE= HAVE_WINDRES_FALSE='#' else HAVE_WINDRES_TRUE='#' HAVE_WINDRES_FALSE= fi if test "x$MAKENSIS" != "x"; then HAVE_NSIS_TRUE= HAVE_NSIS_FALSE='#' else HAVE_NSIS_TRUE='#' HAVE_NSIS_FALSE= fi if test "x$target_win32" = "xyes"; then WIN32_TRUE= WIN32_FALSE='#' else WIN32_TRUE='#' WIN32_FALSE= fi if test "x$target_mingw32" = "xyes"; then MINGW32_TRUE= MINGW32_FALSE='#' else MINGW32_TRUE='#' MINGW32_FALSE= fi # Check whether --with-ptw32 was given. if test "${with_ptw32+set}" = set; then : withval=$with_ptw32; ac_cv_want_ptw32="$withval" else ac_cv_want_ptw32=no fi if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_cflags="-DPTW32_STATIC_LIB $ptw32_default_cflags" ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" fi ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 if test "x$ac_cv_header_regex_h" != "xyes"; then COMPAT_REGEX_TRUE= COMPAT_REGEX_FALSE='#' else COMPAT_REGEX_TRUE='#' COMPAT_REGEX_FALSE= fi if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_dlopen=1 else ac_cv_have_func_dlopen=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_DLOPEN $ac_cv_have_func_dlopen _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_clock_gettime=1 else ac_cv_have_func_clock_gettime=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME $ac_cv_have_func_clock_gettime _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_unlink" >&5 $as_echo_n "checking for library containing sem_unlink... " >&6; } if ${ac_cv_search_sem_unlink+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_unlink (); int main () { return sem_unlink (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sem_unlink=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sem_unlink+:} false; then : break fi done if ${ac_cv_search_sem_unlink+:} false; then : else ac_cv_search_sem_unlink=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_unlink" >&5 $as_echo "$ac_cv_search_sem_unlink" >&6; } ac_res=$ac_cv_search_sem_unlink if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_unlink=1 else ac_cv_have_func_sem_unlink=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_SEM_UNLINK $ac_cv_have_func_sem_unlink _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_timedwait" >&5 $as_echo_n "checking for library containing sem_timedwait... " >&6; } if ${ac_cv_search_sem_timedwait+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_timedwait (); int main () { return sem_timedwait (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sem_timedwait=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sem_timedwait+:} false; then : break fi done if ${ac_cv_search_sem_timedwait+:} false; then : else ac_cv_search_sem_timedwait=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_timedwait" >&5 $as_echo "$ac_cv_search_sem_timedwait" >&6; } ac_res=$ac_cv_search_sem_timedwait if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_timedwait=1 else ac_cv_have_func_sem_timedwait=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_SEM_TIMEDWAIT $ac_cv_have_func_sem_timedwait _ACEOF LIBS="$LIBS_search_libs_save" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi if test "x$ac_cv_func_strcasestr" != "xyes"; then COMPAT_STRCASESTR_TRUE= COMPAT_STRCASESTR_FALSE='#' else COMPAT_STRCASESTR_TRUE='#' COMPAT_STRCASESTR_FALSE= fi ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then # Extract the first word of "fltk-config", so it can be a program name with args. set dummy fltk-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FLTK_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $FLTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_FLTK_CONFIG="$FLTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FLTK_CONFIG" && ac_cv_path_FLTK_CONFIG="no" ;; esac fi FLTK_CONFIG=$ac_cv_path_FLTK_CONFIG if test -n "$FLTK_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 $as_echo "$FLTK_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fltk-config" >&5 $as_echo_n "checking for fltk-config... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 $as_echo "$FLTK_CONFIG" >&6; } fi if test "$FLTK_CONFIG" = "no"; then as_fn_error $? " *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that *** contains fltk-config. " "$LINENO" 5 fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5 fi if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then HAVE_FLTK_API_VERSION=yes fi FLTK_VERSION="`$FLTK_CONFIG --version`" FLMSG_FLTK_API_MAJOR=${FLTK_VERSION%%.*} FLMSG_FLTK_API_MINOR=${FLTK_VERSION#*.}; FLMSG_FLTK_API_MINOR=${FLMSG_FLTK_API_MINOR%%.*} FLMSG_FLTK_API_PATCH=${FLTK_VERSION#*.}; FLMSG_FLTK_API_PATCH=${FLMSG_FLTK_API_PATCH#*.}; if test "${HAVE_FLTK_API_VERSION}" = "no"; then as_fn_error $? " *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3. " "$LINENO" 5 fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for FLTK" >&5 $as_echo "$as_me: not checking for FLTK" >&6;} fi cat >>confdefs.h <<_ACEOF #define FLTK_BUILD_VERSION "`$FLTK_CONFIG --version`" _ACEOF cat >>confdefs.h <<_ACEOF #define FLMSG_FLTK_API_MAJOR $FLMSG_FLTK_API_MAJOR _ACEOF cat >>confdefs.h <<_ACEOF #define FLMSG_FLTK_API_MINOR $FLMSG_FLTK_API_MINOR _ACEOF cat >>confdefs.h <<_ACEOF #define FLMSG_FLTK_API_PATCH $FLMSG_FLTK_API_PATCH _ACEOF # Extract the first word of "fluid", so it can be a program name with args. set dummy fluid; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_FLUID+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FLUID"; then ac_cv_prog_FLUID="$FLUID" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_FLUID="fluid" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FLUID=$ac_cv_prog_FLUID if test -n "$FLUID"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLUID" >&5 $as_echo "$FLUID" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$FLUID"; then HAVE_FLUID_TRUE= HAVE_FLUID_FALSE='#' else HAVE_FLUID_TRUE='#' HAVE_FLUID_FALSE= fi ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi test "x$ac_cv_want_x" = "x" && ac_cv_want_x="check" case "x$ac_cv_want_x" in "xno") ac_cv_x=no ;; "xcheck") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 ac_cv_x=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_x=no else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_x=yes fi ;; "xyes") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (x11) were not met: $X_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details" "$LINENO" 5; } else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # if we get here the test has succeeded ac_cv_x=yes ;; esac if test "x$ac_cv_x" = "xyes"; then $as_echo "#define USE_X 1" >>confdefs.h pkg_x_version=`$PKG_CONFIG --modversion "x11" 2>/dev/null` else $as_echo "#define USE_X 0" >>confdefs.h pkg_x_version="" fi cat >>confdefs.h <<_ACEOF #define X_BUILD_VERSION "$pkg_x_version" _ACEOF : fi ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile # Check whether --with-flxmlrpc was given. if test "${with_flxmlrpc+set}" = set; then : withval=$with_flxmlrpc; case "${withval}" in yes|no) ac_cv_want_flxmlrpc="${withval}" ;; *) as_fn_error $? "bad value \"${withval}\" for --with-flxmlrpc" "$LINENO" 5 ;; esac else ac_cv_want_flxmlrpc=check fi test "x$ac_cv_want_flxmlrpc" = "x" && ac_cv_want_flxmlrpc="check" case "x$ac_cv_want_flxmlrpc" in "xno") ac_cv_flxmlrpc=no ;; "xcheck") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLXMLRPC" >&5 $as_echo_n "checking for FLXMLRPC... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 ac_cv_flxmlrpc=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_flxmlrpc=no else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_flxmlrpc=yes fi ;; "xyes") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLXMLRPC" >&5 $as_echo_n "checking for FLXMLRPC... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (flxmlrpc >= 0.1.0) were not met: $FLXMLRPC_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details" "$LINENO" 5; } else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # if we get here the test has succeeded ac_cv_flxmlrpc=yes ;; esac if test "x$ac_cv_flxmlrpc" = "xyes"; then $as_echo "#define USE_FLXMLRPC 1" >>confdefs.h pkg_flxmlrpc_version=`$PKG_CONFIG --modversion "flxmlrpc >= 0.1.0" 2>/dev/null` else $as_echo "#define USE_FLXMLRPC 0" >>confdefs.h pkg_flxmlrpc_version="" fi cat >>confdefs.h <<_ACEOF #define FLXMLRPC_BUILD_VERSION "$pkg_flxmlrpc_version" _ACEOF if test "x$ac_cv_flxmlrpc" = "xyes"; then ENABLE_FLXMLRPC_TRUE= ENABLE_FLXMLRPC_FALSE='#' else ENABLE_FLXMLRPC_TRUE='#' ENABLE_FLXMLRPC_FALSE= fi ### build info # Define various build variables in config.h # Define build flags and substitute in Makefile.in # CPPFLAGS FLMSG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLMSG_BUILD_CPPFLAGS="$FLMSG_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLMSG_BUILD_CPPFLAGS="$FLMSG_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLMSG_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLMSG_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLMSG_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLMSG_BUILD_CXXFLAGS="-mthreads $FLMSG_BUILD_CXXFLAGS" fi # LDFLAGS FLMSG_BUILD_LDFLAGS= # LDADD FLMSG_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLMSG_BUILD_CXXFLAGS="$FLMSG_BUILD_CXXFLAGS -UNDEBUG" FLMSG_BUILD_LDFLAGS="$FLMSG_BUILD_LDFLAGS $RDYNAMIC" else FLMSG_BUILD_CXXFLAGS="$FLMSG_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLMSG_BUILD_LDFLAGS="-mthreads $FLMSG_BUILD_LDFLAGS" fi #define build variables for config.h cat >>confdefs.h <<_ACEOF #define BUILD_BUILD_PLATFORM "$build" _ACEOF cat >>confdefs.h <<_ACEOF #define BUILD_HOST_PLATFORM "$host" _ACEOF cat >>confdefs.h <<_ACEOF #define BUILD_TARGET_PLATFORM "$target" _ACEOF test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL ac_sh_dq="\"`echo $ac_configure_args | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_CONFIGURE_ARGS $ac_sh_dq _ACEOF ac_sh_dq="\"`date | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_DATE $ac_sh_dq _ACEOF ac_sh_dq="\"`whoami | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_USER $ac_sh_dq _ACEOF ac_sh_dq="\"`hostname | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_HOST $ac_sh_dq _ACEOF ac_sh_dq="\"`$CXX -v 2>&1 | tail -1 | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_COMPILER $ac_sh_dq _ACEOF ac_sh_dq="\"`echo $FLMSG_BUILD_CPPFLAGS $FLMSG_BUILD_CXXFLAGS | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define FLMSG_BUILD_CXXFLAGS $ac_sh_dq _ACEOF ac_sh_dq="\"`echo $FLMSG_BUILD_LDFLAGS $FLMSG_BUILD_LDADD | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define FLMSG_BUILD_LDFLAGS $ac_sh_dq _ACEOF if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STACK_TRUE}" && test -z "${COMPAT_STACK_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then as_fn_error $? "conditional \"DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NSIS_TRUE}" && test -z "${HAVE_NSIS_FALSE}"; then as_fn_error $? "conditional \"HAVE_NSIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then as_fn_error $? "conditional \"MINGW32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_REGEX_TRUE}" && test -z "${COMPAT_REGEX_FALSE}"; then as_fn_error $? "conditional \"COMPAT_REGEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STRCASESTR_TRUE}" && test -z "${COMPAT_STRCASESTR_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STRCASESTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FLUID_TRUE}" && test -z "${HAVE_FLUID_FALSE}"; then as_fn_error $? "conditional \"HAVE_FLUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FLXMLRPC_TRUE}" && test -z "${ENABLE_FLXMLRPC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FLXMLRPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by FLMSG $as_me 2.0.10, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to <w1hkj AT w1hkj DOT com>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ FLMSG config.status 2.0.10 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' <confdefs.h | sed ' s/'"$ac_delim"'/"\\\ "/g' >>$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ### summary { $as_echo "$as_me:${as_lineno-$LINENO}: result: Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&5 $as_echo " Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&6; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/�����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663374�011614� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/missing����������������������������������������������������������������������0000755�0001750�0001750�00000024152�11736361705�013131� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/config.sub�������������������������������������������������������������������0000755�0001750�0001750�00000105176�11735414004�013511� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/install-sh�������������������������������������������������������������������0000755�0001750�0001750�00000033256�11736361705�013543� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/config.guess�����������������������������������������������������������������0000755�0001750�0001750�00000127432�11735414004�014045� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to <config-patches@gnu.org> and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> #include <unistd.h> int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h> # include <sys/utsname.h> #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include <sys/param.h> # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 <<EOF $0: unable to guess system type This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/build-aux/depcomp����������������������������������������������������������������������0000755�0001750�0001750�00000047556�11736361705�013124� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/����������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�010634� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/flmsg.desktop���������������������������������������������������������������������0000664�0001750�0001750�00000000277�12330516146�013250� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Desktop Entry] Name=flmsg GenericName=Amateur Radio Message Generator Comment=Amateur Radio Communications Exec=flmsg Icon=flmsg Terminal=false Type=Application Categories=Network;HamRadio; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/template.rtf����������������������������������������������������������������������0000664�0001750�0001750�00000031521�12330516146�013071� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{\\rtf1\\ansi\\deff1\\adeflang1025\n\ {\\fonttbl{\\f0\\froman\\fprq2\\fcharset0 Liberation Serif{\\*\\falt Times New Roman};}{\\f1\\froman\\fprq2\\fcharset0 Times New Roman;}{\\f2\\fswiss\\fprq2\\fcharset0 Liberation Sans{\\*\\falt Arial};}{\\f3\\froman\\fprq2\\fcharset0 Times New Roman;}{\\f4\\fswiss\\fprq2\\fcharset0 Arial;}{\\f5\\fnil\\fprq2\\fcharset0 DejaVu Sans;}{\\f6\\fnil\\fprq2\\fcharset0 Tahoma Slashed;}{\\f7\\fnil\\fprq0\\fcharset0 Tahoma Slashed;}}\n\ {\\colortbl;\\red0\\green0\\blue0;\\red242\\green242\\blue242;\\red229\\green229\\blue229;\\red128\\green128\\blue128;}\n\ {\\stylesheet{\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\afs24\\lang1025\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033\\snext1 Normal;}\n\ {\\s2\\sb240\\sa120\\keepn\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\af6\\afs28\\lang1025\\ltrch\\dbch\\af5\\langfe1033\\hich\\f2\\fs28\\lang1033\\loch\\f2\\fs28\\lang1033\\sbasedon1\\snext3 Heading;}\n\ {\\s3\\sa120\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\afs24\\lang1025\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033\\sbasedon1\\snext3 Body Text;}\n\ {\\s4\\sa120\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\af7\\afs24\\lang1025\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033\\sbasedon3\\snext4 List;}\n\ {\\s5\\sb120\\sa120\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\af7\\afs24\\lang1025\\ai\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\i\\loch\\f1\\fs24\\lang1033\\i\\sbasedon1\\snext5 caption;}\n\ {\\s6\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\af7\\afs24\\lang1025\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033\\sbasedon1\\snext6 Index;}\n\ {\\s7\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\afs24\\lang1025\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033\\sbasedon1\\snext7 Table Contents;}\n\ {\\s8\\cf0\\qc{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\aspalpha\\rtlch\\afs24\\lang1025\\ab\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\b\\loch\\f1\\fs24\\lang1033\\b\\sbasedon7\\snext8 Table Heading;}\n\ {\\*\\cs10\\cf0\\rtlch\\af1\\afs24\\lang1033\\ltrch\\dbch\\af1\\langfe1033\\hich\\f1\\fs24\\lang1033\\loch\\f1\\fs24\\lang1033 Default Paragraph Font;}\n\ }\n\ {\\info{\\title GENERAL MESSAGE}{\\author Dave, W1HKJ}{\\creatim\\yr2009\\mo9\\dy25\\hr15\\min10}{\\author Dave, W1HKJ}{\\revtim\\yr2009\\mo9\\dy25\\hr15\\min10}{\\printim\\yr0\\mo0\\dy0\\hr0\\min0}{\\comment StarWriter}{\\vern3000}}\\deftab720\n\ {\\*\\pgdsctbl\n\ {\\pgdsc0\\pgdscuse195\\pgwsxn12240\\pghsxn15840\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\pgdscnxt0 Standard;}}\n\ {\\*\\pgdscno0}\\paperh15840\\paperw12240\\margl1800\\margr1800\\margt1440\\margb1440\\sectd\\sbknone\\pgwsxn12240\\pghsxn15840\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\ftnbj\\ftnstart1\\ftnrstcont\\ftnnar\\aenddoc\\aftnrstcont\\aftnstart1\\aftnnrlc\n\ \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\clcbpat2\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0\\qc{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 GENERAL MESSAGE}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\cellx4148\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 TO:\\tab <to:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 POSITION:\\tab <p1:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\cellx4148\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 FROM: \\tab <fm:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 POSITION:\\tab <p2:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\cellx4148\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\cellx5812\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 SUBJ: \\tab <sb:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 DATE:\\tab <d1:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 TIME:\\tab <t1:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrb\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\clcbpat3\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 MESSAGE:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trrh4752\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <mg:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\cellx4431\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 SIGNATURE:}\n\ \\par \\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <s1:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 POSITION:}\n\ \\par \\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <p3:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\clcbpat3\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 REPLY:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trrh4680\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrt\\brdrs\\brdrw1\\brdrcf1\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrb\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <rp:}\n\ \\cell\\row\\pard \\trowd\\trql\\trleft0\\trpaddft3\\trpaddt0\\trpaddfl3\\trpaddl10\\trpaddfb3\\trpaddb0\\trpaddfr3\\trpaddr10\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrb\\brdrs\\brdrw1\\brdrcf1\\cellx1733\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrb\\brdrs\\brdrw1\\brdrcf1\\cellx3429\\clbrdrl\\brdrs\\brdrw1\\brdrcf1\\clbrdrb\\brdrs\\brdrw1\\brdrcf1\\clbrdrr\\brdrs\\brdrw1\\brdrcf1\\cellx8619\n\ \\pard\\intbl\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 DATE:}\n\ \\par \\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <d2:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 TIME:}\n\ \\par \\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <t2:}\n\ \\cell\\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\li14\\ri0\\lin14\\rin0\\fi0\\sb60\\sa60\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 SIGNATURE/POSITION:}\n\ \\par \\pard\\plain \\intbl\\ltrpar\\s1\\cf0{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\ql\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 {\\rtlch \\ltrch\\loch\\f4\\fs20\\lang1033\\i0\\b0 <s2: / <p4:}\n\ \\cell\\row\\pard \\pard\\plain \\ltrpar\\s1\\cf0\\qj{\\*\\hyphen2\\hyphlead2\\hyphtrail2\\hyphmax0}\\rtlch\\af4\\afs20\\lang1025\\ltrch\\dbch\\af4\\langfe1033\\hich\\f4\\fs20\\lang1033\\loch\\f4\\fs20\\lang1033 \n\ \\par }\n\ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/flmsg.xpm�������������������������������������������������������������������������0000664�0001750�0001750�00000052071�12330516146�012402� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* XPM */ static char * flmsg_xpm[] = { "48 48 1044 2", " c #FDFCFC", ". c #F3F2F1", "+ c #F9F7F4", "@ c #EBECEE", "# c #FFFFFF", "$ c #FFFFFE", "% c #FEFEFF", "& c #FFFEFD", "* c #EFF2F4", "= c #F9F9F8", "- c #EAEAEA", "; c #F5F5F5", "> c #F8F8F9", ", c #F0EFED", "' c #FEFFFF", ") c #ECEAEA", "! c #F6F8F9", "~ c #FEFEFE", "{ c #FFFDFB", "] c #FDFFFF", "^ c #F1EEED", "/ c #FBFBFA", "( c #EBEAEA", "_ c #F3F5F6", ": c #F9FAFA", "< c #F7F7F7", "[ c #F3F3F3", "} c #F8F7F5", "| c #7F786A", "1 c #4F6377", "2 c #AAA59B", "3 c #686B6D", "4 c #EFF3F8", "5 c #B8B2AE", "6 c #545860", "7 c #FBFBF9", "8 c #B09D8A", "9 c #52575C", "0 c #BEBFBF", "a c #5D6366", "b c #D4E5F6", "c c #E1E0DC", "d c #4F4B46", "e c #A9B5C1", "f c #FFFEF4", "g c #7A7065", "h c #B5C0BF", "i c #837E7C", "j c #8495A7", "k c #C2BCB4", "l c #656E76", "m c #747270", "n c #D9DFE0", "o c #B6AF9F", "p c #444452", "q c #B5B8B6", "r c #54575A", "s c #CAD4E2", "t c #EAEAEC", "u c #525253", "v c #ECEDF0", "w c #D4C3B6", "x c #3D3636", "y c #96AFC6", "z c #F9F9FA", "A c #8E7C71", "B c #484C4E", "C c #CDD6DA", "D c #7A6B59", "E c #103963", "F c #FAF0EA", "G c #000000", "H c #D2D8DD", "I c #FFFAF2", "J c #B99C77", "K c #C7D8E9", "L c #C8A47E", "M c #161E28", "N c #57311B", "O c #293641", "P c #160C01", "Q c #CBE1F2", "R c #9B9184", "S c #000813", "T c #ECD1B8", "U c #030000", "V c #DFEAEC", "W c #090704", "X c #A6B7C3", "Y c #BCB4AE", "Z c #DFE4E4", "` c #DACCBB", " . c #000010", ".. c #737C89", "+. c #E6C69F", "@. c #080602", "#. c #8599AD", "$. c #D4BFB5", "%. c #916A40", "&. c #1B2530", "*. c #A5B0A3", "=. c #050A0E", "-. c #EAF9FF", ";. c #7A6C5D", ">. c #081D32", ",. c #453725", "'. c #768C9E", "). c #D4D6D9", "!. c #707282", "~. c #433423", "{. c #40546A", "]. c #C09E7B", "^. c #1E252E", "/. c #FDFDFD", "(. c #9E7E4D", "_. c #171B20", ":. c #1F140A", "<. c #C8D5E0", "[. c #7C6753", "}. c #1D2C45", "|. c #FFFFEA", "1. c #1E1508", "2. c #85B2D5", "3. c #D7DCDE", "4. c #F9F8F8", "5. c #CEC9C5", "6. c #E1E8F0", "7. c #D6C7B7", "8. c #01010C", "9. c #615647", "0. c #2D3B4A", "a. c #393645", "b. c #9A8C7D", "c. c #010E1C", "d. c #B9A193", "e. c #FCF4EB", "f. c #050507", "g. c #28334C", "h. c #F3E2BE", "i. c #050A10", "j. c #E7F5FE", "k. c #7E6D5A", "l. c #14426F", "m. c #E6CEB2", "n. c #03111C", "o. c #FCFFFF", "p. c #B59D7F", "q. c #71726D", "r. c #80857C", "s. c #040505", "t. c #E6F0FB", "u. c #D5AD83", "v. c #161F2A", "w. c #3A210E", "x. c #2E4A64", "y. c #180D02", "z. c #CDE4F6", "A. c #B6AB94", "B. c #CFB59D", "C. c #E9F4F6", "D. c #23190E", "E. c #98AEBD", "F. c #4B2E16", "G. c #6381A9", "H. c #E6D4C0", "I. c #00001A", "J. c #FFFDF0", "K. c #C1D3DC", "L. c #D7C1AB", "M. c #747A7A", "N. c #757A7D", "O. c #0E0C06", "P. c #A7C5D4", "Q. c #DCBCA6", "R. c #FBF2EF", "S. c #927656", "T. c #394D65", "U. c #00040A", "V. c #F2FFFF", "W. c #F3F0ED", "X. c #72675C", "Y. c #585E63", "Z. c #E1F2FE", "`. c #918675", " + c #797C7F", ".+ c #6B6665", "++ c #F0FDFF", "@+ c #EDDDCE", "#+ c #505152", "$+ c #90989D", "%+ c #85817D", "&+ c #606163", "*+ c #818385", "=+ c #AFB8BE", "-+ c #EAF3FB", ";+ c #C9C5C0", ">+ c #5A5855", ",+ c #858A8F", "'+ c #FFFEFA", ")+ c #CEC7C2", "!+ c #8A8683", "~+ c #91959C", "{+ c #D1D4DA", "]+ c #EDEAE6", "^+ c #A4A19D", "/+ c #848588", "(+ c #AFB2B4", "_+ c #ECF0F5", ":+ c #958473", "<+ c #525152", "[+ c #BDD5EB", "}+ c #BFB29E", "|+ c #61656D", "1+ c #6E655C", "2+ c #C9DAF1", "3+ c #FFFDF4", "4+ c #6A6764", "5+ c #6E7177", "6+ c #98999A", "7+ c #808182", "8+ c #EFEDED", "9+ c #A19F9C", "0+ c #555556", "a+ c #ACB2B7", "b+ c #FBFCFC", "c+ c #FBFBFB", "d+ c #E5E9EC", "e+ c #DFE9F0", "f+ c #DCD9D8", "g+ c #C4C8CF", "h+ c #F6F5F8", "i+ c #F8FAF9", "j+ c #F7FAFE", "k+ c #FAFFFF", "l+ c #DEE1E4", "m+ c #F4F1EE", "n+ c #EBEBED", "o+ c #FEFCFA", "p+ c #FCFBF8", "q+ c #CCCED0", "r+ c #DAD4D0", "s+ c #D7E0E9", "t+ c #C4C4C4", "u+ c #DBE6EB", "v+ c #E2E9EF", "w+ c #D8DCDC", "x+ c #D8D5D0", "y+ c #CDD2D7", "z+ c #FBFAF7", "A+ c #EDE8DF", "B+ c #C9D2DC", "C+ c #FFFFFD", "D+ c #EFF7FD", "E+ c #D3D7D7", "F+ c #E5E7EB", "G+ c #F9F4EF", "H+ c #DAE0E5", "I+ c #FFFDFC", "J+ c #FDFEFE", "K+ c #FCFCFC", "L+ c #FCFDFD", "M+ c #C0A188", "N+ c #B3C8D5", "O+ c #A58271", "P+ c #91979A", "Q+ c #F4FBF0", "R+ c #36363C", "S+ c #BAA994", "T+ c #8792A7", "U+ c #89796A", "V+ c #88A6C2", "W+ c #525050", "X+ c #D0DBE5", "Y+ c #958877", "Z+ c #9AABC1", "`+ c #DAC6B2", " @ c #5F84A2", ".@ c #82655B", "+@ c #CCC4C1", "@@ c #A3A0A5", "#@ c #877D7F", "$@ c #C0AAA0", "%@ c #CDD3D8", "&@ c #645447", "*@ c #8699AE", "=@ c #717880", "-@ c #936E4D", ";@ c #C1E4FE", ">@ c #7B6B58", ",@ c #CCD5DF", "'@ c #826251", ")@ c #7D8485", "!@ c #CBD6DA", "~@ c #4E3D36", "{@ c #9FAAB0", "]@ c #C1BDB6", "^@ c #5D7393", "/@ c #FCFCFD", "(@ c #243044", "_@ c #D0DCE4", ":@ c #9A958D", "<@ c #888C95", "[@ c #918B7C", "}@ c #8C9EB3", "|@ c #FEFBF8", "1@ c #665C60", "2@ c #A49F8E", "3@ c #778BA5", "4@ c #493E3D", "5@ c #587D9A", "6@ c #C3C1C1", "7@ c #7C7E83", "8@ c #7B7D7D", "9@ c #E2D1BF", "0@ c #618BAF", "a@ c #AA8A7B", "b@ c #877D78", "c@ c #C3BCBC", "d@ c #82736F", "e@ c #B2A09B", "f@ c #DADFDF", "g@ c #160A08", "h@ c #B5C5D2", "i@ c #757677", "j@ c #261613", "k@ c #D6DEE7", "l@ c #6E513E", "m@ c #95ABB8", "n@ c #7E5B47", "o@ c #858A88", "p@ c #ABBCC2", "q@ c #3A271B", "r@ c #99A1A1", "s@ c #D6DADB", "t@ c #2E364B", "u@ c #FEFEFD", "v@ c #FDFCFB", "w@ c #B8ABA3", "x@ c #FFFCFA", "y@ c #C3C1BE", "z@ c #C3D1D9", "A@ c #F3F4EE", "B@ c #BDBFC5", "C@ c #FCF4EC", "D@ c #EAFFFF", "E@ c #D0CFCC", "F@ c #A6ABB2", "G@ c #FFFFFA", "H@ c #C5C7CA", "I@ c #C2B5AE", "J@ c #F7FFFF", "K@ c #C1C0C3", "L@ c #D9D4CF", "M@ c #BEC9D3", "N@ c #D6CDC8", "O@ c #DAD7D6", "P@ c #B0B3B8", "Q@ c #DCD6CC", "R@ c #B7C3CF", "S@ c #E9E7E0", "T@ c #D2CECA", "U@ c #AAB2BB", "V@ c #B6B7B8", "W@ c #FFF9E9", "X@ c #9EB3C7", "Y@ c #ABB0B6", "Z@ c #C3B9B2", "`@ c #B1B7BE", " # c #FBFCF7", ".# c #B0AEAF", "+# c #DBDDE3", "@# c #BFB8AF", "## c #F1FFFF", "$# c #FEFDFE", "%# c #FFFEFE", "&# c #F8F8F8", "*# c #E3E2E1", "=# c #A1A5AB", "-# c #FFFEF9", ";# c #E9E2DE", "># c #F6F6F4", ",# c #F2F3F3", "'# c #DCDCDE", ")# c #FBFAF9", "!# c #F3F3F5", "~# c #E2E4E6", "{# c #E9E3E4", "]# c #F9FFFE", "^# c #E5E0E1", "/# c #F8FAFB", "(# c #EDEBE7", "_# c #E4E8EC", ":# c #949595", "<# c #EBE6E2", "[# c #E8EDF1", "}# c #E0DCE0", "|# c #FAF8F3", "1# c #EEF0F2", "2# c #AEAEAE", "3# c #F2EEED", "4# c #F6F7F6", "5# c #E6E9EE", "6# c #F7F7F6", "7# c #E2DBD3", "8# c #FBFCFB", "9# c #EDE9E5", "0# c #F1F1F1", "a# c #706D70", "b# c #797877", "c# c #D8C1B2", "d# c #CBC2B0", "e# c #E0E8EA", "f# c #6D6A6C", "g# c #ACAEB3", "h# c #F2F0EF", "i# c #D7D3C8", "j# c #C6C8CC", "k# c #93B5C8", "l# c #5F2C1E", "m# c #C3D4D5", "n# c #806162", "o# c #D0D0CB", "p# c #B5B3B6", "q# c #B0BDC9", "r# c #A4A3A0", "s# c #7D89A3", "t# c #DAE5EE", "u# c #775045", "v# c #C2D1D7", "w# c #E7EBF0", "x# c #A39E9B", "y# c #5B3F37", "z# c #F1F6EB", "A# c #6683A9", "B# c #BBAE9A", "C# c #C6D7E4", "D# c #BDB6B1", "E# c #D9D6CF", "F# c #EEECE9", "G# c #73849B", "H# c #D1CAB5", "I# c #E9ECE8", "J# c #DECDB4", "K# c #F8FFFF", "L# c #C6BFB9", "M# c #797A82", "N# c #E0E6EF", "O# c #D2D1CC", "P# c #CCD5DC", "Q# c #A5C4D9", "R# c #713B34", "S# c #D3EEF0", "T# c #795659", "U# c #D9DED1", "V# c #CAD0D0", "W# c #6F809A", "X# c #A4A29F", "Y# c #657087", "Z# c #EDFDFF", "`# c #744F4F", " $ c #A9AEA6", ".$ c #D7E0EC", "+$ c #A19D9B", "@$ c #9B8889", "#$ c #6C91BF", "$$ c #FFF0D9", "%$ c #DFE2E3", "&$ c #6B5750", "*$ c #D2D8D7", "=$ c #DBD1C8", "-$ c #F0F0F0", ";$ c #DCDDDD", ">$ c #B6B0AA", ",$ c #CACCD2", "'$ c #F6F3F1", ")$ c #D2D5DA", "!$ c #E8E4E0", "~$ c #D7DCE1", "{$ c #F3F1F0", "]$ c #F2F1F1", "^$ c #F6F4F2", "/$ c #D7D3D1", "($ c #EFEFEF", "_$ c #D6DBDC", ":$ c #E6E3E2", "<$ c #CFD1CF", "[$ c #E8EAEE", "}$ c #D2D0CF", "|$ c #F1F1F0", "1$ c #F2F2F2", "2$ c #979797", "3$ c #F6F5F4", "4$ c #D8D7D6", "5$ c #DFE0DD", "6$ c #EBEEF3", "7$ c #E1DEDA", "8$ c #F3F3F2", "9$ c #F1F1F2", "0$ c #F4F4F4", "a$ c #F0F0F1", "b$ c #EFEFEE", "c$ c #A7A4A3", "d$ c #F4F3ED", "e$ c #CFCDC9", "f$ c #C4C3C4", "g$ c #F0F1F1", "h$ c #DDDEDD", "i$ c #EBE9E8", "j$ c #D6DBDF", "k$ c #D7D7D7", "l$ c #CCCCCB", "m$ c #98999B", "n$ c #E5E6E0", "o$ c #BBBEC4", "p$ c #D8D5D4", "q$ c #BCBFC3", "r$ c #D5D5D3", "s$ c #BDBDBC", "t$ c #C0C1C3", "u$ c #C8CACE", "v$ c #CACDD2", "w$ c #D4CCC4", "x$ c #CFD5DA", "y$ c #DAD9D9", "z$ c #D8D8D7", "A$ c #DBDBDC", "B$ c #D4D5D6", "C$ c #DADADA", "D$ c #9C9C9C", "E$ c #D5D9DE", "F$ c #D6DCE0", "G$ c #C0BDBD", "H$ c #C0BFBB", "I$ c #CDCDCE", "J$ c #C4C9CB", "K$ c #D7D4D0", "L$ c #C1C0BE", "M$ c #DDDAD7", "N$ c #D6D6D6", "O$ c #A4A3A2", "P$ c #D3D4D5", "Q$ c #BEBFC0", "R$ c #CBC9C6", "S$ c #CBCDCC", "T$ c #C9CAC7", "U$ c #B9BCC6", "V$ c #D1CECB", "W$ c #B8B7B6", "X$ c #F4F7F8", "Y$ c #694F4C", "Z$ c #A69693", "`$ c #F5F7FA", " % c #B5A696", ".% c #E7EEE5", "+% c #A6A0A5", "@% c #8599B2", "#% c #BEA392", "$% c #A0ADA9", "%% c #ECF2F1", "&% c #927B6B", "*% c #97989A", "=% c #DDCBB8", "-% c #A2AEBE", ";% c #A27E76", ">% c #D6E9ED", ",% c #978A88", "'% c #EEEFEF", ")% c #DCD2CA", "!% c #CDEAFF", "~% c #9F9B99", "{% c #BCA79C", "]% c #59648C", "^% c #FEFDF3", "/% c #ECF5F7", "(% c #868E87", "_% c #BFCEE4", ":% c #E7E6E5", "<% c #F2F6F7", "[% c #63443E", "}% c #636A7A", "|% c #DBDEE2", "1% c #A6AAAC", "2% c #EAEDF0", "3% c #8B8489", "4% c #EEEEE3", "5% c #819DBD", "6% c #CEB696", "7% c #D8F6F8", "8% c #67889F", "9% c #E1B58E", "0% c #EBF8FF", "a% c #A1A19F", "b% c #777270", "c% c #C8C8C0", "d% c #735358", "e% c #E9E8D6", "f% c #837B86", "g% c #D6D8D6", "h% c #E7E4E3", "i% c #F7F4F3", "j% c #EBE9E1", "k% c #94B7D9", "l% c #989492", "m% c #CBBAB6", "n% c #4B517C", "o% c #FAFBF2", "p% c #C1CFD0", "q% c #F8F6F2", "r% c #93B1C5", "s% c #767278", "t% c #ECF1F7", "u% c #F9F9F9", "v% c #E6E7E6", "w% c #726F6F", "x% c #FFFFFB", "y% c #929CA7", "z% c #8E8982", "A% c #D1D3D3", "B% c #A09C9D", "C% c #C6C6C3", "D% c #A8B0B5", "E% c #C0BCB9", "F% c #C9CDD3", "G% c #B9AFAA", "H% c #EAF2F9", "I% c #8D8A86", "J% c #DEEFF7", "K% c #D1D5DC", "L% c #9F9999", "M% c #E0EAF5", "N% c #ACA39E", "O% c #B6BBBC", "P% c #BEBDBF", "Q% c #F7EEE5", "R% c #B8B2AD", "S% c #F3FCFF", "T% c #F9F9F7", "U% c #F6F6F6", "V% c #918E8C", "W% c #D9D7D5", "X% c #A6A7AE", "Y% c #F1F0F0", "Z% c #817E85", "`% c #F4F0E7", " & c #B2B9C4", ".& c #EDEFF3", "+& c #EBECEA", "@& c #FDFDFC", "#& c #FDFEFF", "$& c #FEFDFC", "%& c #F6F6F7", "&& c #BCBCBC", "*& c #BEBEBE", "=& c #9F9F9F", "-& c #C7C8C8", ";& c #C4C6C7", ">& c #C2C4C6", ",& c #C1C0BF", "'& c #C1C1C1", ")& c #C6C6C6", "!& c #BFBFBF", "~& c #C3C3C3", "{& c #C6C6C7", "]& c #BEBEBF", "^& c #BEC0C1", "/& c #C0BEBD", "(& c #C5C5C6", "_& c #C1C1C2", ":& c #C1BFBF", "<& c #C4C5C6", "[& c #C3C2C0", "}& c #BEBDBD", "|& c #C3C4C6", "1& c #9D9E9E", "2& c #B8AFB1", "3& c #BCB0A3", "4& c #D9C8BC", "5& c #E8F1F8", "6& c #E5E3E0", "7& c #BAB5B5", "8& c #F2F4F5", "9& c #D3D5D5", "0& c #FEFBFA", "a& c #F4F6F5", "b& c #BEB9B8", "c& c #F8F8F6", "d& c #FDF2E5", "e& c #F0FCFF", "f& c #C4BCBB", "g& c #DFDFDD", "h& c #D4D0D0", "i& c #E5F2F7", "j& c #C6BEB8", "k& c #CDDCE9", "l& c #E6E5E2", "m& c #D1DEEF", "n& c #D3C6BD", "o& c #999999", "p& c #CEC2BC", "q& c #928172", "r& c #EFC9A8", "s& c #767C84", "t& c #A7ABB1", "u& c #938788", "v& c #E4E0D7", "w& c #5D6876", "x& c #F1F2F4", "y& c #DDE2E7", "z& c #161927", "A& c #E4E4E4", "B& c #73747C", "C& c #B1B8C1", "D& c #9E908B", "E& c #E2E0DE", "F& c #A1897E", "G& c #E0F4F2", "H& c #8CAED9", "I& c #A88473", "J& c #D4CFCC", "K& c #E5DED5", "L& c #A1927E", "M& c #7C7075", "N& c #989797", "O& c #E8E0DB", "P& c #A59D97", "Q& c #E8C8AE", "R& c #C4CED8", "S& c #C9C7C7", "T& c #958D8D", "U& c #EAEFEF", "V& c #BCB0A7", "W& c #EEE8E5", "X& c #DCE0E4", "Y& c #AAA7A6", "Z& c #D7D3CA", "`& c #E8E5DF", " * c #D1CAC4", ".* c #89858B", "+* c #D8D7D3", "@* c #A19593", "#* c #DFF2F4", "$* c #888B95", "%* c #A6B2C3", "&* c #E3E7EF", "** c #F9F5EE", "=* c #ABBDCE", "-* c #A9958C", ";* c #FAFBFB", ">* c #F9FBFC", ",* c #F7FBFE", "'* c #FAFAFA", ")* c #F7F6F6", "!* c #F8F9FB", "~* c #F6F7F8", "{* c #F7F6F5", "]* c #FDFDFE", "^* c #F7F8F9", "/* c #F5F6F7", "(* c #F8F9FA", "_* c #F9F6F5", ":* c #FFFEFB", "<* c #F5F4F3", "[* c #F4F5F6", "}* c #FDFAF7", "|* c #989897", "1* c #FCFBFB", "2* c #FCFCFB", "3* c #FBFCFD", "4* c #9A9C9D", "5* c #CEC4B7", "6* c #828C94", "7* c #E0DDD8", "8* c #A6A6A7", "9* c #BCB8B4", "0* c #B3BEC6", "a* c #EFEBE5", "b* c #716561", "c* c #D5E9F3", "d* c #928683", "e* c #EFF1F3", "f* c #888584", "g* c #C7BEB6", "h* c #B6C1CA", "i* c #B4A799", "j* c #B1BBBF", "k* c #E6DFD4", "l* c #979FAB", "m* c #A6A4A4", "n* c #BCCAD9", "o* c #B6ADA5", "p* c #D2DBE1", "q* c #B6BCB1", "r* c #DFDFDF", "s* c #AE9F9B", "t* c #F8FCF9", "u* c #FAF0EC", "v* c #FFEBC9", "w* c #496797", "x* c #E2AA84", "y* c #858C91", "z* c #617C9D", "A* c #F3F1F3", "B* c #C5C8C1", "C* c #E8E4DD", "D* c #CEC8C4", "E* c #5076A5", "F* c #E0CFBC", "G* c #CEECFB", "H* c #6A5662", "I* c #C7CFD1", "J* c #9A9B9C", "K* c #D1C9BD", "L* c #949BA0", "M* c #C3BDB3", "N* c #74797F", "O* c #B0ADAF", "P* c #989895", "Q* c #A29E9C", "R* c #8F7F75", "S* c #A9B8CC", "T* c #A68C7E", "U* c #71767E", "V* c #A69A91", "W* c #929FAD", "X* c #D2C6BA", "Y* c #BCC4CC", "Z* c #B5B4B1", "`* c #B2B0B0", " = c #AEADA9", ".= c #A8A5AD", "+= c #92867E", "@= c #BBC4CC", "#= c #FAF8F6", "$= c #E6E8EB", "%= c #FBFAF8", "&= c #EEEBE8", "*= c #999A9B", "== c #E5DFD5", "-= c #9DA4A1", ";= c #D8DDE2", ">= c #E9E8E6", ",= c #C5C4C9", "'= c #FBF7EC", ")= c #BEC5D4", "!= c #C0BFC1", "~= c #F4F4F6", "{= c #D3CFC3", "]= c #727A84", "^= c #B8B2AC", "/= c #CAC5BF", "(= c #D9D2D0", "_= c #E7EDEE", ":= c #CECECF", "<= c #C4C6CA", "[= c #CFCCD1", "}= c #DFCEC2", "|= c #ECE7E2", "1= c #989898", "2= c #F6F6DE", "3= c #D1CFBE", "4= c #878F9E", "5= c #C1B1A5", "6= c #7F8B9D", "7= c #C1C7C5", "8= c #6A7689", "9= c #F2EDE8", "0= c #D9F3F9", "a= c #A98467", "b= c #C0CFD5", "c= c #8A8789", "d= c #908277", "e= c #839DB7", "f= c #A39187", "g= c #918C87", "h= c #2E2E4A", "i= c #ECECE0", "j= c #9A9A9B", "k= c #E3DACE", "l= c #949EA8", "m= c #F7F8FD", "n= c #A4A2A2", "o= c #D3D5DC", "p= c #CFC9C1", "q= c #F9F8F6", "r= c #A29FA3", "s= c #FBFEFF", "t= c #CFC7BF", "u= c #E3EBF6", "v= c #BEB1A6", "w= c #EAF2F7", "x= c #CBBDB1", "y= c #E4EEF4", "z= c #B7B2B0", "A= c #B5B6B9", "B= c #A9ACB5", "C= c #D2D1D2", "D= c #EEEDEF", "E= c #C4C1C9", "F= c #FFF8EC", "G= c #D8E2ED", "H= c #D2D4D7", "I= c #FDF9F6", "J= c #E1E6E6", "K= c #DBD2C6", "L= c #FCFCF6", "M= c #B8CED9", "N= c #F4EEE8", "O= c #EAE4E1", "P= c #D6DAD9", "Q= c #D4C9B9", "R= c #9FACBA", "S= c #CFCBC5", "T= c #C3C6CD", "U= c #DCD4D5", "V= c #9A7F83", "W= c #9AACC2", "X= c #E2BFA1", "Y= c #84868D", "Z= c #A6B4C2", "`= c #FEFDF9", " - c #B0C1D2", ".- c #686E77", "+- c #95A7AE", "@- c #5C7F9A", "#- c #937657", "$- c #98A4AC", "%- c #62615B", "&- c #949B9E", "*- c #828A91", "=- c #95857C", "-- c #EFE1B8", ";- c #C1C5CB", ">- c #113253", ",- c #B6B7BB", "'- c #D9D4C7", ")- c #E0D7D9", "!- c #A1898B", "~- c #9CABBF", "{- c #D9B79B", "]- c #A8B1C1", "^- c #97948F", "/- c #8D7C83", "(- c #E0DEDD", "_- c #7A7E86", ":- c #E3F8F8", "<- c #525876", "[- c #C0A583", "}- c #C9D7DC", "|- c #868E90", "1- c #E6EAEB", "2- c #384054", "3- c #737781", "4- c #E7D6AA", "5- c #F1F3E7", "6- c #4E5F79", "7- c #D4CCBE", "8- c #E0EAEF", "9- c #FFFFF3", "0- c #CFDDEA", "a- c #F7EEE4", "b- c #DEE4EB", "c- c #F8F5F0", "d- c #FAF8F7", "e- c #D9E1E5", "f- c #E3DFDE", "g- c #C5C6C6", "h- c #CBCED5", "i- c #DFE1E5", "j- c #DDD6CE", "k- c #C9CED1", "l- c #F1ECE6", "m- c #E9EEF4", "n- c #E1DAD7", "o- c #D5DCE9", "p- c #D7CAC3", "q- c #E0D5CC", "r- c #DDE7F0", "s- c #A0A1A1", "t- c #746363", "u- c #705F4C", "v- c #DFE8F0", "w- c #F7F0D5", "x- c #E7F2FE", "y- c #897E7C", "z- c #B39F8D", "A- c #B5AEA7", "B- c #C4C1BD", "C- c #899DB1", "D- c #8C705F", "E- c #9AAEB9", "F- c #83756D", "G- c #E8DFDA", "H- c #BBA694", "I- c #908186", "J- c #E2DFCE", "K- c #808D9D", "L- c #848580", "M- c #E0D7CA", "N- c #A4B9C6", "O- c #5978A0", "P- c #9C9898", "Q- c #9294A1", "R- c #BFC9CE", "S- c #AB9E9D", "T- c #9C958C", "U- c #E6E9E8", "V- c #8290A3", "W- c #FFFBF5", "X- c #CDC4BF", "Y- c #EBE4E0", "Z- c #BDB0A4", "`- c #A0A3B1", " ; c #E3E4E7", ".; c #AAB3BD", "+; c #BDB7B5", "@; c #D1D2C8", "#; c #D5E1EF", "$; c #B58E67", "%; c #CEE3F6", "&; c #C4BFBD", "*; c #FFFCF5", "=; c #D0CECA", "-; c #D0CBC7", ";; c #A09EA1", ">; c #E0E1E2", ",; c #E9ECEE", "'; c #CCC7CA", "); c #EEEBE0", "!; c #7F7081", "~; c #F0F5F7", "{; c #C8D3DF", "]; c #EEE2D5", "^; c #F5F4F4", "/; c #F8F7F6", "(; c #FDFDFF", "_; c #F6F8FA", ":; c #CDCBCC", "<; c #FCF9F8", "[; c #EAE8E9", "}; c #FFFEFC", "|; c #FCFEFF", "1; c #F8F6F5", "2; c #F6F5F5", "3; c #FAFAFC", " . + @ # # # $ # % & * = - # # ; > , ' # ) ! # ~ # { - ] # ^ / ( # # # $ # % # _ : # # # < [ # ", "} | 1 2 3 4 ' 5 6 # 7 8 9 0 a b c d e f g h i j # k l 0 m n o p q r s ~ t u v $ w x y z A B C # ", "# D E F G H I J G K ' L M # N O # P Q R S # T U V W X # Y Z ` .# G ..# +.@.#.# $.%.&.# *.=.-.# ", "# ;.>.,.'.# ).!.~.{.# ].^./.(._.% :.<.[.}./.|.1.2.G 3.4.5.6.7.8.9.0.# # a.b.c.# d.e.f.g.h.i.j.# ", "# k.l.m.n.o.p.q.r.s.t.u.v.# w.x.# y.z.A.G # B.G C.D.E.# F.G.H.I.J.G K.L.M.N.O.P.Q.R.S.T.# U.V.# ", "W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+# ]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+] 8+9+0+a+# ", "# # # # # # # # # # # # # # # b+# # # $ # # # # # # # # # /.# # # ' # # # # # # # # b+~ # # # # ", "# c+c+' d+e+f+g+h+i+: c+j+k+l+# m+n+o+p+q+r+s+t+u+v+w+x+y+# z+A+B+C+D+b+E+F+G+H+I+q+# J+K+c+L+# ", "# # # # M+N+O+P+Q+R+# # S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@$ =@-@;@>@,@'@)@!@~@{@]@^@% /.# # # ", "# # # /@# (@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@# i@j@k@l@m@n@o@p@q@r@s@t@# K+# # # ", "# # # u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@~ V@W@X@# Y@Z@`@ #.#+#@#### # # # # ", "# # # # # # # # # # # # $ # # ' # # # # # # # # # # # # # # # # # # $## # # # # # # $ # # # # # ", "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", "# # # ~ /.# # # # # # # # # # # # # # # # # # K+# # # # # # # # # # # # # # # /.# # # # # # # # ", "# # # # # # # # # % # # # # # ~ # %## # # # # # ~ # ~ # # # # # # # # # # # # # ~ # ' # $ # # # ", "&#&#< *#=#-#;#>#,#'#)#[ !#~## {#]#^#/#(#_#< # :#<#[#}#|#1#< &#&#&#&#&#&#&#; # 2#3#4#5#6#7#8#* 9#", "# # # 0#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q## # r#s#t#u#v#w## # # # # # # # ~ # x#y#z#A## B#C#D#E#", "# # ~ F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W## # X#Y#Z#`# $.$~ # # # # # # # L+# +$@$K+#$$$%$&$*$=$", "0#0#-$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$}$|$($1$2$3$4$5$6$7$8$0#9$0$a$0#0#0#b$1$c$d+d$e$f$g$h$i$j$", "k$k$k$l$m$n$`@o$p$q$r$s$t$u$v$w$x$y$z$A$B$k$C$D$E$F$G$H$I$J$k$K$L$M$k$z$k$N$C$O$P$Q$R$S$T$U$V$W$", "# # # X$Y$Z$`$ %.%+%# @%#%$%%%&%# # # # # # # *%=%-%;%>%,%'%# G@)%!%# # # # # ~%{%]%^%/%# (%_%:%", "# # # <%[%}%|%1%2%3%4%5%6%7%8%9%0%# # # # ~ # a%b%c%d%e%f%g%h%i%j%k%# ' # ~ # l%m%n%o%p%q%r%s%t%", "u%u%&#v%w%x%y%z%A%B%C%D%E%F%' G%H%u%u%u%u%< # I%J%K%L%M%N%O%P%Q%R%S%T%u%u%U%# V%W%X%Y%Z%`% &.&+&", "/././.u%c+% # # # # # # # # @&# & /././././.# '%# # # C+# # # #&# $&/././.K+# %&# # ~ # #&# %#% ", "# # # # # # # # # # # # # # # # # # # # # # # ~ # # # # # # # # # # # # # # # # # # # # # # # # ", "/././././././././././././././././././././././.K+/./././././././././././././././././././././././.", "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ", "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&=&-&;&>&,&'&)&!&~&*&!&{&]&^&/&(&_&~&:&<&[&}&'&[&|&", "# # # # # # # # # # # # # # # # # # # # # # # 1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&] l&m&n&", "~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ /.~ o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&", "# # # # # # # # # # # # # # # # # # # # # # # N&O&P&Q&R&S&T&U&V&W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*", "; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; [ /.o&;*>*,*} '*# )*!*~*{*]*^*/*(*# &## _*# :*<*[*}*# ", "c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+c+'*~ |*# u@/.# /.& K+# 1*# u%# c+# 2*# & 3*# '*# # / ", "# # # # # # # # # # # # # # # # # # # # # /.# 4*5*6*7*8*9*0*a*b*c*d*e*f*# g*h*i*j*k*l*# m*n*o*p*", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$x%q*# r*s*t*u*v*w*x*y*z*# A*B*C*D*E*F*# G*H*' I*", "# # # # # # # # # # # # # # # # # # # # # ~ # J*K*L*M*N*O*P*Q*R*S*T*Y%U*# V*W*X*Y*Z*`*# =.=+=@=", "# # # # # # # # # # # # # # # # # # # # # ~ # o&#=$=# # # # # # # %=&=# # # # # # # # # # # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # *===-=;=>=,='=)=!=~={=]=^=/=(=_=:=<=[=}=|= /.1*/.", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=# 2=3=4=5=6=7=8=9=' 0=a=b=c=d=e=f=g=h=i=# # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=A=B=H.C=# # # # ", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$D=E=F=G=# H=I=J=K=L=M=# N=# O=P=# # Q=# R=~ S=T=", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$U=V=W=X=Y=Z=`= -.-# +-@-#-$-%-&-*-=---;->-# ,-'-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$)-!-~-{-]-^-# /-(-_-:-<-[-}-|-1-2-3-4-5-6-/.,-7-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$# 8-9-0-a-b-~ c-d-e-f-g-h-i-j-k-l-m-n-o-p-# q-r-", "# # # # # # # # # # # # # # # # # # # # # ~ # s-t-u-v-# # # # # # # # # w-x-y-' # z-A-B-C-D-E-F-", "# # # # # # # # # # # # # # # # # # # # # ~ # 2$G-H-I-J-K-L-M-N-O-P-# # Q-R-S-# )*# T-U-V-W-X-# ", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=Y-Z-`- ;.;+;@;#;$;%;&;*;=;-;;;>;,;';);; !;~;{;];", "# # # # # # # # # # # # # # # # # # # # # ~ # 1=# /*# ^;# /;(;_;:;<;[;};' 2*< ; |;1;2;/ ' # # 3;"}; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/mac/������������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011374� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/mac/flmsg.icns��������������������������������������������������������������������0000664�0001750�0001750�00000026122�12330516146�013270� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������icns��,Ris32��@ݭߖϹлƍ|auº¼�2կ ޶˼ƒ òܻعŷ̿Ą@ܪޚиʻɍguýú�/٦۾ ޫ˻ƿ ƻݽڹøѿÄ@ڨܜӸƹˌntù�6ݦھ ߢ˼˾ Ƹܿݺ߅տ׽„s8mk��il32�� zi Ȃ{*4>xXi>N<q}xv@s~IjXP>cBuss}dP NΊϙpꥦɉvL~�� ���мƉᯃrթݸßʸ̷Ȼpɗ̕� ݶ׀܌΅ΗϖĝŚËɻײ²Ϻό̥ΏצٓޣҞɠəc;Ŧw |ƣֺϯ}mғ/zowh%.Gv�_FL&G6ƂypgTp|MuR]KaIveʙstZW �D˰ȖǗi증xCyt�� ϷƏh÷rqһݹ˶b|΢�ݶ܌q̣˩Ȼʻĭ׼ӌ˨ٞݙәwԌù项{ϱͷӃ|ƛ·Ҙ~zԗEylR +Op xl+W4?0y] NgoyP}ReWdPxWғykVsZ �Dϯ¤ŗf꧘o<vk��мǔc͍roܺŠƼʷeȨ~̬�ݶ܌g̯ɺȴ§æόȼɭҰݚŒ뽦𒚛vӔʮ⸤ԔϲѯӘ˟ƘDZԈĀ֌̥l8mk��ih32��OhTR]OzetٶDTR=Hz��W)˛� ��sԑzEvpC@|�qa-9(~q:.Ͷ��#Kc��tu9�rXykP`ZΊRanjnU���-(6RЕ_̣dq{̂}N])$КfwIX|{aÂu&n~:.'ЦپڰܷҪñۿ������ pymƓ_Àе}w([fƽsy̥qyoet,lkܶ ր,̘屻ؼսڜڤӾɹѸ i쒄 ݢ֗͂Y ccۦg+wsKvrѠƨ џଶ ٦ ��ƿþƾþÔӒΒv]s|ɕܪщء߈΂়qՒǶҒ߮IaPjǒєtqҼrчj٩.䷵ҖÒܚΩh\bْ࡜٨zRɆ8sNԒݒtp߆ ĉ軐 Y͓뽠㪽յРxckXWcKp~nr߯DWR6|Lk9��16 ���|j% l7r4T%~g,�qV;63 mBr!J ��.��zz żvMg^|fQaXdžꡅQղeegqU��-(Ȃ6yPۈƄeĠ}Txnkb=s)0ܕ\>}~}ы}s vQ['6&ϫǵ׳βݸ����� mxjȵ,aгP(?׶z;VЀpO,Wݰ ۀ,̙淾տսڜܽڣԿʼη O{ ˮ~d Djު rS{鷀QroӜư ՙꣻ ק~ ��ƿþƾÿ½Ĕƒ|htޒpǍʅוČݦeߟʭےߟg|vVϒɛyvĴĒߤſzϏvχ.ڞіƒnva2Ԓ׉|~X׎@w_̒c_ ~puߦߍ׹xɞē䰣䳷˞p��`jwm`\fFe|vpRZS6qNYc�w�~(A��@0]2%ق#j{.M SE� GJE}LZom|*d���ܫz}ԦVe \cueR}cUƒ杈sR m\dwV���-(q<jPw[GMXQ6)D䍕|`=}{xow>GK&̲ʮָʻ㯏������� pwlb˶E(7雵4YКO+Pݪ ߀˛Ӽڜཻо ڢ˶ Lk vʃ >z㽖 pXֆـ|xoӝõܙծ�����ƿƿþǿÿƔrrv'|~s~uۗǍċӓΌاaʙԫ٥ߛɗĥbђu~~̱~̒աÄ޾ʼngՉwJΨҖ͒Ճ¡wW[|Sǒً݆vܐTycL |_mڔΝƠΝऱ罵gǡՒ�h8mk�� ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/mac/Info.plist.in�����������������������������������������������������������������0000664�0001750�0001750�00000002007�12330516146�013653� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleIdentifier</key> <string>%%IDENTIFIER%%</string> <key>CFBundleName</key> <string>%%NAME%%</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>%%SIGNATURE%%</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>%%BINARY%%</string> <key>CFBundleVersion</key> <string>%%VERSION%%</string> <key>CFBundleShortVersionString</key> <string>%%VERSION%%</string> <key>CFBundleLongVersionString</key> <string>%%VERSION%%</string> <key>CFBundleIconFile</key> <string>%%ICON%%</string> <key>NSAppleScriptEnabled</key> <string>No</string> <key>NSHumanReadableCopyright</key> <string>Copyright (c) 2009 Dave Freese W1HKJ</string> </dict> </plist> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/win32/����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�12516663375�011576� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/win32/flmsg.ico�������������������������������������������������������������������0000664�0001750�0001750�00000027356�12330516146�013322� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000����������������������������������������������������������������������������������������������������������������������������������������������������������������������������00������6��� ���� ��������h��)��(���0���`����������������������������뤰㽳gνСp蔦❍ƹxYɿ棐cctL_p|~ı_pmu|~zvXRɐT@8wsy_N܃¬⍆´wnh\Wv[ab|S2θ㨞㦱걽䰲ўvjgwJ..塤žӄzrѠytu̸~~vqļ~ĻߛgI⑌|aΥvPbVjΔ০ƾaeqՃ櫟ʼ藝ɍ꧰ܦыؓߕòνr|vvh]'|ts~ٮs~up|嵵帾ѽӼ¿ƿþƿÿýoorѝƵљٮ~Ĺ>Dczjc۬ꉄ؟gprwXSs{ٷ|QKűxrvLOi祠k{ݾv~ֈdYο̛德ľÿռڜֽ׾ڢƼѶܪ򗗗򣤧sƂzyĥ4;qYVyʚopeOOtlPWkpmpwxyذljmȵ,_baжɽ}EPw7?[fƱ㫥ſвŮɾڸ÷һdzþۯD0$Ѝ|`\fw=>I}XÃ~|}}{⯋a{x}os ŵwvu&>QnG[~¼':K6.ȳq<66jy¦PPRwڢ_[e̥}GTdxqMnXk{Qb}6=Ns]\grc^Xu|yefkRQP}ca`UXZ΃흡sRQRսmea\endgjwqnVUUZm~oBmrq|惭*!:dJ. ͔������#.Kc�����zzt}zu ŧVveM9 �]lz2%7EvԂrp#4CjT@{.%M~  Sg|E,ղ��� GVaJ;-E69}L3( Ykzc9���w���~(1WA6) ˄��� ÷߻�����|s@j0% jxwcOmkh`XT\WRfc]FKOepz|~vneprtٟRDDZWTSRR66=Ưq|NLH������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������(��� ���@���������� ������������������ψ~}݌zmҥƘºͲʯŰɘwª||韕Ҕɷ鸡ɠ{c޽٦ޒvwɼ̭δᰞךɴ»¦ügqΐϯĺōݶebpȴ|~̬ʼ¸̷»ﻵ㷷䷷ݺƔᜠch͹oqӻмɠvox<CLvykt~˿ΤϗfipꧦWK>dacPIBxvuWesʾysskt}³VZdsZWP4&?GN06<qډ}yyx]p NgvgT@opsy|~PMI}ujRRXe]PE/yzzoi ȂlwRh{ %*+.4OG>pvx �xl_X+FiWL>��������������������������������������������������������������������������������������������������������������������������������(������ ��������������������������������nga������������������������������������������������������������������������������������������������������tuu�������������������������������|�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������~~~~~~~ (Rl`~~~~~~~1JSeyP~~~~~~~7.L~~~~~~~gU5;$~~~~~~~~?h7:Z======zV A ]dcF0vf~~~~~~O/4~@o-}<^8_#{x >Yw W ~mXEs~p~~~~~~~~~~~~i~~Q!ju)6&D9j~|n"3\+CarK tqIB'�k[b*%2HTMG,N��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������flmsg-2.0.10/data/win32/fl_app.nsi������������������������������������������������������������������0000664�0001750�0001750�00000013105�12330516146�013455� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- conf -*- # NSIS installer script based on example2.nsi from the nsis-2.44 distribution. # Copyright (c) 2009 Stelios Bounanos, M0GLD. # Copyright (c) 2009 Dave Freese, W1HKJ # substitute your application name for instances of FLMSG # Variables !define FLMSG_DESCRIPTION "${FLMSG_NAME} ${FLMSG_VERSION}" !define FLMSG_STRING "${FLMSG_NAME}-${FLMSG_VERSION}" !define PRODUCT_BINARY "${FLMSG_BINARY}" !define PRODUCT_NAME "${FLMSG_NAME}" !define PRODUCT_VERSION "${FLMSG_VERSION}" !define PRODUCT_STRING "${FLMSG_STRING}" !define PRODUCT_DESCRIPTION "${FLMSG_DESCRIPTION}" # Compression options SetCompressor /SOLID lzma # This function is called before displaying the first installer page. # It aborts the installation if the Windows version is too old. !include WinVer.nsh Function .onInit ${IfNot} ${AtLeastWin2000} MessageBox MB_ICONSTOP "Sorry, your Windows version is too old.$\n${PRODUCT_NAME} requires Windows 2000 or later." Abort ${EndIf} FunctionEnd # The name of the installer Name "${PRODUCT_DESCRIPTION}" # The file to write OutFile ${INSTALLER_FILE} # The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_STRING} # Registry key to check for directory (so if you install again, it will # overwrite the old one automatically) !define INSTALL_DIR_REG_KEY SOFTWARE\${PRODUCT_STRING} InstallDirRegKey HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" # Request application privileges for Windows Vista RequestExecutionLevel admin # License LicenseText "${PRODUCT_NAME} is distributed under the GNU GPL as detailed \ below. You must abide by the terms of this license if you modify or \ redistribute the program." "Continue" LicenseData "${LICENSE_FILE}" SubCaption 0 ": License Information" # Other options BrandingText " " InstProgressFlags smooth VIAddVersionKey ProductName "${PRODUCT_NAME}" VIAddVersionKey ProductVersion "${PRODUCT_VERSION}" VIAddVersionKey FileVersion "${PRODUCT_VERSION}" VIAddVersionKey FileDescription "${FLMSG_DESCRIPTION} installer" VIAddVersionKey LegalCopyright "${PRODUCT_NAME} developers" VIAddVersionKey OriginalFilename "${INSTALLER_FILE}" VIProductVersion "3.0.0.0" WindowIcon off XPStyle on # Installer pages Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles # Registry uninstall path !define REG_UNINSTALL_PATH Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_STRING} # This is a hidden section and is always selected. It writes the uninstall # registry keys and uninstaller binary. Section -install # Set output path to the installation directory. SetOutPath $INSTDIR # Write the installation paths into the registry WriteRegStr HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" "$INSTDIR" # Write the uninstall keys for Windows WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayName" "${PRODUCT_DESCRIPTION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayIcon" '"$INSTDIR\${PRODUCT_BINARY}"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "HelpLink" "${SUPPORT_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "Publisher" "FLMSG developers" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "URLUpdateInfo" "${UPDATES_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoModify" 1 WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd #Var WANT_FLMSG Section "FLMSG" SectionIn RO SetOutPath $INSTDIR File "${FLMSG_BINARY}" SectionEnd # Start Menu path !define SM_PATH_BASE $SMPROGRAMS\${PRODUCT_NAME} !define SM_PATH ${SM_PATH_BASE}\${PRODUCT_STRING} # The following sections are optional Section "Start Menu Shortcuts" CreateDirectory "${SM_PATH}" CreateShortCut "${SM_PATH}\${FLMSG_NAME}.lnk" "$INSTDIR\${FLMSG_BINARY}" "" "$INSTDIR\${FLMSG_BINARY}" 0 CreateShortCut "${SM_PATH}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 SectionEnd Section "Desktop Shortcuts" CreateShortCut "$DESKTOP\${FLMSG_DESCRIPTION}.lnk" "$INSTDIR\${FLMSG_BINARY}" "" \ "$INSTDIR\${FLMSG_BINARY}" 0 SectionEnd # This is unselected by default Section /o "Quick Launch Shortcuts" CreateShortCut "$QUICKLAUNCH\${FLMSG_DESCRIPTION}}.lnk" "$INSTDIR\${FLMSG_BINARY}" "" \ "$INSTDIR\${FLMSG_BINARY}" 0 SectionEnd # Uninstaller Section "Uninstall" # Remove registry keys DeleteRegKey HKLM "${REG_UNINSTALL_PATH}" DeleteRegKey HKLM "${INSTALL_DIR_REG_KEY}" # Remove files and uninstaller Delete /REBOOTOK $INSTDIR\${FLMSG_BINARY} Delete /REBOOTOK $INSTDIR\uninstall.exe # Remove shortcuts, if any Delete "${SM_PATH}\*.*" Delete "$DESKTOP\${FLMSG_DESCRIPTION}.lnk" Delete "$QUICKLAUNCH\${FLMSG_DESCRIPTION}.lnk" # Remove directories used RMDir "${SM_PATH}" RMDir "${SM_PATH_BASE}" RMDir "$INSTDIR" SectionEnd # Offer to reboot the machine if the reboot flag is nonzero. This flag is set by # commands that specify the /REBOOTOK switch if the BINARY_* files were in use # during uninstallation. Stupid Windows. Function un.onGUIEnd IfRebootFlag 0 noreboot MessageBox MB_YESNO|MB_ICONQUESTION \ "A reboot is required to finish removing ${PRODUCT_NAME}. Do you wish to reboot now?" IDNO noreboot Reboot noreboot: FunctionEnd # Tell the user if we could not reboot for some reason. Function un.onRebootFailed MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK FunctionEnd ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������