\xHH hexadecimal values (1 to 2 digits)
*/
+#define THIS echo
#include "toys.h"
+#define FLAG_e (1<<1)
+#define FLAG_n (1<<0)
+
void echo_main(void)
{
int i = 0, out;
// Should we output arg verbatim?
- if (!(toys.optflags&2)) {
+ if (!(toys.optflags&FLAG_e)) {
xprintf("%s", arg);
continue;
}
}
// Output "\n" if no -n
- if (!(toys.optflags&1)) xputc('\n');
+ if (!(toys.optflags&FLAG_n)) xputc('\n');
done:
xflush();
}