Changeset 907


Ignore:
Timestamp:
Feb 16, 2005, 6:52:23 PM (17 years ago)
Author:
bryan
Message:

allow mincol, minpad in format directives to be negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/format.lisp

    r906 r907  
    868868     (t (setq *format-index* start)
    869869        (with-format-parameters parms ((mincol 0) (colinc 1) (minpad 0) (padchar #\space))
    870           (unless (and (integerp mincol) (not (minusp mincol)))
    871             (format-error "Mincol must be a non-negative integer - ~S" mincol))
     870          (unless (integerp mincol)
     871            (format-error "Mincol must be an integer - ~S" mincol))
    872872          (unless (and (integerp colinc) (plusp colinc))
    873873            (format-error "Colinc must be a positive integer - ~S" colinc))
    874           (unless (and (integerp minpad) (not (minusp minpad)))
    875             (format-error "Minpad must be a non-negative integer - ~S" minpad))
     874          (unless (integerp minpad)
     875            (format-error "Minpad must be an integer - ~S" minpad))
    876876          (unless (characterp padchar)
    877877            (if (typep padchar `(integer 0 #.char-code-limit))
     
    17371737(defun format-write-field (stream string mincol colinc minpad padchar padleft)
    17381738  (unless (or (null mincol)
    1739               (and (integerp mincol)
    1740                    (not (minusp mincol))))
    1741     (format-error "Mincol must be a non-negative integer - ~S" mincol))
     1739              (integerp mincol))
     1740    (format-error "Mincol must be an integer - ~S" mincol))
    17421741  (unless (and (integerp colinc) (plusp colinc))
    17431742    (format-error "Colinc must be a positive integer - ~S" colinc))
    1744   (unless (and (integerp minpad) (not (minusp minpad)))
    1745     (format-error "Minpad must be a non-negative integer - ~S" minpad))
     1743  (unless (integerp minpad)
     1744    (format-error "Minpad must be an integer - ~S" minpad))
    17461745  (unless (characterp padchar)
    17471746    (if (typep padchar `(integer 0 #.char-code-limit))
Note: See TracChangeset for help on using the changeset viewer.