Displaying 20 results from an estimated 107 matches for "ftell".
Did you mean:
tell
2002 Aug 07
2
ftell and fseek
Hi,
I'm stumped. How can I do ftell and fseek in R? (Where ftell gives the
position in the file and fseek points the file pointer to a given position.)
Thanks,
Pauline
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send &qu...
2004 Sep 28
2
Finding start of audio data using metadata level 2 interface.
...o. but just writing skipping code is
>pretty simple:
>
>is_last=0
>read 'fLaC' string
>while (!is_last) {
> read 1 byte metadata block type
> read 3 byte metadata block length
> is_last = type & 0x80
> fseek(file,length,SEEK_CUR)
>}
>last_offset=ftell(file)
>
>see also:
> http://flac.sourceforge.net/format.html#metadata_block_header
>'length' is big-endian
Should type be of FLAC__byte, and length of FLAC__uint32? I'm not having much
luck here.. (not a C programmer by nature).
-D
--
This movie has warped my fragile li...
2013 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
...*f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.virtual_sz = sizeof(c_rel);
- r_sec.virtual_address = ftell(f) + sizeof(r_sec);
- r_sec.raw_data_sz = r_sec.virtual_sz;
- r_sec.raw_data = r_sec.virtual_address;
- r_sec.characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA |
- IMAGE_SCN_ALIGN_1BYTES | IMAGE_SCN_MEM_DISCARDABLE |
- IMAGE_SCN_MEM_READ;
- fwrite(&r_sec, sizeof(r_sec), 1, f);
-
- memset(&...
2004 May 23
4
Various Ogg Vorbis largefile notes and/or patches
Greetings one and all;
I'm not subscribed to this list so I'm first sending this message
to verify that mails from me make it through, and then later I'll
send the juicy messages with patches. Also, the address I'm using
is IPv6-only and doesn't often work, so drop me from any replies
and I'll catch the archives, or drop only the hostname part to get
an IPv4 address that
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
...*f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.virtual_sz = sizeof(c_rel);
- r_sec.virtual_address = ftell(f) + sizeof(r_sec);
- r_sec.raw_data_sz = r_sec.virtual_sz;
- r_sec.raw_data = r_sec.virtual_address;
- r_sec.characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA |
- IMAGE_SCN_ALIGN_1BYTES | IMAGE_SCN_MEM_DISCARDABLE |
- IMAGE_SCN_MEM_READ;
- fwrite(&r_sec, sizeof(r_sec), 1, f);
-
- memset(&...
2008 Mar 29
1
A patch for extending pdf device to embed popup text and web links
...e(pd->pageobj); PDF_free_annots(pd); free(pd);
return 0;
}
***************
*** 6336,6341 ****
--- 6368,6374 ----
static void PDF_endpage(PDFDesc *pd)
{
int here;
+ int i;
if(pd->inText) textoff(pd);
fprintf(pd->pdffp, "Q\n");
here = (int) ftell(pd->pdffp);
***************
*** 6343,6348 ****
--- 6376,6397 ----
pd->pos[++pd->nobjs] = (int) ftell(pd->pdffp);
fprintf(pd->pdffp, "%d 0 obj\n%d\nendobj\n", pd->nobjs,
here - pd->startstream);
+ pd->pos[++pd->nobjs] = (int) ftell(pd->p...
2004 Sep 06
1
Fixing libvorbisfile to handle largefiles
...of _seek_helper,
and I'm not sure it's correct. _seek_helper is declared
static (which I also changed for my convenience to match
the above), and is not available to be used elsewhere.
However, in the process of building `ogg123', I found that
I needed to replace references to fseek()/ftell() with
something comparable to the above -- otherwise I'd need to
duplicate the below in order to use the proper function.
It may be that the above should not be available to be used
elsewhere, in which case the above should be `static' and
I'll need to work on later hacks.
Come to thi...
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
...clearly not used within
libguestfs (library, daemon, and C tools). Among directly and
indirectly modules used previous (and now no more), they are:
cycle-check
d-ino
dev-ino
dup3
dup3-tests
fcntl-safer
fcntl-safer-tests
fdopendir
fdopendir-tests
filevercmp
filevercmp-tests
ftell
ftell-tests
ftello
ftello-tests
fts
getaddrinfo
getaddrinfo-tests
getcwd
getcwd-tests
gnu-make
hostent
i-ring
i-ring-tests
iconv
iconv-tests
inet_ntop
inet_ntop-tests
isatty
isatty-tests
openat-safer
openat-safer-tests
opendirat
ptsname_r
ptsname_r-test...
2004 Sep 26
2
Finding start of audio data using metadata level 2 interface.
* Josh Coalson <xflac@yahoo.com> shaped the electrons to say...
>not exactly. the metadata interface won't tell you, but you
>can create a decoder (say file decoder), set it up, then call
>
> FLAC__file_decoder_process_until_end_of_metadata(...)
> FLAC__file_decoder_get_decode_position(...)
>
>and that will tell you. the decode position is relative to
>the
2013 Mar 04
2
2GB limit patch
On 04-03-13 23:19, Erik de Castro Lopo wrote:
> Link please?
http://www.hydrogenaudio.org/forums/index.php?showtopic=99757
> Err, thats a link to a post talking about flac's WAV reader being limited
> to 4Gig files. Problem is, *all* WAV files greater than 4Gig are mal-formed.
> Due to limitations in the way WAV files are specified, no valid WAV file
> can ever be over 4Gig.
2013 Nov 27
20
[PATCH 0/4] efi: PE header generation fix
The PE headers of the generated efi file were quite buggy. And since OVMF
perform a few consistency checks, syslinux was unable to run on it. I don't
pretend to have a thorough understanding of the PE+ headers, some bugs may
remain. :)
Celelibi (4):
efi: Fix PE header field rva_and_sizes_nr
efi: Location, size and alignment of .text section
efi: Useless relocations in PE file
efi: PE
2000 Apr 20
3
Thoughts on vorbisfile
...opy/pasting it into another program, seems to
rather wasteful, and vorbisfile does everything that a decoder needs.
More than 95% of the vorbisfile code doesn't actually care about the
underlying data source, however. Looking through it, we see a total of 4
functions called:
fread()
fseek()
ftell()
fclose()
It would seem useful to modify vorbisfile to abstract the functions used
for reading, seeking, and closing a file.
A seperate version of ov_open() could be available, which would take 3
extra arguments - to function pointers for these functions. We don't really
need ftell() - it...
2013 Mar 05
3
2GB limit patch
> This is an older issue reported in 2007:
> http://lists.xiph.org/pipermail/flac-dev/2007-September/002423.html
>
> The fix would be to use _ftelli64 instead of ftell with Visual Studio.
> http://msdn.microsoft.com/en-us/library/0ys3hc0b%28v=vs.110%29.aspx
That's not enough. At least, the followings are also needed.
1. Change off_t to something else. off_t can lead to ABI issue when used
in public API, since it's definition can...
2001 Sep 25
2
Couple more problems (ov_open_callbacks)
...t, myStreamPtr, bytes );
myStreamPtr += bytes;
..etc. etc. I didn't bother implementing a close function (I just
stubbed it out).
Looking at my read callback, I always seem to get requests for one
object of varying size. I've modeled my callbacks on the stream IO CRTL
stuff (fseek/fread/ftell/fclose), including parameters and return
values. I assume this is correct?
Any other obvious problems I should look for? Barring any epiphanies, I
may end up having to implement a test version using ov_open to see if
it's my callbacks (which I suspect).
Thanks,
Brian
--- >8 ----
List a...
2004 Jun 23
8
[Bug 884] DSA keys (id_dsa.pub) with 8192 bits or more aren't correctly recognized
http://bugzilla.mindrot.org/show_bug.cgi?id=884
dmr at gmx.it changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|DSA keys (id_dsa.pub) with |DSA keys (id_dsa.pub) with
|8192 bytes or more aren't |8192 bits or more aren't
|correctly
2006 Aug 30
2
Continued:How can I seek in Ogg Vorbis file, but not using Vorbisfile library?
Hello, All.
First, I want to thank Ian Malone and Ralph Giles, thanks for your kind replies. But I still have problems about seek.
As you suggested, I could use ov_open_callbacks() to supply my own read/write/seek functions. So, can you give me an example? I?m sorry for my ignorance, because I haven?t used callbacks before.
I analyzed the vorbisfile.c in Tremor, and I think I
2009 Mar 05
1
[PATCH 4/5] COM32: add trivial stat() function
...iff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 0cc4061..21379b4 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -32,7 +32,7 @@ LIBOBJS = \
sys/entry.o sys/exit.o sys/argv.o sys/times.o \
sys/fileinfo.o sys/opendev.o sys/read.o sys/write.o sys/ftell.o \
sys/close.o sys/open.o sys/fileread.o sys/fileclose.o \
- sys/isatty.o sys/fstat.o \
+ sys/isatty.o sys/fstat.o sys/stat.o \
\
sys/zfile.o sys/zfopen.o...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...flush_unlocked(FILE *);
__extern size_t fread(void *, size_t, size_t, FILE *);
+__extern size_t fread_unlocked(void *, size_t, size_t, FILE *);
__extern size_t fwrite(const void *, size_t, size_t, FILE *);
+__extern size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
__extern off_t ftell(FILE *__f);
#define ftello ftell
__extern int ferror(FILE * );
+__extern int ferror_unlocked(FILE * );
__extern int feof(FILE *);
+__extern int feof_unlocked(FILE *);
__extern int fileno(FILE *);
+__extern int fileno_unlocked(FILE *);
__extern void clearerr(FILE *);
+__extern void clearerr_u...
2019 Sep 23
6
[PATCH v2 0/5] remove unused gnulib modules
This is an extended version of:
https://www.redhat.com/archives/libguestfs/2019-September/msg00178.html
It adds a couple of simple code changes, so it makes it possible to
drop more modules. In addition, more unused modules were dropped.
Pino Toscano (5):
tests: switch away from xgetcwd
daemon: move read_whole_file to common utils
daemon: switch from read_file to read_whole_file
daemon:
2004 Dec 20
2
ogg123 and Vorbis piped to stdin
...play from stdin:
--- file_transport.c-DIST Sun Aug 22 20:33:26 2004
+++ file_transport.c Mon Dec 20 12:38:51 2004
@@ -84,6 +84,11 @@
int items;
long start;
+/* XXX HACK special-case stdin */
+ if (private->fp == stdin)
+ return 0;
+/* XXX */
+
/* Record where we are */
start = ftell(fp);
@@ -118,6 +123,11 @@
file_private_t *private = source->private;
FILE *fp = private->fp;
+/* XXX HACK special-case stdin */
+ if (private->fp == stdin)
+ return -1;
+/* XXX */
+
return fseek(fp, offset, whence);
}
@@ -134,6 +144,11 @@
{
file_private_t *private...