[AmigaOS] BUG GetCLIArg

AmigaOS specific forum
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

[AmigaOS] BUG GetCLIArg

Post by Flype »

Hi PB Team,

I know it is not common to ask this.

2 years here without any post relating to the amiga version :?

But well, i take my chance. Is it still possible to make bug reports for the lastest amiga version of purebasic :?:

So here it is :

GetCLIArg() is not a recognized function while NumberOfCLIArgs() is recognized.

I think there was a mismatch with the others pb forks because ProgramParameter() is recognized but not documented nor working as expected.

Sorry again Fred for this uncommon bug report :mrgreen:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Re: [AmigaOS] BUG GetCLIArg

Post by Flype »

Some code here - the others parts of the code is ok :

Code: Select all

;*******************************
;** AmigaOS/MUITextEdit.mcc   **
;** Suppression des codes ESC **
;*******************************

EnableExplicit

Global file.s, plaintext.s, line.s, i, n, c

If NumberOfCLIArgs() = 0
  file = FileRequester(0)
Else
  file = ProgramParameter() ; GetCLIArg()
EndIf

If file = ""
  PrintN("Argument missing")
  End
EndIf

If ReadFile(0, file)
  While Eof() = 0
    plaintext = ""
    line = ReadString()
    n = Len(line)
    i = 1
    While i <= n
      c = Asc(Mid(line, i, 1))
      If c = 27
        i + 1
        While i <= n
          c = Asc(Mid(line, i, 1))
          Select c
            Case 'b', 'i', 'n', 'u':
              i + 1
              Break
            Case 'p':
              While i <= n
                c = Asc(Mid(line, i, 1))
                i + 1
                If c = ']'
                  Break
                EndIf
              Wend
              Break
          EndSelect
        Wend
      Else
        plaintext + Chr(c)
        i + 1
      EndIf
    Wend
    PrintN(plaintext)
  Wend
  CloseFile(0)
Else
  PrintN("Can't open file")
EndIf
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Fred
Administrator
Administrator
Posts: 14287
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [AmigaOS] BUG GetCLIArg

Post by Fred »

The AmigaOS version is opensource, so we won't do any fix for it. You can take a look to the command to try to fix it :P
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Re: [AmigaOS] BUG GetCLIArg

Post by Flype »

Thank you for your very quick response Fred.

So it is OpenSource, That's is the good news but not the compiler if i remember well. For external libs it's OK i think...

i can try myself but it could take a while before i manage to fix my problem and make an environment for recompiling all the amiga stuff.

If i do that, may i bother you for future question related to the needed development env ?

Of course, I will try to not bother you with stupid questions.

Have a good day.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
xperience2003
Enthusiast
Enthusiast
Posts: 105
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

Re: [AmigaOS] BUG GetCLIArg

Post by xperience2003 »

Is it still possible to make bug reports for the lastest amiga version of purebasic
do it!
Post Reply