Modular C
C◼short◼minmax: symbols inserted from C◼snippet◼minmax.
+ Collaboration diagram for C◼short◼minmax: symbols inserted from C◼snippet◼minmax.:
C◼short C◼short◼minv (__size n, C◼short volatile arr[n])
 Compute the minimum value of array arr. More...
 
C◼short C◼short◼maxv (__size n, C◼short volatile arr[n])
 Compute the minimum value of array arr. More...
 
#define C◼short◼min(...)   C◼short◼minv(C◼snippet◼minmax◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼short, __VA_ARGS__))
 Compute the minimum of the argument list. More...
 
#define C◼short◼max(...)   C◼short◼maxv(C◼snippet◼minmax◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼short, __VA_ARGS__))
 Compute the minimum of the argument list. More...
 

Detailed Description

See also
C◼snippet◼minmax snippet: identifiers inserted directly to an importer for details

This import does not fill any slots.

Macro Definition Documentation

§ C◼short◼max

#define C◼short◼max (   ...)    C◼short◼maxv(C◼snippet◼minmax◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼short, __VA_ARGS__))

Compute the minimum of the argument list.

Definition at line 209 of file C-short.c.

§ C◼short◼min

#define C◼short◼min (   ...)    C◼short◼minv(C◼snippet◼minmax◼ALEN(C◼short, __VA_ARGS__), C◼snippet◼minmax◼ARRAY(C◼short, __VA_ARGS__))

Compute the minimum of the argument list.

Definition at line 189 of file C-short.c.

Function Documentation

§ C◼short◼maxv()

C◼short C◼short◼maxv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Compute the minimum value of array arr.

Definition at line 195 of file C-short.c.

195  {
196 #line 39 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
197  C◼short ret = arr[0];
198  for (__size i = 1; i < n; ++i) {
199 #line 41 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
200  C◼short val = arr[i];
201  if (val > ret) ret = val;
202  }
203  return ret;
204 }
short C◼short
Definition: C-short.c:124

§ C◼short◼minv()

C◼short C◼short◼minv ( __size  n,
C◼short volatile  arr[n] 
)
inline

Compute the minimum value of array arr.

Definition at line 175 of file C-short.c.

175  {
176 #line 21 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
177  C◼short ret = arr[0];
178  for (__size i = 1; i < n; ++i) {
179 #line 23 "/home/gustedt/build/cmod/C/C-snippet-minmax.X"
180  C◼short val = arr[i];
181  if (val < ret) ret = val;
182  }
183  return ret;
184 }
short C◼short
Definition: C-short.c:124