summaryrefslogtreecommitdiffstats
path: root/src/bits.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix/Update copyright notices; Add SPDX annotationHarald Welte2017-11-131-0/+2
| | | | | | | | Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
* [doc] bits.c: Better / more Doxygen documentationHarald Welte2017-10-161-0/+5
| | | | Change-Id: If824a5c8d8ee6e3dc96a3fddeb105786c0c027c1
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-5/+3
| | | | | | | | | | | | | | | | | Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-231-13/+13
| | | | | | | | | | Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
* update/extend doxygen documentationHarald Welte2017-06-121-3/+2
| | | | | | | | | It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
* Add octet-aligned/unaligned shift functionsMax2016-06-201-0/+48
| | | | | | | | | The actual code is from OsmoBTS' tch.c by Harald Welte. Add unit tests, doxygen annotation and extra memory safety check. Those functions are used in several BTS implementations but seems generic enough to be generally useful. Change-Id: I2b1901c4161e8035f059585901dca593b661556d
* Update doxygen annotations in libosmocoreHarald Welte2016-05-051-0/+1
| | | | | This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation.
* Add ubit <-> sbit convertorsMax2016-04-121-0/+24
| | | | | Move functions for conversion between soft and unpacked bits to main library as they are generally useful.
* bitvec: Fix unaligned memory access in osmo_revbytebits_bufMax2016-01-221-2/+1
| | | | | | | | | | | | | The undefined behavior sanitizer found the 32bit load from an unaligned memory address. This will cause an exception on ARMv5te and a manual fix-up. [hfreyther: On armv6, x86 the usage of memcpy leads to shorter amount of instructions but on armv5te the memcpy is not expanded leading to a branch. Use the version of max until we have the time to benchmark it] Sponsored-by: On-Waves ehf
* add missing copyright statements to source code filesHarald Welte2014-09-111-0/+21
| | | | | | Some source code files didn't have the usual copyright and licence statement at their top. I'm adding them baesed on information in the commitlog.
* misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi2013-02-151-2/+2
| | | | | Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
* add some missing doxygen annotation for libosmocore functionsHarald Welte2013-01-111-2/+28
|
* core/bits: Prevent osmo_revbytebits_buf stack trashingSylvain Munaut2013-01-031-1/+1
| | | | | | | | | | | | The second loop in osmo_revbytebits_buf() in src/bits.c grabs 4 bytes each iteration, which can easily go past the supplied input in some cases. Compiled with -fstack-protector , I get a "stack smashing detected" in the bits test. From: Nils O. SelÄsdal <noselasd@fiane.dyndns.org> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* add functions for bit-reversalHarald Welte2011-09-011-0/+57
| | | | | Sometimes we need stuff like reversing every bit in each byte (but not the byte-order).
* some more doxygen work (include the notion of modules)Harald Welte2011-08-171-6/+39
|
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-1/+1
| | | | | | | | | | | | This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* ubit2pbit flushes at the wrong moment, added one note to bits.hChristian Vogel2011-01-221-1/+1
| | | | | | (e.g. input2[] test sequence from testra/crc_test decodes incorrectly to packed bits: 90 b0 3e 80 03 87 53 bd 6f 08, this patch fixes it)
* bits: Add extended options version of pbit2ubit and ubit2pbitSylvain Munaut2011-01-211-0/+33
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* [BITS] introduce new packed/unpacked bit conversion routinesHarald Welte2011-01-191-0/+65