-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
18 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_OPTS_H | ||
#define LWPRINTF_HDR_OPTS_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_OPTS_H | ||
#define LWPRINTF_HDR_OPTS_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_H | ||
#define LWPRINTF_HDR_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_OPT_H | ||
#define LWPRINTF_HDR_OPT_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_OPTS_H | ||
#define LWPRINTF_HDR_OPTS_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#ifndef LWPRINTF_HDR_SYS_H | ||
#define LWPRINTF_HDR_SYS_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#include <limits.h> | ||
#include <float.h> | ||
|
@@ -591,10 +591,11 @@ prv_calculate_dbl_num_data(lwprintf_int_t* p, float_num_t* n, double num, uint8_ | |
adder = 1; | ||
} | ||
} | ||
} else { | ||
} else | ||
#endif /* LWPRINTF_CFG_SUPPORT_TYPE_ENGINEERING */ | ||
{ | ||
n->digits_cnt_decimal_part_useful = p->m.precision; | ||
} | ||
#endif /* LWPRINTF_CFG_SUPPORT_TYPE_ENGINEERING */ | ||
} | ||
|
||
/** | ||
|
@@ -871,21 +872,18 @@ prv_format(lwprintf_int_t* p, va_list arg) { | |
break; | ||
} | ||
|
||
/* Parse format */ | ||
/* %[flags][width][.precision][length]type */ | ||
/* Go to https://docs.majerle.eu for more info about supported features */ | ||
memset(&p->m, 0x00, sizeof(p->m)); /* Reset structure */ | ||
|
||
/* Detect beginning */ | ||
if (*fmt != '%') { | ||
p->out_fn(p, *fmt); /* Output character */ | ||
++fmt; | ||
continue; | ||
} | ||
++fmt; | ||
memset(&p->m, 0x00, sizeof(p->m)); /* Reset structure */ | ||
|
||
/* Check [parameter] */ | ||
/* Not used */ | ||
/* Parse format */ | ||
/* %[flags][width][.precision][length]type */ | ||
/* Go to https://docs.majerle.eu for more info about supported features */ | ||
|
||
/* Check [flags] */ | ||
/* It can have multiple flags in any order */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#include "system/lwprintf_sys.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#include "system/lwprintf_sys.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
* This file is part of LwPRINTF - Lightweight stdio manager library. | ||
* | ||
* Author: Tilen MAJERLE <[email protected]> | ||
* Version: v1.0.1 | ||
* Version: v1.0.2 | ||
*/ | ||
#include "system/lwprintf_sys.h" | ||
|
||
|