TailBite specific forum
Moderators: gnozal , ABBKlaus , lexvictory
Progi1984
Addict
Posts: 806 Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:
Post
by Progi1984 » Wed Mar 19, 2008 6:38 pm
03/19/08 17:25
Fix #1 : Ok !
[EDIT] 03/19/08 17:59
Fix #2 & #3 :
Replace lines 604 To 619 by these lines.
Code: Select all
BetweenBrackets$ = Mid(function()\HelpLine$, 1, Len(function()\HelpLine$) - Len(StringField(function()\HelpLine$,CountString(function()\HelpLine$, ")")+1,")")))
StringField(function()\HelpLine$,1,")")
AfterBrackets$ = Right(function()\HelpLine$, Len(function()\HelpLine$) - Len(BetweenBrackets$))
count = CountString(BetweenBrackets$,",")
If count
BetweenBrackets$ = Mid(BetweenBrackets$, 2, Len(BetweenBrackets$)-2)
newHelpLine$ = ""
For i= 1 To count+1
temp$ = StringField(BetweenBrackets$,i,",")
If i = (count+1)
newHelpLine$ + Trim(temp$)
Else
newHelpLine$ + Trim(temp$)+", "
EndIf
Next
function()\HelpLine$="("+BetweenBrackets$+")"+AfterBrackets$
EndIf
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Wed Mar 19, 2008 9:41 pm
Your fix #1 did not work
Here´s the fix of the fix :
Code: Select all
QuitBrackers = 0
While *FileSeeker\b<>')' Or QuitBrackers<>0
If *FileSeeker\b = '(' : QuitBrackers + 1 : EndIf
If *FileSeeker\b = ')' : QuitBrackers - 1 : EndIf
*FileSeeker+1
If *FileSeeker>=FileEnd:TBError(Language("TailBite","FileEndErr3"), 1, ""):EndIf
Wend
Please test it
Progi1984
Addict
Posts: 806 Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:
Post
by Progi1984 » Wed Mar 19, 2008 10:05 pm
Have you an example code which doesn't run with my code ?
And have you tested my second fix ?
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Wed Mar 19, 2008 10:38 pm
Progi1984 wrote: Have you an example code which doesn't run with my code ?
I have tested your modifications with my RMChart lib.
Functions that have no Parameters i.e.
ProcedureDLL RMC_Init() where read past its endbracket :
Code: Select all
; ProcedureDLL RMC_Init()
macro MP376{
_Procedure376:
PS376=16
XOR eax,eax
PUSH eax
PUSH eax
PUSH eax
; Protected *MSGText.s
; Protected Text$
; Protected Version$
;
; RMC_DLL.l = OpenLibrary(#PB_Any,#RMCDLL)
Remember : the function begins after the first bracket
; ProcedureDLL RMC_Init(
Progi1984 wrote: And have you tested my second fix ?
I did only test with RMChart, i have no userlib that has a linked list inside. Could you provide one
Regards Klaus
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Wed Mar 19, 2008 10:54 pm
Your sample code works fine here.
- All linked list entrys are shown
- Quickhelp looks good
Progi1984
Addict
Posts: 806 Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:
Post
by Progi1984 » Wed Mar 19, 2008 11:01 pm
Test with this code :
Code: Select all
ProcedureDLL Ma0Fonction()
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
EndProcedure
ProcedureDLL Ma1Fonction(Param.s())
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
EndProcedure
ProcedureDLL Ma2Fonction(truc.l, Param.s())
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
EndProcedure
ProcedureDLL Ma3Fonction(truc.l, Param.s(), Param2.l())
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
EndProcedure
ProcedureDLL Ma4Fonction(truc.l, Param.s(), Param2.l()) ; Test
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
ForEach Param2()
MessageRequester("", Str(Param2()))
Next
EndProcedure
ProcedureDLL Ma5Fonction(truc.l, Param.s(), Param2.Point()) ; Test Num 5
Debug truc
ForEach Param()
MessageRequester("", Param())
Next
ForEach Param2()
MessageRequester("", "X >"+ Str(Param2()\x)+ " - Y >"+ Str(Param2()\y))
Next
EndProcedure
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Wed Mar 19, 2008 11:25 pm
works fine, except the
Ma0Fonction()
Progi1984
Addict
Posts: 806 Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:
Post
by Progi1984 » Wed Mar 19, 2008 11:30 pm
And with your last fix ?
Progi1984
Addict
Posts: 806 Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:
Post
by Progi1984 » Thu Mar 20, 2008 11:12 am
I tested with your fix to my fix and my second fix for fast help and that runs well
Droopy
Enthusiast
Posts: 658 Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:
Post
by Droopy » Fri Mar 28, 2008 12:01 am
Hello,
Can TB return is version ?
( Like Pbcompiler.exe / version )
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Fri Mar 28, 2008 12:27 am
Droopy wrote: Hello,
Can TB return is version ?
( Like Pbcompiler.exe / version )
No.
Droopy
Enthusiast
Posts: 658 Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:
Post
by Droopy » Fri Mar 28, 2008 9:32 am
Ok i find a way
Code: Select all
Procedure.s TB_Version()
If OSVersion()>=#PB_OS_Windows_Vista
subkey.s="PureBasic.exe\DefaultIcon\"
Else
subkey.s="Applications\PureBasic.exe\DefaultIcon\"
EndIf
RegOpenKeyEx_(#HKEY_CLASSES_ROOT,@subkey,0,#KEY_READ,@keyhandle)
Out.s=Space(255)
DataSize.l=Len(Out)
RegQueryValueEx_(keyhandle,@name$,0,@Type,@Out,@DataSize)
RegCloseKey_(keyhandle)
Out=StringField(Out,1,",")
Out=GetPathPart(Out)+"TailBite\TailBite.exe"
#Chaine="Version ="
Size=FileSize(Out)
*Buffer=AllocateMemory(Size)
TBid=ReadFile(#PB_Any,Out)
ReadData(TBid,*Buffer,Size)
CloseFile(TBid)
While Ptr<Size
Chaine.s=PeekS(*Buffer+Ptr,Size)
If FindString(Chaine,#Chaine,1)
Pos=FindString(Chaine,#Chaine,1)
Chaine=LTrim(RTrim(Mid(Chaine,Pos+Len(#Chaine),Size)))
Break
EndIf
If Len(Chaine)
Ptr+Len(Chaine)
Else
Ptr+1
EndIf
Wend
FreeMemory(*Buffer)
ProcedureReturn Chaine
EndProcedure
MessageRequester("TB-Version",TB_Version())
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Sat Mar 29, 2008 6:57 pm
Droopy wrote: Ok i find a way
wait a minute, here it is :
TailBite V1.3 PR 1.871
[33] MAR 29th 2008 TailBite v1.3 PR 1.871
- added new parameter /VERSION (requested by Droopy)
- fixed recovery of userlib when compiling in unicode and/or threadsafe mode
- improved writelog procedure
- fixed cleaning of temp directory
- added explanation of subsystems to the helpfile
See first post for more details
Droopy
Enthusiast
Posts: 658 Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:
Post
by Droopy » Sat Mar 29, 2008 7:07 pm
Thanks a lot ABBKlaus
Code: Select all
;/ PureBasic 4.10
Procedure.s TBVersion() ; Lance TB /VERSION
If OSVersion()>=#PB_OS_Windows_Vista
subkey.s="PureBasic.exe\DefaultIcon\"
Else
subkey.s="Applications\PureBasic.exe\DefaultIcon\"
EndIf
RegOpenKeyEx_(#HKEY_CLASSES_ROOT,@subkey,0,#KEY_READ,@keyhandle)
Out.s=Space(255)
DataSize.l=Len(Out)
RegQueryValueEx_(keyhandle,@name$,0,@Type,@Out,@DataSize)
RegCloseKey_(keyhandle)
Out=StringField(Out,1,",")
Out=GetPathPart(Out)+"TailBite\TailBite.exe"
pid=RunProgram(Out,"/version","",#PB_Program_Open|#PB_Program_Read|#PB_Program_Hide)
If pid
While ProgramRunning(pid)
Sortie.s + ReadProgramString(pid) + #crlf$
Wend
EndIf
Sortie=StringField(Sortie,1,Chr(13))
ProcedureReturn Sortie
EndProcedure
Procedure.s PBVersion() ; Lance PB /VERSION
If OSVersion()>=#PB_OS_Windows_Vista
subkey.s="PureBasic.exe\DefaultIcon\"
Else
subkey.s="Applications\PureBasic.exe\DefaultIcon\"
EndIf
RegOpenKeyEx_(#HKEY_CLASSES_ROOT,@subkey,0,#KEY_READ,@keyhandle)
Out.s=Space(255)
DataSize.l=Len(Out)
RegQueryValueEx_(keyhandle,@name$,0,@Type,@Out,@DataSize)
RegCloseKey_(keyhandle)
Out=StringField(Out,1,",")
Out=GetPathPart(Out)+"Compilers\PBCompiler.exe"
pid=RunProgram(Out,"/version","",#PB_Program_Open|#PB_Program_Read|#PB_Program_Hide)
If pid
While ProgramRunning(pid)
Sortie.s + ReadProgramString(pid) + #crlf$
Wend
EndIf
Sortie=StringField(Sortie,1,Chr(13))
ProcedureReturn Sortie
EndProcedure
MessageRequester("Version","PureBasic : "+PBVersion()+#crlf$+"Tailbite : "+TBVersion())