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,8 +16,8 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/intrin/safemacros.internal.h"
#include "libc/fmt/itoa.h"
#include "libc/intrin/safemacros.internal.h"
#include "tool/viz/lib/formatstringtable.h"
void *FormatStringTableAsCode(long yn, long xn, const char *const T[yn][xn],

View file

@ -53,7 +53,8 @@
// from the space left below, seen by overimposing an underline ⠿_
// along the 3 dots, the Y axis is least 1,0,1,0,1,0,0,1 so 8 steps
//
// Problem: fonts are taller than wider, and terminals are traditionally 80x24, so
// Problem: fonts are taller than wider, and terminals are traditionally 80x24,
// so
// - we shouldn't use square glyphs, 8x16 seems to be the minimal size
// - we should adapt the conversion to BMP to avoid accidental Y downsampling

View file

@ -16,8 +16,8 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/log/check.h"
#include "tool/viz/lib/halfblit.h"
#include "libc/log/check.h"
void *halfblit(size_t n, void *block) {
unsigned y, x;

View file

@ -16,14 +16,15 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "tool/viz/lib/stringbuilder.h"
#include "libc/log/check.h"
#include "libc/macros.internal.h"
#include "libc/mem/mem.h"
#include "libc/str/str.h"
#include "libc/x/x.h"
#include "tool/viz/lib/stringbuilder.h"
static dontinline void StringBuilderGrow(size_t need, struct StringBuilder *sb) {
static dontinline void StringBuilderGrow(size_t need,
struct StringBuilder *sb) {
size_t n2;
n2 = MAX(16, sb->n);
while (sb->i + need > n2)

View file

@ -225,10 +225,10 @@ static char16_t statusline16[256];
#define GODOWN(x) ((x) << 8)
#define GORIGHT(x) (((x) & ~RIGHT) << 1)
#define GOLEFT(x) (((x) & ~LEFT) >> 1)
#define LEFTMOST(x) ((x) & LEFT)
#define RIGHTMOST(x) ((x) & RIGHT)
#define TOPMOST(x) ((x) & TOP)
#define BOTMOST(x) ((x) & BOTTOM)
#define LEFTMOST(x) ((x)&LEFT)
#define RIGHTMOST(x) ((x)&RIGHT)
#define TOPMOST(x) ((x)&TOP)
#define BOTMOST(x) ((x)&BOTTOM)
#define ADD(X) \
do { \

View file

@ -17,18 +17,20 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/serialize.h"
#include "libc/log/check.h"
#include "libc/log/log.h"
#include "libc/mem/gc.h"
#include "libc/mem/mem.h"
#include "libc/serialize.h"
#include "libc/stdio/stdio.h"
#include "net/http/http.h"
#include "net/http/ip.h"
#include "third_party/maxmind/maxminddb.h"
#define PATH(...) \
(const char *const[]) { __VA_ARGS__, 0 }
#define PATH(...) \
(const char *const[]) { \
__VA_ARGS__, 0 \
}
MMDB_s *ipdb, *asdb;