formatting

This commit is contained in:
Werner Lemberg 2001-01-15 23:11:55 +00:00
parent db0717879f
commit 9e708eb5fb
2 changed files with 41 additions and 34 deletions

View File

@ -1,11 +1,11 @@
2001-01-11 Matthew Crosby <mcrosby@marthon.org>
2001-01-11 David Turner <david.turner@freetype.org>
* src/pcd/pcfread.c: removed some compilation warnings related
to comparison of signed vs. unsigned integers
* src/pcd/pcfread.c: Removed some compilation warnings related
to comparison of signed vs. unsigned integers.
* include/freetype/internal/ftdebug.h: changed the debug trace
* include/freetype/internal/ftdebug.h: Changed the debug trace
constants from trace_t2xxxx to trace_cffxxxx to be able to compile
the CFF driver in debug mode
the CFF driver in debug mode.
2001-01-11 Matthew Crosby <mcrosby@marthon.org>

View File

@ -247,15 +247,16 @@ class DocParagraph:
alphanum = string.lowercase + string.uppercase + string.digits + '_'
for word in self.words:
# process cross references when needed
# process cross references if needed
#
if identifiers and word and word[0] == '@':
word = word[1:]
# we need to find non alpha numeric charaters
i = len(word)
while i > 0 and not word[i-1] in alphanum:
i = i-1
# we need to find non-alphanumeric characters
#
i = len( word )
while i > 0 and not word[i - 1] in alphanum:
i = i - 1
if i > 0:
extra = word[i:]
@ -263,9 +264,9 @@ class DocParagraph:
block = identifiers.get( word )
if block:
word = '<a href="'+block.html_address()+'">' + word + '</a>'
word = '<a href="' + block.html_address() + '">' + word + '</a>'
else:
word = '?'+word
word = '?' + word
if cursor + len( word ) + 1 > max_width:
print line
@ -275,10 +276,12 @@ class DocParagraph:
line = line + word
if not extra:
line = line + " "
cursor = cursor + len( word ) + 1
# handle trailing periods, commas, etc.. at the end of
# cross references..
# handle trailing periods, commas, etc. at the end of
# cross references.
#
if extra:
if cursor + len( extra ) + 1 > max_width:
print line
@ -645,16 +648,17 @@ class DocBlock:
return item[1]
return None
def html_address( self ):
section = self.section
if section and section.filename:
return section.filename+'#'+self.name
return section.filename + '#' + self.name
return "" # this block is not in a section ??
return "" # this block is not in a section?
def location( self ):
return self.filename + ':' + str(self.lineno)
return self.filename + ':' + str( self.lineno )
def dump( self ):
@ -959,7 +963,8 @@ class DocSectionList:
else:
line = line + 1
else:
sys.stderr.write( "identifier '"+ident+"' has no definition" + '\n' )
sys.stderr.write( "identifier '" + ident +
"' has no definition" + '\n' )
print "</tr></table></center>"
print html_footer
@ -1046,9 +1051,10 @@ def make_block_list():
for pathname in sys.argv[1:]:
if string.find( pathname, '*' ) >= 0:
newpath = glob.glob( pathname )
newpath.sort() # sort files, this is important because the order of files
newpath.sort() # sort files -- this is important because
# of the order of files
else:
newpath = [ pathname ]
newpath = [pathname]
last = len( file_list )
file_list[last:last] = newpath
@ -1101,7 +1107,8 @@ def make_block_list():
if format >= 4 and l > 2 and line2[0 : 2] == '/*':
if l < 4 or ( line2[3] != '@' and line2[3:4] != ' @' and
line2[3] != '#' and line2[3:4] != ' #'):
add_new_block( list, fileinput.filename(), lineno, block, source )
add_new_block( list, fileinput.filename(),
lineno, block, source )
format = 0
if format == 0: #### wait for beginning of comment ####