Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/coreutils/expr.c

    r2725 r3232  
    2626/* no getopt needed */
    2727
     28//usage:#define expr_trivial_usage
     29//usage:       "EXPRESSION"
     30//usage:#define expr_full_usage "\n\n"
     31//usage:       "Print the value of EXPRESSION to stdout\n"
     32//usage:    "\n"
     33//usage:       "EXPRESSION may be:\n"
     34//usage:       "    ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n"
     35//usage:       "    ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n"
     36//usage:       "    ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n"
     37//usage:       "    ARG1 <= ARG2\n"
     38//usage:       "    ARG1 = ARG2\n"
     39//usage:       "    ARG1 != ARG2\n"
     40//usage:       "    ARG1 >= ARG2\n"
     41//usage:       "    ARG1 > ARG2\n"
     42//usage:       "    ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n"
     43//usage:       "    ARG1 - ARG2\n"
     44//usage:       "    ARG1 * ARG2\n"
     45//usage:       "    ARG1 / ARG2\n"
     46//usage:       "    ARG1 % ARG2\n"
     47//usage:       "    STRING : REGEXP     Anchored pattern match of REGEXP in STRING\n"
     48//usage:       "    match STRING REGEXP Same as STRING : REGEXP\n"
     49//usage:       "    substr STRING POS LENGTH Substring of STRING, POS counted from 1\n"
     50//usage:       "    index STRING CHARS  Index in STRING where any CHARS is found, or 0\n"
     51//usage:       "    length STRING       Length of STRING\n"
     52//usage:       "    quote TOKEN     Interpret TOKEN as a string, even if\n"
     53//usage:       "                it is a keyword like 'match' or an\n"
     54//usage:       "                operator like '/'\n"
     55//usage:       "    (EXPRESSION)        Value of EXPRESSION\n"
     56//usage:       "\n"
     57//usage:       "Beware that many operators need to be escaped or quoted for shells.\n"
     58//usage:       "Comparisons are arithmetic if both ARGs are numbers, else\n"
     59//usage:       "lexicographical. Pattern matches return the string matched between\n"
     60//usage:       "\\( and \\) or null; if \\( and \\) are not used, they return the number\n"
     61//usage:       "of characters matched or 0."
     62
    2863#include "libbb.h"
    2964#include "xregex.h"
     
    66101} FIX_ALIASING;
    67102#define G (*(struct globals*)&bb_common_bufsiz1)
     103#define INIT_G() do { } while (0)
    68104
    69105/* forward declarations */
     
    485521    VALUE *v;
    486522
     523    INIT_G();
     524
    487525    xfunc_error_retval = 2; /* coreutils compat */
    488526    G.args = argv + 1;
Note: See TracChangeset for help on using the changeset viewer.