mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
Run clang-format on most sources
This commit is contained in:
parent
614229e3f4
commit
369f9740de
228 changed files with 4844 additions and 4637 deletions
|
@ -16,11 +16,11 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/clktck.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/_getauxval.internal.h"
|
||||
#include "libc/runtime/clktck.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/auxv.h"
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/sysv/consts/clone.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/ucontext-netbsd.internal.h"
|
||||
|
@ -37,7 +38,6 @@
|
|||
#include "libc/sock/internal.h"
|
||||
#include "libc/stdalign.internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/clone.h"
|
||||
#include "libc/sysv/consts/futex.h"
|
||||
#include "libc/sysv/consts/nr.h"
|
||||
#include "libc/sysv/consts/nrlinux.h"
|
||||
|
|
|
@ -70,7 +70,7 @@ static void EfiInitVga(struct mman *mm, EFI_SYSTEM_TABLE *SystemTable) {
|
|||
case 0x00FF0000U:
|
||||
if (le32toh(PixelInfo->ReservedMask) >= 0x01000000U &&
|
||||
le32toh(PixelInfo->GreenMask) == 0x0000FF00U &&
|
||||
le32toh(PixelInfo->BlueMask) == 0x000000FFU) {
|
||||
le32toh(PixelInfo->BlueMask) == 0x000000FFU) {
|
||||
vid_typ = PC_VIDEO_BGRX8888;
|
||||
bytes_per_pix = 4;
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ static void EfiInitVga(struct mman *mm, EFI_SYSTEM_TABLE *SystemTable) {
|
|||
case 0x000000FFU:
|
||||
if (le32toh(PixelInfo->ReservedMask) >= 0x01000000U &&
|
||||
le32toh(PixelInfo->GreenMask) == 0x0000FF00U &&
|
||||
le32toh(PixelInfo->BlueMask) == 0x00FF0000U) {
|
||||
le32toh(PixelInfo->BlueMask) == 0x00FF0000U) {
|
||||
vid_typ = PC_VIDEO_RGBX8888;
|
||||
bytes_per_pix = 4;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static void EfiInitVga(struct mman *mm, EFI_SYSTEM_TABLE *SystemTable) {
|
|||
case 0x0000F800U:
|
||||
if (le32toh(PixelInfo->ReservedMask) <= 0x0000FFFFU &&
|
||||
le32toh(PixelInfo->GreenMask) == 0x000007E0U &&
|
||||
le32toh(PixelInfo->BlueMask) == 0x0000001FU) {
|
||||
le32toh(PixelInfo->BlueMask) == 0x0000001FU) {
|
||||
vid_typ = PC_VIDEO_BGR565;
|
||||
bytes_per_pix = 2;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ static void EfiInitVga(struct mman *mm, EFI_SYSTEM_TABLE *SystemTable) {
|
|||
case 0x00007C00U:
|
||||
if (le32toh(PixelInfo->ReservedMask) <= 0x0000FFFFU &&
|
||||
le32toh(PixelInfo->GreenMask) == 0x000003E0U &&
|
||||
le32toh(PixelInfo->BlueMask) == 0x0000001FU) {
|
||||
le32toh(PixelInfo->BlueMask) == 0x0000001FU) {
|
||||
vid_typ = PC_VIDEO_BGR555;
|
||||
bytes_per_pix = 2;
|
||||
}
|
||||
|
@ -172,12 +172,12 @@ __msabi noasan EFI_STATUS EfiMain(EFI_HANDLE ImageHandle,
|
|||
(0x7e000 - 0x79000 + sizeof(struct EfiArgs) + 4095) / 4096, &Address);
|
||||
Address = IMAGE_BASE_PHYSICAL;
|
||||
SystemTable->BootServices->AllocatePages(
|
||||
AllocateAddress, EfiRuntimeServicesData,
|
||||
((_end - _base) + 4095) / 4096, &Address);
|
||||
AllocateAddress, EfiRuntimeServicesData, ((_end - _base) + 4095) / 4096,
|
||||
&Address);
|
||||
mm = (struct mman *)0x0500;
|
||||
SystemTable->BootServices->SetMem(mm, sizeof(*mm), 0);
|
||||
SystemTable->BootServices->SetMem((void *)0x79000,
|
||||
0x7e000 - 0x79000 + sizeof(struct EfiArgs), 0);
|
||||
SystemTable->BootServices->SetMem(
|
||||
(void *)0x79000, 0x7e000 - 0x79000 + sizeof(struct EfiArgs), 0);
|
||||
SystemTable->BootServices->CopyMem((void *)IMAGE_BASE_PHYSICAL, _base,
|
||||
_end - _base);
|
||||
|
||||
|
@ -215,8 +215,7 @@ __msabi noasan EFI_STATUS EfiMain(EFI_HANDLE ImageHandle,
|
|||
case EfiLoaderData:
|
||||
case EfiBootServicesCode:
|
||||
case EfiBootServicesData:
|
||||
if (Desc->PhysicalStart != 0)
|
||||
break;
|
||||
if (Desc->PhysicalStart != 0) break;
|
||||
/* fallthrough */
|
||||
case EfiConventionalMemory:
|
||||
mm->e820[j].addr = Desc->PhysicalStart;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/symbols.internal.h"
|
||||
|
|
|
@ -39,9 +39,9 @@ struct mman {
|
|||
struct { /* 0x1d48 — starting cursor pos. */
|
||||
unsigned short y, x;
|
||||
} pc_video_curs_info;
|
||||
unsigned short pc_video_char_height; /* 0x1d4c — character height (useful
|
||||
for setting cursor shape
|
||||
in text mode) */
|
||||
unsigned short pc_video_char_height; /* 0x1d4c — character height (useful
|
||||
for setting cursor shape
|
||||
in text mode) */
|
||||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/sysv/consts/mremap.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
|
@ -30,7 +31,6 @@
|
|||
#include "libc/runtime/memtrack.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/mremap.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
#define IP(X) (intptr_t)(X)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/sysv/consts/msync.h"
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/cp.internal.h"
|
||||
|
@ -24,7 +25,6 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/sysv/consts/msync.h"
|
||||
|
||||
/**
|
||||
* Synchronize memory mapping changes to disk.
|
||||
|
|
|
@ -18,4 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/internal.h"
|
||||
|
||||
void __stack_chk_fail_local(void) { __stack_chk_fail(); }
|
||||
void __stack_chk_fail_local(void) {
|
||||
__stack_chk_fail();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#define LITERALLY(NAME) $NAME
|
||||
/* clang-format on */
|
||||
#else
|
||||
#define SYMBOLIC(NAME) NAME
|
||||
#define SYMBOLIC(NAME) NAME
|
||||
#define LITERALLY(NAME) NAME
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/sysconf.h"
|
||||
#include "libc/runtime/clktck.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/sysconf.h"
|
||||
#include "libc/sysv/consts/limits.h"
|
||||
#include "libc/sysv/consts/rlimit.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue