Convert a few files from DOS to Unix EOLs.

There is no reason for using CR LF for these files, convert them to LF.
This commit is contained in:
Vadim Zeitlin 2015-03-19 21:40:51 +01:00
parent 3c59f46b64
commit 6ed1d71bd1
5 changed files with 325 additions and 325 deletions

View File

@ -1,74 +1,74 @@
"""
C bindings generator
Author: Luke A. Guest
"""
import os
from common import *
class CBuilder:
def __init__(self, doxyparse, outputdir):
self.doxyparser = doxyparse
self.output_dir = outputdir
def make_bindings(self):
output_dir = os.path.abspath(os.path.join(self.output_dir, "c"))
if not os.path.exists(output_dir):
os.makedirs(output_dir)
for aclass in self.doxyparser.classes:
# This bit doesn't work, because the aclass.name is not the same as
# those listed in common
if aclass.name in excluded_classes:
#print "Skipping %s" % aclass.name
continue
self.make_c_header(output_dir, aclass)
def make_c_header(self, output_dir, aclass):
filename = os.path.join(output_dir, aclass.name[2:].lower() + ".hh")
enums_text = make_enums(aclass)
method_text = self.make_c_methods(aclass)
class_name = aclass.name[2:].capitalize()
text = """
// Enums
%s
%s
""" % (enums_text, method_text)
afile = open(filename, "wb")
afile.write(text)
afile.close()
def make_c_methods(self, aclass):
retval = ""
wxc_classname = 'wxC' + aclass.name[2:].capitalize()
for amethod in aclass.constructors:
retval += """
// %s
%s%s;\n\n
""" % (amethod.brief_description, wxc_classname + '* ' + wxc_classname + '_' + amethod.name, amethod.argsstring)
for amethod in aclass.methods:
if amethod.name.startswith('m_'):
# for some reason, public members are listed as methods
continue
args = '(' + wxc_classname + '* obj'
if amethod.argsstring.find('()') != -1:
args += ')'
else:
args += ', ' + amethod.argsstring[1:].strip()
retval += """
// %s
%s %s%s;\n
""" % (amethod.detailed_description, amethod.return_type, wxc_classname + '_' + amethod.name, args)
return retval
"""
C bindings generator
Author: Luke A. Guest
"""
import os
from common import *
class CBuilder:
def __init__(self, doxyparse, outputdir):
self.doxyparser = doxyparse
self.output_dir = outputdir
def make_bindings(self):
output_dir = os.path.abspath(os.path.join(self.output_dir, "c"))
if not os.path.exists(output_dir):
os.makedirs(output_dir)
for aclass in self.doxyparser.classes:
# This bit doesn't work, because the aclass.name is not the same as
# those listed in common
if aclass.name in excluded_classes:
#print "Skipping %s" % aclass.name
continue
self.make_c_header(output_dir, aclass)
def make_c_header(self, output_dir, aclass):
filename = os.path.join(output_dir, aclass.name[2:].lower() + ".hh")
enums_text = make_enums(aclass)
method_text = self.make_c_methods(aclass)
class_name = aclass.name[2:].capitalize()
text = """
// Enums
%s
%s
""" % (enums_text, method_text)
afile = open(filename, "wb")
afile.write(text)
afile.close()
def make_c_methods(self, aclass):
retval = ""
wxc_classname = 'wxC' + aclass.name[2:].capitalize()
for amethod in aclass.constructors:
retval += """
// %s
%s%s;\n\n
""" % (amethod.brief_description, wxc_classname + '* ' + wxc_classname + '_' + amethod.name, amethod.argsstring)
for amethod in aclass.methods:
if amethod.name.startswith('m_'):
# for some reason, public members are listed as methods
continue
args = '(' + wxc_classname + '* obj'
if amethod.argsstring.find('()') != -1:
args += ')'
else:
args += ', ' + amethod.argsstring[1:].strip()
retval += """
// %s
%s %s%s;\n
""" % (amethod.detailed_description, amethod.return_type, wxc_classname + '_' + amethod.name, args)
return retval

