Displaying 5 results from an estimated 5 matches for "output_err".
Did you mean:
output_dir
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...char *p, size_t len, struct output *dest)
+void
+outmem(const char *p, size_t len, struct output *dest)
{
+#ifdef USE_GLIBC_STDIO
+ INTOFF;
+ fwrite(p, 1, len, dest->stream);
+ INTON;
+#else
size_t bufsize;
size_t offset;
size_t nleft;
@@ -186,8 +187,8 @@ alloc:
err:
dest->flags |= OUTPUT_ERR;
}
-}
#endif
+}
void
@@ -201,7 +202,7 @@ outstr(const char *p, struct output *file)
size_t len;
len = strlen(p);
- __outstr(p, len, file);
+ outmem(p, len, file);
#endif
}
@@ -213,7 +214,7 @@ void
outcslow(int c, struct output *dest)
{
char buf = c;
- __outstr(&buf, 1, des...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...char *p, size_t len, struct output *dest)
+void
+outmem(const char *p, size_t len, struct output *dest)
{
+#ifdef USE_GLIBC_STDIO
+ INTOFF;
+ fwrite(p, 1, len, dest->stream);
+ INTON;
+#else
size_t bufsize;
size_t offset;
size_t nleft;
@@ -186,8 +187,8 @@ alloc:
err:
dest->flags |= OUTPUT_ERR;
}
-}
#endif
+}
void
@@ -201,7 +202,7 @@ outstr(const char *p, struct output *file)
size_t len;
len = strlen(p);
- __outstr(p, len, file);
+ outmem(p, len, file);
#endif
}
@@ -213,7 +214,7 @@ void
outcslow(int c, struct output *dest)
{
char buf = c;
- __outstr(&buf, 1, des...
2019 Jan 25
0
[klibc:update-dash] [OUTPUT] Add ifdefs around MEM_OUT handling in outmem
...@ buffered:
if (bufsize < offset)
goto err;
alloc:
+#endif
INTOFF;
dest->buf = ckrealloc(dest->buf, bufsize);
dest->bufsize = bufsize;
@@ -184,7 +188,9 @@ alloc:
goto buffered;
if ((xwrite(dest->fd, p, len))) {
+#ifdef notyet
err:
+#endif
dest->flags |= OUTPUT_ERR;
}
#endif
2020 Mar 28
0
[klibc:update-dash] dash: [OUTPUT] Add ifdefs around MEM_OUT handling in outmem
...@ buffered:
if (bufsize < offset)
goto err;
alloc:
+#endif
INTOFF;
dest->buf = ckrealloc(dest->buf, bufsize);
dest->bufsize = bufsize;
@@ -184,7 +188,9 @@ alloc:
goto buffered;
if ((xwrite(dest->fd, p, len))) {
+#ifdef notyet
err:
+#endif
dest->flags |= OUTPUT_ERR;
}
#endif
2012 Jul 02
0
[klibc:master] [OUTPUT] Make outc an inline function
...attems <max at stro.at>
---
usr/dash/output.h | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/usr/dash/output.h b/usr/dash/output.h
index d123301..f853e9d 100644
--- a/usr/dash/output.h
+++ b/usr/dash/output.h
@@ -97,10 +97,21 @@ freestdout()
#define OUTPUT_ERR 01 /* error occurred on output */
#ifdef USE_GLIBC_STDIO
-#define outc(c, o) putc((c), (o)->stream)
+static inline void outc(int ch, struct output *file)
+{
+ putc(ch, file->stream);
+}
#define doformat(d, f, a) vfprintf((d)->stream, (f), (a))
#else
-#define outc(c, file) ((file)->...