Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gendl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
47
Issues
47
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gendl
gendl
Commits
9a201cea
Commit
9a201cea
authored
May 08, 2015
by
Dave Cooper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
couple new patches
parent
d3608cf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
0 deletions
+130
-0
patches/1588/p010.lisp
patches/1588/p010.lisp
+77
-0
patches/1588/p011.lisp
patches/1588/p011.lisp
+53
-0
No files found.
patches/1588/p010.lisp
0 → 100644
View file @
9a201cea
(
in-package
:gdl
)
(
defparameter
*1588p010-doc*
" Correct snap output for objects not made with root-object-object."
)
(
#+
allegro
excl:without-redefinition-warnings
#-
allegro
progn
(
define-object-amendment
vanilla-mixin*
()
:functions
((
"Void. Writes a file containing the toplevel inputs and modified settable-slots starting from the root of the
current instance. Typically this file can be read back into the system using the <tt>read-snapshot</tt> function.
:&key ((filename \"/tmp/snap.gdl\") \"String or pathname. The target file to be written.\"
(root-paths-to-ignore nil) \"List of root-paths or nil. Any objects with matching root-path will be ignored for the snapshot write.\"
)"
write-snapshot
(
&key
(
filename
"/tmp/snap.gdl"
)
(
root-paths-to-ignore
nil
))
(
let
(
*print-level*
(
root-object-object?
(
and
(
the
parent
)
(
the
parent
root?
)
(
defaulting
(
the
parent
root-object-object
))
(
eql
(
the
parent
root-object-object
)
self
))))
(
let
((
root
(
if
root-object-object?
(
the
root
parent
)
(
the
root
))))
(
setf
(
gdl-acc::%version-tree%
root
)
(
sort
(
gdl-acc::%version-tree%
root
)
#'
(
lambda
(
item1
item2
)
(
<
(
length
(
first
item1
))
(
length
(
first
item2
))))))
(
with-open-file
(
out
filename
:direction
:output
:if-exists
:supersede
:if-does-not-exist
:create
)
(
print
`
(
in-package
,
(
make-keyword
(
package-name
*package*
)))
out
)
(
mapcar
#'
(
lambda
(
node
)
(
let
((
root-path
(
first
node
))
(
value-plist
(
rest
node
)))
(
unless
(
or
(
member
root-path
root-paths-to-ignore
:test
#'
equalp
)
(
and
root-object-object?
(
not
(
eql
(
lastcar
root-path
)
:root-object-object
))))
(
when
(
or
(
and
root-object-object?
(
null
(
rest
root-path
)))
(
and
(
not
root-object-object?
)
(
null
root-path
)))
(
setq
root-path
(
the
type
)))
(
when
(
and
root-object-object?
(
consp
(
rest
root-path
)))
(
setq
root-path
(
butlast
root-path
)))
#+
nil
(
setq
root-path
(
if
(
consp
(
rest
root-path
))
(
if
root-object-object?
(
butlast
root-path
)
root-path
)
(
the
type
)))
(
let
((
keys
(
plist-keys
value-plist
))
(
values
(
plist-values
value-plist
)))
(
let
((
snap
(
cons
root-path
(
append
(
when
(
atom
root-path
)
(
let
(
result
)
(
let*
((
toplevel-inputs
(
remove-plist-key
(
the
root
active-inputs
)
:remote-id
))
(
toplevel-input-keys
(
plist-keys
toplevel-inputs
))
(
toplevel-input-values
(
plist-values
toplevel-inputs
)))
(
mapc
#'
(
lambda
(
key
value
)
(
when
(
not
(
member
key
keys
))
(
push
key
result
)
(
push
value
result
)))
toplevel-input-keys
toplevel-input-values
))
(
nreverse
result
)))
(
mapcan
#'
(
lambda
(
key
val
)
(
let
((
expression
(
readable-expression
val
self
)))
(
unless
(
eql
expression
:%unreadable%
)
(
list
key
expression
))))
keys
values
)))))
(
print
snap
out
))))))
(
or
(
gdl-acc::%version-tree%
root
)
(
list
nil
))))))
filename
))))
patches/1588/p011.lisp
0 → 100644
View file @
9a201cea
;;
;; Copyright 2002-2015 Genworks International
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;;
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file. If not, see
;; <http://www.gnu.org/licenses/>.
;;
(
in-package
:geom-base
)
(
defparameter
*1588p011-doc*
" Remove debug statements for x3d outpu9t"
)
(
#+
allegro
excl:without-redefinition-warnings
#-
allegro
progn
(
define-lens
(
x3d
base-object
)
()
:amend?
t
:output-functions
((
material-properties
()
(
let*
((
display-controls
(
find-in-hash
self
*display-controls*
))
(
color
(
getf
display-controls
:color
))
(
color
(
or
color
(
getf
(
the
display-controls
)
:color
)
:black
)))
(
cl-who:with-html-output
(
*stream*
nil
:indent
nil
)
(
:|Material|
:|diffuseColor|
(
write-the
(
rgb-color
color
))
:|ambientIntensity|
(
getf
(
the
display-controls
)
:ambient-intensity
)
:|emissiveColor|
(
write-the
(
rgb-color
(
getf
(
the
display-controls
)
:emissive-color
)))
:|shininess|
(
getf
(
the
display-controls
)
:shininess
)
:|specularColor|
(
write-the
(
rgb-color
(
getf
(
the
display-controls
)
:specular-color
)))
:|transparency|
(
getf
(
the
display-controls
)
:transparency
)
)))))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment