formatting
This commit is contained in:
parent
750ddcd576
commit
fc26ecd9d3
12
ChangeLog
12
ChangeLog
|
@ -1,16 +1,16 @@
|
||||||
2001-05-08 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
|
2001-05-08 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
|
||||||
|
|
||||||
* src/pcfdriver.c: fixed incorrect bitmap width computation
|
* src/pcfdriver.c: Fixed incorrect bitmap width computation.
|
||||||
|
|
||||||
2001-05-08 David Turner <david@freetype.org>
|
2001-05-08 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* docs/docmaker.py: updated the DocMaker script in order to add
|
* docs/docmaker.py: Updated the DocMaker script in order to add
|
||||||
command line options (--output,--prefix,--title), fix the erroneous
|
command line options (--output,--prefix,--title), fix the erroneous
|
||||||
line numbers reported during errors and warnings, and other formatting
|
line numbers reported during errors and warnings, and other
|
||||||
issues..
|
formatting issues.
|
||||||
|
|
||||||
* src/base/ftcalc.c: various tiny fixes related to rounding in 64-bits
|
* src/base/ftcalc.c: Carious tiny fixes related to rounding in
|
||||||
routines and pseudo"optimisations" :-)
|
64-bits routines and pseudo"optimizations" :-)
|
||||||
|
|
||||||
2001-04-27 David Turner <david@freetype.org>
|
2001-04-27 David Turner <david@freetype.org>
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
# DocMaker is very similar to other tools like Doxygen, with the
|
# DocMaker is very similar to other tools like Doxygen, with the
|
||||||
# following differences:
|
# following differences:
|
||||||
#
|
#
|
||||||
# - it is written in Python (so it's slow, but easy to maintain and
|
# - It is written in Python (so it is slow, but easy to maintain and
|
||||||
# improve)
|
# improve).
|
||||||
#
|
#
|
||||||
# - the comment syntax used by DocMaker is simpler and makes for
|
# - The comment syntax used by DocMaker is simpler and makes for
|
||||||
# clearer comments
|
# clearer comments.
|
||||||
#
|
#
|
||||||
# Of course, it doesn't have all the goodies of most similar tools,
|
# Of course, it doesn't have all the goodies of most similar tools,
|
||||||
# (e.g. C++ class hierarchies), but hey, it's only 2000 lines of
|
# (e.g. C++ class hierarchies), but hey, it is only 2000 lines of
|
||||||
# python
|
# Python.
|
||||||
#
|
#
|
||||||
# DocMaker is mainly used to generate the API references of several
|
# DocMaker is mainly used to generate the API references of several
|
||||||
# FreeType packages.
|
# FreeType packages.
|
||||||
|
@ -28,7 +28,8 @@
|
||||||
import fileinput, sys, os, string, glob, getopt
|
import fileinput, sys, os, string, glob, getopt
|
||||||
|
|
||||||
# The Project's title. This can be overridden from the command line with
|
# The Project's title. This can be overridden from the command line with
|
||||||
# the options "-t" or "--title"
|
# the options "-t" or "--title".
|
||||||
|
#
|
||||||
project_title = "Project"
|
project_title = "Project"
|
||||||
|
|
||||||
# The project's filename prefix. This can be set from the command line with
|
# The project's filename prefix. This can be set from the command line with
|
||||||
|
@ -37,7 +38,7 @@ project_title = "Project"
|
||||||
project_prefix = ""
|
project_prefix = ""
|
||||||
|
|
||||||
# The project's documentation output directory. This can be set from the
|
# The project's documentation output directory. This can be set from the
|
||||||
# command line with the options "-o" or "--output"
|
# command line with the options "-o" or "--output".
|
||||||
#
|
#
|
||||||
output_dir = None
|
output_dir = None
|
||||||
|
|
||||||
|
@ -177,9 +178,9 @@ def html_format( line ):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
# open the standard output to a given project documentation file
|
# Open the standard output to a given project documentation file. Use
|
||||||
# use "output_dir" to determine the filename location, when necessary
|
# "output_dir" to determine the filename location if necessary and save the
|
||||||
# and save the old stdout in a tuple that is returned by this function
|
# old stdout in a tuple that is returned by this function.
|
||||||
#
|
#
|
||||||
def open_output( filename ):
|
def open_output( filename ):
|
||||||
global output_dir
|
global output_dir
|
||||||
|
@ -194,22 +195,23 @@ def open_output( filename ):
|
||||||
return ( new_file, old_stdout )
|
return ( new_file, old_stdout )
|
||||||
|
|
||||||
|
|
||||||
# close the output that was returned by "close_output"
|
# Close the output that was returned by "close_output".
|
||||||
#
|
|
||||||
#
|
#
|
||||||
def close_output( output ):
|
def close_output( output ):
|
||||||
output[0].close()
|
output[0].close()
|
||||||
sys.stdout = output[1]
|
sys.stdout = output[1]
|
||||||
|
|
||||||
# check output directoy
|
|
||||||
|
# Check output directory.
|
||||||
#
|
#
|
||||||
def check_output( ):
|
def check_output( ):
|
||||||
global output_dir
|
global output_dir
|
||||||
if output_dir:
|
if output_dir:
|
||||||
if output_dir != "":
|
if output_dir != "":
|
||||||
if not os.path.isdir( output_dir ):
|
if not os.path.isdir( output_dir ):
|
||||||
sys.stderr.write( "argument '"+output_dir+"' is not a valid directory" )
|
sys.stderr.write( "argument" + " '" + output_dir + "' " +
|
||||||
sys.exit(2)
|
"is not a valid directory" )
|
||||||
|
sys.exit( 2 )
|
||||||
else:
|
else:
|
||||||
output_dir = None
|
output_dir = None
|
||||||
|
|
||||||
|
@ -1119,7 +1121,6 @@ class DocSectionList:
|
||||||
|
|
||||||
|
|
||||||
def dump_html_sections( self ):
|
def dump_html_sections( self ):
|
||||||
|
|
||||||
for section in self.sections.values():
|
for section in self.sections.values():
|
||||||
if section.filename:
|
if section.filename:
|
||||||
output = open_output( section.filename )
|
output = open_output( section.filename )
|
||||||
|
@ -1129,9 +1130,7 @@ class DocSectionList:
|
||||||
close_output( output )
|
close_output( output )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def dump_html_index( self ):
|
def dump_html_index( self ):
|
||||||
|
|
||||||
output = open_output( self.index_filename )
|
output = open_output( self.index_filename )
|
||||||
|
|
||||||
num_columns = 3
|
num_columns = 3
|
||||||
|
@ -1387,7 +1386,7 @@ def make_block_list( args = None ):
|
||||||
# sys.stderr.write( repr( sys.argv[1 :] ) + '\n' )
|
# sys.stderr.write( repr( sys.argv[1 :] ) + '\n' )
|
||||||
|
|
||||||
if not args:
|
if not args:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1 :]
|
||||||
|
|
||||||
for pathname in args:
|
for pathname in args:
|
||||||
if string.find( pathname, '*' ) >= 0:
|
if string.find( pathname, '*' ) >= 0:
|
||||||
|
@ -1595,17 +1594,20 @@ def main( argv ):
|
||||||
global html_header, html_header1, html_header2, html_header3
|
global html_header, html_header1, html_header2, html_header3
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt( sys.argv[1:], "ht:o:p:", [ "help", "title=", "output=", "prefix=" ] )
|
opts, args = getopt.getopt( sys.argv[1:],
|
||||||
|
"ht:o:p:",
|
||||||
|
[ "help", "title=", "output=", "prefix=" ] )
|
||||||
|
|
||||||
except getopt.GetoptError:
|
except getopt.GetoptError:
|
||||||
usage()
|
usage()
|
||||||
sys.exit(2)
|
sys.exit( 2 )
|
||||||
|
|
||||||
if args == []:
|
if args == []:
|
||||||
usage()
|
usage()
|
||||||
sys.exit(1)
|
sys.exit( 1 )
|
||||||
|
|
||||||
# process options
|
# process options
|
||||||
|
#
|
||||||
project_title = "Project"
|
project_title = "Project"
|
||||||
project_prefix = None
|
project_prefix = None
|
||||||
output_dir = None
|
output_dir = None
|
||||||
|
@ -1613,7 +1615,7 @@ def main( argv ):
|
||||||
for opt in opts:
|
for opt in opts:
|
||||||
if opt[0] in ( "-h", "--help" ):
|
if opt[0] in ( "-h", "--help" ):
|
||||||
usage()
|
usage()
|
||||||
sys.exit(0)
|
sys.exit( 0 )
|
||||||
|
|
||||||
if opt[0] in ( "-t", "--title" ):
|
if opt[0] in ( "-t", "--title" ):
|
||||||
project_title = opt[1]
|
project_title = opt[1]
|
||||||
|
@ -1628,9 +1630,11 @@ def main( argv ):
|
||||||
check_output( )
|
check_output( )
|
||||||
|
|
||||||
# we begin by simply building a list of DocBlock elements
|
# we begin by simply building a list of DocBlock elements
|
||||||
|
#
|
||||||
list = make_block_list( args )
|
list = make_block_list( args )
|
||||||
|
|
||||||
# now, sort the blocks into sections
|
# now, sort the blocks into sections
|
||||||
|
#
|
||||||
document = DocDocument()
|
document = DocDocument()
|
||||||
for block in list:
|
for block in list:
|
||||||
document.append_block( block )
|
document.append_block( block )
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
FT_Int s;
|
FT_Int s;
|
||||||
FT_Long d;
|
FT_Long d;
|
||||||
|
|
||||||
|
|
||||||
s = 1;
|
s = 1;
|
||||||
if ( a < 0 ) { a = -a; s = -1; }
|
if ( a < 0 ) { a = -a; s = -1; }
|
||||||
if ( b < 0 ) { b = -b; s = -s; }
|
if ( b < 0 ) { b = -b; s = -s; }
|
||||||
|
@ -158,6 +159,7 @@
|
||||||
FT_Int s = 1;
|
FT_Int s = 1;
|
||||||
FT_Long c;
|
FT_Long c;
|
||||||
|
|
||||||
|
|
||||||
if ( a < 0 ) { a = -a; s = -1; }
|
if ( a < 0 ) { a = -a; s = -1; }
|
||||||
if ( b < 0 ) { b = -b; s = -s; }
|
if ( b < 0 ) { b = -b; s = -s; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue