diff pads2gpcb/mainoutput.c @ 74:58f11f06d831

pads2gpcb: main output implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 01 Feb 2016 00:45:24 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pads2gpcb/mainoutput.c	Mon Feb 01 00:45:24 2016 +0000
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "globals.h"
+#include "struct.h"
+
+write_elements_pcb(filename)
+	char *filename;
+{
+	struct part_instance *p;
+	FILE *outf;
+
+	outf = fopen(filename, "w");
+	if (!outf) {
+		perror(filename);
+		exit(1);
+	}
+	for (p = part_inst_list; p; p = p->next) {
+		if (!p->newname)
+			continue;
+		write_gpcb_element(outf, p->body, p->type->alpha_pins,
+				   p->type->name, p->newname, p->decal->name,
+				   p->onbottom);
+	}
+	fclose(outf);
+	return(0);
+}