summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-08-24Implement error messages in the decoder side.Petteri Aimonen12-32/+52
Update issue 7 Status: Started
2012-08-24Document pb_close_string_substream.Petteri Aimonen1-1/+13
2012-08-24Revert "Change the substream implementation in pb_decode."Petteri Aimonen3-14/+29
This reverts commit dc2da0edc568b29361479fb7405c96b1a13442cf. Add pb_close_string_substream() for copying back the state. This makes adding error messages easier in the future, as also them need to be propagated back from the substream.
2012-08-24Reorganize the field decoder interface.Petteri Aimonen6-152/+150
This makes the field decoding functions more intuitive to use. The old interface is still present if you specify NANOPB_INTERNALS. Update issue 2 Status: FixedInGit
2012-08-24Change the substream implementation in pb_decode.Petteri Aimonen2-20/+13
This makes it unnecessary to copy back the state, and also relaxes the requirements on callbacks (bytes_left will always be valid). It decreases code size by a few bytes, but may be just slightly slower.
2012-08-24Fix a confusing statement in a comment.Petteri Aimonen1-1/+1
2012-08-16Fix casting issuesStan Hu1-2/+2
2012-08-09Declare warn_unused_result only on GCC >= 3.4.0.Petteri Aimonen2-10/+10
Thanks to cea.max.simoes for bug report & fix. Update issue 25 Status: FixedInGit
2012-08-04Fix signedness warning in example_unions.Petteri Aimonen1-1/+1
2012-07-31Fix bug in decoder with packed arrays.Petteri Aimonen1-1/+4
Update issue 23 Status: FixedInGit
2012-07-31Extend 'alltypes' testcase to cover repeated fields.Petteri Aimonen3-24/+104
2012-07-19Additional unsigned vs. signed fix for tagPetteri Aimonen1-1/+1
2012-07-18Fix an unsigned vs. signed warning on some compiler.Petteri Aimonen2-3/+3
2012-07-18Fixed a few compiler warnings, added check.Petteri Aimonen3-5/+8
Main code is now compiled (for tests) with -pedantic -Wextra. The test programs are not as strictly bound, but this should improve the chances that atleast the core library compiles with most compilers without warnings.
2012-07-05Fix bug with .proto without messages (again), and add a test case for it.Petteri Aimonen3-10/+19
2012-07-05Apparently some compilers don't want to automatically cast size_t to uint64_t.Petteri Aimonen1-4/+4
2012-07-05Fix some typos in __BIG_ENDIAN__ codePetteri Aimonen1-2/+2
2012-07-05Replace #warning with the standard #error.Petteri Aimonen2-7/+3
2012-07-05Cast enum vaules to integers and cast them back where appropraiteStan Hu2-4/+4
to prevent mixed enumeration type compiler warnings
2012-07-01Replace PB_MANY_FIELDS with PB_FIELD_16BIT and PB_FIELD_32BIT.Petteri Aimonen3-34/+65
This allows more precise control over the memory use vs. field size.
2012-06-30Add PB_MANY_FIELDS option for supporting fields > 255.Petteri Aimonen3-1/+56
Add generator warning if this is necessary. Fixes issue #14.
2012-06-30Warn if PB_MAX_REQUIRED_FIELDS is not large enough.Petteri Aimonen1-0/+10
2012-06-30Improve the detection of missing required fields.Petteri Aimonen6-24/+229
Now the limit of tracked fields is configurable at compile-time using PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation. Fixes issue #18.
2012-06-25Fixed formatting in docsPetteri Aimonen1-2/+5
2012-06-25Documented NANOPB_INTERNALS compilation optionPetteri Aimonen1-0/+1
2012-06-25Note about __BIG_ENDIAN__ compilation optionPetteri Aimonen1-0/+6
2012-06-20Fix error when .proto contains no Messages (e.g. just enums).Petteri Aimonen1-1/+1
Thanks to Paul Fertser for reporting this bug.
2012-06-16Added example on how to handle unions.Petteri Aimonen4-0/+224
2012-06-16Added new functions to public interface in pb_decode.h.Petteri Aimonen3-29/+73
pb_decode_tag and pb_skip_field allow manually iterating the fields in a message.
2012-06-13Fix non-constant initializer errors with some compilers.Petteri Aimonen2-8/+28
Fixes issue #13. Thanks to Kevin Worth for reporting.
2012-06-12Add descriptor.proto into the #include exclusion listPetteri Aimonen1-1/+1
2012-05-19Merge branch 'master' of https://code.google.com/p/nanopbPetteri Aimonen2-5/+5
2012-05-19Add better error messages in the generator when libraries cannot be imported.Petteri Aimonen1-2/+22
Fixes issue #5.
2012-05-19Fix 64-bitness warnings in the example.Petteri Aimonen2-5/+5
Fixes issues 9 and 10.
2012-04-18Fixing compiler warnings, mostly related to unused parameters.Petteri Aimonen3-4/+16
Thanks to David Hotham for the patch. Fixes issue 8.
2012-03-01Refactoring the field encoder interface.Petteri Aimonen6-173/+179
Replaced the confusing pb_enc_* functions with new pb_encode_* functions that have a cleaner interface. Updated documentation. Got rid of the endian_copy stuff in pb_encode.c, instead using C casts to do it automatically. This makes the code safer and also reduces binary size by about 5%. Fixes Issue 6.
2012-02-15Modified nanopb_generator.py to generate includes for other .proto files.Petteri Aimonen1-2/+12
Implementation was suggested by extremeblue99. Fixes issue 4.
2012-01-30Fixed nanopb_generator.py to read the input file in binary mode.Petteri Aimonen1-1/+1
2012-01-23Improved documentation on field decoders.Petteri Aimonen1-5/+24
2012-01-12Fixed issue 1 reported by Erik Rosen:Petteri Aimonen4-7/+17
The size of non-callback bytes-fields was miscalculated, which caused all following fields in a message to contain garbage. Previous commit contains a testcase for this. This fix changes the generated message description. If your protocol uses bytes-fields, you should regenerate *.pb.c.
2012-01-12Added an encode/decode test for 'required' fields of all types.Petteri Aimonen4-3/+168
2012-01-12Fixed a bug in the generator that caused a compiler error on sfixed32 and ↵Petteri Aimonen1-2/+2
sfixed64 fields.
2012-01-06Linewrapping in licensePetteri Aimonen1-5/+14
2012-01-05Added logo for project :)Petteri Aimonen5-0/+1471
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1095 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30Make the fuzztest runnable againPetteri Aimonen1-2/+2
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1091 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30Expanding the tests to better cover decoding from memory buffer.Petteri Aimonen4-26/+103
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1090 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30Fixed a bug related to submessage encoding into memory buffer.Petteri Aimonen5-26/+67
Stream state was not copied back from substream in pb_enc_submessage, which caused garbage output if the stream callback modified the state. Expanded tests to cover this problem. Thanks to Paweł Pery for debugging and reporting this problem. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1089 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30Merged 0005-Handle-endianness-correctly.patch by Matt Kern.Petteri Aimonen1-5/+9
On big endian machines, pb_dec_fixed32 and pb_dec_fixed64 were incorrectly overwriting the result value even if reading failed. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1022 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30Merged 0004-Added-missing-trailing-newlines.patch by Matt Kern.Petteri Aimonen3-3/+3
Just adding newlines at the end of files to satisfy old GCC versions. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1021 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30Merged 0003-Fixed-format-specifiers.patch by Matt Kern.Petteri Aimonen2-8/+8
Fixes cross-platform issues with the length modifier in printf specifiers, most importantly %d -> %ld. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1020 e3a754e5-d11d-0410-8d38-ebb782a927b9