~ubuntu-branches/ubuntu/saucy/di/saucy

« back to all changes in this revision

Viewing changes to getopt.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2010-08-08 22:40:18 UTC
  • mto: (1.1.11 upstream) (3.1.5 sid)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100808224018-g3c2h2nlwtcd37ve
ImportĀ upstreamĀ versionĀ 4.26

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
$Id: getopt.c,v 1.10 2009-11-23 11:23:48-08 bll Exp $
3
 
$Source: /home/bll/DI/RCS/getopt.c,v $
 
2
$Id: getopt.c,v 1.14 2010-07-14 01:54:51-07 bll Exp $
 
3
$Source: /home/bll/DI/di/RCS/getopt.c,v $
4
4
*/
5
5
 
6
6
#include "config.h"
7
7
 
8
 
#if ! defined (_lib_getopt)
 
8
#if ! _lib_getopt
9
9
 
10
10
/*
11
11
 *
12
 
 * $Id: getopt.c,v 1.10 2009-11-23 11:23:48-08 bll Exp $
 
12
 * $Id: getopt.c,v 1.14 2010-07-14 01:54:51-07 bll Exp $
13
13
 *
14
14
 * getopt - get option letter from argv
15
15
 *
17
17
 *
18
18
 */
19
19
 
20
 
#include <stdio.h>
 
20
#if _hdr_stdio
 
21
# include <stdio.h>
 
22
#endif
21
23
#if _hdr_stdlib
22
24
# include <stdlib.h>
23
25
#endif
24
26
#if _hdr_string
25
27
# include <string.h>
26
28
#endif
27
 
#if _hdr_strings && ((! defined (_hdr_string)) || (_include_string))
 
29
#if _hdr_strings
28
30
# include <strings.h>
29
31
#endif
30
32
 
35
37
 
36
38
int
37
39
#if _proto_stdc
38
 
getopt (int argc, char *argv [], char *optstring)
 
40
getopt (int argc, char * const argv [], const char *optstring)
39
41
#else
40
42
getopt (argc, argv, optstring)
41
43
    int argc;
42
 
    char *argv[];
43
 
    char *optstring;
 
44
    char * const argv[];
 
45
    const char *optstring;
44
46
#endif
45
47
{
46
48
    char c;