OSSP CVS Repository

ossp - Check-in [2076]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2076
Date: 2002-Apr-18 11:10:46 (local)
2002-Apr-18 09:10:46 (UTC)
User:rse
Branch:
Comment: Import first cut for OSSP tai
Tickets:
Inspections:
Files:
ossp-pkg/tai/TODO      added-> 1.1.1.1
ossp-pkg/tai/aclocal.m4      1.1 -> 1.1.1.1    
ossp-pkg/tai/aclocal.m4      added-> 1.1
ossp-pkg/tai/configure.ac      1.1 -> 1.1.1.1    
ossp-pkg/tai/configure.ac      added-> 1.1
ossp-pkg/tai/devtool      1.1 -> 1.1.1.1    
ossp-pkg/tai/devtool      added-> 1.1
ossp-pkg/tai/devtool.conf      1.1 -> 1.1.1.1    
ossp-pkg/tai/devtool.conf      added-> 1.1
ossp-pkg/tai/devtool.func      1.1 -> 1.1.1.1    
ossp-pkg/tai/devtool.func      added-> 1.1
ossp-pkg/tai/tai.ac      1.1 -> 1.1.1.1    
ossp-pkg/tai/tai.ac      added-> 1.1
ossp-pkg/tai/tai.h      added-> 1.1.1.1
ossp-pkg/tai/tai_data.c      1.1 -> 1.1.1.1    
ossp-pkg/tai/tai_data.c      added-> 1.1

ossp-pkg/tai/TODO -> 1.1.1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,4 ----
+ 
+ - tm_parse(buf,fmt,tm) -> tm_parse(buf,buflen,fmt,tm)
+ - add exception support
+ 


