Changeset 14389 in project


Ignore:
Timestamp:
04/23/09 06:15:30 (11 years ago)
Author:
Ivan Raikov
Message:

format-textdiff ported to Chicken 4

Location:
release/4/format-textdiff/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • release/4/format-textdiff/trunk/format-textdiff-eggdoc.scm

    r7358 r14389  
    88     (description "Output text diff scripts in different formats.")
    99
    10      (author (url "http://chicken.wiki.br/ivan raikov" "Ivan Raikov"))
     10     (author (url "http://chicken.wiki.br/users/ivan-raikov" "Ivan Raikov"))
    1111
    1212     (history
     13      (version "1.6" "Ported to Chicken 4")
    1314      (version "1.5" "Build script updated for better cross-platform compatibility")
    1415      (version "1.4" "eggdoc documentation fix")
     
    9596))
    9697     (license
    97       "Copyright 2007 Ivan Raikov.
     98      "Copyright 2007-2009 Ivan Raikov.
    9899
    99100This program is free software: you can redistribute it and/or modify
  • release/4/format-textdiff/trunk/format-textdiff.meta

    r9305 r14389  
     1;; -*- Hen -*-
    12((egg "format-textdiff.egg") ; This should never change
    23
     
    1718 ; A list of eggs format-textdiff depends on.
    1819
    19  (needs eggdoc npdiff vector-lib dyn-vector)
     20 (needs eggdoc matchable npdiff vector-lib dyn-vector)
    2021
    2122 (eggdoc "format-textdiff-eggdoc.scm")
  • release/4/format-textdiff/trunk/format-textdiff.scm

    r4874 r14389  
    33;; Output text diff scripts in different formats.
    44;;
    5 ;; Copyright 2007 Ivan Raikov
     5;; Copyright 2007-2009 Ivan Raikov.
    66;;
    77;;
     
    2020;;
    2121
    22 (define-extension format-textdiff)
    23 
    24 (require-extension srfi-1)
    25 (require-extension srfi-4)
    26 (require-extension srfi-13)
    27 (require-extension vector-lib)
    28 (require-extension dyn-vector)
    29 
    30 (require-extension npdiff)
    31          
    32 (declare (export textdiff textdiff->sexp make-format-textdiff))
     22(module format-textdiff
     23
     24 (export textdiff textdiff->sexp make-format-textdiff)
     25                   
     26 (import scheme chicken data-structures  )
     27
     28 (require-extension srfi-1 srfi-4 srfi-13 matchable vector-lib dyn-vector npdiff)
    3329
    3430;; pair split
     
    509505                      (format source-vect target-vect source-range target-range out)
    510506                      (loop (cdr hunks) source-vect1 target-vect1 source-range1 target-range1)))))))))
     507)
  • release/4/format-textdiff/trunk/format-textdiff.setup

    r6606 r14389  
    1 
    2 (define has-exports? (string>=? (chicken-version) "2.310"))
     1;; -*- Hen -*-
    32
    43(define (dynld-name fn)         
    54  (make-pathname #f fn ##sys#load-dynamic-extension))   
    65
    7 (compile -O2 -d0 -s
    8          ,@(if has-exports? '(-check-imports -emit-exports format-textdiff.exports) '())
    9          format-textdiff.scm -lchicken -ldl -lm)
     6(compile -O2 -d0 -s format-textdiff.scm -j format-textdiff)
     7(compile -O2 -d0 -s format-textdiff.import.scm)
    108
    11 (run (csi -qbs format-textdiff-eggdoc.scm > format-textdiff.html))
     9(run (csi -s format-textdiff-eggdoc.scm > format-textdiff.html))
    1210
    1311(install-extension
     
    1715
    1816  ; Files to install for your extension:
    19   `(,(dynld-name "format-textdiff") "format-textdiff.html"
    20     ,@(if has-exports? '("format-textdiff.exports") (list)) )
    21 
     17  `(,(dynld-name "format-textdiff") ,(dynld-name "format-textdiff.import") )
    2218
    2319  ; Assoc list with properties for your extension:
    24   '((version 1.5)
     20  `((version 1.6)
    2521    (documentation "format-textdiff.html")
    26     ,@(if has-exports? `((exports "format-textdiff.exports")) (list)) ))
     22    ))
    2723
  • release/4/format-textdiff/trunk/tests/run.scm

    r5868 r14389  
    1 (require-extension npdiff)
    2 (require-extension format-textdiff)
     1(require-extension npdiff format-textdiff)
    32
    4 (define t1 (open-input-file "large0"))
     3(define t1 (open-input-file "tests/large0"))
    54(define text1 (read-lines t1))
    6 (define t2 (open-input-file "large1"))
     5(define t2 (open-input-file "tests/large1"))
    76(define text2 (read-lines t2))
    87(define hunks (textdiff text1 text2 3))
Note: See TracChangeset for help on using the changeset viewer.