utils
|
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <config.h>
#include <libgeda/colors.h>
Go to the source code of this file.
Data Structures | |
struct | FillStyle |
struct | LineStyle |
struct | Translation |
Defines | |
#define | GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) |
#define | ATTRIBUTE_UNUSED |
#define | MAX_TEXTLEN 1024 |
#define | MAX_NODES 1024 |
#define | MAX_POINTS 1024 |
#define | FILL_DEFAULT (struct FillStyle){FILLING_HOLLOW, -1, -1, -1, -1, -1} |
#define | LINE_DEFAULT (struct LineStyle){0, END_NONE, TYPE_SOLID, -1, -1} |
#define | REPLACE_NAME 1 |
#define | KILL 2 |
#define | WARN_USER 3 |
Enumerations | |
enum | OBJECT_END { END_NONE, END_SQUARE, END_ROUND } |
enum | OBJECT_TYPE { TYPE_SOLID, TYPE_DOTTED, TYPE_DASHED, TYPE_CENTER, TYPE_PHANTOM, TYPE_ERASE } |
enum | OBJECT_FILLING { FILLING_HOLLOW, FILLING_FILL, FILLING_MESH, FILLING_HATCH, FILLING_VOID } |
enum | OBJECT_PINTYPE { NORMAL_PIN, BUS_PIN } |
Functions | |
int | convert_file (FILE *fp) |
unsigned int | strindex (char *s, char c) |
unsigned int | strrindex (char *s, char c) |
void | strtolower (char *s) |
int | get_continued_string (char *buf, size_t buffer_size, FILE *fp) |
int | get_style (FILE *fp, unsigned int *colour, struct LineStyle *linestyle, struct FillStyle *fillstyle) |
void | set_orientation (int *angle, int *mirror, int orientation) |
void | do_nop (FILE *fp) |
void | do_bounding_box (FILE *fp) |
void | do_unattached_attribute (FILE *fp) |
void | do_attached_attribute (FILE *fp) |
void | do_text (FILE *fp) |
void | do_line (FILE *fp) |
void | do_pin (FILE *fp) |
void | do_box (FILE *fp) |
void | do_circle (FILE *fp) |
void | do_arc (FILE *fp) |
void | do_label (FILE *fp) |
void | do_net_start (FILE *fp) |
void | do_net_node (FILE *fp) |
void | do_net_segment (FILE *fp) |
void | do_net_segment_bus (FILE *fp) |
void | do_instance (FILE *fp) |
void | text_object (int x, int y, unsigned int color, unsigned int size, unsigned int visibility, unsigned int show_name_value, int angle, char *text, unsigned int origin) |
void | attribute_object (int x, int y, unsigned int color, unsigned int size, unsigned int visibility, unsigned int show_name_value, int angle, char *name, char *value, unsigned int origin) |
void | line_object (int x1, int y1, int x2, int y2, unsigned int color, struct LineStyle *linestyle) |
void | circle_object (int bx, int by, unsigned int radius, unsigned int bcolor, struct LineStyle *linestyle, struct FillStyle *fillstyle) |
void | pin_object (int x1, int y1, int x2, int y2, unsigned int color, OBJECT_PINTYPE pintype, unsigned int whichend) |
void | box_object (int x1, int y1, unsigned int width, unsigned int height, unsigned int color, struct LineStyle *linestyle, struct FillStyle *fillstyle) |
void | arc_object (int x1, int y1, unsigned int radius, int start_angle, int sweep_angle, unsigned int color, struct LineStyle *linestyle) |
void | net_segment (int x1, int y1, int x2, int y2, unsigned int color) |
void | bus_segment (int x1, int y1, int x2, int y2, unsigned int color, int ripperdir) |
void | complex_object (int x, int y, unsigned int selectable, int angle, unsigned int mirror, char *name) |
void | begin_attach (void) |
void | end_attach (void) |
void | reset_attributes (void) |
int | GetStringDisplayLength (char *str, int font_size) |
void | usage (char *cmd) |
int | main (int argc, char **argv) |
Variables | |
static char | vcid [] = "$Id$" |
char * | optarg |
int | optind |
int | colormap [16] |
struct FillStyle | fillmap [26] |
struct LineStyle | linemap [8] |
struct Translation | translations [] |
unsigned int | nTranslations = sizeof(translations)/sizeof(struct Translation) |
int | attach_pending = 0 |
int | add_attributes = 0 |
int | pin_attributes = 0 |
int | net_attributes = 0 |
int | complex_attributes = 0 |
int | pin_count = 0 |
int | reading_net = 0 |
int | segment_count = 0 |
int | net_nodes_x [1024] |
int | net_nodes_y [1024] |
int | scale = 10 |
int | records_processed = 0 |
int | minx = 0 |
int | miny = 0 |
int | maxx = 0 |
int | maxy = 0 |
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) |
Definition at line 58 of file convert_sym.c.
#define ATTRIBUTE_UNUSED |
Definition at line 64 of file convert_sym.c.
#define MAX_TEXTLEN 1024 |
Definition at line 77 of file convert_sym.c.
#define MAX_NODES 1024 |
Definition at line 78 of file convert_sym.c.
#define MAX_POINTS 1024 |
Definition at line 79 of file convert_sym.c.
#define FILL_DEFAULT (struct FillStyle){FILLING_HOLLOW, -1, -1, -1, -1, -1} |
Definition at line 221 of file convert_sym.c.
#define LINE_DEFAULT (struct LineStyle){0, END_NONE, TYPE_SOLID, -1, -1} |
Definition at line 252 of file convert_sym.c.
#define REPLACE_NAME 1 |
Definition at line 262 of file convert_sym.c.
#define KILL 2 |
Definition at line 263 of file convert_sym.c.
#define WARN_USER 3 |
Definition at line 264 of file convert_sym.c.
enum OBJECT_END |
Definition at line 82 of file convert_sym.c.
enum OBJECT_TYPE |
Definition at line 83 of file convert_sym.c.
enum OBJECT_FILLING |
Definition at line 85 of file convert_sym.c.
enum OBJECT_PINTYPE |
Definition at line 87 of file convert_sym.c.
int convert_file | ( | FILE * | fp | ) |
unsigned int strindex | ( | char * | s, |
char | c | ||
) |
Definition at line 2135 of file convert_sym.c.
unsigned int strrindex | ( | char * | s, |
char | c | ||
) |
Definition at line 2151 of file convert_sym.c.
void strtolower | ( | char * | s | ) |
Definition at line 2166 of file convert_sym.c.
int get_continued_string | ( | char * | buf, |
size_t | buffer_size, | ||
FILE * | fp | ||
) |
Definition at line 2031 of file convert_sym.c.
int get_style | ( | FILE * | fp, |
unsigned int * | colour, | ||
struct LineStyle * | linestyle, | ||
struct FillStyle * | fillstyle | ||
) |
Definition at line 2075 of file convert_sym.c.
void set_orientation | ( | int * | angle, |
int * | mirror, | ||
int | orientation | ||
) |
Definition at line 1589 of file convert_sym.c.
void do_nop | ( | FILE * | fp | ) |
Definition at line 542 of file convert_sym.c.
void do_bounding_box | ( | FILE * | fp | ) |
void do_unattached_attribute | ( | FILE * | fp | ) |
void do_attached_attribute | ( | FILE * | fp | ) |
void do_text | ( | FILE * | fp | ) |
void do_line | ( | FILE * | fp | ) |
void do_pin | ( | FILE * | fp | ) |
void do_box | ( | FILE * | fp | ) |
void do_circle | ( | FILE * | fp | ) |
void do_arc | ( | FILE * | fp | ) |
void do_label | ( | FILE * | fp | ) |
void do_net_start | ( | FILE * | fp | ) |
void do_net_node | ( | FILE * | fp | ) |
Definition at line 1398 of file convert_sym.c.
void do_net_segment | ( | FILE * | fp | ) |
void do_net_segment_bus | ( | FILE * | fp | ) |
void do_instance | ( | FILE * | fp | ) |
void text_object | ( | int | x, |
int | y, | ||
unsigned int | color, | ||
unsigned int | size, | ||
unsigned int | visibility, | ||
unsigned int | show_name_value, | ||
int | angle, | ||
char * | text, | ||
unsigned int | origin | ||
) |
void attribute_object | ( | int | x, |
int | y, | ||
unsigned int | color, | ||
unsigned int | size, | ||
unsigned int | visibility, | ||
unsigned int | show_name_value, | ||
int | angle, | ||
char * | name, | ||
char * | value, | ||
unsigned int | origin | ||
) |
void line_object | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
unsigned int | color, | ||
struct LineStyle * | linestyle | ||
) |
Definition at line 1911 of file convert_sym.c.
void circle_object | ( | int | bx, |
int | by, | ||
unsigned int | radius, | ||
unsigned int | bcolor, | ||
struct LineStyle * | linestyle, | ||
struct FillStyle * | fillstyle | ||
) |
Definition at line 1921 of file convert_sym.c.
void pin_object | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
unsigned int | color, | ||
OBJECT_PINTYPE | pintype, | ||
unsigned int | whichend | ||
) |
Definition at line 1935 of file convert_sym.c.
void box_object | ( | int | x1, |
int | y1, | ||
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | color, | ||
struct LineStyle * | linestyle, | ||
struct FillStyle * | fillstyle | ||
) |
Definition at line 1943 of file convert_sym.c.
void arc_object | ( | int | x1, |
int | y1, | ||
unsigned int | radius, | ||
int | start_angle, | ||
int | sweep_angle, | ||
unsigned int | color, | ||
struct LineStyle * | linestyle | ||
) |
Definition at line 1958 of file convert_sym.c.
void net_segment | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
unsigned int | color | ||
) |
Definition at line 1970 of file convert_sym.c.
void bus_segment | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
unsigned int | color, | ||
int | ripperdir | ||
) |
Definition at line 1976 of file convert_sym.c.
void complex_object | ( | int | x, |
int | y, | ||
unsigned int | selectable, | ||
int | angle, | ||
unsigned int | mirror, | ||
char * | name | ||
) |
Definition at line 1982 of file convert_sym.c.
void begin_attach | ( | void | ) |
Definition at line 1990 of file convert_sym.c.
void end_attach | ( | void | ) |
Definition at line 2000 of file convert_sym.c.
void reset_attributes | ( | void | ) |
int GetStringDisplayLength | ( | char * | str, |
int | font_size | ||
) |
Definition at line 38 of file char_width.c.
void usage | ( | char * | cmd | ) |
Definition at line 366 of file convert_sym.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
char vcid[] = "$Id$" [static] |
Definition at line 68 of file convert_sym.c.
char* optarg |
int optind |
int colormap[16] |
{ 0, 4, 3, 6, 2, 2, 7, 7, 7, 4, 3, 6, 2, 2, 5, 1, }
Definition at line 134 of file convert_sym.c.
Definition at line 165 of file convert_sym.c.
{ {0, END_NONE, TYPE_SOLID, -1, -1}, {0, END_NONE, TYPE_DASHED, 100, 100}, {0, END_NONE, TYPE_CENTER, 100, 100}, {0, END_NONE, TYPE_PHANTOM, 100, 100}, {0, END_NONE, TYPE_DASHED, 400, 100}, {0, END_NONE, TYPE_DOTTED, -1, 100}, {0, END_NONE, TYPE_CENTER, 100, 100}, {0, END_NONE, TYPE_DASHED, 200, 100}, }
Definition at line 232 of file convert_sym.c.
struct Translation translations[] |
{ {"PKG_TYPE", "footprint", 1 }, {"LEVEL", "", 2 }, {"NAME", "", 2 }, {"LABEL", "", 2 }, {"SIGNAL", "net", 1 }, {"HETERO", "split", 1 }, }
Definition at line 266 of file convert_sym.c.
unsigned int nTranslations = sizeof(translations)/sizeof(struct Translation) |
Definition at line 277 of file convert_sym.c.
int attach_pending = 0 |
Definition at line 342 of file convert_sym.c.
int add_attributes = 0 |
Definition at line 344 of file convert_sym.c.
int pin_attributes = 0 |
Definition at line 346 of file convert_sym.c.
int net_attributes = 0 |
Definition at line 347 of file convert_sym.c.
int complex_attributes = 0 |
Definition at line 348 of file convert_sym.c.
int pin_count = 0 |
Definition at line 349 of file convert_sym.c.
int reading_net = 0 |
Definition at line 350 of file convert_sym.c.
int segment_count = 0 |
Definition at line 351 of file convert_sym.c.
int net_nodes_x[1024] |
Definition at line 352 of file convert_sym.c.
int net_nodes_y[1024] |
Definition at line 353 of file convert_sym.c.
int scale = 10 |
Definition at line 354 of file convert_sym.c.
int records_processed = 0 |
Definition at line 356 of file convert_sym.c.
int minx = 0 |
Definition at line 360 of file convert_sym.c.
int miny = 0 |
Definition at line 361 of file convert_sym.c.
int maxx = 0 |
Definition at line 362 of file convert_sym.c.
int maxy = 0 |
Definition at line 363 of file convert_sym.c.