summaryrefslogtreecommitdiff
path: root/bits.c
Commit message (Collapse)AuthorAgeFilesLines
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Fixes warning about 64-bit literals on 32-bit platforms.Fred Wright2016-12-261-4/+4
| | | | | | | | | | | | | | | | | An unadorned 64-bit literal provokes a width warning on 32-bit platforms. Depending on whether the compiler promotes such literals to a 64-bit type, this case could represent an actual malfunction. The fix is simply to use the "LL" suffix (actually "ULL" in these cases). This also switches to ~0 as the all-ones mask, for better readability. It also changes a nearby "1LL" to "1ULL" for consistency with its unsigned context. TESTED: Ran "scons build-all check" on four versions of OSX, two versions of Linux, and FreeBSD, OpenBSD, and NetBSD, with two cases being 32-bit.
* Fix warnings from left shifting a negative number.Hal Murray2016-09-091-2/+2
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-15/+3
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* Clean up most spint errors. All regression tests pass.Eric S. Raymond2015-03-281-3/+3
|
* Yet more: Line expects to suppress X error, found 0 errorsGary E. Miller2015-03-251-3/+3
|
* Coverity caught a subtle bug in bits.c::shift_left().Eric S. Raymond2014-09-111-1/+1
|
* Wrote code and test for a function to left-shift bit arrays).Eric S. Raymond2014-08-291-0/+26
| | | | To be used for handling AIS Type 25 and 26 messages.
* Avoid a possible logic error as reported by scan-build.Bernd Zeimetz2013-12-071-0/+5
|
* Code is fully cppcheck, splint, and Coverity clean.Eric S. Raymond2013-11-061-3/+0
| | | | All regression tests pass. PPS is live.
* Merge Igor Socec's initialization code for TSIP. All regression tests pass.Eric S. Raymond2013-09-231-1/+0
|
* Add a function to put a big-endian double. Not yet used.Eric S. Raymond2013-09-201-0/+12
| | | | Adapted from a patch by Igor Socec <isocec@gmail.com>.
* splint/cppcheck cleanup.Eric S. Raymond2013-09-171-2/+2
|
* Fixing a bug in the function writing a big endian float number.Igor Socec2013-09-161-2/+1
| | | | | | The previous comment said that calling putbe32 would introduce signedness issue, which is not true here. Also the previous implementation actually returned only one byte of the 32-bit field.
* The signed/unsigned char fix.Michael Tatarinov2013-02-181-3/+3
| | | | | | All regression tests pass on Raspbian “wheezy”. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Nuke trailing whitespace in C source.Eric S. Raymond2012-09-071-20/+20
|
* Refacter the bits.c stuff to eliminate ugly globals...Eric S. Raymond2012-06-021-1/+54
| | | | | | ...and be more explicit about operand sizes. All regressuion tests [ass, code splints clean.
* More cppcheck warning fixups. All regression tests pass.Eric S. Raymond2012-05-181-0/+3
|
* Suppress compiler warnings and do splint cleanup. All regression tests pass.Eric S. Raymond2012-04-201-2/+2
|
* Get rid of magic number.Eric S. Raymond2012-04-201-8/+7
|
* splint cleanup. All regressuin tests pass.Eric S. Raymond2012-04-191-1/+0
|
* Prepare to support little-endian field extraction. Not yet tested.Eric S. Raymond2012-04-191-6/+22
|
* Clean up, since we have good regression tests.Eric S. Raymond2012-04-191-33/+3
|
* Rename some bit extractors.Eric S. Raymond2012-04-191-6/+6
|
* Byte-swapping code, not yet needed and conditioned out.Eric S. Raymond2012-04-171-0/+50
|
* Fix a shift that was breaking sbits() on fields longer than 32 bits.Eric S. Raymond2011-04-111-1/+1
| | | | | I'm not sure why 1 needed to be a long constant 1LL here - you'd think it would be 64 bits naturally on a 64-bit machine - but it did.
* Simplify and regularize #ifdefs. All regression tests pass.Eric S. Raymond2011-03-041-6/+6
|
* We no longer rely on long long to be 64 bits.Eric S. Raymond2011-01-251-11/+11
| | | | All regression tests pass.
* More header portability auditing by deheader.Eric S. Raymond2010-12-221-2/+2
|
* Whitespace and indenting cleanup.Jon Schlueter2010-04-291-1/+1
| | | | | In bits.c gpsd.c gpsd_json.c and several drivers. Regression tests passing.
* Reindented some small utility modules. All regression tests pass.Eric S. Raymond2010-04-141-10/+12
|
* Vanish away Id and Rev $ keywords, git won't expand them to anything useful.Eric S. Raymond2010-03-131-2/+2
|
* Copyright stamps everywhere. No code changes.Eric S. Raymond2010-03-111-2/+5
|
* Include the whole config file in gpsd.h.Eric S. Raymond2009-11-201-1/+0
| | | | | | | That is, instead of sectioning out two little config defines and putting them in. This makes gpsd.h self-copntained (e.g. in case it gets installed as a library header) and means we can get rid of most inclusions of it.
* Improved documentation and regression testing for the bitfield extractor.Eric S. Raymond2009-03-271-2/+2
|
* splint cleanup.Eric S. Raymond2009-03-181-0/+4
|
* Check in AIVDM regression tests for sentence types 1-4.Eric S. Raymond2009-03-151-17/+22
|
* Remove a word-width dependency.Eric S. Raymond2009-03-151-2/+2
|
* Document length limit on bitfield processing.Eric S. Raymond2009-03-141-3/+4
|
* Turn off debugging.Eric S. Raymond2009-03-131-2/+0
|
* Sign-extend negative long longs correctly.Eric S. Raymond2009-03-131-17/+23
|
* make sure that the Id keyword is present and expandedChris Kuethe2009-03-031-0/+1
|
* Splint cleanup and removal of some unneeded headers.Eric S. Raymond2009-01-211-1/+1
|
* This diff goes most of the way to getting us splint-clean again.Eric S. Raymond2009-01-051-1/+3
|
* Add a wrapper function around gpsd_hexdump to avoid hexdumping buffers...Chris Kuethe2008-12-271-1/+2
| | | | | | | | ...and copying ascii strings around when they're not going to be printed. This saves quite a lot of CPU. I processed a 50MB ubx binary file. With no "-D" options, this saved nearly 2.2M calls to gpsd_hexdump and the processing time for this file went from 84 seconds to 35 seconds.
* Still more fixes for bitfield extraction. Eric S. Raymond2008-07-171-6/+9
| | | | This is as theoretically simple but difficult to get right as BitBlt.
* Revised and corrected bitfield functions.Eric S. Raymond2008-07-171-6/+10
|
* Factor out the bitfield functions, fix a bug in one, add tests.Eric S. Raymond2008-07-161-0/+61
|
* Do consistent naming and some splint cleaning.Eric S. Raymond2005-07-161-77/+0
|