View File

@ -1,74 +1,74 @@
/////////////////////////////////////////////////////////////////////////////
// Name: interface/wx/appprogress.h
// Purpose: interface of wxAppProgressIndicator
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxAppProgressIndicator
A helper class that can be used to update the progress bar in the taskbar
button on Windows and the dock icon on OS X.
@library{wxcore}
@category{misc}
@onlyfor{wxmsw,wxosx}
@see wxTaskBarButton
@since 3.1.0
*/
class WXDLLIMPEXP_CORE wxAppProgressIndicator
{
public:
/**
Constructs the wxAppProgressIndicator.
@param parent
The parent window of wxAppProgressIndicator. Note that the
window should has taskbar button showing. If parent is NULL,
the progress will reflect on the taskbar buttons of all the
top level windows.
@param maxValue
Integer range (maximum value) of the progress indicator.
*/
wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100);
/**
Destructor, stops displaying progress and returns the indicator to its
normal state.
*/
virtual ~wxAppProgressIndicator();
/**
Check if the application progress display is available.
Currently this only returns @true when using wxMSW and running
under Windows 7 or later systems (which provide task bar button
API) or when using wxOSX.
If this method returns @false, no other methods of this class do
anything, but they may still be called without any ill effects.
*/
bool IsAvailable() const;
/**
Set the progress value in taskbar button of parent window.
@param value
The new value of the progress meter. It should be less than or equal
to the range.
*/
void SetValue(int value);
/**
Set the progress range in taskbar button of parent window.
*/
void SetRange(int range);
/**
Makes the progress bar run in indeterminate mode.
*/
bool Pulse();
};
/////////////////////////////////////////////////////////////////////////////
// Name: interface/wx/appprogress.h
// Purpose: interface of wxAppProgressIndicator
// Author: wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxAppProgressIndicator
A helper class that can be used to update the progress bar in the taskbar
button on Windows and the dock icon on OS X.
@library{wxcore}
@category{misc}
@onlyfor{wxmsw,wxosx}
@see wxTaskBarButton
@since 3.1.0
*/
class WXDLLIMPEXP_CORE wxAppProgressIndicator
{
public:
/**
Constructs the wxAppProgressIndicator.
@param parent
The parent window of wxAppProgressIndicator. Note that the
window should has taskbar button showing. If parent is NULL,
the progress will reflect on the taskbar buttons of all the
top level windows.
@param maxValue
Integer range (maximum value) of the progress indicator.
*/
wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100);
/**
Destructor, stops displaying progress and returns the indicator to its
normal state.
*/
virtual ~wxAppProgressIndicator();
/**
Check if the application progress display is available.
Currently this only returns @true when using wxMSW and running
under Windows 7 or later systems (which provide task bar button
API) or when using wxOSX.
If this method returns @false, no other methods of this class do
anything, but they may still be called without any ill effects.
*/
bool IsAvailable() const;
/**
Set the progress value in taskbar button of parent window.
@param value
The new value of the progress meter. It should be less than or equal
to the range.
*/
void SetValue(int value);
/**
Set the progress range in taskbar button of parent window.
*/
void SetRange(int range);
/**
Makes the progress bar run in indeterminate mode.
*/
bool Pulse();
};

View File

