Changeset 16063 in project


Ignore:
Timestamp:
09/24/09 01:42:42 (10 years ago)
Author:
Ivan Raikov
Message:

Ported patch to Chicken 4

Location:
release/4/patch
Files:
5 deleted
4 edited
1 copied

Legend:

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

    r5717 r16063  
    3232     (author ,author)
    3333     (history
     34      (version "0.12" "Ported to Chicken 4")
    3435      (version "0.11" "Bug 308: does not require '(needs posix)'")
    3536      (version "0.1" "Initial release"))
  • release/4/patch/trunk/patch.meta

    r5717 r16063  
    1 ((egg "patch.egg")
    2  (synopsis "Simple source patch utility")
    3  (category tools)
     1;;;; -*- Hen -*-
     2
     3((egg "patch.egg") ; This should never change
     4
     5 ; List here all the files that should be bundled as part of your egg. 
     6
     7 (files "patch.scm" "eggdoc-patch.scm" "patch.setup" )
     8
     9 ; Your egg's license:
     10
    411 (license "MIT")
    5  (author "Tony Sidaway <tonysidaway@gmail.com")
    6  (files "patch.scm" "Makefile" "patch.setup" "patch.html" "eggdoc-patch.scm"))
     12
     13 ; Pick one from the list of categories (see below) for your egg and
     14 ; enter it here.
     15
     16 (category data)
     17
     18 ; A list of eggs patch depends on.
     19
     20 (needs eggdoc)
     21
     22 (eggdoc "eggdoc-patch.scm")
     23
     24 (maintainer "Ivan Raikov")
     25 (author "Tony Sidaway")
     26
     27 (synopsis "Simple source patch utility."))
  • release/4/patch/trunk/patch.scm

    r3059 r16063  
    1818;; DEALINGS IN THE SOFTWARE.
    1919;;
    20 ;; <synopsis>(require 'patch)</synopsis>
    21 
    22 (use posix)
     20
     21(module patch
     22       
     23        (make-patch apply-patch reverse-patch)
     24
     25        (import scheme chicken extras posix regex)
     26         
    2327
    2428;;
     
    2731;; Reads a GNU diffutils diff file on (current-input-port) and turns it
    2832;; into a patch definition on (current-output-port).
     33
     34
    2935(define (make-patch)
    3036  (let* ((match-string
    31          "^([1-9][0-9]*)(,?)([1-9][0-9]*)?([dca])([1-9][0-9]*)(,?)([1-9][0-9]*)?")
     37         (regexp "^([1-9][0-9]*)(,?)([1-9][0-9]*)?([dca])([1-9][0-9]*)(,?)([1-9][0-9]*)?"))
    3238        (lookahead-buffer '())
    3339        (lookahead-line (lambda ()
     
    193199          (list 'a new-start-line new-finish-line start-line finish-line lines-to-insert lines-to-delete)))))
    194200   patch-definition))
     201
     202)
  • release/4/patch/trunk/patch.setup

    r3059 r16063  
    1 (run (make))
    2 (install-extension 'patch
    3         '(
    4         "patch.so" "patch.html" "patch.exports")
    5         '((version "0.1")
    6         (documentation "patch.html")
    7         (exports "patch.exports")))
     1;;;; -*- Hen -*-
     2
     3(define (dynld-name fn)         
     4  (make-pathname #f fn ##sys#load-dynamic-extension))   
     5
     6(compile -O2 -d0 -s patch.scm -j patch)
     7(compile -O2 -d0 -s patch.import.scm)
     8
     9(run (csi -s eggdoc-patch.scm > patch.html))
     10
     11(install-extension
     12
     13  ; Name of your extension:
     14  'patch
     15
     16  ; Files to install for your extension:
     17  `(,(dynld-name "patch") ,(dynld-name "patch.import") )
     18
     19  ; Assoc list with properties for your extension:
     20  `((version 0.12)
     21    (documentation "patch.html")
     22    ))
     23
Note: See TracChangeset for help on using the changeset viewer.