Skip to content

Commit

Permalink
style: format code and delete unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Jan 6, 2025
1 parent 940a0fc commit 9510e2c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 158 deletions.
16 changes: 8 additions & 8 deletions lib/pandagl/src/file_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void pd_file_stream_on_close(void *data)

pd_file_reader_t *pd_file_reader_create(void)
{
return calloc(1, sizeof(pd_file_reader_t));
return calloc(1, sizeof(pd_file_reader_t));
}

pd_file_reader_t *pd_file_reader_create_from_file(const char *filename)
Expand All @@ -44,20 +44,20 @@ pd_file_reader_t *pd_file_reader_create_from_file(const char *filename)
pd_file_reader_t *reader;

fp = fopen(filename, "rb");
if (fp == NULL) {
return NULL;
}
reader = pd_file_reader_create();
if (fp == NULL) {
return NULL;
}
reader = pd_file_reader_create();
reader->stream_data = fp;
reader->fn_skip = pd_file_stream_on_skip;
reader->fn_read = pd_file_stream_on_read;
reader->fn_rewind = pd_file_stream_on_rewind;
reader->fn_close = pd_file_stream_on_close;
return reader;
return reader;
}

void pd_file_reader_destroy(pd_file_reader_t *reader)
{
reader->fn_close(reader->stream_data);
free(reader);
reader->fn_close(reader->stream_data);
free(reader);
}
36 changes: 0 additions & 36 deletions lib/ui-server/README.md

This file was deleted.

103 changes: 0 additions & 103 deletions lib/ui/README.md

This file was deleted.

11 changes: 5 additions & 6 deletions lib/ui/src/ui_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ int ui_image_remove_event_listener(ui_image_t *image,
ui_image_source_t *src = (ui_image_source_t *)image;
ui_image_event_listener_t *listener;

for (node = list_get_first_node(&src->listeners); node;
node = next) {
for (node = list_get_first_node(&src->listeners); node; node = next) {
next = node->next;
listener = node->data;
if (listener->type == type && listener->handler == handler &&
Expand Down Expand Up @@ -257,12 +256,12 @@ void ui_load_images(void)

do {
ui_image_loader.changed = false;
for (list_each(node, &ui_image_loader.images)) {
if (ui_image_loader.changed) {
for (list_each(node, &ui_image_loader.images)) {
if (ui_image_loader.changed) {
break;
}
ui_image_loader_load(node->data);
}
ui_image_loader_load(node->data);
}
} while (ui_image_loader.changed);
}

Expand Down
5 changes: 0 additions & 5 deletions src/widgets/config.h.in

This file was deleted.

0 comments on commit 9510e2c

Please sign in to comment.