| Update of /cvsroot/pywin32/pywin32/AutoDuck
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4998
Modified Files:
	makedfromi.py 
Log Message:
Handle continuations for @pyswig elements, and correct contination
detection.
Index: makedfromi.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/makedfromi.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** makedfromi.py	26 Jan 2004 23:37:01 -0000	1.3
--- makedfromi.py	12 Jun 2004 13:35:50 -0000	1.4
***************
*** 6,10 ****
  
  def GetComments(line, lineNo, lines):
! 	# Get the comment from this and continouos lines, if they exist.
  	data = string.split(line, "//", 2)
  	doc = ""
--- 6,10 ----
  
  def GetComments(line, lineNo, lines):
! 	# Get the comment from this and continuos lines, if they exist.
  	data = string.split(line, "//", 2)
  	doc = ""
***************
*** 18,21 ****
--- 18,24 ----
  		if string.strip(data[0]):
  			break # Not a continutation!
+ 		if data[1].strip().startswith("@"):
+ 			# new command
+ 			break
  		doc = doc + "\n// " + string.strip(data[1])
  		lineNo = lineNo + 1
***************
*** 48,52 ****
  					modDoc = string.strip(extra[1])
  			elif line[:10]=="// @pyswig":
! 				curMethod = string.strip(line[10:]), []
  				methods.append(curMethod)
  			elif line[:11]=="// @pymeth ":
--- 51,56 ----
  					modDoc = string.strip(extra[1])
  			elif line[:10]=="// @pyswig":
! 				doc, lineNo = GetComments(line, lineNo, lines)
! 				curMethod = doc[8:], []
  				methods.append(curMethod)
  			elif line[:11]=="// @pymeth ":
***************
*** 95,99 ****
  			if len(fields)<>3:
  				print "**Error - %s does not have enough fields" % meth
! 			outFile.write("\n// @pymethod %s|%s|%s|%s\n" % (fields[0],thisModName,fields[1], fields[2]))
  			for extra in extras:
  				outFile.write(extra)
--- 99,104 ----
  			if len(fields)<>3:
  				print "**Error - %s does not have enough fields" % meth
! 			else:
! 				outFile.write("\n// @pymethod %s|%s|%s|%s\n" % (fields[0],thisModName,fields[1], fields[2]))
  			for extra in extras:
  				outFile.write(extra)
 |