Changeset 09ab0a9a in mainline for uspace/lib/c/generic/io/printf_core.c
- Timestamp:
- 2018-09-13T12:05:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/printf_core.c
rb2aaaa0 r09ab0a9a 49 49 #include <wchar.h> 50 50 51 52 51 /** show prefixes 0x or 0 */ 53 52 #define __PRINTF_FLAG_PREFIX 0x00000001 … … 79 78 /** don't print trailing zeros in the fractional part */ 80 79 #define __PRINTF_FLAG_NOFRACZEROS 0x00000200 81 82 80 83 81 /** … … 125 123 static const char invalch = U_SPECIAL; 126 124 127 128 129 125 /** Unformatted double number string representation. */ 130 126 typedef struct { … … 139 135 } double_str_t; 140 136 141 142 143 137 /** Returns the sign character or 0 if no sign should be printed. */ 144 138 static int get_sign_char(bool negative, uint32_t flags) … … 166 160 return count; 167 161 } 168 169 162 170 163 /** Print one or more characters without adding newline. … … 634 627 counter += ret; 635 628 636 637 629 /* Trailing padding. */ 638 630 if (flags & __PRINTF_FLAG_LEFTALIGNED) { … … 698 690 } 699 691 700 701 692 /** Format and print the double string repressentation according 702 693 * to the %f specifier. … … 825 816 return counter; 826 817 } 827 828 818 829 819 /** Convert, format and print a double according to the %f specifier. … … 934 924 } 935 925 936 937 926 /** Format and print the double string repressentation according 938 927 * to the %e specifier. … … 1038 1027 return counter; 1039 1028 } 1040 1041 1029 1042 1030 /** Convert, format and print a double according to the %e specifier. … … 1113 1101 } 1114 1102 1115 1116 1103 /** Convert, format and print a double according to the %g specifier. 1117 1104 * … … 1193 1180 } 1194 1181 } 1195 1196 1182 1197 1183 /** Convert, format and print a double according to the specifier.
Note:
See TracChangeset
for help on using the changeset viewer.