IUP

Check-in [2e2a7ad35a]
Login

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

Overview
Comment:Avoid useless shadowing of identifiers in recent file menu code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e2a7ad35a2516ca6a170377d1fbb5987ced3eed
User & Date: murphy 2015-05-03 20:06:56
Context
2015-05-03
21:30
Corrected Ihandle_ field alignment problem in Racket binding check-in: 215c766d56 user: murphy tags: trunk
20:06
Avoid useless shadowing of identifiers in recent file menu code check-in: 2e2a7ad35a user: murphy tags: trunk
17:45
Streamlined sections check-in: c2869d0d6d user: murphy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to chicken/iup-config.scm.

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
(define config-dialog-update!
	(foreign-safe-lambda void "IupConfigDialogClosed" nonnull-ihandle nonnull-ihandle nonnull-c-string))

;; }}}

;; {{{ Configured Recent Files

(define-external (recent_callback_entry [ihandle handle]) istatus
	(let ([callback (cond [(and handle (parent handle)) => (cut callback <> 'action)])])
		(if callback
				(callback handle)
				'continue)))

(define config-recent-menu
	(make-constructor-procedure
	  (lambda (handle max-recent)
			(let ([menu (foreign-value "IupMenu(NULL)" nonnull-ihandle)])
				((foreign-lambda* void ([nonnull-ihandle handle] [nonnull-ihandle menu] [int max_recent])
					 "IupConfigRecentInit(handle, menu, recent_callback_entry, max_recent);")
				 handle menu max-recent)
				menu))))

(define config-recent-update!
	(foreign-safe-lambda void "IupConfigRecentUpdate" nonnull-ihandle nonnull-c-string))

;; }}}







|
|
|
|







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
(define config-dialog-update!
	(foreign-safe-lambda void "IupConfigDialogClosed" nonnull-ihandle nonnull-ihandle nonnull-c-string))

;; }}}

;; {{{ Configured Recent Files

(define-external (recent_action_entry [ihandle handle]) istatus
	(let ([action (cond [(and handle (parent handle)) => (cut callback <> 'action)])])
		(if action
				(action handle)
				'continue)))

(define config-recent-menu
	(make-constructor-procedure
	  (lambda (handle max-recent)
			(let ([menu (foreign-value "IupMenu(NULL)" nonnull-ihandle)])
				((foreign-lambda* void ([nonnull-ihandle handle] [nonnull-ihandle menu] [int max_recent])
					 "IupConfigRecentInit(handle, menu, recent_action_entry, max_recent);")
				 handle menu max-recent)
				menu))))

(define config-recent-update!
	(foreign-safe-lambda void "IupConfigRecentUpdate" nonnull-ihandle nonnull-c-string))

;; }}}