1 |
– |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Convert MGF (Materials and Geometry Format) to Metafile 2-d graphics |
6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdio.h> |
9 |
+ |
#include <stdlib.h> |
10 |
+ |
#include <string.h> |
11 |
|
#include <math.h> |
12 |
|
#include "random.h" |
13 |
|
#include "mgflib/parser.h" |
16 |
|
#define MX(v) (int)(MSIZE*(v)[(proj_axis+1)%3]) |
17 |
|
#define MY(v) (int)(MSIZE*(v)[(proj_axis+2)%3]) |
18 |
|
|
19 |
< |
#ifdef DCL_ATOF |
21 |
< |
extern double atof(); |
22 |
< |
#endif |
23 |
< |
|
24 |
< |
int r_face(); |
19 |
> |
int r_face(int ac, char **av); |
20 |
|
int proj_axis; |
21 |
|
double limit[3][2]; |
22 |
|
int layer; |
112 |
|
|
113 |
|
newlayer() /* start a new layer */ |
114 |
|
{ |
115 |
< |
#ifdef BSD |
121 |
< |
bzero((char *)hshtab, sizeof(hshtab)); |
122 |
< |
#else |
123 |
< |
(void)memset((char *)hshtab, 0, sizeof(hshtab)); |
124 |
< |
#endif |
115 |
> |
(void)memset((char *)hshtab, '\0', sizeof(hshtab)); |
116 |
|
if (++layer >= 16) { |
117 |
|
mendpage(); |
118 |
|
layer = 0; |