This is spheresave.c in view mode; [Download] [Up]
#include <stdio.h>
#include "transform.h"
#include "geom.h"
#include "geomclass.h"
#include "sphereP.h"
Sphere *SphereFSave(sphere, f, fname)
Sphere *sphere;
FILE *f;
char *fname;
{
if (sphere == NULL) return NULL;
switch(sphere->space) {
case TM_HYPERBOLIC:
fprintf(f, "%c", 'H');
break;
case TM_SPHERICAL:
fprintf(f, "%c", 'S');
break;
}
fprintf(f, "SPHERE\n");
fprintf(f, "%g %g %g %g", sphere->radius, sphere->center.x,
sphere->center.y, sphere->center.z);
return (ferror(f) ? NULL : sphere);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.