Compare commits

..

14 Commits

Author SHA1 Message Date
Laurence Withers 82aa0f2f20 Bump version 2015-06-12 11:01:21 +01:00
Laurence Withers 2e610c4db3 Add 2015-06-30 leap second to built-in table 2015-06-12 10:55:53 +01:00
Laurence Withers dd3fe182af Update build system (Doxyfile) 2015-06-12 10:53:31 +01:00
Laurence Withers 0d5c2078b3 Bump version 2013-04-05 09:35:19 +00:00
Laurence Withers 6b25293f35 Fix build system ordering
Make sure that the library is built before either of the isodate or setisodate
apps, otherwise we end up with problems compiling from scratch.
2013-04-05 09:32:22 +00:00
Laurence Withers dcb15f2081 Bump version 2012-01-07 17:42:57 +00:00
Laurence Withers 4c470ec1e9 Bump version 2012-01-07 17:42:57 +00:00
Laurence Withers ba81c458e1 Update for 2012-06-30 leap second 2012-01-07 17:42:44 +00:00
Laurence Withers 49536349f7 Bump version 2011-11-18 12:19:09 +00:00
Laurence Withers c7b38eab5a Bump version 2011-11-18 12:19:09 +00:00
Laurence Withers c198eaf34b Remove accidental variable definition 2011-11-16 12:04:15 +00:00
Laurence Withers b622223b64 Remove unneeded nonnull attribute 2011-11-16 09:58:21 +00:00
Laurence Withers 81df4e8a05 Add C++ extern C include guards 2011-11-15 16:49:46 +00:00
Laurence Withers 7a5f30bfcd Update build system 2011-11-15 16:49:46 +00:00
28 changed files with 2323 additions and 183 deletions

View File

@ -292,5 +292,4 @@ done
exit 0
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4

View File

@ -1,9 +1,9 @@
#!/bin/bash
# libiso8601/test.sh
#
# (c)2009, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
# Copyright: ©20092011, Güralp Systems Ltd.
# Author: Laurence Withers <lwithers@guralp.com>
# License: GPLv3
#
# Running this script on its own will display a summary of all the
@ -21,7 +21,7 @@ run_test() {
return 1
fi
LD_LIBRARY_PATH="obj" "${EXE}" "$@" || return 1
LD_LIBRARY_PATH="obj:${LD_LIBRARY_PATH}" "${EXE}" "$@" || return 1
return 0
}
@ -36,11 +36,12 @@ print_tests() {
[ -x "${EXE}" ] || continue
NAME="$(echo "${EXE}" | sed 's,obj/tests/,,')"
echo -ne "${NAME}\t"
LD_LIBRARY_PATH="obj" "${EXE}" --print-summary
LD_LIBRARY_PATH="obj:${LD_LIBRARY_PATH}" "${EXE}" --print-summary
done
}
# Main script
if [ $# -eq 0 ]
then
@ -48,7 +49,6 @@ then
exit 0
fi
run_test $*
run_test "$@"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4

1
scripts/.gitignore vendored
View File

@ -7,6 +7,7 @@ build.docs.none
build.files.none
build.firmware.gpasm
build.firmware.sdcc
build.header.c
build.lib.c
build.lib.c++
build.make.none

View File

@ -1,8 +1,8 @@
# libiso8601/scripts/functions.sh
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
# Copyright: ©20072011, Güralp Systems Ltd.
# Author: Laurence Withers, <lwithers@guralp.com>
# License: GPLv3
#
# Common functions
@ -63,5 +63,4 @@ do_cmd_redir() {
fi
}
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4

View File

@ -1,8 +1,8 @@
# libiso8601/scripts/paths
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
# Copyright: ©2011, Güralp Systems Ltd.
# Author: Laurence Withers, <lwithers@guralp.com>
# License: GPLv3
#
# Default path setup. Not meant for editing; use environment variables
# to override values if needed.
@ -60,5 +60,4 @@ fi
[ -z "${WEBDIR}" ] && WEBDIR="${SRVDIR}/http"
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

File diff suppressed because it is too large Load Diff

View File

@ -39,5 +39,4 @@ then
docs_BUILT=1
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -17,5 +17,4 @@ do
done
print_success "Documentation installed"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -8,7 +8,8 @@ build_target libiso8601
if [ -z ${isodate_BUILT} ]
then
isodate="obj/isodate"
EXTRAS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}"
EXTRAS="-std=gnu99 -D_GNU_SOURCE -DAPP_NAME=\"isodate\" \
${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}"
echo "Building application ${isodate}..."
@ -39,5 +40,4 @@ then
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -8,5 +8,4 @@ echo "Installing binaries into '${BINDIR}'"
install_file "${isodate}" "${BINDIR}" 0755 || return 1
print_success "Done"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -14,5 +14,4 @@ then
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}"
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -8,6 +8,10 @@
#ifndef HEADER_libiso8601
#define HEADER_libiso8601
#ifdef __cplusplus
extern "C" {
#endif
/* standard includes, or includes needed for type declarations */
#include <time.h>
#include <stdint.h>

View File

@ -39,6 +39,8 @@ leap_second_days_table[] = {
730119, /* 1998-12-31 */
732676, /* 2005-12-31 */
733772, /* 2008-12-31 */
735049, /* 2012-06-30 */
736144, /* 2015-06-30 */
};

View File

@ -58,7 +58,7 @@ enum iso8601_date_prec {
/*! \brief Year, week and weekday specified (week format). */
iso8601_prec_wday
}date_prec;
};
@ -87,7 +87,7 @@ enum iso8601_time_prec {
iso8601_prec_minfrac,
/*! \brief Display hour, minute, second and nanoseconds. */
iso8601_prec_secfrac
}time_prec;
};

