Commit Graph

17 Commits

Author SHA1 Message Date
per1234 178294896c Update comments to reflect Stream functions changed from private to protected
These functions were changed from private to protected in 99f2a27553 but the comments were not updated at that time.

In conjunction with equivalent pull requests to Arduino SAM Boards and Arduino SAMD Boards, solves https://github.com/arduino/Arduino/issues/6146.
2017-07-07 01:28:27 +02:00
Sandeep Mistry af0e712b12 Cleanup some Stream compiler warnings from #3337 2015-11-23 16:45:29 -05:00
Chris--A 699041da60 Make protected Stream::parseInt/Float overloads public.
Stream::parseInt & Stream::parseFloat previously had protected
overloads which allowed skipping a custom character. This commit
brings this feature to the public interface.

To keep the public API simpler, the single paramter overload remains
protected. However its functionality is available in the public
interface using the two parameter overload.
2015-11-23 15:46:24 -05:00
Chris--A 02909a5d39 This adds control of Stream::parseInt/float lookahead.
Its default is SKIP_ALL which reflects previous versions.
However SKIP_NONE, and SKIP_WHITESPACE can refine this behaviour.

A parameter used in the protected overloads of parseInt/Float has been
changed from `skipChar` to `ignore`.
2015-11-23 15:46:24 -05:00
Chris--A f536bf5ced This is a bug fix which prevents parseFloat from proceeding past
multiple decimals '.' in the stream. Only one can be accepted for
valid decimal numbers.
2015-11-23 15:46:24 -05:00
Chris--A ca8417e8bd This commit improves the parsing capability by allowing decimals only
prefixed by an '.' character. Previously the preceeding zero must be
present: '0.'
2015-11-23 15:46:23 -05:00
Cristian Maglie ee1499dab2 Fixed indentation in Stream.cpp, no code change 2015-04-21 18:10:32 +02:00
Cristian Maglie 9b7eb8bae3 Fixed wrong bracket placement (see #3011) 2015-04-21 18:07:42 +02:00
Kristian Sloth Lauszus 7536a6c349 Fixed: warning: comparison between signed and unsigned integer expressions 2015-04-21 00:08:11 +02:00
Kristian Sloth Lauszus 3a785745c0 Fixed: warning: suggest explicit braces to avoid ambiguous 'else' 2015-04-21 00:08:02 +02:00
Jim Leonard (Xuth) 78e73a9f8b Fix findUntil in Stream library
PR #2696 without timeout-related changes
2015-03-24 12:31:50 +01:00
Matt Robinson e9d8646952 Cast empty string to char* to fix compiler warning
Stream::find(char *target) passes an empty terminator string to
Stream::findUntil(char *target, char *terminator) which caused a compiler
warning with the updated toolchain, so cast it to a char*.
2014-07-17 16:51:35 +01:00
Cristian Maglie 887a6faa7c Merge branch 'master' into HEAD 2014-06-13 10:29:12 +02:00
Matthijs Kooijman 98eb0fc37c Don't store peeked characters in a char variable
peekNextDigit() returns an int, so it can return -1 in addition to all
256 possible bytes. By putting the result in a signe char, all bytes
over 128 will be interpreted as "no bytes available". Furthermore, it
seems that on SAM "char" is unsigned by default, causing the
"if (c < 0)" line a bit further down to always be false.

Using an int is more appropriate.

A different fix for this issue was suggested in #1399. This fix helps
towards #1728.
2014-02-19 16:09:30 +01:00
Cristian Maglie 828076175e Merge of arduino-1.0.1. Work in progress... 2012-05-23 09:22:52 +02:00
Cristian Maglie 49d12c697e Pre-merge upstream Arduino 2012-05-22 11:23:47 +02:00
Cristian Maglie 822dcb0989 Created second level in hardware folder: hardware/PACKAGE/PLATFORM/...
Made some helper class for files filtering.
platforms.txt now contains only one platform at a time.
Some cleanup in Compiler and AvrDudeUploader classes.
2011-12-30 15:46:04 +01:00