search for: nptr

Displaying 8 results from an estimated 8 matches for "nptr".

Did you mean: kptr
2013 Dec 06
3
Matrix memory layout R vs. C
...t I don't see how this helps. Maybe someone can clarify. Thanks a lot in advance! Cheers Larissa Here's the C main function showing that the C code itself is correct: #include <stdlib.h> void printMatrix(int *mPtr, int *m, int *n); int main(void) { int m, n, i; int *mPtr, *nPtr; m = 3; n = 3; mPtr = &m; nPtr = &n; int *M = malloc(m * n * sizeof(int)); for (i = 0; i < m * n; i++){ M[i] = i + 1; } printMatrix(M, mPtr, nPtr); return EXIT_SUCCESS;
2015 Jul 01
2
Bug#785187: [PATCH] xen: earlycpio: Pull in latest linux earlycpio.[ch]
...o_data __init find_cpio_data(const char *path, void *data, - size_t len, long *offset) + size_t len, long *nextoff) { const size_t cpio_header_len = 8*C_NFIELDS - 2; - struct cpio_data cd = { NULL, 0 }; + struct cpio_data cd = { NULL, 0, "" }; const char *p, *dptr, *nptr; unsigned int ch[C_NFIELDS], *chp, v; unsigned char c, x; @@ -129,17 +130,17 @@ struct cpio_data __init find_cpio_data(const char *path, void *data, if ((ch[C_MODE] & 0170000) == 0100000 && ch[C_NAMESIZE] >= mypathsize && !memcmp(p, path, mypathsize)) { -...
2015 May 19
3
Bug#785187: Bug#785187: xen-hypervisor-4.5-amd64: Option ucode=scan is not working
On Tue, 2015-05-19 at 13:31 +0200, Stephan Seitz wrote: > On Fri, May 15, 2015 at 08:26:42AM +0100, Ian Campbell wrote: > >Here's an idea. First extract the real initrd from the back half of the > >initrd: > > ijc at dagon:tmp$ cat /boot/initrd.img | ( cpio -t >&2 ; cat ) > initrd.real > > kernel > > kernel/x86 > >
2003 Feb 28
2
ogg123 -k 1:59 patch.ogg # minutes and seconds
...s-1.0.orig/ogg123/cmdline_options.c vorbis-tools-1.0/ogg123/cmdline_options.c --- vorbis-tools-1.0.orig/ogg123/cmdline_options.c Thu Jul 11 04:44:39 2002 +++ vorbis-tools-1.0/ogg123/cmdline_options.c Thu Feb 27 13:37:46 2003 @@ -50,6 +50,24 @@ {0, 0, 0, 0} }; +double minsec_atof(const char *nptr) +{ + const char *p = nptr; + double min = 0.0; + double sec = 0.0; + + while (*p && *p != '.') { + if (*p >= '0' && *p <='9') + sec = sec * 10 + (*p-'0'); + else + if (*p == ':') { + min = sec; + sec = 0.0; + } + p++; +...
2014 Dec 07
2
GCC/clang compilation issues
> I don't know, its your build system and I haven't seen it, nor do > I have the time and motivation to look at it (unless of course you > were paying me for my time). I willing give my time to maintain > FLAC. I have not signed up to spend my time on your project. And I am willing to looking at FLAC and spent my time to fix compiler warnings to make it more portable and
2012 Apr 18
0
ANNOUNCE: cifs-utils release 5.4 is ready for download
...9 2012 -0500 mount.cifs: fix tests for strtoul success The current test just looks to see if errno was 0 after the conversion but we need to do a bit more. According to the strtoul manpage: If there were no digits at all, strtoul() stores the original value of nptr in *endptr (and returns 0). So, if you pass in a string of letters, strtoul will return 0, but won't actually have converted anything. Luckily, in most cases, /bin/mount papers over this bug by doing uid/gid conversions itself before calling mount.cifs. Fix this by...
2007 Sep 03
2
[git patch] minor fixes
...atic inline int digitval(int ch) { diff --git a/usr/klibc/strtox.c b/usr/klibc/strtox.c index 54bdefc..c22e7c7 100644 --- a/usr/klibc/strtox.c +++ b/usr/klibc/strtox.c @@ -5,6 +5,7 @@ */ #include <stddef.h> +#include <stdlib.h> #include <inttypes.h> TYPE NAME(const char *nptr, char **endptr, int base) diff --git a/usr/klibc/usleep.c b/usr/klibc/usleep.c index 93bfabe..af7054b 100644 --- a/usr/klibc/usleep.c +++ b/usr/klibc/usleep.c @@ -3,6 +3,7 @@ */ #include <errno.h> +#include <stdlib.h> #include <time.h> void usleep(unsigned long usec) com...
2004 Feb 22
3
ARM/Thumb updates and some other minor tweaks
...39;+10; - } else { - return -1; - } + if (ch >= '0' && ch <= '9') + return (ch - '0'); + ch |= 0x20; + if (ch >= 'a' && ch <= 'f') + return (ch - 'a' + 10); + return -1; } uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n) diff -ruN klibc-0.114_orig/klibc/tests/hello.c klibc-0.114/klibc/tests/hello.c --- klibc-0.114_orig/klibc/tests/hello.c 2002-08-12 20:58:57.000000000 -0700 +++ klibc-0.114/klibc/tests/hello.c 2004-02-22 04:39:00.000000000 -0800 @@ -2,6 +2,10 @@ int main(void)...