utils

sarlacc_schem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <libgeda/colors.h>
Include dependency graph for sarlacc_schem.c:

Go to the source code of this file.

Defines

#define SARVERSION   "0.94"
#define GEDAVERSION   "20020825"
#define DEFAULT_SCALE   200
#define TEXTSIZE   ((scale <= 100) ? 6 : 10)
#define GET_TAG(VAL)   (VAL & 0x0F)
#define CONV32(VAR, POS)   (VAR[POS]+VAR[POS+1]*256+VAR[POS+2]*65536+VAR[POS+3]*256*16777216)
#define CONV(X)   ( (scale/10)*X )
#define CONVX(X)   CONV(X)
#define CONVY(Y)   ( 32700 - ((scale/10)*Y) )
#define HDR_LEN   0x20
#define BYTECOUNT   0x16
#define DATE   0x05
#define PATH   0x3B
#define REV   0x60
#define TITLE   0x64
#define ORG   0x91
#define ADDR1   0xBE
#define ADDR2   0xEB
#define ADDR3   0x118
#define ADDR4   0x145

Functions

int CONV16 (char *base, int offset)
void remove_spaces (char *src)
unsigned read_block (int fd, char *block, int block_min_size, int block_max_size)
unsigned read_string (char *dest, int dest_size, char *src)
void read_string_file (int fd, char *dest, int dest_size)
void parse_header (int fd1, int fd2)
void parse_titleblock (int fd)
void parse_component (int fd1, int fd2)
void parse_sheet (int fd)
static void wire_or_bus (int fd, char kind, int color)
void parse_wire (int fd)
void parse_bus (int fd)
void parse_junction (int fd)
void parse_port (int fd)
void parse_label (int fd)
void parse_entry (int fd)
void parse_dashed (int fd)
void parse_power (int fd)
void parse_text (int fd)
void parse_marker (int fd)
int parse_block (int fd1, int fd2)
int main (int argc, char **argv)

Variables

char * symbol_dir = 0
int scale = 200
static int pending_netlabel = 0
static char netlabel [256]
static int netlabel_x
static int netlabel_y
static int netlabel_angle

Define Documentation

#define SARVERSION   "0.94"

Definition at line 48 of file sarlacc_schem.c.

#define GEDAVERSION   "20020825"

Definition at line 49 of file sarlacc_schem.c.

#define DEFAULT_SCALE   200

Definition at line 51 of file sarlacc_schem.c.

#define TEXTSIZE   ((scale <= 100) ? 6 : 10)

Definition at line 56 of file sarlacc_schem.c.

#define GET_TAG (   VAL)    (VAL & 0x0F)

Definition at line 61 of file sarlacc_schem.c.

#define CONV32 (   VAR,
  POS 
)    (VAR[POS]+VAR[POS+1]*256+VAR[POS+2]*65536+VAR[POS+3]*256*16777216)

Definition at line 72 of file sarlacc_schem.c.

#define CONV (   X)    ( (scale/10)*X )

Definition at line 74 of file sarlacc_schem.c.

#define CONVX (   X)    CONV(X)

Definition at line 75 of file sarlacc_schem.c.

#define CONVY (   Y)    ( 32700 - ((scale/10)*Y) )

Definition at line 76 of file sarlacc_schem.c.

#define HDR_LEN   0x20

Definition at line 78 of file sarlacc_schem.c.

#define BYTECOUNT   0x16

Definition at line 79 of file sarlacc_schem.c.

#define DATE   0x05

Definition at line 80 of file sarlacc_schem.c.

#define PATH   0x3B

Definition at line 81 of file sarlacc_schem.c.

#define REV   0x60

Definition at line 82 of file sarlacc_schem.c.

#define TITLE   0x64

Definition at line 83 of file sarlacc_schem.c.

#define ORG   0x91

Definition at line 84 of file sarlacc_schem.c.

#define ADDR1   0xBE

Definition at line 85 of file sarlacc_schem.c.

#define ADDR2   0xEB

Definition at line 86 of file sarlacc_schem.c.

#define ADDR3   0x118

Definition at line 87 of file sarlacc_schem.c.

#define ADDR4   0x145

Definition at line 88 of file sarlacc_schem.c.


Function Documentation

int CONV16 ( char *  base,
int  offset 
)

Definition at line 63 of file sarlacc_schem.c.

void remove_spaces ( char *  src)

Definition at line 90 of file sarlacc_schem.c.

unsigned read_block ( int  fd,
char *  block,
int  block_min_size,
int  block_max_size 
)

Definition at line 105 of file sarlacc_schem.c.

Here is the call graph for this function:

unsigned read_string ( char *  dest,
int  dest_size,
char *  src 
)

Definition at line 129 of file sarlacc_schem.c.

void read_string_file ( int  fd,
char *  dest,
int  dest_size 
)

Definition at line 143 of file sarlacc_schem.c.

void parse_header ( int  fd1,
int  fd2 
)

Definition at line 168 of file sarlacc_schem.c.

void parse_titleblock ( int  fd)

Definition at line 187 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_component ( int  fd1,
int  fd2 
)

Definition at line 219 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_sheet ( int  fd)

Definition at line 410 of file sarlacc_schem.c.

Here is the call graph for this function:

static void wire_or_bus ( int  fd,
char  kind,
int  color 
) [static]

Definition at line 462 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_wire ( int  fd)

Definition at line 486 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_bus ( int  fd)

Definition at line 493 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_junction ( int  fd)

Definition at line 503 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_port ( int  fd)

Definition at line 520 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_label ( int  fd)

Definition at line 560 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_entry ( int  fd)

Definition at line 594 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_dashed ( int  fd)

Definition at line 611 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_power ( int  fd)

Definition at line 628 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_text ( int  fd)

Definition at line 681 of file sarlacc_schem.c.

Here is the call graph for this function:

void parse_marker ( int  fd)

Definition at line 710 of file sarlacc_schem.c.

Here is the call graph for this function:

int parse_block ( int  fd1,
int  fd2 
)

Definition at line 721 of file sarlacc_schem.c.

Here is the call graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 780 of file sarlacc_schem.c.

Here is the call graph for this function:


Variable Documentation

char* symbol_dir = 0

Definition at line 53 of file sarlacc_schem.c.

int scale = 200

Definition at line 54 of file sarlacc_schem.c.

int pending_netlabel = 0 [static]

Definition at line 457 of file sarlacc_schem.c.

char netlabel[256] [static]

Definition at line 458 of file sarlacc_schem.c.

int netlabel_x [static]

Definition at line 459 of file sarlacc_schem.c.

Definition at line 459 of file sarlacc_schem.c.

Definition at line 459 of file sarlacc_schem.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines