aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.h
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 14:04:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-09 14:04:07 +0200
commitcde46f75cbe8069e06b68396a7f6dc9564fbf2c4 (patch)
tree2406602d311b0c20d220481f7f84802caf2490f7 /shell/shell_common.h
parent1f41c885fcafc67c9e957b74ab9d223e09ff949a (diff)
downloadbusybox-w32-cde46f75cbe8069e06b68396a7f6dc9564fbf2c4.tar.gz
busybox-w32-cde46f75cbe8069e06b68396a7f6dc9564fbf2c4.tar.bz2
busybox-w32-cde46f75cbe8069e06b68396a7f6dc9564fbf2c4.zip
shell: more efficient check for EOL in read
function old new delta shell_builtin_read 1334 1320 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/shell_common.h')
-rw-r--r--shell/shell_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/shell_common.h b/shell/shell_common.h
index 1b79bffca..875fd9ea7 100644
--- a/shell/shell_common.h
+++ b/shell/shell_common.h
@@ -34,6 +34,11 @@ enum {
34 BUILTIN_READ_SILENT = 1 << 0, 34 BUILTIN_READ_SILENT = 1 << 0,
35 BUILTIN_READ_RAW = 1 << 1, 35 BUILTIN_READ_RAW = 1 << 1,
36}; 36};
37//TODO? do not provide bashisms if not asked for:
38//#if !ENABLE_HUSH_BASH_COMPAT && !ENABLE_ASH_BASH_COMPAT
39//#define shell_builtin_read(setvar,argv,ifs,read_flags,n,p,t,u,d)
40// shell_builtin_read(setvar,argv,ifs,read_flags)
41//#endif
37const char* FAST_FUNC 42const char* FAST_FUNC
38shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val), 43shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
39 char **argv, 44 char **argv,