Page 30 of 40

Posted: Sat Nov 11, 2006 8:51 am
by netmaestro
And where's the rest of it? :?

Posted: Sat Nov 11, 2006 8:53 am
by gnozal
netmaestro wrote:And where's the rest of it? :?
He's modifying the procedure SplitFunctions() in Tailbite.pb (you need the tailbite sources for the rest).

Posted: Sat Nov 11, 2006 8:55 am
by netmaestro
Ah. Thanks, I just saw half a proc there and thought there should be more.

Posted: Sat Nov 11, 2006 9:00 pm
by ABBKlaus
ok for the experts :

since PB4.01 fred has changed something that tailbite dislike.
heres the header of a compiled snipped (only a part of it)

Code: Select all

; 
; PureBasic v4.01 (Windows - x86) generated code
; 
; © 2006 Fantaisie Software
; 
; The header must remain intact for Re-Assembly
; 
; Window
; Gadget
; String
; StringExtension
; Misc2
; MemoryExtension
; Memory
; LinkedList
; LinkedListExtension
; Library
; Image
; ImagePlugin
; Font
; FileSystem
; File
; Date
; 2DDrawing
; Object
; SimpleList
; :System
; COMDLG32
; GDI32
; KERNEL32
; USER32
; WINSPOOL
; 
format MS COFF
now tailbite in the current version compiles ok but when i start purebasic again and want to compile with the new lib i get this error (same as Falko´s) :
---------------------------
PureBasic - Error
---------------------------
Error: The following PureLibrary is missing: :System
---------------------------
OK
---------------------------
and i made some changes to the TailBite.pb sources just like you wrote Gnozal, the SplitFunctions procedure. (See my post above)
Now the enumeration breaks exactly when the
; :System
part is reached.

I hope i made it clearer now :roll:

Regards Klaus

Posted: Sat Nov 11, 2006 9:43 pm
by Falko
Thank you Klaus,

I've compiled TailBite with your changes. 8)

Regards Falko

Posted: Sat Nov 11, 2006 10:04 pm
by ABBKlaus
For the ones willing to test the new Tailbite version heres the link :
V1.3PR1.8b
http://www.purebasicpower.de/?download= ... taller.exe

Posted: Sat Nov 11, 2006 10:33 pm
by ts-soft
the extensions by gnozal included?

Posted: Sat Nov 11, 2006 11:03 pm
by ABBKlaus
@ts-soft : do you mean this post http://www.purebasic.fr/english/viewtop ... &start=390

can you supply these changes :?:

Posted: Sat Nov 11, 2006 11:10 pm
by ts-soft
ABBKlaus wrote:@ts-soft : do you mean this post http://www.purebasic.fr/english/viewtop ... &start=390

can you supply these changes :?:
yes, this is required by some libs for unicode and threadsafe libs.
I use the changed version by gnozal, but i can't found the right link here.

Posted: Sat Nov 11, 2006 11:39 pm
by Falko
You mean this?
in Line 99 of TailBite.pb wrote:ForEach Parameter()
Select UCase(Left(Parameter(), 5))
Case "/THRD" ; Wish from gnozal
UseThreadOption = 1

Case "/ASKD"
AskDelete = 1
Case "/DONT"
DontMakeLib = 1
Case "/KEEP"
KeepSrcFiles = 1
Case "/QUIE"
QuietMode = 1
Case "/WRIT"
WriteBatch = 1
Case "/HELP"
OpenHelp(PBFolder$+"Help\TailBite.chm", "Reference")
End
Case "/HWND"
hParent = Val(Right(Parameter(), Len(Parameter())-6))
Case "/CHM:"
SetChmName = 1
ChmName$ = Right(Parameter(), Len(Parameter())-5)
EndSelect
Next
And Unicode??

You can edit this code in 'TailBit.pb' and than load and compile
'TailBite Installer Build.pb'. This is all 8)



Regards Falko

Posted: Sat Nov 11, 2006 11:49 pm
by ts-soft
No, a bit more changes, but i can't find the link. The modified sources a here:
http://ts-soft.eu/dl/modifiedsources.zip

Posted: Sun Nov 12, 2006 12:45 am
by Falko
Hi Thomas,
thanks for the modified sources. I've include and compiled this to TailBit.
The EMail to you is sending. Please test it.


Regards Falko

Posted: Sun Nov 12, 2006 12:51 am
by ABBKlaus
Update is up and running :o : TailBite V1.3PR1.8c http://www.purebasicpower.de/?download= ... taller.exe

