Mail Archives: geda-user/2011/10/01/23:32:37
That's me!
http://www.geda.seul.org/mailinglist/geda-dev38/msg00032.html
Feel free to take it as public domain.
On Sat, Oct 1, 2011 at 4:54 PM, Bob Paddock <bob DOT paddock AT gmail DOT com> wrote:
> I came across some old PCB code for making elements, circa 2004, in my archives.
> I'd like to know who wrote it as there is no attribution or licenses
> information.
>
> Package consists of library.c library.h and a 'C' file for each
> produced element, which includes library.h.
>
> library.c starts off:
>
> #include <stdio.h>
> #include <math.h>
> #include <stdlib.h>
> #include "library.h"
>
> #define PIN Â Â 0
> #define PAD Â Â 1
> #define BORE Â Â 2
>
> #define MILS Â Â 1
> #define MM Â Â Â 2
>
> #define FACTOR 39.37
>
> static int    l_conversion = MILS;   // Conversion factor, start in mils
> static int    l_pad_width = 60;    // Pad width, in mils
> ...
>
> An example, diode.c, looks like:
>
> #define DIMC 6.8
> #define DIMZ DIMC + DIMY
>
> #define DIMY 2.0
> #define DIMX 3.0
>
> #define WIDTH 7.0
> #define HEIGHT 9.5
>
> void make_element(void)
> {
> Â Â Â Â set_mm();
>
> Â Â Â Â header("Big Diode", "D1", "diode", 0, 0, RIGHT);
>
> Â Â Â Â set_pad(DIMZ - DIMC, DIMX, .2, DIMX + .2);
> Â Â Â Â up(DIMC / 2.0);
> Â Â Â Â pads_down(DIMC, 2, 1, -1);
>
> Â Â Â Â up(DIMC / 2.0 + HEIGHT / 2.0);
> Â Â Â Â left(WIDTH / 2.0);
>
> Â Â Â Â pen_on();
> Â Â Â Â right(WIDTH);
> Â Â Â Â down(HEIGHT);
> Â Â Â Â left(WIDTH);
> Â Â Â Â up(HEIGHT + 1);
> Â Â Â Â right(WIDTH);
> Â Â Â Â down(1);
>
> }
>
> Anyone recognize this package?
>
> I want to update it, and want to know who to attribute the work to.
>
>
- Raw text -