Search found 9 matches

by cy-5
Mon Sep 14, 2009 7:28 am
Forum: Announcement
Topic: Linux/Windows Creator of Auto-Extractable archives
Replies: 1
Views: 2231

Re: Linux/Windows Creator of Auto-Extractable archives

I decided to upload it to my hotmail sky drive.

Here is the link to download both programs/source-code:
http://cid-9ef1547dfcc25191.skydrive.live.com/self.aspx/Shared%20Programs/PureAutoExt.zip

The package contains executable for both LINUX(PAXCreator,PAXExtractor) and WINDOWS(PAXCreator.Exe ...
by cy-5
Mon Sep 14, 2009 4:06 am
Forum: Announcement
Topic: Linux/Windows Creator of Auto-Extractable archives
Replies: 1
Views: 2231

Linux/Windows Creator of Auto-Extractable archives

Hi all! I've a program you'll find interresting. This program create auto-extractable archives using 32bit version of purebasic.
Truly is not only A PROGRAM but a suite. First you have a executable file that create the archives. Each archives are save with the ".pax" extension and include the ...
by cy-5
Sat Sep 12, 2009 2:34 pm
Forum: Coding Questions
Topic: ReadFile() never exit on locked files
Replies: 3
Views: 2358

Re: ReadFile() never exit on locked files

Permission on the file are, when seen from the file properties:
-Owner: Read and Write
-Group: No access(for each groups)
-Others: No access
-Not set has been executable file.

Also using GetFileAttributes() it gave: 448.

Hope this will be helpful.
by cy-5
Sat Sep 12, 2009 6:43 am
Forum: Coding Questions
Topic: ReadFile() never exit on locked files
Replies: 3
Views: 2358

ReadFile() never exit on locked files

It seems that ReadFile() never return when the file we want to open is locked. I'm using PB4.31(x86) version on Ubuntu 9.04.
I'll explain. I'm writing an application which read files and add them to another file. I've tried it on my "Desktop" directory and it works fine. But once I try it on my ...
by cy-5
Mon Aug 31, 2009 9:16 am
Forum: Tricks 'n' Tips
Topic: Scan a directory structure recursively without recursivity
Replies: 14
Views: 7260

I had difficulty to sleep so I decided to make a recursivity procedure wich don't use any loop. I've tried it by scanning my complete hard drive and all is fine. No stack overflow.



;Setup the os separator depending on the compiler OS.
Global GstrOSDirSep.s = ""
CompilerIf (#PB_Compiler_OS = #PB ...
by cy-5
Mon Aug 31, 2009 5:52 am
Forum: Tricks 'n' Tips
Topic: Scan a directory structure recursively without recursivity
Replies: 14
Views: 7260

I've just tried a recursive scan on linux and all is right. No stack overflow.
BTW there is really a memory leak.

Try running the following code on a LINUX machine. On my computer the system monitor display 2.6MB of memory at the end of the scan.

First I were thinking maybe it is the console that ...
by cy-5
Sun Aug 30, 2009 6:10 pm
Forum: Tricks 'n' Tips
Topic: Scan a directory structure recursively without recursivity
Replies: 14
Views: 7260

Hi all! Thanks for your replies. For those who wants to try it using windows you should note that the test at the end is with a linux path. Try changing the first parameter to "C:".

About the stack overflow I should say I got it with previous versions of PB. Don't remember which one. Never tried ...
by cy-5
Sun Aug 30, 2009 3:19 am
Forum: Tricks 'n' Tips
Topic: Scan a directory structure recursively without recursivity
Replies: 14
Views: 7260

What is the advantage of this over a recursive solution....?

To answer that I should say: no more stack overflow :)

Try making a normal recursive that scan a complete hard drive. You'll have a stack overflow. Especially on LINUX which have a lot sub-directories.

At first the algorithm was to ...
by cy-5
Sun Aug 30, 2009 2:33 am
Forum: Tricks 'n' Tips
Topic: Scan a directory structure recursively without recursivity
Replies: 14
Views: 7260

Scan a directory structure recursively without recursivity

I've just finished converting my delphi directory structure scan function.

Here is what it look like in PB. To be able to do this I add directories in a stack directory structure.

Here is the code:


;->Stack.pb

Structure TStackElement
*MptrData
*MptrNext.TStackElement
EndStructure

Structure ...