Posted: Sun Nov 12, 2006 1:07 am
by Shannara
Tailbite seriously kicks butt. Good to see someone is maintaining this product while the Owner is MIA. (Just like jaPBe) :)

Posted: Sun Nov 12, 2006 1:09 am
by Droopy
@ABBKlaus : Can you try this ?

Code: Select all

;/ PureBasic 4.0 / Droopy 06/11/06 

;/ Oublié que ProcedureDLL.l --> Le .l foutait la merde
;/ Pas pensé que passage d'un pointeur foutait la merde (*toto)
;/ Gestion des paramètres optionnels si précédés de paramètres non optionnels

;{/ Enumerations 

Enumeration ;/ Zone Fichier 
  #Read 
  #Write 
  #DebutZone 
  #DansZone 
  #FinZone 
  #HorsZone 
EndEnumeration 

Enumeration ;/ Zone de Procédure 
  #Inconnu 
  #Variable 
  #Valeur 
  #Commentaires 
EndEnumeration 

;} 

Structure DetailProcedure 
  Optionnel.l 
  NomVariable.s 
  Valeur.s 
EndStructure 

Global NewList Proc.DetailProcedure(), ContenuProcedure.s 

Procedure InsertionTBProcedure(Ligne.s) 
  
  ClearList(Proc()) 
  
  ;/ Mise en forme de la ligne 
  Ligne=LTrim(RTrim(Ligne)) 
  
  ;/ Extraction du Nom de la procedure 
  NomProcedure.s=StringField(Ligne,2," ") 
  NomProcedure=LTrim(RTrim(StringField(NomProcedure,1,"("))) 
  
  ;/ Regarde si .? est indiqué après ProcedureDLL et si oui le mémorise dans une variable temporaire
  If Mid(Ligne,13,1)="."
    Type.s=Mid(Ligne,13,2)
  Else
    Type=""
  EndIf
  
  ;/ Garde juste les paramètres 
  Ligne.s=Right(Ligne,Len(Ligne)-14-Len(NomProcedure)-Len(Type))
  Ligne.s=LTrim(RTrim(Ligne)) 
  
  Zone=#Inconnu 
  For n=1 To Len(Ligne) 
    
    c.s=Mid(Ligne,n,1) 
    a=Asc(c) 
    
    Select Zone 
      
      Case #Inconnu 
        If (a>64 And a<91) Or (a>96 And a<123) Or a=42 ;/ C'est un nom de variable ou *
          AddElement(Proc()) 
          Proc()\NomVariable+c 
          Zone=#Variable 
        ElseIf c=")" 
          Zone=#Commentaires 
        EndIf 
        
      Case #Variable 
        Select c 
          Case ")" 
            Zone=#Commentaires 
          Case "," 
            Zone=#Inconnu 
          Case " " 
            
          Case "=" 
            NbParaOptionnels+1 
            Proc()\Optionnel=1 
            Zone=#Valeur 
            
          Default 
            Proc()\NomVariable+c 
        EndSelect 
        
        
      Case #Valeur 
        
        If a=34 ;/ Détermine si je rentre ou sort d'une zone de guillemet 
          If ZoneGuillemet=1 
            ZoneGuillemet=0 
          Else 
            ZoneGuillemet=1 
          EndIf 
        EndIf 
        
        If ZoneGuillemet=1 
          Proc()\Valeur+c 
        Else 
          Select c  
            Case "," 
              Zone=#Inconnu 
              
            Case ")" 
              Zone=#Commentaires 
              
            Default 
              Proc()\Valeur+c 
              
          EndSelect 
        EndIf 
        
      Case #Commentaires 
        Commentaires.s+c 
        
    EndSelect 
  Next 
  
  
  Commentaires=LTrim(RTrim(Commentaires)) 
  Commentaires=LTrim(Right(Commentaires,Len(Commentaires)-1)) 
  
  If NbParaOptionnels 
    ;- Il y a des paramètres optionnels 
    
    ; Ecriture de la déclaration 
    Temp.s="Declare"+ Type+" "+NomProcedure+Str(NbParaOptionnels+1)+"(" 
    ForEach Proc() 
      Temp+Proc()\NomVariable 
      
      If ListIndex(Proc())<CountList(Proc())-1 
        Temp+"," ; Ajoute une virgule uniquement si necessaire entre chaque variable 
      EndIf 
    Next 
    Temp+")" 
    WriteStringN(#Write,Temp) 
    
    For n= 0 To NbParaOptionnels 
      
      ; Ecrit le nom de la procédure 
      Temp.s=#crlf$+"ProcedureDLL"+Type+" "+NomProcedure 
      
      ; Ecriture du N° de la procédure 
      If n 
        Temp+Str(n+1) 
      EndIf 
      Temp+ "(" 
      
      ; Ecrit juste les paramètres necessaires de la procédure
      For i= 0 To CountList(Proc())-NbParaOptionnels+n-1
        
        SelectElement(Proc(),i)
        Temp+Proc()\NomVariable 
        
        If i<CountList(Proc())-NbParaOptionnels+n-1
          Temp+"," ; Ajoute une virgule uniquement si necessaire entre chaque variable 
        EndIf 
        
      Next 
      
      ; Finalise la ligne de ProcedureDLL en y ajoutant les commentaires 
      Temp+")" 
      If Commentaires<>"" 
        Temp+" ; "+Commentaires 
      EndIf 
      
      WriteStringN(#Write,Temp) 
      If n=NbParaOptionnels 
        ; Ecriture du contenu de la procédure 
        WriteStringN(#Write,ContenuProcedure) 
      Else 
        ; Ecriture de l'appel à la procédure principale 
        Temp2.s="  "+NomProcedure+Str(NbParaOptionnels+1)+"(" 
        
        ForEach Proc() 
          
          If ListIndex(Proc())> n+CountList(Proc())-NbParaOptionnels-1
            Temp2+Proc()\Valeur 
          Else 
            Temp2+Proc()\NomVariable 
          EndIf 
          
          If ListIndex(Proc())<CountList(Proc())-1 
            Temp2+"," ; Ajoute une virgule uniquement si necessaire entre chaque variable 
          EndIf 
        Next 
        Temp2+")" 
          
        WriteStringN(#Write,Temp2) 
        WriteStringN(#Write,"EndProcedure") 
      EndIf 
      
    Next 
    
    
  Else 
    ;- Aucun paramètre optionnels 
    
    Temp.s="ProcedureDLL"+Type+" "+NomProcedure+"(" 
    ForEach Proc() 

      Temp+Proc()\NomVariable 
      If ListIndex(Proc())<CountList(Proc())-1 
        Temp+"," ; Ajoute une virgule uniquement si necessaire entre chaque variable 
      EndIf 
    Next 
    
    Temp+")" 
    If Commentaires<>"" 
      Temp+" ; "+Commentaires 
    EndIf 
    
    WriteStringN(#Write,Temp) 
    WriteStringN(#Write,ContenuProcedure) 
    
  EndIf 
  
EndProcedure 

Procedure TBOP(FileIn.s,FileOut.s,TailbitePath.s,Compile) 
  
  ;{/ Boucle de lecture du fichier en entrée / Génération du fichier de sortie 
  
  CreateFile(#Write,FileOut) 
  If ReadFile(#Read,FileIn)=0 
    End 
  EndIf 
  
  ZoneFichier=#HorsZone 
  
  While Eof(#Read)=0 
    
    Ligne.s=ReadString(#Read) 
    Temp.s=UCase(LTrim(Ligne)) 
    
    If Left(Temp,12)="PROCEDUREDLL" 
      ZoneFichier=#DebutZone 
      LigneProcedure.s=Ligne 
    ElseIf Left(Temp,12)="ENDPROCEDURE" And (ZoneFichier=#DebutZone Or ZoneFichier=#DansZone) 
      ZoneFichier=#FinZone 
    EndIf 
    
    Select ZoneFichier 
      Case #HorsZone 
        WriteStringN(#Write,Ligne) 
        
      Case #DebutZone 
        ZoneFichier=#DansZone 
        ContenuProcedure.s="" 
        
      Case #DansZone 
        If ContenuProcedure="" 
          ContenuProcedure.s+Ligne 
        Else 
          ContenuProcedure.s+#crlf$+ Ligne 
        EndIf 
        
      Case #FinZone 
        ZoneFichier=#HorsZone 
        ContenuProcedure+#crlf$+Ligne 
        InsertionTBProcedure(LigneProcedure) 
        
    EndSelect 
    
  Wend 
  ;} 
  
  CloseFile(#Read) 
  CloseFile(#Write) 
  
  If Compile 
    RunProgram("TailBite.exe",FileOut,TailbitePath) 
  EndIf 
  
EndProcedure 

; TBOP("c:\Printer_Lib.pb","c:\afficheTBOP.txt","c:\Program Files\PureBasic4\TailBite",#True) 
; RunProgram("c:\afficheTBOP.txt","","c:\")