TailBite 1.0 Preview, soon in PureProject and PureArea

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

And where's the rest of it? :?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Ah. Thanks, I just saw half a proc there and thought there should be more.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post 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
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Thank you Klaus,

I've compiled TailBite with your changes. 8)

Regards Falko
Last edited by Falko on Sat Nov 11, 2006 10:10 pm, edited 1 time in total.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post 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
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

the extensions by gnozal included?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@ts-soft : do you mean this post http://www.purebasic.fr/english/viewtop ... &start=390

can you supply these changes :?:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post 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.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post 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
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post 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
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post 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
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

Update is up and running :o : TailBite V1.3PR1.8c http://www.purebasicpower.de/?download= ... taller.exe
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Tailbite seriously kicks butt. Good to see someone is maintaining this product while the Owner is MIA. (Just like jaPBe) :)
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post 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:\")
Post Reply