Skip to content

Commit

Permalink
Added float.
Browse files Browse the repository at this point in the history
  • Loading branch information
emeryberger committed Feb 8, 2020
1 parent 98ebda1 commit ad5a536
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utility/tprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ namespace tprintf {
int len = ftoa(buf, n);
auto _ __attribute__((unused)) = write(FD, buf, len);
}


inline void writeval(float n) {
char buf[MAXBUF];
int len = ftoa(buf, n);
auto _ __attribute__((unused)) = write(FD, buf, len);
}

inline void writeval(const char * str) {
auto _ __attribute__((unused)) = write(FD, str, strlen(str));
}
Expand Down

0 comments on commit ad5a536

Please sign in to comment.