The changes below (except for init.scm) were found during the work of

2006-10-12  Kevin Cozens  <kcozens@cvs.gnome.org>

	The changes below (except for init.scm) were found during the work
	of updating the GIMP Script-Fu plug-in to become Tiny-Fu.

	* tiny-fu/tiny-fu-console.c
	* tiny-fu/tiny-fu-interface.c
	* tiny-fu/tiny-fu-scripts.c
	* tiny-fu/tiny-fu-server.c
	* tiny-fu/tiny-fu-text-console.c
	* tiny-fu/tiny-fu.c: Various minor bug fixes and changes to bring
	Tiny-Fu up-to-date with changes made in Script-Fu.

	* scripts/*.scm: Applied patch from Saul Goode with review and
	localisation of Script-Fu procedure blurbs (bug #351283). Also
	some formatting changes.

	* tinyscheme/init.scm: Updated based on version 1.38 of TinyScheme.
This commit is contained in:
Kevin Cozens 2006-10-12 20:31:33 +00:00 committed by Kevin Cozens
parent d1ffa1f312
commit ffef8df73b
4 changed files with 29 additions and 40 deletions

View File

@ -273,8 +273,7 @@
(script-fu-register "script-fu-contactsheet" (script-fu-register "script-fu-contactsheet"
_"Contact Sheet" _"Contact Sheet"
"Create a series of images containing thumbnail sized versions _"Create a series of images containing thumbnail sized versions of all of the images in a specified directory."
of all of the images contained in a specified directory."
"Kevin Cozens <kcozens@interlog.com>" "Kevin Cozens <kcozens@interlog.com>"
"Kevin Cozens" "Kevin Cozens"
"July 19, 2004" "July 19, 2004"

View File

@ -52,7 +52,7 @@
(script-fu-register "script-fu-set-cmap" (script-fu-register "script-fu-set-cmap"
_"Set Colormap" _"Set Colormap"
"Change the colourmap of an image to the colours in a specified palette." _"Change the colourmap of an image to the colours in a specified palette."
"Kevin Cozens <kcozens@interlog.com>" "Kevin Cozens <kcozens@interlog.com>"
"Kevin Cozens" "Kevin Cozens"
"September 29, 2004" "September 29, 2004"

View File

@ -25,26 +25,25 @@
; Tiny-Fu first successfully ran this script at 2:07am on March 6, 2004. ; Tiny-Fu first successfully ran this script at 2:07am on March 6, 2004.
(define (script-fu-helloworld text font size colour) (define (script-fu-helloworld text font size colour)
(let* (let* (
( (width 10)
(width 10) (height 10)
(height 10) (img (car (gimp-image-new width height RGB)))
(img (car (gimp-image-new width height RGB))) (text-layer)
(text-layer) )
)
(gimp-context-push) (gimp-context-push)
(gimp-image-undo-disable img) (gimp-image-undo-disable img)
(gimp-context-set-foreground colour) (gimp-context-set-foreground colour)
(set! text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font))) (set! text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
(set! width (car (gimp-drawable-width text-layer))) (set! width (car (gimp-drawable-width text-layer)))
(set! height (car (gimp-drawable-height text-layer))) (set! height (car (gimp-drawable-height text-layer)))
(gimp-image-resize img width height 0 0) (gimp-image-resize img width height 0 0)
(gimp-image-undo-enable img) (gimp-image-undo-enable img)
(gimp-display-new img) (gimp-display-new img)
(gimp-context-pop) (gimp-context-pop)
) )

View File

@ -1,4 +1,4 @@
; Initialization file for TinySCHEME 1.34 ; Initialization file for TinySCHEME 1.38
; Per R5RS, up to four deep compositions should be defined ; Per R5RS, up to four deep compositions should be defined
(define (caar x) (car (car x))) (define (caar x) (car (car x)))
@ -64,25 +64,16 @@
(foldr (lambda (a b) (if (< a b) a b)) (car lst) (cdr lst))) (foldr (lambda (a b) (if (< a b) a b)) (car lst) (cdr lst)))
(define (succ x) (+ x 1)) (define (succ x) (+ x 1))
(define (pred x) (- x 1)) (define (pred x) (- x 1))
(define gcd (define (gcd a b)
(lambda a (let ((aa (abs a))
(if (null? a) (bb (abs b)))
0 (if (= bb 0)
(let ((aa (abs (car a))) aa
(bb (abs (cadr a)))) (gcd bb (remainder aa bb)))))
(if (= bb 0) (define (lcm a b)
aa (if (or (= a 0) (= b 0))
(gcd bb (remainder aa bb))))))) 0
(define lcm (abs (* (quotient a (gcd a b)) b))))
(lambda a
(if (null? a)
1
(let ((aa (abs (car a)))
(bb (abs (cadr a))))
(if (or (= aa 0) (= bb 0))
0
(abs (* (quotient aa (gcd aa bb)) bb)))))))
(define call/cc call-with-current-continuation) (define call/cc call-with-current-continuation)
@ -127,9 +118,9 @@
(if (pred n) (if (pred n)
(atom->string n) (atom->string n)
(error "xxx->string: not a xxx" n))) (error "xxx->string: not a xxx" n)))
(define (number->string n) (anyatom->string n number?))
(define (number->string n) (anyatom->string n number?))
(define (char-cmp? cmp a b) (define (char-cmp? cmp a b)
(cmp (char->integer a) (char->integer b))) (cmp (char->integer a) (char->integer b)))
@ -190,8 +181,8 @@
(cons cars cdrs) (cons cars cdrs)
(let ((car1 (caar lists)) (let ((car1 (caar lists))
(cdr1 (cdar lists))) (cdr1 (cdar lists)))
(unzip1-with-cdr-iterative (unzip1-with-cdr-iterative
(cdr lists) (cdr lists)
(append cars (list car1)) (append cars (list car1))
(append cdrs (list cdr1)))))) (append cdrs (list cdr1))))))
@ -475,7 +466,7 @@
(and (input-port? p) (output-port? p))) (and (input-port? p) (output-port? p)))
(define (close-port p) (define (close-port p)
(cond (cond
((input-output-port? p) (close-input-port (close-output-port p))) ((input-output-port? p) (close-input-port (close-output-port p)))
((input-port? p) (close-input-port p)) ((input-port? p) (close-input-port p))
((output-port? p) (close-output-port p)) ((output-port? p) (close-output-port p))
@ -548,7 +539,7 @@
(* (quotient *seed* q) r))) (* (quotient *seed* q) r)))
(if (< *seed* 0) (set! *seed* (+ *seed* m))) (if (< *seed* 0) (set! *seed* (+ *seed* m)))
*seed*)) *seed*))
;; SRFI-0 ;; SRFI-0
;; COND-EXPAND ;; COND-EXPAND
;; Implemented as a macro ;; Implemented as a macro
(define *features* '(srfi-0)) (define *features* '(srfi-0))