Changeset 422 for pkpgcounter/trunk

Show
Ignore:
Timestamp:
09/15/06 11:38:46 (18 years ago)
Author:
jerome
Message:

Fixed a problem with multiple FormFeed? characters per line.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/plain.py

    r418 r422  
    7272            if line.endswith("\n") or line.endswith("\r") : 
    7373                linecount += 1     
    74                 if (linecount > pagesize) \ 
    75                    or (line.find("\f") != -1) : 
     74                if (linecount > pagesize) : 
    7675                    pagecount += 1 
    7776                    linecount = 0 
     77                else :     
     78                    cnt = line.count("\f") 
     79                    if cnt : 
     80                        pagecount += cnt 
     81                        linecount = 0 
    7882            else :         
    7983                raise pdlparser.PDLParserError, "Unsupported file format. Please send the file to %s" % version.__authoremail__