--- /dev/null
+Makefile.in
+++ /dev/null
-# 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 = :
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
- ChangeLog INSTALL NEWS depcomp install-sh missing \
- mkinstalldirs
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-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 = $(SHELL) $(top_srcdir)/mkinstalldirs
-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@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-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@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMKMF = @XMKMF@
-XML_CONFIG = @XML_CONFIG@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-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_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-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_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = src demos
-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) --gnu'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu 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
-
-
-# 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:
XML_CFLAGS=`$XML_CONFIG --cflags`
XML_LFLAGS=`$XML_CONFIG --libs`
-LIBS="$LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
-LDFLAGS="$LDFLAGS -L/usr/local/lib $XML_LFLAGS"
+LIBS="$LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lACL"
+LDFLAGS="$LDFLAGS $XML_LFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS $XML_CFLAGS"
CXXFLAGS="$CXXFLAGS $X_CFLAGS $XML_CFLAGS"
+++ /dev/null
-# 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 = :
-noinst_PROGRAMS = acltest$(EXEEXT) testaxe$(EXEEXT) metronome$(EXEEXT) \
- doodle1$(EXEEXT) doodle2$(EXEEXT) doodle3$(EXEEXT) \
- timesheet$(EXEEXT)
-subdir = demos
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-PROGRAMS = $(noinst_PROGRAMS)
-am_acltest_OBJECTS = acltest.$(OBJEXT)
-acltest_OBJECTS = $(am_acltest_OBJECTS)
-acltest_LDADD = $(LDADD)
-acltest_DEPENDENCIES = ../src/libAXE.a
-am_doodle1_OBJECTS = doodle1.$(OBJEXT)
-doodle1_OBJECTS = $(am_doodle1_OBJECTS)
-doodle1_LDADD = $(LDADD)
-doodle1_DEPENDENCIES = ../src/libAXE.a
-am_doodle2_OBJECTS = doodle2.$(OBJEXT)
-doodle2_OBJECTS = $(am_doodle2_OBJECTS)
-doodle2_LDADD = $(LDADD)
-doodle2_DEPENDENCIES = ../src/libAXE.a
-am_doodle3_OBJECTS = doodle3.$(OBJEXT)
-doodle3_OBJECTS = $(am_doodle3_OBJECTS)
-doodle3_LDADD = $(LDADD)
-doodle3_DEPENDENCIES = ../src/libAXE.a
-am_metronome_OBJECTS = metronome.$(OBJEXT)
-metronome_OBJECTS = $(am_metronome_OBJECTS)
-metronome_LDADD = $(LDADD)
-metronome_DEPENDENCIES = ../src/libAXE.a
-am_testaxe_OBJECTS = testaxe.$(OBJEXT)
-testaxe_OBJECTS = $(am_testaxe_OBJECTS)
-testaxe_LDADD = $(LDADD)
-testaxe_DEPENDENCIES = ../src/libAXE.a
-am_timesheet_OBJECTS = timesheet.$(OBJEXT)
-timesheet_OBJECTS = $(am_timesheet_OBJECTS)
-timesheet_LDADD = $(LDADD)
-timesheet_DEPENDENCIES = ../src/libAXE.a
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-SOURCES = $(acltest_SOURCES) $(doodle1_SOURCES) $(doodle2_SOURCES) \
- $(doodle3_SOURCES) $(metronome_SOURCES) $(testaxe_SOURCES) \
- $(timesheet_SOURCES)
-DIST_SOURCES = $(acltest_SOURCES) $(doodle1_SOURCES) \
- $(doodle2_SOURCES) $(doodle3_SOURCES) $(metronome_SOURCES) \
- $(testaxe_SOURCES) $(timesheet_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-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@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XMKMF = @XMKMF@
-XML_CONFIG = @XML_CONFIG@
-X_CFLAGS = @X_CFLAGS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_LIBS = @X_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
-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_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = ../src/AXE
-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_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-INCLUDES = -I../src
-LDADD = ../src/libAXE.a @LIBS@
-acltest_SOURCES = acltest.cpp
-testaxe_SOURCES = testaxe.cpp
-metronome_SOURCES = metronome.cpp
-doodle1_SOURCES = doodle1.cpp
-doodle2_SOURCES = doodle2.cpp
-doodle3_SOURCES = doodle3.cpp
-timesheet_SOURCES = timesheet.cpp
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cpp .o .obj
-$(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) --gnu demos/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu demos/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):
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-acltest$(EXEEXT): $(acltest_OBJECTS) $(acltest_DEPENDENCIES) $(EXTRA_acltest_DEPENDENCIES)
- @rm -f acltest$(EXEEXT)
- $(CXXLINK) $(acltest_OBJECTS) $(acltest_LDADD) $(LIBS)
-doodle1$(EXEEXT): $(doodle1_OBJECTS) $(doodle1_DEPENDENCIES) $(EXTRA_doodle1_DEPENDENCIES)
- @rm -f doodle1$(EXEEXT)
- $(CXXLINK) $(doodle1_OBJECTS) $(doodle1_LDADD) $(LIBS)
-doodle2$(EXEEXT): $(doodle2_OBJECTS) $(doodle2_DEPENDENCIES) $(EXTRA_doodle2_DEPENDENCIES)
- @rm -f doodle2$(EXEEXT)
- $(CXXLINK) $(doodle2_OBJECTS) $(doodle2_LDADD) $(LIBS)
-doodle3$(EXEEXT): $(doodle3_OBJECTS) $(doodle3_DEPENDENCIES) $(EXTRA_doodle3_DEPENDENCIES)
- @rm -f doodle3$(EXEEXT)
- $(CXXLINK) $(doodle3_OBJECTS) $(doodle3_LDADD) $(LIBS)
-metronome$(EXEEXT): $(metronome_OBJECTS) $(metronome_DEPENDENCIES) $(EXTRA_metronome_DEPENDENCIES)
- @rm -f metronome$(EXEEXT)
- $(CXXLINK) $(metronome_OBJECTS) $(metronome_LDADD) $(LIBS)
-testaxe$(EXEEXT): $(testaxe_OBJECTS) $(testaxe_DEPENDENCIES) $(EXTRA_testaxe_DEPENDENCIES)
- @rm -f testaxe$(EXEEXT)
- $(CXXLINK) $(testaxe_OBJECTS) $(testaxe_LDADD) $(LIBS)
-timesheet$(EXEEXT): $(timesheet_OBJECTS) $(timesheet_DEPENDENCIES) $(EXTRA_timesheet_DEPENDENCIES)
- @rm -f timesheet$(EXEEXT)
- $(CXXLINK) $(timesheet_OBJECTS) $(timesheet_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acltest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doodle1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doodle2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doodle3.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metronome.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testaxe.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timesheet.Po@am__quote@
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- 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: $(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)
- @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: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-install: 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:
-
-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-am
-
-clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-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:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(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:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstPROGRAMS ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir 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 maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am
-
-
-# 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:
static const char *RCSID = "$Id: acltest.cpp,v 1.6 2002-11-04 07:25:00 arjen Exp $";
#include "String.h"
-#include "integer.h"
#include "date.h"
int main()
std::cout << x.escape() << "\n";
}
- std::cout << "***********************\nInteger Test\n*********************\n";
- integer a(2000000000), b(2048);
- integer c;
-
- std::cout << "a = " << a << ", b = " << b << "\n";
- std::cout << "c = " << c << "\n";
- c = b;
- std::cout << "c = b : c = " << c << "\n";
-
std::cout << "***********************\nDate Test\n*********************\n";
date d1, d2(22,7,1964);
libAXE_a_SOURCES = xappl.cpp xwindow.cpp font.cpp menu.cpp frame.cpp \
filedialog.cpp \
button.cpp edit.cpp scroll.cpp table.cpp geometry.cpp icon.cpp \
- parsedate.c datelex.c dateyacc.y \
- string.cpp regex.cpp integer.cpp date.cpp hour.cpp utc.cpp \
- amount.cpp out.cpp \
+ amount.cpp \
configuration.cpp
include_HEADERS = table.h menu.h button.h edit.h scroll.h pixmap.h \
xappl.h display.h xwindow.h frame.h geometry.h icon.h \
color.h font.h pattern.h cursor.h gc.h filedialog.h \
- money.h String.h date.h configuration.h
-
-dateyacc.h : dateyacc.y
- bison -d -o dateyacc.c dateyacc.y
+ money.h configuration.h
LDADD = libAXE.a @LIBS@
+++ /dev/null
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 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.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-LEX = @LEX@
-LN_S = @LN_S@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-XML_CONFIG = @XML_CONFIG@
-YACC = @YACC@
-
-includedir = $(prefix)/include/AXE
-
-lib_LIBRARIES = libAXE.a
-
-libAXE_a_SOURCES = xappl.cpp xwindow.cpp font.cpp menu.cpp frame.cpp \
- filedialog.cpp \
- parsedate.c datelex.c dateyacc.y \
- button.cpp edit.cpp scroll.cpp table.cpp geometry.cpp icon.cpp \
- string.cpp regex.cpp integer.cpp date.cpp hour.cpp utc.cpp \
- amount.cpp out.cpp \
- configuration.cpp
-
-
-include_HEADERS = table.h menu.h button.h edit.h scroll.h pixmap.h \
- xappl.h display.h xwindow.h frame.h geometry.h icon.h \
- color.h font.h pattern.h cursor.h gc.h filedialog.h \
- money.h String.h date.h configuration.h
-
-
-LDADD = libAXE.a @LIBS@
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(lib_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-X_CFLAGS = @X_CFLAGS@
-X_LIBS = @X_LIBS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_PRE_LIBS = @X_PRE_LIBS@
-libAXE_a_LIBADD =
-libAXE_a_OBJECTS = xappl.o xwindow.o font.o menu.o frame.o filedialog.o \
-parsedate.o datelex.o dateyacc.o button.o edit.o scroll.o table.o \
-geometry.o icon.o string.o regex.o integer.o date.o hour.o utc.o \
-amount.o out.o configuration.o
-AR = ar
-CXXFLAGS = @CXXFLAGS@
-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS = $(include_HEADERS)
-
-DIST_COMMON = Makefile.am Makefile.in dateyacc.c
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DEP_FILES = .deps/amount.P .deps/button.P .deps/configuration.P \
-.deps/date.P .deps/datelex.P .deps/dateyacc.P .deps/edit.P \
-.deps/filedialog.P .deps/font.P .deps/frame.P .deps/geometry.P \
-.deps/hour.P .deps/icon.P .deps/integer.P .deps/menu.P .deps/out.P \
-.deps/parsedate.P .deps/regex.P .deps/scroll.P .deps/string.P \
-.deps/table.P .deps/utc.P .deps/xappl.P .deps/xwindow.P
-SOURCES = $(libAXE_a_SOURCES)
-OBJECTS = $(libAXE_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .cpp .o .s .y
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-libLIBRARIES:
-
-clean-libLIBRARIES:
- -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
-
-distclean-libLIBRARIES:
-
-maintainer-clean-libLIBRARIES:
-
-install-libLIBRARIES: $(lib_LIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
- @$(POST_INSTALL)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-
-uninstall-libLIBRARIES:
- @$(NORMAL_UNINSTALL)
- list='$(lib_LIBRARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libdir)/$$p; \
- done
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-libAXE.a: $(libAXE_a_OBJECTS) $(libAXE_a_DEPENDENCIES)
- -rm -f libAXE.a
- $(AR) cru libAXE.a $(libAXE_a_OBJECTS) $(libAXE_a_LIBADD)
- $(RANLIB) libAXE.a
-.cpp.o:
- $(CXXCOMPILE) -c $<
-.y.c:
- $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
- if test -f y.tab.h; then \
- if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
- else :; fi
-dateyacc.h: dateyacc.c
-
-
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(includedir)
- @list='$(include_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- list='$(include_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(includedir)/$$p; \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = src
-
-distdir: $(DISTFILES)
- here=`cd $(top_builddir) && pwd`; \
- top_distdir=`cd $(top_distdir) && pwd`; \
- distdir=`cd $(distdir) && pwd`; \
- cd $(top_srcdir) \
- && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
- -rm -rf .deps
-
-maintainer-clean-depend:
-
-%.o: %.c
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.c
- @echo '$(LTCOMPILE) -c $<'; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-
-%.o: %.cpp
- @echo '$(CXXCOMPILE) -c $<'; \
- $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
-
-%.lo: %.cpp
- @echo '$(LTCXXCOMPILE) -c $<'; \
- $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am: all-am
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-libLIBRARIES
-install-exec: install-exec-am
-
-install-data-am: install-includeHEADERS
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-libLIBRARIES uninstall-includeHEADERS
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(HEADERS)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
- -test -z "dateyacchdateyaccc" || rm -f dateyacch dateyaccc
-mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-libLIBRARIES clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-libLIBRARIES distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-libLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
-clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
-install-libLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile uninstall-includeHEADERS \
-install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
-clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
-
-
-dateyacc.h : dateyacc.y
- bison -d -o dateyacc.c dateyacc.y
-
-# 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:
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1997, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : String.h
-** SYSTEM NAME : Andromeda X-Windows Encapsulation
-** VERSION NUMBER : $Revision: 1.4 $
-**
-** DESCRIPTION : Character String class definition
-**
-** EXPORTED OBJECTS : class String
-** LOCAL OBJECTS : class substring
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Nov 17, 1995
-** LAST UPDATE : Mar 31, 2010
-** MODIFICATIONS :
-**************************************************************************/
-
-/*****************************
- $Log: String.h,v $
- Revision 1.4 2007/05/04 13:56:05 arjen
- Added a copy contructor to the regex class. This prevents multiple frees in the destructor.
-
- Revision 1.3 2002/11/03 13:18:57 arjen
- New functions - String::escape() and String::unescape()
-
- Revision 1.2 2002/09/28 06:45:51 arjen
- New feature: subtring selection by regular expression.
- Bugfix: use the std: namespace for STL classes istream and ostream
-
- Revision 1.1 2002/07/25 08:01:26 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-// static const char RCSID[] = "$Id: String.h,v 1.4 2007/05/04 13:56:05 arjen Exp $";
-
-#ifndef STRING_H
-#define STRING_H
-
-#include <stdlib.h>
-#include <iostream>
-#include <string.h>
-
-#include <regex.h>
-
-// Forward declarations.
-class substring;
-class regex;
-
-/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-** NAME : String - Character String class.
-** MEMBERS : p -> s : Pointer to the actual String data.
-** p -> n : Number of references to this String.
-** OPERATORS : = : Assign a String, char *, char to a String.
-** +, += : concatenate Strings
-** ~ : Length of a String
-** [] : Individual character access.
-** ! : Empty String test.
-** () : Substring selection.
-** ostream << : String to output stream.
-** istream << : String from input stream.
-** ==, !=, <,
-** >, <=, >= : String comparison.
-** METHODS :
-**
-** DESCRIPTION : The String class counts the references to a String to
-** minimize copying and uses standard C++ character strings
-** as constants.
-**
-** RELATIONS : substring
-** SEE ALSO :
-** LAST MODIFIED : Aug 27, 1999
-**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-*/
-
-class String
-{
- friend class substring;
- friend class regex;
-
- struct srep
- {
- char *s; // pointer to data;
- int n; // reference count
- } *p;
-
-public:
-
- String(const char *); // String x = "abc"
- String(char); // String x = 'a'
- String(); // String x;
- String(const String &); // String x = String ...
- String(const substring &); // String x = String(s, l)
-
- String& operator=(const char);
- String& operator=(const char *);
- String& operator=(const String &);
- ~String();
-
- /* Numerical conversion */
-
- String(long); // String x(12); x = "12"
- String(unsigned long); // String x(12); x = "12"
- String(int); // String x(12); x = "12"
- operator long()
- {
- return strtol(p->s, 0, 0);
- }
-
- operator unsigned long()
- {
- return strtoul(p->s, 0, 0);
- }
-
- long dec(void)
- {
- return strtol(p->s, 0, 10);
- }
-
- long oct(void)
- {
- return strtol(p->s, 0, 8);
- }
-
- long hex(void)
- {
- return strtol(p->s, 0, 16);
- }
-
- String(double);
- operator double()
- {
- return strtod(p->s, 0);
- }
-
- /* */
-
- char& operator[](int i); // Individual character access
-
- int operator~() const // Length of the String
- {
- return strlen(p->s);
- }
-
- operator char*()
- {
- if (p->s && p->s[0])
- return p->s;
- else
- return 0;
- }
- operator const char*() const
- {
- if (p->s && p->s[0])
- return p->s;
- else
- return 0;
- }
-
- operator bool() // Test for empty String
- {
- return p->s != 0 && p->s[0] != '\0';
- }
-
- /*
- * String concatenation.
- * char and char* are handled by constructors.
- */
-
- String& operator+=(const String&);
- String& operator+=(const char *);
- friend String operator+(const String&, const String&);
- friend String operator+(const String&, const char *);
- friend String operator+(const char *, const String&);
-
- /*
- * Shifting characters out
- * "abcdefgh" <<= 3 = "defgh"
- * "abcdefgh" >>= 3 = "abcde"
- */
-
- friend String operator<<(const String &x, int n);
- String & operator<<=(int n);
-
- friend String operator>>(const String &x, int n);
- String & operator>>=(int n);
-
- /*
- * Substring selection
- *
- * A substring can be selected by a start index and a length or
- * by matching a regular expression.
- *
- * Selecting a substring by regular expression, combined with
- * the lvalue semantics of the substring class is a particularly
- * powerful concept. Possible uses are for example:
- *
- * (assuming String S, M; regex R;)
- * M = S(R); -> Returns matching part of S into M.
- * S(R) = "replacement"; -> replace matching part of S.
- * S(R) = ""; -> Removes matching part from S.
- * S(R) == S; -> true if and only if all of S matches R exactly.
- */
-
- substring operator()(int start, int len);
- substring operator()(const regex &r);
-
- /*
- * Input and output
- */
-
- friend std::ostream& operator<<(std::ostream &, const String &);
- friend std::istream& operator>>(std::istream &, String &);
-
- /*
- * String comparison tests
- */
-
- friend int operator==(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) == 0;
- }
-
- friend int operator!=(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) != 0;
- }
-
- friend int operator<=(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) <= 0;
- }
-
- friend int operator>=(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) >= 0;
- }
-
- friend int operator<(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) < 0;
- }
-
- friend int operator>(const String& x, const String& y)
- {
- return strcmp(x.p->s, y.p->s) > 0;
- }
-
- friend int operator==(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) == 0;
- }
-
- friend int operator!=(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) != 0;
- }
-
- friend int operator<=(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) <= 0;
- }
-
- friend int operator>=(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) >= 0;
- }
-
- friend int operator<(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) < 0;
- }
-
- friend int operator>(const String& x, const char * y)
- {
- return strcmp(x.p->s, y) > 0;
- }
-
- /*
- * Modifiers
- */
-
- String upper(); // Convert to upper case (ASCII)
- String lower(); // Convert to lower case (ASCII)
- String escape(); // Insert backslashes to escape special characters
- String unescape(); // Remove backslashes from escape codes.
-
- /*
- * Character searching and Pattern matching
- */
-
- int index(char c);
- int rindex(char c);
-
- int in(String & x);
-
- // Regular expression pattern matching
-
- friend bool operator == (const String &s, const regex &r);
- friend bool operator == (const regex &r, const String &s);
-};
- /*
- * Other operators to think about...
- *
- *
- * Numeric conversion with strtod and strtol and vice-versa,
- * so we can do:
- * String nr = 123 // nr = "123"
- * float x = 2.32; String f = x; // f = "2.32"
- * f = "3.145";
- * int i = f; // i = 3
- *
- * String matching:
- * int index(String&, start=0) // Find position of substring
- *
- *
- * Literature: Bjarne Stroustrup, Section 6.9
- * DDJ October 1991, pg 24
- */
-
-
-/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-** NAME : substring - Determine part of a String object.
-** MEMBERS : str : The String object of which this is a substring
-** start : index of the first substring character.
-** len : Number of characters in the substring
-** OPERATORS : = : Assignment of a String or char *
-** METHODS :
-**
-** DESCRIPTION : This implements substring selection from a String object
-** with l-value semantics.
-**
-** RELATIONS : String
-** SEE ALSO :
-** LAST MODIFIED :
-**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-*/
-
-class substring
-{
- friend class String;
-
- String *str; // Where I am a substring of.
- int start, len;
-
-public:
- String& operator=(const String &);
- String& operator=(const char *s)
- {
- *this = String(s);
- return *str;
- }
-};
-
-/* Regular expression matching */
-
-class regex
-{
- friend class String;
-
- regex_t expression;
- String original;
-
-public:
-
- regex(const String & reg);
- regex(const char * reg);
- regex(const regex & reg);
- ~regex();
-
- regex& operator=(const regex &);
-
- friend bool operator == (const String &s, const regex &r);
- friend bool operator == (const regex &r, const String &s);
-};
-
-#endif /* STRING_H */
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : date.cpp
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.3 $
-**
-** DESCRIPTION :
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 06, 1998
-** LAST UPDATE : Oct 16, 1999
-**************************************************************************/
-
-/*****************************
- $Log: date.cpp,v $
- Revision 1.3 2002-09-28 06:58:45 arjen
- Bugfix: conversion of an empty string to a date or hour object
- now makes the values of such an object 0 (null) instead of giving
- a segmentation fault.
- The class UTC combines the date and hour classes. The most basic
- functions of the UTC class are now implemented.
- These include constructors and conversion to and from String objects.
- New functions: date::proper(), hour::proper() and UTC::proper().
- Return true if the object holds a proper clock time and/or calendar
- date; false if at least one value is out of range.
-
- Revision 1.2 2002/09/02 06:18:20 arjen
- Fixed some date and time conversion functions
-
- Revision 1.1 2002/07/25 08:01:26 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-static const char *RCSID = "$Id: date.cpp,v 1.3 2002-09-28 06:58:45 arjen Exp $";
-
-#include <iostream>
-#include <time.h>
-#include "date.h"
-#include "parsedate.h"
-
-static unsigned short mon[] =
-{
- 0,
- 31, 28, 31, 30,
- 31, 30, 31, 31,
- 30, 31, 30, 31
-};
-
-static char * abr_month_name[] =
-{
- "xxx",
- "Jan", "Feb", "Mar", "Apr",
- "May", "Jun", "Jul", "Aug",
- "Sep", "Oct", "Nov", "Dec"
-};
-
-date::date(String s)
-{
- struct parseddate *pd;
-
- if (~s == 0)
- {
- year = 0;
- month = 0;
- day = 0;
- }
- else
- {
- pd = parsedate(s);
- year = pd->year;
- month = pd->month;
- day = pd->day;
- }
-}
-
-int date::Leap(void)
-{
- int leap;
-
- leap = 0;
- if (year % 4 == 0)
- leap++; // leapyear
- if (year % 100 == 0)
- leap--; // But not every century
- if (year % 400 == 0)
- leap++; // except every 4th century
-
- return leap;
-}
-
-unsigned date::DaysInMonth(void)
-{
- unsigned days;
-
- if (month < 1 || month > 12)
- {
- days = 0;
- }
- else
- {
- days = mon[month];
-
- if (month == 2 && Leap()) // Februari
- {
- days++;
- }
- }
-
- return days;
-}
-
-date date::add(date D)
-{
- year += D.year;
- month += D.month;
- while (month > 12)
- {
- year++;
- month -= 12;
- }
- day += D.day;
- while (day > DaysInMonth())
- {
- day -= DaysInMonth();
- month++;
- if (month > 12)
- {
- year++;
- month -= 12;
- }
- }
-
- return *this;
-}
-
-date date::add(unsigned long days)
-{
- // Calculate the date <days> days in the future
-
- days += day;
- while (days > DaysInMonth())
- {
- days -= DaysInMonth();
- month++;
- if (month > 12)
- {
- year++;
- month -= 12;
- }
- }
- day = days;
-
- return *this;
-}
-
-date date::subtract(unsigned long days)
-{
- // Calculate the date <days> days in the past
-
- while (days != 0)
- {
- if (days < day)
- {
- day -= days;
- days = 0;
- }
- else
- {
- month--;
- if (month == 0)
- {
- year--;
- month = 12;
- }
- days -= day;
- day = DaysInMonth();
- }
- }
-
- return *this;
-}
-
-bool date::proper()
-{
- return year != -1 && year != 0 &&
- month > 0 && month <= 12 &&
- day > 0 && day <= DaysInMonth();
-}
-
-date operator+(date d1, date d2)
-{
- d1.add(d2);
- return d1;
-}
-
-date operator+(unsigned long l, date d)
-{
- d.add(l);
- return d;
-}
-
-date operator+(date d, unsigned long l)
-{
- d.add(l);
- return d;
-}
-
-date operator-(unsigned long l, date d)
-{
- d.subtract(l);
- return d;
-}
-
-date operator-(date d, unsigned long l)
-{
- d.subtract(l);
- return d;
-}
-
-date today()
-{
- long clock;
- struct tm *tp;
-
- time(&clock);
- tp = localtime(&clock);
-
- return date(tp->tm_mday, tp->tm_mon+1, tp->tm_year+1900);
-}
-
-/*=========================================================================
-** NAME : date::julian
-** SYNOPSIS :
-** PARAMETERS :
-** RETURN VALUE :
-**
-** DESCRIPTION : Return the number of days since the base date of the
-** Julian Calendar.
-**
-** VARS USED :
-** VARS CHANGED :
-** FUNCTIONS USED :
-** SEE ALSO :
-** LAST MODIFIED :
-** SEE ALSO :
-** LAST MODIFIED :
-**=========================================================================
-*/
-
-long date::julian(void)
-{
- register long cent;
- register int yr, mn, dy;
-
- yr = year;
- mn = month;
- dy = day;
-
- if (mn > 2)
- mn -= 3;
- else
- {
- mn += 9;
- yr -= 1;
- }
-
- cent = yr / 100;
- yr %= 100;
-
- return (146097 * cent >> 2) + (1461 * yr >> 2) +
- (153 * mn + 2) / 5 + dy + 1721119;
-
-}
-
-long operator-(date &d1, date &d2)
-{
- return d1.julian() - d2.julian();
-}
-
-std::ostream &operator<<(std::ostream &s, const date &d)
-{
- s.width(2);
- s.fill('0');
-
- s << int(d.day) << "-";
- s.width(2);
- s.fill('0');
- s << int(d.month) << "-";
- s << d.year;
-
- return s;
-}
-
-std::istream &operator>>(std::istream &s, date &d)
-{
- char c;
- int D, M, Y;
-
- s >> D >> c >> M >> c >> Y;
-
- d.day = D;
- d.month = M;
- if (Y < 100)
- {
- if (Y < 70)
- Y += 2000;
- else
- Y += 1900;
- }
- d.year = Y;
-
- return s;
-}
-
-String date::MonthName(void)
-{
- if (month <= 12)
- {
- return String(abr_month_name[month]);
- }
- else
- {
- return String("xxx");
- }
-}
-
-String date::format(const char *fmt)
-{
- String s;
- char buf[40];
- struct tm t;
-
- t.tm_year = year - 1900;
- t.tm_mon = month - 1;
- t.tm_mday = day;
-
- strftime(buf, 40, fmt, &t);
- s = buf;
-
- return s;
-}
-
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : date.h
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.3 $
-**
-** DESCRIPTION :
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 06, 1998
-** LAST UPDATE : Oct 16, 1999
-** MODIFICATIONS :
-**************************************************************************/
-
-/*****************************
- $Log: date.h,v $
- Revision 1.3 2002-09-28 06:58:45 arjen
- Bugfix: conversion of an empty string to a date or hour object
- now makes the values of such an object 0 (null) instead of giving
- a segmentation fault.
- The class UTC combines the date and hour classes. The most basic
- functions of the UTC class are now implemented.
- These include constructors and conversion to and from String objects.
- New functions: date::proper(), hour::proper() and UTC::proper().
- Return true if the object holds a proper clock time and/or calendar
- date; false if at least one value is out of range.
-
- Revision 1.2 2002/09/02 06:18:20 arjen
- Fixed some date and time conversion functions
-
- Revision 1.1 2002/07/25 08:01:26 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-/* static const char *RCSID = "$Id: date.h,v 1.3 2002-09-28 06:58:45 arjen Exp $"; */
-
-#ifndef AXE_DATE_H
-#define AXE_DATE_H
-
-#include "String.h"
-
-class date
-{
- unsigned char month, day;
- short year;
-
- long julian();
- date add(date D);
- date add(unsigned long days);
-
- date subtract(unsigned long days);
-
- friend class UTC;
-
-public:
-
- date()
- {
- month = 0;
- day = 0;
- year = 0;
- }
-
- date(unsigned d, unsigned m=0, short y=0)
- {
- day = d;
- month = m;
- year = y;
- }
-
- date(String s);
-
- bool proper(); // Check wether this is a proper calendar date
-
- friend date operator+(date, date);
- friend date operator+(unsigned long, date);
- friend date operator+(date, unsigned long);
-
- date operator += (date D)
- {
- return add(D);
- }
-
- date operator += (unsigned long l)
- {
- return add(l);
- }
-
- friend date operator-(unsigned long, date);
- friend date operator-(date, unsigned long);
- friend long operator-(date&, date&);
-
- date operator -= (unsigned long l)
- {
- return subtract(l);
- }
-
-// long(date); // Calculate nr. of days since...
-
- int operator==(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm == 0;
- }
-
- int operator!=(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm != 0;
- }
-
- int operator<=(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm <= 0;
- }
-
- int operator>=(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm >= 0;
- }
-
- int operator>(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm > 0;
- }
-
- int operator<(date d)
- {
- register int cm;
-
- cm = this->year - d.year;
- cm = (cm != 0) ? cm : this->month - d.month;
- cm = (cm != 0) ? cm : this->day - d.day;
-
- return cm < 0;
- }
-
- // Attributes.
-
- unsigned Day()
- {
- return day;
- }
-
- unsigned Month()
- {
- return month;
- }
-
- String MonthName(void);
-
- int Year()
- {
- return year;
- }
- // Operations.
-
- int Leap(void);
- unsigned DaysInMonth();
-
-// date operator*(double)
-// date& operator*=(double)
-// date operator/(double)
-// date& operator/=(double)
-
- friend std::ostream& operator<<(std::ostream&, const date&);
- friend std::istream& operator>>(std::istream&, date&);
-
- String format(const char *fmt = "%F");
-};
-
-date today();
-
-class hour
-{
- int hours;
- short minutes, seconds;
-
- friend class UTC;
-
-public:
-
- hour()
- {
- hours = 0;
- minutes = 0;
- seconds = 0;
- }
-
- hour(int hr, short minute, short sec)
- {
- hours = hr;
- minutes = minute;
- seconds = sec;
- }
-
- hour(String s);
-
- bool proper(); // Check wether this is a proper clock time
-
- friend hour operator+(hour &, hour &);
- hour operator += (hour h);
- friend hour operator-(hour &, hour &);
-
- friend std::ostream& operator<<(std::ostream &, const hour &);
- friend std::istream& operator>>(std::istream &, hour &);
-
- String format(const char *fmt = "%T");
-};
-
-hour now();
-
-class UTC
-{
- hour t;
- date d;
-
-public:
-
- UTC()
- {
- /* Leave everything to the default hour and date constructors */
- }
-
- UTC(const String s);
- UTC(date dt, hour tm)
- {
- d = dt;
- t = tm;
- }
-
- operator date()
- {
- return d;
- }
-
- operator hour()
- {
- return t;
- }
-
- bool proper()
- {
- return d.proper() && t.proper();
- }
-
- friend std::ostream& operator<<(std::ostream &, const UTC &);
- friend std::istream& operator>>(std::istream &, UTC &);
-
- String format(const char *fmt = "%F %T");
-};
-
-UTC Now();
-
-#endif /* AXE_DATE_H */
+++ /dev/null
-/*$Log: datelex.c,v $
-/*Revision 1.2 2002-09-28 06:58:45 arjen
-/*Bugfix: conversion of an empty string to a date or hour object
-/*now makes the values of such an object 0 (null) instead of giving
-/*a segmentation fault.
-/*The class UTC combines the date and hour classes. The most basic
-/*functions of the UTC class are now implemented.
-/*These include constructors and conversion to and from String objects.
-/*New functions: date::proper(), hour::proper() and UTC::proper().
-/*Return true if the object holds a proper clock time and/or calendar
-/*date; false if at least one value is out of range.
-/*
- *Revision 1.1 2002/07/25 08:01:26 arjen
- *First checkin, AXE release 0.2
- *
- * Revision 1.1 84/09/01 15:01:14 wales
- * Initial revision
- *
- * Copyright (c) 1984 by Richard B. Wales
- *
- * Purpose:
- *
- * Lexical analyzer for "parsedate" routine. This lexer was orig-
- * inally written in LEX, but rewriting it as an ad-hoc routine
- * resulted in an enormous savings in space and a significant
- * increase in speed.
- *
- * Usage:
- *
- * Called as needed by the YACC parser ("dateyacc.c"). Not intended
- * to be called from any other routine.
- *
- * Notes:
- *
- * Global contents:
- *
- * int yylex ()
- * Returns the token number (from the YACC grammar) of the next
- * token in the input string pointed to by the global variable
- * "yyinbuf". The global variable "yylval" is set to the lexi-
- * cal value (if any) of the token. "yyinbuf" is set to point
- * to the first character in the input string which is not a
- * part of the token just recognized.
- *
- * Local contents:
- *
- * struct wordtable *find_word (word) char *word;
- * Returns a pointer to the entry in the "wordtable" array cor-
- * responding to the string "word". If "word" is not found, the
- * returned value is NULL.
- */
-
-/* ajs
- * ajs Code added 850314 to allow NUM991231 and NUM99991231.
- * ajs All added/changed lines contain "ajs" for easy searching.
- * ajs */
-
-/* AJB, Aug 28 1999: Added month names in Dutch */
-
-#ifdef RCSIDENT
-static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/datelex.c,v 1.2 2002-09-28 06:58:45 arjen Exp $";
-#endif /* RCSIDENT */
-
-#include <stdio.h>
-#include "dateyacc.h"
-#include "parsedate.h"
-
-/* pointer to the input string */
-char *yyinbuf;
-
-/* "answer" structure */
-struct parseddate yyans;
-
-/* Binary-search word table.
- * Entries must be sorted in ascending order on "text" value, and the
- * total number of entries must be one less than a power of 2. "Filler"
- * entries (with "token" values of -1) are inserted at the beginning and
- * end of the table to pad it as necessary.
- */
-#define WORDTABLE_SIZE 127 /* MUST be one less than power of 2 */
-#define MAX_WORD_LENGTH 20 /* used to weed out overly long words
- * in "yylex". Must be at least as long
- * as the longest word in "wordtable",
- * but may be longer.
- */
-struct wordtable
- { char *text;
- int token;
- int lexval;
- } wordtable[WORDTABLE_SIZE] =
- {/* text token lexval */
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "", -1, 0,
- "A", STD_ZONE, 60, /* UTC+1h */
- "ACSST", DST_ZONE, 630, /* Cent. Australia */
- "ACST", STD_ZONE, 570, /* Cent. Australia */
- "ADT", DST_ZONE, -180, /* Atlantic (Canada) */
- "AESST", DST_ZONE, 660, /* E. Australia */
- "AEST", STD_ZONE, 600, /* E. Australia */
- "AM", AMPM, 0,
- "APR", MONTH_NAME, 4,
- "APRIL", MONTH_NAME, 4,
- "AST", STD_ZONE, -240, /* Atlantic (Canada) */
- "AT", 0, 0, /* "at" (throwaway) */
- "AUG", MONTH_NAME, 8,
- "AUGUST", MONTH_NAME, 8,
- "AWSST", DST_ZONE, 540, /* W. Australia */
- "AWST", STD_ZONE, 480, /* W. Australia */
- "B", STD_ZONE, 120, /* UTC+2h */
- "BST", DST_ZONE, 60, /* Great Britain */
- "C", STD_ZONE, 180, /* UTC+3h */
- "CDT", DST_ZONE, -300,
- "CST", STD_ZONE, -360,
- "D", STD_ZONE, 240, /* UTC+4h */
- "DEC", MONTH_NAME, 12,
- "DECEMBER", MONTH_NAME, 12,
- "DST", DST_SUFFIX, 0,
- "E", STD_ZONE, 300, /* UTC+5h */
- "EDT", DST_ZONE, -240,
- "EET", STD_ZONE, 120, /* Eastern Europe */
- "EETDST", DST_ZONE, 180, /* Eastern Europe */
- "EST", STD_ZONE, -300,
- "F", STD_ZONE, 360, /* UTC+6h */
- "FEB", MONTH_NAME, 2,
- "FEBRUARY", MONTH_NAME, 2,
- "FRI", DAY_NAME, 5,
- "FRIDAY", DAY_NAME, 5,
- "G", STD_ZONE, 420, /* UTC+7h */
- "GMT", STD_ZONE, 0,
- "H", STD_ZONE, 480, /* UTC+8h */
- "HDT", DST_ZONE, -540, /* Hawaii/Alaska */
- "HST", STD_ZONE, -600, /* Hawaii/Alaska */
- "I", STD_ZONE, 540, /* UTC+9h */
- "IST", STD_ZONE, 120, /* Israel */
- "JAN", MONTH_NAME, 1,
- "JANUARY", MONTH_NAME, 1,
- "JUL", MONTH_NAME, 7,
- "JULY", MONTH_NAME, 7,
- "JUN", MONTH_NAME, 6,
- "JUNE", MONTH_NAME, 6,
- "K", STD_ZONE, 600, /* UTC+10h */
- "L", STD_ZONE, 660, /* UTC+11h */
- "M", STD_ZONE, 720, /* UTC+12h */
- "MAR", MONTH_NAME, 3,
- "MARCH", MONTH_NAME, 3,
- "MAY", MONTH_NAME, 5,
- "MDT", DST_ZONE, -360,
- "MEI", MONTH_NAME, 5,
- "MET", STD_ZONE, 60, /* Central Europe */
- "METDST", DST_ZONE, 120, /* Central Europe */
- "MON", DAY_NAME, 1,
- "MONDAY", DAY_NAME, 1,
- "MRT", MONTH_NAME, 3,
- "MST", STD_ZONE, -420,
- "N", STD_ZONE, -60, /* UTC-1h */
- "NDT", DST_ZONE, -150, /* Nfld. (Canada) */
- "NOV", MONTH_NAME, 11,
- "NOVEMBER", MONTH_NAME, 11,
- "NST", STD_ZONE, -210, /* Nfld. (Canada) */
- "O", STD_ZONE, -120, /* UTC-2h */
- "OCT", MONTH_NAME, 10,
- "OCTOBER", MONTH_NAME, 10,
- "OKT", MONTH_NAME, 10,
- "ON", 0, 0, /* "on" (throwaway) */
- "P", STD_ZONE, -180, /* UTC-3h */
- "PDT", DST_ZONE, -420,
- "PM", AMPM, 12,
- "PST", STD_ZONE, -480,
- "Q", STD_ZONE, -240, /* UTC-4h */
- "R", STD_ZONE, -300, /* UTC-5h */
- "S", STD_ZONE, -360, /* UTC-6h */
- "SAT", DAY_NAME, 6,
- "SATURDAY", DAY_NAME, 6,
- "SEP", MONTH_NAME, 9,
- "SEPT", MONTH_NAME, 9,
- "SEPTEMBER", MONTH_NAME, 9,
- "SUN", DAY_NAME, 0,
- "SUNDAY", DAY_NAME, 0,
- "T", STD_ZONE, -420, /* UTC-7h */
- "THU", DAY_NAME, 4,
- "THUR", DAY_NAME, 4,
- "THURS", DAY_NAME, 4,
- "THURSDAY", DAY_NAME, 4,
- "TUE", DAY_NAME, 2,
- "TUES", DAY_NAME, 2,
- "TUESDAY", DAY_NAME, 2,
- "U", STD_ZONE, -480, /* UTC-8h */
- "UT", STD_ZONE, 0,
- "UTC", STD_ZONE, 0,
- "V", STD_ZONE, -540, /* UTC-9h */
- "W", STD_ZONE, -600, /* UTC-10h */
- "WED", DAY_NAME, 3,
- "WEDNESDAY", DAY_NAME, 3,
- "WEDS", DAY_NAME, 3,
- "WET", STD_ZONE, 0, /* Western Europe */
- "WETDST", DST_ZONE, 60, /* Western Europe */
- "X", STD_ZONE, -660, /* UTC-11h */
- "Y", STD_ZONE, -720, /* UTC-12h */
- "YDT", DST_ZONE, -480, /* Yukon */
- "YST", STD_ZONE, -540, /* Yukon */
- "Z", STD_ZONE, 0, /* UTC */
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- "\177", -1, 0,
- };
-static struct wordtable *find_word();
-
-/* int yylex ()
- * Return the next token for the YACC parser.
- */
-int
-yylex ()
-{ static char buffer[MAX_WORD_LENGTH+1];
- register char *c, *d;
- register struct wordtable *wt;
- register int num, ndgts;
-
- restart:
- /* We will return here if an invalid input token is detected. */
- c = buffer; d = yyinbuf;
-
- /* Skip over blanks, tabs, commas, and parentheses. */
- do
- {
- *c = *d++;
- }
- while (*c != '\0' && (*c == ' ' || *c == '\t' || *c == ','
- || *c == '(' || *c == ')'));
-
- /* A zero (null) byte signals the end of the input. */
- if (*c == 0)
- { yyinbuf = --d; /* stay put on the null */
- return 0;
- }
-
- /* Process a word (looking it up in "wordtable"). */
- if ((*c >= 'A' && *c <= 'Z') || (*c >= 'a' && *c <= 'z'))
- { if (*c >= 'a' && *c <= 'z') *c += 'A' - 'a';
- while (c < buffer + MAX_WORD_LENGTH
- && ((*d >= 'A' && *d <= 'Z')
- || (*d >= 'a' && *d <= 'z')))
- { *++c = *d++;
- if (*c >= 'a' && *c <= 'z') *c += 'A' - 'a';
- }
- if ((*d >= 'A' && *d <= 'Z') || (*d >= 'a' && *d <= 'z'))
- { /* Word is too long (over MAX_WORD_LENGTH characters). */
- do { d++; } while ((*d >= 'A' && *d <= 'Z')
- || (*d >= 'a' && *d <= 'z'));
- yyinbuf = d;
- goto error;
- }
- *++c = 0; yyinbuf = d;
- if ((wt = find_word (buffer)) == NULL) goto error;
- if (wt->token == 0) goto restart; /* ignore this word */
- yylval.IntVal = wt->lexval;
- return wt->token;
- }
-
- /* Process a number. */
- if (*c >= '0' && *c <= '9')
- { num = *c - '0'; ndgts = 1;
- for (ndgts = 1; ndgts < 8 && *d >= '0' && *d <= '9'; ndgts++) /* ajs */
- num = 10*num + (*d++ - '0');
- if (*d >= '0' && *d <= '9')
- { /* Number is too long (over 8 digits). */ /* ajs */
- do { d++; } while (*d >= '0' && *d <= '9');
- yyinbuf = d;
- goto error;
- }
- yyinbuf = d;
- yylval.IntVal = num;
- switch (ndgts)
- { case 1: return NUM9;
- case 2: if (num <= 23) return NUM23;
- if (num <= 59) return NUM59;
- /*otherwise*/ return NUM99;
- case 3:
- case 4: if (num/100 <= 23 && num%100 <= 59) return NUM2359;
- /*otherwise*/ return NUM9999;
- case 5:
- case 6: if (num/10000 <= 23
- && (num%10000)/100 <= 59
- && num%100 <= 59)
- return NUM235959;
- if ((((num % 10000) / 100) <= 12) /* ajs */
- && ((num % 100) <= 31)) /* ajs */
- return NUM991231; /* ajs */
- goto error;
- case 8: if ((((num % 10000) / 100) <= 12) /* ajs */
- && ((num % 100) <= 31)) /* ajs */
- return NUM99991231; /* ajs */
- goto error; /* ajs */
- default: goto error;
- } }
-
- /* Pass back the following delimiter tokens verbatim.. */
- if (*c == '-' || *c == '+' || *c == '/' || *c == ':' || *c == '.')
- { yyinbuf = d;
- return *c;
- }
-
- error:
- /* An unidentified character was found in the input. */
- yyinbuf = d;
- if (yyans.error == NULL) yyans.error = yyinbuf;
- goto restart;
-}
-
-/* struct wordtable *find_word (word) char *word;
- * Look up a word in the "wordtable" array via a binary search.
- */
-static
-struct wordtable *
-find_word (word)
- register char *word;
-{ register int low, mid, high;
- register int comparison;
-
- low = -1;
- high = WORDTABLE_SIZE;
- while (low+1 < high)
- { mid = (low + high) / 2;
- comparison = strcmp (wordtable[mid].text, word);
- if (comparison == 0) return wordtable+mid;
- if (comparison > 0) high = mid;
- else low = mid;
- }
- return NULL;
-}
+++ /dev/null
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 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 3 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, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- DAY_NAME = 258,
- MONTH_NAME = 259,
- NUM9 = 260,
- NUM23 = 261,
- NUM59 = 262,
- NUM99 = 263,
- NUM2359 = 264,
- NUM9999 = 265,
- NUM235959 = 266,
- NUM991231 = 267,
- NUM99991231 = 268,
- AMPM = 269,
- STD_ZONE = 270,
- DST_ZONE = 271,
- DST_SUFFIX = 272
- };
-#endif
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 1676 of yacc.c */
-#line 64 "dateyacc.y"
-
- int IntVal;
-
-
-
-/* Line 1676 of yacc.c */
-#line 75 "dateyacc.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-extern YYSTYPE yylval;
-
-
+++ /dev/null
-/*$Log: dateyacc.y,v $
-/*Revision 1.2 2002-09-28 06:58:45 arjen
-/*Bugfix: conversion of an empty string to a date or hour object
-/*now makes the values of such an object 0 (null) instead of giving
-/*a segmentation fault.
-/*The class UTC combines the date and hour classes. The most basic
-/*functions of the UTC class are now implemented.
-/*These include constructors and conversion to and from String objects.
-/*New functions: date::proper(), hour::proper() and UTC::proper().
-/*Return true if the object holds a proper clock time and/or calendar
-/*date; false if at least one value is out of range.
-/*
-/*Revision 1.1 2002/07/25 08:01:26 arjen
-/*First checkin, AXE release 0.2
-/*
- * Revision 1.1 84/09/01 15:01:22 wales
- * Initial revision
- *
- * Copyright (c) 1984 by Richard B. Wales
- *
- * Purpose:
- *
- * YACC parser for "parsedate" routine.
- *
- * Usage:
- *
- * Called as needed by the "parsedate" routine in "parsedate.c".
- * Not intended to be called from any other routine.
- *
- * Notes:
- *
- * Global contents:
- *
- * int yyparse ()
- * Parses the date string pointed to by the global variable
- * "yyinbuf". Sets the appropriate fields in the global data
- * structure "yyans". The returned value is 1 if there was a
- * syntax error, 0 if there was no error.
- *
- * Local contents:
- *
- * None.
- */
-
-/* ajs
- * ajs Code added on 850314 to allow goal := year.date '.' time
- * ajs and year.date := [CC]YYMMDD (YY > 23)
- * ajs All added lines contain "ajs" for easy searching.
- * ajs */
-
-%{
-#ifdef RCSIDENT
-static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/dateyacc.y,v 1.2 2002-09-28 06:58:45 arjen Exp $";
-#endif /*RCSIDENT*/
-
-#include <stdio.h>
-#include "parsedate.h"
-struct parseddate yyans;
-
-/* No error routine is needed here. */
-#define yyerror(s)
-%}
-
-%union {
- int IntVal;
-}
-
-%token DAY_NAME
-%token MONTH_NAME
-%token NUM9 NUM23 NUM59 NUM99 NUM2359 NUM9999 NUM235959
-%token NUM991231 NUM99991231 /* ajs */
-%token AMPM
-%token STD_ZONE DST_ZONE DST_SUFFIX
-
-%type <IntVal> DAY_NAME
-%type <IntVal> MONTH_NAME
-%type <IntVal> NUM9 NUM23 NUM59 NUM99 NUM2359 NUM9999 NUM235959
-%type <IntVal> NUM991231 NUM99991231 /* ajs */
-%type <IntVal> AMPM
-%type <IntVal> STD_ZONE DST_ZONE
-%type <IntVal> num59 num zone.offset
-
-%start goal
-%%
-
-num59:
- NUM23
- | NUM59
- ;
-
-num:
- NUM9
- | num59
- ;
-
-goal:
- date
- | date dayname
- | date dayname time
- | date dayname time year
- | date dayname year
- | date dayname year time
- | date time
- | date time dayname
- | date time dayname year
- | date time year
- | date time year dayname
- | date.year
- | date.year dayname
- | date.year dayname time
- | date.year time
- | date.year time dayname
- | dayname date
- | dayname date time
- | dayname date time year
- | dayname date.year
- | dayname date.year time
- | dayname time date
- | dayname time date.year
- | dayname time year.date
- | dayname year.date
- | dayname year.date time
- | dayname year time date
- | time
- | time date
- | time date dayname
- | time date dayname year
- | time date.year
- | time date.year dayname
- | time dayname date
- | time dayname date.year
- | time dayname year.date
- | time year.date
- | time year.date dayname
- | time year dayname date
- | year.date
- | year.date dayname
- | year.date dayname time
- | year.date time
- | year.date time dayname
- | year dayname date
- | year dayname date time
- | year dayname time date
- | year time date
- | year time date dayname
- | year time dayname date
- | NUM2359
- { yyans.hour = $1 / 100;
- yyans.minute = $1 % 100;
- yyans.second = -1; /* unspecified */
- }
- | dayname
- | yymmdd '.' time2359 /* ajs */
- | yymmdd '.' time /* ajs */
- | yymmdd '.' time dayname /* ajs */
- | error
- { extern char *yyinbuf;
- if (yyans.error == NULL) yyans.error = yyinbuf;
- }
- ;
-
-dayname:
- DAY_NAME
- { yyans.c_weekday = $1; }
- | DAY_NAME '.'
- { yyans.c_weekday = $1; }
- ;
-
-date.year:
- date year
- | hyphen.date '-' year
- | num '-' num '-' year
- { yyans.day = $1; yyans.month = $3; }
- | slash.date '/' year
- ;
-
-year.date:
- year date
- | year '-' hyphen.date
- | year '-' num '-' num
- { yyans.day = $5; yyans.month = $3; }
- | year '/' slash.date
- | yymmdd /* ajs */
- ;
- /* ajs */
-yymmdd: /* ajs */
- NUM991231 /* ajs */
- { yyans.year = ($1 / 10000) + 1900; /* ajs */
- yyans.month = ($1 % 10000) / 100; /* ajs */
- yyans.day = ($1 % 100); /* ajs */
- } /* ajs */
-/*| NUM235959 (leads to parser conflict) */ /* ajs */
- | NUM99991231 /* ajs */
- { yyans.year = ($1 / 10000); /* ajs */
- yyans.month = ($1 % 10000) / 100; /* ajs */
- yyans.day = ($1 % 100); /* ajs */
- } /* ajs */
- ;
-
-date:
- num month.name
- { yyans.day = $1; }
- | month.name num
- { yyans.day = $2; }
- | num num
- { yyans.month = $1; yyans.day = $2; }
- ;
-
-hyphen.date:
- num '-' month.name
- { yyans.day = $1; }
- | month.name '-' num
- { yyans.day = $3; }
- ;
-
-slash.date:
- num '/' month.name
- { yyans.day = $1; }
- | month.name '/' num
- { yyans.day = $3; }
- | num '/' num
- { yyans.month = $1; yyans.day = $3; }
- ;
-
-year:
- NUM59 /* 2-digit year < 60 : after 2000 */
- { yyans.year = 2000 + $1; }
- | NUM23
- { yyans.year = 2000 + $1; }
- | NUM99 /* precludes two-digit date before 1960 */
- { yyans.year = 1900 + $1; }
- | NUM2359
- { yyans.year = $1; }
- | NUM9999
- { yyans.year = $1; }
- ;
-
-month.name:
- MONTH_NAME
- { yyans.month = $1; }
- | MONTH_NAME '.'
- { yyans.month = $1; }
- ;
-
-time:
- hour.alone
- | hour am.pm
- | hour zone
- | hour am.pm zone
- ;
-
-hour:
- NUM2359
- { yyans.hour = $1 / 100;
- yyans.minute = $1 % 100;
- yyans.second = -1; /* unspecified */
- }
- | hour.alone
- ;
-
-hour.alone:
- NUM9 ':' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = -1; /* unspecified */
- }
- | NUM9 '.' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = -1; /* unspecified */
- }
- | NUM9 ':' num59 ':' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = $5;
- }
- | NUM9 '.' num59 '.' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = $5;
- }
- | NUM23 ':' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = -1; /* unspecified */
- }
- | NUM23 '.' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = -1; /* unspecified */
- }
- | NUM23 ':' num59 ':' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = $5;
- }
- | NUM23 '.' num59 '.' num59
- { yyans.hour = $1;
- yyans.minute = $3;
- yyans.second = $5;
- }
- | NUM2359 ':' num59
- { yyans.hour = $1 / 100;
- yyans.minute = $1 % 100;
- yyans.second = $3;
- }
- | NUM2359 '.' num59
- { yyans.hour = $1 / 100;
- yyans.minute = $1 % 100;
- yyans.second = $3;
- }
- | NUM235959
- { yyans.hour = $1 / 10000;
- yyans.minute = ($1 % 10000) / 100;
- yyans.second = $1 % 100;
- }
- ;
-
-am.pm:
- AMPM
- { if (yyans.hour < 1 || yyans.hour > 12)
- yyans.hour = -1; /* invalid */
- else
- { if (yyans.hour == 12) yyans.hour = 0;
- yyans.hour += $1; /* 0 for AM, 12 for PM */
- } }
- ;
-
-zone:
- STD_ZONE
- { yyans.zone = $1; yyans.dst = 0; }
- | STD_ZONE DST_SUFFIX
- { yyans.zone = $1 + 60; yyans.dst = 1; }
- | '-' STD_ZONE
- { yyans.zone = $2; yyans.dst = 0; }
- | '-' STD_ZONE DST_SUFFIX
- { yyans.zone = $2 + 60; yyans.dst = 1; }
- | DST_ZONE
- { yyans.zone = $1; yyans.dst = 1; }
- | '-' DST_ZONE
- { yyans.zone = $2; yyans.dst = 1; }
- | '+' zone.offset
- { yyans.zone = $2; yyans.dst = 0; }
- | '-' '+' zone.offset
- { yyans.zone = $3; yyans.dst = 0; }
- | '-' zone.offset
- { yyans.zone = - $2; yyans.dst = 0; }
- | '-' '-' zone.offset
- { yyans.zone = - $3; yyans.dst = 0; }
- ;
-
-zone.offset:
- NUM9
- { $$ = 60 * $1; }
- | NUM9 ':' num59
- { $$ = 60 * $1 + $3; }
- | NUM9 '.' num59
- { $$ = 60 * $1 + $3; }
- | NUM23
- { $$ = 60 * $1; }
- | NUM23 ':' num59
- { $$ = 60 * $1 + $3; }
- | NUM23 '.' num59
- { $$ = 60 * $1 + $3; }
- | NUM2359
- { $$ = 60 * ($1 / 100) | ($1 % 100); }
- ;
-
-time2359: /* ajs */
- NUM2359 /* ajs */
- { yyans.hour = $1 / 100; /* ajs */
- yyans.minute = $1 % 100; /* ajs */
- yyans.second = -1; /* ajs */
- } /* ajs */
- ;
-
-%%
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : hour.cpp
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.3 $
-**
-** DESCRIPTION :
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 06, 1998
-** LAST UPDATE : Oct 16, 1999
-**************************************************************************/
-
-/*****************************
- $Log: hour.cpp,v $
- Revision 1.3 2002-09-28 06:58:45 arjen
- Bugfix: conversion of an empty string to a date or hour object
- now makes the values of such an object 0 (null) instead of giving
- a segmentation fault.
- The class UTC combines the date and hour classes. The most basic
- functions of the UTC class are now implemented.
- These include constructors and conversion to and from String objects.
- New functions: date::proper(), hour::proper() and UTC::proper().
- Return true if the object holds a proper clock time and/or calendar
- date; false if at least one value is out of range.
-
- Revision 1.2 2002/09/02 06:18:20 arjen
- Fixed some date and time conversion functions
-
- Revision 1.1 2002/07/25 08:01:27 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-static const char *RCSID = "$Id: hour.cpp,v 1.3 2002-09-28 06:58:45 arjen Exp $";
-
-#include <time.h>
-
-#include "date.h"
-#include "parsedate.h"
-
-hour::hour(String s)
-{
- struct parseddate *pd;
-
- if (~s == 0)
- {
- hours = 0;
- minutes = 0;
- seconds = 0;
- }
- else
- {
- pd = parsedate(s);
- hours = pd->hour;
- minutes = pd->minute;
- seconds = pd->second;
- }
-}
-
-hour now()
-{
- long clock;
- struct tm *tp;
-
- time(&clock);
- tp = localtime(&clock);
-
- return hour(tp->tm_hour, tp->tm_min, tp->tm_sec);
-}
-
-/* An hour is a proper hour if it lies within the 24-hour clock. */
-
-bool hour::proper()
-{
- return hours >= 0 && hours < 24 &&
- minutes >= 0 && minutes < 60 &&
- seconds >= 0 && seconds < 60;
-}
-
-hour operator+(hour &t1, hour &t2)
-{
- hour t = t1;
-
- t.seconds += t2.seconds;
- if (t.seconds >= 60)
- {
- t.minutes++;
- t.seconds -= 60;
- }
- t.minutes += t2.minutes;
- if (t.minutes >= 60)
- {
- t.hours++;
- t.minutes -= 60;
- }
- t.hours += t2.hours;
-
- return t;
-}
-
-hour hour::operator+=(hour t)
-{
- seconds += t.seconds;
- if (seconds >= 60)
- {
- minutes++;
- seconds -= 60;
- }
- minutes += t.minutes;
- if (minutes >= 60)
- {
- hours++;
- minutes -= 60;
- }
- hours += t.hours;
-
- return *this;
-}
-
-hour operator-(hour &t1, hour &t2)
-{
- hour t = t1;
-
- t.seconds -= t2.seconds;
- if (t.seconds < 0)
- {
- t.minutes--;
- t.seconds += 60;
- }
-
- t.minutes -= t2.minutes;
- if (t.minutes < 0)
- {
- t.hours--;
- t.minutes += 60;
- }
-
- t.hours -= t2.hours;
-
- return t;
-}
-
-std::ostream& operator<<(std::ostream &s, const hour &t)
-{
- s.width(2);
- s.fill('0');
- s << t.hours << ":";
- s.width(2);
- s.fill('0');
- s << t.minutes << ":";
- s.width(2);
- s.fill('0');
- s << t.seconds;
-
- return s;
-}
-
-std::istream &operator>>(std::istream &s, hour &h)
-{
- char c;
- int H, M, S;
-
- s >> H >> c >> M >> c >> S;
-
- h.hours = H;
- h.minutes = M;
- h.seconds = S;
-
- return s;
-}
-
-String hour::format(const char *fmt)
-{
- String s;
- char buf[40];
- struct tm t;
-
- t.tm_sec = seconds;
- t.tm_min = minutes;
- t.tm_hour = hours;
-
- strftime(buf, 40, fmt, &t);
- s = buf;
-
- return s;
-}
-
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : integer.cpp
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.2 $
-**
-** DESCRIPTION :
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 06, 1998
-** LAST UPDATE : Oct 16, 1999
-**************************************************************************/
-
-/*****************************
- $Log: integer.cpp,v $
- Revision 1.2 2002-11-04 07:24:31 arjen
- Use proper namespace for iostream classes
-
- Revision 1.1 2002/07/25 08:01:27 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-static const char *RCSID = "$Id: integer.cpp,v 1.2 2002-11-04 07:24:31 arjen Exp $";
-
-
-#include "integer.h"
-
-integer& integer::operator=(integer &i)
-{
- if (nr_words > 0)
- delete Number;
-
- msw = i.msw;
- nr_words = i.nr_words;
- Number = new unsigned short[nr_words];
- for (int j=0; j<nr_words; j++)
- Number[j] = i.Number[j];
-
- return *this;
-}
-
-integer integer::operator+(integer &a) // Add a to *this
-{
- integer r;
-
- return r;
-}
-
-std::ostream& operator<<(std::ostream &s, integer &i)
-{
- int j;
-
- s << i.msw;
- for (j=0; j<i.nr_words; j++)
- s << " " << i.Number[j];
-
- return s;
-}
-
-std::istream& operator>>(std::istream &s, integer &i)
-{
- return s;
-}
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : integer.h
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.2 $
-**
-** DESCRIPTION : Arbitrary length integer
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 06, 1998
-** LAST UPDATE : Oct 16, 1999
-** MODIFICATIONS :
-**************************************************************************/
-
-/*****************************
- $Log: integer.h,v $
- Revision 1.2 2002-11-04 07:24:31 arjen
- Use proper namespace for iostream classes
-
- Revision 1.1 2002/07/25 08:01:27 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-/* static const char *RCSID = "$Id: integer.h,v 1.2 2002-11-04 07:24:31 arjen Exp $"; */
-
-
-#include <iostream>
-
-/*
- * The integer class (not int !) implements an arbitrary length
- * number. It allocates more words as the number grows.
- * When a number consists of more than one word, only the first
- * is signed (the most significant), the rest of the words is
- * unsigned.
- *
- * When adding, overflow is detected if the addends are of the same
- * sign and the result has a different sign.
- */
-
-class integer
-{
- int nr_words;
- short msw; // Most significant word, in 2s complement
- unsigned short *Number; // least significant words.
-
-public:
-
- integer()
- {
- nr_words = 0;
- msw = 0;
- }
-
- integer (long l)
- {
- nr_words = 1;
- Number = new unsigned short[1];
- Number[0] = l;
- msw = l >> 16;
- }
-
- ~integer()
- {
- if (nr_words > 0)
- delete Number;
- }
-
- integer& operator=(integer &);
- integer operator+(integer &);
-// operator-()
-// operator*()
-// operator/()
-// operator%()
-// operator<<()
-// operator>>()
-
- friend std::ostream& operator<<(std::ostream&, integer&);
- friend std::istream& operator>>(std::istream&, integer&);
-};
+++ /dev/null
-
-#include "Integer.h"
-
-main()
-{
- integer a(2000000000), b(2048);
- integer c;
-
- cout << "a = " << a << ", b = " << b << "\n";
- cout << "c = " << c << "\n";
- c = b;
- cout << "c = b : c = " << c << "\n";
-}
-\1a
\ No newline at end of file
+++ /dev/null
-/*ident "@(#)cfront:lib/stream/out.c 1.5" */
-/*
- C++ stream i/o source
-
- out.c
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <iostream>
-
-
-const int cb_size = 1024;
-const int fld_size = 256;
-
-/* a circular formating buffer */
-static char formbuf[cb_size]; // some slob for form overflow
-static char* bfree=formbuf;
-static char* max = &formbuf[cb_size-1];
-
-char* chr(register int i, register int w) // note: chr(0) is ""
-{
- register char* buf = bfree;
-
- if (w<=0 || fld_size<w) w = 1;
- w++; // space for trailing 0
- if (max < buf+w) buf = formbuf;
- bfree = buf+w;
- char * res = buf;
-
- w -= 2; // pad
- while (w--) *buf++ = ' ';
- if (i<0 || 127<i) i = ' ';
- *buf++ = i;
- *buf = 0;
- return res;
-}
-
-char* str(const char* s, register int w)
-{
- register char* buf = bfree;
- int ll = strlen(s);
- if (w<=0 || fld_size<w) w = ll;
- if (w < ll) ll = w;
- w++; // space for traling 0
- if (max < buf+w) buf = formbuf;
- bfree = buf+w;
- char* res = buf;
-
- w -= (ll+1); // pad
- while (w--) *buf++ = ' ';
- while (*s) *buf++ = *s++;
- *buf = 0;
- return res;
-}
-
-char* form(const char* format ...)
-{
- int* ap = (int*)((char*)&format+sizeof(char*)); // not completely general
- register char* buf = bfree;
- if (max < buf+fld_size) buf = formbuf;
-
- int ll = sprintf(buf,format,ap[0],ap[1],ap[2],ap[3],ap[4],ap[5],ap[6],ap[7],ap[8],ap[9]); // too few words copied
- if (0<ll && ll<cb_size) // length
- ;
- else if (buf<(char*)ll && (char*)ll<buf+cb_size)// pointer to trailing 0
- ll = (char*)ll - buf;
- else
- ll = strlen(buf);
- if (fld_size < ll) exit(10);
- bfree = buf+ll+1;
- return buf;
-}
-
-const char a10 = 'a'-10;
-
-char* hex(long ii, int w)
-{
- int m = sizeof(long)*2; // maximum hex digits for a long
- if (w<0 || fld_size<w) w = 0;
- int sz = (w?w:m)+1;
- register char* buf = bfree;
- if (max < buf+sz) buf = formbuf;
- register char* p = buf+sz;
- bfree = p+1;
- *p-- = 0; // trailing 0
- register unsigned long i = ii;
-
- if (w) {
- do {
- int h = i&0xf;
- *p-- = (h < 10) ? h+'0' : h+a10;
- } while (--w && (i>>=4));
- while (0<w--) *p-- = ' ';
- }
- else {
- do {
- int h = i&0xf;
- *p-- = (h < 10) ? h+'0' : h+a10;
- } while (i>>=4);
- }
- return p+1;
-}
-
-char* oct(long ii, int w)
-{
- int m = sizeof(long)*3; // maximum oct digits for a long
- if (w<0 || fld_size<w) w = 0;
- int sz = (w?w:m)+1;
- register char* buf = bfree;
- if (max < buf+sz) buf = formbuf;
- register char* p = buf+sz;
- bfree = p+1;
- *p-- = 0; // trailing 0
- register unsigned long i = ii;
-
- if (w) {
- do {
- int h = i&07;
- *p-- = h + '0';
- } while (--w && (i>>=3));
- while (0<w--) *p-- = ' ';
- }
- else {
- do {
- int h = i&07;
- *p-- = h+'0';
- } while (i>>=3);
- }
-
- return p+1;
-}
-
-char* dec(long i, int w)
-{
- int sign = 0;
- if (i < 0) {
- sign = 1;
- i = -i;
- }
- int m = sizeof(long)*3; // maximum dec digits for a long
- if (w<0 || fld_size<w) w = 0;
- int sz = (w?w:m)+1;
- register char* buf = bfree;
- if (max < buf+sz) buf = formbuf;
- register char* p = buf+sz;
- bfree = p+1;
- *p-- = 0; // trailing 0
-
- if (w) {
- do {
- int h = i%10;
- *p-- = h + '0';
- } while (--w && (i/=10));
- if (sign && 0<w) {
- w--;
- *p-- = '-';
- }
- while (0<w--) *p-- = ' ';
- }
- else {
- do {
- int h = i%10;
- *p-- = h + '0';
- } while (i/=10);
- if (sign) *p-- = '-';
- }
-
- return p+1;
-}
-
+++ /dev/null
-
-/*
- *
- * Purpose:
- *
- * Manipulate character strings representing dates.
- *
- * Usage:
- *
- * #include <parsedate.h>
- *
- * char date;
- * struct parseddate *pd;
- *
- * pd = parsedate (date);
- *
- * compute_unixtime (pd);
- *
- * break_down_unixtime (pd);
- *
- * date = mail_date_string (pd);
- *
- * date = uucp_date_string (pd);
- *
- * Notes:
- *
- * The returned value from "parsedate", "mail_date_string", or
- * "uucp_date_string" points to static data whose contents are
- * overwritten by the next call to the same routine.
- *
- * "compute_unixtime" is implicitly called by "parsedate".
- *
- * Global contents:
- *
- * struct parseddate *parsedate (date) char *date;
- * Parse a character string representing a date and time into
- * individual values in a "struct parseddate" data structure.
- *
- * compute_unixtime (pd) struct parseddate *pd;
- * Given a mostly filled-in "struct parseddate", compute the day
- * of the week and the internal UNIX representation of the date.
- *
- * break_down_unixtime (pd) struct parseddate *pd;
- * Compute the date and time corresponding to the "unixtime" and
- * "zone" values in a "struct parseddate".
- *
- * char *mail_date_string (pd) struct parseddate *pd;
- * Generate a character string representing a date and time in
- * the RFC822 (ARPANET mail standard) format.
- *
- * char *uucp_date_string (pd) struct parseddate *pd;
- * Generate a character string representing a date and time in
- * the UUCP mail format.
- *
- * Local contents:
- *
- * None.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include "parsedate.h"
-
-static char *RCSID = "$Id: parsedate.c,v 1.2 2002-09-28 06:58:45 arjen Exp $";
-
-extern int yyparse();
-
-void compute_unixtime (register struct parseddate *pd);
-
-/* Number of seconds in various time intervals. */
-#define SEC_PER_MIN 60
-#define SEC_PER_HOUR (60*SEC_PER_MIN)
-#define SEC_PER_DAY (24*SEC_PER_HOUR)
-#define SEC_PER_YEAR (365*SEC_PER_DAY)
-
-/* Number of days in each month. */
-static int monthsize[] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
-
-/* Three-letter abbreviations of month and day names. */
-static char monthname[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
-static char dayname[] = "SunMonTueWedThuFriSat";
-
-/* struct parseddate *parsedate (date) char *date;
- * Analyze a character string representing a date and time. The
- * returned value points to a data structure with the desired
- * information. (NOTE: The returned value points to static data
- * whose contents are overwritten by each call.)
- */
-struct parseddate * parsedate (char *date)
-{ register char *c;
- register int year_save;
- extern struct parseddate yyans;
- extern char *yyinbuf;
-
- /* Initialize the returned-value structure. */
- yyans.unixtime = -1;
- yyans.year = -1;
- yyans.month = -1;
- yyans.day = -1;
- yyans.hour = -1;
- yyans.minute = -1;
- yyans.second = -1;
- yyans.zone = -1;
- yyans.dst = -1;
- yyans.weekday = -1;
- yyans.c_weekday = -1;
- yyans.error = NULL;
-
- /* Parse the argument string. */
- yyinbuf = date;
-
- if (yyparse () != 0 && yyans.error == NULL)
- yyans.error = yyinbuf;
-
- /* Validate the day of the month, compute/validate the day of the
- * week, and compute the internal UNIX form of the time. See if
- * "compute_unixtime" found fault with the year or the day of the
- * month. (Note that we have to remember the original "year" value
- * because it might legitimately have been -1 to begin with.)
- */
- year_save = yyans.year; compute_unixtime (&yyans);
- if (yyans.error == NULL
- && (yyans.year != year_save
- || (yyans.month > 0 && yyans.day < 0)
- || (yyans.month < 0 && yyans.day > 0)))
- yyans.error = yyinbuf;
-
- return &yyans;
-}
-
-/* compute_unixtime (pd) struct parseddate *pd;
- * Given a mostly filled-in "struct parseddate", compute the day of
- * the week and the internal UNIX representation of the date.
- *
- * A year before 1600 will be rejected and replaced with -1. A
- * date from 1600 on which falls outside the range representable in
- * internal UNIX form will still have the correct day of the week
- * computed.
- *
- * The day of the week is always computed on the assumption that the
- * Gregorian calendar is in use. Days of the week for dates in the
- * far future may turn out to be incorrect if any changes are made
- * to the calendar between now and then.
- */
-void compute_unixtime (register struct parseddate *pd)
-{
- register int weekday, n, l, a;
-
- /* Validate the year. */
- if (pd->year >= 0 && pd->year < 1600) pd->year = -1;
-
- /* Validate the day of the month. Also calculate the number of days
- * in February (even if this is not February, we will need the num-
- * ber of days in February later on when computing the UNIX time).
- */
- if (pd->month > 0)
- { if (pd->year < 0) monthsize[2] = 29;
- else if (pd->year % 4 != 0) monthsize[2] = 28;
- else if (pd->year % 100 != 0) monthsize[2] = 29;
- else if (pd->year % 400 != 0) monthsize[2] = 28;
- else monthsize[2] = 29;
- if (pd->day <= 0 || pd->day > monthsize[pd->month])
- pd->day = -1;
- }
-
- /* Compute the day of the week. The next several lines constitute a
- * perpetual-calendar formula. Note, of course, that the "claimed"
- * day of the week (pd->c_weekday) is ignored here.
- */
- if (pd->year > 0 && pd->month > 0 && pd->day > 0)
- { if (pd->month >= 3) n = pd->year / 100,
- l = pd->year % 100;
- else n = (pd->year-1) / 100,
- l = (pd->year-1) % 100;
- a = (26 * ((pd->month+9)%12 + 1) - 2) / 10;
- weekday = (a+(l>>2)+(n>>2)+l-(n+n)+pd->day);
- while (weekday < 0) weekday += 7;
- pd->weekday = weekday % 7;
- }
-
- /* Figure out the internal UNIX form of the date. */
- if (pd->year >= 1969 && pd->year <= 2038
- && pd->month > 0 && pd->day > 0
- && pd->hour >= 0 && pd->minute >= 0
- && pd->zone != -1 && pd->zone > -1440 && pd->zone < 1440)
- { pd->unixtime =
- SEC_PER_YEAR * (pd->year - 1970)
- + SEC_PER_DAY * ((pd->year - 1969) / 4)
- /* month is taken care of later */
- + SEC_PER_DAY * (pd->day - 1)
- + SEC_PER_HOUR * pd->hour
- + SEC_PER_MIN * pd->minute
- /* seconds are taken care of later */
- - SEC_PER_MIN * pd->zone;
- if (pd->second >= 0)
- pd->unixtime += pd->second;
- for (n = pd->month - 1; n > 0; n--)
- pd->unixtime += SEC_PER_DAY * monthsize[n];
- if (pd->unixtime < 0) pd->unixtime = -1;
- }
- else pd->unixtime = -1;
-}
-
-/* break_down_unixtime (pd) struct parseddate *pd;
- * Given the "unixtime" and "zone" fields of a "struct parseddate",
- * compute the values of the "year", "month", "day", "hour", "min-
- * ute", "second", and "weekday" fields. The "dst" and "error"
- * fields of the structure are not used or modified.
- */
-void break_down_unixtime (pd)
- register struct parseddate *pd;
-{ register unsigned long timevalue;
- register int m, n;
-
- /* Validate the "unixtime" and "zone" fields. */
- if (pd->unixtime < 0
- || pd->zone == -1 || pd->zone <= -1440 || pd->zone >= 1440)
- { /* Sorry, can't do it. */
- pd->year = -1; pd->month = -1; pd->day = -1;
- pd->hour = -1; pd->minute = -1; pd->second = -1;
- pd->weekday = -1;
- return;
- }
-
- /* Even though "pd->unixtime" must be non-negative, and thus cannot
- * indicate a time earlier than 1970, a negative "pd->zone" could
- * cause the local date to be Wednesday, 31 December 1969. Such a
- * date requires special handling.
- *
- * A local date earlier than 31 December 1969 is impossible because
- * "pd->zone" must represent a time-zone shift of less than a day.
- */
- if (pd->zone < 0 && pd->unixtime + SEC_PER_MIN * pd->zone < 0)
- { pd->year = 1969; pd->month = 12; pd->day = 31;
- pd->weekday = 3; /* Wednesday */
- timevalue = pd->unixtime + SEC_PER_MIN * pd->zone + SEC_PER_DAY;
- /* Note: 0 <= timevalue < SEC_PER_DAY */
- pd->hour = timevalue / SEC_PER_HOUR;
- pd->minute = (timevalue % SEC_PER_HOUR) / SEC_PER_MIN;
- pd->second = timevalue % SEC_PER_MIN;
- return;
- }
-
- /* Handle the general case (local time is 1970 or later). */
- timevalue = pd->unixtime + SEC_PER_MIN * pd->zone;
-
- /* day of the week (1 January 1970 was a Thursday) . . . */
- pd->weekday = (timevalue/SEC_PER_DAY + 4 /* Thursday */) % 7;
-
- /* year (note that the only possible century year here is 2000,
- * a leap year -- hence no special tests for century years are
- * needed) . . .
- */
- for (m = 1970; ; m++)
- { n = (m%4==0) ? SEC_PER_YEAR+SEC_PER_DAY : SEC_PER_YEAR;
- if (n > timevalue) break;
- timevalue -= n;
- }
- pd->year = m;
- monthsize[2] = (m%4==0) ? 29 : 28;
-
- /* month . . . */
- for (m = 1; ; m++)
- { n = SEC_PER_DAY * monthsize[m];
- if (n > timevalue) break;
- timevalue -= n;
- }
- pd->month = m;
-
- /* day, hour, minute, and second . . . */
- pd->day = (timevalue / SEC_PER_DAY) + 1;
- pd->hour = (timevalue % SEC_PER_DAY) / SEC_PER_HOUR;
- pd->minute = (timevalue % SEC_PER_HOUR) / SEC_PER_MIN;
- pd->second = timevalue % SEC_PER_MIN;
-}
-
-/* char *mail_date_string (pd) struct parseddate *pd;
- * Generate a character string representing a date and time in the
- * RFC822 (ARPANET mail standard) format. A value of NULL is re-
- * turned if "pd" does not contain all necessary data fields.
- * (NOTE: The returned value points to static data whose contents
- * are overwritten by each call.)
- */
-char *
-mail_date_string (pd)
- register struct parseddate *pd;
-{ register char *c;
- static char answer[50];
-
- /* Check the day of the month and compute the day of the week. */
- compute_unixtime (pd);
-
- /* Make sure all required fields are present. */
- if (pd->year < 0 || pd->month < 0 || pd->day < 0
- || pd->hour < 0 || pd->minute < 0
- || pd->zone == -1 || pd->zone <= -1440 || pd->zone >= 1440)
- return NULL; /* impossible to generate string */
-
- /* Generate the answer string. */
- sprintf (answer,
- "%.3s, %d %.3s %d %02d:%02d",
- dayname + 3*pd->weekday,
- pd->day, monthname + 3*(pd->month-1),
- (pd->year >= 1960 && pd->year <= 1999)
- ? pd->year - 1900 : pd->year,
- pd->hour, pd->minute);
- c = answer + strlen (answer);
- if (pd->second >= 0) sprintf (c, ":%02d", pd->second), c += 3;
- *c++ = ' ';
- switch (pd->zone)
- { /* NOTE: Only zone abbreviations in RFC822 are used here. */
- case 0: strcpy (c, pd->dst ? "+0000" : "GMT"); break;
- case -240: strcpy (c, pd->dst ? "EDT" : "-0400"); break;
- case -300: strcpy (c, pd->dst ? "CDT" : "EST"); break;
- case -360: strcpy (c, pd->dst ? "MDT" : "CST"); break;
- case -420: strcpy (c, pd->dst ? "PDT" : "MST"); break;
- case -480: strcpy (c, pd->dst ? "-0800" : "PST"); break;
- default:
- if (pd->zone >= 0)
- sprintf (c, "+%02d%02d", pd->zone/60, pd->zone%60);
- else sprintf (c, "-%02d%02d", -pd->zone/60, -pd->zone%60);
- }
-
- return answer;
-}
-
-/* char *uucp_date_string (pd) struct parseddate *pd;
- * Generate a character string representing a date and time in the
- * UUCP mail format. A value of NULL is returned if "pd" does not
- * contain all necessary data fields. (NOTE: The returned value
- * points to static data whose contents are overwritten by each
- * call.)
- */
-char *
-uucp_date_string (pd)
- register struct parseddate *pd;
-{ register char *c;
- static char answer[50];
-
- /* Check the day of the month and compute the day of the week. */
- compute_unixtime (pd);
-
- /* Make sure all required fields are present. */
- if (pd->year < 0 || pd->month < 0 || pd->day < 0
- || pd->hour < 0 || pd->minute < 0
- || pd->zone == -1 || pd->zone <= -1440 || pd->zone >= 1440)
- return NULL; /* impossible to generate string */
-
- /* Generate the answer string. */
- sprintf (answer,
- "%.3s %.3s %d %02d:%02d",
- dayname + 3*pd->weekday,
- monthname + 3*(pd->month-1), pd->day,
- pd->hour, pd->minute);
- c = answer + strlen (answer);
- if (pd->second >= 0) sprintf (c, ":%02d", pd->second), c += 3;
- switch (pd->zone)
- { /* NOTE: Only zone abbreviations in RFC822 are used here. */
- case 0: strcpy (c, pd->dst ? "+0000" : "-GMT"); break;
- case -240: strcpy (c, pd->dst ? "-EDT" : "-0400"); break;
- case -300: strcpy (c, pd->dst ? "-CDT" : "-EST"); break;
- case -360: strcpy (c, pd->dst ? "-MDT" : "-CST"); break;
- case -420: strcpy (c, pd->dst ? "-PDT" : "-MST"); break;
- case -480: strcpy (c, pd->dst ? "-0800" : "-PST"); break;
- default:
- if (pd->zone >= 0)
- sprintf (c, "+%02d%02d", pd->zone/60, pd->zone%60);
- else sprintf (c, "-%02d%02d", -pd->zone/60, -pd->zone%60);
- }
- c = answer + strlen (answer);
- sprintf (c, " %d", pd->year);
-
- return answer;
-}
+++ /dev/null
-
-/* Data structure returned by "parseddate".
- *
- * A value of NULL for "error" means that no syntax errors were detected
- * in the argument value. A non-NULL value points to the byte position
- * within the argument string at which it was discovered that an error
- * existed.
- *
- * A value of -1 means that the field was never given a value, or that
- * the value supplied was invalid. (A side effect of this convention is
- * that a time zone offset of -1 -- i.e., one minute west of GMT -- is
- * indistinguishable from an invalid or unspecified time zone offset.
- * Since the likelihood of "-0001" being a legitimate time zone is nil,
- * banning it is a small price to pay for the uniformity of using -1 as
- * a "missing/invalid" indication for all fields.)
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct parseddate
-{
- long unixtime; /* UNIX internal representation of time */
- char *error; /* NULL = OK; non-NULL = error */
- int year; /* year (1600 on) */
- int month; /* month (1-12) */
- int day; /* day of month (1-31) */
- int hour; /* hour (0-23) */
- int minute; /* minute (0-59) */
- int second; /* second (0-59) */
- int zone; /* time zone offset in minutes -- "+" or "-" */
- int dst; /* daylight savings time (0 = no, 1 = yes) */
- int weekday; /* real day of week (0-6; 0 = Sunday) */
- int c_weekday; /* claimed day of week (0-6; 0 = Sunday) */
-};
-
-struct parseddate *parsedate(char *date);
-
-#ifdef __cplusplus
-}
-#endif
-
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 2001, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : regex.cpp
-** SYSTEM NAME : Andromeda X-Windows Encapsulation
-** VERSION NUMBER : $Revision: 1.3 $
-**
-** DESCRIPTION : regex class implementation.
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Feb 23, 2001
-** LAST UPDATE : Mar 31, 2010
-** MODIFICATIONS :
-**************************************************************************/
-
-/*****************************
- $Log: regex.cpp,v $
- Revision 1.3 2007/05/04 13:56:05 arjen
- Added a copy contructor to the regex class. This prevents multiple frees in the destructor.
-
- Revision 1.2 2002/09/28 06:45:51 arjen
- New feature: subtring selection by regular expression.
- Bugfix: use the std: namespace for STL classes istream and ostream
-
- Revision 1.1 2002/07/25 08:01:27 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-static const char RCSID[] = "$Id: regex.cpp,v 1.3 2007/05/04 13:56:05 arjen Exp $";
-
-#include <stdio.h>
-#include <ctype.h>
-#include "String.h"
-
- // Constructors and destructors for the regex class
-
-regex::regex(const String ®)
-{
- original = reg;
- int error = regcomp (&expression, reg.p->s, REG_EXTENDED);
-}
-
-regex::regex(const char *reg)
-{
- original = reg;
- int error = regcomp (&expression, reg, REG_EXTENDED);
-}
-
-regex::regex(const regex & reg)
-{
- original = reg.original;
- int error = regcomp (&expression, reg.original, REG_EXTENDED);
-}
-
-regex::~regex()
-{
- regfree(&expression);
-}
-
-regex& regex::operator=(const regex& x)
-{
- original = x.original;
- int error = regcomp (&expression, x.original, REG_EXTENDED);
-
- return *this;
-}
-
-bool operator == (const String &s, const regex &r)
-{
- return regexec(&r.expression, s.p->s, 0, 0, 0) == 0;
-}
-bool operator == (const regex &r, const String &s)
-{
- return regexec(&r.expression, s.p->s, 0, 0, 0) == 0;
-}
-
-substring String::operator()(const regex &r)
-{
- substring sub;
- regmatch_t match;
-
- sub.str = this;
- sub.start = 0;
- sub.len = 0;
-
- if (regexec(&r.expression, p->s, 1, &match, 0) == 0)
- {
- sub.start = match.rm_so;
- sub.len = match.rm_eo - match.rm_so;
- }
-
- return sub;
-}
-
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1997, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : string.cpp
-** SYSTEM NAME : Andromeda X-Windows Encapsulation
-** VERSION NUMBER : $Revision: 1.5 $
-**
-** DESCRIPTION : String class implementation.
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Nov 17, 1997
-** LAST UPDATE : Nov 30, 2003
-** MODIFICATIONS :
-**************************************************************************/
-
-/*****************************
- $Log: string.cpp,v $
- Revision 1.5 2007-05-04 13:55:18 arjen
- Dynamically allocate more memory if the string buffer runs out of space when
- reading a String object from an input stream.
-
- Revision 1.4 2003/03/29 07:18:54 arjen
- String constructor and assignment from char * are more robust fro NULL pointers.
-
- Revision 1.3 2002/11/03 13:18:57 arjen
- New functions - String::escape() and String::unescape()
-
- Revision 1.2 2002/09/28 06:42:11 arjen
- A few small bug fixes.
-
- Revision 1.1 2002/07/25 08:01:27 arjen
- First checkin, AXE release 0.2
-
-*****************************/
-
-static const char RCSID[] = "$Id: string.cpp,v 1.5 2007-05-04 13:55:18 arjen Exp $";
-
-#include <stdio.h>
-#include <ctype.h>
-#include "String.h"
-
- // Constructors and destructors for the String class
-
-String::String() // Create an empty String
-{
- p = new srep;
- p->s = 0;
- p->n = 1;
-}
-
-String::String(char c) // Create a String from a char
-{
- p = new srep;
- p->s = new char[2];
- p->s[0] = c;
- p->s[1] = '\0';
- p->n = 1;
-}
-
-String::String(const char *s) // Create a String from a char *
-{
- p = new srep;
-
- p->s = 0;
- p->n = 1;
-
- if (s != 0)
- {
- p->s = new char[strlen(s)+1];
- strcpy(p->s, s);
- p->n = 1;
- }
-}
-
-String::String(const String& x) // Create a String from another String
-{
- x.p->n++;
- p = x.p;
-}
-
-String::String(const substring &x)
-{
- p = new srep;
-
- p->s = new char[x.len+1];
- strncpy(p->s, x.str->p->s+x.start, x.len);
- p->s[x.len] = '\0'; // strncpy does not add the \0
- p->n = 1;
-}
-
-String::~String()
-{
- if (--p->n == 0)
- {
- delete p->s;
- delete p;
- }
-}
-
-/*
- * Assignment operators must handle cleanup of their left-hand operand.
- */
-
-String& String::operator=(const char c)
-{
- if (p->n > 1)
- { // Dsiconnect self
- p->n--;
- p = new srep;
- }
- else if (p->n == 1)
- delete p->s;
-
- p->s = new char[2];
- p->s[0] = c;
- p->s[1] = '\0';
- p->n = 1;
- return *this;
-}
-
-String& String::operator=(const char *s)
-{
- if (p->n > 1)
- { // Disconnect self
- p->n--;
- p = new srep;
- }
- else if (p->n == 1)
- delete p->s;
-
- if (s != 0)
- {
- p->s = new char[strlen(s)+1];
- strcpy(p->s, s);
- p->n = 1;
- }
- return *this;
-}
-
-/* Make sure that assignment of an object to itself works correctly: */
-
-String& String::operator=(const String& x)
-{
- x.p->n++;
- if (--p->n == 0)
- {
- delete p->s;
- delete p;
- }
-
- p = x.p;
- return *this;
-}
-
-/* Numerical conversion */
-
-String::String(int i)
-{
- p = new srep;
- p->s = new char[15]; // A little longer than needed...
- sprintf(p->s, "%d", i);
- p->n = 1;
-}
-
-String::String(long i)
-{
- p = new srep;
- p->s = new char[15]; // A little longer than needed...
- sprintf(p->s, "%ld", i);
- p->n = 1;
-}
-
-String::String(unsigned long i)
-{
- p = new srep;
- p->s = new char[15]; // A little longer than needed...
- sprintf(p->s, "%lu", i);
- p->n = 1;
-}
-
-String::String(double d)
-{
- p = new srep;
- p->s = new char[25]; // A little longer than needed...
- sprintf(p->s, "%.3f", d);
- p->n = 1;
-}
-
-/* String concatenation */
-
-String& String::operator+=(const String& x)
-{
- char *s = new char[strlen(p->s) + strlen(x.p->s) + 1];
-
- strcpy(s, p->s);
- strcat(s, x.p->s);
-
- if (p->n > 1)
- { // Disconnect self
- p->n--;
- p = new srep;
- }
- else if (p->n == 1)
- delete p->s;
-
- p->s = s;
- p->n = 1;
- return *this;
-}
-
-String& String::operator+=(const char * str)
-{
- char *s = new char[strlen(p->s) + strlen(str) + 1];
-
- strcpy(s, p->s);
- strcat(s, str);
-
- if (p->n > 1)
- { // Disconnect self
- p->n--;
- p = new srep;
- }
- else if (p->n == 1)
- delete p->s;
-
- p->s = s;
- p->n = 1;
- return *this;
-}
-
-String operator+(const String& x, const String& y)
-{
- String cat = x;
-
- cat += y;
- return cat;
-}
-
-String operator+(const String& x, const char * y)
-{
- String cat = x;
-
- cat += y;
- return cat;
-}
-
-String operator+(const char * x, const String& y)
-{
- String cat = x;
-
- cat += y;
- return cat;
-}
-
-/* Shift operators */
-
-
-String operator<<(const String &x, int n)
-{
- String s(x);
-
- s <<= n;
- return s;
-}
-
-String & String::operator<<=(int n)
-{
- // Make sure we are the only one being shifted.
-
- if (p->n > 1)
- { // Disconnect self
- char *s = new char[strlen(p->s) + 1];
-
- strcpy(s, p->s);
- p->n--;
- p = new srep;
- p->s = s;
- p->n = 1;
- }
-
- // Shift left means we really have to copy all characters.
-
- int len = strlen(p->s);
- int i;
-
- if (n >= len)
- {
- // Shift more than we have: the String becomes empty.
- p->s[0] = '\0';
- }
- else
- {
- for (i = 0; i <= len - n; i++)
- {
- p->s[i] = p->s[i+n];
- }
- }
-
- return *this;
-}
-
-String operator>>(const String &x, int n)
-{
- String s(x);
-
- s >>= n;
- return s;
-}
-
-String & String::operator>>=(int n)
-{
- // Make sure we are the only one being shifted.
-
- if (p->n > 1)
- { // Disconnect self
- char *s = new char[strlen(p->s) + 1];
-
- strcpy(s, p->s);
- p->n--;
- p = new srep;
- p->s = s;
- p->n = 1;
- }
-
- // Shift right is simple: just put the '\0' n places back.
-
-
- int len = strlen(p->s);
-
- if (n >= len)
- {
- // Shift more than we have: the String becomes empty.
- p->s[0] = '\0';
- }
- else
- {
- p->s[len - n] = '\0';
- }
-
- return *this;
-}
-
-/* Substring selection and assignment */
-
-substring String::operator()(int start, int len)
-{
- substring sub;
-
- sub.str = this;
- sub.start = start;
- sub.len = len;
- return sub;
-}
-
-String& substring::operator=(const String &x)
-{
- char *s = new char[strlen(x.p->s) + ~*str - len + 1];
-
- strncpy(s, str->p->s, start);
- s[start] = '\0';
- strcat(s, x.p->s);
- strcat(s, str->p->s+start+len);
-
- return *str = s;
-}
-
-/* Input and output */
-
-std::ostream& operator<<(std::ostream& s, const String& x)
-{
- if (x.p->s)
- s << x.p->s;
- return s;
-}
-
-std::istream& operator>>(std::istream& s, String& x)
-{
- char *buf;
- int i;
-
- int bufsize = 1024;
-
- buf = new char[bufsize];
-
- i = -1;
- do
- {
- if (i >= bufsize)
- {
- // Buffer is too small. Allocate some new space.
-
- char *newbuf = new char[bufsize * 2];
- memcpy(newbuf, buf, bufsize);
- delete [] buf;
- buf = newbuf;
- bufsize *= 2;
- }
-
- i++;
- s.get(buf[i]);
- }
- while (s && buf[i] != '\n');
- if (buf[i] == '\n')
- {
- buf[i] = '\0';
- }
- x = buf;
-
- delete [] buf;
-
- return s;
-}
-
-/*
- * The subscript operator is provided for access to individual characters
- */
-
-char& String::operator[](int i)
-{
- return p->s[i];
-}
-
-String String::upper()
-{
- String up;
- int i;
-
- up.p->s = new char[strlen(p->s)+1];
-
- for(i=0; p->s[i]; i++)
- {
- up.p->s[i] = toupper(p->s[i]);
- }
- up.p->s[i] = '\0';
-
- return up;
-}
-
-String String::lower()
-{
- String low;
- int i;
-
- low.p->s = new char[strlen(p->s)+1];
-
- for(i=0; p->s[i]; i++)
- {
- low.p->s[i] = tolower(p->s[i]);
- }
- low.p->s[i] = '\0';
-
- return low;
-}
-
-String String::escape()
-{
- const int BUFSIZE = 500;
-
- char buffer[BUFSIZE];
- String escaped = "";
- int i; // Index in buffer[]
- int j; // Index in *this
-
- i = 0;
- for (j = 0; p->s[j] != '\0'; j++)
- {
- if (i + 5 > BUFSIZE)
- {
- escaped += buffer;
- i = 0;
- }
-
- switch (p->s[j])
- {
- case '\a':
- buffer[i++] = '\\';
- buffer[i++] = 'a';
- break;
-
- case '\b':
- buffer[i++] = '\\';
- buffer[i++] = 'b';
- break;
-
- case '\f':
- buffer[i++] = '\\';
- buffer[i++] = 'f';
- break;
-
- case '\n':
- buffer[i++] = '\\';
- buffer[i++] = 'n';
- break;
-
- case '\r':
- buffer[i++] = '\\';
- buffer[i++] = 'r';
- break;
-
- case '\t':
- buffer[i++] = '\\';
- buffer[i++] = 't';
- break;
-
- case '\v':
- buffer[i++] = '\\';
- buffer[i++] = 'v';
- break;
-
- case '\'':
- buffer[i++] = '\\';
- buffer[i++] = '\'';
- break;
-
- case '"':
- buffer[i++] = '\\';
- buffer[i++] = '"';
- break;
-
- case '\\':
- buffer[i++] = '\\';
- buffer[i++] = '\\';
- break;
-
- default:
- if (p->s[j] > '\x20' && p->s[j] < '\x7F')
- {
- buffer[i++] = p->s[j];
- }
- else
- {
- short nibble;
-
- // Turn into hexadecimal representation
-
- buffer[i++] = '\\';
- buffer[i++] = 'x';
- nibble = (p->s[j] >> 4) & 0x0f;
- buffer[i++] = nibble < 10 ? nibble + '0' : nibble - 10 + 'A';
- nibble = p->s[j] & 0x0f;
- buffer[i++] = nibble < 10 ? nibble + '0' : nibble - 10 + 'A';
- }
- break;
- }
- }
-
- buffer[i] = '\0';
- escaped += buffer;
-
- return escaped;
-}
-
-String String::unescape()
-{
- String unescaped;
- char *s, *d;
-
- unescaped.p->s = new char[strlen(p->s)+1];
- s = p->s;
- d = unescaped.p->s;
-
- while (*s != '\0')
- {
- if (*s == '\\')
- {
- s++;
-
- switch (*s)
- {
- case 'a':
- *d = '\a';
- break;
-
- case 'b':
- *d = '\b';
- break;
-
- case 'f':
- *d = '\f';
- break;
-
- case 'n':
- *d = '\n';
- break;
-
- case 'r':
- *d = '\r';
- break;
-
- case 't':
- *d = '\t';
- break;
-
- case 'v':
- *d = '\v';
- break;
-
- case '\'':
- *d = '\'';
- break;
-
- case '"':
- *d = '"';
- break;
-
- case '\\':
- *d = '\\';
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- *d = 0;
- while (*s >= '0' && *s <= '7')
- {
- *d *= 8;
- *d += *s - '0';
- s++;
- }
- s--;
- break;
-
- case 'x':
- *d = 0;
- s++; // Skip the initial 'x'
- while (isxdigit(*s))
- {
- *d *= 16;
- *d += *s > '9' ? toupper(*s) - 'A' + 10 : *s - '0';
- s++;
- }
- s--;
- break;
-
- default:
- *d = *s;
- break;
- }
- }
- else
- {
- *d = *s;
- }
- s++;
- d++;
- }
-
- return unescaped;
-}
-
-
-// Find the first occurance of 'c'
-
-int String::index(char c)
-{
- char *found;
-
- found = strchr(p->s, c);
- if (found)
- return found - p->s;
- else
- return -1;
-}
-
-// Find the last occurance of 'c'
-
-int String::rindex(char c)
-{
- char *found;
-
- found = strrchr(p->s, c);
- if (found)
- return found - p->s;
- else
- return -1;
-}
-
-/* In: see if I am part of x, return -1 if not found */
-
-int String::in(String & x)
-{
- char *match;
-
- match = strstr(x.p->s, p->s);
- if (match)
- return match - x.p->s;
- else
- return -1;
-}
+++ /dev/null
-/**************************************************************************
-** (c) Copyright 1999, Andromeda Technology & Automation
-***************************************************************************
-** MODULE INFORMATION *
-***********************
-** FILE NAME : utc.cpp
-** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.1 $
-**
-** DESCRIPTION :
-**
-** EXPORTED OBJECTS :
-** LOCAL OBJECTS :
-** MODULES USED :
-***************************************************************************
-** ADMINISTRATIVE INFORMATION *
-********************************
-** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
-** CREATION DATE : Sep 16, 2002
-** LAST UPDATE : Sep 16, 2002
-**************************************************************************/
-
-/*****************************
- $Log: utc.cpp,v $
- Revision 1.1 2002-09-28 06:58:45 arjen
- Bugfix: conversion of an empty string to a date or hour object
- now makes the values of such an object 0 (null) instead of giving
- a segmentation fault.
- The class UTC combines the date and hour classes. The most basic
- functions of the UTC class are now implemented.
- These include constructors and conversion to and from String objects.
- New functions: date::proper(), hour::proper() and UTC::proper().
- Return true if the object holds a proper clock time and/or calendar
- date; false if at least one value is out of range.
-
-
-*****************************/
-
-static const char *RCSID = "$Id: utc.cpp,v 1.1 2002-09-28 06:58:45 arjen Exp $";
-
-#include <time.h>
-
-#include "date.h"
-#include "parsedate.h"
-
-UTC::UTC(String s)
-{
- struct parseddate *pd;
-
- if (~s == 0)
- {
- t.hours = 0;
- t.minutes = 0;
- t.seconds = 0;
- d.year = 0;
- d.month = 0;
- d.day = 0;
- }
- else
- {
- pd = parsedate(s);
- t.hours = pd->hour;
- t.minutes = pd->minute;
- t.seconds = pd->second;
- d.year = pd->year;
- d.month = pd->month;
- d.day = pd->day;
- }
-}
-
-UTC Now()
-{
- long clock;
- struct tm *tp;
- date d;
- hour t;
-
- time(&clock);
- tp = localtime(&clock);
-
- t = hour(tp->tm_hour, tp->tm_min, tp->tm_sec);
- d = date(tp->tm_mday, tp->tm_mon+1, tp->tm_year+1900);
-
- return UTC(d, t);
-}
-
-std::ostream& operator<<(std::ostream &s, const UTC &t)
-{
- s << t.d << " " << t.t;
-
- return s;
-}
-
-std::istream &operator>>(std::istream &s, UTC &t)
-{
- s >> t.d >> t.t;
-
- return s;
-}
-
-String UTC::format(const char *fmt)
-{
- String s;
- char buf[80];
- struct tm ut;
-
- ut.tm_sec = t.seconds;
- ut.tm_min = t.minutes;
- ut.tm_hour = t.hours;
- ut.tm_year = d.year - 1900;
- ut.tm_mon = d.month - 1;
- ut.tm_mday = d.day;
-
- strftime(buf, 80, fmt, &ut);
- s = buf;
-
- return s;
-}
-