Author Topic: How to ssget the text with"[]" and replace it with pattern?  (Read 8612 times)

0 Members and 1 Guest are viewing this topic.

cjw

  • Newt
  • Posts: 162
How to ssget the text with"[]" and replace it with pattern?
« on: March 06, 2009, 10:09:14 AM »
My english is poor so that I only can express the question with lisp code.

;Fisrt step:
(setq pattern1 "`[12`]")
(setq ss (ssget (list (cons 1 (strcat "*" pattern "*")))))
(setq v1_list (cjw-ss-value_list ss 1))

;_$ v1_list
("abc[12]" "abc[12]test" "123[12]")

;Second step:
(setq pattern2 "[12]")
(setq new_pattern "[abc456]")
(setq string "abc[12]test")

(while (vl-string-search pattern2 string)
  (setq string (vl-string-subst new_pattern pattern2 string))
)

;_$ string
"abc[abc456]test"

If (= pattern2 pattern1 "`[12`]")

How to finish the Second step ?

I am sorry my poor english that i can't express the problem clearly!
always i want to help others. always have this trouble. :-(
The slow need to start early!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10384
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #1 on: March 06, 2009, 11:00:49 AM »
I don't understand the question.
Please try again to explain.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9380
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #2 on: March 06, 2009, 11:20:36 AM »
??
(vla-put-textstring ...
??
TheSwamp.org (serving the CAD community since 2003)

Donate to TheSwamp.org

VovKa

  • Swamp Rat
  • Posts: 1210
  • Ukraine
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #3 on: March 06, 2009, 11:45:04 AM »
ssget uses wcmatch rules and vl-string-* reads the string literally. what's the problem then?
« Last Edit: March 06, 2009, 11:49:04 AM by VovKa »

FengK

  • Guest
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #4 on: March 07, 2009, 01:59:04 AM »

I am sorry my poor english that i can't express the problem clearly!
always i want to help others. always have this trouble. :-(

How about writing your question in your native language? Someone here can probably translate for you.
« Last Edit: March 07, 2009, 02:02:05 AM by xycadd »

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #5 on: March 07, 2009, 09:46:50 AM »
Thank you all~!

OK...


我的问题是:

选择并替换带有通配符的字符串

遇到的困难是:

ssget的通配符需要用到转义字符,replace需要反转义字符

Bable Fish translation: <entered by CAB>My question is: Chooses and replaces has the wildcard character string of character Meets the difficulty is: the ssget wildcard character needs to use the figurative meaning character, replace to need the counter-figurative meaning character
« Last Edit: March 07, 2009, 04:04:53 PM by CAB »
The slow need to start early!

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #6 on: March 07, 2009, 09:52:52 AM »
My aim is to achieve the replacement of function
The same as command "Find"
The slow need to start early!

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #7 on: March 07, 2009, 10:03:51 AM »
oh! I forget it.

I have readed the "find.lsp" in CAD R14 long time ago.

May be that can help.

Thank you every one. Thanks for your help!!!

The slow need to start early!

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #8 on: March 07, 2009, 11:00:32 AM »
After read the "FIND.LSP" from CAD R14
I know replace the text. only use "(setq sset (ssget (list (cons 0 "TEXT"))))"
but not use "(setq sset (ssget (list (cons 0 "TEXT") (cons 1 (strcat "*" pattern "*")))))"


Quote
;;;     FIND.LSP
;;;     Copyright (C) 1997 by Autodesk, Inc.
;;;
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the above copyright notice appears in all copies and
;;;     that both that copyright notice and the limited warranty and
;;;     restricted rights notice below appear in all supporting
;;;     documentation.
;;;
;;;     AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
;;;     AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;;     MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
;;;     DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;;     UNINTERRUPTED OR ERROR FREE.
;;;
;;;     Use, duplication, or disclosure by the U.S. Government is subject to
;;;     restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;     Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;;     (Rights in Technical Data and Computer Software), as applicable.
;;;
;;;     Credits: Bill Kramer, Q.C.
;;;              Dominic Panholzer
;;;              Randy Kintzley, Error Handling
;;;              Greg Robinson



;|   Check to see if AI_UTILS is loaded, If not, try to find it,
     and then try to load it.

    If it can't be found or it can't be loaded, then abort the
    loading of this file immediately, preserving the (autoload)
    stub function.
|;

(cond
  ((and ai_dcl (listp ai_dcl)))      ; it's already loaded.

  ((not (findfile "ai_utils.lsp"))   ; find it
   (ai_abort "DDCHPROP"
        (strcat "Can't locate file AI_UTILS.LSP."
           "\n Check support directory."
        )
   )
  )

  ((eq "failed" (load "ai_utils" "failed")) ; load it
   (ai_abort "DDCHPROP" "Can't load file AI_UTILS.LSP")
  )
)               ;end conditional

(if (not (ai_acadapp))         ; defined in AI_UTILS.LSP
  (ai_abort "DDCHPROP" nil)      ; a Nil <msg> supresses
)               ; ai_abort's alert box dialog.




               ;    metering prompt
(defun gc_meter   (gcm_pr gc_num gc_max)
  (prompt
    (strcat "\r"
       gcm_pr
       " ("
       (rtos (* (/ (float (1+ gc_num)) (float gc_max)) 100) 2 0)
       "%)"
    )               ;strcat
  )               ;prompt   
)               ;defun

(defun C:FIND
         (/       mode    replace_loc  _accept
          _replace       text    text_string  index
          pointer       sset    id         text_string_length
          *olderror*
         )
  (init_bonus_error
    (list
      (list "cmdecho"
       0
      )
      T               ;flag. True means use undo for error clean up. 
    )               ;list 
  )               ;init_bonus_error

               ;process an ok
  (defun _accept ()
    (cond
      (
       (or
    (=
      (get_tile "find")
      ""
    )
               ; (=
               ;    (get_tile "replace")
               ;    ""
               ; )
       )
       (set_tile "error" "Empty or invalid input")
      )
      (
       (=
    (get_tile "find")
    (get_tile "replace")
       )
       (set_tile "error" "Find and replace are identical")
      )
      (T
       (setq #find_string (get_tile "find"))
       (setq #replace_string (get_tile "replace"))
       (setq #case_sensitive (get_tile "case"))
       (setq #global (get_tile "global"))
       (done_dialog 1)
      )
    )
  )

               ;function for prompt to replace
  (defun _replace ()
    (new_dialog "find2" id "" replace_loc)
    (action_tile "cancel" "(done_dialog)(exit)")
    (action_tile "accept" "(setq replace_loc (done_dialog 1))")
    (action_tile "skip" "(setq replace_loc (done_dialog 0))")
    (action_tile "auto" "(done_dialog 2)")
    (set_tile
      "error"
      (strcat
   (rtos (1+ index) 2 0)
   " of "
   (rtos (sslength sset) 2 0)
      )
    )
    (start_dialog)
  )

               ;set up the dialog identification
  (setq id (load_dialog "find"))

               ;open dialog and store location as a global
  (new_dialog "find" id)

               ;set those defaults
  (if
    #find_string
     (set_tile "find" #find_string)
  )
  (if
    #replace_string
     (set_tile "replace" #replace_string)
  )
  (if
    #case_sensitive
     (set_tile "case" #case_sensitive)
  )
  (if
    #global
     (set_tile "global" #global)
  )

               ;set up callbacks
  (action_tile "accept" "(_accept)")
  (mode_tile "find" 2)

               ;process the look for the callbacks
  (if
               ;make changes if ok is picked
    (=
      (start_dialog)
      1
    )
     (progn
               ;get a selection set if not global
       (if (/= #global "1")
    (while
      (=
        (setq sset (ssget (list (cons 0 "TEXT"))))
        nil
      )
       (prompt "\nNo entities selected")
    )
    (setq sset (ssget "_X" (list (cons 0 "TEXT"))))
       )
       (setq index 0)
               ;go through the selection set
       (while (and sset
         (/=
           (setq text (ssname sset index))
           nil
         )
         )
               ;go through each string
    (setq pointer 1)
    (setq text_string (cdr (assoc 1 (entget text))))
    (if
      (<=
        (strlen #find_string)
        (strlen text_string)
      )
       (progn
         (setq text_string_length (strlen text_string))
               ;go until you reach the end of the string
         (while
      (<
        pointer
        (+ (- text_string_length (strlen #find_string)) 2)
      )
       (if
         (=
           (if
             (= #case_sensitive "1")
         (substr
           text_string
           pointer
           (strlen #find_string)
         )
         (strcase
           (substr
             text_string
             pointer
             (strlen #find_string)
           )
         )
           )
           (if (= #case_sensitive "1")
             #find_string
             (strcase #find_string)
           )
         )
          (progn
            (redraw text 3)
            (if (/= mode 2)
         (if (/= #global "1")
           (setq mode (_replace))
           (setq mode 2)
         )
            )
            (if (> mode 0)
         (progn
           (setq   text_string
             (if (= pointer 1)
               (strcat
                 #replace_string
                 (substr
                   text_string
                   (+ pointer (strlen #find_string))
                 )
               )
               (strcat
                 (substr
                   text_string
                   1
                   (- pointer 1)
                 )
                 #replace_string
                 (substr
                   text_string
                   (+ pointer (strlen #find_string))
                 )
               )
             )
           )
           (entmod
             (subst
               (cons 1 text_string)
               (assoc 1 (entget text))
               (entget text)
             )
           )
           (setq
             pointer
              (+ pointer (strlen #replace_string))
           )
           (setq
             text_string_length
              (strlen text_string)
           )
         )
            )
            (redraw text 4)
            (setq pointer (1+ pointer))
          )
          (setq pointer (1+ pointer))
       )
         )
       )
    )
    (gc_meter "Changing text" index (sslength sset))
    (setq index (1+ index))
       )
     )
  )
  (unload_dialog id)
  (restore_old_error)
  (princ)
)               ;defun find
(princ
  "FIND Loaded. Find and Replace DText Strings. FINDHELP for Help\n"
)
(princ)

(defun c:findhelp (/)
  (prompt
    "The find command preforms a find and replace on Dtext strings.\n"
  )
  (prompt "This version does not support Mtext.\n")
  (prompt
    "Usage is through the Dialog box, note the options! \n"
  )
  (prompt "User can preform Selected or Global replacement.\n"
  )
  (prompt "Case is supported, check option in Dialog.\n")
  (prompt
    "If the Dialog fails to appear, check your Support path.\n"
  )
  (prompt "Files used: Find.lsp & Find.dcl\n")
  (prompt "Type FIND to begin command.\n")
  (textscr)
  (princ)
)


The slow need to start early!

MP

  • Seagull
  • Posts: 17577
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #9 on: March 07, 2009, 11:04:21 AM »
;;;     Use, duplication, or disclosure by the U.S. Government is subject to
;;;     restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;     Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;;     (Rights in Technical Data and Computer Software), as applicable.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #10 on: March 07, 2009, 11:34:36 AM »
sorry,MP

I only can understand the lisp code.

what's that mean?

Does it mean can't copy??? :oops:
Quote
;;;     Use, duplication, or disclosure by the U.S. Government is subject to
;;;     restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;     Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;;     (Rights in Technical Data and Computer Software), as applicable.

The slow need to start early!

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #11 on: March 07, 2009, 03:34:39 PM »
I'm no lawyer so ... *shrug*
Quote
Page 1
EXHIBIT CCS (10-91)
(Ref.: FAR 52.227-19)
COMMERCIAL COMPUTER SOFTWARE--RESTRICTED RIGHTS
(a) As used in this clause, "restricted computer software" means any computer program, computer data base, or
documentation thereof, that has been developed at private expense and either is a trade secret, is commercial or
financial and confidential or privileged, or is published and copyrighted.
(b) Notwithstanding any provisions to the contrary contained in any standard commercial license or lease
agreement pertaining to any restricted computer software delivered under this purchase order/subcontract, and
irrespective of whether any such agreement has been proposed prior to or after issuance of this purchase
order/subcontract or of the fact that such agreement may be affixed to or accompany the restricted computer software
upon delivery, Seller agrees that the Company and the Government shall have the rights that are set forth in
paragraph (c) of this clause to use, duplicate, or disclose any restricted computer software delivered under this
purchase order/subcontract. The terms and provisions of this subcontract, including any commercial lease or license
agreement, shall be subject to paragraph (c) of this clause and shall comply with Federal laws and the Federal
Acquisition Regulation.
(c) (1)
The restricted computer software delivered under this subcontract may not be used, reproduced, or
disclosed by the Company or the Government except as provided in subparagraph (c)(2) of this clause or as
expressly stated otherwise in this subcontract.
(2)
The restricted computer software may be:
(i) Used or copied for use in or with the computer or computers for which it was acquired, including
use at any Government installation to which such computer or computers may be transferred;
(ii) Used or copied for use in or with backup computer if any computer for which it was acquired is
inoperative;
(iii) Reproduced for safekeeping (archives) or backup purposes;
(iv) Modified, adapted, or combined with other computer software, provided that the modified,
combined, or adapted portions of the derivative software incorporating any of the delivered, restricted computer
software shall be subject to same restrictions set forth in this purchase order/subcontract;

(v) Disclosed to and reproduced for use by support service contractors or subcontractors, subject to
the same restrictions set forth in this purchase order/subcontract; and
(vi) Used or copied for use in or transferred to a replacement computer.
(3)
If the restricted computer software delivered under this purchase order/subcontract is published and
copyrighted, it is licensed to the Company and the Government, without disclosure prohibitions, with the rights set
forth in subparagraph (c)(2) of this clause unless expressly stated otherwise in this purchase order/subcontract.
(4)
To the extent feasible the Seller shall affix a Notice substantially as follows to any restricted computer
software delivered under this purchase order/subcontract; or, if the Seller does not, the Company and the Government
have the right to do so: "Notice--Notwithstanding any other lease or license agreement that may pertain to, or
accompany the delivery of, this computer software, the rights of the Company and the Government regarding its use,
reproduction, and disclosure are as set forth in Martin Marietta Energy Systems, Inc., Subcontract No.
_____________.
(d) If any restricted computer software is delivered under this subcontract with the copyright notice of 17 U.S.C.
401, it will be presumed to be published and copyrighted and licensed to the Company and the Government in
accordance with subparagraph (c)(3) of this clause, unless a statement substantially as follows accompanies such
copyright notice: "Unpublished--rights reserved under the copyright laws of the United States."

TheSwamp.org  (serving the CAD community since 2003)

scottcd

  • Newt
  • Posts: 52
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #12 on: March 07, 2009, 03:43:38 PM »
Quote
;;;     FIND.LSP
;;;     Copyright (C) 1997 by Autodesk, Inc.
;;;
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the above copyright notice appears in all copies and
;;;     that both that copyright notice and the limited warranty and
;;;     restricted rights notice below appear in all supporting
;;;     documentation.

Surely so long as this is included any modification is entirely within the intent of the release of the lisp originally?

AutoCAD Dos R9 - 2018 and BricCAD 18.2

gskelly

  • Newt
  • Posts: 185
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #13 on: March 07, 2009, 03:58:57 PM »
;;;     Use, duplication, or disclosure by the U.S. Government is subject to
;;;     restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;     Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;;     (Rights in Technical Data and Computer Software), as applicable.

Looks to me like this portion is placing limitations on the actions / rights the
U.S. Government...

I second scottcd's comment.

But I am not a lawyer.
Bricscad v12

CAB

  • Global Moderator
  • Seagull
  • Posts: 10384
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #14 on: March 07, 2009, 03:59:34 PM »
And that's why the code is still posted in this thread.  8-)
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10384
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #15 on: March 07, 2009, 04:42:25 PM »
Back to the code request.

What is the string you wish to find?

What is the string you want to replace with?
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #16 on: March 08, 2009, 12:18:36 AM »
Find string include "Wild-card characters"

For example:

1.
"300*700"

Code: [Select]
(setq pattern "`*")
(ssget (list (1  (strcat "*" pattern "*")))

replace "*" -> "x"

return: "300x700"

------------------------------
2.
"abc[123]"

Code: [Select]
(setq pattern "[`123`]")
(ssget (list (1  (strcat "*" pattern "*")))

replace "[123]"->"[456]"

return: "abc[456]"



Quote

Wild-card characters
 
Character
 Definition
 
# (pound)
 Matches any single numeric digit.
 
@ (at)
 Matches any single alphabetic character.
 
. (period)
 Matches any single nonalphanumeric character.
 
* (asterisk)
 Matches any character sequence, including an empty one, and it can be used anywhere in the search pattern: at the beginning, middle, or end.
 
? (question mark)
 Matches any single character.
 
~ (tilde)
 If it is the first character in the pattern, it matches anything except the pattern.
 
[...]
 Matches any one of the characters enclosed.
 
[~...]
 Matches any single character not enclosed.
 
- (hyphen)
 Used inside brackets to specify a range for a single character.
 
, (comma)
 Separates two patterns.
 
` (reverse quote)
 Escapes special characters (reads next character literally).
 

The slow need to start early!

FengK

  • Guest
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #17 on: March 08, 2009, 12:56:27 AM »
Find string include "Wild-card characters"

For example:

1.
"300*700"

Code: [Select]
(setq pattern "`*")
(ssget (list (1  (strcat "*" pattern "*")))

replace "*" -> "x"

return: "300x700"

------------------------------
2.
"abc[123]"

Code: [Select]
(setq pattern "[`123`]")
(ssget (list (1  (strcat "*" pattern "*")))

replace "[123]"->"[456]"

return: "abc[456]"



cjw, i'm still not following the description of your question.

To find "300*700" where "*" is the actual "*" character, we can use "300`*700" and apparently you already knew this. Similarly to find "[123]", we can use "`[123`]". I wonder if your question is how to perform the replacement for all the matching instances found.

Instead of giving examples, can you tell us what is the actual problem you're trying to solve?

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #18 on: March 08, 2009, 09:41:58 AM »
Code: [Select]
;;CJW-SS-VALUE_LIST By carrot1983
(defun CJW-SS-VALUE_LIST (SS ITEM / I VALUE_LIST)
  (repeat (setq I (sslength SS))
    (setq
      VALUE_LIST
       (cons
(cdr (assoc ITEM (entget (ssname SS (setq I (1- I)))))
)
VALUE_LIST
       )
    )
  )
  VALUE_LIST
)

(defun c:tt ()
  (setq find_pattern "`[123`]")
  (setq replace_pattern "[456]")
  (setq ss (ssget (list (cons 0 "TEXT") (cons 1 "*" find_pattern "*"))))
  (foreach e (CJW-SS-VALUE_LIST ss -1)
    (setq string (cdr (assoc 1 (entget e))))
    (while (vl-string-search find_pattern string);_If find_pattern="`[123`]",always return nil.........
      (setq
string (vl-string-subst replace_pattern find_pattern string);_If find_pattern="`[123`]",always can't work.......
      )
    )
  )
)
The slow need to start early!

VovKa

  • Swamp Rat
  • Posts: 1210
  • Ukraine
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #19 on: March 08, 2009, 10:15:17 AM »
it's some kind of wildcard replacement function
Code: [Select]
(defun wcreplace_sub (Old String)
  (if (wcmatch String Old)
    (1+ (strlen String))
    (wcreplace_sub Old (substr String 1 (1- (strlen String))))
  )
)
(defun wcreplace (New Old String)
  (if (= String "")
    ""
    (if (wcmatch String (strcat Old "*"))
      (strcat New (substr String (wcreplace_sub Old String)))
      (strcat (substr String 1 1)
      (wcreplace New Old (substr String 2))
      )
    )
  )
)
(wcreplace "x" "`*" "300*700")
(wcreplace "[456]" "`[123`]" "abc[123]")
not thoroughly tested though
no support for multiple pattern conditions

CAB

  • Global Moderator
  • Seagull
  • Posts: 10384
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #20 on: March 08, 2009, 10:36:59 AM »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

efernal

  • Newt
  • Posts: 198
e.fernal

cjw

  • Newt
  • Posts: 162
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #22 on: March 08, 2009, 11:10:20 PM »
Thank you all!!!

CAB Se7en VovKa xycadd MP Mark Thomas scottcd gskelly xycadd efernal



Here are some links that may prove useful.

2 post in this one.
http://www.theswamp.org/index.php?topic=5004.msg60485#msg60485

Link to a link.
http://www.theswamp.org/index.php?topic=5892.msg72153#msg72153



The slow need to start early!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10384
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #23 on: March 09, 2009, 12:02:50 AM »
On behalf of the TEAM, you're welcome.   8-)
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17577
Re: How to ssget the text with"[]" and replace it with pattern?
« Reply #24 on: March 09, 2009, 06:59:04 PM »
Quote
;;;     FIND.LSP
;;;     Copyright (C) 1997 by Autodesk, Inc.
;;;
;;;     Permission to use, copy, modify, and distribute this software
;;;     for any purpose and without fee is hereby granted, provided
;;;     that the above copyright notice appears in all copies and
;;;     that both that copyright notice and the limited warranty and
;;;     restricted rights notice below appear in all supporting
;;;     documentation.

Surely so long as this is included any modification is entirely within the intent of the release of the lisp originally?

Thanks for observing and posting that Scott, I missed it completely. <facepalm>
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox