mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Make small fixes and oops ran clang-format on dtoa
This commit is contained in:
parent
b5b60015f5
commit
ac00be1a4e
47 changed files with 4933 additions and 5306 deletions
|
@ -18,6 +18,7 @@
|
|||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/popcnt.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
@ -46,7 +47,7 @@ FILE *fmemopen(void *buf, size_t size, const char *mode) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (size && popcount(size) != 1) {
|
||||
if (size && popcnt(size) != 1) {
|
||||
einval();
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/popcnt.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
@ -26,7 +26,7 @@
|
|||
* Sets buffer on stdio stream.
|
||||
*/
|
||||
void setbuffer(FILE *f, char *buf, size_t size) {
|
||||
if (size && popcount(size) != 1) abort();
|
||||
if (size && popcnt(size) != 1) abort();
|
||||
if (buf && f->buf != (unsigned char *)buf) {
|
||||
free_s(&f->buf);
|
||||
if (!size) size = BUFSIZ;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/popcnt.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
* @return 0 on success or -1 on error
|
||||
*/
|
||||
int setvbuf(FILE *f, char *buf, int mode, size_t size) {
|
||||
if (size && popcount(size) != 1) return einval();
|
||||
if (size && popcnt(size) != 1) return einval();
|
||||
setbuffer(f, buf, size);
|
||||
f->bufmode = mode;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue