Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 583 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Inserting data in the middle of a file [Re: Joey] #252705
02/19/09 20:40
02/19/09 20:40
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
yes you can, thats why I left the old code available in the spoiler at the bottom.
But I think the new code is fast enough that it will probably do fine anyway.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Inserting data in the middle of a file [Re: EvilSOB] #333752
07/18/10 20:01
07/18/10 20:01
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
hello,

I tested your code I get an error E1513 when copying the file in the function file_void_insert at the line memcpy( buffer1+bytepos , block, block_size); //copy across insert data

thankss you for your code !

Re: Inserting data in the middle of a file [Re: djfeeler] #333773
07/18/10 22:47
07/18/10 22:47
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I cant see a way for it to fail there.

Can you post the code (and a descritpion of the file & data) that killed it?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Inserting data in the middle of a file [Re: EvilSOB] #333795
07/19/10 05:00
07/19/10 05:00
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
hello,

here my code :

thanks in advance to say what's wrong !

Attached Files
test2.rar (41 downloads)
my code
Re: Inserting data in the middle of a file [Re: djfeeler] #333806
07/19/10 07:41
07/19/10 07:41
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
The crash is because you arent giving "file_str_insert" a string.
When you trying to call it like this
file_str_insert(RW_file,"A",1,1);
then you are only giving it a single byte of type "CHAR" when it needs a "STRING" type.

To achieve this simply, callthe function like so
file_str_insert(RW_file, _str("A") ,1,1);
will give the function a temporary string, which is good enough...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1