Changeset b5143bd in mainline for uspace/lib/c/generic/getopt.c


Ignore:
Timestamp:
2015-06-06T01:50:56Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0453261
Parents:
94e46c9 (diff), 87a2f9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/getopt.c

    r94e46c9 rb5143bd  
    9595 * Compute the greatest common divisor of a and b.
    9696 */
    97 static int
    98 gcd(a, b)
    99         int a;
    100         int b;
     97static int gcd(int a, int b)
    10198{
    10299        int c;
    103 
     100       
    104101        c = a % b;
    105102        while (c != 0) {
     
    108105                c = a % b;
    109106        }
    110            
     107       
    111108        return b;
    112109}
     
    117114 * in each block).
    118115 */
    119 static void
    120 permute_args(panonopt_start, panonopt_end, opt_end, nargv)
    121         int panonopt_start;
    122         int panonopt_end;
    123         int opt_end;
    124         char **nargv;
     116static void permute_args(int panonopt_start, int panonopt_end, int opt_end,
     117    char **nargv)
    125118{
    126119        int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
     
    157150 *  Returns -2 if -- is found (can be long option or end of options marker).
    158151 */
    159 static int
    160 getopt_internal(nargc, nargv, options)
    161         int nargc;
    162         char **nargv;
    163         const char *options;
     152static int getopt_internal(int nargc, char **nargv, const char *options)
    164153{
    165154        const char *oli;                                /* option letter list index */
     
    299288 *      Parse argc/argv argument vector.
    300289 */
    301 int
    302 getopt(nargc, nargv, options)
    303         int nargc;
    304         char * const *nargv;
    305         const char *options;
     290int getopt(int nargc, char * const *nargv, const char *options)
    306291{
    307292        int retval;
     
    332317 *      Parse argc/argv argument vector.
    333318 */
    334 int
    335 getopt_long(nargc, nargv, options, long_options, idx)
    336         int nargc;
    337         char * const *nargv;
    338         const char *options;
    339         const struct option *long_options;
    340         int *idx;
     319int getopt_long(int nargc, char * const *nargv, const char *options,
     320    const struct option *long_options, int *idx)
    341321{
    342322        int retval;
Note: See TracChangeset for help on using the changeset viewer.