search for: readint

Displaying 17 results from an estimated 17 matches for "readint".

Did you mean: reading
2018 Feb 09
3
[PATCH]Add address overflow check
...in function `print_comments()`: static void print_comments(char *comments, int length) { char *c=comments; int len, i, nb_fields; char *end; if (length<8) { fprintf (stderr, "Invalid/corrupted comments\n"); return; } end = c+length; len=readint(c, 0); c+=4; // 'c+len' MAY OVERFLOW if (len < 0 || c+len>end) { fprintf (stderr, "Invalid/corrupted comments\n"); return; } The pointer `c` happened to be greater than `0x80000000` and the sum overflowed, even though `length` is positive. H...
2001 Jun 01
1
Read to the end of a stream (package Rstreams)
Hi there, I want to read all data from a binary file (with package Rstreams). I tried the following function (small piece of code): readdata <- function (file) { # open file s <- openstream(file, "read") # read int values while (s$position <= s$size) { readint(s, 1, 2) -> type [...] } return() } and got the following error: > Error in while (s$position <= s$size) { : missing value where logical needed Is it possible to read data from the start to the finish of a stream? Thanks, Sven -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2001 Dec 11
1
Using lib Rstreams and gzfile()
...0 0 [25] 0 0 0 0 0 0 0 0 11884 25888 25977 11552 [37] 22560 0 0 0 0 0 0 0 0 0 0 0 [49] 0 0 0 0 0 0 0 0 0 0 0 0 [61] 0 0 0 0 this is ok, but then with readint from Rstreams: > seek(p1c.gzip, 0, "start") [1] 128 > readint(p1c.gzip, 64,2) [1] -25620 -17287 21838 -16137 -8489 3835 13806 -28067 -30452 -24244 [11] 11464 18547 5320 -24287 -13180 -14761 13486 -2902 18582 8798 [21] 29513 21369 -27830 10578 29509 -13015 -23255...
2018 Feb 09
0
[PATCH]Add address overflow check
...har*c=comments; > >    intlen, i, nb_fields; > >    char*end; > > >    if(length<8) > >    {    > >       fprintf (stderr, "Invalid/corrupted comments\n"); > >       return; > >    }    > >    end = c+length; > >    len=readint(c, 0);  > >    c+=4; > > // 'c+len' MAY OVERFLOW > >    if(len < 0|| c+len>end) > >    {    > >       fprintf (stderr, "Invalid/corrupted comments\n"); > >       return; > >    } > > > The pointer `c` happened to be...
2000 Jun 29
1
Binary file functions in R
...ng to do it first in R for Windows using a DLL written in Delphi; I'll let people comment on that, and once the design settles down, I'll redo the external code in C so that it should be portable to Unix as well. One immediate change from my first pass suggestion below: I'll just have readint, readfloat, readchar; the size and whether signed or unsigned will be determined by parameters to those functions. Other suggested changes are welcome! Duncan Murdoch >I think a set of stream like functions would be really handy >sometimes, especially for those of us who aren't that co...
2013 Jun 21
1
[LLVMdev] ASan for Android Applications
...y preloading the ASan runtime, I see the following error message: W/Zygote ( 144): Error reading pid from wrapped process, child may have died W/Zygote ( 144): java.io.EOFException W/Zygote ( 144): at libcore.io.Streams.readFully(Streams.java:83) W/Zygote ( 144): at java.io.DataInputStream.readInt(DataInputStream.java:124) W/Zygote ( 144): at com.android.internal.os.ZygoteConnection.handleParentProc(ZygoteConnection.java:908) W/Zygote ( 144): at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:258) W/Zygote ( 144): at com.android.internal.os.ZygoteInit.runSelectLo...
2008 Apr 04
0
speexdec 1.2.3
...INEAR #define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR /* Solaris */ #endif #endif #include <string.h> #include "wav_io.h" #include <speex/speex_header.h> #include <speex/speex_stereo.h> #include <speex/speex_callbacks.h> #define MAX_FRAME_SIZE 2000 #define readint(buf, base) (((buf[base+3]<<24)&0xff000000)| \ ((buf[base+2]<<16)&0xff0000)| \ ((buf[base+1]<<8)&0xff00)| \ (buf[base]&0xff)) static void print_comments(char *comments, int length) { char *...
2007 Dec 05
4
Java parser for R data file?
Hi everyone, Has anyone written a parser in Java for either the ASCII or binary format produced by save()? I need to parse a single large 2D array that is structured like this: list( "32609_1" = c(-9549.39231289146, -9574.07159324482, ... ), "32610_2" = c(-6369.12526971635, -6403.99620977124, ... ), "32618_2" = c(-2138.29095689061, -2057.9229403233, ... ),
2008 Apr 04
2
speexdec 1.2.3
On Fri, Apr 4, 2008 at 12:19 AM, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote: > Jahn, Ray (R.) a ?crit : > > > Dear Speex codec community: > > > > I am working on conversion of voice files. I could not figure out how to use speexdec.exe 1.2.3 in piped mode in order to avoid the creation of the potentially large intermediate *.wav or *.pcm files. Any
2010 Oct 28
0
Good write, but slow read speeds over the network
...sec. no matter what I am trying. When I run zpool iostat <pool> 1 while reading a big file from the share, I can see that the pool has continous reads of about 50 to 60 MB/sec. and I am getting approx. 30 MB/sec on the client. Afterwards the files must reside in the ZFS file cache, since readint he same file again, will not show any read activity on the pool at all, but the transfer rate is still quite slow - a max. of 45 to 50 MB/sec. When I use dd on the host itself to copy the file from the pool to /dev/null I am getting approx. 120 MB/sec, which is still way more than the 30 to 5...
2001 Jul 05
1
ERP software
I was just playing around with the R-streams package, reading in some data from an old experiment we did here, and was again amazed by the flexibility of the R environment. The eaze with wich I was able to generate simple plots of my EEG data made me wonder if someone tried to implement an ERP package. For the non-cognitive scientists ou there: EEG is electrical activity measured from the scalp
2013 Jun 21
0
[LLVMdev] ASan for Android Applications
You are citing the "Android platform workflow" section, which is about sanitizing components of the Android system itself. For NDK apps, see "Android NDK workflow" in the same document. You need -eng build because preloading libraries into dalvik vm is not allowed in user builds. JellyBean includes several bugfixes in the dynamic loader that asan needs. Was there any useful
2013 Jun 21
3
[LLVMdev] ASan for Android Applications
From: http://address-sanitizer.googlecode.com/svn-history/r1624/wiki/Android.wiki > AddressSanitizer is fully supported in AOSP starting with JellyBean release. To run > applications built with ASan you'll need an -eng build of Android. > > To build any part of Android system with ASan, add > LOCAL_ADDRESS_SANITIZER:=true to the appropriate Android.mk. I don't see that
1999 Jul 16
7
R:how to separate stuff?
Thanks for your help on moving files from S+ to R and on attaching directories. If attaching directories is NOT possible in R, is there any other way to separate objects into different folders or something similar? For example, to keep user functions for multivariate analysis in a different "place" than user functions on time series, or to keep data objects of project_1 in a different
1999 Jul 16
7
R:how to separate stuff?
Thanks for your help on moving files from S+ to R and on attaching directories. If attaching directories is NOT possible in R, is there any other way to separate objects into different folders or something similar? For example, to keep user functions for multivariate analysis in a different "place" than user functions on time series, or to keep data objects of project_1 in a different
2008 Jan 26
1
Shift count warning messages
Hi Jim, Thanks a lot for investigating. It definitely makes sense now. I'll fix the problem now. Is there any other place where you see that same (or similar) problem? Jean-Marc Jim Crichton a ?crit : > Jean-Marc, > > I dug into this further, and found that the warning occurred when PSHR32 > had a shift greater than 15. > > in fixed_generic.h, PSHR32 is defined as: >
2018 Nov 25
6
RFC: Modernizing our use of auto
I'm not advocating AAA. However this is a proposal for more modern thinking regarding the permissiveness of auto in LLVM codebases. Currently the rule on the use of auto is here: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable It is quite strict. It allows the use of auto for * lambdas * iterators because they are long to type * casts to