This file is indexed.

/usr/include/gwenhywfar4/gwenhywfar/args.h is in libgwenhywfar60-dev 4.3.1-1.

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
/***************************************************************************
 $RCSfile$
                             -------------------
    cvs         : $Id$
    begin       : Sat Apr 24 2004
    copyright   : (C) 2004 by Martin Preuss
    email       : martin@libchipcard.de

 ***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or         *
 *   modify it under the terms of the GNU Lesser General Public            *
 *   License as published by the Free Software Foundation; either          *
 *   version 2.1 of the License, or (at your option) any later version.    *
 *                                                                         *
 *   This library 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     *
 *   Lesser General Public License for more details.                       *
 *                                                                         *
 *   You should have received a copy of the GNU Lesser General Public      *
 *   License along with this library; if not, write to the Free Software   *
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
 *   MA  02111-1307  USA                                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef GWENHYWFAR_ARGS_H
#define GWENHYWFAR_ARGS_H

#include <gwenhywfar/gwenhywfarapi.h>

#ifdef __cplusplus
extern "C" {
#endif
typedef struct GWEN_ARGS GWEN_ARGS;
#ifdef __cplusplus
}
#endif

#include <gwenhywfar/types.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/db.h>

#ifdef __cplusplus
extern "C" {
#endif


#define GWEN_ARGS_FLAGS_HAS_ARGUMENT     0x00000001
#define GWEN_ARGS_FLAGS_LAST             0x00000002
#define GWEN_ARGS_FLAGS_HELP             0x00000004

#define GWEN_ARGS_MODE_ALLOW_FREEPARAM   0x00000001
#define GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002

#define GWEN_ARGS_RESULT_ERROR (-1)
#define GWEN_ARGS_RESULT_HELP  (-2)


typedef enum {
  GWEN_ArgsType_Char=0,
  GWEN_ArgsType_Int
} GWEN_ARGS_TYPE;

typedef enum {
  GWEN_ArgsOutType_Txt=0,
  GWEN_ArgsOutType_Html
} GWEN_ARGS_OUTTYPE;


/**
 * This is one of the very few structs inside Gwenhywfar whose
 * contents are available for direct access to the the program.
 * Developer's note: Please note that any change within this struct will
 * make it necessary to increment the SO_VERSION of the library !
 */
struct GWEN_ARGS {
  uint32_t flags;
  GWEN_ARGS_TYPE type;
  const char *name;
  unsigned int minNum;
  unsigned int maxNum;
  const char *shortOption;
  const char *longOption;
  const char *shortDescription;
  const char *longDescription;
};


/**
 * This function parses the given argument list.
 * Known options are stored within the given DB under their respective name.
 * Free parameters (which are arguments without leading "-"'s) are stored in
 * the variable "params" of the given db.
 */
GWENHYWFAR_API
int GWEN_Args_Check(int argc, char **argv,
		    int startAt,
		    uint32_t mode,
		    const GWEN_ARGS *args,
		    GWEN_DB_NODE *db);

/** Print a "usage" message into the given GWEN_BUFFER @c
 * ubuf. The message lists all available options. The
 * GWEN_ARGS_OUTTYPE argument is supposed to offer either text or
 * html as output format, but currently only text is
 * implemented. */
GWENHYWFAR_API
int GWEN_Args_Usage(const GWEN_ARGS *args, GWEN_BUFFER *ubuf,
                    GWEN_ARGS_OUTTYPE ot);

/** Currently unimplemented; does nothing and returns zero. */
GWENHYWFAR_API
int GWEN_Args_ShortUsage(const GWEN_ARGS *args, GWEN_BUFFER *ubuf,
                         GWEN_ARGS_OUTTYPE ot);

#ifdef __cplusplus
}
#endif


#endif /* GWENHYWFAR_ARGS_H */