View File

@ -26,11 +26,7 @@ understood by humans, and vice versa.
Returns non-0 if \a year is a leap year.
*/
int iso8601_isleap(int year)
#ifndef DOXYGEN
__attribute__((nonnull))
#endif
;
int iso8601_isleap(int year);

View File

@ -5,6 +5,10 @@
* http://www.gnu.org/copyleft/gpl.html for details.
*/
#ifdef __cplusplus
}
#endif
#endif
/* options for text editors

View File

@ -34,5 +34,4 @@ do_cmd_redir "${CONFFILE}" sed \
do_cmd chmod 0755 "${CONFFILE}"
print_success "Done"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -14,7 +14,9 @@ then
libiso8601="obj/${libiso8601_BASE}.so.${SOMAJOR}.${SOMICRO}"
libiso8601_DEP_CFLAGS=""
libiso8601_DEP_LIBS="-lrt"
SO_EXTRA="-std=gnu99 -D_GNU_SOURCE -DDEFAULT_LEAP_TABLE=\"${DEFAULT_LEAP_TABLE}\" ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} -lc"
SO_EXTRA="${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} -lc \
-D_GNU_SOURCE -std=gnu99 \
-DDEFAULT_LEAP_TABLE=\"${DEFAULT_LEAP_TABLE}\""
echo "Building library ${libiso8601}..."
@ -52,5 +54,4 @@ then
libiso8601_HEADER=${HDR}
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -17,5 +17,4 @@ then
libiso8601_MONOLITHIC=1
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${HDR}"
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -95,4 +95,3 @@ true
# vim: syntax=sh:expandtab:ts=4:sw=4
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;

View File

@ -1,8 +1,8 @@
# libiso8601/src/libiso8601/soversion
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
# Copyright: ©20072011, Güralp Systems Ltd.
# Author: Laurence Withers <lwithers@guralp.com>
# License: GPLv3
#
@ -12,4 +12,4 @@
SOMAJOR=1
# SOMICRO is bumped every time there is a binary-compatible release.
SOMICRO=8
SOMICRO=10

View File

@ -8,7 +8,8 @@ build_target libiso8601
if [ -z ${setisodate_BUILT} ]
then
setisodate="obj/setisodate"
EXTRAS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}"
EXTRAS="-std=gnu99 -D_GNU_SOURCE -DAPP_NAME=\"setisodate\" \
${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}"
echo "Building application ${setisodate}..."
@ -39,5 +40,4 @@ then
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -8,5 +8,4 @@ echo "Installing binaries into '${SBINDIR}'"
install_file "${setisodate}" "${SBINDIR}" 0755 || return 1
print_success "Done"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -14,5 +14,4 @@ then
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}"
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -1,3 +1 @@
source src/tests/build.tests
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -7,7 +7,7 @@ build_target libiso8601 || return 1
if [ -z ${tests_BUILT} ]
then
LIBS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} "
EXTRAS="-D_GNU_SOURCE"
EXTRAS="-lm"
echo "Building test programs..."
do_cmd mkdir -p obj/tests || return 1
@ -25,14 +25,9 @@ then
fi
done
case "${TEST}" in
obj/tests/manip) TEST_EXTRAS="-lm" ;;
*) TEST_EXTRAS="" ;;
esac
if [ ${MODIFIED} -ne 0 ]
then
do_cmd ${CC} -Iobj ${CFLAGS} -o ${TEST} ${SRC} ${LIBS} ${EXTRAS} ${TEST_EXTRAS} || return 1
do_cmd ${CC} -Iobj ${CFLAGS} -o ${TEST} ${SRC} ${LIBS} ${EXTRAS} || return 1
print_success "Built ${TEST}"
else
print_success "${TEST} is up to date"
@ -44,5 +39,4 @@ then
tests_BUILT=1
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -1,9 +1,9 @@
/* libiso8601/src/tests/???.c
/* libiso8601/src/tests/xxx.c
*
* (c)2007, Laurence Withers, <l@lwithers.me.uk>.
* Released under the GNU GPLv3. See file COPYING or
* http://www.gnu.org/copyleft/gpl.html for details.
*/
* Copyright: ©20072011, Güralp Systems Ltd.
* Author: Laurence Withers <lwithers@guralp.com>
* License: GPLv3
*/
#include "iso8601.h"
@ -12,7 +12,8 @@
int main(int argc, char* argv[])
int
main(int argc, char* argv[])
{
int ret = 0;
@ -30,7 +31,8 @@ int main(int argc, char* argv[])
return ret;
}
/* options for text editors
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
vim: expandtab:ts=4:sw=4
*/

View File

@ -1,8 +1,8 @@
# libiso8601/version
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
# Copyright: ©20072011, Güralp Systems Ltd.
# Author: Laurence Withers <lwithers@guralp.com>
# License: GPLv3
#
@ -11,7 +11,6 @@
# expected to be in 'major.minor.micro' format.
VERMAJOR=0
VERMINOR=3
VERMICRO=11
VERMICRO=15
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4:syntax=sh