-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a27b6de
Showing
233 changed files
with
33,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
*.a | ||
*.o | ||
*.so | ||
*.to | ||
*.lo | ||
*.la | ||
*.dylib | ||
test_* | ||
!test_*.c | ||
!test_*.cpp | ||
!test_*.py | ||
*.tar.gz | ||
*~ | ||
TAGS | ||
.#* | ||
*# | ||
~*xlsx | ||
*.xlsx | ||
!test/functional/xlsx_files/*.xlsx | ||
*.pyc | ||
.cproject | ||
.project | ||
.pydevproject | ||
.settings/ | ||
.DS_Store | ||
__pycache__ | ||
docs/html | ||
docs/latex | ||
.deps | ||
.dirstamp | ||
_temp.c | ||
examples/* | ||
!examples/*.c | ||
!examples/Makefile | ||
|
||
|
||
third_party/gtest-1.7.0/Makefile | ||
third_party/gtest-1.7.0/build-aux/config.h | ||
third_party/gtest-1.7.0/build-aux/stamp-h1 | ||
third_party/gtest-1.7.0/config.log | ||
third_party/gtest-1.7.0/config.status | ||
third_party/gtest-1.7.0/lib/ | ||
third_party/gtest-1.7.0/libtool | ||
third_party/gtest-1.7.0/scripts/gtest-config | ||
|
||
third_party/zlib-1.2.8/configure.log | ||
third_party/zlib-1.2.8/contrib/minizip/miniunz | ||
third_party/zlib-1.2.8/contrib/minizip/minizip | ||
third_party/zlib-1.2.8/example | ||
third_party/zlib-1.2.8/examplesh | ||
third_party/zlib-1.2.8/minigzip | ||
third_party/zlib-1.2.8/minigzipsh | ||
third_party/zlib-1.2.8/zlib.pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Indent rules for libxlsxwriter. | ||
* | ||
* The rules for user defined typedefs can be update as follows: | ||
* | ||
perl -i -pe 'print and last if /[l]ibxlsxwriter typedefs/' .indent.pro | ||
ack -h typedef include src | perl -lne 'print "-T $1" if /\w+\s+\w+\s+(\w+)/' | sort >> .indent.pro | ||
* | ||
*/ | ||
|
||
/* Command line options used with GNU indent 2.2.10 */ | ||
--braces-on-if-line | ||
--braces-on-struct-decl-line | ||
--case-indentation 4 | ||
--continue-at-parentheses | ||
--declaration-comment-column 0 | ||
--format-first-column-comments | ||
--honour-newlines | ||
--ignore-profile | ||
--indent-label 0 | ||
--indent-level 4 | ||
--no-space-after-function-call-names | ||
--no-tabs | ||
--swallow-optional-blank-lines | ||
|
||
/* Typedefs used in the code. */ | ||
-T int8_t | ||
-T int16_t | ||
-T int32_t | ||
-T int64_t | ||
-T uint8_t | ||
-T uint16_t | ||
-T uint32_t | ||
-T uint64_t | ||
-T ssize_t | ||
-T size_t | ||
-T time_t | ||
|
||
-T LIST_ENTRY | ||
-T SLIST_ENTRY | ||
-T STAILQ_ENTRY | ||
-T TAILQ_ENTRY | ||
|
||
/* libxlsxwriter typedefs. */ | ||
-T lxw_app | ||
-T lxw_border | ||
-T lxw_cell | ||
-T lxw_color_t | ||
-T lxw_content_types | ||
-T lxw_core | ||
-T lxw_datetime | ||
-T lxw_doc_properties | ||
-T lxw_fill | ||
-T lxw_font | ||
-T lxw_format | ||
-T lxw_hash_element | ||
-T lxw_hash_table | ||
-T lxw_heading_pair | ||
-T lxw_packager | ||
-T lxw_part_name | ||
-T lxw_rel_tuple | ||
-T lxw_relationships | ||
-T lxw_row | ||
-T lxw_sst | ||
-T lxw_styles | ||
-T lxw_theme | ||
-T lxw_tuple | ||
-T lxw_workbook | ||
-T lxw_worksheet | ||
-T lxw_worksheet_init_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
@page changes Changes | ||
|
||
|
||
## 0.0.1 June 8 2014 | ||
|
||
- First GitHub release. | ||
|
||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
|
||
Libxlsxwriter is released under a FreeBSD license: | ||
|
||
Copyright (c) 2013, John McNamara <[email protected]> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
The views and conclusions contained in the software and documentation are those | ||
of the authors and should not be interpreted as representing official policies, | ||
either expressed or implied, of the FreeBSD Project. | ||
|
||
|
||
Libxlsxwriter includes `queue.h` from FreeBSD and the `minizip` component of | ||
`zlib` which have the following licenses: | ||
|
||
|
||
Queue.h from FreeBSD: | ||
|
||
Copyright (c) 1991, 1993 | ||
The Regents of the University of California. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
4. Neither the name of the University nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
SUCH DAMAGE. | ||
|
||
|
||
Zlib has the following License/Copyright: | ||
|
||
(C) 1995-2013 Jean-loup Gailly and Mark Adler | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
|
||
Jean-loup Gailly Mark Adler | ||
[email protected] [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
############################################################################### | ||
# | ||
# Makefile for libxlsxwriter library. | ||
# | ||
# Copyright 2014, John McNamara, [email protected] | ||
# | ||
|
||
# Keep the output quiet by default. | ||
Q=@ | ||
ifdef V | ||
Q= | ||
endif | ||
|
||
.PHONY: docs tags examples | ||
|
||
# Build the libs. | ||
all : | ||
$(Q)make -C third_party/minizip | ||
$(Q)make -C src | ||
|
||
# Build the example programs. | ||
examples: | ||
$(Q)make -C examples | ||
|
||
# Clean src and test directories. | ||
clean : | ||
$(Q)make clean -C src | ||
$(Q)make clean -C test/unit | ||
$(Q)make clean -C test/functional/src | ||
$(Q)make clean -C examples | ||
$(Q)make clean -C third_party/minizip | ||
$(Q)rm -rf docs/html | ||
|
||
# Run the unit tests. | ||
test : all test_functional test_unit | ||
$(Q)make test -C test/unit | ||
|
||
# Run the functional tests. | ||
test_functional : all | ||
$(Q)make -C test/functional/src | ||
$(Q)py.test test/functional -v | ||
|
||
# Run all tests. | ||
test_unit : all | ||
@echo "Compiling unit tests ..." | ||
$(Q)make test -C test/unit | ||
|
||
# Test the functional test exes with valgrind. | ||
test_valgrind : all | ||
$(Q)make -C test/functional/src test_valgrind | ||
$(Q)make -C examples test_valgrind | ||
|
||
# Indent the source files with the .indent.pro settings. | ||
indent: | ||
$(Q)gindent src/*.c include/*.h | ||
|
||
tags: | ||
$(Q)rm -f TAGS | ||
$(Q)etags src/*.c include/*.h include/xlsxwriter/*.h | ||
|
||
# Build the doxygen docs. | ||
docs: | ||
$(Q)make -C docs | ||
|
||
# Simple minded install. | ||
install: | ||
$(Q)cp -r include/* /usr/include | ||
$(Q)cp lib/* /usr/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
|
||
The libxlsxwriter library. | ||
|
||
|
||
Work in Progress. Check back later. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#/bin/bash | ||
|
||
# Perform some minor clean-ups/fixes to the docs. | ||
|
||
perl -i -pe "s/Related Pages/Contents/" html/*.html | ||
perl -i -pe "s/Related Pages/Contents/" html/*.html | ||
perl -i -pe "s/_page/_8h/" html/pages.html | ||
perl -i ../dev/release/fix_example_docs.pl html/examples.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/perl | ||
|
||
# | ||
# Simple program to arrange the example programs in a user defined order | ||
# instead or sorted order. Also add a caption. | ||
# | ||
# Copyright 2014, John McNamara, [email protected] | ||
# | ||
use warnings; | ||
use strict; | ||
|
||
# The required example order and descriptions. | ||
my @examples = ( | ||
[ 'hello.c', 'A simple hello world example' ], | ||
[ 'anatomy.c', 'The anatomy of a libxlsxwriter program' ], | ||
[ 'demo.c', 'Demo of some of the libxlsxwriter features' ], | ||
[ 'tutorial1.c', 'Tutorial 1 from the documentation' ], | ||
[ 'tutorial2.c', 'Tutorial 2 from the documentation' ], | ||
[ 'tutorial3.c', 'Tutorial 3 from the documentation' ], | ||
[ 'format_font.c', 'Example of writing data with font formatting' ], | ||
[ 'format_num_format.c', 'Example of writing data with number formatting' ], | ||
[ 'dates_and_times01.c', 'Writing dates and times with numbers' ], | ||
[ 'dates_and_times02.c', 'Writing dates and times with datetime' ], | ||
[ 'dates_and_times03.c', 'Dates and times with different formats' ], | ||
[ 'utf8.c', 'A example of some UTF-8 text' ], | ||
); | ||
|
||
# Convert the array refs to a hash for lookups. | ||
my %examples; | ||
for my $example (@examples) { | ||
$examples{$example->[0]} = 1; | ||
} | ||
|
||
my $in_list = 0; | ||
|
||
while ( my $line = <> ) { | ||
|
||
# Print all lines not in the <ul> list. | ||
print $line if !$in_list; | ||
|
||
# Check for <ul> list. | ||
if ( $line =~ /<div class="textblock">/ ) { | ||
$in_list = 1; | ||
} | ||
|
||
# Capture the <li> items of the list. | ||
if ( $line =~ /<li><a class="el" href="[^"]+">([^<]+)/ ) { | ||
my $example = $1; | ||
|
||
# Warn if there are any new/unkown items. | ||
if ( !exists $examples{$example} ) { | ||
warn "Unknown example: $example\n"; | ||
} | ||
next; | ||
} | ||
|
||
# At the end of the <ul> list print out the <li> items in user defined order. | ||
if ( $line =~ m{^</ul>} ) { | ||
$in_list = 0; | ||
|
||
for my $aref ( @examples ) { | ||
my $example = $aref->[0]; | ||
my $filename = $aref->[0]; | ||
my $desc = $aref->[1]; | ||
|
||
$example =~ s/.c/_8c-example.html/; | ||
|
||
printf qq(<li><a class="el" href="%s">%s</a> %s</li>\n\n), | ||
$example, $filename, $desc; | ||
} | ||
print $line; | ||
} | ||
} | ||
|
||
__END__ |
Oops, something went wrong.