-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
464 changed files
with
59,231 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,2 @@ | ||
Copyright (C) 2009 Lorenzo Caminiti. | ||
Distributed under DBC++ Software License (see file LICENSE_1_0.txt). |
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,27 @@ | ||
(File: LICENSE_1_0.txt) | ||
|
||
Design By Contract for C++ (DBC++) Software License, Version 1.0 | ||
April 19th, 2009 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
|
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,51 @@ | ||
|
||
all: | ||
@echo "Design by Contract for C++ (DBC++)" | ||
@echo | ||
@echo "This library does not need to be built. It is composed of " | ||
@echo "C/C++ header files only (contained int the \"include/\" directory)." | ||
@echo | ||
@echo "make install" | ||
@echo " Install DBC++ files onto your system (you might need to " | ||
@echo " be root). It will prompt you for the installation path." | ||
@echo "make doc" | ||
@echo " Build library documentation to \"doc/html/\"." | ||
@echo "make [OPTION] example" | ||
@echo " Build example programs to \"build/example/\" and their" | ||
@echo " documentation to \"codedoc/example/\"." | ||
@echo "make [OPTION] test" | ||
@echo " Build test programs to \"build/test/\" and their" | ||
@echo " documentation to \"codedoc/test/\"." | ||
@echo | ||
@echo "OPTION" | ||
@echo "CXX GCC to use GNU C++ compiler 'g++' (e.g., under Linux)" | ||
@echo " or MVVC to use Microsoft Visual C++ compiler (e.g.," | ||
@echo " MSVC version 8 under Cygwin). CXX=GCC by default." | ||
@echo | ||
@echo "EXAMPLE" | ||
@echo "make CXX=GCC example # Build all examples using g++" | ||
@echo "make CXX=MSVC test # Build all tests using MSVC" | ||
exit 0 | ||
|
||
force_: | ||
|
||
install: | ||
bin/install | ||
|
||
example: force_ | ||
make -f build/Makefile.example | ||
|
||
test: force_ | ||
make -f build/Makefile.test | ||
|
||
doc: force_ | ||
rm -f doc/html/*.* | ||
rm -f doc/html/str/*.* | ||
# Build str example, run it to upd str.out, create its doc. | ||
make -f build/Makefile.example str_codeapi | ||
make -f build/Makefile.example str | ||
/bin/bash -c "./build/example/str &> doc/src/str.out" | ||
doxygen doc/src/Doxyfile.str | ||
# Create library doc (will href to str example). | ||
cd doc/src && doxygen # From doc/src for correct path names. | ||
|
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 @@ | ||
|
||
Design By Contract for C++ (DBC++) | ||
================================== | ||
|
||
This library supports all Eiffel Design By Contract (DBC) features for C++. | ||
Among others: | ||
* Optional contract compilation/checking; | ||
* Subcontracting; | ||
* "old" in postconditions; | ||
* Automatic contract documentation (with doxygen). | ||
See http://dbcpp.sourceforge.net | ||
|
||
Copyright (C) 2009 Lorenzo Caminiti. | ||
Distributed under DBC++ Software License (see file LICENSE_1_0.txt). | ||
|
||
|
||
INSTALL | ||
------- | ||
|
||
This library does not have to be built. It is composed only of the header files | ||
in the "include" directory. To install this library, you simply have to add | ||
this library header files your compiler's include path (see the documentation | ||
for more details). | ||
|
||
|
||
DOCUMENTATION | ||
------------- | ||
|
||
See "doc/html/index.html" for documentation on how to install and use this | ||
library. | ||
|
||
Run `make' in the main directory to see how to build examples, tests, etc. | ||
|
||
The library source is contained in "include/". Every directory contains a | ||
README.txt files describing its contents. | ||
|
||
|
||
RELEASE HISTORY | ||
--------------- | ||
|
||
Releases from newset to oldest with number format "Major.Minor.SVN_Revision". | ||
|
||
Release 0.2.190 (2009-11-21) | ||
Compiled on both GCC (Linux and Cygwin) and Microsoft Visual C++ (Windows). | ||
Requiring to use "void" to specify empty function argument list. | ||
Release 0.1.126 (2009-06-17) | ||
Completed 1st documentation draft. | ||
Release 0.1.55 (2009-04-19) | ||
Reorganized files to cleanup root directory. | ||
Added installation program. | ||
Release 0.1.50 (2009-04-19) | ||
First public 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 @@ | ||
Binary files, programs, and scripts. |
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,32 @@ | ||
# $Id$ # | ||
|
||
@buffer = (); | ||
@errors = (); | ||
|
||
while (<>) { | ||
if (/^In file included from/ or /from/ or @buffer > 0) { | ||
push(@buffer, $_); | ||
#print "DEBUG: added $_ to buffer\n\n\n"; | ||
if (/warning/ or /error/) { | ||
#print "DEBUG: clearing buffer because of $_\n\n"; | ||
if (not /already a friend/) { | ||
print @buffer; | ||
push(@errors, @buffer); | ||
} | ||
@buffer = (); | ||
} | ||
} else { | ||
if (/error/ or (/warning/ and not /already a friend/ | ||
and not /\/usr\/bin\/ld/)) { | ||
push(@errors, $_); | ||
} | ||
print if not /already a friend/ and not /\/usr\/bin\/ld/; | ||
} | ||
} | ||
|
||
if(@errors > 0) { | ||
#print "***** build did not complete, had the following errors or warnings: *****\n"; | ||
#print @errors; | ||
exit 1; | ||
} | ||
|
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,28 @@ | ||
#!/bin/bash | ||
|
||
# $Id$ # | ||
|
||
# Usage: cxx-ignore_duplicate_friend_warning CXX_COMPILER [CXX_COMPILER_OPTION] | ||
# If "-Werror" is found in compiler command's options, then output is filtered | ||
# to error on any warning *but* the "duplicate friend" warning. | ||
# Example: | ||
# cxx-ignore_duplicate_friend_warning g++ -Wall -Werror ... # Error on warn. | ||
# cxx-ignore_duplicate_friend_warning g++ -Wall ... # Does not error. | ||
|
||
werror=0 # If "-Werror" was specified. | ||
cmd_without_werror="" # Compiler command with eventual "-Werror" stipped out. | ||
for arg in ${*}; do | ||
if [ "$arg" == "-Werror" ]; then | ||
werror=1 | ||
else | ||
cmd_without_werror="$cmd_without_werror $arg" | ||
fi | ||
done | ||
|
||
if [ $werror -eq 0 ]; then | ||
$cmd_without_werror | ||
else | ||
# All warnings (but duplicate friend) as errors. | ||
$cmd_without_werror 2>&1 | perl bin/cxx-duplicate_friend_warning_filter.pl | ||
fi | ||
|
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,18 @@ | ||
# source this `$ source THIS_FILE'. | ||
|
||
# Can be executed, for example under Cygwin, to setup enviroment to run | ||
# Microsoft Visual C++ command line compiler `cl.exe'. | ||
|
||
msvc="E:\bin\Microsoft Visual Studio 8" | ||
echo "env-MSVC8: Assuming MVSC 8 installed at \"$msvc\" -- is this correct?" | ||
|
||
# Setup Cygwin PATH. | ||
export PATH="$PATH:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/BIN:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/Tools:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/Tools/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/SDK/v2.0/bin:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/VCPackages:/cygdrive/c/oracle/ora81/bin:/cygdrive/c/Program Files/Oracle/jre/1.1.7/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Windows Imaging/:" | ||
|
||
# MSVC INCLUDE for this libray ./include, Boost 1.34.0, and MSVC 8. | ||
export INCLUDE="./include;C:\Program Files\boost\boost_1_34_0;$msvc\VC\ATLMFC\INCLUDE;$msvc\VC\INCLUDE;$msvc\VC\PlatformSDK\include;$msvc\SDK\v2.0\include;" | ||
|
||
# MSVC LIB. | ||
export LIB="$msvc\VC\ATLMFC\LIB;$msvc\VC\LIB;$msvc\VC\PlatformSDK\lib;$msvc\SDK\v2.0\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,23 @@ | ||
#!/bin/bash | ||
|
||
echo "Design By Contract for C++ (DBC++) Library Installation" | ||
|
||
dest="" | ||
echo | ||
echo -en "Enter C/C++ header files directory [/usr/include/]: " | ||
read dest | ||
if [ -z $dest ]; then dest="/usr/include/"; fi | ||
|
||
mkdir -p $dest && cp -R include/dbc* $dest | ||
ret=$? | ||
echo | ||
if [ $ret -ne 0 ]; then | ||
echo "ERROR: Unable to copy DBC++ header files to \"$dest\"." | ||
echo "Do you need to be root to access this directory?" | ||
else | ||
echo "NOTE: DBC++ header files successfully copied to \"$dest\"." | ||
echo " Make sure this directory is in your C/C++ headers path (-I compiler option)." | ||
echo | ||
echo "You are ready to \`#include <dbc.hpp>' in your C++ programs!" | ||
fi | ||
|
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,19 @@ | ||
#!/bin/bash | ||
|
||
# Execute program given at command line. | ||
$@ | ||
|
||
# If program did not fail, return error code 1. | ||
if [ $? -eq 0 ]; then | ||
echo | ||
echo "must-fail: error: executed program did not fail as expected" | ||
echo | ||
exit 1; | ||
fi | ||
|
||
# Else (program failed), return OK code 0. | ||
echo | ||
echo "must-fail: executed program failed as expected -- returning OK" | ||
echo | ||
exit 0 | ||
|
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,66 @@ | ||
#!/bin/bash | ||
|
||
dbc_dir=`pwd` | ||
server=frs.sourceforge.net:uploads | ||
|
||
# SVN Commit # | ||
|
||
echo -en "Did you commit to SVN? (Y/n) "; read ci | ||
if [ "$ci" != "Y" ]; then | ||
echo -en "ERROR: You must commit before releasing\n" | ||
exit 1; | ||
fi | ||
|
||
# Release Numbers # | ||
|
||
old_major=`cat $dbc_dir/bin/release.dat | egrep "^Major: .*$" | sed 's/^Major: //'` | ||
old_minor=`cat $dbc_dir/bin/release.dat | egrep "^Minor: .*$" | sed 's/^Minor: //'` | ||
old_rev=`cat $dbc_dir/bin/release.dat | egrep "^Revision: .*$" | sed 's/^Revision: //'` | ||
|
||
new_rev=`svn info | egrep "^Revision: .*$" | sed 's/^Revision: //'` | ||
|
||
echo | ||
echo "Release number: Major.Minor.Revision" | ||
echo -en "New major release number [old = $old_major]: "; read new_major | ||
if [ -z "$new_major"]; then new_major=$old_major; fi | ||
echo -en "New minor release number [old = $old_minor]: "; read new_minor | ||
if [ -z "$new_minor"]; then new_minor=$old_minor; fi | ||
echo -en "New revision: $new_rev (current SVN revision)\n" | ||
|
||
rnum=${new_major}.${new_minor}.${new_rev} | ||
dbcpp_rnum=dbcpp_${new_major}_${new_minor}_${new_rev} | ||
|
||
# Tar Ball # | ||
|
||
echo | ||
echo "Exporting SVN repository..." | ||
cd /tmp | ||
svn export https://dbcpp.svn.sourceforge.net/svnroot/dbcpp $dbcpp_rnum | ||
tar czf $dbcpp_rnum.tar.gz $dbcpp_rnum | ||
|
||
echo | ||
echo "Secure-copy tar-ball..." | ||
echo -en "$server user: "; read user | ||
scp $dbcpp_rnum.tar.gz $user@$server | ||
|
||
# Manual Steps # | ||
|
||
echo """# Lateset release number Major.Minor.Revision (Revision from SVN). | ||
Major: $new_major | ||
Minor: $new_minor | ||
Revision: $new_rev" > $dbc_dir/bin/release.dat | ||
|
||
echo -en """ | ||
IMPORTANT: To complete the release do the following manual steps. | ||
1. Log into 'http://sourceforge.net/projects/dbcpp/' as administrator. | ||
2. Select 'Project Admin > Feature Settings > File Release Systm > Manage'. | ||
3. For package name 'dbcpp', select 'Add Release' entering '$rnum' as | ||
'New Release Name'. | ||
4. Enter release notes from \"./RELEASE.txt\". | ||
5. Select \"$dbcpp_rnum.tar.gz\". | ||
6. Select 'Project Admin > Feature Settings > File Release System > Manage > | ||
Create / Edit Download Page' and enable the uploaded | ||
\"$dbcpp_rnum.tar.gz\" for download. | ||
7. Commit this sandbox to SVN (the release script made local modiciations). | ||
""" | ||
|
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,4 @@ | ||
# Lateset release number Major.Minor.Revision (Revision from SVN). | ||
Major: 0 | ||
Minor: 2 | ||
Revision: 189 |
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,29 @@ | ||
#!/bin/bash | ||
|
||
echo "Making documentation..." | ||
echo | ||
|
||
make doc | ||
if [ $? -ne 0 ]; then | ||
echo "ERROR: Unable to build documentation" | ||
echo " Make sure to run this script from dbcpp root directory" | ||
exit 1 | ||
fi | ||
|
||
echo | ||
echo "Uploading documentation to website..." | ||
|
||
[email protected] | ||
echo -en "$server user: " && read user | ||
|
||
echo -en """ | ||
cd htdocs | ||
put doc/html/* | ||
cd str | ||
put doc/html/str/* | ||
exit | ||
""" | sftp $user,$server | ||
|
||
echo | ||
echo "Done" | ||
|
Oops, something went wrong.