Displaying 20 results from an estimated 3000 matches similar to: "fseek/fgetc puzzle"
2023 Feb 20
1
fseek/fgetc puzzle
On Mon, Feb 20, 2023 at 10:21:31PM +1100, Darren Tucker wrote:
> > My suggestion of course fails to explain why there's only one 'B'.
> > I would create the initial file separately from the test program.
>
> The "od" call in the middle of the above example proves there's only
> one byte after the first fclose.
Ah, so it does. What happens
if you
2023 Feb 20
1
fseek/fgetc puzzle
Darren Tucker wrote in
<CALDDTe39k4UFJWBvts5HWbbhHO+Vw9OAP0zBhu-Hje-2aR9+xA at mail.gmail.com>:
J?rg Schilling convinced me in 2017
Readd removed fflush()/fseek() in between read and write..
The behave:record_a_resend-2 test failed on Solaris 5.10 and 5.11,
messages in *record* where separated by four \n / U+000A instead
of two. It turns out that the effective sequence
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 "info", "help", or
2007 Sep 27
1
libFLAC++ Seeking
?rta:
> ?rta:
>
> Hello,
>
> I've a problem with seeking using libFLAC++ API.
> The call to seek_absolute always returns with false, whatever I do.
>
> I tried many different ways, finally I tried to reduce my added code to near zero, so I used the cpp decode example in ...\flac-1.2.1\examples\cpp\decode\file\.main.cpp and added only one line:
>
> bool
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
Commit-ID: 8c056cab6c8cce0b5dbc2c3141060f89a6ffc905
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=8c056cab6c8cce0b5dbc2c3141060f89a6ffc905
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Sat, 25 Jul 2020 21:18:30 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 21:44:14 +0100
[klibc] stdio: Define all the
2014 Jun 22
0
[PATCH 5/6] utils/isohybrid.c: Change all fseek(3) to fseeko(3)
It seems unwise to offer future programmers fseek(3) calls for copy+paste.
They are simply insufficient for large image files.
This change switches all calls of fseek(3) to fseeko(3) and takes care
that the offset value if of type off_t.
---
utils/isohybrid.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index
2004 Oct 14
3
patch for non-seekable streams on Windows
I've been trying to get oggdec to work with input streamed in through a
pipe or a socket. This seems to work on Linux and OS X, but not on
Windows. I've found that code in vorbisfile.c tests the input stream for
seekability by invoking fseek in the following way:
int offsettest=(f?callbacks.seek_func(f,0,SEEK_CUR) : -1);
Unfortunately, fseek succeeds for a socket on Windows (even
2012 May 29
0
[klibc:master] capabilities: Use fflush() instead of fseek ()
Commit-ID: 163920f31f98db13f4e37796bb92f0844e7aaf45
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=163920f31f98db13f4e37796bb92f0844e7aaf45
Author: maximilian attems <max at stro.at>
AuthorDate: Tue, 29 May 2012 18:58:31 +0200
Committer: maximilian attems <max at stro.at>
CommitDate: Tue, 29 May 2012 19:03:08 +0200
[klibc] capabilities: Use fflush() instead
2012 May 31
1
klibc 2.0 release
The stdio klibc branch got merged into klibc properly,
meaning the I/O being buffered. klibc gained with it
support for several stream functions. This massive work
got authored by hpa.
ipconfig saw several note worthy enhancement allowing the
generation of a proper lease file.
kinit added fs mount according to /etc/fstab or bootparam.
Plus several arch fixes for the usual suspects: alpha, i386,
2014 May 12
4
[PATCH] isohybrid: fix overflow on 32 bit system
When call isohybrid with option '-u', it overflows on a 32 bits host. It
seeks to 512 bytes before the end of the image to install gpt header. If
the size of image is larger than LONG_MAX, it overflows fseek() and
cause error:
isohybrid: wrlinux-image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
Check the offset and call fseek() multi-times if offset is too large.
2014 May 13
2
[PATCH] isohybrid: fix overflow on 32 bit system
On 2014?05?12? 22:38, H. Peter Anvin wrote:
> That is because it needs to use fseeko() and use off_t.
Do you mean it does need a patch for isohybrid.c. And the patch looks like:
#if _FILE_OFFSET_BITS == 64
fseeko(...)
#else
fseek(...)
Regards,
Kai
>
> On May 11, 2014 11:53:17 PM PDT, Kang Kai <Kai.Kang at windriver.com> wrote:
>> On 2014?05?12? 10:49, H. Peter
2014 May 12
2
[PATCH] isohybrid: fix overflow on 32 bit system
On 2014?05?12? 10:49, H. Peter Anvin wrote:
> On 05/11/2014 06:56 PM, Kai Kang wrote:
>> When call isohybrid with option '-u', it overflows on a 32 bits host. It
>> seeks to 512 bytes before the end of the image to install gpt header. If
>> the size of image is larger than LONG_MAX, it overflows fseek() and
>> cause error:
>>
>> isohybrid:
2014 Jun 20
3
[PATCH] isohybrid: fix overflow on 32 bit system
When call isohybrid with option '-u', it overflows on a 32 bits host. It
seeks to 512 bytes before the end of the image to install gpt header. If
the size of image is larger than LONG_MAX, it overflows fseek() and
cause error:
isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
Replace fseek with fseeko to fix this issue.
Signed-off-by: Kai Kang <kai.kang at
2012 May 22
1
warnings met in introduce extent buffer cache for each i-node patch
Miao,
I was trying out your patch on scalability testing for BTRFS on v3.3
kernel.
http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg14930.html
However, I ran into a lot of warnings (see the dmesg below). Wonder if
you have a more up to date version of this patch?
In addition, I have to do this modification to fix a warning in your
original patch.
diff --git a/fs/btrfs/inode.c
2002 Feb 05
2
Documentation Suggestions
I'm a developer for a game company and I'm almost done adding support for
Vorbis to our game engine. As such, I wanted to simply plug in the read
function, let it decode, and then send the PCM data on to DirectSound just
like I always have. There were several occasions where I spent 4 or 5
hours trying to fix a bug, digging through newsgroups and sound-format
specs, when that info could
2007 Apr 06
5
Getting a dynamically generated elements dimensions
Ive posted this before, but unfortunately I still have yet to resolve
it after numerous attempts...
Here is the overview: populate a container element with some new html
using Element.update and then retrieve the new dimensions of the
containig element.
Here is a bit of code snippet that I would think should work.. but
doesn''t:
==== start snippet ====
<style>
.bigBox {
2007 Sep 26
2
libFLAC++ Seeking
Hello,
I've a problem with seeking using libFLAC++ API.
The call to seek_absolute always returns with false, whatever I do.
I tried many different ways, finally I tried to reduce my added code to near zero, so I used the cpp decode example in ...\flac-1.2.1\examples\cpp\decode\file\.main.cpp and added only one line:
bool b=decoder.seek_absolute(1000);
right before
ok =
2011 Feb 27
4
[PATCH] Add minimal mkstemp(3) implementation.
This uses time, ASLR and pid for randomisation. (Closes: #516774)
Signed-off-by: Thorsten Glaser <tg at mirbsd.org>
---
usr/include/stdlib.h | 2 +
usr/klibc/Kbuild | 2 +-
usr/klibc/mkstemp.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 96 insertions(+), 1 deletions(-)
create mode 100644 usr/klibc/mkstemp.c
diff --git a/usr/include/stdlib.h
2019 Jul 21
5
[Bug 1354] New: cat foo.nft | nft -f - produces syntax error not seen with nft -f foo.nft
https://bugzilla.netfilter.org/show_bug.cgi?id=1354
Bug ID: 1354
Summary: cat foo.nft | nft -f - produces syntax error not seen
with nft -f foo.nft
Product: nftables
Version: unspecified
Hardware: x86_64
OS: Debian GNU/Linux
Status: NEW
Severity: normal
Priority: P5
2004 Sep 28
2
Finding start of audio data using metadata level 2 interface.
* Josh Coalson <xflac@yahoo.com> shaped the electrons to say...
>yep, that will work too. 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)
>}