summaryrefslogtreecommitdiff
path: root/hex.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
|
* Fix a potential buffer overrun.Gary E. Miller2016-09-011-1/+1
| | | | | Converting from hex to ascii means the out buffer is 2x + 1 the inbuffer.
* No need to iterate a whole buffer when we know the answer.Gary E. Miller2016-09-011-1/+3
|
* Fix too small buffers. Hex is 2x + 1 the size of binary.Gary E. Miller2016-09-011-0/+2
|
* Comment what gpsd_packetdump() doesGary E. Miller2016-03-291-0/+12
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-17/+5
| | | | | | | | | | | | | | | | | | | 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.
* warning hunting cleanup in hex.c for unused parametersJon Schlueter2015-02-231-0/+3
| | | | add dummy usage of parameters when body of function is conditioned out
* Silence compiler warnings about array subscripts of type 'char'Matt2014-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | Cygwin GCC complains about code like isprint(c), where c is of type char. The isX() and toX() functions/macros (ISO C allows either) all accept an int, whose value should be either that of an unsigned char, or the special value EOF (== -1). So cast to unsigned char each argument to isprint, tolower, etc. Silences several warnings of the form: gpsutils.c: In function 'safe_atof': gpsutils.c:90:5: warning: array subscript has type 'char' [-Wchar-subscripts] while (isspace(*p)) { ^ gpsutils.c:188:2: warning: array subscript has type 'char' [-Wchar-subscripts] while (isdigit(*p)) { ^
* cppcheck and Coverity cleanup (not yet complete).Eric S. Raymond2013-11-061-5/+7
| | | | All regression tests pass. PPS is live.
* Make all hex-dumping truly thread-safe.Eric S. Raymond2013-10-131-11/+15
|
* Split gpsd_hexdump() so AIS dumping will be invertible.Eric S. Raymond2012-06-201-21/+26
|
* Suppress compiler warnings and do splint cleanup. All regression tests pass.Eric S. Raymond2012-04-201-1/+1
|
* Dependency reduction. No logic changes. All regression tests pass.Eric S. Raymond2011-08-251-21/+21
|
* Better visibility test. All regression tests pass. Code splints clean.Eric S. Raymond2011-06-171-1/+9
|
* Improve the code for making sensor data and command strings visible...Eric S. Raymond2011-06-171-19/+24
| | | | | ...and remove some const declarations that could have spelled trouble in the future.
* Elimination of gpsd_hexdump_level.Eric S. Raymond2011-06-171-19/+0
| | | | The few gpsd_hexdump() calls left have explicit guards.
* More header portability audting with a new version of deheader.Eric S. Raymond2010-12-221-3/+0
|
* Unused-header removals by deheader. All regression tests pass.Eric S. Raymond2010-12-011-3/+0
|
* Reindent some utility modules. All regression tests pass.Eric S. Raymond2010-04-141-58/+154
|
* Silence compiler warning.Chris Kuethe2010-04-061-16/+16
| | | | Don't blindly assign unsigned char into a char
* Vanish away Id and Rev $ keywords, git won't expand them to anything useful.Eric S. Raymond2010-03-131-2/+1
|
* Copyright stamps everywhere. No code changes.Eric S. Raymond2010-03-111-1/+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.
* Fix some whitespace glitches found while experimenting with indent(1).Eric S. Raymond2009-11-171-1/+1
| | | | All regression tests pass.
* Guard some inclusions that splint doesn't like. Eric S. Raymond2009-09-101-0/+2
| | | | No effect on compilation. All regression tests pass.
* Yet more splint cleanup. All regression tests pass.Eric S. Raymond2009-09-091-2/+2
|
* Don't clobber the destination of gpsd_hexpack; thanks to JoshuaEric S. Raymond2009-05-051-1/+1
| | | | Lamorie for spotting this.
* splint cleanup.Eric S. Raymond2009-03-181-0/+2
|
* Improve error detection from gpsd_hexpack().Eric S. Raymond2009-03-091-1/+1
|
* Make hex_escapes() generally available.Eric S. Raymond2009-01-301-0/+70
|
* Splint cleanup.Eric S. Raymond2009-01-211-1/+1
|
* hushChris Kuethe2009-01-091-1/+1
|
* Experimental code for sending hexified binary over the control channel.Eric S. Raymond2009-01-091-1/+2
|
* Add a wrapper function around gpsd_hexdump to avoid hexdumping buffers...Chris Kuethe2008-12-271-0/+19
| | | | | | | | ...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.
* don't return NULL when passed a NULL pointer or a zero-length buffer;Chris Kuethe2007-06-041-2/+2
| | | | | | | | instead, return an empty string. this sort of thing happens when we call gpsd_hexdump inside one of the packet writers when we are about to write a packet with no payload. Printing a NULL pointer is rather ugly... printing an empty string is much prettier and consistent with the SQUELCH case.
* shift blame... passing in a NULL gets you a NULL back.Chris Kuethe2007-04-141-0/+3
| | | | calling functions should be more careful
* too much thinking about regexes i think. hex use a-f, not a-z.Chris Kuethe2007-03-271-4/+4
|
* Add $Id$ tagChris Kuethe2006-12-051-0/+1
|
* Break up some modules a little finer, in support of some Python bindings.Eric S. Raymond2006-12-041-0/+76
All regression tests pass. No logic changes.