@ -1,42 +1,42 @@
== How to build expat with cmake (experimental) ==
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.
Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.1.0$ mkdir build && cd build
~/expat-2.1.0/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.1.0/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick/expat-2.1.0/build
If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
~/expat-2.1.0/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
....
-- Installing: /usr/local/lib/pkgconfig/expat.pc
-- Installing: /usr/local/bin/xmlwf
-- Installing: /usr/local/share/man/man1/xmlwf.1
For Windows builds, you must make sure to call cmake from an environment where
your compiler is reachable, that means either you call it from the
Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 10" && vcexpress expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install
== How to build expat with cmake (experimental) ==
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
Studio) and should work on all other platform cmake supports.
Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.1.0$ mkdir build && cd build
~/expat-2.1.0/build$
From that directory, call cmake first, then call make, make test and
make install in the usual way:
~/expat-2.1.0/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick/expat-2.1.0/build
If you want to specify the install location for your files, append
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
~/expat-2.1.0/build$ make && make test && make install
Scanning dependencies of target expat
[ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
....
-- Installing: /usr/local/lib/pkgconfig/expat.pc
-- Installing: /usr/local/bin/xmlwf
-- Installing: /usr/local/share/man/man1/xmlwf.1
For Windows builds, you must make sure to call cmake from an environment where
your compiler is reachable, that means either you call it from the
Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 10" && vcexpress expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
&& gmake && gmake install

View File

@ -1,44 +1,44 @@
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(TestBigEndian)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("memory.h" HAVE_MEMORY_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_function_exists("getpagesize" HAVE_GETPAGESIZE)
check_function_exists("bcopy" HAVE_BCOPY)
check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)
check_function_exists("mmap" HAVE_MMAP)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
test_big_endian(WORDS_BIGENDIAN)
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
if(WORDS_BIGENDIAN)
set(BYTEORDER 4321)
else(WORDS_BIGENDIAN)
set(BYTEORDER 1234)
endif(WORDS_BIGENDIAN)
if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
configure_file(expat_config.h.cmake expat_config.h)
add_definitions(-DHAVE_EXPAT_CONFIG_H)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(TestBigEndian)
check_include_file("dlfcn.h" HAVE_DLFCN_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("memory.h" HAVE_MEMORY_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdlib.h" HAVE_STDLIB_H)
check_include_file("strings.h" HAVE_STRINGS_H)
check_include_file("string.h" HAVE_STRING_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_function_exists("getpagesize" HAVE_GETPAGESIZE)
check_function_exists("bcopy" HAVE_BCOPY)
check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)
check_function_exists("mmap" HAVE_MMAP)
#/* Define to 1 if you have the ANSI C header files. */
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
test_big_endian(WORDS_BIGENDIAN)
#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
if(WORDS_BIGENDIAN)
set(BYTEORDER 4321)
else(WORDS_BIGENDIAN)
set(BYTEORDER 1234)
endif(WORDS_BIGENDIAN)
if(HAVE_SYS_TYPES_H)
check_symbol_exists("off_t" "sys/types.h" OFF_T)
check_symbol_exists("size_t" "sys/types.h" SIZE_T)
else(HAVE_SYS_TYPES_H)
set(OFF_T "long")
set(SIZE_T "unsigned")
endif(HAVE_SYS_TYPES_H)
configure_file(expat_config.h.cmake expat_config.h)
add_definitions(-DHAVE_EXPAT_CONFIG_H)

View File

@ -1,91 +1,91 @@
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `bcopy' function. */
#cmakedefine HAVE_BCOPY
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#cmakedefine HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN
/* Define to specify how much context to retain around the current parse
point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
/* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__
#endif
/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine off_t @OFF_T@
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t @SIZE_T@
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#cmakedefine BYTEORDER @BYTEORDER@
/* Define to 1 if you have the `bcopy' function. */
#cmakedefine HAVE_BCOPY
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H
/* Define to 1 if you have the `getpagesize' function. */
#cmakedefine HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H
/* Define to 1 if you have the `memmove' function. */
#cmakedefine HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS
/* whether byteorder is bigendian */
#cmakedefine WORDS_BIGENDIAN
/* Define to specify how much context to retain around the current parse
point. */
#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
/* Define to make parameter entity parsing functionality available. */
#cmakedefine XML_DTD
/* Define to make XML Namespaces functionality available. */
#cmakedefine XML_NS
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__
#endif
/* Define to `long' if <sys/types.h> does not define. */
#cmakedefine off_t @OFF_T@
/* Define to `unsigned' if <sys/types.h> does not define. */
#cmakedefine size_t @SIZE_T@