ossp-pkg/tai/aclocal.m4 -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,228 ----
+ dnl ##
+ dnl ##  OSSP tai - Time Handling
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP tai, a time handling library
+ dnl ##  which can be found at http://www.ossp.org/pkg/lib/tai/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  aclocal.m4: GNU Autoconf local macro definitions
+ dnl ##
+ 
+ dnl ##
+ dnl ##  Check whether compiler option works
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##    AC_COMPILER_OPTION(<name>, <display>, <option>,
+ dnl ##                       <action-success>, <action-failure>)
+ dnl ##
+ 
+ AC_DEFUN(AC_COMPILER_OPTION,[dnl
+ AC_MSG_CHECKING(whether compiler option(s) $2 work)
+ AC_CACHE_VAL(ac_cv_compiler_option_$1,[
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $3"
+ AC_TRY_COMPILE([],[], ac_cv_compiler_option_$1=yes, ac_cv_compiler_option_$1=no)
+ CFLAGS="$SAVE_CFLAGS"
+ ])dnl
+ if test ".$ac_cv_compiler_option_$1" = .yes; then
+     ifelse([$4], , :, [$4])
+ else
+     ifelse([$5], , :, [$5])
+ fi
+ AC_MSG_RESULT([$ac_cv_compiler_option_$1])
+ ])dnl
+ 
+ dnl ##
+ dnl ##  Debugging Support
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##    AC_CHECK_DEBUGGING
+ dnl ##
+ 
+ AC_DEFUN(AC_CHECK_DEBUGGING,[dnl
+ AC_ARG_ENABLE(debug,dnl
+ [  --enable-debug          build for debugging (default=no)],
+ [dnl
+ if test ".$ac_cv_prog_gcc" = ".yes"; then
+     case "$CFLAGS" in
+         *-O* ) ;;
+            * ) CFLAGS="$CFLAGS -O2" ;;
+     esac
+     case "$CFLAGS" in
+         *-g* ) ;;
+            * ) CFLAGS="$CFLAGS -g" ;;
+     esac
+     case "$CFLAGS" in
+         *-pipe* ) ;;
+               * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CFLAGS="$CFLAGS -pipe") ;;
+     esac
+     AC_COMPILER_OPTION(defdbg, -DDEBUG, -DDEBUG, CFLAGS="$CFLAGS -DDEBUG")
+     CFLAGS="$CFLAGS -pedantic"
+     CFLAGS="$CFLAGS -Wall"
+     WMORE="-Wshadow -Wpointer-arith -Wcast-align -Winline"
+     WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
+     AC_COMPILER_OPTION(wmore, -W<xxx>, $WMORE, CFLAGS="$CFLAGS $WMORE")
+     AC_COMPILER_OPTION(wnolonglong, -Wno-long-long, -Wno-long-long, CFLAGS="$CFLAGS -Wno-long-long")
+ else
+     case "$CFLAGS" in
+         *-g* ) ;;
+            * ) CFLAGS="$CFLAGS -g" ;;
+     esac
+ fi
+ msg="enabled"
+ ],[
+ if test ".$ac_cv_prog_gcc" = ".yes"; then
+ case "$CFLAGS" in
+     *-pipe* ) ;;
+           * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CFLAGS="$CFLAGS -pipe") ;;
+ esac
+ fi
+ case "$CFLAGS" in
+     *-g* ) CFLAGS=`echo "$CFLAGS" |\
+                    sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
+ esac
+ case "$CXXFLAGS" in
+     *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+                      sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
+ esac
+ msg=disabled
+ ])dnl
+ AC_MSG_CHECKING(for compilation debug mode)
+ AC_MSG_RESULT([$msg])
+ if test ".$msg" = .enabled; then
+     enable_shared=no
+ fi
+ ])
+ 
+ dnl ##
+ dnl ##  Check for an external/extension library.
+ dnl ##  - is aware of <libname>-config style scripts
+ dnl ##  - searches under standard paths include, lib, etc.
+ dnl ##  - searches under subareas like .libs, etc.
+ dnl ##
+ dnl ##  configure.in:
+ dnl ##      AC_CHECK_EXTLIB(<realname>, <libname>, <func>, <header>,
+ dnl ##                      [<success-action> [, <fail-action>]])
+ dnl ##  Makefile.in:
+ dnl ##      CFLAGS  = @CFLAGS@
+ dnl ##      LDFLAGS = @LDFLAGS@
+ dnl ##      LIBS    = @LIBS@
+ dnl ##  shell:
+ dnl ##      $ ./configure --with-<libname>[=DIR]
+ dnl ##
+ 
+ AC_DEFUN(AC_CHECK_EXTLIB,[dnl
+ AC_ARG_WITH($2, [dnl
+ [  --with-]m4_substr([$2[[=DIR]]                     ], 0, 19)[build with external $1 library (default=no)]], [dnl
+     if test ".$with_$2" = .yes; then
+         #   via config script in PATH
+         $2_version=`($2-config --version) 2>/dev/null`
+         if test ".$$2_version" != .; then
+             CPPFLAGS="$CPPFLAGS `$2-config --cflags`"
+             CFLAGS="$CFLAGS `$2-config --cflags`"
+             LDFLAGS="$LDFLAGS `$2-config --ldflags`"
+         fi
+     else
+         if test -d "$with_$2"; then
+             found=0
+             #   via config script
+             for dir in $with_$2/bin $with_$2; do
+                 if test -f "$dir/$2-config" && test ! -f "$dir/$2-config.in"; then
+                     $2_version=`($dir/$2-config --version) 2>/dev/null`
+                     if test ".$$2_version" != .; then
+                         CPPFLAGS="$CPPFLAGS `$dir/$2-config --cflags`"
+                         CFLAGS="$CFLAGS `$dir/$2-config --cflags`"
+                         LDFLAGS="$LDFLAGS `$dir/$2-config --ldflags`"
+                         found=1
+                         break
+                     fi
+                 fi
+             done
+             #   in standard sub-areas
+             if test ".$found" = .0; then
+                 for dir in $with_$2/include/$2 $with_$2/include $with_$2; do
+                     if test -f "$dir/$4"; then
+                         CPPFLAGS="$CPPFLAGS -I$dir"
+                         CFLAGS="$CFLAGS -I$dir"
+                         found=1
+                         break
+                     fi
+                 done
+                 for dir in $with_$2/lib/$2 $with_$2/lib $with_$2; do
+                     if test -f "$dir/lib$2.la" && test -d "$dir/.libs"; then
+                         LDFLAGS="$LDFLAGS -L$dir -L$dir/.libs"
+                         found=1
+                         break
+                     elif test -f "$dir/lib$2.a" || test -f "$dir/lib$2.so"; then
+                         LDFLAGS="$LDFLAGS -L$dir"
+                         found=1
+                         break
+                     fi
+                 done
+             fi
+             #   in any sub-area
+             if test ".$found" = .0; then
+ changequote(, )dnl
+                 for file in x `find $with_$2 -name "$4" -type f -print`; do
+                     test .$file = .x && continue
+                     dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
+                     CPPFLAGS="$CPPFLAGS -I$dir"
+                     CFLAGS="$CFLAGS -I$dir"
+                 done
+                 for file in x `find $with_$2 -name "lib$2.[aso]" -type f -print`; do
+                     test .$file = .x && continue
+                     dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
+                     LDFLAGS="$LDFLAGS -L$dir"
+                 done
+ changequote([, ])dnl
+             fi
+         fi
+     fi
+     AC_HAVE_HEADERS($4)
+     AC_CHECK_LIB($2, $3)
+     with_$2=yes
+     ac_var="ac_cv_header_`echo $4 | sed 'y%./+-%__p_%'`"
+     eval "ac_val=\$$ac_var"
+     if test ".$ac_val" != .yes; then
+         with_$2=no
+     fi
+     if test ".$ac_cv_lib_$2_$3" != .yes; then
+         with_$2=no
+     fi
+     if test ".$with_$2" = .no; then
+         AC_ERROR([Unable to find $1 library])
+     fi
+     ], [dnl
+ if test ".$with_$2" = .; then
+     with_$2=no
+ fi
+     ])dnl
+ AC_MSG_CHECKING(whether to build against external $1 library)
+ if test ".$with_$2" = .yes; then
+     ifelse([$5], , :, [$5])
+ else
+     ifelse([$6], , :, [$6])
+ fi
+ AC_MSG_RESULT([$with_$2])
+ ])dnl
+ 


ossp-pkg/tai/aclocal.m4 1.1 -> 1.1.1.1



ossp-pkg/tai/configure.ac -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,54 ----
+ dnl ##
+ dnl ##  OSSP tai - Time Handling
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP tai, a time handling library
+ dnl ##  which can be found at http://www.ossp.org/pkg/lib/tai/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  configure.ac: GNU Autoconf source script
+ dnl ##
+ 
+ AC_PREREQ(2.53)
+ AC_INIT
+ TM_VERSION_STR=`./shtool version -l txt -d long VERSION`
+ ./shtool echo -e "Configuring %BOSSP tai%b (Time Handling), version %B${TM_VERSION_STR}%b"
+ AC_SUBST(SA_VERSION_STR)
+ 
+ AC_PROG_MAKE_SET
+ AC_PROG_CC
+ AC_CHECK_DEBUGGING
+ 
+ sinclude(libtool.m4)
+ AC_PROG_LIBTOOL
+ 
+ sinclude(tai.ac)
+ TAI_CHECK_ALL
+ 
+ AC_CHECK_EXTLIB([OSSP ex], ex, __ex_ctx, ex.h,
+                 [AC_DEFINE(WITH_EX, 1, [Define to 1 if building with OSSP ex])])
+ 
+ AC_CONFIG_HEADERS(config.h)
+ AC_CONFIG_FILES([Makefile tai-config])
+ AC_CONFIG_COMMANDS([adjustment], [chmod a+x tai-config])
+ AC_OUTPUT
+ 


ossp-pkg/tai/configure.ac 1.1 -> 1.1.1.1



ossp-pkg/tai/devtool -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ ##
+ ##  devtool -- Development Tool
+ ##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ if [ $# -eq 0 ]; then
+     echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
+     exit 1
+ fi
+ 
+ cmd="$1"
+ shift
+ 
+ devtoolfunc="./devtool.func"
+ 
+ if [ ! -f devtool.conf ]; then
+     echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
+     exit 1
+ fi
+ 
+ cmdline=`grep "^%$cmd" devtool.conf`
+ if [ ".$cmdline" = . ]; then
+     echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
+     exit 1
+ fi
+ 
+ if [ ".$TMPDIR" != . ]; then
+     tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+     tmpdir="$TEMPDIR"
+ else
+     tmpdir="/tmp"
+ fi
+ tmpfile="$tmpdir/rc.$$.tmp"
+ 
+ rm -f $tmpfile
+ touch $tmpfile
+ echo ". $devtoolfunc" >>$tmpfile
+ ( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
+   sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
+ sed -e 's;\([  ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile
+ 
+ sh $tmpfile "$@"
+ 
+ rm -f $tmpfile >/dev/null 2>&1 || true
+ 


ossp-pkg/tai/devtool 1.1 -> 1.1.1.1



ossp-pkg/tai/devtool.conf -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,51 ----
+ ##
+ ##  devtool.conf -- Development Tool Configuration
+ ##
+ 
+ %autogen
+     @autogen shtool   1.6.0 "1.6.*" all
+     @autogen libtool  1.4.2 "1.4*"
+     @autogen autoconf 2.53  "2.5[3-9]*"
+ 
+ %autoclean
+     @autoclean shtool
+     @autoclean libtool
+     @autoclean autoconf
+ 
+ %configure
+     ./configure \
+         --prefix=/tmp/tai \
+         --disable-shared \
+         --enable-debug \
+         "$@"
+ 
+ %version
+     ./shtool version -l txt -n "OSSP tai" -e VERSION
+     V=`./shtool version -l txt -d long VERSION`
+     sed -e "s/Version .*(.*)/Version $V/g" <README >README.n 
+     mv README.n README
+ 
+ %dist
+     echo "+++ generating"
+     ./devtool autoclean
+     ./devtool autogen
+     echo "+++ configuring"
+     ./configure
+     echo "+++ building"
+     make clean all man
+     echo "+++ cleaning"
+     make distclean
+     echo "+++ fixing"
+     ./shtool fixperm -v .
+     echo "+++ rolling"
+     V=`./shtool version -l txt -d short VERSION`
+     ./shtool tarball -o tai-${V}.tar.gz -d tai-${V} -u ossp -g ossp \
+                      -e 'CVS,\.cvsignore,\.[ao],^\.,devtool*,*.tar.gz' -c 'gzip --best' .
+     ls -l tai-${V}.tar.gz
+     echo "+++ testing"
+     gunzip <tai-${V}.tar.gz | tar tvf -
+ 
+ %release
+     echo "+++ copying to ftp://ftp.ossp.org/pkg/lib/tai/"
+     scp tai-*.tar.gz master.ossp.org:/e/ossp/ftp/pkg/lib/tai/
+ 


ossp-pkg/tai/devtool.conf 1.1 -> 1.1.1.1



ossp-pkg/tai/devtool.func -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,73 ----
+ ##
+ ##  devtool.func -- Development Tool Functions
+ ##  Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ devtool_require () {
+     t="$1"; o="$2"; p="$3"; e="$4"; a="$5"
+     v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null`
+     if [ ".$v" = . ]; then
+         echo "devtool:ERROR: unable to determine version of $t" 1>&2
+         exit 1
+     fi
+     case "$v" in
+         $e )
+             ;;
+         $a )
+             echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2
+             ;;
+         * )
+             echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2
+             exit 1
+             ;;
+     esac
+     echo "$v"
+ }
+ 
+ devtool_autogen () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"`
+             echo "generating (GNU Autoconf $autoconf_version): configure config.h.in"
+             autoconf
+             autoheader 2>&1 | grep -v "is unchanged"
+             rm -rf autom4te.cache >/dev/null 2>&1
+             ;;
+         libtool )
+             libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"`
+             echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub"
+             libtoolize --force --copy >/dev/null 2>&1
+             cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\
+                 sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4
+             ;;
+         shtool )
+             shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"`
+             echo "generating (GNU Shtool $shtoolize_version): shtool"
+             shift
+             shift
+             shtoolize -q "$@"
+             ;;
+     esac
+ }
+ 
+ devtool_autoclean () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             echo "removing: configure config.h.in"
+             rm -f configure config.h.in
+             ;;
+         libtool )
+             echo "removing: ltmain.sh libtool.m4 config.guess config.sub"
+             rm -f ltmain.sh libtool.m4 config.guess config.sub
+             ;;
+         shtool )
+             echo "removing: shtool"
+             rm -f shtool
+             ;;
+     esac
+ }
+ 


