Skip to content

Commit

Permalink
Merge pull request #169 from saxbophone/develop
Browse files Browse the repository at this point in the history
v0.26.0 - Breaking file format release
  • Loading branch information
saxbophone authored Feb 5, 2017
2 parents 18c4db0 + 586f4e9 commit 97488a0
Show file tree
Hide file tree
Showing 71 changed files with 648 additions and 424 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ branches:
- master
- develop
- /^test\/.*$/
- /^feature\/.*$/
install:
# override $CC to use gcc-5
- if [ "$CC" = "gcc" ]; then export CC="gcc-5"; fi
Expand Down
27 changes: 14 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# begin basic metadata
cmake_minimum_required(VERSION 3.0)

project(sxbp VERSION 0.25.3 LANGUAGES C)
project(sxbp VERSION 0.26.0 LANGUAGES C)

# set default C standard to use (C99) if not already set
if(NOT DEFINED LIBSXBP_C_STANDARD)
Expand All @@ -28,7 +28,7 @@ if(DEFINED ENV{LIBSXBP_C_STANDARD})
set(LIBSXBP_C_STANDARD "$ENV{LIBSXBP_C_STANDARD}")
endif()
endif()
message(STATUS "C Standard set to C${LIBSXBP_C_STANDARD}")
message(STATUS "[sxbp] C Standard set to C${LIBSXBP_C_STANDARD}")
set(CMAKE_C_STANDARD ${LIBSXBP_C_STANDARD})
set(CMAKE_C_STANDARD_REQUIRED ON)

Expand All @@ -39,13 +39,14 @@ set(
set(LIBSXBP_ESCAPED_VERSION_STRING "\"${LIBSXBP_VERSION_STRING}\"")
# end basic metadata

# this is a 64-bit project, so check now to make sure we're 64-bit, issue warning if not
if(CMAKE_SIZEOF_VOID_P LESS 8)
# must be running on an architecture of at least 32 bits
if(CMAKE_SIZEOF_VOID_P LESS 4)
message(
WARNING
"It looks like this system's architecture is not at least 64-bit.\n"
"libsxbp requires a system with an architecture of at least 64 bits!\n"
"We'll continue trying to compile anyway, be sure to run the unit tests after."
"[sxbp] It looks like this system's architecture is not at least 32-bit.\n"
" libsxbp requires a system with an architecture of at least 32 bits!\n"
" We'll continue trying to compile anyway, but may fail.\n"
" Be sure to run the unit tests after!"
)
endif()

Expand All @@ -70,7 +71,7 @@ endfunction()

# enable extra flags (warnings) if we're not in release mode
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "Warnings Enabled")
message(STATUS "[sxbp] Warnings Enabled")
# enable all warnings about 'questionable constructs'
enable_c_compiler_flag_if_supported("-Wall")
# issue 'pedantic' warnings for strict ISO compliance
Expand All @@ -90,7 +91,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# work out whether we have or have not requested PNG support, or don't care (default)
if(NOT DEFINED LIBSXBP_PNG_SUPPORT)
# try and find libpng v1.x, but don't fail if we can't
message(STATUS "PNG output support will be enabled if possible")
message(STATUS "[sxbp] PNG output support will be enabled if possible")
find_package(PNG 1 EXACT)
# set SXBP_PNG_SUPPORT based on value of PNG_FOUND
if(PNG_FOUND)
Expand All @@ -100,12 +101,12 @@ if(NOT DEFINED LIBSXBP_PNG_SUPPORT)
endif()
elseif(LIBSXBP_PNG_SUPPORT)
# find libpng v1.x and fail the build if we can't
message(STATUS "PNG output support explicitly enabled")
message(STATUS "[sxbp] PNG output support explicitly enabled")
find_package(PNG 1 EXACT REQUIRED)
else()
# we've explicitly disabled PNG support, so don't include libpng
# issue a message saying so
message(STATUS "PNG output support explicitly disabled")
message(STATUS "[sxbp] PNG output support explicitly disabled")
endif()

# include libpng directories and add feature test macro if support is enabled
Expand All @@ -114,10 +115,10 @@ if(LIBSXBP_PNG_SUPPORT)
# feature test macro
add_definitions(-DLIBSXBP_PNG_SUPPORT)
# issue message
message(STATUS "PNG output support enabled")
message(STATUS "[sxbp] PNG output support enabled")
else()
# issue message
message(STATUS "PNG output support disabled")
message(STATUS "[sxbp] PNG output support disabled")
endif()
# end dependencies

