Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mprintf: reduce include overhead\nproper declare symbols with C linka… #791

Merged
merged 2 commits into from
Nov 5, 2016

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Nov 3, 2016

…ge\nfix crash when size is smaller than arg_size for %d %u\n fix padding for %d and %f\nfix buffer overflow for %d %f\n add vsnprintf equivalent \n add putch equivalent

Rebase of #748

…ge\nfix crash when size is smaller than arg_size for %d %u\n fix padding for %d and %f\nfix buffer overflow for %d %f\n add vsnprintf equivalent \n add putch equivalent
@hreintke hreintke added the Ideas label Nov 3, 2016
// Author zitron: http://forum.arduino.cc/index.php?topic=37391#msg276209
// modified by ADiea: remove dependencies strcat, floor, round; reorganize+speedup code
char *dtostrf(double floatVar, int minStringWidthIncDecimalPoint, int numDigitsAfterDecimal, char *outputBuffer)
extern char *dtostrf_p(double floatVar, int minStringWidthIncDecimalPoint, int numDigitsAfterDecimal, char *outputBuffer, char pad)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ADiea why you have extern here?!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm agree should be removed, no idea what was on my mind

@@ -7,7 +7,8 @@ Descr: embedded very simple version of printf with float support
*/

#include <stdarg.h>
#include "../../SmingCore/SmingCore.h"
//#include "../../SmingCore/SmingCore.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ADiea If you want to use only osapi.h then please remove the commented include above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, good to see activity on sming again!

@anakod
Copy link
Member

anakod commented Nov 4, 2016

Is it ready?

@anakod
Copy link
Member

anakod commented Nov 4, 2016

I'm very like this PR corrections and think it should be merged as soon as possible.

@slaff slaff mentioned this pull request Nov 4, 2016
@slaff slaff merged commit 5648c0f into SmingHub:develop Nov 5, 2016
@hreintke hreintke removed the Ideas label Nov 5, 2016
@slaff slaff self-assigned this Nov 5, 2016
@slaff slaff deleted the feature/safe-mprintf branch February 23, 2017 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants