Re: cutting file by fwrite() EOF ?
From: Måns Rullgård (mru_at_mru.ath.cx)
Date: 09/28/04
- Next message: Lew Pitcher: "Re: How can I run server and client applications in two different computers?"
- Previous message: vertigo: "cutting file by fwrite() EOF ?"
- In reply to: vertigo: "cutting file by fwrite() EOF ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 13:59:51 +0200
vertigo <ax178@wp.pl> writes:
> Hello
> I wanted to cut file, so i:
>
> int *data=(int*)malloc(sizeof(int));
> data[0]=EOF;
> fseek(file,new_size,SEEK_SET);
> fwrite((void*)data,sizeof(int),1,file);
>
> but this does not work. Why ? How can i cut file ?
man truncate
man ftruncate
-- Måns Rullgård mru@mru.ath.cx
- Next message: Lew Pitcher: "Re: How can I run server and client applications in two different computers?"
- Previous message: vertigo: "cutting file by fwrite() EOF ?"
- In reply to: vertigo: "cutting file by fwrite() EOF ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|