Expand Down
4 changes: 2 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = libsxbp
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.25
PROJECT_NUMBER = v0.26

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand All @@ -51,7 +51,7 @@ PROJECT_BRIEF = "Experimental generation of 2D spiralling lines based o
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO =
PROJECT_LOGO = libsxbp.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Although this project doesn't work in sprints, there is a [*sprint board*](https

## Please Note

- This software only works on systems capable of running 64-bit code.

- This is a library only. If you're looking for something that is immediately usable for the end-user, you probably want to look at [sxbp](https://github.com/saxbophone/sxbp) instead, which is a command-line program I wrote which uses libsxbp to render input binary files to PNG images.

- As libsxbp is currently at major version 0, expect the library API to be unstable. I will endeavour as much as possible to make sure breaking changes increment the minor version number whilst in the version 0.x.x series and bugfixes increment the patch version number, but no heavy reliance should be placed on this.
Expand Down
3 changes: 2 additions & 1 deletion docs/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libsxbp.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libsxbp
&#160;<span id="projectnumber">v0.25</span>
&#160;<span id="projectnumber">v0.26</span>
</div>
<div id="projectbrief">Experimental generation of 2D spiralling lines based on input binary data.</div>
</td>
Expand Down
3 changes: 2 additions & 1 deletion docs/backend__pbm_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libsxbp.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libsxbp
&#160;<span id="projectnumber">v0.25</span>
&#160;<span id="projectnumber">v0.26</span>
</div>
<div id="projectbrief">Experimental generation of 2D spiralling lines based on input binary data.</div>
</td>
Expand Down
7 changes: 4 additions & 3 deletions docs/backend__pbm_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libsxbp.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libsxbp
&#160;<span id="projectnumber">v0.25</span>
&#160;<span id="projectnumber">v0.26</span>
</div>
<div id="projectbrief">Experimental generation of 2D spiralling lines based on input binary data.</div>
</td>
Expand Down Expand Up @@ -93,8 +94,8 @@
<div class="contents">
<a href="backend__pbm_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * This source file forms part of libsxbp, a library which generates</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * experimental 2D spiral-like shapes based on input binary data.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#ifndef SAXBOPHONE_SAXBOSPIRAL_BACKEND_PBM_H</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#define SAXBOPHONE_SAXBOSPIRAL_BACKEND_PBM_H</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;../saxbospiral.h&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;../render.h&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<a class="code" href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a> <a class="code" href="backend__pbm_8h.html#a5d36e5bbb54b1d681b8d1cf8beb3c96d">sxbp_render_backend_pbm</a>(</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="structsxbp__bitmap__t.html">sxbp_bitmap_t</a> bitmap, <a class="code" href="structsxbp__buffer__t.html">sxbp_buffer_t</a>* buffer</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment">// end of header file</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="backend__pbm_8h_html_a5d36e5bbb54b1d681b8d1cf8beb3c96d"><div class="ttname"><a href="backend__pbm_8h.html#a5d36e5bbb54b1d681b8d1cf8beb3c96d">sxbp_render_backend_pbm</a></div><div class="ttdeci">sxbp_status_t sxbp_render_backend_pbm(sxbp_bitmap_t bitmap, sxbp_buffer_t *buffer)</div><div class="ttdoc">Renders a bitmap image to a PBM image. </div><div class="ttdef"><b>Definition:</b> backend_pbm.c:29</div></div>
<div class="ttc" id="structsxbp__bitmap__t_html"><div class="ttname"><a href="structsxbp__bitmap__t.html">sxbp_bitmap_t</a></div><div class="ttdoc">Used to represent a basic 1-bit, pure black/white bitmap image. </div><div class="ttdef"><b>Definition:</b> render.h:40</div></div>
<div class="ttc" id="structsxbp__buffer__t_html"><div class="ttname"><a href="structsxbp__buffer__t.html">sxbp_buffer_t</a></div><div class="ttdoc">A simple buffer type for storing arrays of bytes. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:209</div></div>
<div class="ttc" id="saxbospiral_8h_html_aaf3547c499b3c2c5909819d6790533e7"><div class="ttname"><a href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a></div><div class="ttdeci">sxbp_status_t</div><div class="ttdoc">Represents the success or failure status of an executed function. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:74</div></div>
<div class="ttc" id="structsxbp__buffer__t_html"><div class="ttname"><a href="structsxbp__buffer__t.html">sxbp_buffer_t</a></div><div class="ttdoc">A simple buffer type for storing arrays of bytes. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:217</div></div>
<div class="ttc" id="saxbospiral_8h_html_aaf3547c499b3c2c5909819d6790533e7"><div class="ttname"><a href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a></div><div class="ttdeci">sxbp_status_t</div><div class="ttdoc">Represents the success or failure status of an executed function. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:86</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
3 changes: 2 additions & 1 deletion docs/backend__png_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libsxbp.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libsxbp
&#160;<span id="projectnumber">v0.25</span>
&#160;<span id="projectnumber">v0.26</span>
</div>
<div id="projectbrief">Experimental generation of 2D spiralling lines based on input binary data.</div>
</td>
Expand Down
7 changes: 4 additions & 3 deletions docs/backend__png_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libsxbp.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libsxbp
&#160;<span id="projectnumber">v0.25</span>
&#160;<span id="projectnumber">v0.26</span>
</div>
<div id="projectbrief">Experimental generation of 2D spiralling lines based on input binary data.</div>
</td>
Expand Down Expand Up @@ -92,10 +93,10 @@
</div><!--header-->
<div class="contents">
<a href="backend__png_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * This source file forms part of libsxbp, a library which generates</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * experimental 2D spiral-like shapes based on input binary data.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#ifndef SAXBOPHONE_SAXBOSPIRAL_BACKEND_PNG_H</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#define SAXBOPHONE_SAXBOSPIRAL_BACKEND_PNG_H</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;../saxbospiral.h&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;../render.h&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="backend__png_8h.html#a1255dbf61962794ceb7b1b196eae5670">SXBP_PNG_SUPPORT</a>;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<a class="code" href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a> <a class="code" href="backend__png_8h.html#a993101e4647f141478a2afb4402730c7">sxbp_render_backend_png</a>(</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="structsxbp__bitmap__t.html">sxbp_bitmap_t</a> bitmap, <a class="code" href="structsxbp__buffer__t.html">sxbp_buffer_t</a>* buffer</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="comment">// end of header file</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="structsxbp__bitmap__t_html"><div class="ttname"><a href="structsxbp__bitmap__t.html">sxbp_bitmap_t</a></div><div class="ttdoc">Used to represent a basic 1-bit, pure black/white bitmap image. </div><div class="ttdef"><b>Definition:</b> render.h:40</div></div>
<div class="ttc" id="structsxbp__buffer__t_html"><div class="ttname"><a href="structsxbp__buffer__t.html">sxbp_buffer_t</a></div><div class="ttdoc">A simple buffer type for storing arrays of bytes. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:209</div></div>
<div class="ttc" id="structsxbp__buffer__t_html"><div class="ttname"><a href="structsxbp__buffer__t.html">sxbp_buffer_t</a></div><div class="ttdoc">A simple buffer type for storing arrays of bytes. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:217</div></div>
<div class="ttc" id="backend__png_8h_html_a1255dbf61962794ceb7b1b196eae5670"><div class="ttname"><a href="backend__png_8h.html#a1255dbf61962794ceb7b1b196eae5670">SXBP_PNG_SUPPORT</a></div><div class="ttdeci">const bool SXBP_PNG_SUPPORT</div><div class="ttdoc">Flag for whether PNG output support has been enabled. </div><div class="ttdef"><b>Definition:</b> backend_png.c:81</div></div>
<div class="ttc" id="backend__png_8h_html_a993101e4647f141478a2afb4402730c7"><div class="ttname"><a href="backend__png_8h.html#a993101e4647f141478a2afb4402730c7">sxbp_render_backend_png</a></div><div class="ttdeci">sxbp_status_t sxbp_render_backend_png(sxbp_bitmap_t bitmap, sxbp_buffer_t *buffer)</div><div class="ttdoc">Renders a bitmap image to a PNG image. </div><div class="ttdef"><b>Definition:</b> backend_png.c:84</div></div>
<div class="ttc" id="saxbospiral_8h_html_aaf3547c499b3c2c5909819d6790533e7"><div class="ttname"><a href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a></div><div class="ttdeci">sxbp_status_t</div><div class="ttdoc">Represents the success or failure status of an executed function. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:74</div></div>
<div class="ttc" id="saxbospiral_8h_html_aaf3547c499b3c2c5909819d6790533e7"><div class="ttname"><a href="saxbospiral_8h.html#aaf3547c499b3c2c5909819d6790533e7">sxbp_status_t</a></div><div class="ttdeci">sxbp_status_t</div><div class="ttdoc">Represents the success or failure status of an executed function. </div><div class="ttdef"><b>Definition:</b> saxbospiral.h:86</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
Loading

0 comments on commit 97488a0

Please sign in to comment.