File: cdk_params.3

package info (click to toggle)
libcdk5 5.0.20161210-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,440 kB
  • ctags: 2,833
  • sloc: ansic: 32,375; sh: 4,732; makefile: 1,122; sed: 43; cpp: 41
file content (91 lines) | stat: -rw-r--r-- 2,252 bytes parent folder | download | duplicates (2)
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
'\" t
.\" $Id: cdk_params.3,v 1.4 2012/03/22 01:11:47 tom Exp $
.de XX
..
.TH cdk_params 3
.SH NAME
.XX CDKparamNumber
.XX CDKparamNumber2
.XX CDKparamString
.XX CDKparamString2
.XX CDKparseParams
.XX CDKparsePosition
.XX CDKparamValue
cdk_params \- Cdk command-line parsing
.SH SYNOPSIS
.LP
.B cc
.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
.B \-lcdk
.RI "[ " "library" " \|.\|.\|. ]"
.LP
#include <cdk.h>
.nf
.TP 15
.B "int CDKparamNumber ("
.BI "CDK_PARAMS *" "params",
.BI "int " "option");
.TP 15
.B "int CDKparamNumber2 ("
.BI "CDK_PARAMS *" "params",
.BI "int " "option",
.BI "int " "missing");
.TP 15
.B "char * CDKparamString ("
.BI "CDK_PARAMS *" "params",
.BI "int " "option");
.TP 15
.B "char * CDKparamString2 ("
.BI "CDK_PARAMS *" "params",
.BI "int " "option",
.BI "const char *" "missing");
.TP 15
.B "void CDKparseParams ("
.BI "int " "argc",
.BI "char **" "argv",
.BI "CDK_PARAMS *" "params",
.BI "const char *" "options");
.TP 15
.B "int CDKparsePosition ("
.BI "char *" "string");
.TP 15
.B "int CDKparamValue ("
.BI "CDK_PARAMS * " "params",
.BI "int " "option",
.BI "int " "missing");
.fi
.SH DESCRIPTION
These are a set of functions used to implement the command-line utilities and
demonstration programs for Cdk.
Rather than set the programs' options at initialization,
they construct a simple database which holds the common parameters
using \fBCDKparseParams()\fP.
.
.SH AVAILABLE FUNCTIONS
.TP 5
.B CDKparamNumber
Retrieves an integer (or boolean) option value from the parsed command-line.
.TP 5
.B CDKparamNumber2
Retrieves an optional integer (or boolean) value from the parsed command-line.
If the command line option is not present, the \fImissing\fP value is used.
.TP 5
.B CDKparamString
Retrieves a string option value from the parsed command-line.
.TP 5
.B CDKparamString2
Retrieve an optional string option value from the parsed command-line.
.TP 5
.B CDKparamValue
Retrieve an integer (or boolean) option value from the parsed command-line.
.TP 5
.B CDKparseParams
Parse the given argc/argv command-line, with the options passed to
getopt()'s 3rd parameter.
.TP 5
.B CDKparsePosition
Parse the string as one of CDK's positioning keywords, or an actual position.
.
.SH SEE ALSO
cdk_position (3),
getopt (3)