Skip to content

Commit c79b44f

Browse files
authored
Merge pull request #81 from saxbophone/develop
Version 0.14.0
2 parents 806eef9 + e5d8206 commit c79b44f

File tree

18 files changed

+190
-77
lines changed

18 files changed

+190
-77
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# begin basic metadata
22
cmake_minimum_required(VERSION 3.0)
33

4-
project(saxbospiral VERSION 0.13.1 LANGUAGES C)
4+
project(saxbospiral VERSION 0.14.0 LANGUAGES C)
55
set(CMAKE_C_STANDARD 99)
66
set(CMAKE_C_STANDARD_REQUIRED ON)
77
set(

saxbospiral.png

7 Bytes
Loading

saxbospiral/initialise.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ direction_t change_direction(direction_t current, rotation_t turn) {
2424
* instructions which are then used to build the pattern.
2525
* returns a status_t struct with error information (if needed)
2626
*/
27-
status_t init_spiral(buffer_t buffer, spiral_t * spiral) {
27+
status_t init_spiral(buffer_t buffer, spiral_t* spiral) {
2828
// result status object
2929
status_t result;
3030
// number of lines is number of bits of the data, + 1 for the first UP line

saxbospiral/initialise.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ direction_t change_direction(direction_t current, rotation_t turn);
2121
* instructions which are then used to build the pattern.
2222
* returns a status_t struct with error information (if needed)
2323
*/
24-
status_t init_spiral(buffer_t buffer, spiral_t * spiral);
24+
status_t init_spiral(buffer_t buffer, spiral_t* spiral);
2525

2626
#ifdef __cplusplus
2727
} // extern "C"

saxbospiral/plot.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include <stdint.h>
21
#include <stdlib.h>
32

43
#include "saxbospiral.h"
@@ -29,7 +28,7 @@ size_t sum_lines(spiral_t spiral, size_t start, size_t end) {
2928
* returns a status struct with error information (if any)
3029
*/
3130
status_t spiral_points(
32-
spiral_t spiral, co_ord_array_t * output, co_ord_t start_point,
31+
spiral_t spiral, co_ord_array_t* output, co_ord_t start_point,
3332
size_t start, size_t end
3433
) {
3534
// prepare result status
@@ -77,7 +76,7 @@ status_t spiral_points(
7776
* co_ord_cache member and are re-used if they are still valid
7877
* returns a status struct with error information (if any)
7978
*/
80-
status_t cache_spiral_points(spiral_t * spiral, size_t limit) {
79+
status_t cache_spiral_points(spiral_t* spiral, size_t limit) {
8180
// prepare result status
8281
status_t result = {{0, 0, 0}, 0};
8382
// the amount of space needed is the sum of all line lengths + 1 for end

saxbospiral/plot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ size_t sum_lines(spiral_t spiral, size_t start, size_t end);
2424
* returns a status struct with error information (if any)
2525
*/
2626
status_t spiral_points(
27-
spiral_t spiral, co_ord_array_t * output, co_ord_t start_point,
27+
spiral_t spiral, co_ord_array_t* output, co_ord_t start_point,
2828
size_t start, size_t end
2929
);
3030

@@ -37,7 +37,7 @@ status_t spiral_points(
3737
* spiral's co_ord_cache member and are re-used if they are still valid
3838
* returns a status struct with error information (if any)
3939
*/
40-
status_t cache_spiral_points(spiral_t * spiral, size_t limit);
40+
status_t cache_spiral_points(spiral_t* spiral, size_t limit);
4141

4242
#ifdef __cplusplus
4343
} // extern "C"

saxbospiral/render.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C"{
2323
* NOTE: This should NEVER be called with a pointer to anything other than a
2424
* 2-item struct of type co_ord_t
2525
*/
26-
static void get_bounds(spiral_t spiral, co_ord_t * bounds) {
26+
static void get_bounds(spiral_t spiral, co_ord_t* bounds) {
2727
tuple_item_t min_x = 0;
2828
tuple_item_t min_y = 0;
2929
tuple_item_t max_x = 0;
@@ -54,7 +54,7 @@ static void get_bounds(spiral_t spiral, co_ord_t * bounds) {
5454
* representing a monochromatic image of the rendered spiral to the bitmap
5555
* returns a status struct with error information (if any)
5656
*/
57-
status_t render_spiral(spiral_t spiral, bitmap_t * image) {
57+
status_t render_spiral(spiral_t spiral, bitmap_t* image) {
5858
// create result status struct
5959
status_t result = {{0, 0, 0}, 0};
6060
// plot co-ords of spiral into it's cache

saxbospiral/render.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef struct bitmap_t {
2727
* representing a monochromatic image of the rendered spiral to the bitmap
2828
* returns a status struct with error information (if any)
2929
*/
30-
status_t render_spiral(spiral_t spiral, bitmap_t * image);
30+
status_t render_spiral(spiral_t spiral, bitmap_t* image);
3131

3232
#ifdef __cplusplus
3333
} // extern "C"

saxbospiral/render_backends/png_backend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static void buffer_write_data(
1717
png_structp png_ptr, png_bytep data, png_size_t length
1818
) {
1919
// retrieve pointer to buffer
20-
buffer_t * p = (buffer_t *)png_get_io_ptr(png_ptr);
20+
buffer_t* p = (buffer_t*)png_get_io_ptr(png_ptr);
2121
size_t new_size = p->size + length;
2222
// if buffer bytes pointer is not NULL, then re-allocate
2323
if(p->bytes != NULL) {
@@ -55,7 +55,7 @@ void cleanup_png_lib(png_structp png_ptr, png_infop info_ptr, png_bytep row) {
5555
* data as a PNG image to the buffer, using libpng.
5656
* returns a status struct containing error information, if any
5757
*/
58-
status_t write_png_image(bitmap_t bitmap, buffer_t * buffer) {
58+
status_t write_png_image(bitmap_t bitmap, buffer_t* buffer) {
5959
// result status
6060
status_t result;
6161
// init buffer

saxbospiral/render_backends/png_backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern "C"{
1414
* data as a PNG image to the buffer, using libpng.
1515
* returns a status struct containing error information, if any
1616
*/
17-
status_t write_png_image(bitmap_t bitmap, buffer_t * buffer);
17+
status_t write_png_image(bitmap_t bitmap, buffer_t* buffer);
1818

1919
#ifdef __cplusplus
2020
} // extern "C"

0 commit comments

Comments
 (0)