Commit Graph

9 Commits (0976272d993738a78b5c0560fee99724dc82dd4e)

Author SHA1 Message Date
John Marshall af87825525 Replace u_int32_t by the more common uint32_t
The u_int32_t type comes from <sys/types.h>, which is often included
as a byproduct of other headers on glibc platforms, but not on FreeBSD
or Alpine Linux.  Use <stdint.h>'s uint32_t instead, which is used
elsewhere in bwa source code.
2017-04-25 13:51:52 +01:00
Heng Li 599e840779 r397: multi changes/bugfixes to bwa-backtrack
1. Check .sai versioning
2. Keep track of #ins and #del during backtrack
3. Use info above to get accurate aligned regions; don't call SW extension any more
4. Identify alignment crossing the for-rev boundary
5. Fixed a bug in printing the XA tag: ungapped alignments missing
2013-05-24 16:28:18 -04:00
Rob Davies 96e445d9e4 Reduce dependency on utils.h - new malloc wrapping scheme.
Remove xmalloc, xcalloc, xrealloc and xstrdup from utils.h and revert calls
to the normal malloc, calloc, realloc, strdup.  Add new files malloc_wrap.[ch]
with the wrapper functions.  malloc_wrap.h #defines malloc etc. to the
wrapper, but only if USE_MALLOC_WRAPPERS has been defined.

Put #include "malloc_wrap.h" in any file that uses *alloc or strdup.  This
is also in a #ifdef USE_MALLOC_WRAPPERS ... #endif block to make using the
wrappers optional.  Add -DUSE_MALLOC_WRAPPERS into the makefile so they
should normally get added.

This is an improvement on the previous method as we now don't need to
worry about stray function calls that were not changed to the wrapped version
and the code will still work even if the wrapping is disabled.

Other possible methods of doing this are using malloc_hook (glibc-specific),
adding -include malloc_wrap.h to the gcc command-line (somewhat
gcc-specific) or making our own malloc function and using dlopen (scary).
This way is probably the most portable.
2013-05-02 15:12:01 +01:00
Rob Davies b081ac9b8b Use wrapper functions to catch system errors
Use the wrapper functions in utils.c plus a few extra bits of error
checking code to catch system errors and exit non-zero when they occur.
2012-12-16 10:34:57 +00:00
Heng Li a1abfe9977 API: aln seems working 2012-04-07 00:23:01 -04:00
Heng Li 2d2db5d50f aln seems working 2011-10-20 16:13:35 -04:00
Heng Li 80e02281d5 minor change 2011-10-14 10:31:48 -04:00
Heng Li 2255c4cd4b fixed a long existing bug
This bug may cause segfault (though never to me) and lead to missing
suboptimal hits. But the top hits should not be affected.
2011-10-12 00:05:01 -04:00
Heng Li 007c3eb75d Imported from my local bwa repository, the master repository. 2011-01-13 20:52:12 -05:00