Progi1984 - Programs & Userlibs

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

@liverol : I know, i work on... But I have a lot of work... and that's not my full time job... unfortunately

@srod : Thanks !
Where do you see that is an unicode string for this function ?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Progi1984 wrote:@srod : Thanks !
Where do you see that is an unicode string for this function ?
In the RW_FreeImage_Inc.pb file you have the lines :

Code: Select all

  CompilerIf #PB_Compiler_Unicode = #False
    FreeImage_Save(fif.l,dib.l,filename.p-ascii,flags.l=0) As "_FreeImage_Save@16" ; dib = *ptr.FIBITMAP ; filename = @ptr.s
  CompilerElse
    FreeImage_Save(fif.l,dib.l,filename.P-ASCII,flags.l=0) As "_FreeImage_SaveU@16" ; dib = *ptr.FIBITMAP ; filename = @ptrUnicode.s
  CompilerEndIf
when it should be :

Code: Select all

  CompilerIf #PB_Compiler_Unicode = #False
    FreeImage_Save(fif.l,dib.l,filename.p-ascii,flags.l=0) As "_FreeImage_Save@16" ; dib = *ptr.FIBITMAP ; filename = @ptr.s
  CompilerElse
    FreeImage_Save(fif.l,dib.l,filename.P-UNICODE,flags.l=0) As "_FreeImage_SaveU@16" ; dib = *ptr.FIBITMAP ; filename = @ptrUnicode.s
  CompilerEndIf
To be honest though you don't need pseudotypes at all with the import section of this wrapper because you have the different versions of the functions already imported. I would remove the pseudotypes completely from the import section if I were you. :)
Last edited by srod on Tue May 06, 2008 12:28 pm, edited 1 time in total.
I may look like a mule, but I'm not a complete ass.
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Post by Kiffi »

@Progi1984: Great job! :D

Thanks & Greetings ... Kiffi
Hygge
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

@srod : Since I use CompilerIf, I don't need of pseudo types... And I can simply use .s (strings). Thanks for this remark, srod, as usually.

@Kiffi : Thanks
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Progi1984 wrote:@srod : Since I use CompilerIf, I don't need of pseudo types... And I can simply use .s (strings).
Exactly. :)
I may look like a mule, but I'm not a complete ass.
KoopaOne
New User
New User
Posts: 9
Joined: Thu May 08, 2008 3:04 pm

Post by KoopaOne »

Maybe someone can help with libCurl. The Problem is, it doesn't save anything and i don't get any responst from the lib ...

Code: Select all

    
Procedure curl_file_save(get_linkname$,get_link$, get_referrer$)
  ;MessageRequester("Requster",get_linkname$+Chr(13)+get_link$+Chr(13)+get_referrer$)
      curl = curl_easy_init()
      If curl
        curl_easy_setopt(curl, CURLOPT_URL, @get_link$)
        curl_easy_setopt(curl, CURLOPT_REFERER, @get_referrer$)
        curl_easy_setopt(curl, CURLOPT_COOKIEFILE, @"cookie.txt")
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, @get_linkname$)
        curl_easy_perform(curl)
        curl_easy_cleanup(curl)
      EndIf
    EndProcedure
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Can you test this, please ?

Code: Select all

Procedure curl_file_save(get_linkname$,get_link$, get_referrer$)
  Protected cookie_content.s, cookie_file.l, cookie_buffer.l
  
  ;MessageRequester("Requster",get_linkname$+Chr(13)+get_link$+Chr(13)+get_referrer$)
  curl = curl_easy_init()
  If curl
    cookie_file = OpenFile(#PB_Any, "cookie.txt")
    cookie_buffer = AllocateMemory(Lof(cookie_file))
    ReadData(cookie_file, cookie_buffer,Lof(cookie_file))
    cookie_content = PeekS(cookie_buffer, Lof(cookie_file))
    CloseFile(cookie_file)
    curl_easy_setopt(curl, CURLOPT_URL, @get_link$)
    curl_easy_setopt(curl, CURLOPT_REFERER, @get_referrer$)
    curl_easy_setopt(curl, CURLOPT_COOKIEFILE, @cookie_content)
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, @get_linkname$)
    curl_easy_perform(curl)
    curl_easy_cleanup(curl)
  EndIf
EndProcedure
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

I suggest that your libs gets listed on purearea.net i was looking for them at that web.

Thanks for your great job!
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Noted but not for now !

A lot of work and liverol which waits for me :S
liverol
User
User
Posts: 26
Joined: Sat Jul 14, 2007 3:21 am

Post by liverol »

Progi1984 wrote:Noted but not for now !

A lot of work and liverol which waits for me :S
Thanks for remembering my quest,
appreciate,you almost moved me to tears :")

actually i am writting a script editor for my new game editor,
i am keen on game graphic programming rather than winAPI,
the editor lib will be a great help!!!
thanks for the great work,again!!!

My game editor:
Image

you can write script with notepad now,better using a script editor with
syntax highlighting!!
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Promised, I don't forget you ... but i have a work and a house ! :P
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Progi1984 wrote: RWid3Lib.zip
Image
Size : 479Ko

Code: Select all

Wrapper for id3Lib ( http://id3lib.sourceforge.net/ )
Im testing it in PB 4.10 and the examples dont run fine. :(
Sample01 stops after ID3Tag_Update(*mp3).

Can you help me? :)

*Tested with PB4.20 BETA and same failure

(Im not testing with the samples provided in the example but with some mp3s i have here)
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Release of June 2008 :
RJSON.zip
Image
Size : 22Ko

Code: Select all

This userlib permits you to parse JSON files et return you a XML tree in PureBasic format.
RLog.zip
Image
Size : 31Ko

Code: Select all

This userlib permits you to create logfiles in a better way.
Annonce :
Normally, at Release of July 2008, I will release LibPlus, with management of syntax hilighting for EditorGadget.
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Release of July 2008 :
RLibPlus.zip
Image
Size : 360Ko

Code: Select all

The old name for this userlib is LibEditorPlus. This userlib has been upgraded et is applied in others gadgets.

Code: Select all

Changelog : 0.1.1 : Support of syntax highlighting
Happy gift, liverol :)

News : no release in august, the next release will be in september
liverol
User
User
Posts: 26
Joined: Sat Jul 14, 2007 3:21 am

Post by liverol »

yeah,that's really a gift!!!
:D
Be honest, i want to give you a kiss!!

----------------------------------------------
hi, i got some errors here:
(using pb4.10)

seems that all the constants are lost(also can't find in the pb structure viewer)!!
here is the error info:

line 14 constant can't found "#Editor_SH_Property_Constant"...
Post Reply