On 2003.08.14, Nikolay Skachkov <[EMAIL PROTECTED]> wrote:
> I am in a process of updating some application still running under
> aolserver 2.3 to 3.5. That has a lot of statements ns_include -sameframe
>
> The -sameframe option is not supported any longer by the api and I well
> understand why. The recommended way of passing parameters to includes is
> via explicit list and then ns_adp_bind_args.
>
> However moving to new api with my application will mean a huge rewrite.
> Is there any way to avoid that?

Rename the current ns_include proc to _std_ns_include or somesuch, then
define your own ns_include proc that looks for the -sameframe arg and
does something intelligent with it ...

However, all the code that gets included will need to be touched to be
wrapped in an uplevel (simplest change, can be applied
programmatically).

Basically, write a script that greps all your .adp files for -sameframe.
Build up a unique list of filenames that get included using -sameframe.
Then, write a script that takes each of those files, reads in their
contents, and writes them back out with the file contents in "uplevel
{<original file contents>}" ...

Then, strip out the -sameframe using "perl -pi -e s/ -sameframe//g'
*.adp" or whatnot.

Of course, take a full backup of all your files first in case you need
to back out of this change if it doesn't work.

"Huge rewrite" -- how many files/lines of code are we talking here?

-- Dossy

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to