flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > porting fasm: fileresize

Author
Thread Post new topic Reply to topic
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
I´m porting the clib version of fasm to my Os ,and i have one problem:
If the output file already exists and is bigger than the new version, the new file should be truncated, but i don´t know if the file must be truncated when the file is closed or if the filesize must be set to 0 after
the open call.
Also the output file is opened in mode 'w ' wich from a old 'C' manual
i have this means open a txt file for write , why not use mode 'wb ' instead.
Post 03 Apr 2006, 15:48
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
The "create" call should truncate the file on opening it. The "open" is used only for reading files.
Post 03 Apr 2006, 16:55
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.