Page 1 of 1

[AmigaOS] BUG GetCLIArg

Posted: Fri May 09, 2014 9:45 am
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:

Re: [AmigaOS] BUG GetCLIArg

Posted: Fri May 09, 2014 9:47 am
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

Re: [AmigaOS] BUG GetCLIArg

Posted: Fri May 09, 2014 10:08 am
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

Re: [AmigaOS] BUG GetCLIArg

Posted: Fri May 09, 2014 10:32 am
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.

Re: [AmigaOS] BUG GetCLIArg

Posted: Thu Jun 25, 2015 2:10 am
by xperience2003
Is it still possible to make bug reports for the lastest amiga version of purebasic
do it!