Asterisk - The Open Source Telephony Project  18.5.0
Functions
median.c File Reference
#include "f2c.h"
Include dependency graph for median.c:

Go to the source code of this file.

Functions

integer median_ (integer *d1, integer *d2, integer *d3)
 

Function Documentation

◆ median_()

integer median_ ( integer d1,
integer d2,
integer d3 
)

Definition at line 69 of file median.c.

Referenced by decode_().

70 {
71  /* System generated locals */
72  integer ret_val;
73 
74 /* Arguments */
75  ret_val = *d2;
76  if (*d2 > *d1 && *d2 > *d3) {
77  ret_val = *d1;
78  if (*d3 > *d1) {
79  ret_val = *d3;
80  }
81  } else if (*d2 < *d1 && *d2 < *d3) {
82  ret_val = *d1;
83  if (*d3 < *d1) {
84  ret_val = *d3;
85  }
86  }
87  return ret_val;
88 } /* median_ */
INT32 integer
Definition: lpc10.h:80