search for: nonl

Displaying 12 results from an estimated 12 matches for "nonl".

Did you mean: none
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Simplify echo command
...ertions(+), 20 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 0e150d36..d4ae794d 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -448,33 +448,21 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { - int nonl = 0; - struct output *outs = out1; - - if (!*++argv) - goto end; - if (equal(*argv, "-n")) { - nonl = ~nonl; - if (!*++argv) - goto end; - } + int nonl; + + nonl = *++argv ? equal(*argv, "-n") : 0; + argv += nonl; do { int c; - nonl += print_escape_str("%s&qu...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Simplify echo command
...ertions(+), 20 deletions(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 0e150d36..d4ae794d 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -448,33 +448,21 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { - int nonl = 0; - struct output *outs = out1; - - if (!*++argv) - goto end; - if (equal(*argv, "-n")) { - nonl = ~nonl; - if (!*++argv) - goto end; - } + int nonl; + + nonl = *++argv ? equal(*argv, "-n") : 0; + argv += nonl; do { int c; - nonl += print_escape_str("%s&qu...
2019 Jan 25
0
[klibc:update-dash] builtin: Move echo space/nl handling into print_escape_str
...q - p; total = len - 1; + q[-1] = (!!((f[1] - 's') | done) - 1) & f[2]; + total += !!q[-1]; if (f[1] == 's') goto easy; @@ -461,21 +463,22 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { + const char *lastfmt = snlfmt; int nonl; - nonl = *++argv ? equal(*argv, "-n") : 0; - argv += nonl; + if (*++argv && equal(*argv, "-n")) { + argv++; + lastfmt = "%s"; + } do { - int c; + const char *fmt = "%s "; + char *s = *argv; - if (likely(*argv)) - nonl += print_escape_...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Move echo space/nl handling into print_escape_str
...q - p; total = len - 1; + q[-1] = (!!((f[1] - 's') | done) - 1) & f[2]; + total += !!q[-1]; if (f[1] == 's') goto easy; @@ -461,21 +463,22 @@ check_conversion(const char *s, const char *ep) int echocmd(int argc, char **argv) { + const char *lastfmt = snlfmt; int nonl; - nonl = *++argv ? equal(*argv, "-n") : 0; - argv += nonl; + if (*++argv && equal(*argv, "-n")) { + argv++; + lastfmt = "%s"; + } do { - int c; + const char *fmt = "%s "; + char *s = *argv; - if (likely(*argv)) - nonl += print_escape_...
2010 Nov 29
1
Evaluation of survival analysis
...wn below. Which method is prefered and how to see that / how to compare the methods? 1. coxph(formula = y ~ pspline(x1, df = 2)) coef se(coef) se2 Chisq DF p pspline(x1, df = 2), line 0.0522 0.00867 0.00866 36.23 1.00 1.8e-09 pspline(x1, df = 2), nonl 3.27 1.04 7.5e-02 Iterations: 4 outer, 13 Newton-Raphson Theta= 0.91 Degrees of freedom for terms= 2 Likelihood ratio test=34.6 on 2.04 df, p=3.24e-08 2. survreg(formula = y ~ pspline(x1, df = 2)) coef se(coef)...
2019 Jan 25
0
[klibc:update-dash] builtin: Fix echo -n early termination
...n/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 78bf388a..9da4ffef 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -465,7 +465,7 @@ echocmd(int argc, char **argv) if (likely(*argv)) nonl += print_escape_str("%s", NULL, NULL, *argv++); - if (nonl > 0) + if (likely((nonl + !*argv) > 1)) break; c = *argv ? ' ' : '\n';
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix echo -n early termination
...n/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c index 78bf388a..9da4ffef 100644 --- a/usr/dash/bltin/printf.c +++ b/usr/dash/bltin/printf.c @@ -465,7 +465,7 @@ echocmd(int argc, char **argv) if (likely(*argv)) nonl += print_escape_str("%s", NULL, NULL, *argv++); - if (nonl > 0) + if (likely((nonl + !*argv) > 1)) break; c = *argv ? ' ' : '\n';
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...*str) /* Finally test for sequences valid in the format string */ str = conv_escape(str - 1, &c); ch = c; - } while (STPUTC(ch, cp), (char)ch); + } while (STPUTC(c, cp), (char)ch); + + *sp = cp; return ch; } @@ -462,8 +507,7 @@ echocmd(int argc, char **argv) do { int c; - nonl += conv_escape_str(*argv); - outstr(stackblock(), outs); + nonl += print_escape_str("%s", NULL, NULL, *argv); if (nonl > 0) break; diff --git a/usr/dash/output.c b/usr/dash/output.c index f62e7eab..1b20850a 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...*str) /* Finally test for sequences valid in the format string */ str = conv_escape(str - 1, &c); ch = c; - } while (STPUTC(ch, cp), (char)ch); + } while (STPUTC(c, cp), (char)ch); + + *sp = cp; return ch; } @@ -462,8 +507,7 @@ echocmd(int argc, char **argv) do { int c; - nonl += conv_escape_str(*argv); - outstr(stackblock(), outs); + nonl += print_escape_str("%s", NULL, NULL, *argv); if (nonl > 0) break; diff --git a/usr/dash/output.c b/usr/dash/output.c index bb7c6ada..6618cc33 100644 --- a/usr/dash/output.c +++ b/usr/dash/output.c @@ -99,9 +99,...
2006 Oct 17
0
[PATCH] misc compile fixes for tools on Solaris
...ar *)fmt, args); va_end(args); } } else { @@ -280,7 +281,7 @@ static void attr_addstr(int attr, const static void attr_addstr(int attr, const char *str) { attron(attr); - addstr(str); + addstr((char *)str); attroff(attr); } @@ -1035,7 +1036,9 @@ int main(int argc, char **argv) nonl(); keypad(stdscr, TRUE); halfdelay(5); +#ifndef __sun__ use_default_colors(); +#endif init_pair(1, -1, COLOR_YELLOW); do { diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...= conv_escape(str - 1, &c); ch = c; - } while (STPUTC(ch, cp), ch); + } while (STPUTC(ch, cp), (char)ch); - return stackblock(); + return ch; } /* @@ -451,8 +451,9 @@ echocmd(int argc, char **argv) do { char c; - outstr(conv_escape_str(*argv), outs); - if (rval & 0x100) + nonl += conv_escape_str(*argv); + outstr(stackblock(), outs); + if (nonl > 0) break; c = ' '; commit 74a2b4516e651ff198edf14f25887334186266d3 Author: Herbert Xu <herbert at gondor.apana.org.au> Date: Sun Nov 13 22:05:18 2005 +1100 Always call conv_escape_str in echocm...
2006 Jun 03
4
xentop.c error
...itscr'' xentop.c:860: warning: implicit declaration of function `start_color'' xentop.c:861: warning: implicit declaration of function `cbreak'' xentop.c:862: warning: implicit declaration of function `noecho'' xentop.c:863: warning: implicit declaration of function `nonl'' xentop.c:864: warning: implicit declaration of function `keypad'' xentop.c:864: error: `stdscr'' undeclared (first use in this function) xentop.c:864: error: `TRUE'' undeclared (first use in this function) xentop.c:865: warning: implicit declaration of function `ha...