Displaying 20 results from an estimated 60 matches for "bufp".
Did you mean:
buf
2003 Apr 28
1
Red Hat 9 regex symbol conflict
...ask comprised of the various bits
defined in regex.h. We return the old syntax. */
! static reg_syntax_t
re_set_syntax (syntax)
reg_syntax_t syntax;
{
***************
*** 3205,3211 ****
Returns 0 if we succeed, -2 if an internal error. */
! int
re_compile_fastmap (bufp)
struct re_pattern_buffer *bufp;
{
--- 3205,3211 ----
Returns 0 if we succeed, -2 if an internal error. */
! static int
re_compile_fastmap (bufp)
struct re_pattern_buffer *bufp;
{
***************
*** 3511,3517 ****
PATTERN_BUFFER will allocate its own register...
2007 Sep 07
1
"bug" and patch: quadratic running time for strsplit(..., fixed=TRUE) (PR#9902)
...1399: for(i=0; i<strlen(text)-1; i++)
modules/X11/rotated.c:1797: for(i=0; i<strlen(text)-1; i++)
modules/X11/rotated.c:2045: for(i=0; i<strlen(text)-1; i++)
modules/X11/rotated.c:2339: for(i=0; i<strlen(text)-1; i++)
modules/X11/dataentry.c:1358: for(i = 0; i < strlen(text); i++) *bufp++ =
text[i];
PATCHES (against trunk)
Only the first is required to fix strsplit().
Index: src/main/character.c
===================================================================
--- src/main/character.c (revision 42792)
+++ src/main/character.c (working copy)
@@ -357,7 +357,7 @@
int i, j,...
2015 Nov 10
2
[PATCH] mtools: Remove local xpread/xpwrite, use ones from syslxcom
...gram; /* Name of program */
pid_t mypid;
void __attribute__ ((noreturn)) die(const char *msg)
@@ -59,63 +59,6 @@ void __attribute__ ((noreturn)) die_err(const char *msg)
}
/*
- * read/write wrapper functions
- */
-ssize_t xpread(int fd, void *buf, size_t count, off_t offset)
-{
- char *bufp = (char *)buf;
- ssize_t rv;
- ssize_t done = 0;
-
- while (count) {
- rv = pread(fd, bufp, count, offset);
- if (rv == 0) {
- die("short read");
- } else if (rv == -1) {
- if (errno == EINTR) {
- continue;
- } else {
- die(strerror(errno));
- }
- } else {
-...
2006 Sep 24
1
[patch] buffer overflow in q_parser.y
..._WORD_SIZE];
+ char *dynbuf;
int buf_index;
HashTable *field_cache;
HashSet *fields;
Index: c/src/q_parser.y
===================================================================
--- c/src/q_parser.y (revision 615)
+++ c/src/q_parser.y (working copy)
@@ -173,6 +173,11 @@
char *bufp = buf;
qp->buf_index = (qp->buf_index + 1) % QP_CONC_WORDS;
+ if (qp->dynbuf) {
+ free(qp->dynbuf);
+ qp->dynbuf = NULL;
+ }
+
qp->qstrp--; /* need to back up one character */
while (!strchr(not_word, (c=*qp->qstrp++))) {
@@ -192,6 +197,15...
2009 Jul 20
3
S_alloc or Calloc for return value
I am trying to write a C function to create a vector of integers that can be
used by the R calling function. I do not know the size of the vector in the
R calling function. (Well, actually, I have an upper limit on the size, but
that is so large that R cannot allocate it. What I'm doing in the function
is to do a sieving procedure, and the result will be small enough to fit
into my
2000 Feb 07
4
Segmentation fault, devPS.c, 0.99.0 (PR#413)
Full_Name: Roger Bivand
Version: 0.99.0
OS: RH Linux 6.1
Submission from: (NULL) (158.37.60.152)
I am working on an interface between R and the GRASS geographical information
system,
written in R, with no dynamically loaded code. I have written full examples, and
tested
then under R 0.90.1, both by entering example() for each function and R CMD
check, both
of which worked without problem.
Under
2004 Oct 22
1
[PATCH] off-by-one in asprintf/vasprintf
...2004-10-22 12:07:22.678906352 -0600
+++ udev/klibc-0.188/klibc/asprintf.c 2004-10-22 12:08:03.859645928 -0600
@@ -16,10 +16,10 @@
va_start(ap, format);
va_copy(ap1, ap);
- bytes = vsnprintf(NULL, 0, format, ap1);
+ bytes = vsnprintf(NULL, 0, format, ap1) + 1;
va_end(ap1);
- *bufp = p = malloc(bytes+1);
+ *bufp = p = malloc(bytes);
if ( !p )
return -1;
diff -u klibc-0.188/klibc/vasprintf.c udev/klibc-0.188/klibc/vasprintf.c
--- klibc-0.188/klibc/vasprintf.c 2004-10-22 12:07:41.994969864 -0600
+++ udev/klibc-0.188/klibc/vasprintf.c 2004-10-22 12:08:23.4976604...
2016 May 15
0
[PATCH] tools/virtio: add inorder option
...)) ^ 0x8000;
#else
+#ifndef INORDER
+ /* Barrier A (for pairing) */
+ smp_release();
avail = (ring_size - 1) & (guest.avail_idx++);
ring.avail->ring[avail] = head;
+#endif
/* Barrier A (for pairing) */
smp_release();
#endif
@@ -141,15 +168,27 @@ void *get_buf(unsigned *lenp, void **bufp)
return NULL;
/* Barrier B (for pairing) */
smp_acquire();
+#ifdef INORDER
+ head = (ring_size - 1) & guest.last_used_idx;
+ index = head;
+#else
head = (ring_size - 1) & guest.last_used_idx;
index = ring.used->ring[head].id;
#endif
+
+#endif
+#ifdef INORDER
+ *lenp = ring.de...
2016 May 15
0
[PATCH] tools/virtio: add inorder option
...)) ^ 0x8000;
#else
+#ifndef INORDER
+ /* Barrier A (for pairing) */
+ smp_release();
avail = (ring_size - 1) & (guest.avail_idx++);
ring.avail->ring[avail] = head;
+#endif
/* Barrier A (for pairing) */
smp_release();
#endif
@@ -141,15 +168,27 @@ void *get_buf(unsigned *lenp, void **bufp)
return NULL;
/* Barrier B (for pairing) */
smp_acquire();
+#ifdef INORDER
+ head = (ring_size - 1) & guest.last_used_idx;
+ index = head;
+#else
head = (ring_size - 1) & guest.last_used_idx;
index = ring.used->ring[head].id;
#endif
+
+#endif
+#ifdef INORDER
+ *lenp = ring.de...
1999 Mar 25
4
readline() (PR#147)
Dear R developers,
I have found the following bug with readline() in R 0.63.3:
if you execute the menu-function and then the readline() function, then
readline() prompts "Selection:"
> a <- readline()
hello
> a
[1] "hallo"
> a <- menu(c("a", "b"), title="bitte:")
bitte:
1:a
2:b
Selection: 2
> a <- readline()
Selection:
2016 Feb 01
0
[klibc:master] Make asprintf() a simple wrapper around vasprintf()
...hpa at zytor.com>
---
usr/klibc/asprintf.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/usr/klibc/asprintf.c b/usr/klibc/asprintf.c
index a3f5f00..ce3aa76 100644
--- a/usr/klibc/asprintf.c
+++ b/usr/klibc/asprintf.c
@@ -8,22 +8,13 @@
int asprintf(char **bufp, const char *format, ...)
{
- va_list ap, ap1;
+ va_list ap;
int rv;
int bytes;
char *p;
va_start(ap, format);
- va_copy(ap1, ap);
-
- bytes = vsnprintf(NULL, 0, format, ap1) + 1;
- va_end(ap1);
-
- *bufp = p = malloc(bytes);
- if (!p)
- return -1;
-
- rv = vsnprintf(p, bytes, format, a...
2009 Feb 18
4
tracing aio syscalls
Hi all,
Is there some documentation or some example on how to interpret the arg0
.. arg<n> for the aioread, aiowrite, aiowait syscalls? The system call
name for all three seems to be "kaio".
Michael
=== Michael Mueller ==================
Tel. + 49 8171 63600
Fax. + 49 8171 63615
Web: http://www.michael-mueller-it.de
======================================
2000 Dec 22
5
(HP-UX) scan: last line gets duplicated (PR#790)
The last line gets duplicated when a file is read like this:
a <- scan(file=filename, what="", sep="\n",
strip.white=c(TRUE), quiet=TRUE)
(This error does not occur on Linux, the only other platform I
tested.)
Version:
platform = hppa2.0-hp-hpux10.20
arch = hppa2.0
os = hpux10.20
system = hppa2.0, hpux10.20
Actually, all binaries are
2019 Jan 18
0
[klibc:master] remove unused variables
...n at decadent.org.uk>
---
usr/klibc/asprintf.c | 2 --
usr/utils/readlink.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/usr/klibc/asprintf.c b/usr/klibc/asprintf.c
index ce3aa76..42f3aa2 100644
--- a/usr/klibc/asprintf.c
+++ b/usr/klibc/asprintf.c
@@ -10,8 +10,6 @@ int asprintf(char **bufp, const char *format, ...)
{
va_list ap;
int rv;
- int bytes;
- char *p;
va_start(ap, format);
rv = vasprintf(bufp, format, ap);
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index ffb0b1f..1f16c02 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -17,7 +17,6 @@ i...
2016 May 24
0
[PATCH] tools/virtio: add noring tool
...* skb_array API provides no way for producer to find out whether a given
+ * buffer was consumed. Our tests merely require that a successful get_buf
+ * implies that add_inbuf succeed in the past, and that add_inbuf will succeed,
+ * fake it accordingly.
+ */
+void *get_buf(unsigned *lenp, void **bufp)
+{
+ return "Buffer";
+}
+
+void poll_used(void)
+{
+}
+
+void disable_call()
+{
+ assert(0);
+}
+
+bool enable_call()
+{
+ assert(0);
+}
+
+void kick_available(void)
+{
+ assert(0);
+}
+
+/* host side */
+void disable_kick()
+{
+ assert(0);
+}
+
+bool enable_kick()
+{
+ assert(0);
+}
+...
2016 May 24
0
[PATCH] tools/virtio: add noring tool
...* skb_array API provides no way for producer to find out whether a given
+ * buffer was consumed. Our tests merely require that a successful get_buf
+ * implies that add_inbuf succeed in the past, and that add_inbuf will succeed,
+ * fake it accordingly.
+ */
+void *get_buf(unsigned *lenp, void **bufp)
+{
+ return "Buffer";
+}
+
+void poll_used(void)
+{
+}
+
+void disable_call()
+{
+ assert(0);
+}
+
+bool enable_call()
+{
+ assert(0);
+}
+
+void kick_available(void)
+{
+ assert(0);
+}
+
+/* host side */
+void disable_kick()
+{
+ assert(0);
+}
+
+bool enable_kick()
+{
+ assert(0);
+}
+...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...ot worth it to
+ * add an explicit full barrier to avoid this.
+ */
+ barrier();
+ index = ring[head].index;
+ data[index].buf = buf;
+ data[index].data = datap;
+ /* Barrier A (for pairing) */
+ smp_release();
+ ring[head].flags = DESC_HW;
+
+ return 0;
+}
+
+void *get_buf(unsigned *lenp, void **bufp)
+{
+ unsigned head = (ring_size - 1) & guest.last_used_idx;
+ unsigned index;
+ void *datap;
+
+ if (ring[head].flags & DESC_HW)
+ return NULL;
+ /* Barrier B (for pairing) */
+ smp_acquire();
+ *lenp = ring[head].len;
+ index = ring[head].index & (ring_size - 1);
+ datap = data[index...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...ot worth it to
+ * add an explicit full barrier to avoid this.
+ */
+ barrier();
+ index = ring[head].index;
+ data[index].buf = buf;
+ data[index].data = datap;
+ /* Barrier A (for pairing) */
+ smp_release();
+ ring[head].flags = DESC_HW;
+
+ return 0;
+}
+
+void *get_buf(unsigned *lenp, void **bufp)
+{
+ unsigned head = (ring_size - 1) & guest.last_used_idx;
+ unsigned index;
+ void *datap;
+
+ if (ring[head].flags & DESC_HW)
+ return NULL;
+ /* Barrier B (for pairing) */
+ smp_acquire();
+ *lenp = ring[head].len;
+ index = ring[head].index & (ring_size - 1);
+ datap = data[index...
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...w)\n");
- rosh_dir(cmdstr, pwdstr);
-} /* rosh_ls */
+ ROSH_DEBUG(" dir implemented as ls\n");
+ rosh_ls(cmdstr, pwdstr);
+} /* rosh_dir */
/* Page through a buffer string
* buf Buffer to page through
*/
void rosh_more_buf(char *buf, int buflen, int rows, int cols)
{
- char *bufp, *bufeol; /* Pointer to current and next end-of-line
- position in buffer */
+ char *bufp, *bufeol, *bufeol2; /* Pointer to current and next
+ end-of-line position in buffer */
int bufpos, bufcnt; /* current position, count characters */
char scrbuf[ROSH_SBUF_SZ];
int inc;
@@ -506,45 +765,3...
2012 Jul 05
10
[PATCH] kexec-tools: Read always one vmcoreinfo file
...vmcoreinfo_xen) * sizeof(PHDR) +
+ sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo) * sizeof(PHDR) +
ranges * sizeof(PHDR);
/*
@@ -179,21 +175,6 @@ int FUNC(struct kexec_info *info,
dbgprintf_phdr("vmcoreinfo header", phdr);
}
- if (has_vmcoreinfo_xen) {
- phdr = (PHDR *) bufp;
- bufp += sizeof(PHDR);
- phdr->p_type = PT_NOTE;
- phdr->p_flags = 0;
- phdr->p_offset = phdr->p_paddr = vmcoreinfo_addr_xen;
- phdr->p_vaddr = 0;
- phdr->p_filesz = phdr->p_memsz = vmcoreinfo_len_xen;
- /* Do we need any alignment of segments? */
- phdr->p_alig...