4 -- Grant of Unlimited Rights
6 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
7 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
8 -- unlimited rights in the software and documentation contained herein.
9 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
10 -- this public release, the Government intends to confer upon all
11 -- recipients unlimited rights equal to those held by the Government.
12 -- These rights include rights to use, duplicate, release or disclose the
13 -- released technical data and computer software in whole or in part, in
14 -- any manner and for any purpose whatsoever, and to have or permit others
19 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
20 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
21 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
22 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
23 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
24 -- PARTICULAR PURPOSE OF SAID MATERIAL.
27 -- FUNCTION NAME: CXB30130 ("square_it")
29 -- FUNCTION DESCRIPTION:
30 -- This C function returns the square of num1 through the function
31 -- name, and returns the square of parameters num2, num3, and num4
32 -- through the argument list (modifying the objects pointed to by
36 -- This function requires that four parameters be passed to it.
37 -- The types of these parameters are, in order: int, pointer to short,
38 -- pointer to float, and pointer to double.
41 -- The function will calculate the square of the int parameter (num1),
42 -- and return this value as the function result through the function
43 -- name. The function will also calculate the square of the values
44 -- pointed to by the remaining three parameters (num2, num3, num4),
45 -- and will modify the referenced memory locations to contain the
49 -- The square of num1 is returned through function name.
50 -- Parameters num2-num4 now point to values that are the squared results
51 -- of the originally referenced values (i.e., the original values are
52 -- modified as a result of this function).
55 -- 12 Oct 95 SAIC Initial prerelease version.
60 int CXB30130 (int num1
, short* num2
, float* num3
, double* num4
)
62 /* NOTE: The above function definition should be accepted by an ANSI-C */
63 /* compiler. Older C compilers may reject it; they may, however */
64 /* accept the following five lines. An implementation may comment */
65 /* out the above function definition and uncomment the following */
66 /* one. Otherwise, an implementation must provide the necessary */
67 /* modifications to this C code to satisfy the function */
68 /* requirements (see Function Description). */
70 /* int CXB30130 (num1, num2, num3, num4) */
80 return_value
= num1
* num1
;
81 *num2
= *num2
* *num2
; /* Return square of these parameters through */
82 *num3
= *num3
* *num3
; /* the parameter list. */
83 *num4
= *num4
* *num4
;
85 return (return_value
); /* Return square of num1 through function name */