diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-08-27 13:56:24 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-08-27 14:03:20 -0400 |
commit | c6cf5ec6ae6420e902441289a5b7524a2322a664 (patch) | |
tree | 537a21dd534b83948b7e0de38e90ebf2f2fdb95e /color.c | |
parent | 8a9b6497167626e768cab063e9d6c381523b3244 (diff) | |
download | bfs-c6cf5ec6ae6420e902441289a5b7524a2322a664.tar.xz |
Implement cost-based optimization
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -495,12 +495,28 @@ int cfprintf(CFILE *cfile, const char *format, ...) { } break; + case 'g': + if (fprintf(file, "%g", va_arg(args, double)) < 0) { + goto done; + } + break; + case 's': if (fputs(va_arg(args, const char *), file) == EOF) { goto done; } break; + case 'z': + ++i; + if (*i != 'u') { + goto invalid; + } + if (fprintf(file, "%zu", va_arg(args, size_t)) < 0) { + goto done; + } + break; + case 'P': if (print_path(cfile, va_arg(args, const struct BFTW *)) != 0) { goto done; |