~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/blenlib/BLI_args.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * A general argument parsing module
3
 
 *
4
 
 * $Id: BLI_args.h 28965 2010-05-24 18:53:45Z theeth $
5
 
 *
 
1
/*
6
2
 * ***** BEGIN GPL LICENSE BLOCK *****
7
3
 *
8
4
 * This program is free software; you can redistribute it and/or
29
25
 * ***** END GPL LICENSE BLOCK *****
30
26
 */
31
27
 
32
 
#ifndef BLI_ARGS_H
33
 
#define BLI_ARGS_H
 
28
#ifndef __BLI_ARGS_H__
 
29
#define __BLI_ARGS_H__
 
30
 
 
31
/** \file BLI_args.h
 
32
 *  \ingroup bli
 
33
 *  \brief A general argument parsing module.
 
34
 */
34
35
 
35
36
struct bArgs;
36
37
typedef struct bArgs bArgs;
37
38
 
38
39
/* returns the number of extra arguments consumed by the function. 0 is normal value, -1 stops parsing arguments, other negative indicates skip */
39
 
typedef int     (*BA_ArgCallback)(int argc, char **argv, void *data);
 
40
typedef int     (*BA_ArgCallback)(int argc, const char **argv, void *data);
40
41
 
41
 
struct bArgs *BLI_argsInit(int argc, char **argv);
 
42
struct bArgs *BLI_argsInit(int argc, const char **argv);
42
43
void BLI_argsFree(struct bArgs *ba);
43
44
 
44
45
/* pass starts at 1, -1 means valid all the time
45
46
 * short_arg or long_arg can be null to specify no short or long versions
46
47
 * */
47
 
void BLI_argsAdd(struct bArgs *ba, int pass, char *short_arg, char *long_arg, char *doc, BA_ArgCallback cb, void *data);
 
48
void BLI_argsAdd(struct bArgs *ba, int pass, const char *short_arg, const char *long_arg, const char *doc, BA_ArgCallback cb, void *data);
48
49
/* short_case and long_case specify if those arguments are case specific */
49
 
void BLI_argsAddCase(struct bArgs *ba, int pass, char *short_arg, int short_case, char *long_arg, int long_case, char *doc, BA_ArgCallback cb, void *data);
 
50
void BLI_argsAddCase(struct bArgs *ba, int pass, const char *short_arg, int short_case, const char *long_arg, int long_case, const char *doc, BA_ArgCallback cb, void *data);
50
51
 
51
52
void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *data);
52
53
 
53
 
void BLI_argsPrintArgDoc(struct bArgs *ba, char *arg);
 
54
void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg);
54
55
void BLI_argsPrintOtherDoc(struct bArgs *ba);
55
56
 
56
57
void BLI_argsPrint(struct bArgs *ba);
57
 
char **BLI_argsArgv(struct bArgs *ba);
 
58
const char **BLI_argsArgv(struct bArgs *ba);
58
59
 
59
60
#endif