Changeset 331 for EcnlProtoTool/trunk/mruby-1.3.0/src/fmt_fp.c
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-1.3.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-1.3.0/src/fmt_fp.c
r321 r331 34 34 #include <ctype.h> 35 35 36 #include "mruby.h"37 #include "mruby/string.h"36 #include <mruby.h> 37 #include <mruby/string.h> 38 38 39 39 struct fmt_args { … … 157 157 s=buf; 158 158 do { 159 int x= y;159 int x=(int)y; 160 160 *s++=xdigits[x]|(t&32); 161 161 y=16*(y-x); … … 185 185 186 186 do { 187 *z = y;187 *z = (uint32_t)y; 188 188 y = 1000000000*(y-*z++); 189 189 } while (y); … … 195 195 uint64_t x = ((uint64_t)*d<<sh)+carry; 196 196 *d = x % 1000000000; 197 carry = x / 1000000000;197 carry = (uint32_t)(x / 1000000000); 198 198 } 199 199 if (carry) *--a = carry; … … 254 254 } 255 255 for (; z>a && !z[-1]; z--); 256 256 257 257 if ((t|32)=='g') { 258 258 if (!p) p++; … … 355 355 default: 356 356 return -1; 357 } 357 } 358 358 } 359 359
Note:
See TracChangeset
for help on using the changeset viewer.