mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Rearrange code and make a faster sha256sum program
This commit is contained in:
parent
5e60e5ad10
commit
89d1e5b8f2
32 changed files with 933 additions and 517 deletions
|
@ -19,14 +19,8 @@
|
|||
#include "libc/intrin/lockxchg.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
||||
/**
|
||||
* Closes standard i/o stream and its underlying thing.
|
||||
*
|
||||
* @param f is the heap file object pointer, to close+free+clear
|
||||
* @return 0 on success or -1 on error, which can be a trick for
|
||||
* differentiating between EOF and real errors during previous
|
||||
* i/o calls, without needing to call ferror()
|
||||
*/
|
||||
// TODO(jart): delete
|
||||
|
||||
int fclose_s(FILE **fp) {
|
||||
FILE *f = NULL;
|
||||
return fclose(lockxchg(fp, &f));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue