IUP

Check-in [3ebc96c632]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected plot sample insertion index argument checks
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3ebc96c63226dac32ac5c68d5ca9eff00f3e9b45
User & Date: murphy 2015-05-01 22:50:46
Context
2015-05-01
23:28
Corrected type of dpi parameter for mglplot-paint-to from int to double check-in: 2b332f9c40 user: murphy tags: trunk
22:50
Corrected plot sample insertion index argument checks check-in: 3ebc96c632 user: murphy tags: trunk
22:49
Corrected label constructor argument name check-in: 6c01896816 user: murphy tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to chicken/iup-plot.scm.

    36     36     (letrec ([append/real (foreign-lambda void "IupPlotAdd" nonnull-ihandle double double)]
    37     37              [append/string (foreign-lambda void "IupPlotAddStr" nonnull-ihandle c-string double)]
    38     38              [insert/real (foreign-lambda void "IupPlotInsert" nonnull-ihandle int int double double)]
    39     39              [insert/string (foreign-lambda void "IupPlotInsertStr" nonnull-ihandle int int c-string double)]
    40     40              [current-index (lambda (handle) (string->number (attribute handle 'current)))])
    41     41       (lambda (handle x y #!optional [sample-index #f] [index #f])
    42     42         (if (string? x)
    43         -          (if index
           43  +          (if sample-index
    44     44                 (insert/string handle (or index (current-index handle)) sample-index x y)
    45     45                 (append/string handle x y))
    46         -          (if index
           46  +          (if sample-index
    47     47                 (insert/real handle (or index (current-index handle)) sample-index x y)
    48     48                 (append/real handle x y))))))
    49     49   
    50     50   (define plot-x/y->pixel-x/y
    51     51   	(letrec ([transform (foreign-lambda void "IupPlotTransform" nonnull-ihandle double double (c-pointer double) (c-pointer double))])
    52     52   		(lambda (handle plot-x plot-y)
    53     53   			(let-location ([pixel-x int 0] [pixel-y int 0])

Changes to chicken/iup-pplot.scm.

    36     36     (letrec ([append/real (foreign-lambda void "IupPPlotAdd" nonnull-ihandle float float)]
    37     37              [append/string (foreign-lambda void "IupPPlotAddStr" nonnull-ihandle c-string float)]
    38     38              [insert/real (foreign-lambda void "IupPPlotInsert" nonnull-ihandle int int float float)]
    39     39              [insert/string (foreign-lambda void "IupPPlotInsertStr" nonnull-ihandle int int c-string float)]
    40     40              [current-index (lambda (handle) (string->number (attribute handle 'current)))])
    41     41       (lambda (handle x y #!optional [sample-index #f] [index #f])
    42     42         (if (string? x)
    43         -          (if index
           43  +          (if sample-index
    44     44                 (insert/string handle (or index (current-index handle)) sample-index x y)
    45     45                 (append/string handle x y))
    46         -          (if index
           46  +          (if sample-index
    47     47                 (insert/real handle (or index (current-index handle)) sample-index x y)
    48     48                 (append/real handle x y))))))
    49     49   
    50     50   (define pplot-x/y->pixel-x/y
    51     51   	(letrec ([transform (foreign-lambda void "IupPPlotTransform" nonnull-ihandle float float (c-pointer int) (c-pointer int))])
    52     52   		(lambda (handle pplot-x pplot-y)
    53     53   			(let-location ([pixel-x int 0] [pixel-y int 0])