This file is indexed.

/usr/share/autoproject/cli/c/argp/program.c is in autoproject 0.20-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/* 
   #NAME# - #DESCRIPTION#

   Copyright (C) #YEAR# #AUTHOR#

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  

#include <termios.h>
#include <grp.h>
#include <pwd.h>
*/

#include <stdio.h>
#include <sys/types.h>
#include <argp.h>
#include "system.h"

#define EXIT_FAILURE 1

#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# define textdomain(Domain)
# define _(Text) Text
#endif
#define N_(Text) Text

char *xmalloc ();
char *xrealloc ();
char *xstrdup ();

static error_t parse_opt (int key, char *arg, struct argp_state *state);
static void show_version (FILE *stream, struct argp_state *state);

/* argp option keys */
enum {DUMMY_KEY=129
@brief@
      ,BRIEF_KEY
@@
@dry-run@
      ,DRYRUN_KEY
@@
@no-warn@
      ,NOWARN_KEY
@@
@cd@
      ,CD_KEY
@@
@directory@
      ,DIRECTORY_KEY
@@
};

/* Option flags and variables.  These are initialized in parse_opt.  */

@output@
char *oname;			/* --output=FILE */
FILE *ofile;
@@
@cd@
char *new_directory;		/* --cd=DIRECTORY */
@@
@directory@
char *desired_directory;	/* --directory=DIR */
@@
@interactive@
int want_interactive;		/* --interactive */
@@
@quiet@
int want_quiet;			/* --quiet, --silent */
@@
@brief@
int want_brief;			/* --brief */
@@
@verbose@
int want_verbose;		/* --verbose */
@@
@dry-run@
int want_dry_run;		/* --dry-run */
@@
@no-warn@
int want_no_warn;		/* --no-warn */
@@

static struct argp_option options[] =
{
@interactive@
  { "interactive", 'i',           NULL,            0,
    N_("Prompt for confirmation"), 0 },
@@
@output@
  { "output",      'o',           N_("FILE"),      0,
    N_("Send output to FILE instead of standard output"), 0 },
@@
@quiet@
  { "quiet",       'q',           NULL,            0,
    N_("Inhibit usual output"), 0 },
  { "silent",      0,             NULL,            OPTION_ALIAS,
    NULL, 0 },
@@
@brief@
  { "brief",       BRIEF_KEY,     NULL,            0,
    N_("Shorten output"), 0 },
@@
@verbose@
  { "verbose",     'v',           NULL,            0,
    N_("Print more information"), 0 },
@@
@dry-run@
  { "dry-run",     DRYRUN_KEY,    NULL,            0,
    N_("Take no real actions"), 0 },
@@
@no-warn@
  { "no-warn",     NOWARN_KEY,    NULL,            0,
    N_("Disable warnings"), 0 },
@@
@cd@
  { "cd",          CD_KEY,        N_("DIRECTORY"), 0,
    N_("Change to DIRECTORY before proceeding"), 0 },
@@
@directory@
  { "directory",   DIRECTORY_KEY, N_("DIR"),       0,
    N_("Use directory DIR"), 0 },
@@
  { NULL, 0, NULL, 0, NULL, 0 }
};

/* The argp functions examine these global variables.  */
const char *argp_program_bug_address = "<#EMAIL#>";
void (*argp_program_version_hook) (FILE *, struct argp_state *) = show_version;

static struct argp argp =
{
  options, parse_opt, N_("[FILE...]"),
  N_("#DESCRIPTIONC#"),
  NULL, NULL, NULL
};

int
main (int argc, char **argv)
{
  textdomain(PACKAGE);
  argp_parse(&argp, argc, argv, 0, NULL, NULL);

  /* TODO: do the work */

  exit (0);
}

/* Parse a single option.  */
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
  switch (key)
    {
    case ARGP_KEY_INIT:
      /* Set up default values.  */
@output@
      oname = "stdout";
      ofile = stdout;
@@
@cd@
      new_directory = NULL;
@@
@directory@
      desired_directory = NULL;
@@
@interactive@
      want_interactive = 0;
@@
@quiet@
      want_quiet = 0;
@@
@brief@
      want_brief = 0;
@@
@verbose@
      want_verbose = 0;
@@
@dry-run@
      want_dry_run = 0;
@@
@no-warn@
      want_no_warn = 0;
@@
      break;

@interactive@
    case 'i':			/* --interactive */
      want_interactive = 1;
      break;
@@
@output@
    case 'o':			/* --output */
      oname = xstrdup (arg);
      ofile = fopen (oname, "w");
      if (!ofile)
	argp_failure (state, EXIT_FAILURE, errno,
		      _("Cannot open %s for writing"), oname);
      break;
@@
@quiet@
    case 'q':			/* --quiet, --silent */
      want_quiet = 1;
      break;
@@
@brief@
    case BRIEF_KEY:		/* --brief */
      want_brief = 1;
      break;
@@
@verbose@
    case 'v':			/* --verbose */
      want_verbose = 1;
      break;
@@
@dry-run@
    case DRYRUN_KEY:		/* --dry-run */
      want_dry_run = 1;
      break;
@@
@no-warn@
    case NOWARN_KEY:		/* --no-warn */
      want_no_warn = 1;
      break;
@@
@cd@
    case CD_KEY:		/* --cd */
      new_directory = xstrdup (optarg);
      break;
@@
@directory@
    case DIRECTORY_KEY:		/* --directory */
      desired_directory = xstrdup (optarg);
      break;
@@

    case ARGP_KEY_ARG:		/* [FILE]... */
      /* TODO: Do something with ARG, or remove this case and make
         main give argp_parse a non-NULL fifth argument.  */
      break;

    default:
      return ARGP_ERR_UNKNOWN;
    }
  return 0;
}

/* Show the version number and copyright information.  */
static void
show_version (FILE *stream, struct argp_state *state)
{
  (void) state;
  /* Print in small parts whose localizations can hopefully be copied
     from other programs.  */
  fputs(PACKAGE" "VERSION"\n", stream);
  fprintf(stream, _("Written by %s.\n\n"), "#AUTHOR#");
  fprintf(stream, _("Copyright (C) %s %s\n"), "#YEAR#", "#AUTHOR#");
  fputs(_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License.  This program has absolutely no warranty.\n"),
	stream);
}