OSSP CVS Repository

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

Check-in Number: 3698
Date: 2004-Jan-06 21:14:28 (local)
2004-Jan-06 20:14:28 (UTC)
User:rse
Branch:
Comment: import the first cut for our forthcoming OSSP uuid library
Tickets:
Inspections:
Files:
ossp-pkg/uuid/Makefile.in      added-> 1.1
ossp-pkg/uuid/README      added-> 1.1
ossp-pkg/uuid/VERSION      added-> 1.1
ossp-pkg/uuid/aclocal.m4      added-> 1.1
ossp-pkg/uuid/configure.ac      added-> 1.1
ossp-pkg/uuid/devtool      added-> 1.1
ossp-pkg/uuid/devtool.conf      added-> 1.1
ossp-pkg/uuid/devtool.func      added-> 1.1
ossp-pkg/uuid/uuid-config.in      added-> 1.1
ossp-pkg/uuid/uuid.ac      added-> 1.1
ossp-pkg/uuid/uuid.c      added-> 1.1
ossp-pkg/uuid/uuid.h      added-> 1.1
ossp-pkg/uuid/uuid_cli.c      added-> 1.1
ossp-pkg/uuid/uuidtool.c      added-> 1.1

ossp-pkg/uuid/Makefile.in -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,128 ----
+ ##
+ ##  OSSP uuid - Universally Unique Identifier
+ ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ ##
+ ##  This file is part of OSSP uuid, a library for the generation
+ ##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ ##
+ ##  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.
+ ##
+ ##  Makefile.in: make(1) build procedure
+ ##
+ 
+ @SET_MAKE@
+ 
+ DESTDIR     =
+ prefix      = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir      = @bindir@
+ libdir      = @libdir@
+ includedir  = @includedir@
+ mandir      = @mandir@
+ 
+ CC          = @CC@
+ CPPFLAGS    = @CPPFLAGS@
+ CFLAGS      = @DEFS@ @CFLAGS@
+ LDFLAGS     = @LDFLAGS@
+ LIBS        = @LIBS@
+ RM          = rm -f
+ RMDIR       = rmdir
+ SHTOOL      = ./shtool
+ LIBTOOL     = ./libtool
+ TRUE        = true
+ POD2MAN     = pod2man
+ 
+ LIB_NAME    = libuuid.la
+ LIB_OBJS    = uuid.lo
+ 
+ PRG_NAME    = uuid
+ PRG_OBJS    = uuid_cli.o
+ 
+ .SUFFIXES:
+ .SUFFIXES: .c .o .lo
+ 
+ all: $(LIB_NAME) $(PRG_NAME)
+ 
+ .c.o:
+        $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ .c.lo:
+        @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ $(LIB_NAME): $(LIB_OBJS)
+        @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
+            -version-info `$(SHTOOL) version -l txt -d libtool VERSION`
+ 
+ $(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
+        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(PRG_NAME) $(PRG_OBJS) $(LIB_NAME) $(LIBS)
+ 
+ man: uuid.3
+ uuid.3: uuid.pod
+        V1=`$(SHTOOL) version -l txt -d short VERSION`; \
+        V2=`$(SHTOOL) version -l txt -d long VERSION`; \
+        D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \
+        $(POD2MAN) --quotes=none \
+                   --section=3 --center="Universally Unique Identifiers" \
+                   --release="$$D" --date="OSSP uuid $$V1" uuid.pod | \
+        sed -e "s;UUID_VERSION_STR;$$V2;" >uuid.3
+ 
+ check: $(PRG_NAME)
+        @$(LIBTOOL) --mode=execute ./$(PRG_NAME) -n 16
+ 
+ install:
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
+        $(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/
+        $(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/
+        $(SHTOOL) install -c -m 644 uuid.3 $(DESTDIR)$(mandir)/man3/
+        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libuuid.la $(DESTDIR)$(libdir)/
+ 
+ uninstall:
+        @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libuuid.la
+        -$(RM) $(DESTDIR)$(mandir)/man3/uuid.3
+        -$(RM) $(DESTDIR)$(includedir)/uuid.h
+        -$(RM) $(DESTDIR)$(bindir)/uuid-config
+        -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
+ 
+ clean:
+        -$(RM) $(LIB_NAME) $(LIB_OBJS)
+        -$(RM) $(PRG_NAME) $(PRG_OBJS)
+        -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE)
+        -$(RM) *.o *.lo
+ 
+ distclean: clean
+        -$(RM) config.log config.status config.cache
+        -$(RM) Makefile config.h uuid-config
+        -$(RM) libtool
+ 
+ realclean: distclean
+        -$(RM) uuid.3
+        -$(RM) configure config.h.in
+        -$(RM) shtool
+        -$(RM) ltmain.sh libtool.m4 config.guess config.sub
+ 


ossp-pkg/uuid/README -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,46 ----
+    _        ___  ____ ____  ____                _     _
+   |_|_ _   / _ \/ ___/ ___||  _ \   _   _ _   _(_) __| |
+   _|_||_| | | | \___ \___ \| |_) | | | | | | | | |/ _` |
+  |_||_|_| | |_| |___) |__) |  __/  | |_| | |_| | | (_| |
+   |_|_|_|  \___/|____/____/|_|      \__,_|\__,_|_|\__,_|
+ 
+   OSSP uuid - Universally Unique Identifiers
+   Version 0.1.0 (06-Jan-2004)
+ 
+   ABSTRACT
+ 
+   OSSP uuid is ...
+ 
+   COPYRIGHT AND LICENSE
+ 
+   Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+   Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ 
+   This file is part of OSSP uuid, a library for the generation
+   of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ 
+   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.
+ 
+   HOME AND DOCUMENTATION
+ 
+   The documentation and latest release can be found on
+ 
+   o http://www.ossp.org/pkg/lib/uuid/
+   o  ftp://ftp.ossp.org/pkg/lib/uuid/
+ 


ossp-pkg/uuid/VERSION -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,6 ----
+ 
+   VERSION -- Version Information for OSSP uuid (syntax: Text)
+   [automatically generated and maintained by GNU shtool]
+ 
+   This is OSSP uuid, Version 0.1.0 (06-Jan-2004)
+ 


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

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,116 ----
+ dnl ##
+ dnl ##  SA - OSSP Socket Abstraction Library
+ dnl ##  Copyright (c) 2001-2003 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2001-2003 The OSSP Project <http://www.ossp.org/>
+ dnl ##  Copyright (c) 2001-2003 Cable & Wireless Deutschland <http://www.cw.com/de/>
+ dnl ##
+ dnl ##  This file is part of OSSP SA, a socket abstraction library which
+ dnl ##  can be found at http://www.ossp.org/pkg/sa/.
+ 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
+ ])
+ 


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

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,50 ----
+ dnl ##
+ dnl ##  OSSP uuid - Universally Unique Identifier
+ dnl ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ dnl ##
+ dnl ##  This file is part of OSSP uuid, a library for the generation
+ dnl ##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ 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
+ SA_VERSION_STR=`./shtool version -l txt -d long VERSION`
+ ./shtool echo -e "Configuring %BOSSP uuid%b (Universally Unique Identifiers), version %B${UUID_VERSION_STR}%b"
+ AC_SUBST(UUID_VERSION_STR)
+ 
+ AC_PROG_MAKE_SET
+ AC_PROG_CC
+ AC_CHECK_DEBUGGING
+ 
+ sinclude(libtool.m4)
+ AC_PROG_LIBTOOL
+ 
+ sinclude(uuid.ac)
+ UUID_CHECK_ALL
+ 
+ AC_CONFIG_HEADERS(config.h)
+ AC_CONFIG_FILES([Makefile uuid-config])
+ AC_CONFIG_COMMANDS([adjustment], [chmod a+x uuid-config])
+ AC_OUTPUT
+ 


ossp-pkg/uuid/devtool -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 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/uuid/devtool.conf -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,56 ----
+ ##
+ ##  devtool.conf -- Development Tool Configuration
+ ##
+ 
+ %autogen
+     @autogen shtool   1.6.2 "1.6.*" all
+     @autogen libtool  1.5   "1.5*"
+     @autogen autoconf 2.59  "2.5[3-9]*"
+ 
+ %autoclean
+     @autoclean shtool
+     @autoclean libtool
+     @autoclean autoconf
+ 
+ %configure
+     ./configure \
+         --prefix=/tmp/uuid \
+         --disable-shared \
+         --enable-debug \
+         "$@"
+ 
+ %version
+     ./shtool version -l txt -n "OSSP uuid" -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 "+++ removing old tarballs"
+     rm -f uuid-*.tar.gz
+     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 uuid-${V}.tar.gz -d uuid-${V} -u ossp -g ossp \
+                      -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz,^#.*,.*~$' -c 'gzip --best' .
+     ls -l uuid-${V}.tar.gz
+     echo "+++ testing"
+     gunzip <uuid-${V}.tar.gz | tar tvf - | head -10
+     echo "[...]"
+     gunzip <uuid-${V}.tar.gz | tar tvf - | tail -10
+ 
+ %upload
+     echo "+++ copying to ftp://ftp.ossp.org/pkg/lib/uuid/"
+     V=`./shtool version -l txt -d short VERSION`
+     scp uuid-${V}.tar.gz master.ossp.org:/e/ossp/ftp/pkg/lib/uuid/
+ 


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

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 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/uuid/uuid-config.in -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,144 ----
+ #!/bin/sh
+ ##
+ ##  OSSP uuid - Universally Unique Identifier
+ ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ ##
+ ##  This file is part of OSSP uuid, a library for the generation
+ ##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ ##
+ ##  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.
+ ##
+ ##  uuid-config.in: library build utility
+ ##
+ 
+ DIFS=' 
+ '
+ 
+ prefix="@prefix@"
+ exec_prefix="@exec_prefix@"
+ 
+ uuid_prefix="$prefix"
+ uuid_exec_prefix="$exec_prefix"
+ uuid_bindir="@bindir@"
+ uuid_libdir="@libdir@"
+ uuid_includedir="@includedir@"
+ uuid_mandir="@mandir@"
+ uuid_datadir="@datadir@"
+ uuid_acdir="@datadir@/aclocal"
+ uuid_cflags="@CFLAGS@"
+ uuid_ldflags="@LDFLAGS@"
+ uuid_libs="@LIBS@"
+ uuid_version="@SA_VERSION_STR@"
+ 
+ help=no
+ version=no
+ 
+ usage="uuid-config"
+ usage="$usage [--help] [--version] [--all]"
+ usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
+ usage="$usage [--cflags] [--ldflags] [--libs]"
+ if [ $# -eq 0 ]; then
+     echo "uuid-config:Error: Invalid option" 1>&2
+     echo "uuid-config:Usage: $usage" 1>&2
+     exit 1
+ fi
+ output=''
+ output_extra=''
+ all=no
+ prev=''
+ OIFS="$IFS" IFS="$DIFS"
+ for option
+ do
+     if [ ".$prev" != . ]; then
+         eval "$prev=\$option"
+         prev=''
+         continue
+     fi
+     case "$option" in
+         -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+            *) optarg='' ;;
+     esac
+     case "$option" in
+         --help|-h)
+             echo "Usage: $usage"
+             exit 0
+             ;;
+         --version|-v)
+             echo "OSSP sa $uuid_version"
+             exit 0
+             ;;
+         --all)
+             all=yes
+             ;;
+         --prefix)
+             output="$output $uuid_prefix"
+             ;;
+         --exec-prefix)
+             output="$output $uuid_exec_prefix"
+             ;;
+         --bindir)
+             output="$output $uuid_bindir"
+             ;;
+         --libdir)
+             output="$output $uuid_libdir"
+             ;;
+         --includedir)
+             output="$output $uuid_includedir"
+             ;;
+         --mandir)
+             output="$output $uuid_mandir"
+             ;;
+         --datadir)
+             output="$output $uuid_datadir"
+             ;;
+         --acdir)
+             output="$output $uuid_acdir"
+             ;;
+         --cflags)
+             output="$output -I$uuid_includedir"
+             output_extra="$output_extra $uuid_cflags"
+             ;;
+         --ldflags)
+             output="$output -L$uuid_libdir"
+             output_extra="$output_extra $uuid_ldflags"
+             ;;
+         --libs)
+             output="$output -luuid"
+             output_extra="$output_extra $uuid_libs"
+             ;;
+         * )
+             echo "uuid-config:Error: Invalid option" 1>&2
+             echo "uuid-config:Usage: $usage" 1>&2
+             exit 1;
+             ;;
+     esac
+ done
+ IFS="$OIFS"
+ if [ ".$prev" != . ]; then
+     echo "uuid-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
+     exit 1
+ fi
+ if [ ".$output" != . ]; then
+     if [ ".$all" = .yes ]; then
+         output="$output $output_extra"
+     fi
+     echo $output
+ fi
+ 


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

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,92 ----
+ dnl ##
+ dnl ##  OSSP uuid - Universally Unique Identifier
+ dnl ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ dnl ##
+ dnl ##  This file is part of OSSP uuid, a library for the generation
+ dnl ##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ 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 ##  uuid.ac: UUID specific Autoconf checks
+ dnl ##
+ 
+ dnl #   Check for an ANSI C typedef in a header
+ dnl #   configure.in:
+ dnl #     SA_CHECK_TYPEDEF(<typedef>, <header>)
+ dnl #   acconfig.h:
+ dnl #     #undef HAVE_<typedef>
+ 
+ AC_DEFUN(SA_CHECK_TYPEDEF,[dnl
+     AC_REQUIRE([AC_HEADER_STDC])dnl
+     AC_MSG_CHECKING(for typedef $1)
+     AC_CACHE_VAL(ac_cv_typedef_$1,[
+         AC_EGREP_CPP(dnl
+ changequote(<<,>>)dnl
+ <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
+ changequote([,]), [
+ #include <$2>],
+             ac_cv_typedef_$1=yes,
+             ac_cv_typedef_$1=no
+         )
+     ])dnl
+     AC_MSG_RESULT($ac_cv_typedef_$1)
+     if test $ac_cv_typedef_$1 = yes; then
+         AC_DEFINE(HAVE_[]translit($1, [a-z], [A-Z]), 1, [Define to 1 if $1 exists])
+     fi
+ ])
+ 
+ dnl #   Check for anything OSSP uuid wants to know
+ dnl #   configure.in:
+ dnl #     UUID_CHECK_ALL
+ 
+ AC_DEFUN(UUID_CHECK_ALL,[
+     dnl #   make sure libnsl and libsocket are linked in if they exist
+     AC_CHECK_LIB(nsl, gethostname)
+     if test ".`echo $LIBS | grep nsl`" = .; then
+         AC_CHECK_LIB(nsl, gethostbyname)
+     fi
+     AC_CHECK_LIB(socket, accept)
+ 
+     dnl #   make sure some platforms find their IPv6 library
+     AC_CHECK_LIB(inet6, getaddrinfo)
+ 
+     dnl #   check for system headers
+     AC_CHECK_HEADERS(string.h sys/types.h sys/socket.h netdb.h netinet/in.h)
+ 
+     dnl #   check for system functions
+     AC_CHECK_FUNCS(getaddrinfo)
+ 
+     dnl #   check size of built-in types
+     AC_CHECK_SIZEOF(char, 1)
+     AC_CHECK_SIZEOF(unsigned char, 1)
+     AC_CHECK_SIZEOF(short, 2)
+     AC_CHECK_SIZEOF(unsigned short, 2)
+     AC_CHECK_SIZEOF(int, 4)
+     AC_CHECK_SIZEOF(unsigned int, 4)
+     AC_CHECK_SIZEOF(long, 4)
+     AC_CHECK_SIZEOF(unsigned long, 4)
+     AC_CHECK_SIZEOF(long long, 8)
+     AC_CHECK_SIZEOF(unsigned long long, 8)
+ 
+     dnl #   check for network/socket size type
+     SA_CHECK_TYPEDEF(socklen_t, sys/socket.h)
+     SA_CHECK_TYPEDEF(ssize_t, sys/types.h)
+ ])
+ 


ossp-pkg/uuid/uuid.c -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,211 ----
+ /*
+ **  OSSP uuid - Universally Unique Identifier
+ **  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ **
+ **  This file is part of OSSP uuid, a library for the generation
+ **  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ **
+ **  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.
+ **
+ **  uuid.c: library API implementation
+ */
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ 
+ #include "config.h"
+ #include "uuid.h"
+ 
+ /* determine types of 8-bit size */
+ #if SIZEOF_CHAR == 1
+ typedef char uuid_int8_t;
+ #else
+ #error uexpected: sizeof(char) != 1 !?
+ #endif
+ #if SIZEOF_UNSIGNED_CHAR == 1
+ typedef unsigned char uuid_uint8_t;
+ #else
+ #error uexpected: sizeof(unsigned char) != 1 !?
+ #endif
+ 
+ /* determine types of 16-bit size */
+ #if SIZEOF_SHORT == 2
+ typedef short uuid_int16_t;
+ #elif SIZEOF_INT == 2
+ typedef int uuid_int16_t;
+ #elif SIZEOF_LONG == 2
+ typedef long uuid_int16_t;
+ #else
+ #error unexpected: no type found for uuid_int16_t
+ #endif
+ #if SIZEOF_UNSIGNED_SHORT == 2
+ typedef unsigned short uuid_uint16_t;
+ #elif SIZEOF_UNSIGNED_INT == 2
+ typedef unsigned int uuid_uint16_t;
+ #elif SIZEOF_UNSIGNED_LONG == 2
+ typedef unsigned long uuid_uint16_t;
+ #else
+ #error unexpected: no type found for uuid_uint16_t
+ #endif
+ 
+ /* determine types of 32-bit size */
+ #if SIZEOF_SHORT == 4
+ typedef short uuid_int32_t;
+ #elif SIZEOF_INT == 4
+ typedef int uuid_int32_t;
+ #elif SIZEOF_LONG == 4
+ typedef long uuid_int32_t;
+ #elif SIZEOF_LONG_LONG == 4
+ typedef long long uuid_int32_t;
+ #else
+ #error unexpected: no type found for uuid_int32_t
+ #endif
+ #if SIZEOF_UNSIGNED_SHORT == 4
+ typedef unsigned short uuid_uint32_t;
+ #elif SIZEOF_UNSIGNED_INT == 4
+ typedef unsigned int uuid_uint32_t;
+ #elif SIZEOF_UNSIGNED_LONG == 4
+ typedef unsigned long uuid_uint32_t;
+ #elif SIZEOF_UNSIGNED_LONG_LONG == 4
+ typedef unsigned long long uuid_uint32_t;
+ #else
+ #error unexpected: no type found for uuid_uint32_t
+ #endif
+ 
+ /* private data type declaration */
+ struct uuid_st {
+     uuid_uint32_t   time_low;
+     uuid_uint16_t   time_mid;
+     uuid_uint16_t   time_hi_and_version;
+     uuid_uint8_t    clock_seq_hi_and_reserved;
+     uuid_uint8_t    clock_seq_low;
+     uuid_uint8_t    node[6];
+ };
+ 
+ uuid_rc_t uuid_create(uuid_t **uuid)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     if ((*uuid = (uuid_t *)malloc(sizeof(uuid_t))) == NULL)
+         return UUID_RC_MEM;
+     uuid_null(*uuid);
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_destroy(uuid_t *uuid)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     free(uuid);
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_null(uuid_t *uuid)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     memset(uuid, '\0', sizeof(uuid_t));
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_generate(uuid_t *uuid)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_compare(uuid_t *uuid, uuid_t *uuid2, int *result)
+ {
+     if (uuid == NULL || uuid2 == NULL || result == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_isnull(uuid_t *uuid, int *result)
+ {
+     if (uuid == NULL || result == NULL)
+         return UUID_RC_ARG;
+     *result = 0;
+     if (   uuid->time_low == 0
+         && uuid->time_mid == 0
+         && uuid->time_hi_and_version == 0
+         && uuid->clock_seq_hi_and_reserved == 0
+         && uuid->clock_seq_low == 0
+         && uuid->node[0] == 0
+         && uuid->node[1] == 0
+         && uuid->node[2] == 0
+         && uuid->node[3] == 0
+         && uuid->node[4] == 0
+         && uuid->node[5] == 0)
+         *result = 1;
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_parse(uuid_t *uuid, const char *str)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_format(uuid_t *uuid, char **str)
+ {
+     if (uuid == NULL || str == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_read(uuid_t *uuid, const void *buf)
+ {
+     if (uuid == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ uuid_rc_t uuid_write(uuid_t *uuid, void **buf)
+ {
+     if (uuid == NULL || buf == NULL)
+         return UUID_RC_ARG;
+     /* FIXME */
+     return UUID_RC_OK;
+ }
+ 
+ char *uuid_error(uuid_rc_t rc)
+ {
+     char *str;
+ 
+     switch (rc) {
+         case UUID_RC_OK:  str = "everything ok";    break;
+         case UUID_RC_ARG: str = "invalid argument"; break;
+         case UUID_RC_MEM: str = "out of memory";    break;
+         case UUID_RC_SYS: str = "system error";     break;
+         default:          str = NULL;               break;
+     }
+     return str;
+ }
+ 


ossp-pkg/uuid/uuid.h -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,112 ----
+ /*
+ **  OSSP uuid - Universally Unique Identifier
+ **  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ **
+ **  This file is part of OSSP uuid, a library for the generation
+ **  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ **
+ **  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.
+ **
+ **  uuid.h: library API definition
+ */
+ 
+ #ifndef __UUID_H__
+ #define __UUID_H__
+ 
+ /*
+  *  UUID Binary Representation:
+  *
+  *  0                   1                   2                   3
+  *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+  *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  * 0|                          time_low                             |
+  *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  * 1|       time_mid                |         time_hi_and_version   |
+  *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  * 2|clk_seq_hi_res |  clk_seq_low  |         node (0-1)            |
+  *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  * 3|                         node (2-5)                            |
+  *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+  *
+  *  UUID ASCII String Representation:
+  *
+  *  uuid                   = <time_low> "-" <time_mid> "-"
+  *                           <time_high_and_version> "-"
+  *                           <clock_seq_and_reserved>
+  *                           <clock_seq_low> "-" <node>
+  *  time_low               = 4*<hexOctet>
+  *  time_mid               = 2*<hexOctet>
+  *  time_high_and_version  = 2*<hexOctet>
+  *  clock_seq_and_reserved = <hexOctet>
+  *  clock_seq_low          = <hexOctet>
+  *  node                   = 6*<hexOctet>
+  *  hexOctet               = <hexDigit> <hexDigit>
+  *  hexDigit =               "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
+  *                          |"a"|"b"|"c"|"d"|"e"|"f"
+  *                          |"A"|"B"|"C"|"D"|"E"|"F"
+  *
+  *  Example string representation of a UUID:
+  *
+  *  "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
+  */
+ 
+ /* encoding lengths */
+ #define UUID_LEN_BIN_BIT 128
+ #define UUID_LEN_BIN_CHR (UUID_LEN_BIN_BIT / 8 /*bytes*/)
+ #define UUID_LEN_STR_CHR (UUID_LEN_BIN_BIT / 4 /*nibbles*/ + 4 /*hyphens*/ + 1 /*nul*/)
+ #define UUID_LEN_STR_BIT (UUID_LEN_STR_CHR * 8)
+ 
+ /* return codes */
+ typedef enum {
+     UUID_RC_OK  = 0,
+     UUID_RC_ARG = 1,
+     UUID_RC_MEM = 2,
+     UUID_RC_SYS = 3
+ } uuid_rc_t;
+ 
+ /* abstract data type */
+ struct uuid_st;
+ typedef struct uuid_st uuid_t;
+ 
+ /* object handling */
+ extern uuid_rc_t  uuid_create   (uuid_t **uuid);
+ extern uuid_rc_t  uuid_destroy  (uuid_t  *uuid);
+ extern uuid_rc_t  uuid_null     (uuid_t  *uuid);
+ 
+ /* UUID comparison */
+ extern uuid_rc_t  uuid_compare  (uuid_t  *uuid, uuid_t *uuid2, int *result);
+ extern uuid_rc_t  uuid_isnull   (uuid_t  *uuid,                int *result);
+ 
+ /* UUID generation */
+ extern uuid_rc_t  uuid_generate (uuid_t  *uuid);
+ 
+ /* string representation handling */
+ extern uuid_rc_t  uuid_parse    (uuid_t  *uuid, const char  *str);
+ extern uuid_rc_t  uuid_format   (uuid_t  *uuid,       char **str);
+ 
+ /* binary representation handling */
+ extern uuid_rc_t  uuid_read     (uuid_t  *uuid, const void  *buf);
+ extern uuid_rc_t  uuid_write    (uuid_t  *uuid,       void **buf);
+ 
+ /* error handling */
+ extern char      *uuid_error    (uuid_rc_t rc);
+ 
+ #endif /* __UUID_H__ */
+ 


ossp-pkg/uuid/uuid_cli.c -> 1.1

*** /dev/null    Wed May  1 14:04:35 2024
--- -    Wed May  1 14:05:02 2024
***************
*** 0 ****
--- 1,165 ----
+ /*
+ **  OSSP uuid - Universally Unique Identifier
+ **  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ **  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ **
+ **  This file is part of OSSP uuid, a library for the generation
+ **  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ **
+ **  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.
+ **
+ **  uuid_cli.c: command line tool
+ */
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+ 
+ #include "uuid.h"
+ 
+ /* error handler */
+ static void
+ error(int ec, const char *str, ...)
+ {
+     va_list ap;
+ 
+     va_start(ap, str);
+     fprintf(stderr, "uuid:ERROR: ");
+     vfprintf(stderr, str, ap);
+     fprintf(stderr, "\n");
+     va_end(ap);
+     exit(ec);
+ }
+ 
+ /* usage handler */
+ static void
+ usage(void)
+ {
+     fprintf(stderr, "usage: uuid [-1] [-n count] [-a] [-d] [-o filename] [UUID]\n");
+     exit(1);
+ }
+ 
+ /* main procedure */
+ int main(int argc, char *argv[])
+ {
+     uuid_t *uuid;
+     uuid_rc_t rc;
+     FILE *fp;
+     char *p;
+     int ch;
+     int count;
+     int i;
+     int iterate;
+     int ascii;
+     int decode;
+     char *cp;
+     void *vp;
+ 
+     /* command line parsing */
+     count = -1;     /* no count yet */
+     fp = stdout;    /* default output file */
+     iterate = 0;    /* not one at a time */
+     ascii = 0;      /* default is binary output */
+     decode = 0;     /* default is to encode */
+     while ((ch = getopt(argc, argv, "1n:ado:")) != -1) {
+         switch (ch) {
+             case '1':
+                 iterate = 1;
+                 break;
+             case 'n':
+                 if (count > 0)
+                     usage();
+                 count = strtol(optarg, &p, 10);
+                 if (*p != 0 || count < 1)
+                     usage();
+                 break;
+             case 'a':
+                 ascii = 1;
+                 break;
+             case 'd':
+                 decode = 1;
+                 break;
+             case 'o':
+                 if (fp != stdout)
+                     error(1, "multiple output files are not allowed");
+                 if ((fp = fopen(optarg, "w")) == NULL)
+                     error(1, "fopen: %s", strerror(errno));
+                 break;
+             default:
+                 usage();
+         }
+     }
+     argv += optind;
+     argc -= optind;
+     if (count == -1)
+         count = 1;
+ 
+     if (decode) {
+         /* decoding */
+         if (argc != 1)
+             usage();
+         /* FIXME */
+     }
+     else {
+         /* encoding */
+         if (argc < 0 || argc > 1)
+             usage();
+         if ((rc = uuid_create(&uuid)) != UUID_RC_OK)
+             error(1, "uuid_create: %s", uuid_error(rc));
+         if (argc == 1) {
+             /* load initial UUID for setting old generator state */
+             if ((rc = uuid_parse(uuid, argv[0])) != UUID_RC_OK)
+                 error(1, "uuid_parse: %s", uuid_error(rc));
+         }
+         for (i = 0; i < count; i++) {
+             if (iterate) {
+                 if ((rc = uuid_null(uuid)) != UUID_RC_OK)
+                     error(1, "uuid_null: %s", uuid_error(rc));
+             }
+             if ((rc = uuid_generate(uuid)) != UUID_RC_OK)
+                 error(1, "uuid_generate: %s", uuid_error(rc));
+             if (ascii) {
+                 cp = NULL;
+                 if ((rc = uuid_format(uuid, &cp)) != UUID_RC_OK)
+                     error(1, "uuid_format: %s", uuid_error(rc));
+                 fprintf(fp, "%s\n", cp);
+                 free(cp);
+             }
+             else {
+                 vp = NULL;
+                 if ((rc = uuid_write(uuid, &vp)) != UUID_RC_OK)
+                     error(1, "uuid_format: %s", uuid_error(rc));
+                 fwrite(vp, UUID_LEN_BIN_CHR, 1, fp);
+                 free(vp);
+             }
+         }
+         if ((rc = uuid_destroy(uuid)) != UUID_RC_OK)
+             error(1, "uuid_destroy: %s", uuid_error(rc));
+     }
+ 
+     /* close output channel */
+     if (fp != stdout)
+         fclose(fp);
+ 
+     return 0;
+ }
+ 


CVSTrac 2.0.1