1 /*
2 
3 -Procedure moved_  ( Move a double precision array to another )
4 
5 -Abstract
6 
7    Copy the elements of one double precision array into another
8    array.
9 
10 -Disclaimer
11 
12    THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
13    CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
14    GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
15    ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
16    PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
17    TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
18    WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
19    PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
20    SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
21    SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
22 
23    IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
24    BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
25    LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
26    INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
27    REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
28    REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
29 
30    RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
31    THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
32    CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
33    ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
34 
35 -Required_Reading
36 
37    None.
38 
39 -Keywords
40 
41    ARRAY
42 
43 */
44 
45    #include "SpiceUsr.h"
46    #include "SpiceZfc.h"
47    #include "SpiceZmc.h"
48 
49 
moved_(doublereal * arrfrm,integer * ndim,doublereal * arrto)50    int moved_ ( doublereal   * arrfrm,
51                 integer      * ndim,
52                 doublereal   * arrto  )
53 
54 /*
55 
56 -Brief_I/O
57 
58    VARIABLE  I/O              DESCRIPTION
59    --------  ---  --------------------------------------------------
60    arrfrm     I     Double precision array to be moved.
61    ndim       I     Number of elements to copy, i.e. the dimension
62                     of arrfrm and arrto.
63    arrto      O     Destination array.
64 
65 -Detailed_Input
66 
67    arrfrm     Array from which to copy items.
68 
69    ndim       Number of items to copy.
70 
71 -Detailed_Output
72 
73    arrto      Array to which items should be copied.
74 
75 -Parameters
76 
77    None.
78 
79 -Particulars
80 
81    This routine should not be called by user applications.  It exists
82    solely for the use of CSPICE functions produced by running f2c
83    on Fortran code.
84 
85 -Examples
86 
87    This function encapsulates the following memmove call:
88 
89       memmove ( (void*) arrto,
90                 (void*) arrfrm,
91                 sizeof(SpiceDouble) * ndim );
92 
93    where ndim is the number of double precision elements of the array
94    arrfrm.
95 
96    This call can be rewritten as
97 
98       moved_ ( arrfrm, &ndim, arrto );
99 
100 
101 -Restrictions
102 
103    1) This function should not be called directly by user's application
104       software.
105 
106 -Exceptions
107 
108    Error free.
109 
110 -Files
111 
112    None.
113 
114 -Author_and_Institution
115 
116    K.R. Gehringer  (JPL)
117    W.M. Owen       (JPL)
118    W.L. Taber      (JPL)
119 
120 -Literature_References
121 
122    None.
123 
124 -Version
125 
126    -CSPICE Version 1.1.0, 14-SEP-1999 (NJB)
127 
128       Now avoids passing non-positive byte count to memmove.
129 
130    -CSPICE Version 1.0.0, 04-NOV-1998 (NJB)
131 
132 -Index_Entries
133 
134    move a d.p. array to another d.p. array
135 
136 -&
137 */
138 
139 { /* Begin moved_ */
140 
141 
142    if ( *ndim > 0 )
143    {
144       MOVED ( arrfrm, (*ndim), arrto );
145    }
146 
147    return ( 0 );
148 
149 
150 } /* End moved_ */
151 
152 
153