Page 2 of 6
Posted: Wed Mar 19, 2008 6:38 pm
by Progi1984
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
Posted: Wed Mar 19, 2008 9:41 pm
by ABBKlaus
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

Posted: Wed Mar 19, 2008 10:05 pm
by Progi1984
Have you an example code which doesn't run with my code ?
And have you tested my second fix ?
Posted: Wed Mar 19, 2008 10:38 pm
by ABBKlaus
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
Posted: Wed Mar 19, 2008 10:42 pm
by Progi1984
Yes some code here... :
http://www.purebasic.fr/english/viewtop ... 063#157063
For no parameters, I will test my code tomorrow... and i send you the Tailbite.pb fixed.
Posted: Wed Mar 19, 2008 10:54 pm
by ABBKlaus
Your sample code works fine here.
- All linked list entrys are shown
- Quickhelp looks good
Posted: Wed Mar 19, 2008 11:01 pm
by Progi1984
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
Posted: Wed Mar 19, 2008 11:25 pm
by ABBKlaus
works fine, except the
Ma0Fonction() 
Posted: Wed Mar 19, 2008 11:30 pm
by Progi1984
And with your last fix ?
Posted: Thu Mar 20, 2008 11:12 am
by Progi1984
I tested with your fix to my fix and my second fix for fast help and that runs well

Posted: Fri Mar 28, 2008 12:01 am
by Droopy
Hello,
Can TB return is version ?
( Like Pbcompiler.exe / version )
Posted: Fri Mar 28, 2008 12:27 am
by ABBKlaus
Droopy wrote:Hello,
Can TB return is version ?
( Like Pbcompiler.exe / version )
No.
Posted: Fri Mar 28, 2008 9:32 am
by Droopy
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())
Posted: Sat Mar 29, 2008 6:57 pm
by ABBKlaus
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
Posted: Sat Mar 29, 2008 7:07 pm
by Droopy
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())