#include <snapshot/snapshot.h> #include <snapshot/get_snap.c> get_snap(instr, btab, nbody, tsnap, bits) stream instr; Body **btab; int *nbody, *bits; real *tsnap; Descriptionget_snap is a generic method for reading snapshot data from a file, to be included by the preprocessor in an application program. It assumes that a body structure with standard declaration and accessor macros Body, Mass(), Phase(), etc has been defined (see body(3NEMO)). Notes: (1) if *btab == NULL, a new body array of length nbody will be allocated, which may be accessed when get_snap returns, while if *btab != NULL, it must point to an array of length nbody, and any new data in the input stream replaces the data in the body table. (2) bits is the logical OR of the bit flags for the individual components, defined in snapshot/snapshot.h. (3) The name get_snap is a macro, defined by get_snap.c, so the include statement must come before the first usage. (4) The vanilla get_snap or any subsidiary routine may be replaced by giving the macro name a definition before including get_snap.c. See Alsoput_snap(3NEMO), body(3NEMO), snapshot(5NEMO). AuthorJoshua E. Barnes.