diff options
| author | Michael Forney <mforney@mforney.org> | 2016-12-11 16:04:20 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-12-13 23:10:30 -0800 |
| commit | 293f5a93b77d92fd65db7f3d0df654f102e46cfb (patch) | |
| tree | 6ecd1170e3dd793862dd852814dc1b4cd5e44260 /pkg/ubase/patch/0007-stty-simplify.patch | |
| parent | 9a506a6834df01a26795cea222b410f206efa9fa (diff) | |
Move to flat package hierarchy
Note to self: never try to move submodules again
To migrate your existing submodules (more or less):
set -x
set -e
mkdir .git/modules/pkg
for old in */*/src ; do
new="pkg/${old#*/}"
if ! [ -f "$old/.git" ] || [ "${old%%/*}" = pkg ] ; then
continue
fi
git -C ".git/modules/$old" config core.worktree "../../../../../$new"
rmdir "$new"
mv "$old" "$new"
sed -e "s,$old,$new," "$new/.git" > "$new/.git.tmp"
mv "$new/.git.tmp" "$new/.git"
mkdir ".git/modules/${new%/src}"
mv ".git/modules/$old" ".git/modules/$new"
rm "${old%/src}"/*.ninja
mv "${old%/src}"/*.tar.{gz,xz,bz2} "${new%/src}/"
rmdir "${old%/src}" || true
done
sed -e 's,^\[submodule "[^/]*/,[submodule "pkg/,' .git/config > .git/config.tmp
mv .git/config.tmp .git/config
Diffstat (limited to 'pkg/ubase/patch/0007-stty-simplify.patch')
| -rw-r--r-- | pkg/ubase/patch/0007-stty-simplify.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkg/ubase/patch/0007-stty-simplify.patch b/pkg/ubase/patch/0007-stty-simplify.patch new file mode 100644 index 00000000..e4039231 --- /dev/null +++ b/pkg/ubase/patch/0007-stty-simplify.patch @@ -0,0 +1,49 @@ +From 450963b1b1167b6b38dd0d78612015d79a9381bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= <maandree@kth.se> +Date: Sat, 2 Apr 2016 02:39:15 +0200 +Subject: [PATCH] stty: simplify +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Mattias Andrée <maandree@kth.se> +--- + stty.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/stty.c b/stty.c +index e21ab24..9da517c 100644 +--- a/stty.c ++++ b/stty.c +@@ -438,12 +438,12 @@ parseoperand_mode(char *arg, struct termios *mode) + } + + static long long +-estrtonum_radix(const char *numstr, long long minval, long long maxval, int radix) ++estrtonum_anyradix(const char *numstr, long long minval, long long maxval) + { + long long ll = 0; + char *ep; + errno = 0; +- ll = strtoll(numstr, &ep, radix); ++ ll = strtoll(numstr, &ep, 0); + if (numstr == ep || *ep != '\0') + eprintf("strtoll %s: invalid\n", numstr); + else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) +@@ -475,12 +475,8 @@ parseoperand_key(char *arg0, char *arg1, struct termios *mode) + value = arg1[0]; + else if (arg1[0] == '^') + value = (cc_t)(arg1[1]) & ~0x60; +- else if (strstr(arg1, "0x") == arg1) +- value = estrtonum_radix(arg1 + 2, 0, CC_MAX, 16); +- else if (arg1[0] == '0' && arg1[1]) +- value = estrtonum_radix(arg1 + 1, 0, CC_MAX, 8); + else +- value = estrtonum_radix(arg1 + 0, 0, CC_MAX, 10); ++ value = estrtonum_anyradix(arg1, 0, CC_MAX); + + mode->c_cc[op->index] = value; + return 0; +-- +2.8.1 + |
