MFH: r281855-r282312
Sponsored by: The FreeBSD Foundation
This commit is contained in:
commit
de7df74b48
@ -1,4 +1,5 @@
|
||||
{
|
||||
"project.name": "S",
|
||||
"phabricator.uri" : "https://reviews.freebsd.org/"
|
||||
"phabricator.uri" : "https://reviews.freebsd.org/",
|
||||
"history.immutable" : true
|
||||
}
|
||||
|
10
Makefile
10
Makefile
@ -373,19 +373,19 @@ kernel-toolchains:
|
||||
# existing system is.
|
||||
#
|
||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
||||
TARGETS?=amd64 arm i386 mips pc98 powerpc sparc64
|
||||
# XXX Add arm64 to universe only if we have an external binutils installed.
|
||||
# It does not build with the in-tree linnker.
|
||||
# It does not build with the in-tree linker.
|
||||
.if exists(/usr/local/aarch64-freebsd/bin/ld)
|
||||
TARGETS+=arm64
|
||||
TARGET_ARCHES_arm64?= aarch64
|
||||
.else
|
||||
UNIVERSE_arm64=arm64
|
||||
.elif empty(${TARGETS})
|
||||
universe: universe_arm64_skip
|
||||
universe_epilogue: universe_arm64_skip
|
||||
universe_arm64_skip: universe_prologue
|
||||
@echo ">> arm64 skipped - install aarch64-binutils port or package to build"
|
||||
.endif
|
||||
TARGETS?=amd64 arm ${UNIVERSE_arm64} i386 mips pc98 powerpc sparc64
|
||||
TARGET_ARCHES_arm?= arm armeb armv6 armv6hf
|
||||
TARGET_ARCHES_arm64?= aarch64
|
||||
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32
|
||||
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
||||
TARGET_ARCHES_pc98?= i386
|
||||
|
@ -1522,7 +1522,8 @@ cross-tools: .MAKE
|
||||
|
||||
NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
VERSION="${VERSION}"
|
||||
VERSION="${VERSION}" \
|
||||
PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin
|
||||
NXBMAKE= ${NXBENV} ${MAKE} \
|
||||
TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \
|
||||
CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \
|
||||
@ -1535,7 +1536,21 @@ NXBMAKE= ${NXBENV} ${MAKE} \
|
||||
MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
|
||||
MK_LLDB=no
|
||||
|
||||
# native-xtools is the current target for qemu-user cross builds of ports
|
||||
# via poudriere and the imgact_binmisc kernel module.
|
||||
# For non-clang enabled targets that are still using the in tree gcc
|
||||
# we must build a gperf binary for one instance of its Makefiles. On
|
||||
# clang-enabled systems, the gperf binary is obsolete.
|
||||
native-xtools: .MAKE
|
||||
.if ${MK_GCC_BOOTSTRAP} != "no"
|
||||
mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
|
||||
${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \
|
||||
cd ${.CURDIR}/${_gperf} && \
|
||||
${NXBMAKE} DIRPRFX=${_gperf}/ obj && \
|
||||
${NXBMAKE} DIRPRFX=${_gperf}/ depend && \
|
||||
${NXBMAKE} DIRPRFX=${_gperf}/ all && \
|
||||
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
|
||||
.endif
|
||||
mkdir -p ${OBJTREE}/nxb-bin/bin
|
||||
mkdir -p ${OBJTREE}/nxb-bin/sbin
|
||||
mkdir -p ${OBJTREE}/nxb-bin/usr
|
||||
|
@ -38,6 +38,69 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20150501: Remove the nvlist_.*[vf] functions manpages.
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addf_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_addv_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsf_type.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_existsv_type.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freef_type.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_null.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_freev_type.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getf_string.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_binary.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_bool.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_descriptor.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_number.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_nvlist.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/nvlist_getv_string.3.gz
|
||||
# 20150429:
|
||||
OLD_FILES+=usr/share/docs/papers/hwpmc.ascii.gz
|
||||
# 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test
|
||||
OLD_FILES+=usr/tests/sys/kern/mmap_test
|
||||
# 20150418
|
||||
OLD_FILES+=sbin/mount_oldnfs
|
||||
OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz
|
||||
@ -56,18 +119,6 @@ OLD_FILES+=usr/include/altq/altq_rmclass.h
|
||||
OLD_FILES+=usr/include/altq/altq_cbq.h
|
||||
OLD_FILES+=usr/include/altq/altq_rio.h
|
||||
OLD_DIRS+=usr/include/altq
|
||||
# 20150410
|
||||
OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz
|
||||
OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz
|
||||
OLD_DIRS+=usr/share/doc/usd/10.exref
|
||||
OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz
|
||||
OLD_DIRS+=usr/share/doc/usd/11.edit
|
||||
OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz
|
||||
OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz
|
||||
OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz
|
||||
OLD_DIRS+=usr/share/doc/usd/12.vi
|
||||
OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz
|
||||
OLD_DIRS+=usr/share/doc/usd/13.viref
|
||||
# 20150329
|
||||
.if ${TARGET_ARCH} == "arm"
|
||||
OLD_FILES+=usr/include/bootconfig.h
|
||||
@ -353,6 +404,10 @@ OLD_FILES+=usr/lib/debug/usr/lib32/i18n
|
||||
OLD_FILES+=usr/lib/debug/usr/lib32/private
|
||||
# 20141015: OpenSSL 1.0.1j import
|
||||
OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz
|
||||
.if ${MK_GCC} == "no"
|
||||
# 20141009: gperf disabled by default
|
||||
OLD_FILES+=usr/bin/gperf
|
||||
.endif
|
||||
# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
|
||||
OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz
|
||||
|
4
UPDATING
4
UPDATING
@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
disable the most expensive debugging functionality run
|
||||
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||
|
||||
20150423:
|
||||
chmod, chflags, chown and chgrp now affect symlinks in -R mode as
|
||||
defined in symlink(7); previously symlinks were silently ignored.
|
||||
|
||||
20150415:
|
||||
The const qualifier has been removed from iconv(3) to comply with
|
||||
POSIX. The ports tree is aware of this from r384038 onwards.
|
||||
|
@ -32,7 +32,7 @@
|
||||
.\" @(#)chflags.1 8.4 (Berkeley) 5/2/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 8, 2013
|
||||
.Dd April 20, 2015
|
||||
.Dt CHFLAGS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -66,8 +66,9 @@ nor modify the exit status to reflect such failures.
|
||||
.It Fl H
|
||||
If the
|
||||
.Fl R
|
||||
option is specified, symbolic links on the command line are followed.
|
||||
(Symbolic links encountered in the tree traversal are not followed.)
|
||||
option is specified, symbolic links on the command line are followed
|
||||
and hence unaffected by the command.
|
||||
(Symbolic links encountered during traversal are not followed.)
|
||||
.It Fl h
|
||||
If the
|
||||
.Ar file
|
||||
@ -83,8 +84,12 @@ If the
|
||||
option is specified, no symbolic links are followed.
|
||||
This is the default.
|
||||
.It Fl R
|
||||
Change the file flags for the file hierarchies rooted
|
||||
in the files instead of just the files themselves.
|
||||
Change the file flags of the file hierarchies rooted in the files,
|
||||
instead of just the files themselves.
|
||||
Beware of unintentionally matching the
|
||||
.Dq Pa ".."
|
||||
hard link to the parent directory when using wildcards like
|
||||
.Dq Li ".*" .
|
||||
.It Fl v
|
||||
Cause
|
||||
.Nm
|
||||
|
@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -65,7 +66,6 @@ main(int argc, char *argv[])
|
||||
int Hflag, Lflag, Rflag, fflag, hflag, vflag;
|
||||
int ch, fts_options, oct, rval;
|
||||
char *flags, *ep;
|
||||
int (*change_flags)(const char *, unsigned long);
|
||||
|
||||
Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRfhv")) != -1)
|
||||
@ -104,20 +104,23 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
|
||||
if (Rflag) {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
if (hflag)
|
||||
errx(1, "the -R and -h options "
|
||||
"may not be specified together");
|
||||
if (Hflag)
|
||||
fts_options |= FTS_COMFOLLOW;
|
||||
errx(1, "the -R and -h options may not be "
|
||||
"specified together.");
|
||||
if (Lflag) {
|
||||
fts_options &= ~FTS_PHYSICAL;
|
||||
fts_options |= FTS_LOGICAL;
|
||||
}
|
||||
} else
|
||||
fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
|
||||
fts_options = FTS_LOGICAL;
|
||||
} else {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
|
||||
change_flags = hflag ? lchflags : chflags;
|
||||
if (Hflag) {
|
||||
fts_options |= FTS_COMFOLLOW;
|
||||
}
|
||||
}
|
||||
} else if (hflag) {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
} else {
|
||||
fts_options = FTS_LOGICAL;
|
||||
}
|
||||
|
||||
flags = *argv;
|
||||
if (*flags >= '0' && *flags <= '7') {
|
||||
@ -142,12 +145,21 @@ main(int argc, char *argv[])
|
||||
err(1, NULL);
|
||||
|
||||
for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
|
||||
int atflag;
|
||||
|
||||
if ((fts_options & FTS_LOGICAL) ||
|
||||
((fts_options & FTS_COMFOLLOW) &&
|
||||
p->fts_level == FTS_ROOTLEVEL))
|
||||
atflag = 0;
|
||||
else
|
||||
atflag = AT_SYMLINK_NOFOLLOW;
|
||||
|
||||
switch (p->fts_info) {
|
||||
case FTS_D: /* Change it at FTS_DP if we're recursive. */
|
||||
if (!Rflag)
|
||||
fts_set(ftsp, p, FTS_SKIP);
|
||||
continue;
|
||||
case FTS_DNR: /* Warn, chflag, continue. */
|
||||
case FTS_DNR: /* Warn, chflags. */
|
||||
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
|
||||
rval = 1;
|
||||
break;
|
||||
@ -156,16 +168,6 @@ main(int argc, char *argv[])
|
||||
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
|
||||
rval = 1;
|
||||
continue;
|
||||
case FTS_SL: /* Ignore. */
|
||||
case FTS_SLNONE:
|
||||
/*
|
||||
* The only symlinks that end up here are ones that
|
||||
* don't point to anything and ones that we found
|
||||
* doing a physical walk.
|
||||
*/
|
||||
if (!hflag)
|
||||
continue;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -175,7 +177,8 @@ main(int argc, char *argv[])
|
||||
newflags = (p->fts_statp->st_flags | set) & clear;
|
||||
if (newflags == p->fts_statp->st_flags)
|
||||
continue;
|
||||
if ((*change_flags)(p->fts_accpath, newflags) && !fflag) {
|
||||
if (chflagsat(AT_FDCWD, p->fts_accpath, newflags,
|
||||
atflag) == -1 && !fflag) {
|
||||
warn("%s", p->fts_path);
|
||||
rval = 1;
|
||||
} else if (vflag) {
|
||||
|
@ -32,7 +32,7 @@
|
||||
.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd January 26, 2009
|
||||
.Dd April 20, 2015
|
||||
.Dt CHMOD 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -63,9 +63,9 @@ nor modify the exit status to reflect such failures.
|
||||
.It Fl H
|
||||
If the
|
||||
.Fl R
|
||||
option is specified, symbolic links on the command line are followed.
|
||||
(Symbolic links encountered in the tree traversal are not followed by
|
||||
default.)
|
||||
option is specified, symbolic links on the command line are followed
|
||||
and hence unaffected by the command.
|
||||
(Symbolic links encountered during tree traversal are not followed.)
|
||||
.It Fl h
|
||||
If the file is a symbolic link, change the mode of the link itself
|
||||
rather than the file that the link points to.
|
||||
@ -79,8 +79,12 @@ If the
|
||||
option is specified, no symbolic links are followed.
|
||||
This is the default.
|
||||
.It Fl R
|
||||
Change the modes of the file hierarchies rooted in the files
|
||||
Change the modes of the file hierarchies rooted in the files,
|
||||
instead of just the files themselves.
|
||||
Beware of unintentionally matching the
|
||||
.Dq Pa ".."
|
||||
hard link to the parent directory when using wildcards like
|
||||
.Dq Li ".*" .
|
||||
.It Fl v
|
||||
Cause
|
||||
.Nm
|
||||
|
@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
@ -62,7 +63,7 @@ main(int argc, char *argv[])
|
||||
FTS *ftsp;
|
||||
FTSENT *p;
|
||||
mode_t *set;
|
||||
int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval;
|
||||
int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
|
||||
int vflag;
|
||||
char *mode;
|
||||
mode_t newmode;
|
||||
@ -126,18 +127,23 @@ done: argv += optind;
|
||||
usage();
|
||||
|
||||
if (Rflag) {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
if (hflag)
|
||||
errx(1,
|
||||
"the -R and -h options may not be specified together.");
|
||||
if (Hflag)
|
||||
fts_options |= FTS_COMFOLLOW;
|
||||
errx(1, "the -R and -h options may not be "
|
||||
"specified together.");
|
||||
if (Lflag) {
|
||||
fts_options &= ~FTS_PHYSICAL;
|
||||
fts_options |= FTS_LOGICAL;
|
||||
fts_options = FTS_LOGICAL;
|
||||
} else {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
|
||||
if (Hflag) {
|
||||
fts_options |= FTS_COMFOLLOW;
|
||||
}
|
||||
}
|
||||
} else
|
||||
fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
|
||||
} else if (hflag) {
|
||||
fts_options = FTS_PHYSICAL;
|
||||
} else {
|
||||
fts_options = FTS_LOGICAL;
|
||||
}
|
||||
|
||||
mode = *argv;
|
||||
if ((set = setmode(mode)) == NULL)
|
||||
@ -146,12 +152,21 @@ done: argv += optind;
|
||||
if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL)
|
||||
err(1, "fts_open");
|
||||
for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
|
||||
int atflag;
|
||||
|
||||
if ((fts_options & FTS_LOGICAL) ||
|
||||
((fts_options & FTS_COMFOLLOW) &&
|
||||
p->fts_level == FTS_ROOTLEVEL))
|
||||
atflag = 0;
|
||||
else
|
||||
atflag = AT_SYMLINK_NOFOLLOW;
|
||||
|
||||
switch (p->fts_info) {
|
||||
case FTS_D: /* Change it at FTS_DP. */
|
||||
if (!Rflag)
|
||||
fts_set(ftsp, p, FTS_SKIP);
|
||||
continue;
|
||||
case FTS_DNR: /* Warn, chmod, continue. */
|
||||
case FTS_DNR: /* Warn, chmod. */
|
||||
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
|
||||
rval = 1;
|
||||
break;
|
||||
@ -160,16 +175,6 @@ done: argv += optind;
|
||||
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
|
||||
rval = 1;
|
||||
continue;
|
||||
case FTS_SL: /* Ignore. */
|
||||
case FTS_SLNONE:
|
||||
/*
|
||||
* The only symlinks that end up here are ones that
|
||||
* don't point to anything and ones that we found
|
||||
* doing a physical walk.
|
||||
*/
|
||||
if (!hflag)
|
||||
continue;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -182,32 +187,25 @@ done: argv += optind;
|
||||
if (may_have_nfs4acl(p, hflag) == 0 &&
|
||||
(newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS))
|
||||
continue;
|
||||
if (hflag)
|
||||
error = lchmod(p->fts_accpath, newmode);
|
||||
else
|
||||
error = chmod(p->fts_accpath, newmode);
|
||||
if (error) {
|
||||
if (!fflag) {
|
||||
warn("%s", p->fts_path);
|
||||
rval = 1;
|
||||
}
|
||||
} else {
|
||||
if (vflag) {
|
||||
(void)printf("%s", p->fts_path);
|
||||
if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atflag) == -1
|
||||
&& !fflag) {
|
||||
warn("%s", p->fts_path);
|
||||
rval = 1;
|
||||
} else if (vflag) {
|
||||
(void)printf("%s", p->fts_path);
|
||||
|
||||
if (vflag > 1) {
|
||||
char m1[12], m2[12];
|
||||
if (vflag > 1) {
|
||||
char m1[12], m2[12];
|
||||
|
||||
strmode(p->fts_statp->st_mode, m1);
|
||||
strmode((p->fts_statp->st_mode &
|
||||
S_IFMT) | newmode, m2);
|
||||
(void)printf(": 0%o [%s] -> 0%o [%s]",
|
||||
p->fts_statp->st_mode, m1,
|
||||
(p->fts_statp->st_mode & S_IFMT) |
|
||||
newmode, m2);
|
||||
}
|
||||
(void)printf("\n");
|
||||
strmode(p->fts_statp->st_mode, m1);
|
||||
strmode((p->fts_statp->st_mode &
|
||||
S_IFMT) | newmode, m2);
|
||||
(void)printf(": 0%o [%s] -> 0%o [%s]",
|
||||
p->fts_statp->st_mode, m1,
|
||||
(p->fts_statp->st_mode & S_IFMT) |
|
||||
newmode, m2);
|
||||
}
|
||||
(void)printf("\n");
|
||||
}
|
||||
}
|
||||
if (errno)
|
||||
|
@ -738,7 +738,7 @@ It is an error if no substitutions are performed on any of the addressed
|
||||
lines.
|
||||
The current address is set the last line affected.
|
||||
.Pp
|
||||
.Ar Re
|
||||
.Ar \&Re
|
||||
and
|
||||
.Ar replacement
|
||||
may be delimited by any character other than space and newline
|
||||
|
@ -90,17 +90,17 @@ Return the evaluation of
|
||||
.Ar expr1
|
||||
if neither expression evaluates to an empty string or zero;
|
||||
otherwise, returns zero.
|
||||
.It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2
|
||||
.It Ar expr1 Bro =, >, >=, <, <=, != Brc Ar expr2
|
||||
Return the results of integer comparison if both arguments are integers;
|
||||
otherwise, returns the results of string comparison using the locale-specific
|
||||
collation sequence.
|
||||
The result of each comparison is 1 if the specified relation is true,
|
||||
or 0 if the relation is false.
|
||||
.It Ar expr1 Li "{+, -}" Ar expr2
|
||||
.It Ar expr1 Bro +, - Brc Ar expr2
|
||||
Return the results of addition or subtraction of integer-valued arguments.
|
||||
.It Ar expr1 Li "{*, /, %}" Ar expr2
|
||||
.It Ar expr1 Bro *, /, % Brc Ar expr2
|
||||
Return the results of multiplication, integer division, or remainder of integer-valued arguments.
|
||||
.It Ar expr1 Li : Ar expr2
|
||||
.It Ar expr1 Li \&: Ar expr2
|
||||
The
|
||||
.Dq Li \&:
|
||||
operator matches
|
||||
|
@ -1057,7 +1057,7 @@ waitforjob(struct job *jp, int *origstatus)
|
||||
CLEAR_PENDING_INT;
|
||||
}
|
||||
#if JOBS
|
||||
else if (rootshell && iflag && propagate_int &&
|
||||
else if (rootshell && propagate_int &&
|
||||
WIFSIGNALED(status) && WTERMSIG(status) == SIGINT)
|
||||
kill(getpid(), SIGINT);
|
||||
#endif
|
||||
|
@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent)
|
||||
{
|
||||
nvpair_t *elem = NULL;
|
||||
boolean_t bool_value;
|
||||
boolean_t *bool_array_value;
|
||||
nvlist_t *nvlist_value;
|
||||
nvlist_t **nvlist_array_value;
|
||||
uint_t i, count;
|
||||
@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent)
|
||||
NVP(elem, string, char *, char *, "'%s'");
|
||||
break;
|
||||
|
||||
case DATA_TYPE_BOOLEAN_ARRAY:
|
||||
(void) nvpair_value_boolean_array(elem,
|
||||
&bool_array_value, &count);
|
||||
for (i = 0; i < count; i++) {
|
||||
(void) printf("%*s%s[%d]: %s\n", indent, "",
|
||||
nvpair_name(elem), i,
|
||||
bool_array_value[i] ? "true" : "false");
|
||||
}
|
||||
break;
|
||||
|
||||
case DATA_TYPE_BYTE_ARRAY:
|
||||
NVPA(elem, byte_array, uchar_t, int, "%u");
|
||||
break;
|
||||
|
@ -241,3 +241,78 @@ translator tcpinfoh_t < struct tcphdr *p > {
|
||||
translator tcplsinfo_t < int s > {
|
||||
tcps_state = s;
|
||||
};
|
||||
|
||||
/*
|
||||
* Convert a SIFTR direction value to a string
|
||||
*/
|
||||
#pragma D binding "1.12.1" SIFTR_IN
|
||||
inline int SIFTR_IN = 1;
|
||||
#pragma D binding "1.12.1" SIFTR_OUT
|
||||
inline int SIFTR_OUT = 2;
|
||||
|
||||
/* SIFTR direction strings. */
|
||||
#pragma D binding "1.12.1" siftr_dir_string
|
||||
inline string siftr_dir_string[uint8_t direction] =
|
||||
direction == SIFTR_IN ? "in" :
|
||||
direction == SIFTR_OUT ? "out" :
|
||||
"unknown" ;
|
||||
|
||||
typedef struct siftrinfo {
|
||||
struct timeval tval;
|
||||
uint8_t direction;
|
||||
uint8_t ipver;
|
||||
uint32_t hash;
|
||||
uint16_t tcp_localport;
|
||||
uint16_t tcp_foreignport;
|
||||
uint64_t snd_cwnd;
|
||||
u_long snd_wnd;
|
||||
u_long rcv_wnd;
|
||||
u_long snd_bwnd;
|
||||
u_long snd_ssthresh;
|
||||
int conn_state;
|
||||
u_int max_seg_size;
|
||||
int smoothed_rtt;
|
||||
u_char sack_enabled;
|
||||
u_char snd_scale;
|
||||
u_char rcv_scale;
|
||||
u_int flags;
|
||||
int rxt_length;
|
||||
u_int snd_buf_hiwater;
|
||||
u_int snd_buf_cc;
|
||||
u_int rcv_buf_hiwater;
|
||||
u_int rcv_buf_cc;
|
||||
u_int sent_inflight_bytes;
|
||||
int t_segqlen;
|
||||
u_int flowid;
|
||||
u_int flowtype;
|
||||
} siftrinfo_t;
|
||||
|
||||
#pragma D binding "1.12.1" translator
|
||||
translator siftrinfo_t < struct pkt_node *p > {
|
||||
direction = p == NULL ? 0 : p->direction;
|
||||
ipver = p == NULL ? 0 : p->ipver;
|
||||
hash = p == NULL ? 0 : p->hash;
|
||||
tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport);
|
||||
tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport);
|
||||
snd_cwnd = p == NULL ? 0 : p->snd_cwnd;
|
||||
snd_wnd = p == NULL ? 0 : p->snd_wnd;
|
||||
rcv_wnd = p == NULL ? 0 : p->rcv_wnd;
|
||||
snd_bwnd = p == NULL ? 0 : p->snd_bwnd;
|
||||
snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh;
|
||||
conn_state = p == NULL ? 0 : p->conn_state;
|
||||
max_seg_size = p == NULL ? 0 : p->max_seg_size;
|
||||
smoothed_rtt = p == NULL ? 0 : p->smoothed_rtt;
|
||||
sack_enabled = p == NULL ? 0 : p->sack_enabled;
|
||||
snd_scale = p == NULL ? 0 : p->snd_scale;
|
||||
rcv_scale = p == NULL ? 0 : p->rcv_scale;
|
||||
flags = p == NULL ? 0 : p->flags;
|
||||
rxt_length = p == NULL ? 0 : p->rxt_length;
|
||||
snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater;
|
||||
snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc;
|
||||
rcv_buf_hiwater = p == NULL ? 0 : p->rcv_buf_hiwater;
|
||||
rcv_buf_cc = p == NULL ? 0 : p->rcv_buf_cc;
|
||||
sent_inflight_bytes = p == NULL ? 0 : p->sent_inflight_bytes;
|
||||
t_segqlen = p == NULL ? 0 : p->t_segqlen;
|
||||
flowid = p == NULL ? 0 : p->flowid;
|
||||
flowtype = p == NULL ? 0 : p->flowtype;
|
||||
};
|
||||
|
@ -1,6 +1,223 @@
|
||||
2007-07-19 Release Manager
|
||||
2010-05-22 Release Manager
|
||||
|
||||
* GCC 4.2.1 released.
|
||||
* GCC 4.3.5 released.
|
||||
|
||||
2010-05-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
PR other/43620
|
||||
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
|
||||
* configure: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.h.in: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
2009-08-19 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/41102
|
||||
omp_lib.h.in: Fix -std=f95 errors.
|
||||
|
||||
2009-08-14 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-12-26 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets.
|
||||
|
||||
2009-08-04 Release Manager
|
||||
|
||||
* GCC 4.3.4 released.
|
||||
|
||||
2009-01-24 Release Manager
|
||||
|
||||
* GCC 4.3.3 released.
|
||||
|
||||
2008-12-05 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-05-15 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
* testsuite/lib/libgomp.exp: Load new torture support.
|
||||
|
||||
2008-12-02 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
Backport from mainline:
|
||||
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR testsuite/28870
|
||||
* testsuite/lib/libgomp.exp: Include new timeout library files.
|
||||
(libgomp_target_compile): Set timeout value from new proc.
|
||||
|
||||
2008-08-27 Release Manager
|
||||
|
||||
* GCC 4.3.2 released.
|
||||
|
||||
2008-06-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36506
|
||||
* testsuite/libgomp.c/reduction-5.c: New test.
|
||||
|
||||
2008-06-06 Release Manager
|
||||
|
||||
* GCC 4.3.1 released.
|
||||
|
||||
2008-05-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/36308
|
||||
* testsuite/libgomp.c++/ctor-11.C: New test.
|
||||
* testsuite/libgomp.c++/ctor-12.C: New test.
|
||||
|
||||
2008-05-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/36106
|
||||
* testsuite/libgomp.c/atomic-5.c: New test.
|
||||
* testsuite/libgomp.c/atomic-6.c: New test.
|
||||
* testsuite/libgomp.c/autopar-1.c: New test.
|
||||
|
||||
2008-03-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35611
|
||||
* testsuite/libgomp.c/atomic-4.c: New test.
|
||||
|
||||
PR libgomp/35625
|
||||
* iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end.
|
||||
(gomp_iter_guided_next): Likewise.
|
||||
* testsuite/libgomp.c/pr35625.c: New test.
|
||||
|
||||
2008-03-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35185
|
||||
* testsuite/libgomp.c++/pr35185.C: New test.
|
||||
|
||||
2008-03-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35549
|
||||
* testsuite/libgomp.c/pr35549.c: New test.
|
||||
|
||||
2008-03-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-3.c: New test.
|
||||
|
||||
2008-03-05 Release Manager
|
||||
|
||||
* GCC 4.3.0 released.
|
||||
|
||||
2008-02-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/35196
|
||||
* testsuite/libgomp.c/pr35196.c: New test.
|
||||
|
||||
PR middle-end/35130
|
||||
* testsuite/libgomp.fortran/pr35130.f90: New test.
|
||||
* testsuite/libgomp.c/pr35130.c: New test.
|
||||
|
||||
2008-01-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/33880
|
||||
* testsuite/libgomp.c/pr33880.c: New test.
|
||||
* testsuite/libgomp.fortran/pr33880.f90: New test.
|
||||
|
||||
2008-01-24 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* configure.ac: Move futex checking into ../config/futex.m4.
|
||||
* configure: Rebuilt.
|
||||
* aclocal.m4: Rebuilt.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
* configure.tgt: Rename have_tls to gcc_cv_have_tls to match
|
||||
2007-10-15 ../config/tls.m4 change.
|
||||
|
||||
2007-12-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34513
|
||||
* testsuite/libgomp.c/pr34513.c: New test.
|
||||
* testsuite/libgomp.c++/pr34513.C: New test.
|
||||
|
||||
2007-12-17 Jack Howarth <howarth@bromo.med.uc.edu>
|
||||
|
||||
PR target/32765
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin.
|
||||
|
||||
2007-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes.
|
||||
|
||||
2007-12-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.c/private-1.c: New test.
|
||||
|
||||
2007-11-29 Andris Pavenis <andris.pavenis@iki.fi>
|
||||
Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* Makefile.am: Use space as vpath separator. Use 'vpath %'
|
||||
instead of 'VPATH ='.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-11-23 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* configure.ac: Adjust makeinfo version check.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/34020
|
||||
* testsuite/libgomp.fortran/pr34020.f90: New test.
|
||||
|
||||
2007-11-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33894
|
||||
* testsuite/libgomp.c++/atomic-1.C: New test.
|
||||
|
||||
2007-10-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/33275
|
||||
* testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
|
||||
Make x and y integers rather than (implicit) reals. Add private (j)
|
||||
clause to the last omp parallel.
|
||||
|
||||
2007-10-15 Maciej W. Rozycki <macro@linux-mips.org>
|
||||
|
||||
* configure: Regenerate following changes to ../config/tls.m4.
|
||||
|
||||
2007-09-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.fortran/stack.f90: New test.
|
||||
|
||||
2007-09-10 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* config/mingw32/proc.c: New file.
|
||||
|
||||
2007-09-05 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets.
|
||||
(main): Use __get_cpuid to get i386 target fetaures.
|
||||
* testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets.
|
||||
(main): Use __get_cpuid to get x86_64 target fetaures.
|
||||
|
||||
2007-08-15 Jack Howarth <howarth@bromo.med.uc.edu>
|
||||
|
||||
PR target/32765
|
||||
* testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin.
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: Likwise.
|
||||
|
||||
2007-07-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/32550
|
||||
* testsuite/libgomp.fortran/pr32550.f90: New test.
|
||||
* testsuite/libgomp.fortran/crayptr2.f90: New test.
|
||||
|
||||
2007-07-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* aclocal.m4: Regenerated.
|
||||
|
||||
2007-07-05 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/32359
|
||||
* testsuite/libgomp.fortran/pr32359.f90: New.
|
||||
|
||||
2007-07-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
@ -21,9 +238,117 @@
|
||||
* testsuite/libgomp.c/pr32362-2.c: New test.
|
||||
* testsuite/libgomp.c/pr32362-3.c: New test.
|
||||
|
||||
2007-05-13 Release Manager
|
||||
2007-06-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* GCC 4.2.0 released.
|
||||
* team.c (gomp_team_start): Fix setting up thread_attr
|
||||
stack size.
|
||||
|
||||
2007-06-02 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-05-23 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* testsuite/Makefile.in: Regenerate.
|
||||
|
||||
2007-05-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/linux/proc.c: New file.
|
||||
|
||||
PR libgomp/28482
|
||||
* configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
|
||||
|
||||
2007-04-19 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
* libgomp.texi (GOMP_CPU_AFFINITY): Updated.
|
||||
|
||||
2007-04-16 Matthias Klose <doko@debian.org>
|
||||
|
||||
* configure.tgt (i[456]86-*-linux*): Only add ia32 specific
|
||||
flags if not building with -m64.
|
||||
* testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
|
||||
flag for i?86-*-* targets, if current target matches -m64.
|
||||
|
||||
2007-04-14 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-04-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR testsuite/31369
|
||||
* testsuite/libgomp.c++/c++.exp: Don't use concat when setting
|
||||
ld_library_path.
|
||||
* testsuite/libgomp.fortran/fortran.exp: Likewise.
|
||||
|
||||
2007-04-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern
|
||||
decls.
|
||||
(gomp_init_affinity, gomp_init_thread_affinity): New prototypes.
|
||||
* env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables.
|
||||
(parse_affinity): New function.
|
||||
(initialize_env): Call it and gomp_init_affinity.
|
||||
* team.c (gomp_team_start): If gomp_cpu_affinity != NULL,
|
||||
create new pthread_attr_t and call gomp_init_thread_affinity
|
||||
on it for each thread before passing the attribute to pthread_create.
|
||||
* config/linux/affinity.c: New file.
|
||||
* config/posix/affinity.c: New file.
|
||||
* configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test.
|
||||
* configure: Rebuilt.
|
||||
* config.h.in: Rebuilt.
|
||||
* Makefile.am (libgomp_la_SOURCES): Add affinity.c.
|
||||
* Makefile.in: Rebuilt.
|
||||
|
||||
2007-03-23 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
|
||||
*-*-darwin*.
|
||||
* testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
|
||||
and use it if found.
|
||||
|
||||
2007-03-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* testsuite/config/default.exp: New file.
|
||||
* testsuite/lib/libgomp.exp: New file.
|
||||
* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
|
||||
libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
|
||||
load_lib *, load_gcc_lib *): Move to libgomp.exp.
|
||||
(libgomp_load): Remove.
|
||||
* testsuite/lib/libgomp.exp (libgomp_init): Compute
|
||||
always_ld_library_path, not ld_library_path. Set additional_flags
|
||||
to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
|
||||
(target_compile): Do not call libgomp_init. Append lang_library_path
|
||||
and lang_link_flags to options.
|
||||
* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set
|
||||
ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH
|
||||
here.
|
||||
* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
|
||||
always_ld_library_path. Set LD_LIBRARY_PATH here.
|
||||
* testsuite/libgomp.fortran/fortran.exp: Ditto.
|
||||
* testsuite/libgomp.c/atomic-1.c: Set dg-options to
|
||||
"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
|
||||
CX8 flag.
|
||||
* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
|
||||
lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
|
||||
* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
|
||||
* testsuite/libgomp.c/pr29947-1.c: Ditto.
|
||||
* testsuite/libgomp.c/atomic-10.c: Ditto.
|
||||
|
||||
2007-03-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
|
||||
dg-final cleanup-modules line.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/reduction5.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
|
||||
* testsuite/libgomp.fortran/threadprivate1.f90: Likewise.
|
||||
|
||||
2007-03-18 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
@ -31,15 +356,32 @@
|
||||
extraction.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
|
||||
|
||||
* Makefile.am: Add install-pdf target as copied from
|
||||
automake v1.10 rules.
|
||||
* Makefile.in: Regenerate
|
||||
|
||||
2007-02-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/28486
|
||||
* configure: Regenerate.
|
||||
|
||||
PR c++/30703
|
||||
* testsuite/libgomp.c++/pr30703.C: New test.
|
||||
|
||||
2007-02-07 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-02-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-31 Daniel Franke <franke.daniel@gmail.com>
|
||||
Revert:
|
||||
2006-07-05 Eric Christopher <echristo@apple.com>
|
||||
* configure.ac: Depend addition of -pthread on host OS.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libgomp.texi: Fix spacing after abbreviations.
|
||||
|
||||
2007-01-31 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/30546
|
||||
* configure.ac: Add check for makeinfo
|
||||
@ -50,74 +392,47 @@
|
||||
* Makefile.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
|
||||
2007-02-07 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libgomp.texi: Fix spacing after abbreviations.
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-29 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-01-29 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/30540
|
||||
* libgomp.texi: More about implementation-dependent settings.
|
||||
|
||||
2007-02-06 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR libgomp/28296
|
||||
Backport from mainline.
|
||||
Revert:
|
||||
2006-07-05 Eric Christopher <echristo@apple.com>
|
||||
* configure.ac: Depend addition of -pthread on host OS.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-01-30 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
Backport from mainline.
|
||||
2007-01-26 Tobias Burnus <burnus@net-b.de>
|
||||
2007-01-26 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* testsuite/libgomp.fortran/fortran.exp: Support .f03 extension.
|
||||
|
||||
2007-01-25 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
Backport from mainline:
|
||||
2006-12-21 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/28209
|
||||
* libgomp.texi: New file.
|
||||
* configure.ac: Add --enable-generated-files-in-srcdir option.
|
||||
* Makefile.am: Add info, dvi, pdf, html targets. On request,
|
||||
copy files to srcdir.
|
||||
* Makefile.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
* NOTES: Removed.
|
||||
|
||||
Backport from mainline:
|
||||
2007-01-14 Daniel Franke <franke.daniel@gmail.com>
|
||||
* libgomp.texi: Document implementation specific default values of
|
||||
environment variables.
|
||||
|
||||
2007-01-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/30494
|
||||
* testsuite/libgomp.c/pr30494.c: New test.
|
||||
|
||||
2006-12-18 Daniel Franke <franke.daniel@gmail.com>
|
||||
2007-01-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
Backport from mainline:
|
||||
2006-12-04 Daniel Franke <franke.daniel@gmail.com>
|
||||
* configure: Rebuilt.
|
||||
* configure.ac: Fixed comment.
|
||||
|
||||
2007-01-14 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
* libgomp.texi: Document implementation specific default values of
|
||||
environment variables.
|
||||
|
||||
2006-12-21 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/28209
|
||||
* libgomp.texi: New file.
|
||||
* configure.ac: Add --enable-generated-files-in-srcdir option.
|
||||
* Makefile.am: Add info, dvi, pdf, html targets. On request, copy
|
||||
files to srcdir.
|
||||
* Makefile.in: Regenerated.
|
||||
* config.h.in: Regenerated.
|
||||
* testsuite/Makefile.in: Regenerated.
|
||||
* NOTES: Removed.
|
||||
|
||||
2006-12-04 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR libgomp/29949
|
||||
* env.c (omp_set_num_threads): Set illegal thread count to 1.
|
||||
|
||||
Backport from mainline:
|
||||
2006-11-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* env.c (parse_schedule): Reject out of range values.
|
||||
(parse_unsigned_long): Reject out of range, negative
|
||||
or zero values.
|
||||
|
||||
2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* configure: Regenerate.
|
||||
@ -135,6 +450,15 @@
|
||||
|
||||
* configure.tgt: Force initial-exec TLS model on Linux only.
|
||||
|
||||
2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* configure: Regenerated.
|
||||
|
||||
2006-11-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* env.c (parse_schedule): Reject out of range values.
|
||||
(parse_unsigned_long): Reject out of range, negative or zero values.
|
||||
|
||||
2006-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/29629
|
||||
|
8
contrib/gcclibs/libgomp/ChangeLog.gcc44
Normal file
8
contrib/gcclibs/libgomp/ChangeLog.gcc44
Normal file
@ -0,0 +1,8 @@
|
||||
2008-09-19 Jakub Jelinek <jakub@redhat.com> (r140497)
|
||||
Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* config/bsd/proc.c: New file.
|
||||
* configure.tgt (*-*-darwin*): Use config_path "darwin posix".
|
||||
* configure.ac: Check for header <sys/sysctl.h>
|
||||
* configure: Regenerate.
|
||||
* config.h.in: Likewise.
|
@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../config
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = testsuite
|
||||
|
||||
## May be used by toolexeclibdir.
|
||||
@ -12,9 +12,7 @@ search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
|
||||
fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
|
||||
libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
|
||||
|
||||
empty =
|
||||
space = $(empty) $(empty)
|
||||
VPATH = $(subst $(space),:,$(strip $(search_path)))
|
||||
vpath % $(strip $(search_path))
|
||||
|
||||
AM_CPPFLAGS = $(addprefix -I, $(search_path))
|
||||
AM_CFLAGS = $(XCFLAGS)
|
||||
@ -33,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
|
||||
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
loop.c ordered.c parallel.c sections.c single.c team.c work.c \
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
|
||||
|
||||
nodist_noinst_HEADERS = libgomp_f.h
|
||||
nodist_libsubinclude_HEADERS = omp.h
|
||||
@ -51,10 +49,19 @@ env.lo: libgomp_f.h
|
||||
env.o: libgomp_f.h
|
||||
|
||||
|
||||
# No install-html target
|
||||
.PHONY: install-html
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
|
||||
install-pdf: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
# Automake Documentation:
|
||||
# If your package has Texinfo files in many directories, you can use the
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
@ -37,24 +38,27 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \
|
||||
$(srcdir)/../config.sub $(srcdir)/../depcomp \
|
||||
$(srcdir)/../install-sh $(srcdir)/../ltmain.sh \
|
||||
$(srcdir)/../missing $(srcdir)/../mkinstalldirs \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(srcdir)/libgomp.spec.in \
|
||||
$(srcdir)/libgomp_f.h.in $(srcdir)/omp.h.in \
|
||||
$(srcdir)/omp_lib.f90.in $(srcdir)/omp_lib.h.in \
|
||||
$(top_srcdir)/configure ChangeLog
|
||||
DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
|
||||
ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \
|
||||
$(srcdir)/omp.h.in $(srcdir)/omp_lib.h.in \
|
||||
$(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \
|
||||
$(srcdir)/libgomp.spec.in $(srcdir)/../depcomp \
|
||||
$(srcdir)/../ltmain.sh $(srcdir)/../config.guess \
|
||||
$(srcdir)/../config.sub
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
|
||||
$(top_srcdir)/../config/depstand.m4 \
|
||||
$(top_srcdir)/../config/enable.m4 \
|
||||
$(top_srcdir)/../config/futex.m4 \
|
||||
$(top_srcdir)/../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../config/multi.m4 \
|
||||
$(top_srcdir)/../config/stdint.m4 \
|
||||
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
|
||||
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
|
||||
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
@ -79,21 +83,20 @@ libgomp_la_LIBADD =
|
||||
am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \
|
||||
error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \
|
||||
single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \
|
||||
bar.lo time.lo fortran.lo
|
||||
bar.lo time.lo fortran.lo affinity.lo
|
||||
libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/../depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libgomp_la_SOURCES)
|
||||
DIST_SOURCES = $(libgomp_la_SOURCES)
|
||||
MULTISRCTOP =
|
||||
MULTIBUILDTOP =
|
||||
MULTIDIRS =
|
||||
@ -126,18 +129,6 @@ HEADERS = $(nodist_finclude_HEADERS) $(nodist_libsubinclude_HEADERS) \
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
VPATH = $(subst $(space),:,$(strip $(search_path)))
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
@ -157,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
@ -164,12 +156,15 @@ EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FC = @FC@
|
||||
FCFLAGS = @FCFLAGS@
|
||||
FGREP = @FGREP@
|
||||
GENINSRC_FALSE = @GENINSRC_FALSE@
|
||||
GENINSRC_TRUE = @GENINSRC_TRUE@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE = @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@
|
||||
LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE = @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@
|
||||
@ -182,6 +177,7 @@ MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NM = @NM@
|
||||
OBJEXT = @OBJEXT@
|
||||
OMP_LOCK_ALIGN = @OMP_LOCK_ALIGN@
|
||||
OMP_LOCK_KIND = @OMP_LOCK_KIND@
|
||||
@ -200,6 +196,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
RANLIB = @RANLIB@
|
||||
SECTION_LDFLAGS = @SECTION_LDFLAGS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
@ -210,6 +207,7 @@ XCFLAGS = @XCFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_FC = @ac_ct_FC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
@ -244,6 +242,7 @@ libexecdir = @libexecdir@
|
||||
libtool_VERSION = @libtool_VERSION@
|
||||
link_gomp = @link_gomp@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
multi_basedir = @multi_basedir@
|
||||
@ -260,14 +259,12 @@ target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
toolexecdir = @toolexecdir@
|
||||
toolexeclibdir = @toolexeclibdir@
|
||||
ACLOCAL_AMFLAGS = -I ../config
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = testsuite
|
||||
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
||||
search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir)
|
||||
fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude
|
||||
libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include
|
||||
empty =
|
||||
space = $(empty) $(empty)
|
||||
AM_CPPFLAGS = $(addprefix -I, $(search_path))
|
||||
AM_CFLAGS = $(XCFLAGS)
|
||||
AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS)
|
||||
@ -279,7 +276,7 @@ libgomp_version_info = -version-info $(libtool_VERSION)
|
||||
libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script)
|
||||
libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
|
||||
loop.c ordered.c parallel.c sections.c single.c team.c work.c \
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c
|
||||
lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c
|
||||
|
||||
nodist_noinst_HEADERS = libgomp_f.h
|
||||
nodist_libsubinclude_HEADERS = omp.h
|
||||
@ -406,6 +403,7 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affinity.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barrier.Plo@am__quote@
|
||||
@ -733,152 +731,6 @@ GTAGS:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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 -9 -c >$(distdir).tar.bz2
|
||||
$(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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(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)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(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
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { 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 $(INFO_DEPS) $(LTLIBRARIES) all-multi $(HEADERS) \
|
||||
@ -1011,16 +863,13 @@ uninstall-info: uninstall-info-recursive
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \
|
||||
all-multi am--refresh check check-am clean clean-generic \
|
||||
clean-libtool clean-multi clean-recursive \
|
||||
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-info dist-shar dist-tarZ \
|
||||
dist-zip distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-multi distclean-recursive distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-multi \
|
||||
install-nodist_fincludeHEADERS \
|
||||
clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist-info \
|
||||
distclean distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-multi distclean-recursive \
|
||||
distclean-tags dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-multi install-nodist_fincludeHEADERS \
|
||||
install-nodist_libsubincludeHEADERS \
|
||||
install-nodist_toolexeclibHEADERS install-strip \
|
||||
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
|
||||
@ -1036,6 +885,8 @@ uninstall-info: uninstall-info-recursive
|
||||
uninstall-toolexeclibLTLIBRARIES
|
||||
|
||||
|
||||
vpath % $(strip $(search_path))
|
||||
|
||||
omp_lib_kinds.mod: omp_lib.mod
|
||||
:
|
||||
omp_lib.mod: omp_lib.f90
|
||||
@ -1045,10 +896,20 @@ fortran.o: libgomp_f.h
|
||||
env.lo: libgomp_f.h
|
||||
env.o: libgomp_f.h
|
||||
|
||||
# No install-html target
|
||||
.PHONY: install-html
|
||||
# No install-html or install-pdf support in automake yet
|
||||
.PHONY: install-html install-pdf
|
||||
install-html:
|
||||
|
||||
install-pdf: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
all-local: $(STAMP_GENINSRC)
|
||||
|
||||
stamp-geninsrc: libgomp.info
|
||||
|
5
contrib/gcclibs/libgomp/aclocal.m4
vendored
5
contrib/gcclibs/libgomp/aclocal.m4
vendored
@ -859,8 +859,13 @@ AC_SUBST([am__untar])
|
||||
m4_include([../config/acx.m4])
|
||||
m4_include([../config/depstand.m4])
|
||||
m4_include([../config/enable.m4])
|
||||
m4_include([../config/futex.m4])
|
||||
m4_include([../config/lead-dot.m4])
|
||||
m4_include([../config/multi.m4])
|
||||
m4_include([../config/stdint.m4])
|
||||
m4_include([../config/tls.m4])
|
||||
m4_include([../ltoptions.m4])
|
||||
m4_include([../ltsugar.m4])
|
||||
m4_include([../ltversion.m4])
|
||||
m4_include([../lt~obsolete.m4])
|
||||
m4_include([acinclude.m4])
|
||||
|
@ -12,9 +12,15 @@
|
||||
/* Define if the POSIX Semaphores do not work on your system. */
|
||||
#undef HAVE_BROKEN_POSIX_SEMAPHORES
|
||||
|
||||
/* Define to 1 if the target assembler supports thread-local storage. */
|
||||
#undef HAVE_CC_TLS
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `getloadavg' function. */
|
||||
#undef HAVE_GETLOADAVG
|
||||
|
||||
@ -24,6 +30,9 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */
|
||||
#undef HAVE_PTHREAD_AFFINITY_NP
|
||||
|
||||
/* Define to 1 if you have the <semaphore.h> header file. */
|
||||
#undef HAVE_SEMAPHORE_H
|
||||
|
||||
@ -48,6 +57,9 @@
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
@ -60,6 +72,10 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
117
contrib/gcclibs/libgomp/config/bsd/proc.c
Normal file
117
contrib/gcclibs/libgomp/config/bsd/proc.c
Normal file
@ -0,0 +1,117 @@
|
||||
/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp 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 Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. It is expected that
|
||||
a system may well want to write special versions of each of these.
|
||||
|
||||
The following implementation uses a mix of POSIX and BSD routines. */
|
||||
|
||||
#include "libgomp.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
# ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
static int
|
||||
get_num_procs (void)
|
||||
{
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
return sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#elif defined HW_NCPU
|
||||
int ncpus = 1;
|
||||
size_t len = sizeof(ncpus);
|
||||
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
|
||||
return ncpus;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus online. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
int ncpus = get_num_procs ();
|
||||
|
||||
if (ncpus > 0)
|
||||
gomp_global_icv.nthreads_var = ncpus;
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. */
|
||||
/* ??? I have no idea what best practice for this is. Surely some
|
||||
function of the number of processors that are *still* online and
|
||||
the load average. Here I use the number of processors online
|
||||
minus the 15 minute load average. */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
unsigned n_onln, loadavg;
|
||||
unsigned nthreads_var = gomp_icv (false)->nthreads_var;
|
||||
|
||||
n_onln = get_num_procs ();
|
||||
if (!n_onln || n_onln > nthreads_var)
|
||||
n_onln = nthreads_var;
|
||||
|
||||
loadavg = 0;
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
{
|
||||
double dloadavg[3];
|
||||
if (getloadavg (dloadavg, 3) == 3)
|
||||
{
|
||||
/* Add 0.1 to get a kind of biased rounding. */
|
||||
loadavg = dloadavg[2] + 0.1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (loadavg >= n_onln)
|
||||
return 1;
|
||||
else
|
||||
return n_onln - loadavg;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
int ncpus = get_num_procs ();
|
||||
if (ncpus <= 0)
|
||||
ncpus = gomp_icv (false)->nthreads_var;
|
||||
return ncpus;
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
107
contrib/gcclibs/libgomp/config/linux/affinity.c
Normal file
107
contrib/gcclibs/libgomp/config/linux/affinity.c
Normal file
@ -0,0 +1,107 @@
|
||||
/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp 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 Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This is a Linux specific implementation of a CPU affinity setting. */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include "libgomp.h"
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
|
||||
static unsigned int affinity_counter;
|
||||
#ifndef HAVE_SYNC_BUILTINS
|
||||
static gomp_mutex_t affinity_lock;
|
||||
#endif
|
||||
|
||||
void
|
||||
gomp_init_affinity (void)
|
||||
{
|
||||
cpu_set_t cpuset;
|
||||
size_t idx, widx;
|
||||
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset))
|
||||
{
|
||||
gomp_error ("could not get CPU affinity set");
|
||||
free (gomp_cpu_affinity);
|
||||
gomp_cpu_affinity = NULL;
|
||||
gomp_cpu_affinity_len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (widx = idx = 0; idx < gomp_cpu_affinity_len; idx++)
|
||||
if (gomp_cpu_affinity[idx] < CPU_SETSIZE
|
||||
&& CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
|
||||
gomp_cpu_affinity[widx++] = gomp_cpu_affinity[idx];
|
||||
|
||||
if (widx == 0)
|
||||
{
|
||||
gomp_error ("no CPUs left for affinity setting");
|
||||
free (gomp_cpu_affinity);
|
||||
gomp_cpu_affinity = NULL;
|
||||
gomp_cpu_affinity_len = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
gomp_cpu_affinity_len = widx;
|
||||
CPU_ZERO (&cpuset);
|
||||
CPU_SET (gomp_cpu_affinity[0], &cpuset);
|
||||
pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset);
|
||||
affinity_counter = 1;
|
||||
#ifndef HAVE_SYNC_BUILTINS
|
||||
gomp_mutex_init (&affinity_lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
gomp_init_thread_affinity (pthread_attr_t *attr)
|
||||
{
|
||||
unsigned int cpu;
|
||||
cpu_set_t cpuset;
|
||||
|
||||
#ifdef HAVE_SYNC_BUILTINS
|
||||
cpu = __sync_fetch_and_add (&affinity_counter, 1);
|
||||
#else
|
||||
gomp_mutex_lock (&affinity_lock);
|
||||
cpu = affinity_counter++;
|
||||
gomp_mutex_unlock (&affinity_lock);
|
||||
#endif
|
||||
cpu %= gomp_cpu_affinity_len;
|
||||
CPU_ZERO (&cpuset);
|
||||
CPU_SET (gomp_cpu_affinity[cpu], &cpuset);
|
||||
pthread_attr_setaffinity_np (attr, sizeof (cpu_set_t), &cpuset);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "../posix/affinity.c"
|
||||
|
||||
#endif
|
179
contrib/gcclibs/libgomp/config/linux/proc.c
Normal file
179
contrib/gcclibs/libgomp/config/linux/proc.c
Normal file
@ -0,0 +1,179 @@
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp 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 Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. */
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include "libgomp.h"
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
# ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
static unsigned long
|
||||
cpuset_popcount (cpu_set_t *cpusetp)
|
||||
{
|
||||
#ifdef CPU_COUNT
|
||||
/* glibc 2.6 and above provide a macro for this. */
|
||||
return CPU_COUNT (cpusetp);
|
||||
#else
|
||||
size_t i;
|
||||
unsigned long ret = 0;
|
||||
extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int)];
|
||||
|
||||
(void) check;
|
||||
for (i = 0; i < sizeof (*cpusetp) / sizeof (cpusetp->__bits[0]); i++)
|
||||
{
|
||||
unsigned long int mask = cpusetp->__bits[i];
|
||||
if (mask == 0)
|
||||
continue;
|
||||
ret += __builtin_popcountl (mask);
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus online. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
cpu_set_t cpuset;
|
||||
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset) == 0)
|
||||
{
|
||||
/* Count only the CPUs this process can use. */
|
||||
gomp_nthreads_var = cpuset_popcount (&cpuset);
|
||||
if (gomp_nthreads_var == 0)
|
||||
gomp_nthreads_var = 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
gomp_nthreads_var = sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
get_num_procs (void)
|
||||
{
|
||||
#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
cpu_set_t cpuset;
|
||||
|
||||
if (gomp_cpu_affinity == NULL)
|
||||
{
|
||||
/* Count only the CPUs this process can use. */
|
||||
if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset),
|
||||
&cpuset) == 0)
|
||||
{
|
||||
int ret = cpuset_popcount (&cpuset);
|
||||
return ret != 0 ? ret : 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t idx;
|
||||
static int affinity_cpus;
|
||||
|
||||
/* We can't use pthread_getaffinity_np in this case
|
||||
(we have changed it ourselves, it binds to just one CPU).
|
||||
Count instead the number of different CPUs we are
|
||||
using. */
|
||||
CPU_ZERO (&cpuset);
|
||||
if (affinity_cpus == 0)
|
||||
{
|
||||
int cpus = 0;
|
||||
for (idx = 0; idx < gomp_cpu_affinity_len; idx++)
|
||||
if (! CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
|
||||
{
|
||||
cpus++;
|
||||
CPU_SET (gomp_cpu_affinity[idx], &cpuset);
|
||||
}
|
||||
affinity_cpus = cpus;
|
||||
}
|
||||
return affinity_cpus;
|
||||
}
|
||||
#endif
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
return sysconf (_SC_NPROCESSORS_ONLN);
|
||||
#else
|
||||
return gomp_nthreads_var;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. */
|
||||
/* ??? I have no idea what best practice for this is. Surely some
|
||||
function of the number of processors that are *still* online and
|
||||
the load average. Here I use the number of processors online
|
||||
minus the 15 minute load average. */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
unsigned n_onln, loadavg;
|
||||
|
||||
n_onln = get_num_procs ();
|
||||
if (n_onln > gomp_nthreads_var)
|
||||
n_onln = gomp_nthreads_var;
|
||||
|
||||
loadavg = 0;
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
{
|
||||
double dloadavg[3];
|
||||
if (getloadavg (dloadavg, 3) == 3)
|
||||
{
|
||||
/* Add 0.1 to get a kind of biased rounding. */
|
||||
loadavg = dloadavg[2] + 0.1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (loadavg >= n_onln)
|
||||
return 1;
|
||||
else
|
||||
return n_onln - loadavg;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
return get_num_procs ();
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
82
contrib/gcclibs/libgomp/config/mingw32/proc.c
Normal file
82
contrib/gcclibs/libgomp/config/mingw32/proc.c
Normal file
@ -0,0 +1,82 @@
|
||||
/* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
Contributed by Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp 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 Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This file contains system specific routines related to counting
|
||||
online processors and dynamic load balancing. It is expected that
|
||||
a system may well want to write special versions of each of these.
|
||||
|
||||
The following implementation uses win32 API routines. */
|
||||
|
||||
#include "libgomp.h"
|
||||
#include <windows.h>
|
||||
|
||||
/* Count the CPU's currently available to this process. */
|
||||
static int
|
||||
count_avail_process_cpus ()
|
||||
{
|
||||
DWORD_PTR process_cpus;
|
||||
DWORD_PTR system_cpus;
|
||||
|
||||
if (GetProcessAffinityMask (GetCurrentProcess (),
|
||||
&process_cpus, &system_cpus))
|
||||
{
|
||||
unsigned int count;
|
||||
for (count = 0; process_cpus != 0; process_cpus >>= 1)
|
||||
if (process_cpus & 1)
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* At startup, determine the default number of threads. It would seem
|
||||
this should be related to the number of cpus available to the process. */
|
||||
|
||||
void
|
||||
gomp_init_num_threads (void)
|
||||
{
|
||||
gomp_nthreads_var = count_avail_process_cpus ();
|
||||
}
|
||||
|
||||
/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
threads we should spawn for this team. FIXME: How do we adjust for
|
||||
load average on MS Windows? */
|
||||
|
||||
unsigned
|
||||
gomp_dynamic_max_threads (void)
|
||||
{
|
||||
int n_onln = count_avail_process_cpus ();
|
||||
return n_onln > gomp_nthreads_var ? gomp_nthreads_var : n_onln;
|
||||
}
|
||||
|
||||
int
|
||||
omp_get_num_procs (void)
|
||||
{
|
||||
return count_avail_process_cpus ();
|
||||
}
|
||||
|
||||
ialias (omp_get_num_procs)
|
41
contrib/gcclibs/libgomp/config/posix/affinity.c
Normal file
41
contrib/gcclibs/libgomp/config/posix/affinity.c
Normal file
@ -0,0 +1,41 @@
|
||||
/* Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
|
||||
Libgomp is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Libgomp 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 Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* As a special exception, if you link this library with other files, some
|
||||
of which are compiled with GCC, to produce an executable, this library
|
||||
does not by itself cause the resulting executable to be covered by the
|
||||
GNU General Public License. This exception does not however invalidate
|
||||
any other reasons why the executable file might be covered by the GNU
|
||||
General Public License. */
|
||||
|
||||
/* This is a generic stub implementation of a CPU affinity setting. */
|
||||
|
||||
#include "libgomp.h"
|
||||
|
||||
void
|
||||
gomp_init_affinity (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
gomp_init_thread_affinity (pthread_attr_t *attr)
|
||||
{
|
||||
(void) attr;
|
||||
}
|
11488
contrib/gcclibs/libgomp/configure
vendored
11488
contrib/gcclibs/libgomp/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -15,12 +15,6 @@ LIBGOMP_ENABLE(version-specific-runtime-libs, no, ,
|
||||
permit yes|no)
|
||||
AC_MSG_RESULT($enable_version_specific_runtime_libs)
|
||||
|
||||
AC_MSG_CHECKING([for --enable-linux-futex])
|
||||
LIBGOMP_ENABLE(linux-futex, default, ,
|
||||
[Use the Linux futex system call],
|
||||
permit yes|no|default)
|
||||
AC_MSG_RESULT($enable_linux_futex)
|
||||
|
||||
# We would like our source tree to be readonly. However when releases or
|
||||
# pre-releases are generated, the flex/bison generated files as well as the
|
||||
# various formats of manuals need to be included along with the rest of the
|
||||
@ -64,11 +58,11 @@ target_alias=${target_alias-$host_alias}
|
||||
# we can do about that; they come from AC_INIT).
|
||||
# foreign: we don't follow the normal rules for GNU packages (no COPYING
|
||||
# file in the top srcdir, etc, etc), so stop complaining.
|
||||
# no-dependencies: turns off auto dependency generation (just for now)
|
||||
# no-dist: we don't want 'dist' and related rules.
|
||||
# -Wall: turns on all automake warnings...
|
||||
# -Wno-portability: ...except this one, since GNU make is required.
|
||||
# -Wno-override: ... and this one, since we do want this in testsuite.
|
||||
AM_INIT_AUTOMAKE([1.9.0 foreign -Wall -Wno-portability -Wno-override])
|
||||
AM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override])
|
||||
AM_ENABLE_MULTILIB(, ..)
|
||||
|
||||
# Calculate toolexeclibdir
|
||||
@ -135,7 +129,7 @@ AC_PROG_INSTALL
|
||||
# that we can use it.
|
||||
ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
|
||||
[GNU texinfo.* \([0-9][0-9.]*\)],
|
||||
[4.[4-9]*])
|
||||
[4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
|
||||
AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
|
||||
|
||||
|
||||
@ -160,7 +154,7 @@ AC_SUBST(libtool_VERSION)
|
||||
# Check header files.
|
||||
AC_STDC_HEADERS
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/time.h)
|
||||
AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h)
|
||||
|
||||
GCC_HEADER_STDINT(gstdint.h)
|
||||
|
||||
@ -193,50 +187,29 @@ case "$host" in
|
||||
AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
|
||||
Define if the POSIX Semaphores do not work on your system.)
|
||||
;;
|
||||
*-linux*)
|
||||
case "$enable_linux_futex" in
|
||||
default)
|
||||
# If headers don't have gettid/futex syscalls definition, then
|
||||
# default to no, otherwise there will be compile time failures.
|
||||
# Otherwise, default to yes. If we don't detect we are
|
||||
# compiled/linked against NPTL and not cross-compiling, check
|
||||
# if programs are run by default against NPTL and if not, issue
|
||||
# a warning.
|
||||
enable_linux_futex=no
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/syscall.h>
|
||||
int lk;],
|
||||
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
pthread_t th; void *status;],
|
||||
[pthread_tryjoin_np (th, &status);])],[enable_linux_futex=yes],
|
||||
[if test x$cross_compiling = xno; then
|
||||
if getconf GNU_LIBPTHREAD_VERSION 2>/dev/null \
|
||||
| LC_ALL=C grep -i NPTL > /dev/null 2>/dev/null; then
|
||||
AC_MSG_WARN([The kernel might not support futex or gettid syscalls.
|
||||
If so, please configure with --disable-linux-futex])
|
||||
fi
|
||||
fi
|
||||
enable_linux_futex=yes])])
|
||||
;;
|
||||
yes)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <sys/syscall.h>
|
||||
int lk;],
|
||||
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[],
|
||||
[AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
GCC_LINUX_FUTEX(:)
|
||||
|
||||
# Check for pthread_{,attr_}[sg]etaffinity_np.
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#define _GNU_SOURCE
|
||||
#include <pthread.h>],
|
||||
[cpu_set_t cpuset;
|
||||
pthread_attr_t attr;
|
||||
pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
|
||||
if (CPU_ISSET (0, &cpuset))
|
||||
CPU_SET (1, &cpuset);
|
||||
else
|
||||
CPU_ZERO (&cpuset);
|
||||
pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
|
||||
pthread_attr_init (&attr);
|
||||
pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
|
||||
pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);])],
|
||||
AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1,
|
||||
[ Define if pthread_{,attr_}{g,s}etaffinity_np is supported.]))
|
||||
|
||||
# At least for glibc, clock_gettime is in librt. But don't pull that
|
||||
# in if it still doesn't give us the function we want.
|
||||
if test $ac_cv_func_clock_gettime = no; then
|
||||
|
@ -11,14 +11,11 @@
|
||||
# XLDFLAGS Add extra link flags to use.
|
||||
|
||||
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
|
||||
# This does require that the library be present during process
|
||||
# startup, so mark the library as not to be dlopened.
|
||||
if test $have_tls = yes ; then
|
||||
if test $gcc_cv_have_tls = yes ; then
|
||||
case "${target}" in
|
||||
|
||||
*-*-linux*)
|
||||
XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
|
||||
XLDFLAGS="${XLDFLAGS} -Wl,-z,nodlopen"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -49,9 +46,14 @@ if test $enable_linux_futex = yes; then
|
||||
# Note that bare i386 is not included here. We need cmpxchg.
|
||||
i[456]86-*-linux*)
|
||||
config_path="linux/x86 linux posix"
|
||||
if test -z "$with_arch"; then
|
||||
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
fi
|
||||
case " ${CC} ${CFLAGS} " in
|
||||
*" -m64 "*)
|
||||
;;
|
||||
*)
|
||||
if test -z "$with_arch"; then
|
||||
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
||||
fi
|
||||
esac
|
||||
;;
|
||||
|
||||
# Similar jiggery-pokery for x86_64 multilibs, except here we
|
||||
@ -105,6 +107,10 @@ case "${target}" in
|
||||
XLDFLAGS="${XLDFLAGS} -lposix4"
|
||||
;;
|
||||
|
||||
*-*-darwin*)
|
||||
config_path="bsd posix"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -42,6 +42,8 @@ bool gomp_dyn_var = false;
|
||||
bool gomp_nest_var = false;
|
||||
enum gomp_schedule_type gomp_run_sched_var = GFS_DYNAMIC;
|
||||
unsigned long gomp_run_sched_chunk = 1;
|
||||
unsigned short *gomp_cpu_affinity;
|
||||
size_t gomp_cpu_affinity_len;
|
||||
|
||||
/* Parse the OMP_SCHEDULE environment variable. */
|
||||
|
||||
@ -177,6 +179,97 @@ parse_boolean (const char *name, bool *value)
|
||||
gomp_error ("Invalid value for environment variable %s", name);
|
||||
}
|
||||
|
||||
/* Parse the GOMP_CPU_AFFINITY environment varible. Return true if one was
|
||||
present and it was successfully parsed. */
|
||||
|
||||
static bool
|
||||
parse_affinity (void)
|
||||
{
|
||||
char *env, *end;
|
||||
unsigned long cpu_beg, cpu_end, cpu_stride;
|
||||
unsigned short *cpus = NULL;
|
||||
size_t allocated = 0, used = 0, needed;
|
||||
|
||||
env = getenv ("GOMP_CPU_AFFINITY");
|
||||
if (env == NULL)
|
||||
return false;
|
||||
|
||||
do
|
||||
{
|
||||
while (*env == ' ' || *env == '\t')
|
||||
env++;
|
||||
|
||||
cpu_beg = strtoul (env, &end, 0);
|
||||
cpu_end = cpu_beg;
|
||||
cpu_stride = 1;
|
||||
if (env == end || cpu_beg >= 65536)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
if (*env == '-')
|
||||
{
|
||||
cpu_end = strtoul (++env, &end, 0);
|
||||
if (env == end || cpu_end >= 65536 || cpu_end < cpu_beg)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
if (*env == ':')
|
||||
{
|
||||
cpu_stride = strtoul (++env, &end, 0);
|
||||
if (env == end || cpu_stride == 0 || cpu_stride >= 65536)
|
||||
goto invalid;
|
||||
|
||||
env = end;
|
||||
}
|
||||
}
|
||||
|
||||
needed = (cpu_end - cpu_beg) / cpu_stride + 1;
|
||||
if (used + needed >= allocated)
|
||||
{
|
||||
unsigned short *new_cpus;
|
||||
|
||||
if (allocated < 64)
|
||||
allocated = 64;
|
||||
if (allocated > needed)
|
||||
allocated <<= 1;
|
||||
else
|
||||
allocated += 2 * needed;
|
||||
new_cpus = realloc (cpus, allocated * sizeof (unsigned short));
|
||||
if (new_cpus == NULL)
|
||||
{
|
||||
free (cpus);
|
||||
gomp_error ("not enough memory to store GOMP_CPU_AFFINITY list");
|
||||
return false;
|
||||
}
|
||||
|
||||
cpus = new_cpus;
|
||||
}
|
||||
|
||||
while (needed--)
|
||||
{
|
||||
cpus[used++] = cpu_beg;
|
||||
cpu_beg += cpu_stride;
|
||||
}
|
||||
|
||||
while (*env == ' ' || *env == '\t')
|
||||
env++;
|
||||
|
||||
if (*env == ',')
|
||||
env++;
|
||||
else if (*env == '\0')
|
||||
break;
|
||||
}
|
||||
while (1);
|
||||
|
||||
gomp_cpu_affinity = cpus;
|
||||
gomp_cpu_affinity_len = used;
|
||||
return true;
|
||||
|
||||
invalid:
|
||||
gomp_error ("Invalid value for enviroment variable GOMP_CPU_AFFINITY");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
initialize_env (void)
|
||||
{
|
||||
@ -190,6 +283,8 @@ initialize_env (void)
|
||||
parse_boolean ("OMP_NESTED", &gomp_nest_var);
|
||||
if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var))
|
||||
gomp_init_num_threads ();
|
||||
if (parse_affinity ())
|
||||
gomp_init_affinity ();
|
||||
|
||||
/* Not strictly environment related, but ordering constructors is tricky. */
|
||||
pthread_attr_init (&gomp_thread_attr);
|
||||
|
@ -242,16 +242,16 @@ gomp_iter_guided_next_locked (long *pstart, long *pend)
|
||||
if (ws->next == ws->end)
|
||||
return false;
|
||||
|
||||
n = (ws->end - ws->next) / ws->incr;
|
||||
start = ws->next;
|
||||
n = (ws->end - start) / ws->incr;
|
||||
q = (n + nthreads - 1) / nthreads;
|
||||
|
||||
if (q < ws->chunk_size)
|
||||
q = ws->chunk_size;
|
||||
if (q > n)
|
||||
q = n;
|
||||
|
||||
start = ws->next;
|
||||
end = start + q * ws->incr;
|
||||
if (q <= n)
|
||||
end = start + q * ws->incr;
|
||||
else
|
||||
end = ws->end;
|
||||
|
||||
ws->next = end;
|
||||
*pstart = start;
|
||||
@ -286,15 +286,15 @@ gomp_iter_guided_next (long *pstart, long *pend)
|
||||
if (start == end)
|
||||
return false;
|
||||
|
||||
n = (end - start) / ws->incr;
|
||||
n = (end - start) / incr;
|
||||
q = (n + nthreads - 1) / nthreads;
|
||||
|
||||
if (q < chunk_size)
|
||||
q = chunk_size;
|
||||
if (q > n)
|
||||
q = n;
|
||||
|
||||
nend = start + q * incr;
|
||||
if (__builtin_expect (q <= n, 1))
|
||||
nend = start + q * incr;
|
||||
else
|
||||
nend = end;
|
||||
|
||||
tmp = __sync_val_compare_and_swap (&ws->next, start, nend);
|
||||
if (__builtin_expect (tmp == start, 1))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -246,8 +246,18 @@ extern unsigned long gomp_run_sched_chunk;
|
||||
/* The attributes to be used during thread creation. */
|
||||
extern pthread_attr_t gomp_thread_attr;
|
||||
|
||||
/* Other variables. */
|
||||
|
||||
extern unsigned short *gomp_cpu_affinity;
|
||||
extern size_t gomp_cpu_affinity_len;
|
||||
|
||||
/* Function prototypes. */
|
||||
|
||||
/* affinity.c */
|
||||
|
||||
extern void gomp_init_affinity (void);
|
||||
extern void gomp_init_thread_affinity (pthread_attr_t *);
|
||||
|
||||
/* alloc.c */
|
||||
|
||||
extern void *gomp_malloc (size_t) __attribute__((malloc));
|
||||
|
@ -895,14 +895,25 @@ dynamic scheduling and a chunk size of 1 is used.
|
||||
@cindex Environment Variable
|
||||
@table @asis
|
||||
@item @emph{Description}:
|
||||
A patch for this extension has been submitted, but was not yet applied at the
|
||||
time of writing.
|
||||
Binds threads to specific CPUs. The variable should contain a space- or
|
||||
comma-separated list of CPUs. This list may contain different kind of
|
||||
entries: either single CPU numbers in any order, a range of CPUs (M-N)
|
||||
or a range with some stride (M-N:S). CPU numbers are zero based. For example,
|
||||
@code{GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"} will bind the initial thread
|
||||
to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
|
||||
CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10, 12,
|
||||
and 14 respectively and then start assigning back from the beginning of
|
||||
the list. @code{GOMP_CPU_AFFINITY=0} binds all threads to CPU 0.
|
||||
|
||||
@item @emph{Reference}:
|
||||
@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00982.html,
|
||||
GCC Patches Mailinglist}
|
||||
@uref{http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01133.html,
|
||||
GCC Patches Mailinglist}
|
||||
There is no GNU OpenMP library routine to determine whether a CPU affinity
|
||||
specification is in effect. As a workaround, language-specific library
|
||||
functions, e.g., @code{getenv} in C or @code{GET_ENVIRONMENT_VARIABLE} in
|
||||
Fortran, may be used to query the setting of the @code{GOMP_CPU_AFFINITY}
|
||||
environment variable. A defined CPU affinity on startup cannot be changed
|
||||
or disabled during the runtime of the application.
|
||||
|
||||
If this environment variable is omitted, the host system will handle the
|
||||
assignment of threads to CPUs.
|
||||
@end table
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -49,36 +49,39 @@ typedef struct
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# define __GOMP_NOTHROW throw ()
|
||||
#else
|
||||
# define __GOMP_NOTHROW __attribute__((__nothrow__))
|
||||
#endif
|
||||
|
||||
extern void omp_set_num_threads (int);
|
||||
extern int omp_get_num_threads (void);
|
||||
extern int omp_get_max_threads (void);
|
||||
extern int omp_get_thread_num (void);
|
||||
extern int omp_get_num_procs (void);
|
||||
extern void omp_set_num_threads (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_num_threads (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_max_threads (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_thread_num (void) __GOMP_NOTHROW;
|
||||
extern int omp_get_num_procs (void) __GOMP_NOTHROW;
|
||||
|
||||
extern int omp_in_parallel (void);
|
||||
extern int omp_in_parallel (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_set_dynamic (int);
|
||||
extern int omp_get_dynamic (void);
|
||||
extern void omp_set_dynamic (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_dynamic (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_set_nested (int);
|
||||
extern int omp_get_nested (void);
|
||||
extern void omp_set_nested (int) __GOMP_NOTHROW;
|
||||
extern int omp_get_nested (void) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_init_lock (omp_lock_t *);
|
||||
extern void omp_destroy_lock (omp_lock_t *);
|
||||
extern void omp_set_lock (omp_lock_t *);
|
||||
extern void omp_unset_lock (omp_lock_t *);
|
||||
extern int omp_test_lock (omp_lock_t *);
|
||||
extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW;
|
||||
|
||||
extern void omp_init_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_destroy_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_set_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_unset_nest_lock (omp_nest_lock_t *);
|
||||
extern int omp_test_nest_lock (omp_nest_lock_t *);
|
||||
extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
|
||||
|
||||
extern double omp_get_wtime (void);
|
||||
extern double omp_get_wtick (void);
|
||||
extern double omp_get_wtime (void) __GOMP_NOTHROW;
|
||||
extern double omp_get_wtick (void) __GOMP_NOTHROW;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -38,16 +38,16 @@
|
||||
external omp_set_num_threads
|
||||
|
||||
external omp_get_dynamic, omp_get_nested
|
||||
logical*4 omp_get_dynamic, omp_get_nested
|
||||
logical(4) omp_get_dynamic, omp_get_nested
|
||||
external omp_test_lock, omp_in_parallel
|
||||
logical*4 omp_test_lock, omp_in_parallel
|
||||
logical(4) omp_test_lock, omp_in_parallel
|
||||
|
||||
external omp_get_max_threads, omp_get_num_procs
|
||||
integer*4 omp_get_max_threads, omp_get_num_procs
|
||||
integer(4) omp_get_max_threads, omp_get_num_procs
|
||||
external omp_get_num_threads, omp_get_thread_num
|
||||
integer*4 omp_get_num_threads, omp_get_thread_num
|
||||
integer(4) omp_get_num_threads, omp_get_thread_num
|
||||
external omp_test_nest_lock
|
||||
integer*4 omp_test_nest_lock
|
||||
integer(4) omp_test_nest_lock
|
||||
|
||||
external omp_get_wtick, omp_get_wtime
|
||||
double precision omp_get_wtick, omp_get_wtime
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@redhat.com>.
|
||||
|
||||
This file is part of the GNU OpenMP Library (libgomp).
|
||||
@ -183,6 +183,7 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
struct gomp_team *team;
|
||||
bool nested;
|
||||
unsigned i, n, old_threads_used = 0;
|
||||
pthread_attr_t thread_attr, *attr;
|
||||
|
||||
thr = gomp_thread ();
|
||||
nested = thr->ts.team != NULL;
|
||||
@ -265,6 +266,17 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
}
|
||||
}
|
||||
|
||||
attr = &gomp_thread_attr;
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
{
|
||||
size_t stacksize;
|
||||
pthread_attr_init (&thread_attr);
|
||||
pthread_attr_setdetachstate (&thread_attr, PTHREAD_CREATE_DETACHED);
|
||||
if (! pthread_attr_getstacksize (&gomp_thread_attr, &stacksize))
|
||||
pthread_attr_setstacksize (&thread_attr, stacksize);
|
||||
attr = &thread_attr;
|
||||
}
|
||||
|
||||
start_data = gomp_alloca (sizeof (struct gomp_thread_start_data)
|
||||
* (nthreads-i));
|
||||
|
||||
@ -283,12 +295,17 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
|
||||
start_data->fn_data = data;
|
||||
start_data->nested = nested;
|
||||
|
||||
err = pthread_create (&pt, &gomp_thread_attr,
|
||||
gomp_thread_start, start_data);
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
gomp_init_thread_affinity (attr);
|
||||
|
||||
err = pthread_create (&pt, attr, gomp_thread_start, start_data);
|
||||
if (err != 0)
|
||||
gomp_fatal ("Thread creation failed: %s", strerror (err));
|
||||
}
|
||||
|
||||
if (gomp_cpu_affinity != NULL)
|
||||
pthread_attr_destroy (&thread_attr);
|
||||
|
||||
do_release:
|
||||
gomp_barrier_wait (nested ? &team->barrier : &gomp_threads_dock);
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
||||
#define PACKAGE_NAME "ldns"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "ldns 1.6.16"
|
||||
#define PACKAGE_STRING "ldns 1.6.17"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libdns"
|
||||
@ -131,7 +131,7 @@
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.6.16"
|
||||
#define PACKAGE_VERSION "1.6.17"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
@ -82,6 +82,11 @@ the type arguments are not used.
|
||||
Chase the signature(s) of 'name' to a known key or as high up in
|
||||
the tree as possible.
|
||||
|
||||
.TP
|
||||
\fB\-I \fIIPv4 or IPv6 address\fR
|
||||
Source address to query from. The source address has to be present
|
||||
on an interface of the host running drill.
|
||||
|
||||
.TP
|
||||
\fB\-V \fIlevel\fR
|
||||
Be more verbose. Set level to 5 to see the actual query that is sent.
|
||||
@ -217,6 +222,12 @@ specify named base64 tsig key, and optional an algorithm (defaults to hmac-md5.s
|
||||
\fB\-z \fR
|
||||
don't randomize the nameserver list before sending queries.
|
||||
|
||||
.SH "EXIT STATUS"
|
||||
The exit status is 0 if the looked up answer is secure and trusted,
|
||||
or insecure.
|
||||
The exit status is not 0 if the looked up answer is untrusted or bogus,
|
||||
or an error occurred while performing the lookup.
|
||||
|
||||
.SH "FILES"
|
||||
.TP
|
||||
/etc/unbound/root.key
|
||||
|
19
contrib/ldns/freebsd-configure.sh
Executable file
19
contrib/ldns/freebsd-configure.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
ldns=$(dirname $(realpath $0))
|
||||
cd $ldns
|
||||
|
||||
libtoolize --copy
|
||||
autoheader
|
||||
autoconf
|
||||
./configure --prefix= --exec-prefix=/usr
|
||||
|
||||
cd $ldns/drill
|
||||
autoheader
|
||||
autoconf
|
||||
./configure --prefix= --exec-prefix=/usr
|
212
contrib/ldns/packaging/fedora/ldns.spec
Normal file
212
contrib/ldns/packaging/fedora/ldns.spec
Normal file
@ -0,0 +1,212 @@
|
||||
%{?!with_python: %global with_python 1}
|
||||
|
||||
%if %{with_python}
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%endif
|
||||
|
||||
Summary: Lowlevel DNS(SEC) library with API
|
||||
Name: ldns
|
||||
Version: 1.6.13
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
Url: http://www.nlnetlabs.nl/%{name}/
|
||||
Source: http://www.nlnetlabs.nl/downloads/%{%name}/%{name}-%{version}.tar.gz
|
||||
Group: System Environment/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: perl, libpcap-devel, openssl-devel , gcc-c++, doxygen,
|
||||
# Only needed for builds from svn snapshot
|
||||
# BuildRequires: libtool, autoconf, automake
|
||||
|
||||
%if %{with_python}
|
||||
BuildRequires: python-devel, swig
|
||||
%endif
|
||||
|
||||
%description
|
||||
ldns is a library with the aim to simplify DNS programing in C. All
|
||||
lowlevel DNS/DNSSEC operations are supported. We also define a higher
|
||||
level API which allows a programmer to (for instance) create or sign
|
||||
packets.
|
||||
|
||||
%package devel
|
||||
Summary: Development package that includes the ldns header files
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The devel package contains the ldns library and the include files
|
||||
|
||||
%if %{with_python}
|
||||
%package python
|
||||
Summary: Python extensions for ldns
|
||||
Group: Applications/System
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description python
|
||||
Python extensions for ldns
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# To built svn snapshots
|
||||
# rm config.guess config.sub ltmain.sh
|
||||
# aclocal
|
||||
# libtoolize -c
|
||||
# autoreconf
|
||||
|
||||
%build
|
||||
%configure --disable-rpath --disable-static --with-sha2 --disable-gost \
|
||||
%if %{with_python}
|
||||
--with-pyldns
|
||||
%endif
|
||||
|
||||
(cd drill ; %configure --disable-rpath --disable-static --with-sha2 --disable-gost --with-ldns=%{buildroot}/lib/ )
|
||||
(cd examples ; %configure --disable-rpath --disable-static --with-sha2 --disable-gost --with-ldns=%{buildroot}/lib/ )
|
||||
|
||||
make %{?_smp_mflags}
|
||||
( cd drill ; make %{?_smp_mflags} )
|
||||
( cd examples ; make %{?_smp_mflags} )
|
||||
make %{?_smp_mflags} doc
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install
|
||||
make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-doc
|
||||
|
||||
# don't install another set of man pages from doc/
|
||||
rm -rf doc/man/
|
||||
|
||||
# don't package building script for install-doc in doc section
|
||||
rm doc/doxyparse.pl
|
||||
|
||||
# remove .la files
|
||||
rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python_sitearch}/*.la
|
||||
(cd drill ; make DESTDIR=%{buildroot} install)
|
||||
(cd examples; make DESTDIR=%{buildroot} install)
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libldns*so.*
|
||||
%{_bindir}/drill
|
||||
%{_bindir}/ldnsd
|
||||
%{_bindir}/ldns-chaos
|
||||
%{_bindir}/ldns-compare-zones
|
||||
%{_bindir}/ldns-[d-z]*
|
||||
%doc README LICENSE
|
||||
%{_mandir}/*/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libldns*so
|
||||
%{_bindir}/ldns-config
|
||||
%dir %{_includedir}/ldns
|
||||
%{_includedir}/ldns/*.h
|
||||
%doc doc Changelog README
|
||||
|
||||
%if %{with_python}
|
||||
%files python
|
||||
%defattr(-,root,root)
|
||||
%{python_sitearch}/*
|
||||
%endif
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Sep 22 2011 Paul Wouters <paul@xelerance.com> - 1.6.11-1
|
||||
- Updated to 1.6.11
|
||||
- Cleanup spec for
|
||||
- Python goes into sitearch, not sitelib
|
||||
|
||||
* Wed Jun 08 2011 Paul Wouters <paul@xelerance.com> - 1.6.10-1
|
||||
- Updated to 1.6.10
|
||||
- commented out build dependancies for svn snapshots
|
||||
|
||||
* Sun Mar 27 2011 Paul Wouters <paul@xelerance.com> - 1.6.9-1
|
||||
- Updated to 1.6.9
|
||||
|
||||
* Mon Jan 24 2011 Paul Wouters <paul@xelerance.com> - 1.6.8-1
|
||||
- Updated to 1.6.8
|
||||
|
||||
* Thu Aug 26 2010 Paul Wouters <paul@xelerance.com> - 1.6.6-1
|
||||
- Upgraded to 1.6.6
|
||||
|
||||
* Mon Apr 26 2010 Paul Wouters <paul@xelerance.com> - 1.6.4-4
|
||||
- Disable a debug line that was added to find the LOC issue that causes
|
||||
unexpected output for automated tools using ldns-read-zone
|
||||
|
||||
* Thu Feb 11 2010 Paul Wouters <paul@xelerance.com> - 1.6.4-3
|
||||
- Applied fix svn 3186 for LOC record parsing
|
||||
|
||||
* Fri Jan 22 2010 Paul Wouters <paul@xelerance.com> - 1.6.4-2
|
||||
- libtool on EL-5 does not take --install as argument
|
||||
|
||||
* Fri Jan 22 2010 Paul Wouters <paul@xelerance.com> - 1.6.4-1
|
||||
- Upgraded to 1.6.4
|
||||
- Added ldns-python sub package
|
||||
- Patch for installing ldns-python files
|
||||
- Patch for rpath in ldns-python
|
||||
|
||||
* Sun Aug 16 2009 Paul Wouters <paul@xelerance.com> - 1.6.1-2
|
||||
- Bump version, sources file was not updated.
|
||||
|
||||
* Sun Aug 16 2009 Paul Wouters <paul@xelerance.com> - 1.6.1-1
|
||||
-Updated to 1.6.1
|
||||
|
||||
* Sat Jul 11 2009 Paul Wouters <paul@xelerance.com> - 1.6.0-1
|
||||
- Updated to 1.6.0
|
||||
|
||||
* Thu Apr 16 2009 Paul Wouters <paul@xelerance.com> - 1.5.1-2
|
||||
- Memory management bug when generating a sha256 key, see:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=493953
|
||||
|
||||
* Fri Feb 13 2009 Paul Wouters <paul@xelerance.com> - 1.5.1-1
|
||||
- Upgrade to 1.5.1 (1.5.0 was a dud release)
|
||||
|
||||
* Sun Nov 9 2008 Paul Wouters <paul@xelerance.com> - 1.4.0-2
|
||||
- libldns.so was missing in files section.
|
||||
|
||||
* Sun Nov 9 2008 Paul Wouters <paul@xelerance.com> - 1.4.0-1
|
||||
- Updated to 1.4.0
|
||||
- enable SHA2 functionality
|
||||
|
||||
* Mon Jun 30 2008 Paul Wouters <paul@xelerance.com> - 1.3.0-1
|
||||
- Updated to latest release
|
||||
|
||||
* Thu Nov 29 2007 Paul Wouters <paul@xelerance.com> - 1.2.2-1
|
||||
- Upgraded to 1.2.2.
|
||||
|
||||
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 1.0.1-4
|
||||
- Commented out 1.1.0 make targets, put make 1.0.1 targets.
|
||||
|
||||
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 1.0.1-3
|
||||
- Fixed changelog typo in date
|
||||
- Rebuild requested for PT_GNU_HASH support from gcc
|
||||
- Did not upgrade to 1.1.0 due to compile issues on x86_64
|
||||
|
||||
* Fri Jan 6 2006 Paul Wouters <paul@xelerance.com> 1.0.1-1
|
||||
- Upgraded to 1.0.1. Removed temporary clean hack from spec file.
|
||||
|
||||
* Sun Dec 18 2005 Paul Wouters <paul@xelerance.com> 1.0.0-8
|
||||
- Cannot use make clean because there are no Makefiles. Use hardcoded rm.
|
||||
|
||||
* Sun Dec 18 2005 Paul Wouters <paul@xelerance.com> 1.0.0-7
|
||||
- Patched 'make clean' target to get rid of object files shipped with 1.0.0
|
||||
|
||||
* Sun Dec 13 2005 Paul Wouters <paul@xelerance.com> 1.0.0-6
|
||||
- added a make clean for 2.3.3 since .o files were left behind upstream,
|
||||
causing failure on ppc platform
|
||||
|
||||
* Sun Dec 11 2005 Tom "spot" Callaway <tcallawa@redhat.com> 1.0.0-5
|
||||
- minor cleanups
|
||||
|
||||
* Wed Oct 5 2005 Paul Wouters <paul@xelerance.com> 0.70_1205
|
||||
- reworked for svn version
|
||||
|
||||
* Sun Sep 25 2005 Paul Wouters <paul@xelerance.com> - 0.70
|
||||
- Initial version
|
43
contrib/ldns/packaging/ldns-config.1
Normal file
43
contrib/ldns/packaging/ldns-config.1
Normal file
@ -0,0 +1,43 @@
|
||||
.TH ldns-config 1 "22 Sep 2011"
|
||||
.SH NAME
|
||||
ldns-config \- show compiler and linker flags for ldns usage.
|
||||
.SH SYNOPSIS
|
||||
.B ldns-config
|
||||
[
|
||||
.IR OPTIONS
|
||||
]
|
||||
|
||||
.SH DESCRIPTION
|
||||
When writing programs using ldns, you have to tell the compiler
|
||||
where to look for include files and what libraries from which location
|
||||
to link to. \fBldns-config\fR can be used to find out what flags to use
|
||||
with the C compiler and the linker.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB--cflags\fR
|
||||
Show the C compiler flags needed to compile with ldns
|
||||
|
||||
.TP
|
||||
\fB--libs\fR
|
||||
Show the flags to be used to link with ldns
|
||||
|
||||
.TP
|
||||
\fB--version\fR
|
||||
Shows the version of the installed ldns library
|
||||
|
||||
.TP
|
||||
\fB--help\fR
|
||||
Show \fBldns-config\fR usage description
|
||||
|
||||
.SH AUTHOR
|
||||
Written by the ldns team.
|
||||
|
||||
.SH REPORTING BUGS
|
||||
Report bugs to <ldns-team@nlnetlabs.nl>.
|
||||
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2011 NLnet Labs. This is free software. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
|
31
contrib/ldns/packaging/ldns-config.in
Executable file
31
contrib/ldns/packaging/ldns-config.in
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
VERSION="@PACKAGE_VERSION@"
|
||||
CFLAGS="@CFLAGS@"
|
||||
CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@ @PYTHON_CPPFLAGS@"
|
||||
LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@"
|
||||
LIBS="@LIBS@ @LIBSSL_LIBS@"
|
||||
LIBDIR="@libdir@"
|
||||
INCLUDEDIR="@includedir@"
|
||||
|
||||
for arg in $@
|
||||
do
|
||||
if [ $arg = "--cflags" ]
|
||||
then
|
||||
echo "-I${INCLUDEDIR}"
|
||||
fi
|
||||
if [ $arg = "--libs" ]
|
||||
then
|
||||
echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
|
||||
fi
|
||||
if [ $arg = "-h" ] || [ $arg = "--help" ]
|
||||
then
|
||||
echo "Usage: $0 [--cflags] [--libs] [--version]"
|
||||
fi
|
||||
if [ $arg = "--version" ]
|
||||
then
|
||||
echo "${VERSION}"
|
||||
fi
|
||||
done
|
13
contrib/ldns/packaging/libldns.pc.in
Normal file
13
contrib/ldns/packaging/libldns.pc.in
Normal file
@ -0,0 +1,13 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: ldns
|
||||
Description: Library for DNS programming
|
||||
URL: http://www.nlnetlabs.nl/projects/ldns
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -lldns
|
||||
Libs.private: @LDFLAGS@
|
||||
Cflags: -I${includedir}
|
@ -10,7 +10,7 @@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = libxo xo xolint tests doc
|
||||
SUBDIRS = libxo xo xolint xohtml tests doc
|
||||
bin_SCRIPTS=libxo-config
|
||||
dist_doc_DATA = Copyright
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#
|
||||
|
||||
AC_PREREQ(2.2)
|
||||
AC_INIT([libxo], [0.2.0], [phil@juniper.net])
|
||||
AC_INIT([libxo], [0.3.2], [phil@juniper.net])
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
|
||||
|
||||
# Support silent build rules. Requires at least automake-1.11.
|
||||
@ -133,6 +133,14 @@ AC_ARG_ENABLE([debug],
|
||||
AC_MSG_RESULT([$LIBXO_DEBUG])
|
||||
AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build with text-only rendering])
|
||||
AC_ARG_ENABLE([text-only],
|
||||
[ --enable-text-only Turn on text-only rendering],
|
||||
[LIBXO_TEXT_ONLY=yes; AC_DEFINE([LIBXO_TEXT_ONLY], [1], [Enable text-only rendering])],
|
||||
[LIBXO_TEXT_ONLY=no])
|
||||
AC_MSG_RESULT([$LIBXO_TEXT_ONLY])
|
||||
AM_CONDITIONAL([LIBXO_TEXT_ONLY], [test "$LIBXO_TEXT_ONLY" != "no"])
|
||||
|
||||
AC_CHECK_LIB([m], [lrint])
|
||||
AM_CONDITIONAL([HAVE_LIBM], [test "$HAVE_LIBM" != "no"])
|
||||
|
||||
@ -233,6 +241,7 @@ AC_CONFIG_FILES([
|
||||
libxo/xoversion.h
|
||||
xo/Makefile
|
||||
xolint/Makefile
|
||||
xohtml/Makefile
|
||||
packaging/libxo.pc
|
||||
doc/Makefile
|
||||
tests/Makefile
|
||||
@ -253,6 +262,7 @@ AC_MSG_NOTICE([summary of build options:
|
||||
bindir: ${XO_BINDIR}
|
||||
includedir: ${XO_INCLUDEDIR}
|
||||
share dir: ${XO_SHAREDIR}
|
||||
oxtradoc dir: ${SLAX_OXTRADOCDIR}
|
||||
|
||||
compiler: ${CC} (${HAVE_GCC:-no})
|
||||
compiler flags: ${CFLAGS}
|
||||
@ -262,4 +272,5 @@ AC_MSG_NOTICE([summary of build options:
|
||||
debug: ${LIBXO_DEBUG:-no}
|
||||
printf-like: ${HAVE_PRINTFLIKE:-no}
|
||||
libxo-options: ${LIBXO_OPTS:-no}
|
||||
text-only: ${LIBXO_TEXT_ONLY:-no}
|
||||
])
|
||||
|
@ -134,7 +134,7 @@ A single libxo function call in source code is all that's required:
|
||||
<host>my-box</host>
|
||||
<domain>example.com</domain>
|
||||
JSON:
|
||||
"host": my-box",
|
||||
"host": "my-box",
|
||||
"domain": "example.com"
|
||||
|
||||
For brevity, the HTML output is emitted.
|
||||
@ -228,17 +228,17 @@ data, including data type, description, and an XPath location.
|
||||
<div class="line">
|
||||
<div class="data" data-tag="blocks">36</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data data-tag="path">./src</div>
|
||||
<div class="data" data-tag="path">./src</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="blocks">40</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data data-tag="path">./bin</div>
|
||||
<div class="data" data-tag="path">./bin</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="blocks">90</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data data-tag="path">./</div>
|
||||
<div class="data" data-tag="path">./</div>
|
||||
</div>
|
||||
|
||||
** Format Strings @format-strings@
|
||||
@ -285,6 +285,7 @@ content. The roles are listed below; only one role is permitted:
|
||||
|---+--------------+-------------------------------------------------|
|
||||
| M | Name | Description |
|
||||
|---+--------------+-------------------------------------------------|
|
||||
| C | color/effect | Field has color and effect controls |
|
||||
| D | decoration | Field is non-text (e.g., colon, comma) |
|
||||
| E | error | Field is an error message |
|
||||
| L | label | Field is text that prefixes a value |
|
||||
@ -298,6 +299,56 @@ content. The roles are listed below; only one role is permitted:
|
||||
| ] | stop anchor | End a section of anchored variable-width text |
|
||||
|---+--------------+-------------------------------------------------|
|
||||
|
||||
**** The Color Role ({C:})
|
||||
|
||||
Colors and effects control how text values are displayed; they are
|
||||
used for display styles (TEXT and HTML). The color content can be
|
||||
either static, when placed directly within the field descriptor, or a
|
||||
printf-style format descriptor can be used, if preceded by a slash ("/"):
|
||||
|
||||
xo_emit("{C:bold}{Lwc:Cost}{:cost/%u}{C:reset}\n", cost);
|
||||
xo_emit("{C:/fg-%s,bg-%s}{Lwc:Cost}{:cost/%u}{C:reset}\n",
|
||||
fg_color, bg_color, cost);
|
||||
|
||||
The content should be a comma-separated list of zero or more colors or
|
||||
display effects. Colors and effects remain in effect until
|
||||
modified by other "C" roles. If the content is empty, the "reset"
|
||||
action is performed.
|
||||
|
||||
|---------------+-------------------------------------------------|
|
||||
| Name | Description |
|
||||
|---------------+-------------------------------------------------|
|
||||
| bg-XXXXX | Change background color |
|
||||
| bold | Start bold text effect |
|
||||
| fg-XXXXX | Change foreground color |
|
||||
| inverse | Start inverse (aka reverse) text effect |
|
||||
| no-bold | Stop bold text effect |
|
||||
| no-inverse | Stop inverse (aka reverse) text effect |
|
||||
| no-underline | Stop underline text effect |
|
||||
| normal | Reset effects (only) |
|
||||
| reset | Reset colors and effects (restore defaults) |
|
||||
| underline | Start underline text effect |
|
||||
|---------------+-------------------------------------------------|
|
||||
|
||||
The following color names are supported:
|
||||
|
||||
|---------------|
|
||||
| Name |
|
||||
|---------------|
|
||||
| black |
|
||||
| blue |
|
||||
| cyan |
|
||||
| default |
|
||||
| green |
|
||||
| magenta |
|
||||
| red |
|
||||
| white |
|
||||
| yellow |
|
||||
|---------------|
|
||||
|
||||
Color names are prefixed with either "fg-" or "bg-" to change the
|
||||
foreground and background colors, respectively.
|
||||
|
||||
**** The Decoration Role ({D:})
|
||||
|
||||
Decorations are typically punctuation marks such as colons,
|
||||
@ -1404,9 +1455,21 @@ functions like xo_failure, xo_warn, xo_err, etc. The program name is
|
||||
initialized by xo_parse_args, but subsequent calls to xo_set_program
|
||||
can override this value.
|
||||
|
||||
xo_set_program(argv[0]);
|
||||
|
||||
Note that the value is not copied, so the memory passed to
|
||||
xo_set_program (and xo_parse_args) must be maintained by the caller.
|
||||
|
||||
*** xo_set_version
|
||||
|
||||
The xo_set_version function records a version number to be emitted as
|
||||
part of the data for encoding styles (XML and JSON). This version
|
||||
number is suitable for tracking changes in the content, allowing a
|
||||
user of the data to discern which version of the data model is in use.
|
||||
|
||||
void xo_set_version (const char *version);
|
||||
void xo_set_version_h (xo_handle_t *xop, const char *version);
|
||||
|
||||
*** Field Information (xo_info_t) @info@
|
||||
|
||||
HTML data can include additional information in attributes that
|
||||
@ -1705,6 +1768,32 @@ The "-V" option does not report errors, but prints a complete list of
|
||||
all field names, sorted alphabetically. The output can help spot
|
||||
inconsistencies and spelling errors.
|
||||
|
||||
* xohtml
|
||||
|
||||
xohtml is a tool for turning the output of libxo-enabled commands into
|
||||
html files suitable for display in modern HTML web browsers. It can
|
||||
be used to test and debug HTML output, as well as to make the user
|
||||
ache to escape the world of 70s terminal devices.
|
||||
|
||||
xohtml is given a command, either on the command line or via the "-c"
|
||||
option. If not command is given, standard input is used. The
|
||||
command's output is wrapped in HTML tags, with references to
|
||||
supporting CSS and Javascript files, and written to standard output or
|
||||
the file given in the "-f" option. The "-b" option can be used to
|
||||
provide an alternative base path for the support files.
|
||||
|
||||
|--------------+---------------------------------------------------|
|
||||
| Option | Meaning |
|
||||
|--------------+---------------------------------------------------|
|
||||
| -b <base> | Base path for finding css/javascript files |
|
||||
| -c <command> | Command to execute |
|
||||
| -f <file> | Output file name |
|
||||
|--------------+---------------------------------------------------|
|
||||
|
||||
The "-c" option takes a full command with arguments, including
|
||||
any libxo options needed to generate html ("--libxo=html"). This
|
||||
value must be quoted if it consists of multiple tokens.
|
||||
|
||||
* FAQs
|
||||
|
||||
This section contains the set of questions that users typically ask,
|
||||
|
@ -38,12 +38,15 @@ man_MANS = \
|
||||
xo_no_setlocale.3 \
|
||||
xo_open_container.3 \
|
||||
xo_open_list.3 \
|
||||
xo_open_marker.3 \
|
||||
xo_parse_args.3 \
|
||||
xo_set_allocator.3 \
|
||||
xo_set_flags.3 \
|
||||
xo_set_info.3 \
|
||||
xo_set_options.3 \
|
||||
xo_set_style.3 \
|
||||
xo_set_version.3 \
|
||||
xo_set_writer.3
|
||||
|
||||
EXTRA_DIST =
|
||||
EXTRA_DIST = ${man_MANS}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* libxo provides a means of generating text, XML, and JSON output
|
||||
* libxo provides a means of generating text, XML, JSON, and HTML output
|
||||
* using a single set of function calls, maximizing the value of output
|
||||
* while minimizing the cost/impact on the code.
|
||||
*/
|
||||
@ -17,6 +17,27 @@
|
||||
#ifndef INCLUDE_XO_H
|
||||
#define INCLUDE_XO_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __dead2
|
||||
#define NORETURN __dead2
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif /* __dead2 */
|
||||
|
||||
/*
|
||||
* Normally we'd use the HAVE_PRINTFLIKE define triggered by the
|
||||
* --enable-printflike option to configure, but we don't install
|
||||
* our internal "xoconfig.h", and I'd rather not. Taking the
|
||||
* coward's path, we'll turn it on inside a #if that allows
|
||||
* others to turn it off where needed. Not ideal, but functional.
|
||||
*/
|
||||
#if !defined(NO_PRINTFLIKE) && !defined(__linux__)
|
||||
#define PRINTFLIKE(_x, _y) __printflike(_x, _y)
|
||||
#else
|
||||
#define PRINTFLIKE(_x, _y)
|
||||
#endif /* NO_PRINTFLIKE */
|
||||
|
||||
/** Formatting types */
|
||||
typedef unsigned xo_style_t;
|
||||
#define XO_STYLE_TEXT 0 /** Generate text output */
|
||||
@ -58,6 +79,8 @@ typedef unsigned long long xo_xof_flags_t;
|
||||
#define XOF_FLUSH_LINE XOF_BIT(23) /** Flush after each newline */
|
||||
|
||||
#define XOF_NO_CLOSE XOF_BIT(24) /** xo_finish won't close open elements */
|
||||
#define XOF_COLOR_ALLOWED XOF_BIT(25) /** Allow color/effects to be enabled */
|
||||
#define XOF_COLOR XOF_BIT(26) /** Enable color and effects */
|
||||
|
||||
/*
|
||||
* The xo_info_t structure provides a mapping between names and
|
||||
@ -260,64 +283,116 @@ void
|
||||
xo_set_leading_xpath (xo_handle_t *xop, const char *path);
|
||||
|
||||
void
|
||||
xo_warn_hc (xo_handle_t *xop, int code, const char *fmt, ...);
|
||||
xo_warn_hc (xo_handle_t *xop, int code, const char *fmt, ...) PRINTFLIKE(3, 4);
|
||||
|
||||
void
|
||||
xo_warn_c (int code, const char *fmt, ...);
|
||||
xo_warn_c (int code, const char *fmt, ...) PRINTFLIKE(2, 3);
|
||||
|
||||
void
|
||||
xo_warn (const char *fmt, ...);
|
||||
xo_warn (const char *fmt, ...) PRINTFLIKE(1, 2);
|
||||
|
||||
void
|
||||
xo_warnx (const char *fmt, ...);
|
||||
xo_warnx (const char *fmt, ...) PRINTFLIKE(1, 2);
|
||||
|
||||
void
|
||||
xo_err (int eval, const char *fmt, ...) __dead2;
|
||||
xo_err (int eval, const char *fmt, ...) NORETURN PRINTFLIKE(2, 3);
|
||||
|
||||
void
|
||||
xo_errx (int eval, const char *fmt, ...) __dead2;
|
||||
xo_errx (int eval, const char *fmt, ...) NORETURN PRINTFLIKE(2, 3);
|
||||
|
||||
void
|
||||
xo_errc (int eval, int code, const char *fmt, ...) __dead2;
|
||||
xo_errc (int eval, int code, const char *fmt, ...) NORETURN PRINTFLIKE(3, 4);
|
||||
|
||||
void
|
||||
xo_message_hcv (xo_handle_t *xop, int code, const char *fmt, va_list vap);
|
||||
|
||||
void
|
||||
xo_message_hc (xo_handle_t *xop, int code, const char *fmt, ...);
|
||||
xo_message_hc (xo_handle_t *xop, int code, const char *fmt, ...) PRINTFLIKE(3, 4);
|
||||
|
||||
void
|
||||
xo_message_c (int code, const char *fmt, ...);
|
||||
xo_message_c (int code, const char *fmt, ...) PRINTFLIKE(2, 3);
|
||||
|
||||
void
|
||||
xo_message (const char *fmt, ...);
|
||||
xo_message (const char *fmt, ...) PRINTFLIKE(1, 2);
|
||||
|
||||
void
|
||||
xo_no_setlocale (void);
|
||||
|
||||
/**
|
||||
* @brief Lift libxo-specific arguments from a set of arguments
|
||||
*
|
||||
* libxo-enable programs typically use command line options to enable
|
||||
* all the nifty-cool libxo features. xo_parse_args() makes this simple
|
||||
* by pre-processing the command line arguments given to main(), handling
|
||||
* and removing the libxo-specific ones, meaning anything starting with
|
||||
* "--libxo". A full description of these arguments is in the base
|
||||
* documentation.
|
||||
* @param[in] argc Number of arguments (ala #main())
|
||||
* @param[in] argc Array of argument strings (ala #main())
|
||||
* @return New number of arguments, or -1 for failure.
|
||||
*/
|
||||
int
|
||||
xo_parse_args (int argc, char **argv);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This is the "magic" number returned by libxo-supporting commands
|
||||
* when passed the equally magic "--libxo-check" option. If you
|
||||
* return this, we can assume that since you know the magic handshake,
|
||||
* you'll happily handle future --libxo options and not do something
|
||||
* violent like reboot the box or create another hole in the ozone
|
||||
* layer.
|
||||
* return this, we can (unsafely) assume that since you know the magic
|
||||
* handshake, you'll happily handle future --libxo options and not do
|
||||
* something violent like reboot the box or create another hole in the
|
||||
* ozone layer.
|
||||
*/
|
||||
#define XO_HAS_LIBXO 121
|
||||
|
||||
/*
|
||||
* externs for our version number strings
|
||||
/**
|
||||
* externs for libxo's version number strings
|
||||
*/
|
||||
extern const char xo_version[];
|
||||
extern const char xo_version_extra[];
|
||||
extern const char xo_version[]; /** Base version triple string */
|
||||
extern const char xo_version_extra[]; /** Extra version magic content */
|
||||
|
||||
/**
|
||||
* @brief Dump the internal stack of a libxo handle.
|
||||
*
|
||||
* This diagnostic function is something I will ask you to call from
|
||||
* your program when you write to tell me libxo has gone bat-stink
|
||||
* crazy and has discarded your list or container or content. Output
|
||||
* content will be what we lovingly call "developer entertainment".
|
||||
* @param[in] xop A valid libxo handle, or NULL for the default handle
|
||||
*/
|
||||
void
|
||||
xo_dump_stack (xo_handle_t *xop);
|
||||
|
||||
/**
|
||||
* @brief Recode the name of the program, suitable for error output.
|
||||
*
|
||||
* libxo will record the given name for use while generating error
|
||||
* messages. The contents are not copied, so the value must continue
|
||||
* to point to a valid memory location. This allows the caller to change
|
||||
* the value, but requires the caller to manage the memory. Typically
|
||||
* this is called with argv[0] from main().
|
||||
* @param[in] name The name of the current application program
|
||||
*/
|
||||
void
|
||||
xo_set_program (const char *name);
|
||||
|
||||
/**
|
||||
* @brief Add a version string to the output, where possible.
|
||||
*
|
||||
* Adds a version number to the output, suitable for tracking
|
||||
* changes in the content. This is only important for the "encoding"
|
||||
* format styles (XML and JSON) and allows a user of the data to
|
||||
* discern which version of the data model is in use.
|
||||
* @param[in] version The version number, encoded as a string
|
||||
*/
|
||||
void
|
||||
xo_set_version (const char *version);
|
||||
|
||||
/**
|
||||
* #xo_set_version with a handle.
|
||||
* @param[in] xop A valid libxo handle, or NULL for the default handle
|
||||
* @param[in] version The version number, encoded as a string
|
||||
*/
|
||||
void
|
||||
xo_set_version_h (xo_handle_t *xop, const char *version);
|
||||
|
||||
#endif /* INCLUDE_XO_H */
|
||||
|
@ -28,12 +28,13 @@ The
|
||||
argument is a string containing printf-style formatting
|
||||
instructions that describe the remaining arguments.
|
||||
.Pp
|
||||
When converting an application to libxo, one can replace
|
||||
When converting an application to
|
||||
.Nm libxo ,
|
||||
one can replace
|
||||
.Em "fprintf(stderr,...)"
|
||||
calls with
|
||||
.Fn xo_error
|
||||
calls.
|
||||
.Pp
|
||||
.Sh ADDITIONAL DOCUMENTATION
|
||||
Complete documentation can be found on github:
|
||||
.Bd -literal -offset indent
|
||||
@ -53,7 +54,7 @@ is available at:
|
||||
https://github.com/Juniper/libxo/releases
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr printf 3
|
||||
.Xr printf 3 ,
|
||||
.Xr xo_emit 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
|
@ -74,7 +74,7 @@ function as an unsigned integer.
|
||||
.Ed
|
||||
.Pp
|
||||
This single line of code can generate text ("In stock: 65\\n"), XML
|
||||
("<in-stock>65</in-stock>"), JSON ('"in-stock": 6'), or HTML (too
|
||||
("<in-stock>65</in-stock>"), JSON ('"in-stock": 65'), or HTML (too
|
||||
lengthy to be listed here).
|
||||
.Ss Modifier Roles
|
||||
Modifiers are optional, and indicate the role and formatting of the
|
||||
@ -96,6 +96,55 @@ The roles are listed below; only one role is permitted:
|
||||
.It \&] "stop anchor " "End a section of anchored variable-width text"
|
||||
.El
|
||||
.Pp
|
||||
.Ss The Color Role ({C:})
|
||||
Colors and effects control how text values are displayed; they are
|
||||
used for display styles (TEXT and HTML).
|
||||
The color content can be
|
||||
either static, when placed directly within the field descriptor, or a
|
||||
printf-style format descriptor can be used, if preceded by a slash ("/"):
|
||||
.Bd -literal -offset indent
|
||||
xo_emit("{C:bold}{Lwc:Cost}{:cost/%u}{C:reset}\n", cost);
|
||||
xo_emit("{C:/fg-%s,bg-%s}{Lwc:Cost}{:cost/%u}{C:reset}\n",
|
||||
fg_color, bg_color, cost);
|
||||
.Ed
|
||||
.Pp
|
||||
The content should be a comma-separated list of zero or more colors or
|
||||
display effects.
|
||||
.Pp
|
||||
Colors and effects remain in effect until modified by other "C" roles.
|
||||
.Pp
|
||||
If the content is empty, the "reset" action is performed.
|
||||
.Pp
|
||||
.Bl -column "no-underline"
|
||||
.It Sy "Name Description"
|
||||
.It "bg-xxxxx " "Change background color"
|
||||
.It "bold " "Start bold text effect"
|
||||
.It "fg-xxxxx " "Change foreground color"
|
||||
.It "inverse " "Start inverse (aka reverse) text effect"
|
||||
.It "no-bold " "Stop bold text effect"
|
||||
.It "no-inverse " "Stop inverse (aka reverse) text effect"
|
||||
.It "no-underline " "Stop underline text effect"
|
||||
.It "normal " "Reset effects (only)"
|
||||
.It "reset " "Reset colors and effects (restore defaults)"
|
||||
.It "underline " "Start underline text effect"
|
||||
.El
|
||||
.Pp
|
||||
The following color names are supported:
|
||||
.Bl -column "no-underline"
|
||||
.It Sy "Name"
|
||||
.It black
|
||||
.It blue
|
||||
.It cyan
|
||||
.It default
|
||||
.It green
|
||||
.It magenta
|
||||
.It red
|
||||
.It white
|
||||
.It yellow
|
||||
.El
|
||||
.Pp
|
||||
Color names are prefixed with either "fg-" or "bg-" to change the
|
||||
foreground and background colors, respectively.
|
||||
.Ss The Decoration Role ({D:})
|
||||
Decorations are typically punctuation marks such as colons,
|
||||
semi-colons, and commas used to decorate the text and make it simpler
|
||||
@ -230,6 +279,7 @@ content emitted for some output styles:
|
||||
.It d "display " "Only emit field for display styles (text/HTML)"
|
||||
.It e "encoding " "Only emit for encoding styles (XML/JSON)"
|
||||
.It k "key " "Field is a key, suitable for XPath predicates"
|
||||
.It l "leaf " "Field is a leaf-list, a list of leaf values"
|
||||
.It n "no-quotes " "Do not quote the field when using JSON style"
|
||||
.It q "quotes " "Quote the field when using JSON style"
|
||||
.It w "white space " "A blank ("" "") is appended after the label"
|
||||
@ -269,8 +319,8 @@ the display output styles, TEXT and HTML.
|
||||
The display modifier is the opposite of the encoding modifier, and
|
||||
they are often used to give to distinct views of the underlying data.
|
||||
.Ss The Encoding Modifier ({e:})
|
||||
The display modifier indicated the field should only be generated for
|
||||
the display output styles, TEXT and HTML.
|
||||
The encoding modifier indicated the field should only be generated for
|
||||
the encoding output styles, such as JSON and XML.
|
||||
.Bd -literal -offset indent
|
||||
EXAMPLE:
|
||||
xo_emit("{Lcw:Name}{:name} {e:id/%d}\\n", "phil", 1);
|
||||
|
@ -11,8 +11,8 @@
|
||||
.Dt LIBXO 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm xo_emit
|
||||
.Nd emit formatted output based on format string and arguments
|
||||
.Nm xo_open_container
|
||||
.Nd open (and close) container constructs
|
||||
.Sh LIBRARY
|
||||
.Lb libxo
|
||||
.Sh SYNOPSIS
|
||||
@ -48,7 +48,7 @@
|
||||
.Fn xo_close_container_d "void"
|
||||
.Sh DESCRIPTION
|
||||
.Nm libxo
|
||||
represents to types of hierarchy:
|
||||
represents two types of hierarchy:
|
||||
.Dq containers
|
||||
and
|
||||
.Dq lists .
|
||||
@ -72,7 +72,7 @@ or
|
||||
.Fn xo_close_container_h
|
||||
functions.
|
||||
.Pp
|
||||
Each open call must have a matching close call.
|
||||
Each open call should have a matching close call.
|
||||
If the
|
||||
.Dv XOF_WARN
|
||||
flag is set and the name given does not match the name of
|
||||
|
138
contrib/libxo/libxo/xo_open_marker.3
Normal file
138
contrib/libxo/libxo/xo_open_marker.3
Normal file
@ -0,0 +1,138 @@
|
||||
.\" #
|
||||
.\" # Copyright (c) 2015, Juniper Networks, Inc.
|
||||
.\" # All rights reserved.
|
||||
.\" # This SOFTWARE is licensed under the LICENSE provided in the
|
||||
.\" # ../Copyright file. By downloading, installing, copying, or
|
||||
.\" # using the SOFTWARE, you agree to be bound by the terms of that
|
||||
.\" # LICENSE.
|
||||
.\" # Phil Shafer, January 2015
|
||||
.\"
|
||||
.Dd January 22, 2015
|
||||
.Dt LIBXO 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm xo_open_marker
|
||||
.Nd prevent and allow closing of open constructs
|
||||
.Sh LIBRARY
|
||||
.Lb libxo
|
||||
.Sh SYNOPSIS
|
||||
.In libxo/xo.h
|
||||
.Sh NAME
|
||||
.Nm xo_open_marker
|
||||
.Nm xo_open_marker_h
|
||||
.Nm xo_close_marker
|
||||
.Nm xo_close_marker_h
|
||||
.Nd open and close markers
|
||||
.Sh LIBRARY
|
||||
.Lb libxo
|
||||
.Sh SYNOPSIS
|
||||
.Ft int
|
||||
.Fn xo_open_marker "const char *name"
|
||||
.Ft int
|
||||
.Fn xo_open_marker_h "xo_handle_t *handle" "const char *name"
|
||||
.Ft int
|
||||
.Fn xo_close_marker "const char *name"
|
||||
.Ft int
|
||||
.Fn xo_close_marker_h "xo_handle_t *handle" "const char *name"
|
||||
.Sh DESCRIPTION
|
||||
.Nm libxo
|
||||
represents hierarchy using two constructs:
|
||||
.Dq containers
|
||||
and
|
||||
.Dq lists .
|
||||
A marker can be used to affect how open constructs are closed, either
|
||||
by preventing their (implicit or explicit) closure or by forcing their
|
||||
closure.
|
||||
While a marker is open, no other open constructs can be closed.
|
||||
When a marker is closed, all constructs open since the marker was opened
|
||||
will be closed.
|
||||
A marker is used to "freeze" any open constructs.
|
||||
Calls to
|
||||
.Fn xo_close_*
|
||||
functions that would normally close them will be ignored, effectively
|
||||
blocking their closure.
|
||||
However when
|
||||
.Fn xo_close_marker
|
||||
is called, any containers, lists, or leaf-lists open since the
|
||||
matching
|
||||
.Fn xo_open_marker
|
||||
call will be close and the marker discarded.
|
||||
Markers use names which are not user-visible, allowing the caller to
|
||||
choose appropriate internal names.
|
||||
The marker has no value and is not emitted in any form.
|
||||
.Pp
|
||||
To open a marker, call
|
||||
.Fn xo_open_marker
|
||||
or
|
||||
.Fn xo_open_marker_h .
|
||||
The former uses the default handle and
|
||||
the latter accepts a specific handle.
|
||||
.Pp
|
||||
To close a marker, use the
|
||||
.Fn xo_close_marker
|
||||
or
|
||||
.Fn xo_close_marker_h
|
||||
functions.
|
||||
.Pp
|
||||
Each open call must have a matching close call.
|
||||
.Pp
|
||||
In this example, the
|
||||
.Fn xo_close_container
|
||||
call on line [1] will be ignored, since the open marker "outer"
|
||||
will prevent close of any open constructs that precede it.
|
||||
The
|
||||
.Fn xo_close_marker
|
||||
call on line [2] will close the "system" container, since it was
|
||||
opened after the "outer" marker.
|
||||
.Bd -literal -offset indent -compact
|
||||
Example:
|
||||
|
||||
xo_open_container("top");
|
||||
xo_open_marker("outer");
|
||||
xo_open_container("system");
|
||||
xo_emit("{:host-name/%s%s%s", hostname,
|
||||
domainname ? "." : "", domainname ?: "");
|
||||
xo_close_container("top"); /* [1] */
|
||||
xo_close_marker("outer"); /* [2] */
|
||||
xo_close_container("top");
|
||||
.Ed
|
||||
.Pp
|
||||
In this example, the code whiffles through a list of fish, calling a
|
||||
function to emit details about each fish. The marker "fish-guts" is
|
||||
used to ensure that any constructs opened by the function are closed
|
||||
properly.
|
||||
.Bd -literal -offset indent
|
||||
for (i = 0; fish[i]; i++) {
|
||||
xo_open_instance("fish");
|
||||
xo_open_marker("fish-guts");
|
||||
dump_fish_details(i);
|
||||
xo_close_marker("fish-guts");
|
||||
}
|
||||
.Ed
|
||||
.Sh ADDITIONAL DOCUMENTATION
|
||||
Complete documentation can be found on github:
|
||||
.Bd -literal -offset indent
|
||||
http://juniper.github.io/libxo/libxo-manual.html
|
||||
.Ed
|
||||
.Pp
|
||||
.Nm libxo
|
||||
lives on github as:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo
|
||||
.Ed
|
||||
.Pp
|
||||
The latest release of
|
||||
.Nm libxo
|
||||
is available at:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo/releases
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr xo_emit 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm libxo
|
||||
library was added in
|
||||
.Fx 11.0 .
|
||||
.Sh AUTHOR
|
||||
Phil Shafer
|
59
contrib/libxo/libxo/xo_set_version.3
Normal file
59
contrib/libxo/libxo/xo_set_version.3
Normal file
@ -0,0 +1,59 @@
|
||||
.\" #
|
||||
.\" # Copyright (c) 2015, Juniper Networks, Inc.
|
||||
.\" # All rights reserved.
|
||||
.\" # This SOFTWARE is licensed under the LICENSE provided in the
|
||||
.\" # ../Copyright file. By downloading, installing, copying, or
|
||||
.\" # using the SOFTWARE, you agree to be bound by the terms of that
|
||||
.\" # LICENSE.
|
||||
.\" # Phil Shafer, July 2014
|
||||
.\"
|
||||
.Dd December 4, 2014
|
||||
.Dt LIBXO 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm xo_set_version
|
||||
.Nd record content version information in encoded output
|
||||
.Sh LIBRARY
|
||||
.Lb libxo
|
||||
.Sh SYNOPSIS
|
||||
.In libxo/xo.h
|
||||
.Ft void
|
||||
.Fn xo_set_version "const char *version"
|
||||
.Ft void
|
||||
.Fn xo_set_version_h "xo_handle_t *xop" "const char *version"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm xo_set_version
|
||||
function records a version number to be emitted as
|
||||
part of the data for encoding styles (XML and JSON).
|
||||
This version number is suitable for tracking changes in the content,
|
||||
allowing a user of the data to discern which version of the data model
|
||||
is in use.
|
||||
.Sh ADDITIONAL DOCUMENTATION
|
||||
Complete documentation can be found on github:
|
||||
.Bd -literal -offset indent
|
||||
http://juniper.github.io/libxo/libxo-manual.html
|
||||
.Ed
|
||||
.Pp
|
||||
.Nm libxo
|
||||
lives on github as:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo
|
||||
.Ed
|
||||
.Pp
|
||||
The latest release of
|
||||
.Nm libxo
|
||||
is available at:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo/releases
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr xo_emit 3 ,
|
||||
.Xr libxo 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm libxo
|
||||
library was added in
|
||||
.Fx 11.0 .
|
||||
.Sh AUTHOR
|
||||
Phil Shafer
|
@ -150,8 +150,10 @@
|
||||
/* Enable debugging */
|
||||
/* #undef LIBXO_DEBUG */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Enable text-only rendering */
|
||||
/* #undef LIBXO_TEXT_ONLY */
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
@ -164,7 +166,7 @@
|
||||
#define PACKAGE_NAME "libxo"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libxo 0.2.0"
|
||||
#define PACKAGE_STRING "libxo 0.3.2"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libxo"
|
||||
@ -173,7 +175,7 @@
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.2.0"
|
||||
#define PACKAGE_VERSION "0.3.2"
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
@ -187,7 +189,7 @@
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.2.0"
|
||||
#define VERSION "0.3.2"
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
|
@ -149,8 +149,10 @@
|
||||
/* Enable debugging */
|
||||
#undef LIBXO_DEBUG
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Enable text-only rendering */
|
||||
#undef LIBXO_TEXT_ONLY
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
|
@ -18,17 +18,17 @@
|
||||
/**
|
||||
* The version string
|
||||
*/
|
||||
#define LIBXO_VERSION "0.2.0"
|
||||
#define LIBXO_VERSION "0.3.2"
|
||||
|
||||
/**
|
||||
* The version number
|
||||
*/
|
||||
#define LIBXO_VERSION_NUMBER 2000
|
||||
#define LIBXO_VERSION_NUMBER 3002
|
||||
|
||||
/**
|
||||
* The version number as a string
|
||||
*/
|
||||
#define LIBXO_VERSION_STRING "2000"
|
||||
#define LIBXO_VERSION_STRING "3002"
|
||||
|
||||
/**
|
||||
* The version number extra info as a string
|
||||
|
2561
contrib/libxo/m4/libtool.m4
vendored
2561
contrib/libxo/m4/libtool.m4
vendored
File diff suppressed because it is too large
Load Diff
127
contrib/libxo/m4/ltoptions.m4
vendored
127
contrib/libxo/m4/ltoptions.m4
vendored
@ -1,14 +1,14 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
@ -319,11 +321,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
|
12
contrib/libxo/m4/ltversion.m4
vendored
12
contrib/libxo/m4/ltversion.m4
vendored
@ -1,6 +1,6 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@ -9,15 +9,15 @@
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
@ -20,7 +20,8 @@ test_05.c \
|
||||
test_06.c \
|
||||
test_07.c \
|
||||
test_08.c \
|
||||
test_09.c
|
||||
test_09.c \
|
||||
test_10.c
|
||||
|
||||
test_01_test_SOURCES = test_01.c
|
||||
test_02_test_SOURCES = test_02.c
|
||||
@ -31,6 +32,7 @@ test_06_test_SOURCES = test_06.c
|
||||
test_07_test_SOURCES = test_07.c
|
||||
test_08_test_SOURCES = test_08.c
|
||||
test_09_test_SOURCES = test_09.c
|
||||
test_10_test_SOURCES = test_10.c
|
||||
|
||||
# TEST_CASES := $(shell cd ${srcdir} ; echo *.c )
|
||||
|
||||
|
@ -91,7 +91,11 @@
|
||||
},
|
||||
"data": {
|
||||
"item": [
|
||||
"gum", "rope", "ladder", "bolt", "water"
|
||||
"gum",
|
||||
"rope",
|
||||
"ladder",
|
||||
"bolt",
|
||||
"water"
|
||||
]
|
||||
},
|
||||
"cost": 425,
|
||||
|
@ -26,7 +26,9 @@
|
||||
"cur": 20,
|
||||
"max": 125,
|
||||
"flag": [
|
||||
"one", "two", "three"
|
||||
"one",
|
||||
"two",
|
||||
"three"
|
||||
],
|
||||
"empty-tag": true,
|
||||
"t1": "1000",
|
||||
|
@ -1 +1 @@
|
||||
<div class="line"><div class="text">Οὐχὶ ταὐτὰ παρίσταταί μοι </div><div class="data" data-tag="v1">γιγνώσκειν</div><div class="text">, </div><div class="data" data-tag="v2">ὦ ἄνδρες ᾿Αθηναῖοι</div></div><div class="line"><div class="text">გთხოვთ </div><div class="data" data-tag="v1">ახლავე გაიაროთ რეგისტრაცია</div><div class="text"> </div><div class="data" data-tag="v2">Unicode-ის მეათე საერთაშორისო</div></div><div class="line"><div class="title">First Name </div><div class="title">Last Name </div><div class="title">Department </div><div class="title">Time (%)</div></div><div class="line"><div class="data" data-tag="first-name">Jim</div><div class="text"> (</div><div class="data" data-tag="nic-name">"რეგტ"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">გთხოვთ ახ </div><div class="data" data-tag="department"> 431</div><div class="data" data-tag="percent-time"> 90</div></div><div class="line"><div class="data" data-tag="first-name">Terry</div><div class="text"> (</div><div class="data" data-tag="nic-name">"<one"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Οὐχὶ ταὐτὰ παρ</div><div class="data" data-tag="department"> 660</div><div class="data" data-tag="percent-time"> 90</div></div><div class="line"><div class="data" data-tag="first-name">Leslie</div><div class="text"> (</div><div class="data" data-tag="nic-name">"Les"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Patterson </div><div class="data" data-tag="department"> 341</div><div class="data" data-tag="percent-time"> 60</div></div><div class="line"><div class="data" data-tag="first-name">Ashley</div><div class="text"> (</div><div class="data" data-tag="nic-name">"Ash"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Meter & Smith </div><div class="data" data-tag="department"> 1440</div><div class="data" data-tag="percent-time"> 40</div></div><div class="line"><div class="data" data-tag="first-name">0123456789</div><div class="text"> (</div><div class="data" data-tag="nic-name">"0123456789"</div><div class="text">)</div><div class="data" data-tag="last-name">01234567890123</div><div class="data" data-tag="department"> 1440</div><div class="data" data-tag="percent-time"> 40</div></div><div class="line"><div class="data" data-tag="first-name">ახლა</div><div class="text"> (</div><div class="data" data-tag="nic-name">"გაიარო"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">საერთაშორისო </div><div class="data" data-tag="department"> 123</div><div class="data" data-tag="percent-time"> 90</div></div>
|
||||
<div class="line"><div class="text">Οὐχὶ ταὐτὰ παρίσταταί μοι </div><div class="data" data-tag="v1">γιγνώσκειν</div><div class="text">, </div><div class="data" data-tag="v2">ὦ ἄνδρες ᾿Αθηναῖοι</div></div><div class="line"><div class="text">გთხოვთ </div><div class="data" data-tag="v1">ახლავე გაიაროთ რეგისტრაცია</div><div class="text"> </div><div class="data" data-tag="v2">Unicode-ის მეათე საერთაშორისო</div></div><div class="line"><div class="title">Width</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="width">63</div></div><div class="line"><div class="text">[</div><div class="data" data-tag="sinhala">෴ණ්ණ෴</div><div class="text">]</div></div><div class="line"><div class="title">Width</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="width">7</div></div><div class="line"><div class="text">[</div><div class="data" data-tag="sinhala">෴</div><div class="text">]</div></div><div class="line"><div class="title">Width</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="width">3</div></div><div class="line"><div class="text">[</div><div class="data" data-tag="sinhala">෴ණ්ණ</div><div class="text">]</div></div><div class="line"><div class="text">[</div><div class="data" data-tag="not-sinhala">1234</div><div class="text">]</div></div><div class="line"><div class="text">[</div><div class="data" data-tag="tag">ර්ඝ</div><div class="text">]</div></div><div class="line"><div class="title">Width</div><div class="decoration">:</div><div class="padding"> </div><div class="data" data-tag="width">5</div></div><div class="line"><div class="title">First Name </div><div class="title">Last Name </div><div class="title">Department </div><div class="title">Time (%)</div></div><div class="line"><div class="data" data-tag="first-name">Jim</div><div class="text"> (</div><div class="data" data-tag="nic-name">"რეგტ"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">გთხოვთ ახ </div><div class="data" data-tag="department"> 431</div><div class="data" data-tag="percent-time"> 90</div></div><div class="line"><div class="data" data-tag="first-name">Terry</div><div class="text"> (</div><div class="data" data-tag="nic-name">"<one"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Οὐχὶ ταὐτὰ παρ</div><div class="data" data-tag="department"> 660</div><div class="data" data-tag="percent-time"> 90</div></div><div class="line"><div class="data" data-tag="first-name">Leslie</div><div class="text"> (</div><div class="data" data-tag="nic-name">"Les"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Patterson </div><div class="data" data-tag="department"> 341</div><div class="data" data-tag="percent-time"> 60</div></div><div class="line"><div class="data" data-tag="first-name">Ashley</div><div class="text"> (</div><div class="data" data-tag="nic-name">"Ash"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">Meter & Smith </div><div class="data" data-tag="department"> 1440</div><div class="data" data-tag="percent-time"> 40</div></div><div class="line"><div class="data" data-tag="first-name">0123456789</div><div class="text"> (</div><div class="data" data-tag="nic-name">"0123456789"</div><div class="text">)</div><div class="data" data-tag="last-name">01234567890123</div><div class="data" data-tag="department"> 1440</div><div class="data" data-tag="percent-time"> 40</div></div><div class="line"><div class="data" data-tag="first-name">ახლა</div><div class="text"> (</div><div class="data" data-tag="nic-name">"გაიარო"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">საერთაშორისო </div><div class="data" data-tag="department"> 123</div><div class="data" data-tag="percent-time"> 90</div></div><div class="line"><div class="data" data-tag="first-name">෴ණ්ණ෴෴ණ්ණ෴</div><div class="text"> (</div><div class="data" data-tag="nic-name">"Mick"</div><div class="text">)</div><div class="padding"> </div><div class="data" data-tag="last-name">෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ</div><div class="data" data-tag="department"> 110</div><div class="data" data-tag="percent-time"> 20</div></div>
|
@ -10,6 +10,55 @@
|
||||
<div class="text"> </div>
|
||||
<div class="data" data-tag="v2" data-xpath="/employees/v2">Unicode-ის მეათე საერთაშორისო</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width" data-xpath="/employees/width">63</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala" data-xpath="/employees/sinhala">෴ණ්ණ෴</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width" data-xpath="/employees/width">7</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala" data-xpath="/employees/sinhala">෴</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width" data-xpath="/employees/width">3</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala" data-xpath="/employees/sinhala">෴ණ්ණ</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="not-sinhala" data-xpath="/employees/not-sinhala">1234</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="tag" data-xpath="/employees/tag">ර්ඝ</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width" data-xpath="/employees/width">5</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">First Name </div>
|
||||
<div class="title">Last Name </div>
|
||||
@ -75,3 +124,13 @@
|
||||
<div class="data" data-tag="department" data-xpath="/employees/employee/department"> 123</div>
|
||||
<div class="data" data-tag="percent-time" data-xpath="/employees/employee/percent-time" data-type="number" data-help="Percentage of full & part time (%)"> 90</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="first-name" data-xpath="/employees/employee/first-name" data-type="string" data-help="First name of employee">෴ණ්ණ෴෴ණ්ණ෴</div>
|
||||
<div class="text"> (</div>
|
||||
<div class="data" data-tag="nic-name" data-xpath="/employees/employee/nic-name">"Mick"</div>
|
||||
<div class="text">)</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="last-name" data-xpath="/employees/employee/last-name" data-type="string" data-help="Last name of employee">෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ</div>
|
||||
<div class="data" data-tag="department" data-xpath="/employees/employee/department"> 110</div>
|
||||
<div class="data" data-tag="percent-time" data-xpath="/employees/employee/percent-time" data-type="number" data-help="Percentage of full & part time (%)"> 20</div>
|
||||
</div>
|
||||
|
@ -10,6 +10,55 @@
|
||||
<div class="text"> </div>
|
||||
<div class="data" data-tag="v2">Unicode-ის მეათე საერთაშორისო</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width">63</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala">෴ණ්ණ෴</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width">7</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala">෴</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width">3</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="sinhala">෴ණ්ණ</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="not-sinhala">1234</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">[</div>
|
||||
<div class="data" data-tag="tag">ර්ඝ</div>
|
||||
<div class="text">]</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Width</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="width">5</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">First Name </div>
|
||||
<div class="title">Last Name </div>
|
||||
@ -75,3 +124,13 @@
|
||||
<div class="data" data-tag="department"> 123</div>
|
||||
<div class="data" data-tag="percent-time"> 90</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="first-name">෴ණ්ණ෴෴ණ්ණ෴</div>
|
||||
<div class="text"> (</div>
|
||||
<div class="data" data-tag="nic-name">"Mick"</div>
|
||||
<div class="text">)</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="last-name">෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ</div>
|
||||
<div class="data" data-tag="department"> 110</div>
|
||||
<div class="data" data-tag="percent-time"> 20</div>
|
||||
</div>
|
||||
|
@ -1,2 +1,2 @@
|
||||
{"employees": {"v1":"γιγνώσκειν","v2":"ὦ ἄνδρες ᾿Αθηναῖοι","v1":"ახლავე გაიაროთ რეგისტრაცია","v2":"Unicode-ის მეათე საერთაშორისო", "employee": [{"first-name":"Jim","nic-name":"\"რეგტ\"","last-name":"გთხოვთ ახ","department":431,"percent-time":90,"benefits":"full"}, {"first-name":"Terry","nic-name":"\"<one\"","last-name":"Οὐχὶ ταὐτὰ παρίσταταί μοι Jones","department":660,"percent-time":90,"benefits":"full"}, {"first-name":"Leslie","nic-name":"\"Les\"","last-name":"Patterson","department":341,"percent-time":60,"benefits":"full"}, {"first-name":"Ashley","nic-name":"\"Ash\"","last-name":"Meter & Smith","department":1440,"percent-time":40}, {"first-name":"0123456789","nic-name":"\"0123456789\"","last-name":"012345678901234567890","department":1440,"percent-time":40}, {"first-name":"ახლა","nic-name":"\"გაიარო\"","last-name":"საერთაშორისო","department":123,"percent-time":90,"benefits":"full"}]}
|
||||
{"employees": {"v1":"γιγνώσκειν","v2":"ὦ ἄνδρες ᾿Αθηναῖοι","v1":"ახლავე გაიაროთ რეგისტრაცია","v2":"Unicode-ის მეათე საერთაშორისო","width":55,"sinhala":"෴ණ්ණ෴","width":5,"sinhala":"෴","width":1,"sinhala":"෴ණ්ණ෴෴ණ්ණ෴","not-sinhala":"123456","tag":"ර්ඝ","width":3, "employee": [{"first-name":"Jim","nic-name":"\"რეგტ\"","last-name":"გთხოვთ ახ","department":431,"percent-time":90,"benefits":"full"}, {"first-name":"Terry","nic-name":"\"<one\"","last-name":"Οὐχὶ ταὐτὰ παρίσταταί μοι Jones","department":660,"percent-time":90,"benefits":"full"}, {"first-name":"Leslie","nic-name":"\"Les\"","last-name":"Patterson","department":341,"percent-time":60,"benefits":"full"}, {"first-name":"Ashley","nic-name":"\"Ash\"","last-name":"Meter & Smith","department":1440,"percent-time":40}, {"first-name":"0123456789","nic-name":"\"0123456789\"","last-name":"012345678901234567890","department":1440,"percent-time":40}, {"first-name":"ახლა","nic-name":"\"გაიარო\"","last-name":"საერთაშორისო","department":123,"percent-time":90,"benefits":"full"}, {"first-name":"෴ණ්ණ෴෴ණ්ණ෴","nic-name":"\"Mick\"","last-name":"෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴","department":110,"percent-time":20}]}
|
||||
}
|
||||
|
@ -4,6 +4,15 @@
|
||||
"v2": "ὦ ἄνδρες ᾿Αθηναῖοι",
|
||||
"v1": "ახლავე გაიაროთ რეგისტრაცია",
|
||||
"v2": "Unicode-ის მეათე საერთაშორისო",
|
||||
"width": 55,
|
||||
"sinhala": "෴ණ්ණ෴",
|
||||
"width": 5,
|
||||
"sinhala": "෴",
|
||||
"width": 1,
|
||||
"sinhala": "෴ණ්ණ෴෴ණ්ණ෴",
|
||||
"not-sinhala": "123456",
|
||||
"tag": "ර්ඝ",
|
||||
"width": 3,
|
||||
"employee": [
|
||||
{
|
||||
"first-name": "Jim",
|
||||
@ -50,6 +59,13 @@
|
||||
"department": 123,
|
||||
"percent-time": 90,
|
||||
"benefits": "full"
|
||||
},
|
||||
{
|
||||
"first-name": "෴ණ්ණ෴෴ණ්ණ෴",
|
||||
"nic-name": "\"Mick\"",
|
||||
"last-name": "෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴",
|
||||
"department": 110,
|
||||
"percent-time": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,14 @@
|
||||
Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι
|
||||
გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო
|
||||
Width: 63
|
||||
[෴ණ්ණ෴]
|
||||
Width: 7
|
||||
[෴]
|
||||
Width: 3
|
||||
[෴ණ්ණ]
|
||||
[1234]
|
||||
[ර්ඝ]
|
||||
Width: 5
|
||||
First Name Last Name Department Time (%)
|
||||
Jim ("რეგტ") გთხოვთ ახ 431 90
|
||||
Terry ("<one") Οὐχὶ ταὐτὰ παρ 660 90
|
||||
@ -7,3 +16,4 @@ Leslie ("Les") Patterson 341 60
|
||||
Ashley ("Ash") Meter & Smith 1440 40
|
||||
0123456789 ("0123456789")01234567890123 1440 40
|
||||
ახლა ("გაიარო") საერთაშორისო 123 90
|
||||
෴ණ්ණ෴෴ණ්ණ෴ ("Mick") ෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ 110 20
|
||||
|
@ -1 +1 @@
|
||||
<employees><v1>γιγνώσκειν</v1><v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2><v1>ახლავე გაიაროთ რეგისტრაცია</v1><v2>Unicode-ის მეათე საერთაშორისო</v2><employee><first-name>Jim</first-name><nic-name>"რეგტ"</nic-name><last-name>გთხოვთ ახ</last-name><department>431</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Terry</first-name><nic-name>"<one"</nic-name><last-name>Οὐχὶ ταὐτὰ παρίσταταί μοι Jones</last-name><department>660</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Leslie</first-name><nic-name>"Les"</nic-name><last-name>Patterson</last-name><department>341</department><percent-time>60</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Ashley</first-name><nic-name>"Ash"</nic-name><last-name>Meter & Smith</last-name><department>1440</department><percent-time>40</percent-time></employee><employee><first-name>0123456789</first-name><nic-name>"0123456789"</nic-name><last-name>012345678901234567890</last-name><department>1440</department><percent-time>40</percent-time></employee><employee><first-name>ახლა</first-name><nic-name>"გაიარო"</nic-name><last-name>საერთაშორისო</last-name><department>123</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee></employees>
|
||||
<employees><v1>γιγνώσκειν</v1><v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2><v1>ახლავე გაიაროთ რეგისტრაცია</v1><v2>Unicode-ის მეათე საერთაშორისო</v2><width>55</width><sinhala>෴ණ්ණ෴</sinhala><width>5</width><sinhala>෴</sinhala><width>1</width><sinhala>෴ණ්ණ෴෴ණ්ණ෴</sinhala><not-sinhala>123456</not-sinhala><tag>ර්ඝ</tag><width>3</width><employee><first-name>Jim</first-name><nic-name>"რეგტ"</nic-name><last-name>გთხოვთ ახ</last-name><department>431</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Terry</first-name><nic-name>"<one"</nic-name><last-name>Οὐχὶ ταὐτὰ παρίσταταί μοι Jones</last-name><department>660</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Leslie</first-name><nic-name>"Les"</nic-name><last-name>Patterson</last-name><department>341</department><percent-time>60</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>Ashley</first-name><nic-name>"Ash"</nic-name><last-name>Meter & Smith</last-name><department>1440</department><percent-time>40</percent-time></employee><employee><first-name>0123456789</first-name><nic-name>"0123456789"</nic-name><last-name>012345678901234567890</last-name><department>1440</department><percent-time>40</percent-time></employee><employee><first-name>ახლა</first-name><nic-name>"გაიარო"</nic-name><last-name>საერთაშორისო</last-name><department>123</department><percent-time>90</percent-time><benefits full-time="honest & for true">full</benefits></employee><employee><first-name>෴ණ්ණ෴෴ණ්ණ෴</first-name><nic-name>"Mick"</nic-name><last-name>෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴</last-name><department>110</department><percent-time>20</percent-time></employee></employees>
|
@ -3,6 +3,15 @@
|
||||
<v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2>
|
||||
<v1>ახლავე გაიაროთ რეგისტრაცია</v1>
|
||||
<v2>Unicode-ის მეათე საერთაშორისო</v2>
|
||||
<width>55</width>
|
||||
<sinhala>෴ණ්ණ෴</sinhala>
|
||||
<width>5</width>
|
||||
<sinhala>෴</sinhala>
|
||||
<width>1</width>
|
||||
<sinhala>෴ණ්ණ෴෴ණ්ණ෴</sinhala>
|
||||
<not-sinhala>123456</not-sinhala>
|
||||
<tag>ර්ඝ</tag>
|
||||
<width>3</width>
|
||||
<employee>
|
||||
<first-name>Jim</first-name>
|
||||
<nic-name>"რეგტ"</nic-name>
|
||||
@ -49,4 +58,11 @@
|
||||
<percent-time>90</percent-time>
|
||||
<benefits full-time="honest & for true">full</benefits>
|
||||
</employee>
|
||||
<employee>
|
||||
<first-name>෴ණ්ණ෴෴ණ්ණ෴</first-name>
|
||||
<nic-name>"Mick"</nic-name>
|
||||
<last-name>෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴</last-name>
|
||||
<department>110</department>
|
||||
<percent-time>20</percent-time>
|
||||
</employee>
|
||||
</employees>
|
||||
|
@ -3,22 +3,34 @@
|
||||
"data": {
|
||||
"contents": {
|
||||
"name": [
|
||||
"gum", "rope", "ladder", "bolt", "water"
|
||||
"gum",
|
||||
"rope",
|
||||
"ladder",
|
||||
"bolt",
|
||||
"water"
|
||||
]
|
||||
},
|
||||
"contents": {
|
||||
"item": [
|
||||
"gum", "rope", "ladder", "bolt", "water"
|
||||
"gum",
|
||||
"rope",
|
||||
"ladder",
|
||||
"bolt",
|
||||
"water"
|
||||
]
|
||||
},
|
||||
"contents": {
|
||||
"item": [
|
||||
"gum", "rope", "ladder", "bolt", "water"
|
||||
"gum",
|
||||
"rope",
|
||||
"ladder",
|
||||
"bolt",
|
||||
"water"
|
||||
],
|
||||
"total": "six",
|
||||
"one": "one",
|
||||
"two": [
|
||||
"two"
|
||||
"two"
|
||||
],
|
||||
"three": "three"
|
||||
}
|
||||
|
0
contrib/libxo/tests/core/saved/test_10.H.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.H.err
Normal file
1
contrib/libxo/tests/core/saved/test_10.H.out
Normal file
1
contrib/libxo/tests/core/saved/test_10.H.out
Normal file
File diff suppressed because one or more lines are too long
0
contrib/libxo/tests/core/saved/test_10.HIPx.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.HIPx.err
Normal file
316
contrib/libxo/tests/core/saved/test_10.HIPx.out
Normal file
316
contrib/libxo/tests/core/saved/test_10.HIPx.out
Normal file
@ -0,0 +1,316 @@
|
||||
<div class="line">
|
||||
<div class="title color-fg-blue">blue</div>
|
||||
<div class="title color-fg-green color-bg-blue">green</div>
|
||||
<div class="title color-fg-red color-bg-green">red</div>
|
||||
<div class="title color-fg-yellow color-bg-red">yellow</div>
|
||||
<div class="title color-bg-yellow">default</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data effect-bold" data-tag="data" data-xpath="/top/data/data">bold</div>
|
||||
<div class="text effect-bold"> </div>
|
||||
<div class="data effect-bold effect-underline" data-tag="data" data-xpath="/top/data/data">bold-ul</div>
|
||||
<div class="text effect-bold effect-underline"> </div>
|
||||
<div class="data effect-bold effect-underline effect-inverse color-fg-inverse color-bg-inverse" data-tag="data" data-xpath="/top/data/data">triple</div>
|
||||
<div class="text effect-bold effect-underline effect-inverse color-fg-inverse color-bg-inverse"> </div>
|
||||
<div class="data effect-underline effect-inverse color-fg-inverse color-bg-inverse" data-tag="data" data-xpath="/top/data/data">inv-ul</div>
|
||||
<div class="text effect-underline effect-inverse color-fg-inverse color-bg-inverse"> </div>
|
||||
<div class="data effect-underline" data-tag="data" data-xpath="/top/data/data">underline</div>
|
||||
<div class="text effect-underline"> </div>
|
||||
<div class="data" data-tag="data" data-xpath="/top/data/data">plain</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Item </div>
|
||||
<div class="title effect-bold effect-underline"> Total Sold</div>
|
||||
<div class="title effect-underline"> In Stock</div>
|
||||
<div class="title effect-underline effect-inverse color-fg-inverse color-bg-inverse"> On Order</div>
|
||||
<div class="title"> SKU</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">gum </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/sold" data-type="number" data-help="Number of items sold"> 1412</div>
|
||||
<div class="data" data-tag="in-stock" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/in-stock" data-type="number" data-help="Number of items in stock"> 54</div>
|
||||
<div class="data color-fg-yellow" data-tag="on-order" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/on-order" data-type="number" data-help="Number of items on order"> 10</div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key"> GRO-000-415</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">rope </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/sold" data-type="number" data-help="Number of items sold"> 85</div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/in-stock" data-type="number" data-help="Number of items in stock"> 4</div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/on-order" data-type="number" data-help="Number of items on order"> 2</div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key"> HRD-000-212</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">ladder </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/sold" data-type="number" data-help="Number of items sold"> 0</div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/in-stock" data-type="number" data-help="Number of items in stock"> 2</div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/on-order" data-type="number" data-help="Number of items on order"> 1</div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key"> HRD-000-517</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">bolt </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/sold" data-type="number" data-help="Number of items sold"> 4123</div>
|
||||
<div class="data" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/in-stock" data-type="number" data-help="Number of items in stock"> 144</div>
|
||||
<div class="data color-fg-yellow" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/on-order" data-type="number" data-help="Number of items on order"> 42</div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key"> HRD-000-632</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">water </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/sold" data-type="number" data-help="Number of items sold"> 17</div>
|
||||
<div class="data" data-tag="in-stock" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/in-stock" data-type="number" data-help="Number of items in stock"> 14</div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/on-order" data-type="number" data-help="Number of items on order"> 2</div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key"> GRO-000-2331</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
</div>
|
||||
<div class="line">
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">gum</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/sold" data-type="number" data-help="Number of items sold">1412.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/in-stock" data-type="number" data-help="Number of items in stock">54</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'GRO-000-415'][name = 'gum']/on-order" data-type="number" data-help="Number of items on order">10</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">GRO-000-415</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">rope</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/sold" data-type="number" data-help="Number of items sold">85.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/in-stock" data-type="number" data-help="Number of items in stock">4</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-212'][name = 'rope']/on-order" data-type="number" data-help="Number of items on order">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">HRD-000-212</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">ladder</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/sold" data-type="number" data-help="Number of items sold">0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/in-stock" data-type="number" data-help="Number of items in stock">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-517'][name = 'ladder']/on-order" data-type="number" data-help="Number of items on order">1</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">HRD-000-517</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">bolt</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/sold" data-type="number" data-help="Number of items sold">4123.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/in-stock" data-type="number" data-help="Number of items in stock">144</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'HRD-000-632'][name = 'bolt']/on-order" data-type="number" data-help="Number of items on order">42</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">HRD-000-632</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">water</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/sold" data-type="number" data-help="Number of items sold">17.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/in-stock" data-type="number" data-help="Number of items in stock">14</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'GRO-000-2331'][name = 'water']/on-order" data-type="number" data-help="Number of items on order">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">GRO-000-2331</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-xpath="/top/data/item/name" data-type="string" data-help="Name of the item" data-key="key">fish</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label effect-bold color-fg-white color-bg-blue">Total sold</div>
|
||||
<div class="text effect-bold color-fg-white color-bg-blue">: </div>
|
||||
<div class="data effect-bold color-fg-white color-bg-blue" data-tag="sold" data-xpath="/top/data/item[sku = 'GRO-000-533'][name = 'fish']/sold" data-type="number" data-help="Number of items sold">1321.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="in-stock" data-xpath="/top/data/item[sku = 'GRO-000-533'][name = 'fish']/in-stock" data-type="number" data-help="Number of items in stock">45</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order" data-xpath="/top/data/item[sku = 'GRO-000-533'][name = 'fish']/on-order" data-type="number" data-help="Number of items on order">1</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-xpath="/top/data/item/sku" data-type="string" data-help="Stock Keeping Unit" data-key="key">GRO-000-533</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item" data-xpath="/top/data/item">gum</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item" data-xpath="/top/data/item">rope</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item" data-xpath="/top/data/item">ladder</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item" data-xpath="/top/data/item">bolt</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item" data-xpath="/top/data/item">water</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="text">X</div>
|
||||
<div class="label">Cost</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="cost" data-xpath="/top/cost">425</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="text">X</div>
|
||||
<div class="label">Cost</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="cost" data-xpath="/top/cost">455</div>
|
||||
</div>
|
0
contrib/libxo/tests/core/saved/test_10.HP.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.HP.err
Normal file
316
contrib/libxo/tests/core/saved/test_10.HP.out
Normal file
316
contrib/libxo/tests/core/saved/test_10.HP.out
Normal file
@ -0,0 +1,316 @@
|
||||
<div class="line">
|
||||
<div class="title color-fg-blue">blue</div>
|
||||
<div class="title color-fg-green color-bg-blue">green</div>
|
||||
<div class="title color-fg-red color-bg-green">red</div>
|
||||
<div class="title color-fg-yellow color-bg-red">yellow</div>
|
||||
<div class="title color-bg-yellow">default</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data effect-bold" data-tag="data">bold</div>
|
||||
<div class="text effect-bold"> </div>
|
||||
<div class="data effect-bold effect-underline" data-tag="data">bold-ul</div>
|
||||
<div class="text effect-bold effect-underline"> </div>
|
||||
<div class="data effect-bold effect-underline effect-inverse color-fg-inverse color-bg-inverse" data-tag="data">triple</div>
|
||||
<div class="text effect-bold effect-underline effect-inverse color-fg-inverse color-bg-inverse"> </div>
|
||||
<div class="data effect-underline effect-inverse color-fg-inverse color-bg-inverse" data-tag="data">inv-ul</div>
|
||||
<div class="text effect-underline effect-inverse color-fg-inverse color-bg-inverse"> </div>
|
||||
<div class="data effect-underline" data-tag="data">underline</div>
|
||||
<div class="text effect-underline"> </div>
|
||||
<div class="data" data-tag="data">plain</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="title">Item </div>
|
||||
<div class="title effect-bold effect-underline"> Total Sold</div>
|
||||
<div class="title effect-underline"> In Stock</div>
|
||||
<div class="title effect-underline effect-inverse color-fg-inverse color-bg-inverse"> On Order</div>
|
||||
<div class="title"> SKU</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-key="key">gum </div>
|
||||
<div class="data" data-tag="sold"> 1412</div>
|
||||
<div class="data" data-tag="in-stock"> 54</div>
|
||||
<div class="data color-fg-yellow" data-tag="on-order"> 10</div>
|
||||
<div class="data" data-tag="sku" data-key="key"> GRO-000-415</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-key="key">rope </div>
|
||||
<div class="data" data-tag="sold"> 85</div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock"> 4</div>
|
||||
<div class="data" data-tag="on-order"> 2</div>
|
||||
<div class="data" data-tag="sku" data-key="key"> HRD-000-212</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-key="key">ladder </div>
|
||||
<div class="data" data-tag="sold"> 0</div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock"> 2</div>
|
||||
<div class="data" data-tag="on-order"> 1</div>
|
||||
<div class="data" data-tag="sku" data-key="key"> HRD-000-517</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-key="key">bolt </div>
|
||||
<div class="data" data-tag="sold"> 4123</div>
|
||||
<div class="data" data-tag="in-stock"> 144</div>
|
||||
<div class="data color-fg-yellow" data-tag="on-order"> 42</div>
|
||||
<div class="data" data-tag="sku" data-key="key"> HRD-000-632</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="data" data-tag="name" data-key="key">water </div>
|
||||
<div class="data" data-tag="sold"> 17</div>
|
||||
<div class="data" data-tag="in-stock"> 14</div>
|
||||
<div class="data" data-tag="on-order"> 2</div>
|
||||
<div class="data" data-tag="sku" data-key="key"> GRO-000-2331</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
</div>
|
||||
<div class="line">
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">gum</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold">1412.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock">54</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">10</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">GRO-000-415</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">rope</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold">85.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock">4</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">HRD-000-212</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">ladder</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold">0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">1</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">HRD-000-517</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">bolt</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold">4123.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock">144</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">42</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">HRD-000-632</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">water</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">Total sold</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sold">17.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data effect-inverse color-fg-inverse color-bg-inverse" data-tag="in-stock">14</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">2</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">GRO-000-2331</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="text"> '</div>
|
||||
<div class="data" data-tag="name" data-key="key">fish</div>
|
||||
<div class="text">':</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label effect-bold color-fg-white color-bg-blue">Total sold</div>
|
||||
<div class="text effect-bold color-fg-white color-bg-blue">: </div>
|
||||
<div class="data effect-bold color-fg-white color-bg-blue" data-tag="sold">1321.0</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">In stock</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="in-stock">45</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">On order</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="on-order">1</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="padding"> </div>
|
||||
<div class="label">SKU</div>
|
||||
<div class="text">: </div>
|
||||
<div class="data" data-tag="sku" data-key="key">GRO-000-533</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item">gum</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item">rope</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item">ladder</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item">bolt</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="label">Item</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="item">water</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
<div class="text">X</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="text">X</div>
|
||||
<div class="label">Cost</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="cost">425</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="text">X</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="text">X</div>
|
||||
<div class="label">Cost</div>
|
||||
<div class="decoration">:</div>
|
||||
<div class="padding"> </div>
|
||||
<div class="data" data-tag="cost">455</div>
|
||||
</div>
|
0
contrib/libxo/tests/core/saved/test_10.J.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.J.err
Normal file
2
contrib/libxo/tests/core/saved/test_10.J.out
Normal file
2
contrib/libxo/tests/core/saved/test_10.J.out
Normal file
@ -0,0 +1,2 @@
|
||||
{"__version": "3.1.4", "top": {"data": {"item": [],"data":"bold","data":"bold-ul","data":"triple","data":"inv-ul","data":"underline","data":"plain", "item": [{"sku":"GRO-000-415","name":"gum","sold":1412,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17,"in-stock":14,"on-order":2}]}, "data": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412.0,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85.0,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123.0,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17.0,"in-stock":14,"on-order":2}]}, "data": {"item": [{"sku":"GRO-000-533","name":"fish","sold":1321.0,"in-stock":45,"on-order":1}]}, "data": {"item": ["gum","rope","ladder","bolt","water"]},"cost":425,"cost":455}
|
||||
}
|
0
contrib/libxo/tests/core/saved/test_10.JP.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.JP.err
Normal file
113
contrib/libxo/tests/core/saved/test_10.JP.out
Normal file
113
contrib/libxo/tests/core/saved/test_10.JP.out
Normal file
@ -0,0 +1,113 @@
|
||||
{
|
||||
"__version": "3.1.4",
|
||||
"top": {
|
||||
"data": {
|
||||
"item": [
|
||||
],
|
||||
"data": "bold",
|
||||
"data": "bold-ul",
|
||||
"data": "triple",
|
||||
"data": "inv-ul",
|
||||
"data": "underline",
|
||||
"data": "plain",
|
||||
"item": [
|
||||
{
|
||||
"sku": "GRO-000-415",
|
||||
"name": "gum",
|
||||
"sold": 1412,
|
||||
"in-stock": 54,
|
||||
"on-order": 10
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-212",
|
||||
"name": "rope",
|
||||
"sold": 85,
|
||||
"in-stock": 4,
|
||||
"on-order": 2
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-517",
|
||||
"name": "ladder",
|
||||
"sold": 0,
|
||||
"in-stock": 2,
|
||||
"on-order": 1
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-632",
|
||||
"name": "bolt",
|
||||
"sold": 4123,
|
||||
"in-stock": 144,
|
||||
"on-order": 42
|
||||
},
|
||||
{
|
||||
"sku": "GRO-000-2331",
|
||||
"name": "water",
|
||||
"sold": 17,
|
||||
"in-stock": 14,
|
||||
"on-order": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": {
|
||||
"item": [
|
||||
{
|
||||
"sku": "GRO-000-415",
|
||||
"name": "gum",
|
||||
"sold": 1412.0,
|
||||
"in-stock": 54,
|
||||
"on-order": 10
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-212",
|
||||
"name": "rope",
|
||||
"sold": 85.0,
|
||||
"in-stock": 4,
|
||||
"on-order": 2
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-517",
|
||||
"name": "ladder",
|
||||
"sold": 0,
|
||||
"in-stock": 2,
|
||||
"on-order": 1
|
||||
},
|
||||
{
|
||||
"sku": "HRD-000-632",
|
||||
"name": "bolt",
|
||||
"sold": 4123.0,
|
||||
"in-stock": 144,
|
||||
"on-order": 42
|
||||
},
|
||||
{
|
||||
"sku": "GRO-000-2331",
|
||||
"name": "water",
|
||||
"sold": 17.0,
|
||||
"in-stock": 14,
|
||||
"on-order": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": {
|
||||
"item": [
|
||||
{
|
||||
"sku": "GRO-000-533",
|
||||
"name": "fish",
|
||||
"sold": 1321.0,
|
||||
"in-stock": 45,
|
||||
"on-order": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"data": {
|
||||
"item": [
|
||||
"gum",
|
||||
"rope",
|
||||
"ladder",
|
||||
"bolt",
|
||||
"water"
|
||||
]
|
||||
},
|
||||
"cost": 425,
|
||||
"cost": 455
|
||||
}
|
||||
}
|
0
contrib/libxo/tests/core/saved/test_10.T.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.T.err
Normal file
48
contrib/libxo/tests/core/saved/test_10.T.out
Normal file
48
contrib/libxo/tests/core/saved/test_10.T.out
Normal file
@ -0,0 +1,48 @@
|
||||
[34mblue[44m[32mgreen[42m[31mred[41m[33myellow[43m[39mdefault[0m
|
||||
[1mbold [4mbold-ul [7mtriple [0;4;7minv-ul [0;4munderline [0mplain
|
||||
Item [1;4m Total Sold[0;4m In Stock[7m On Order[0m SKU
|
||||
gum 1412 54[33m 10[39m GRO-000-415
|
||||
rope 85[7m 4[0m 2 HRD-000-212
|
||||
ladder 0[7m 2[0m 1 HRD-000-517
|
||||
bolt 4123 144[33m 42[39m HRD-000-632
|
||||
water 17 14 2 GRO-000-2331
|
||||
|
||||
|
||||
Item 'gum':
|
||||
Total sold: 1412.0
|
||||
In stock: [7m54[0m
|
||||
On order: 10
|
||||
SKU: GRO-000-415
|
||||
Item 'rope':
|
||||
Total sold: 85.0
|
||||
In stock: [7m4[0m
|
||||
On order: 2
|
||||
SKU: HRD-000-212
|
||||
Item 'ladder':
|
||||
Total sold: 0
|
||||
In stock: [7m2[0m
|
||||
On order: 1
|
||||
SKU: HRD-000-517
|
||||
Item 'bolt':
|
||||
Total sold: 4123.0
|
||||
In stock: [7m144[0m
|
||||
On order: 42
|
||||
SKU: HRD-000-632
|
||||
Item 'water':
|
||||
Total sold: 17.0
|
||||
In stock: [7m14[0m
|
||||
On order: 2
|
||||
SKU: GRO-000-2331
|
||||
Item 'fish':
|
||||
[1;37;44mTotal sold: 1321.0[0m
|
||||
In stock: 45
|
||||
On order: 1
|
||||
SKU: GRO-000-533
|
||||
Item: gum
|
||||
Item: rope
|
||||
Item: ladder
|
||||
Item: bolt
|
||||
Item: water
|
||||
XXXXXXXX
|
||||
X XCost: 425
|
||||
X XCost: 455
|
0
contrib/libxo/tests/core/saved/test_10.X.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.X.err
Normal file
1
contrib/libxo/tests/core/saved/test_10.X.out
Normal file
1
contrib/libxo/tests/core/saved/test_10.X.out
Normal file
@ -0,0 +1 @@
|
||||
<top __version="3.1.4"><data test="value"><data test2="value2">bold</data><data>bold-ul</data><data>triple</data><data>inv-ul</data><data>underline</data><data>plain</data><item><sku test3="value3" key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku test3="value3" key="key">HRD-000-212</sku><name key="key">rope</name><sold>85</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku test3="value3" key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku test3="value3" key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku test3="value3" key="key">GRO-000-2331</sku><name key="key">water</name><sold>17</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-415</sku><name key="key">gum</name><sold>1412.0</sold><in-stock>54</in-stock><on-order>10</on-order></item><item><sku key="key">HRD-000-212</sku><name key="key">rope</name><sold>85.0</sold><in-stock>4</in-stock><on-order>2</on-order></item><item><sku key="key">HRD-000-517</sku><name key="key">ladder</name><sold>0</sold><in-stock>2</in-stock><on-order>1</on-order></item><item><sku key="key">HRD-000-632</sku><name key="key">bolt</name><sold>4123.0</sold><in-stock>144</in-stock><on-order>42</on-order></item><item><sku key="key">GRO-000-2331</sku><name key="key">water</name><sold>17.0</sold><in-stock>14</in-stock><on-order>2</on-order></item></data><data><item><sku key="key">GRO-000-533</sku><name key="key">fish</name><sold>1321.0</sold><in-stock>45</in-stock><on-order>1</on-order></item></data><data><item test4="value4">gum</item><item test4="value4">rope</item><item test4="value4">ladder</item><item test4="value4">bolt</item><item test4="value4">water</item></data><cost>425</cost><cost>455</cost></top>
|
0
contrib/libxo/tests/core/saved/test_10.XP.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.XP.err
Normal file
100
contrib/libxo/tests/core/saved/test_10.XP.out
Normal file
100
contrib/libxo/tests/core/saved/test_10.XP.out
Normal file
@ -0,0 +1,100 @@
|
||||
<top __version="3.1.4">
|
||||
<data test="value">
|
||||
<data test2="value2">bold</data>
|
||||
<data>bold-ul</data>
|
||||
<data>triple</data>
|
||||
<data>inv-ul</data>
|
||||
<data>underline</data>
|
||||
<data>plain</data>
|
||||
<item>
|
||||
<sku test3="value3" key="key">GRO-000-415</sku>
|
||||
<name key="key">gum</name>
|
||||
<sold>1412</sold>
|
||||
<in-stock>54</in-stock>
|
||||
<on-order>10</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku test3="value3" key="key">HRD-000-212</sku>
|
||||
<name key="key">rope</name>
|
||||
<sold>85</sold>
|
||||
<in-stock>4</in-stock>
|
||||
<on-order>2</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku test3="value3" key="key">HRD-000-517</sku>
|
||||
<name key="key">ladder</name>
|
||||
<sold>0</sold>
|
||||
<in-stock>2</in-stock>
|
||||
<on-order>1</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku test3="value3" key="key">HRD-000-632</sku>
|
||||
<name key="key">bolt</name>
|
||||
<sold>4123</sold>
|
||||
<in-stock>144</in-stock>
|
||||
<on-order>42</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku test3="value3" key="key">GRO-000-2331</sku>
|
||||
<name key="key">water</name>
|
||||
<sold>17</sold>
|
||||
<in-stock>14</in-stock>
|
||||
<on-order>2</on-order>
|
||||
</item>
|
||||
</data>
|
||||
<data>
|
||||
<item>
|
||||
<sku key="key">GRO-000-415</sku>
|
||||
<name key="key">gum</name>
|
||||
<sold>1412.0</sold>
|
||||
<in-stock>54</in-stock>
|
||||
<on-order>10</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku key="key">HRD-000-212</sku>
|
||||
<name key="key">rope</name>
|
||||
<sold>85.0</sold>
|
||||
<in-stock>4</in-stock>
|
||||
<on-order>2</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku key="key">HRD-000-517</sku>
|
||||
<name key="key">ladder</name>
|
||||
<sold>0</sold>
|
||||
<in-stock>2</in-stock>
|
||||
<on-order>1</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku key="key">HRD-000-632</sku>
|
||||
<name key="key">bolt</name>
|
||||
<sold>4123.0</sold>
|
||||
<in-stock>144</in-stock>
|
||||
<on-order>42</on-order>
|
||||
</item>
|
||||
<item>
|
||||
<sku key="key">GRO-000-2331</sku>
|
||||
<name key="key">water</name>
|
||||
<sold>17.0</sold>
|
||||
<in-stock>14</in-stock>
|
||||
<on-order>2</on-order>
|
||||
</item>
|
||||
</data>
|
||||
<data>
|
||||
<item>
|
||||
<sku key="key">GRO-000-533</sku>
|
||||
<name key="key">fish</name>
|
||||
<sold>1321.0</sold>
|
||||
<in-stock>45</in-stock>
|
||||
<on-order>1</on-order>
|
||||
</item>
|
||||
</data>
|
||||
<data>
|
||||
<item test4="value4">gum</item>
|
||||
<item test4="value4">rope</item>
|
||||
<item test4="value4">ladder</item>
|
||||
<item test4="value4">bolt</item>
|
||||
<item test4="value4">water</item>
|
||||
</data>
|
||||
<cost>425</cost>
|
||||
<cost>455</cost>
|
||||
</top>
|
0
contrib/libxo/tests/core/saved/test_10.err
Normal file
0
contrib/libxo/tests/core/saved/test_10.err
Normal file
38
contrib/libxo/tests/core/saved/test_10.out
Normal file
38
contrib/libxo/tests/core/saved/test_10.out
Normal file
@ -0,0 +1,38 @@
|
||||
Item Total Sold In Stock On Order SKU
|
||||
gum 1412 54 10 GRO-000-415
|
||||
rope 85 4 2 HRD-000-212
|
||||
ladder 0 2 1 HRD-000-517
|
||||
bolt 4123 144 42 HRD-000-632
|
||||
water 17 14 2 GRO-000-2331
|
||||
|
||||
|
||||
Item 'gum':
|
||||
Total sold: 1412.0
|
||||
In stock: 54
|
||||
On order: 10
|
||||
SKU: GRO-000-415
|
||||
Item 'rope':
|
||||
Total sold: 85.0
|
||||
In stock: 4
|
||||
On order: 2
|
||||
SKU: HRD-000-212
|
||||
Item 'ladder':
|
||||
Total sold: 0
|
||||
In stock: 2
|
||||
On order: 1
|
||||
SKU: HRD-000-517
|
||||
Item 'bolt':
|
||||
Total sold: 4123.0
|
||||
In stock: 144
|
||||
On order: 42
|
||||
SKU: HRD-000-632
|
||||
Item 'water':
|
||||
Total sold: 17.0
|
||||
In stock: 14
|
||||
On order: 2
|
||||
SKU: GRO-000-2331
|
||||
Item 'fish':
|
||||
Total sold: 1321.0
|
||||
In stock: 45
|
||||
On order: 1
|
||||
SKU: GRO-000-533
|
@ -39,23 +39,38 @@ main (int argc, char **argv)
|
||||
{ "Ashley", "Ash", "Meter & Smith", 1440, 40 },
|
||||
{ "0123456789", "0123456789", "012345678901234567890", 1440, 40 },
|
||||
{ "ახლა", "გაიარო", "საერთაშორისო", 123, 90 },
|
||||
{ "෴ණ්ණ෴෴ණ්ණ෴", "Mick",
|
||||
"෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴", 110, 20 },
|
||||
{ NULL, NULL }
|
||||
}, *ep = employees;
|
||||
int rc;
|
||||
|
||||
argc = xo_parse_args(argc, argv);
|
||||
if (argc < 0)
|
||||
return 1;
|
||||
|
||||
xo_set_info(NULL, info, info_count);
|
||||
xo_set_flags(NULL, XOF_COLUMNS);
|
||||
|
||||
xo_open_container("employees");
|
||||
|
||||
xo_emit("Οὐχὶ ταὐτὰ παρίσταταί μοι {:v1/%s}, {:v2/%s}\n",
|
||||
"γιγνώσκειν", "ὦ ἄνδρες ᾿Αθηναῖοι");
|
||||
|
||||
xo_emit("გთხოვთ {:v1/%s} {:v2/%s}\n",
|
||||
rc = xo_emit("გთხოვთ {:v1/%s} {:v2/%s}\n",
|
||||
"ახლავე გაიაროთ რეგისტრაცია",
|
||||
"Unicode-ის მეათე საერთაშორისო");
|
||||
xo_emit("{Twc:Width}{:width/%d}\n", rc);
|
||||
|
||||
/* Okay, Sinhala is uber cool ... */
|
||||
rc = xo_emit("[{:sinhala}]\n", "෴ණ්ණ෴");
|
||||
xo_emit("{Twc:Width}{:width/%d}\n", rc);
|
||||
rc = xo_emit("[{:sinhala}]\n", "෴");
|
||||
xo_emit("{Twc:Width}{:width/%d}\n", rc);
|
||||
rc = xo_emit("[{:sinhala/%-4..4s/%s}]\n", "෴ණ්ණ෴෴ණ්ණ෴");
|
||||
xo_emit("[{:not-sinhala/%-4..4s/%s}]\n", "123456");
|
||||
rc = xo_emit("[{:tag/%s}]\n", "ර්ඝ");
|
||||
xo_emit("{Twc:Width}{:width/%d}\n", rc);
|
||||
|
||||
xo_open_list("employee");
|
||||
|
||||
|
212
contrib/libxo/tests/core/test_10.c
Normal file
212
contrib/libxo/tests/core/test_10.c
Normal file
@ -0,0 +1,212 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Juniper Networks, Inc.
|
||||
* All rights reserved.
|
||||
* This SOFTWARE is licensed under the LICENSE provided in the
|
||||
* ../Copyright file. By downloading, installing, copying, or otherwise
|
||||
* using the SOFTWARE, you agree to be bound by the terms of that
|
||||
* LICENSE.
|
||||
* Phil Shafer, July 2014
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "xo.h"
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
static char base_grocery[] = "GRO";
|
||||
static char base_hardware[] = "HRD";
|
||||
struct item {
|
||||
const char *i_title;
|
||||
int i_sold;
|
||||
int i_instock;
|
||||
int i_onorder;
|
||||
const char *i_sku_base;
|
||||
int i_sku_num;
|
||||
};
|
||||
struct item list[] = {
|
||||
{ "gum", 1412, 54, 10, base_grocery, 415 },
|
||||
{ "rope", 85, 4, 2, base_hardware, 212 },
|
||||
{ "ladder", 0, 2, 1, base_hardware, 517 },
|
||||
{ "bolt", 4123, 144, 42, base_hardware, 632 },
|
||||
{ "water", 17, 14, 2, base_grocery, 2331 },
|
||||
{ NULL, 0, 0, 0, NULL, 0 }
|
||||
};
|
||||
struct item list2[] = {
|
||||
{ "fish", 1321, 45, 1, base_grocery, 533 },
|
||||
{ NULL, 0, 0, 0, NULL, 0 }
|
||||
};
|
||||
struct item *ip;
|
||||
xo_info_t info[] = {
|
||||
{ "in-stock", "number", "Number of items in stock" },
|
||||
{ "name", "string", "Name of the item" },
|
||||
{ "on-order", "number", "Number of items on order" },
|
||||
{ "sku", "string", "Stock Keeping Unit" },
|
||||
{ "sold", "number", "Number of items sold" },
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
||||
int info_count = (sizeof(info) / sizeof(info[0])) - 1;
|
||||
|
||||
argc = xo_parse_args(argc, argv);
|
||||
if (argc < 0)
|
||||
return 1;
|
||||
|
||||
for (argc = 1; argv[argc]; argc++) {
|
||||
if (strcmp(argv[argc], "xml") == 0)
|
||||
xo_set_style(NULL, XO_STYLE_XML);
|
||||
else if (strcmp(argv[argc], "json") == 0)
|
||||
xo_set_style(NULL, XO_STYLE_JSON);
|
||||
else if (strcmp(argv[argc], "text") == 0)
|
||||
xo_set_style(NULL, XO_STYLE_TEXT);
|
||||
else if (strcmp(argv[argc], "html") == 0)
|
||||
xo_set_style(NULL, XO_STYLE_HTML);
|
||||
else if (strcmp(argv[argc], "pretty") == 0)
|
||||
xo_set_flags(NULL, XOF_PRETTY);
|
||||
else if (strcmp(argv[argc], "xpath") == 0)
|
||||
xo_set_flags(NULL, XOF_XPATH);
|
||||
else if (strcmp(argv[argc], "info") == 0)
|
||||
xo_set_flags(NULL, XOF_INFO);
|
||||
else if (strcmp(argv[argc], "error") == 0) {
|
||||
close(-1);
|
||||
xo_err(1, "error detected");
|
||||
}
|
||||
}
|
||||
|
||||
xo_set_info(NULL, info, info_count);
|
||||
xo_set_flags(NULL, XOF_KEYS);
|
||||
|
||||
/* Normally one would use "XOF_COLOR_ALLOWED", but we want to force it */
|
||||
xo_set_flags(NULL, XOF_COLOR);
|
||||
|
||||
xo_set_version("3.1.4");
|
||||
|
||||
xo_open_container_h(NULL, "top");
|
||||
|
||||
xo_attr("test", "value");
|
||||
xo_open_container("data");
|
||||
xo_open_list("item");
|
||||
xo_attr("test2", "value2");
|
||||
|
||||
static const char *colors[] =
|
||||
{ "blue", "green", "red", "yellow", "default", NULL };
|
||||
|
||||
int i;
|
||||
for (i = 0; colors[i]; i++) {
|
||||
if (i > 0)
|
||||
xo_emit("{C:/bg-%s}", colors[i-1]);
|
||||
xo_emit("{C:/fg-%s}{T:/%s}", colors[i], colors[i]);
|
||||
}
|
||||
xo_emit("{C:reset}\n");
|
||||
|
||||
xo_emit("{C:bold}{:data} {C:underline}{:data} {C:inverse}{:data} "
|
||||
"{C:no-bold}{:data} {C:no-inverse}{:data} "
|
||||
"{C:no-underline}{:data}\n",
|
||||
"bold", "bold-ul", "triple", "inv-ul", "underline", "plain");
|
||||
|
||||
xo_emit("{T:Item/%-10s}{C:bold,underline}{T:Total Sold/%12s}{C:no-bold}"
|
||||
"{T:In Stock/%12s}{C:/%s}"
|
||||
"{T:On Order/%12s}{C:normal}{T:SKU/%5s}\n", "inverse");
|
||||
|
||||
#if 0
|
||||
xo_finish();
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
for (ip = list; ip->i_title; ip++) {
|
||||
xo_open_instance("item");
|
||||
xo_attr("test3", "value3");
|
||||
|
||||
xo_emit("{keq:sku/%s-%u/%s-000-%u}"
|
||||
"{k:name/%-10s/%s}{n:sold/%12u/%u}"
|
||||
"{C:/%s}{:in-stock/%12u/%u}{C:normal}"
|
||||
"{C:/fg-%s}{:on-order/%12u/%u}{C:/fg-default}"
|
||||
"{qkd:sku/%5s-000-%u/%s-000-%u}\n",
|
||||
ip->i_sku_base, ip->i_sku_num,
|
||||
ip->i_title, ip->i_sold,
|
||||
(ip->i_instock < 5) ? "inverse" : "normal", ip->i_instock,
|
||||
(ip->i_onorder > 5) ? "yellow" : "default", ip->i_onorder,
|
||||
ip->i_sku_base, ip->i_sku_num);
|
||||
|
||||
xo_close_instance("item");
|
||||
}
|
||||
|
||||
xo_close_list("item");
|
||||
xo_close_container("data");
|
||||
|
||||
xo_emit("\n\n");
|
||||
|
||||
xo_open_container("data");
|
||||
xo_open_list("item");
|
||||
|
||||
for (ip = list; ip->i_title; ip++) {
|
||||
xo_open_instance("item");
|
||||
|
||||
xo_emit("{keq:sku/%s-%u/%s-000-%u}", ip->i_sku_base, ip->i_sku_num);
|
||||
xo_emit("{L:Item} '{k:name/%s}':\n", ip->i_title);
|
||||
xo_emit("{P: }{L:Total sold}: {n:sold/%u%s}\n",
|
||||
ip->i_sold, ip->i_sold ? ".0" : "");
|
||||
xo_emit("{P: }{Lcw:In stock}{C:inverse}{:in-stock/%u}{C:}\n",
|
||||
ip->i_instock);
|
||||
xo_emit("{P: }{Lcw:On order}{:on-order/%u}\n", ip->i_onorder);
|
||||
xo_emit("{P: }{L:SKU}: {qkd:sku/%s-000-%u}\n",
|
||||
ip->i_sku_base, ip->i_sku_num);
|
||||
|
||||
xo_close_instance("item");
|
||||
}
|
||||
|
||||
xo_close_list("item");
|
||||
xo_close_container("data");
|
||||
|
||||
xo_open_container("data");
|
||||
xo_open_list("item");
|
||||
|
||||
for (ip = list2; ip->i_title; ip++) {
|
||||
xo_open_instance("item");
|
||||
|
||||
xo_emit("{keq:sku/%s-%u/%s-000-%u}", ip->i_sku_base, ip->i_sku_num);
|
||||
xo_emit("{L:Item} '{k:name/%s}':\n", ip->i_title);
|
||||
xo_emit("{P: }{C:bg-blue , fg-white, bold }{L:Total sold}: "
|
||||
"{n:sold/%u%s}{C:}\n",
|
||||
ip->i_sold, ip->i_sold ? ".0" : "");
|
||||
xo_emit("{P: }{Lcw:In stock}{:in-stock/%u}\n", ip->i_instock);
|
||||
xo_emit("{P: }{Lcw:On order}{:on-order/%u}\n", ip->i_onorder);
|
||||
xo_emit("{P: }{L:SKU}: {qkd:sku/%s-000-%u}\n",
|
||||
ip->i_sku_base, ip->i_sku_num);
|
||||
|
||||
xo_close_instance("item");
|
||||
}
|
||||
|
||||
xo_close_list("item");
|
||||
xo_close_container("data");
|
||||
|
||||
xo_open_container("data");
|
||||
xo_open_list("item");
|
||||
|
||||
for (ip = list; ip->i_title; ip++) {
|
||||
xo_attr("test4", "value4");
|
||||
xo_emit("{Lwc:Item}{l:item}\n", ip->i_title);
|
||||
}
|
||||
|
||||
xo_close_list("item");
|
||||
xo_close_container("data");
|
||||
|
||||
xo_emit("X{P:}X", "epic fail");
|
||||
xo_emit("X{T:}X", "epic fail");
|
||||
xo_emit("X{N:}X", "epic fail");
|
||||
xo_emit("X{L:}X\n", "epic fail");
|
||||
|
||||
xo_emit("X{P: }X{Lwc:Cost}{:cost/%u}\n", 425);
|
||||
xo_emit("X{P:/%30s}X{Lwc:Cost}{:cost/%u}\n", "", 455);
|
||||
|
||||
xo_close_container_h(NULL, "top");
|
||||
|
||||
xo_finish();
|
||||
|
||||
return 0;
|
||||
}
|
@ -74,7 +74,7 @@ utility accepts a format string suitable for
|
||||
.Xr xo_emit 3
|
||||
and a set of zero or more arguments used to supply data for that string.
|
||||
.Bd -literal -offset indent
|
||||
xo "The {k:name} weighs {:weight/%d} pounds.\n" fish 6
|
||||
xo "The {k:name} weighs {:weight/%d} pounds.\\n" fish 6
|
||||
|
||||
TEXT:
|
||||
The fish weighs 6 pounds.
|
||||
|
38
contrib/libxo/xohtml/Makefile.am
Normal file
38
contrib/libxo/xohtml/Makefile.am
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Copyright 2015, Juniper Networks, Inc.
|
||||
# All rights reserved.
|
||||
# This SOFTWARE is licensed under the LICENSE provided in the
|
||||
# ../Copyright file. By downloading, installing, copying, or otherwise
|
||||
# using the SOFTWARE, you agree to be bound by the terms of that
|
||||
# LICENSE.
|
||||
|
||||
man_MANS = xohtml.1
|
||||
|
||||
EXTERNAL_FILES = \
|
||||
external/jquery.js \
|
||||
external/jquery.qtip.css \
|
||||
external/jquery.qtip.js
|
||||
|
||||
INTERNAL_FILES = \
|
||||
xohtml.js \
|
||||
xohtml.css
|
||||
|
||||
EXTRA_DIST = \
|
||||
xohtml.1 \
|
||||
xohtml.sh.in \
|
||||
${INTERNAL_FILES} \
|
||||
${EXTERNAL_FILES}
|
||||
|
||||
install-exec-hook:
|
||||
install xohtml.sh ${DESTDIR}${bindir}/xohtml
|
||||
mkdir -p ${DESTDIR}${XO_SHAREDIR}/external
|
||||
for file in ${INTERNAL_FILES}; do \
|
||||
install ${srcdir}/$$file ${DESTDIR}${XO_SHAREDIR} ; done
|
||||
for file in ${EXTERNAL_FILES}; do \
|
||||
install ${srcdir}/$$file ${DESTDIR}${XO_SHAREDIR}/external ; done
|
||||
|
||||
uninstall-hook:
|
||||
for file in ${INTERNAL_FILES} ${EXTERNAL_FILES}; do \
|
||||
rm ${DESTDIR}${XO_SHAREDIR}/$$file ; done
|
||||
rmdir ${DESTDIR}${XO_SHAREDIR}/external
|
||||
rm -f ${DESTDIR}${bindir}/xohtml
|
125
contrib/libxo/xohtml/xohtml.1
Normal file
125
contrib/libxo/xohtml/xohtml.1
Normal file
@ -0,0 +1,125 @@
|
||||
.\" #
|
||||
.\" # Copyright (c) 2015, Juniper Networks, Inc.
|
||||
.\" # All rights reserved.
|
||||
.\" # This SOFTWARE is licensed under the LICENSE provided in the
|
||||
.\" # ../Copyright file. By downloading, installing, copying, or
|
||||
.\" # using the SOFTWARE, you agree to be bound by the terms of that
|
||||
.\" # LICENSE.
|
||||
.\" # Phil Shafer, July 2014
|
||||
.\"
|
||||
.Dd December 4, 2014
|
||||
.Dt XOHTML 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm xohtml
|
||||
.Nd display libxo html output
|
||||
.Xr xo_emit 3
|
||||
.Sh SYNOPSIS
|
||||
.Nm xohtml
|
||||
.Op Fl c
|
||||
.Op Fl "b <base>"
|
||||
.Op Fl "c" <command>"
|
||||
.Op Fl "f" <output>
|
||||
.Op Ar command argument...
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a tool for preparing
|
||||
.Xr libxo 3
|
||||
HTML output for display in modern HTML web browsers.
|
||||
.Nm
|
||||
can operate in two modes.
|
||||
If command is provided
|
||||
either with the
|
||||
.Fl c
|
||||
option or as argument(s) to the
|
||||
.Nm
|
||||
command, that command is executed and the resulting output is processed.
|
||||
If no command is given, the
|
||||
standard input is used.
|
||||
.Pp
|
||||
.Nm
|
||||
is typically used to wrap
|
||||
.Nm libxo
|
||||
output with sufficient HTML content to allow display in a web browser.
|
||||
This includes parent HTML tags as well as
|
||||
.Nm CSS
|
||||
stylesheets and
|
||||
.Nm Javascript
|
||||
files.
|
||||
.Pp
|
||||
If the command is given directly on the command line,
|
||||
.Nm
|
||||
will add the "--libxo=html" option needed to generate HTML output
|
||||
from
|
||||
.Nm libxo "-enabled"
|
||||
applications. See
|
||||
.Xr libxo 3
|
||||
for details.
|
||||
.Pp
|
||||
The following options are available:
|
||||
.Bl -tag -width indent
|
||||
.It Fl "b <base>"
|
||||
.It Fl "-base <base>"
|
||||
Supplies a source path for the CSS and Javascript files referenced in
|
||||
the output of
|
||||
.Nm xohtml .
|
||||
.It Fl "c <command>"
|
||||
.It Fl "-command <command>"
|
||||
Use the given command instead of one on the command line.
|
||||
This command should be quoted if it consists of multiple tokens, and
|
||||
should contain the "--libxo=html" option or equivalent, since the
|
||||
command is used directly.
|
||||
.It Fl "f <file>"
|
||||
.It Fl "-file <file>"
|
||||
Output is saved to the given file, rather than to the standard output
|
||||
descriptor.
|
||||
.El
|
||||
.Pp
|
||||
.Sh EXAMPLES
|
||||
The following command line will run "du --libxo=html ~/src" and save
|
||||
the output to /tmp/src.html:
|
||||
.Bd -literal -offset indent
|
||||
xohtml du ~/src > /tmp/src.html
|
||||
.Ed
|
||||
.Pp
|
||||
The following command line will run "du --libxo=html,warn ~/src" and save
|
||||
the output to /tmp/src.html:
|
||||
.Bd -literal -offset indent
|
||||
du --libxo=html,warn ~/src | xohtml -f /tmp/src.html
|
||||
.Ed
|
||||
.Pp
|
||||
The following command line will run "du --libxo=html,warn ~/src" and save
|
||||
the output to /tmp/src.html:
|
||||
.Bd -literal -offset indent
|
||||
xohtml -c "du --libxo=html,warn ~/src" -f /tmp/src.html
|
||||
.Ed
|
||||
.Pp
|
||||
.Sh ADDITIONAL DOCUMENTATION
|
||||
Complete documentation can be found on github:
|
||||
.Bd -literal -offset indent
|
||||
http://juniper.github.io/libxo/libxo-manual.html
|
||||
.Ed
|
||||
.Pp
|
||||
.Nm libxo
|
||||
lives on github as:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo
|
||||
.Ed
|
||||
.Pp
|
||||
The latest release of
|
||||
.Nm libxo
|
||||
is available at:
|
||||
.Bd -literal -offset indent
|
||||
https://github.com/Juniper/libxo/releases
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr libxo 3 ,
|
||||
.Xr xo_emit 3
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm libxo
|
||||
library was added in
|
||||
.Fx 11.0 .
|
||||
.Sh AUTHOR
|
||||
Phil Shafer
|
||||
|
@ -1014,3 +1014,27 @@ div.xpath {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
div.color-fg-black { color: black; }
|
||||
div.color-fg-red { color: red; }
|
||||
div.color-fg-green { color: green; }
|
||||
div.color-fg-yellow { color: yellow; }
|
||||
div.color-fg-blue { color: blue; }
|
||||
div.color-fg-magenta { color: magenta; }
|
||||
div.color-fg-cyan { color: cyan; }
|
||||
div.color-fg-white { color: white; }
|
||||
|
||||
div.color-bg-black { background-color: black; }
|
||||
div.color-bg-red { background-color: red; }
|
||||
div.color-bg-green { background-color: green; }
|
||||
div.color-bg-yellow { background-color: yellow; }
|
||||
div.color-bg-blue { background-color: blue; }
|
||||
div.color-bg-magenta { background-color: magenta; }
|
||||
div.color-bg-cyan { background-color: cyan; }
|
||||
div.color-bg-white { background-color: white; }
|
||||
|
||||
div.color-fg-inverse { color: white; }
|
||||
div.color-bg-inverse { background-color: black; }
|
||||
|
||||
div.effect-bold { font-weight:bold; }
|
||||
div.effect-underline { text-decoration: underline; }
|
||||
|
@ -13,6 +13,16 @@ BASE=@XO_SHAREDIR@
|
||||
CMD=cat
|
||||
DONE=
|
||||
|
||||
do_help () {
|
||||
echo "xohtml: wrap libxo-enabled output in HTML"
|
||||
echo "Usage: xohtml [options] [command [arguments]]"
|
||||
echo "Valid options are:"
|
||||
echo " -b <basepath> | --base <basepath>"
|
||||
echo " -c <command> | --command <command>"
|
||||
echo " -f <output-file> | --file <output-file>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ -z "$DONE" -a ! -z "$1" ]; do
|
||||
case "$1" in
|
||||
-b|--base)
|
||||
@ -31,12 +41,22 @@ while [ -z "$DONE" -a ! -z "$1" ]; do
|
||||
shift;
|
||||
exec > "$FILE";
|
||||
;;
|
||||
-*)
|
||||
do_help
|
||||
;;
|
||||
*)
|
||||
DONE=1;
|
||||
XX=$1;
|
||||
shift;
|
||||
CMD="$XX --libxo=html $@"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$CMD" = "cat" -a -t 0 ]; then
|
||||
do_help
|
||||
fi
|
||||
|
||||
echo "<html>\n<head>\n"
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8"/>'
|
||||
echo '<link rel="stylesheet" href="'$BASE'/xohtml.css">'
|
||||
|
@ -12,3 +12,6 @@ EXTRA_DIST = xolint.1 xolint.pl
|
||||
|
||||
install-exec-hook:
|
||||
install ${srcdir}/xolint.pl ${DESTDIR}${bindir}/xolint
|
||||
|
||||
uninstall-hook:
|
||||
rm -f ${DESTDIR}${bindir}/xolint
|
||||
|
@ -99,6 +99,6 @@ https://github.com/Juniper/libxo/releases
|
||||
The
|
||||
.Nm libxo
|
||||
library was added in
|
||||
.Fx 10.1 .
|
||||
.Fx 11.0 .
|
||||
.Sh AUTHOR
|
||||
Phil Shafer
|
||||
|
@ -347,32 +347,32 @@ sub check_field {
|
||||
error("only one field role can be used (" . join(", ", @roles) . ")")
|
||||
if $#roles > 0;
|
||||
|
||||
# Field is a note, label, or title
|
||||
if ($field[0] =~ /[DLNT]/) {
|
||||
# Field is a color, note, label, or title
|
||||
if ($field[0] =~ /[CDLNT]/) {
|
||||
|
||||
#@ Potential missing slash after N, L, or T with format
|
||||
#@ Potential missing slash after C, D, N, L, or T with format
|
||||
#@ xo_emit("{T:%6.6s}\n", "Max");
|
||||
#@ should be:
|
||||
#@ xo_emit("{T:/%6.6s}\n", "Max");
|
||||
#@ The "%6.6s" will be a literal, not a field format. While
|
||||
#@ it's possibly valid, it's likely a missing "/".
|
||||
info("potential missing slash after N, L, or T with format")
|
||||
info("potential missing slash after C, D, N, L, or T with format")
|
||||
if $field[1] =~ /%/;
|
||||
|
||||
#@ An encoding format cannot be given (roles: DNLT)
|
||||
#@ xo_emit("{T:Max//%s}", "Max");
|
||||
#@ Fields with the D, N, L, and T roles are not emitted in
|
||||
#@ Fields with the C, D, N, L, and T roles are not emitted in
|
||||
#@ the 'encoding' style (JSON, XML), so an encoding format
|
||||
#@ would make no sense.
|
||||
error("encoding format cannot be given when content is present")
|
||||
if $field[3];
|
||||
}
|
||||
|
||||
# Field is a decoration, label, or title
|
||||
if ($field[0] =~ /DLN/) {
|
||||
#@ Format cannot be given when content is present (roles: DLN)
|
||||
# Field is a color, decoration, label, or title
|
||||
if ($field[0] =~ /[CDLN]/) {
|
||||
#@ Format cannot be given when content is present (roles: CDLN)
|
||||
#@ xo_emit("{N:Max/%6.6s}", "Max");
|
||||
#@ Fields with the D, L, or N roles can't have both
|
||||
#@ Fields with the C, D, L, or N roles can't have both
|
||||
#@ static literal content ("{L:Label}") and a
|
||||
#@ format ("{L:/%s}").
|
||||
#@ This error will also occur when the content has a backslash
|
||||
@ -383,6 +383,49 @@ sub check_field {
|
||||
if $field[1] && $field[2];
|
||||
}
|
||||
|
||||
# Field is a color/effect
|
||||
if ($field[0] =~ /C/) {
|
||||
if ($field[1]) {
|
||||
my $val;
|
||||
my @sub = split(/,/, $field[1]);
|
||||
grep { s/^\s*//; s/\s*$//; } @sub;
|
||||
|
||||
for $val (@sub) {
|
||||
if ($val =~ /^(default,black,red,green,yellow,blue,magenta,cyan,white)$/) {
|
||||
|
||||
#@ Field has color without fg- or bg- (role: C)
|
||||
#@ xo_emit("{C:green}{:foo}{C:}", x);
|
||||
#@ Should be:
|
||||
#@ xo_emit("{C:fg-green}{:foo}{C:}", x);
|
||||
#@ Colors must be prefixed by either "fg-" or "bg-".
|
||||
error("Field has color without fg- or bg- (role: C)");
|
||||
|
||||
} elsif ($val =~ /^(fg|bg)-(default|black|red|green|yellow|blue|magenta|cyan|white)$/) {
|
||||
# color
|
||||
} elsif ($val =~ /^(bold|underline)$/) {
|
||||
} elsif ($val =~ /^(no-)?(bold|underline|inverse)$/) {
|
||||
# effect
|
||||
|
||||
} elsif ($val =~ /^(reset|normal)$/) {
|
||||
# effect also
|
||||
} else {
|
||||
#@ Field has invalid color or effect (role: C)
|
||||
#@ xo_emit("{C:fg-purple,bold}{:foo}{C:gween}", x);
|
||||
#@ Should be:
|
||||
#@ xo_emit("{C:fg-red,bold}{:foo}{C:fg-green}", x);
|
||||
#@ The list of colors and effects are limited. The
|
||||
#@ set of colors includes default, black, red, green,
|
||||
#@ yellow, blue, magenta, cyan, and white, which must
|
||||
#@ be prefixed by either "fg-" or "bg-". Effects are
|
||||
#@ limited to bold, no-bold, underline, no-underline,
|
||||
#@ inverse, no-inverse, normal, and reset. Values must
|
||||
#@ be separated by commas.
|
||||
error("Field has invalid color or effect (role: C) ($val)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A value field
|
||||
if (length($field[0]) == 0 || $field[0] =~ /V/) {
|
||||
|
||||
@ -456,7 +499,7 @@ sub check_field {
|
||||
#@ Should be:
|
||||
#@ xo_emit("{D:((}{:good}{D:))}", "yes");
|
||||
#@ This is minor, but fields should use proper roles. Decoration
|
||||
#@ fields are meant to hold puncuation and other characters used
|
||||
#@ fields are meant to hold punctuation and other characters used
|
||||
#@ to decorate the content, typically to make it more readable
|
||||
#@ to human readers.
|
||||
warn("decoration field contains invalid character")
|
||||
|
@ -43,15 +43,21 @@ ATF_TC_BODY(fmod, tc)
|
||||
{
|
||||
ATF_CHECK(fmodf(2.0, 1.0) == 0);
|
||||
ATF_CHECK(fmod(2.0, 1.0) == 0);
|
||||
#if !defined(__FreeBSD__) || LDBL_PREC != 53
|
||||
ATF_CHECK(fmodl(2.0, 1.0) == 0);
|
||||
#endif
|
||||
|
||||
ATF_CHECK(fmodf(2.0, 0.5) == 0);
|
||||
ATF_CHECK(fmod(2.0, 0.5) == 0);
|
||||
#if !defined(__FreeBSD__) || LDBL_PREC != 53
|
||||
ATF_CHECK(fmodl(2.0, 0.5) == 0);
|
||||
#endif
|
||||
|
||||
ATF_CHECK(fabsf(fmodf(1.0, 0.1) - 0.1f) <= 55 * FLT_EPSILON);
|
||||
ATF_CHECK(fabs(fmod(1.0, 0.1) - 0.1) <= 55 * DBL_EPSILON);
|
||||
#if !defined(__FreeBSD__) || LDBL_PREC != 53
|
||||
ATF_CHECK(fabsl(fmodl(1.0, 0.1L) - 0.1L) <= 55 * LDBL_EPSILON);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user