Run clang-format (#1197)

This commit is contained in:
Jōshin 2024-06-01 13:30:43 -07:00 committed by GitHub
parent ea081b262c
commit f032b5570b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
183 changed files with 1074 additions and 983 deletions

View file

@ -16,9 +16,9 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "tool/plinko/lib/error.h"
#include "libc/log/log.h"
#include "libc/runtime/runtime.h"
#include "tool/plinko/lib/error.h"
#include "tool/plinko/lib/plinko.h"
#include "tool/plinko/lib/printf.h"
#include "tool/plinko/lib/stack.h"

View file

@ -19,12 +19,14 @@ void Marker(const dword[], int, int);
int Relocater(const dword[], const unsigned[], int, int);
forceinline int Relocate(const struct Gc *G, int x) {
if (x >= G->C) return x;
if (x >= G->C)
return x;
return Relocater(G->M, G->P, G->A, x);
}
forceinline void Mark(struct Gc *G, int x) {
if (x >= G->A) return;
if (x >= G->A)
return;
Marker(G->M, G->A, x);
}

View file

@ -16,8 +16,8 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/assert.h"
#include "tool/plinko/lib/histo.h"
#include "libc/assert.h"
#include "tool/plinko/lib/plinko.h"
#include "tool/plinko/lib/printf.h"

View file

@ -6,13 +6,15 @@
COSMOPOLITAN_C_START_
forceinline nosideeffect int Head(int x) {
if (x <= 0) return LO(Get(x));
if (x <= 0)
return LO(Get(x));
Push(x);
Raise(kCar);
}
forceinline nosideeffect int Tail(int x) {
if (x <= 0) return HI(Get(x));
if (x <= 0)
return HI(Get(x));
Push(x);
Raise(kCdr);
}

View file

@ -311,8 +311,10 @@ forceinline struct T Ret(dword ea, dword tm, dword r) {
}
static inline int FasterRecurse(int v, int a, dword p1, dword p2) {
if (v == LO(p1)) return HI(p1);
if (v == LO(p2)) return HI(p2);
if (v == LO(p1))
return HI(p1);
if (v == LO(p2))
return HI(p2);
/* if (IsPrecious(v)) return v; */
/* if (v < 0 && Car(v) == kQuote) return Car(Cdr(v)); */
return recurse(MAKE(v, a), p1, p2);

View file

@ -16,10 +16,10 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "tool/plinko/lib/print.h"
#include "tool/build/lib/case.h"
#include "tool/plinko/lib/char.h"
#include "tool/plinko/lib/plinko.h"
#include "tool/plinko/lib/print.h"
#include "tool/plinko/lib/tree.h"
int PrintDot(int fd) {