Skip to content

Commit

Permalink
Clang formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Jun 2, 2024
1 parent 64dabc0 commit b11bd05
Show file tree
Hide file tree
Showing 2 changed files with 312 additions and 279 deletions.
20 changes: 12 additions & 8 deletions src/pcmcia.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@
#include <86box/timer.h>
#include <86box/pcmcia.h>

static pcmcia_socket_t* pcmcia_sockets[4];
static uint8_t pcmcia_registered_sockets_num = 0;
static pcmcia_socket_t *pcmcia_sockets[4];
static uint8_t pcmcia_registered_sockets_num = 0;

void pcmcia_reset(void)
void
pcmcia_reset(void)
{
pcmcia_registered_sockets_num = 0;
}

void pcmcia_register_socket(pcmcia_socket_t *socket)
void
pcmcia_register_socket(pcmcia_socket_t *socket)
{
pcmcia_sockets[pcmcia_registered_sockets_num++] = socket;
}

bool pcmcia_socket_is_free(pcmcia_socket_t *socket)
bool
pcmcia_socket_is_free(pcmcia_socket_t *socket)
{
return !socket->card_priv;
}

pcmcia_socket_t* pcmcia_search_for_slots(void)
pcmcia_socket_t *
pcmcia_search_for_slots(void)
{
for (int i = 0; i < pcmcia_registered_sockets_num; i++) {
if (pcmcia_sockets[i] && !pcmcia_sockets[i]->card_priv)
Expand All @@ -38,12 +42,12 @@ pcmcia_socket_t* pcmcia_search_for_slots(void)
return NULL;
}

void pcmcia_socket_insert_card(pcmcia_socket_t* socket)
void
pcmcia_socket_insert_card(pcmcia_socket_t *socket)
{
if (!socket->card_inserted)
fatal("No PCMCIA socket insertion function!\n");

socket->card_priv = socket->card_priv;
socket->card_inserted(true, socket);
}

Loading

0 comments on commit b11bd05

Please sign in to comment.