[go: up one dir, main page]

File: writepath.c

package info (click to toggle)
circlepack 5.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 2,828 kB
  • ctags: 1,683
  • sloc: ansic: 43,152; makefile: 46
file content (22 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "cp_types.h"
#include "cp_proto.h"

/* Write path data to open file. */

int writepath(FILE *fp,struct Pathlist *pathlist)
{
  int count=0;
  struct Pathlist *trace;

  if (!fp) return 0;
  fprintf(fp,"PATH\n");
  trace=pathlist;
  while (trace!=NULL)
    {
      fprintf(fp,"%f %f \n",trace->x,trace->y);
      trace=trace->next;
      count++;
    }
  fprintf(fp,"END\n");
  return count;
} /* writepath */