1. ver. 4.0 Build/Command Line Problem Found !!

Prior to SVN1471 build worked properly because revget.e never
had a command line that was longer 2 parameters. I know this
because I traced through a complete build process.

Then SVN1472 upgrade was made to the backend runtime to enable options to
be used.

If you check below you will see a -i option being passed through rev_1_3()
code and because of the option; the length of the command line is
increased beyond the two parameter limit being tested for.
The code will then cause an abort.

THIS IS WHAT THE MAKEFILE.WAT IS EXECUTING said...

Open Watcom Make Version 1.8 
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved. 
Source code is available under the Sybase Open Watcom Public License. 
See http://www.openwatcom.org/ for details. 
------- ALL ----------- 
        wmake -h -f makefile.wat winall DEBUG= MANAGED_MEM=1 CONFIG=config.wat 
------- WINALL ----------- 
wmake -h -f makefile.wat interpreter DEBUG= MANAGED_MEM=1 CONFIG=config.wat 
wmake -h -f makefile.wat E:\1470\source\intobj\main-.c EX=e:\1470\bin\exwc.exe E 
U_TARGET=int. OBJDIR=intobj DEBUG= MANAGED_MEM=1 CONFIG=config.wat DEBUG= MANAGE 
D_MEM=1 
mkdir E:\1470\source\intobj 
mkdir E:\1470\source\intobj\back 
e:\1470\bin\exwc.exe -i ..\include revget.ex 



THIS IS PART WHERE REVGET.EX NEEDS TO BE REWRITTEN said...
procedure rev_1_3() 
sequence c 
integer h 
sequence f 
object x 
integer tryst 
tryst = 0 
 
c = command_line() 
if length(c) = 2 then 
        tryst = 1 
elsif length(c) != 3 then -- <--------<< c length is 4 because of -i option 
        puts(2, "Incorrect usage.\n") 
        abort(1) 
end if 



THIS IS THE COMMAND LINE ( sequence c ) IN ABOVE REVGET.EX said...
-- Note this a screen copy from trace that's why sequence looks wrong. 
-- There is no way to display it properly here so it makes sense. 
c={ 
    {101e,58:,92\,491,524,557,480,92\,98b,105i,110n,92\,101e,120x,119w,99c, 
46.,101e,120x,101e}, 
    {45-,105i}, 
    {46.,46.,92\,105i,110n,99c,108l,117u,100d,101e}, 
    {114r,101e,118v,103g,101e,116t,46.,101e,120x} 
  } 
 
* Press Enter to resume trace 
new topic     » topic index » view message » categorize

2. Re: ver. 4.0 Build/Command Line Problem Found !!

Bernie,

I think the problem is in the actual handling of the command line arguments in Euphoria. Recently there was quite an internal change in how the command line arguments were handled. It was made easier to maintain and also enhanced so that we can use a configuration file to provide any command line option. However, during this time there was an oversite. I just discovered it the other day when a program of mine ceased to function.

The difference is, in 3.x and 99% of 4.0, the interpreter and translator ate any command line argument sent to it. For instance:

C:\ > exwc -i \euphoria -i myapp -D TEST myprog.ex hello.txt 
 
command_line() = { myprog.ex, hello.txt } 

However, after the recent change, this is what it looks like:

C:\ > exwc -i \euphoria -i myapp -D TEST myprog.ex hello.txt 
 
command_line() = { -i, \euphoria, -i, myapp, -D, TEST, myprog.ex, hello.txt } 

I think there is a change under way to correct this problem, then programs like revget.ex will start working again.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

3. Re: ver. 4.0 Build/Command Line Problem Found !!

jeremy said...

Bernie,

I think the problem is in the actual handling of the command line arguments in Euphoria. Recently there was quite an internal change in how the command line arguments were handled. It was made easier to maintain and also enhanced so that we can use a configuration file to provide any command line option. However, during this time there was an oversite. I just discovered it the other day when a program of mine ceased to function.

The difference is, in 3.x and 99% of 4.0, the interpreter and translator ate any command line argument sent to it. For instance:

C:\ > exwc -i \euphoria -i myapp -D TEST myprog.ex hello.txt 
 
command_line() = { myprog.ex, hello.txt } 

However, after the recent change, this is what it looks like:

C:\ > exwc -i \euphoria -i myapp -D TEST myprog.ex hello.txt 
 
command_line() = { -i, \euphoria, -i, myapp, -D, TEST, myprog.ex, hello.txt } 

I think there is a change under way to correct this problem, then programs like revget.ex will start working again.

Jeremy

Has that been committed to the trunk ?

new topic     » goto parent     » topic index » view message » categorize

4. Re: ver. 4.0 Build/Command Line Problem Found !!

bernie said...

Has that been committed to the trunk ?

No, work is still underway on it. Sorry.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

5. Re: ver. 4.0 Build/Command Line Problem Found !!

jeremy said...
bernie said...

Has that been committed to the trunk ?

No, work is still underway on it. Sorry.

Jeremy

I have repaired this and will commit it very soon. Just adding a "-?" switch now.

new topic     » goto parent     » topic index » view message » categorize

6. Re: ver. 4.0 Build/Command Line Problem Found !!

DerekParnell said...
jeremy said...
bernie said...

Has that been committed to the trunk ?

No, work is still underway on it. Sorry.

Jeremy

I have repaired this and will commit it very soon. Just adding a "-?" switch now.

Thanks Derek:

I will check for it in the morning and test it for you.
It is evening here so I have to go to sleep now.

new topic     » goto parent     » topic index » view message » categorize

7. Re: ver. 4.0 Build/Command Line Problem Found !!

Good job; Derek !

SVN1512 builds perfectly with your modifications.
Thanks for your help.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu