projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ash: [PARSER] Size optimisations in parameter expansion parser
[oweals/busybox.git]
/
shell
/
shell_common.c
diff --git
a/shell/shell_common.c
b/shell/shell_common.c
index 57297155e96286d55608e34e62de759117e4e05e..98d862744432d25be36bceeac57e3de12a612a5f 100644
(file)
--- a/
shell/shell_common.c
+++ b/
shell/shell_common.c
@@
-21,6
+21,7
@@
#include <sys/resource.h> /* getrlimit */
const char defifsvar[] ALIGN1 = "IFS= \t\n";
#include <sys/resource.h> /* getrlimit */
const char defifsvar[] ALIGN1 = "IFS= \t\n";
+const char defoptindvar[] ALIGN1 = "OPTIND=1";
int FAST_FUNC is_well_formed_var_name(const char *s, char terminator)
int FAST_FUNC is_well_formed_var_name(const char *s, char terminator)
@@
-328,7
+329,7
@@
enum {
};
/* "-": treat args as parameters of option with ASCII code 1 */
};
/* "-": treat args as parameters of option with ASCII code 1 */
-static const char ulimit_opt_string[] = "-HSa"
+static const char ulimit_opt_string[]
ALIGN1
= "-HSa"
#ifdef RLIMIT_FSIZE
"f::"
#endif
#ifdef RLIMIT_FSIZE
"f::"
#endif
@@
-380,7
+381,7
@@
static void printlim(unsigned opts, const struct rlimit *limit,
val = limit->rlim_cur;
if (val == RLIM_INFINITY)
val = limit->rlim_cur;
if (val == RLIM_INFINITY)
- p
rintf("unlimited\n
");
+ p
uts("unlimited
");
else {
val >>= l->factor_shift;
printf("%llu\n", (long long) val);
else {
val >>= l->factor_shift;
printf("%llu\n", (long long) val);
@@
-493,7
+494,6
@@
shell_builtin_ulimit(char **argv)
/* bad option. getopt already complained. */
break;
}
/* bad option. getopt already complained. */
break;
}
-
} /* while (there are options) */
return 0;
} /* while (there are options) */
return 0;