ossp-pkg/tai/devtool.func 1.1 -> 1.1.1.1



ossp-pkg/tai/tai.ac -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,39 ----
+ dnl ##
+ dnl ##  OSSP tai - Time Handling
+ dnl ##  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP tai, a time handling library
+ dnl ##  which can be found at http://www.ossp.org/pkg/lib/tai/.
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  tm.ac: OSSP tm Autoconf checks
+ dnl ##
+ 
+ dnl #   Check for anything OSSP tai wants to know
+ dnl #   configure.in:
+ dnl #     TAI_CHECK_ALL
+ 
+ AC_DEFUN(TAI_CHECK_ALL,[
+     #   check for system functions
+     AC_CHECK_FUNCS(gmtime_r timegm)
+ ])
+ 


ossp-pkg/tai/tai.ac 1.1 -> 1.1.1.1



ossp-pkg/tai/tai.h -> 1.1.1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,113 ----
+ /*
+ **  OSSP tai - Time Handling
+ **  Copyright (c) 2002 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ **  Copyright (c) 2002 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ **
+ **  This file is part of OSSP tai, a time handling library
+ **  which can be found at http://www.ossp.org/pkg/lib/tai/.
+ **
+ **  Permission to use, copy, modify, and distribute this software for
+ **  any purpose with or without fee is hereby granted, provided that
+ **  the above copyright notice and this permission notice appear in all
+ **  copies.
+ **
+ **  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ **  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ **  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ **  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ **  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ **  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ **  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ **  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ **  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ **  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ **  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ **  SUCH DAMAGE.
+ **
+ **  tai.h: public API
+ */
+ 
+ #ifndef __TAI_H__
+ #define __TAI_H__
+ 
+ #include <time.h> /* time_t, struct tm */
+ 
+ typedef enum {
+     TAI_OK = 0,
+     TAI_ERR_ARG,
+     TAI_ERR_USE,
+     TAI_ERR_OVF,
+     TAI_ERR_FMT,
+     TAI_ERR_PRS,
+     TAI_ERR_SYS,
+     TAI_ERR_IMP
+ } tai_rc_t;
+ 
+ typedef struct {
+     int           sign;
+     unsigned long  sec;
+     unsigned long nsec;
+     unsigned long asec;
+ } tai_offset_t;
+ 
+ typedef struct {
+     char bytes[16];
+ } tai_packed_t;
+ 
+ typedef enum {
+     /* lossless types */
+     TAI_TYPE_TMT,       /* tai_t */
+     TAI_TYPE_PACKED,    /* tai_packed_t (128 bit in 16 bytes network byte order) */
+     /* looser types */
+     TAI_TYPE_OFFSET,    /* tai_off_t */
+     TAI_TYPE_SECONDS,   /* long */
+     TAI_TYPE_NSECONDS,  /* long */
+     TAI_TYPE_ASECONDS,  /* long */
+     TAI_TYPE_TIMET,     /* time_t */
+     TAI_TYPE_STRUCTTM,  /* struct tm */
+     TAI_TYPE_STRUCTTV,  /* struct timeval */
+     /* only import */
+     TAI_TYPE_UNIX,      /* gettimeofday/time/getthtime */
+     TAI_TYPE_SNTP,      /* SNTP network query */
+     TAI_TYPE_RTIME      /* time network query */
+ } tai_type_t;
+ 
+ typedef enum {
+     /* arithmetical operations */
+     TAI_OP_NEG,
+     TAI_OP_ADD,
+     TAI_OP_SUB,
+     TAI_OP_MUL,
+     TAI_OP_DIV,
+     TAI_OP_MOD,
+     /* comparison operations */
+     TAI_OP_G0,  /* greater than 0 */
+     TAI_OP_E0,  /* equal to 0 */
+     TAI_OP_L0,  /* less than 0 */
+     TAI_OP_NE,
+     TAI_OP_EQ,
+     TAI_OP_LT,
+     TAI_OP_LE,
+     TAI_OP_GT,
+     TAI_OP_GE,
+     TAI_OP_SETPREC,
+     TAI_OP_GETPREC
+ } tai_op_t;
+ 
+ struct tai_st;
+ typedef struct tai_st tai_t;
+ 
+ tai_rc_t  tai_create  (tai_t **tai);
+ tai_rc_t  tai_destroy (tai_t  *tai);
+ 
+ tai_rc_t  tai_import  (tai_t  *tai, tai_type_t type, ...);
+ tai_rc_t  tai_export  (tai_t  *tai, tai_type_t type, ...);
+ 
+ tai_rc_t  tai_format  (tai_t  *tai, char       *buf_ptr, size_t buf_len, const char *fmt);
+ tai_rc_t  tai_parse   (tai_t  *tai, const char *buf_ptr, size_t buf_len, const char *fmt);
+ 
+ tai_rc_t  tai_op      (tai_t  *tai, tai_op_t op, ...);
+ 
+ #endif /* __TAI_H__ */
+ 


