File: tester.c

package info (click to toggle)
pcb-rnd 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,428 kB
  • sloc: ansic: 249,627; yacc: 5,981; sh: 5,748; makefile: 3,595; awk: 2,704; lex: 1,094; python: 519; lisp: 169; xml: 128; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (39 lines) | stat: -rw-r--r-- 878 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "gedasymbols.h"

#undef strdup
char *rnd_strdup(const char *s) { return strdup(s); }

pcb_plug_fp_t *pcb_plug_fp_chain = NULL;

pcb_library_t ltmp;
pcb_library_t *pcb_fp_mkdir_p(const char *path)
{
	printf("lib mkdir: '%s'\n", path);
	return (library_t *)&ltmp;
}

pcb_library_t *pcb_fp_append_entry(library_t *parent, const char *name, pcb_fp_type_t type, void *tags[], rnd_bool dup_tags)
{
	printf("lib entry: '%s'\n", name);
	return (library_t *)&ltmp;
}

int main()
{
	pcb_fp_fopen_ctx_t fctx;
	FILE *f;
	char line[1024];

/*	fp_gedasymbols_load_dir(NULL, "gedasymbols://", 1); */
	f = fp_gedasymbols_fopen(NULL, NULL, "wget@gedasymbols/user/sean_depagnier/footprints/HDMI_CONN.fp", &fctx);

	while(fgets(line, sizeof(line), f) != NULL)
		printf("|%s", line);

	fp_gedasymbols_fclose(NULL, f, &fctx);

}