File: function.cxx

package info (click to toggle)
cmtk 3.2.2-1.3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 10,428 kB
  • ctags: 11,670
  • sloc: cpp: 86,941; ansic: 23,347; sh: 3,896; xml: 1,551; perl: 700; makefile: 344
file content (107 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download | duplicates (18)
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
/*
 * 'foo_void_function()' - Do foo with bar.
 *
 * Use the @link foo_float_function@ or @link foo_int_function@ functions
 * instead.  Pass @code NULL@ for "three" then there is no string to print.
 *
 * @deprecated@
 */

void
foo_void_function(int        one,	/* I - Integer */
                  float      *two,	/* O - Real number */
                  const char *three)	/* I - String */
{
  if (one)
  {
    puts("Hello, World!");
  }
  else
    puts(three);

  *two = 2.0f;
}


/*
 * 'foo_float_function()' - Do foo with bar.
 *
 * @since 1.2@
 */

float					/* O - Real number */
foo_float_function(int        one,	/* I - Integer */
                   const char *two)	/* I - String */
{
  if (one)
  {
    puts("Hello, World!");
  }
  else
    puts(two);

  return (2.0f);
}


/*
 * 'foo_default_string()' - Do something with a defaulted string arg.
 */

int					/* O - Integer value */
foo_default_string(int one,		/* I - Integer */
                   const char *two = "2")
					/* I - String */
{
  if (one)
  {
    puts("Hello, World!");
  }
  else
    puts(two);

  return (2);
}


/*
 * 'foo_default_int()' - Do something with a defaulted int arg.
 */

int					/* O - Integer value */
foo_default_int(int one,		/* I - Integer */
                int two = 2)		/* I - Integer */
{
  if (one)
  {
    puts("Hello, World!");
  }
  else
    puts(two);

  return (2);
}


/*
 * 'foo_void_func()' - Function taking no arguments.
 */

void
foo_void_func(void)
{
  puts("foo_void_func()");
}


/*
 * 'foo_private_func()' - Private function.
 *
 * @private@
 */

void
foo_private_func(void)
{
  puts("foo_private_func()");
}