ossp-pkg/tai/tai_data.c -> 1.1

*** /dev/null    Wed Apr 24 10:52:00 2024
--- -    Wed Apr 24 10:52:05 2024
***************
*** 0 ****
--- 1,98 ----
+ /*-
+  * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+  * Copyright (c) 1997 FreeBSD Inc.
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+ 
+ #include <sys/cdefs.h>
+ #include <stddef.h>
+ 
+ #if 0
+ __FBSDID("$FreeBSD: src/lib/libc/stdtime/timelocal.c,v 1.23 2002/03/22 21:53:13 obrien Exp $");
+ #endif
+ 
+ #include "tai_p.h"
+ 
+ #define LCTIME_SIZE (sizeof(tai_locale_t) / sizeof(char *))
+ 
+ const tai_locale_t tai_locale = {
+        {
+                "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+        }, {
+                "January", "February", "March", "April", "May", "June",
+                "July", "August", "September", "October", "November", "December"
+        }, {
+                "Sun", "Mon", "Tue", "Wed",
+                "Thu", "Fri", "Sat"
+        }, {
+                "Sunday", "Monday", "Tuesday", "Wednesday",
+                "Thursday", "Friday", "Saturday"
+        },
+ 
+        /* X_fmt */
+        "%H:%M:%S",
+ 
+        /*
+         * x_fmt
+         * Since the C language standard calls for
+         * "date, using locale's date format," anything goes.
+         * Using just numbers (as here) makes Quakers happier;
+         * it's also compatible with SVR4.
+         */
+        "%m/%d/%y",
+ 
+        /*
+         * c_fmt
+         */
+        "%a %b %e %H:%M:%S %Y",
+ 
+        /* am */
+        "AM",
+ 
+        /* pm */
+        "PM",
+ 
+        /* date_fmt */
+        "%a %b %e %H:%M:%S %Z %Y",
+        
+        /* alt_month
+         * Standalone months forms for %OB
+         */
+        {
+                "January", "February", "March", "April", "May", "June",
+                "July", "August", "September", "October", "November", "December"
+        },
+ 
+        /* md_order
+         * Month / day order in dates
+         */
+        "md",
+ 
+        /* ampm_fmt
+         * To determine 12-hour clock format time (empty, if N/A)
+         */
+        "%I:%M:%S %p"
+ };
+ 


ossp-pkg/tai/tai_data.c 1.1 -> 1.1.1.1


CVSTrac 2.0.1