Commit 888f953c authored by Andreas Tille's avatar Andreas Tille

Imported Upstream version 2.3.5-2+dfsg

parent f14de0e4
......@@ -32,9 +32,6 @@ http://trace.ncbi.nlm.nih.gov/Traces/sra/std
The SRA Toolkit and SDK from NCBI is a collection of tools and
libraries for using data in the INSDC Sequence Read Archives.
With this release, NCBI has implemented Automatic Remote Access by accession,
making it possible to access data using NCBI servers without prior download.
For additional information on using and building the toolkit,
please visit our web site at:
......
......@@ -44,7 +44,6 @@ operating systems on Intel x86-compatible 32 and 64 bit architectures.
make # GNU make version 3.81 or later
gcc, g++ # tested with 4.4.2, but should work with others
libxml2 # tested with version 2.7.6
libcurl # tested with version 7.27
WINDOWS BUILD:
......@@ -204,12 +203,6 @@ STATIC BUILD RESULTS:
libwvdb # virtual layer update library
libz # gzip library
<OUTDIR>/mod64/ # (mod32 for 32-bit builds)
-- empty --
<OUTDIR>/wmod64/ # (wmod32 for 32-bit builds)
-- empty --
DYNAMIC BUILD RESULTS:
......@@ -244,16 +237,3 @@ DYNAMIC BUILD RESULTS:
libwsraschema # static version of SRA schema for update
libwvdb # virtual layer update library
libz # static gzip library
<OUTDIR>/mod64/ # (mod32 for 32-bit builds)
libaxf # cSRA-specific VDB external functions
libsraxf # SRA-specific VDB external functions
libvxf # generic VDB external functions
libwgsxf # WGS-specific VDB external functions
<OUTDIR>/wmod64/ # (wmod32 for 32-bit builds)
libwaxf # cSRA-specific VDB external functions for update
libwsraxf # SRA-specific VDB external functions for update
libwvxf # update VDB external functions
libwwgsxf # WGS-specific VDB external functions for update
......@@ -249,6 +249,7 @@ ITF = $(TOP)/interfaces
OSINC = $(TOP)/interfaces/os
CCINC = $(TOP)/interfaces/cc
XTINC = $(TOP)/interfaces/ext
OVERRIDEINC = $(TOP)/interfaces/override
# OS specific source and include dirs
SRCDIRS_OS = $(SRCDIR)/$(OS)
......@@ -289,6 +290,7 @@ VPATH = \
$(SRCDIR)
INCDIRS = \
$(addprefix -I,$(OVERRIDEINC)) \
$(addprefix -I,$(SRCDIRS_OS)) \
$(addprefix -I,$(SRCDIR) $(ITF)) \
$(addprefix -I,$(INCDIRS_COMP)) \
......@@ -304,40 +306,3 @@ ARCHDEFS = -D_ARCH_BITS=$(BITS) -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
#-------------------------------------------------------------------------------
# runtests
#
# MallocScribble=1 is for catching allocation problems on Mac
#
ifeq ($(RUNTESTS_OVERRIDE),)
runtests: std $(TEST_TOOLS)
@ echo "$0 $*"; export LD_LIBRARY_PATH=$(LIBDIR);export MallocScribble=1;\
for i in $(TEST_TOOLS);\
do\
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++;\
echo Run $(TEST_BINDIR)/$$i;eval $(RUN_REMOTELY) $(TEST_BINDIR)/$$i;r=$$?; \
if [ "$$r" != "0" ] ; then exit $$r; fi; \
done
.PHONY: runtests
endif
#-------------------------------------------------------------------------------
# buildtests
#
buildtests: std $(TEST_TOOLS) $(SLOW_TEST_TOOLS)
#-------------------------------------------------------------------------------
# slowtests
#
slowtests: std $(SLOW_TEST_TOOLS)
@ echo "$0 $*"; export LD_LIBRARY_PATH=$(LIBDIR);\
for i in $(SLOW_TEST_TOOLS);\
do\
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++;\
echo Run $(TEST_BINDIR)/$$i;eval $(TEST_BINDIR)/$$i;r=$$?; \
if [ "$$r" != "0" ] ; then exit $$r; fi; \
done
.PHONY: slowtests buildtests
......@@ -38,8 +38,10 @@ LD = @ $(TOP)/build/ld.sh $(OS) $(ARCH) gcc \
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
LPFLAGS = $(LDFLAGS)
LP = @ $(TOP)/build/ld.sh $(OS) $(ARCH) g++ \
--build $(BUILD) --ldflags "$(LDFLAGS)" $(STATIC) \
--build $(BUILD) --ldflags "$(LPFLAGS)" $(STATIC) \
$(STATICSYSLIBS) $(CHECKSUM) --objx $(OBJX) --shlx $(SHLX) --libx $(LIBX) \
-MD --srcdir $(SRCDIR) --bindir $(BINDIR) -L$(LIBDIR):$(ILIBDIR)
......@@ -70,7 +72,7 @@ ifeq (dbg, $(BUILD))
# GCC seems unable to use c99 without ansi, which
# basically clobbers features back to c89. the options
# must be specified in the order shown.
PED = -std=c99 -ansi -pedantic # -fdiagnostics-show-option
PED = -std=gnu99 -pedantic # -fdiagnostics-show-option
else
ifeq (x86_64, $(ARCH))
......@@ -79,3 +81,8 @@ else
OPT = -O3 -Wno-variadic-macros -fno-strict-aliasing
endif
endif
ifeq (mac,$(OS))
# g++ linker on mac needs to be told which standard c++ library to use
LPFLAGS += -lstdc++
endif
......@@ -24,46 +24,47 @@
## build rules
LOC_INFO = -D__mod_name__=$(MODULE) -D__file_name__=$*
# executable image
%.$(OBJX): %.c
$(CC) -o $@ $(OPT) $<
$(CC) -o $@ $(OPT) $< $(LOC_INFO) -D__file_ext__=c
%.$(OBJX): %.cpp
$(CP) -o $@ $(OPT) $<
$(CP) -o $@ $(OPT) $< $(LOC_INFO) -D__file_ext__=cpp
%.$(OBJX): %.cxx
$(CP) -o $@ $(OPT) $<
$(CP) -o $@ $(OPT) $< $(LOC_INFO) -D__file_ext__=cxx
# non-optimized executable image
%.nopt.$(OBJX): %.c
$(CC) -o $@ $(NOPT) $<
$(CC) -o $@ $(NOPT) $< $(LOC_INFO) -D__file_ext__=c
%.nopt.$(OBJX): %.cpp
$(CP) -o $@ $(NOPT) $<
$(CP) -o $@ $(NOPT) $< $(LOC_INFO) -D__file_ext__=cpp
%.nopt.$(OBJX): %.cxx
$(CP) -o $@ $(NOPT) $<
$(CP) -o $@ $(NOPT) $< $(LOC_INFO) -D__file_ext__=cxx
# relocatable image
%.$(LOBX): %.c
$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY $<
$(CC) -o $@ -fPIC $(OPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=c
%.$(LOBX): %.cpp
$(CP) -o $@ -fPIC $(OPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC $(OPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cpp
%.$(LOBX): %.cxx
$(CP) -o $@ -fPIC $(OPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC $(OPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cxx
# non-optimized relocatable image
%.nopt.$(LOBX): %.c
$(CC) -o $@ -fPIC $(NOPT) -D_LIBRARY $<
$(CC) -o $@ -fPIC $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=c
%.nopt.$(LOBX): %.cpp
$(CP) -o $@ -fPIC $(NOPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cpp
%.nopt.$(LOBX): %.cxx
$(CP) -o $@ -fPIC $(NOPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cxx
# non-optimized relocatable image with persisted image byte swapping
%.swap.nopt.$(LOBX): %.c
$(CC) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $<
$(CC) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=c
%.swap.nopt.$(LOBX): %.cpp
$(CP) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cpp
%.swap.nopt.$(LOBX): %.cxx
$(CP) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $<
$(CP) -o $@ -fPIC -DSWAP_PERSISTED $(NOPT) -D_LIBRARY $< $(LOC_INFO) -D__file_ext__=cxx
# assembly
%.$(OBJX) %.$(LOBX): %.s
......
......@@ -25,7 +25,7 @@
# RFLAGS have to go before any other flags since they can affect their handling
# compilers
CC = @ $(TOP)/build/win-cc.sh $(BUILD_OS) "cl /c /D_WIN32_WINNT=0x0502" \
$(CHECKSUM) --objx $(OBJX) $(RFLAGS) $(CFLAGS) -MD
$(CHECKSUM) --objx $(OBJX) $(RFLAGS) $(CFLAGS) -MD -D_CRT_SECURE_NO_WARNINGS
CP = @ $(TOP)/build/win-cc.sh $(BUILD_OS) "cl /c" \
$(CHECKSUM) --objx $(OBJX) $(RFLAGS) $(CPFLAGS) -MD -EHsc
......
......@@ -94,6 +94,14 @@ HAVE_XML=0
CHECKSUM=$(expr $SCMFLAGS % 2)
STATICSYSLIBS=$(expr $SCMFLAGS / 2)
# set target architecture
if [ "$ARCH" == "i386" ]
then
LDFLAGS="$LDFLAGS /MACHINE:x86"
else
LDFLAGS="$LDFLAGS /MACHINE:x64"
fi
if [ "$VERBOSE" != "" ]
then
echo "LD =$LD"
......
......@@ -4,7 +4,7 @@
# N.B. Run "perl configuration-assistant.perl" if you see a message like:
# configuration-assistant.perl: /usr/bin/perl: bad interpreter: No such file or directory
################################################################################
my $VERSION = '2.3.4-2';
my $VERSION = '2.3.5-2';
################################################################################
use strict;
......
......@@ -114,11 +114,16 @@ ALIGN_EXTERN rc_t CC AlignAccessDBRelease ( const AlignAccessDB *self );
*/
typedef struct AlignAccessRefSeqEnumerator AlignAccessRefSeqEnumerator;
#define AlignAccessRefSeqEnumeratorEOFCode (RC(rcAlign, rcTable, rcReading, rcRow, rcNotFound))
#define AlignAccessRefSeqEnumeratorIsEOF(RESULT_CODE) (GetRCObject(RESULT_CODE) == rcRow && GetRCState(RESULT_CODE) == rcNotFound)
/* EnumerateRefSequences
* make an enumerator of reference sequences visible in database
*
* "refseq_enum" [ OUT ] - return parameter for enumerator
*
* return codes:
* object: rcRow, state: rcNotFound - if the index is empty
*/
ALIGN_EXTERN rc_t CC AlignAccessDBEnumerateRefSequences ( const AlignAccessDB *self,
AlignAccessRefSeqEnumerator **refseq_enum );
......@@ -130,7 +135,11 @@ ALIGN_EXTERN rc_t CC AlignAccessDBEnumerateRefSequences ( const AlignAccessDB *s
ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorAddRef ( const AlignAccessRefSeqEnumerator *self );
ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorRelease ( const AlignAccessRefSeqEnumerator *self );
/* advance the enumerator to the next element */
/* advance the enumerator to the next element
*
* return codes:
* object: rcRow, state: rcNotFound - if there is no next element
*/
ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorNext(const AlignAccessRefSeqEnumerator *cself);
/* GetID
......@@ -157,12 +166,17 @@ ALIGN_EXTERN rc_t CC AlignAccessRefSeqEnumeratorGetLength
*/
typedef struct AlignAccessAlignmentEnumerator AlignAccessAlignmentEnumerator;
#define AlignAccessAlignmentEnumeratorEOFCode (RC(rcAlign, rcTable, rcReading, rcRow, rcNotFound))
#define AlignAccessAlignmentEnumeratorIsEOF(RESULT_CODE) (GetRCObject(RESULT_CODE) == rcRow && GetRCState(RESULT_CODE) == rcNotFound)
/* EnumerateAlignments
* make an enumerator of all alignments in database
*
* "align_enum" [ OUT ] - return parameter for enumerator
*
* return codes:
* object: rcRow, state: rcNotFound - if there is no first element
*
* NB - this is a BAD interface, here only to support dumping a BAM file
* it may not be available under all circumstances
*/
......@@ -179,6 +193,9 @@ ALIGN_EXTERN rc_t CC AlignAccessDBEnumerateAlignments ( const AlignAccessDB *sel
*
* "pos" [ IN ] and "wsize" [ IN ] - starting position and size of window
* on reference sequence
*
* return codes:
* object: rcRow, state: rcNotFound - if there is no first element
*/
ALIGN_EXTERN rc_t CC AlignAccessDBWindowedAlignments ( const AlignAccessDB *self,
AlignAccessAlignmentEnumerator **align_enum, const char *refseq_id,
......@@ -194,6 +211,9 @@ ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorRelease ( const AlignAccessAl
/* Next
* advance the enumerator to the next element
*
* return codes:
* object: rcRow, state: rcNotFound - if there is no next element
*/
ALIGN_EXTERN rc_t CC AlignAccessAlignmentEnumeratorNext ( const AlignAccessAlignmentEnumerator *self );
......
......@@ -351,6 +351,10 @@ ALIGN_EXTERN rc_t CC BAMAlignmentGetCigar ( const BAMAlignment *self,
*/
ALIGN_EXTERN rc_t CC BAMAlignmentGetInsertSize ( const BAMAlignment *self, int64_t *size );
ALIGN_EXTERN rc_t CC BAMAlignmentFormatSAM(const BAMAlignment *self,
size_t *actsize,
size_t maxsize,
char *buffer);
/* OptDataForEach
* DANGER
......@@ -371,7 +375,9 @@ enum BAMOptDataValueTypes
dt_INT = 'i',
dt_UINT = 'I',
dt_FLOAT32 = 'f',
dt_FLOAT64 = 'd',
#if 0
dt_FLOAT64 = 'd', /* removed? not in Dec 19 2013 version of SAMv1.pdf */
#endif
dt_ASCII = 'A',
dt_HEXSTRING = 'H',
dt_NUM_ARRAY = 'B'
......@@ -590,6 +596,24 @@ ALIGN_EXTERN float CC BAMFileGetProportionalPosition ( const BAMFile *self );
*/
ALIGN_EXTERN rc_t CC BAMFileRead ( const BAMFile *self, const BAMAlignment **result );
/* Read
* read an aligment
*
* "result" [ OUT ] - return param for BAMAlignment object
* must be released with BAMAlignmentRelease, is invalidated or contents
* change on next call to BAMFileRead2. Unlike with BAMFileRead, no attempt is
* made to preserve this object.
*
* returns:
* RC(..., ..., ..., rcRow, rcNotFound) at end
* RC(..., ..., ..., rcRow, rcInvalid) and RC(..., ..., ..., rcRow, rcEmpty)
* are not fatal and are resumable
*
* tries to use static buffers and will log messages about parsing errors
*/
ALIGN_EXTERN rc_t CC BAMFileRead2 ( const BAMFile *self, const BAMAlignment **result );
/* Rewind
* reset the position back to the first aligment in the file
......
......@@ -34,14 +34,17 @@
extern "C" {
#endif
struct VDBManager;
struct VTable;
enum ETableReaderRefSeq_Options {
errefseq_4NA = 0x01 /* read in INSDC:4na:bin, INSDC:dna:text is default */
};
typedef struct TableReaderRefSeq TableReaderRefSeq;
ALIGN_EXTERN rc_t CC TableReaderRefSeq_MakeTable(const TableReaderRefSeq** cself, const VDBManager* vmgr,
const VTable* table, uint32_t options, size_t cache);
ALIGN_EXTERN rc_t CC TableReaderRefSeq_MakeTable(const TableReaderRefSeq** cself, const struct VDBManager* vmgr,
const struct VTable* table, uint32_t options, size_t cache);
ALIGN_EXTERN rc_t CC TableReaderRefSeq_MakePath(const TableReaderRefSeq** cself, const VDBManager* vmgr,
const char* path, uint32_t options, size_t cache);
......
......@@ -98,12 +98,6 @@ ALIGN_EXTERN rc_t CC ReferenceMgr_Compress(const ReferenceMgr* cself, uint32_t o
const void* allele_cigar, uint32_t allele_cigar_len,
TableWriterAlgnData* data);
/* After calling ReferenceMgr_Compress, ReferenceMgr_CompressHelper
* can be used to compress other byte-sized arrays
*/
ALIGN_EXTERN size_t CC ReferenceMgr_CompressHelper(uint8_t cmp_rslt[],
TableWriterAlgnData const *const data,
uint8_t const input[]);
/* Read refseq chunk of 'len' bases into provided 'buffer' (must be enough big for len);
ref_len - on return has number of bases written to the buffer
......@@ -120,6 +114,13 @@ ALIGN_EXTERN rc_t CC ReferenceSeq_Compress(const ReferenceSeq* cself, uint32_t o
INSDC_coord_zero allele_offset, const char* allele, INSDC_coord_len allele_len,INSDC_coord_zero offset_in_allele,
const void* allele_cigar, uint32_t allele_cigar_len,
TableWriterAlgnData* data);
ALIGN_EXTERN rc_t CC ReferenceSeq_TranslateOffset_int(ReferenceSeq const *const cself,
INSDC_coord_zero const offset,
int64_t *const ref_id,
INSDC_coord_zero *const ref_start,
uint64_t *const global_ref_start);
enum ReferenceSeqCoverageTableType {
ewrefcov_primary_table = 0,
......
......@@ -29,6 +29,14 @@
#include <stdint.h>
#ifndef USE_GCC_BUILTIN
#define USE_GCC_BUILTIN 1
#endif
#if USE_GCC_BUILTIN
#include <strings.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......@@ -37,6 +45,9 @@ static __inline__
int16_t uint16_lsbit ( uint16_t self )
{
int16_t rtn;
#if USE_GCC_BUILTIN
rtn = ( int16_t ) __builtin_ffs ( self ) - 1;
#else
__asm__ __volatile__
(
"bsf %%ax, %%ax;"
......@@ -46,6 +57,7 @@ int16_t uint16_lsbit ( uint16_t self )
: "=a" ( rtn )
: "a" ( self )
);
#endif
return rtn;
}
......@@ -53,6 +65,9 @@ static __inline__
int32_t uint32_lsbit ( uint32_t self )
{
int32_t rtn;
#if USE_GCC_BUILTIN
rtn = __builtin_ffs ( self ) - 1;
#else
__asm__ __volatile__
(
"bsf %%eax, %%eax;"
......@@ -62,6 +77,7 @@ int32_t uint32_lsbit ( uint32_t self )
: "=a" ( rtn )
: "a" ( self )
);
#endif
return rtn;
}
......
......@@ -29,6 +29,21 @@
#include <stdint.h>
/* Intel versions from 11.0 through 13.0 mangle certain shift
* statements in inline assembly. */
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER_BUILD_DATE >= 20090131 \
&& __INTEL_COMPILER_BUILD_DATE < 20130607
# define HAVE_ICC_SHIFT_BUG 1
#endif
#ifndef USE_GCC_BUILTIN
#define USE_GCC_BUILTIN 1
#endif
#if USE_GCC_BUILTIN
#include <strings.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......@@ -37,6 +52,9 @@ static __inline__
int16_t uint16_lsbit ( uint16_t self )
{
int16_t rtn;
#if USE_GCC_BUILTIN
rtn = ( int16_t ) __builtin_ffs ( self ) - 1;
#else
__asm__ __volatile__
(
"bsf %%ax, %%ax;"
......@@ -46,6 +64,7 @@ int16_t uint16_lsbit ( uint16_t self )
: "=a" ( rtn )
: "a" ( self )
);
#endif
return rtn;
}
......@@ -53,6 +72,9 @@ static __inline__
int32_t uint32_lsbit ( uint32_t self )
{
int32_t rtn;
#if USE_GCC_BUILTIN
rtn = __builtin_ffs ( self ) - 1;
#else
__asm__ __volatile__
(
"bsf %%eax, %%eax;"
......@@ -62,6 +84,7 @@ int32_t uint32_lsbit ( uint32_t self )
: "=a" ( rtn )
: "a" ( self )
);
#endif
return rtn;
}
......@@ -260,6 +283,13 @@ void uint128_not ( uint128_t *self )
static __inline__
void uint128_shr ( uint128_t *self, uint32_t i )
{
#ifdef HAVE_ICC_SHIFT_BUG
if (i > 0) {
self->lo >>= i;
self->lo |= self->hi << (64 - i);
self->hi >>= i;
}
#else
__asm__ __volatile__
(
"mov %%esi, %%ecx;"
......@@ -271,6 +301,7 @@ void uint128_shr ( uint128_t *self, uint32_t i )
: "D" ( self ), "S" ( i )
: "%rax", "%rcx"
);
#endif
}
static __inline__
......
......@@ -37,81 +37,12 @@ extern "C" {
#define __inline__ __inline
#endif
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#ifndef INT8_MAX
#define INT8_MAX _I8_MAX
#endif
#ifndef INT8_MIN
#define INT8_MIN _I8_MIN
#endif
#ifndef UINT8_MAX
#define UINT8_MAX _UI8_MAX
#endif
#ifndef INT16_MAX
#define INT16_MAX _I16_MAX
#endif
#ifndef INT16_MIN
#define INT16_MIN _I16_MIN
#endif
#ifndef UINT16_MAX
#define UINT16_MAX _UI16_MAX
#endif
#ifndef INT32_MAX
#define INT32_MAX _I32_MAX
#endif
#ifndef INT32_MIN
#define INT32_MIN _I32_MIN
#endif
#ifndef UINT32_MAX
#define UINT32_MAX _UI32_MAX
#endif
#ifndef INT64_MAX
#define INT64_MAX _I64_MAX
#endif
#ifndef INT64_MIN
#define INT64_MIN _I64_MIN
#endif
#ifndef UINT64_MAX
#define UINT64_MAX _UI64_MAX
#endif
#ifndef SIZE_T_MAX
#define SIZE_T_MAX ((size_t)(-(1ULL)))
#endif
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
#ifndef UINT64_C
#define UINT64_C(x) (x ## ULL)
#endif
#ifndef INT64_C
#define INT64_C(x) (x ## LL)
#endif
#endif
#ifndef __func__
#define __func__ __FUNCTION__
#endif
#include <../include/stdint.h>
#ifdef __cplusplus
}
#endif
......
......@@ -200,3 +200,11 @@ typedef INSDC:coord:val INSDC:coord:one;
// POSITION types for relating bases to their location in signal
typedef INSDC:coord:zero INSDC:position:zero;
typedef INSDC:coord:one INSDC:position:one;
// one-based coordinate limits
const INSDC:coord:one INSDC:coord:min:one = 0x80000001;
const INSDC:coord:one INSDC:coord:max:one = 0x3FFFFFFF;
// zero-based coordinate limits
const INSDC:coord:zero INSDC:coord:min:zero = 0x80000000;
const INSDC:coord:zero INSDC:coord:max:zero = 0x3FFFFFFE;
/*===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
#ifndef _h_kfc_callconv_
#define _h_kfc_callconv_
#ifdef __cplusplus
extern "C" {
#endif