pcb 4.1.1
An interactive printed circuit board layout editor.

netlist.c File Reference

Generic netlist operations. More...

#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include "global.h"
#include "action.h"
#include "buffer.h"
#include "data.h"
#include "djopt.h"
#include "error.h"
#include "file.h"
#include "find.h"
#include "mymem.h"
#include "misc.h"
#include "rats.h"
#include "set.h"
#include "vendor.h"
#include "create.h"
Include dependency graph for netlist.c:

Go to the source code of this file.

Typedefs

typedef void(* NFunc )(LibraryMenuType *, LibraryEntryType *)

Functions

void NetlistChanged (int force_unfreeze)
LibraryMenuTypenetnode_to_netname (char *nodename)
LibraryMenuTypenetname_to_netname (char *netname)
static int pin_name_to_xy (LibraryEntryType *pin, int *x, int *y)
static void netlist_find (LibraryMenuType *net, LibraryEntryType *pin)
static void netlist_select (LibraryMenuType *net, LibraryEntryType *pin)
static void netlist_rats (LibraryMenuType *net, LibraryEntryType *pin)
static void netlist_norats (LibraryMenuType *net, LibraryEntryType *pin)
static void netlist_clear (LibraryMenuType *net, LibraryEntryType *pin)
 The primary purpose of this action is to remove the netlist completely so that a new one can be loaded, usually via a gsch2pcb style script.
static void netlist_style (LibraryMenuType *net, const char *style)
static int netlist_add (const char *netname, const char *pinname)
 The primary purpose of this action is to rebuild a netlist from a script, in conjunction with the clear action above.
static int Netlist (int argc, char **argv, Coord x, Coord y)

Variables

int netlist_frozen = 0
static int netlist_needs_update = 0
static const char netlist_syntax [] = "Net(add,net,pin)"
static const char netlist_help [] = "Perform various actions on netlists."
HID_Action netlist_action_list []

Detailed Description

Generic netlist operations.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996, 2005 Thomas Nau

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email:

Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany

Thomas.Nau@rz.uni-ulm.de

Definition in file netlist.c.


Typedef Documentation

typedef void(* NFunc)(LibraryMenuType *, LibraryEntryType *)

Definition at line 87 of file netlist.c.


Function Documentation

static int netlist_add ( const char *  netname,
const char *  pinname 
) [static]

The primary purpose of this action is to rebuild a netlist from a script, in conjunction with the clear action above.

Definition at line 256 of file netlist.c.

References CreateNewConnection(), CreateNewNet(), LibraryMenuType::Entry, LibraryMenuType::EntryN, LibraryEntryType::ListEntry, LibraryType::Menu, LibraryType::MenuN, LibraryMenuType::Name, NetlistChanged(), PCBType::NetlistLib, PCB, and pin.

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_clear ( LibraryMenuType net,
LibraryEntryType pin 
) [static]

The primary purpose of this action is to remove the netlist completely so that a new one can be loaded, usually via a gsch2pcb style script.

Definition at line 205 of file netlist.c.

References LibraryMenuType::Entry, LibraryMenuType::EntryN, FreeLibraryMemory(), LibraryType::Menu, LibraryType::MenuN, NetlistChanged(), PCBType::NetlistLib, and PCB.

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_find ( LibraryMenuType net,
LibraryEntryType pin 
) [static]

Definition at line 166 of file netlist.c.

References LibraryMenuType::Entry, LookupConnection(), pin_name_to_xy(), x, and y.

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_norats ( LibraryMenuType net,
LibraryEntryType pin 
) [static]

Definition at line 192 of file netlist.c.

References LibraryMenuType::flag, LibraryMenuType::Name, and NetlistChanged().

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_rats ( LibraryMenuType net,
LibraryEntryType pin 
) [static]

Definition at line 184 of file netlist.c.

References LibraryMenuType::flag, LibraryMenuType::Name, and NetlistChanged().

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_select ( LibraryMenuType net,
LibraryEntryType pin 
) [static]

Definition at line 175 of file netlist.c.

References LibraryMenuType::Entry, LookupConnection(), pin_name_to_xy(), x, and y.

Referenced by Netlist().

Here is the call graph for this function:

static void netlist_style ( LibraryMenuType net,
const char *  style 
) [static]

Definition at line 245 of file netlist.c.

References STRDUP, and LibraryMenuType::Style.

Referenced by Netlist().

void NetlistChanged ( int  force_unfreeze)
Todo:
These are in netlist.c

Definition at line 93 of file netlist.c.

References hid_action(), netlist_frozen, and netlist_needs_update.

Referenced by ActionLoadFrom(), ActionRenumber(), AddNet(), FreePCBMemory(), Netlist(), netlist_add(), netlist_clear(), netlist_norats(), netlist_rats(), and UndoNetlistChange().

Here is the call graph for this function:

LibraryMenuType* netname_to_netname ( char *  netname)
static int pin_name_to_xy ( LibraryEntryType pin,
int *  x,
int *  y 
) [static]

Definition at line 146 of file netlist.c.

References ConnectionType::ptr2, SeekPad(), ConnectionType::type, X, and Y.

Referenced by netlist_find(), and netlist_select().

Here is the call graph for this function:


Variable Documentation

Initial value:
 {
  {"net", 0, Netlist,
   netlist_help, netlist_syntax}
  ,
  {"netlist", 0, Netlist,
   netlist_help, netlist_syntax}
}

Definition at line 536 of file netlist.c.

int netlist_frozen = 0

Definition at line 89 of file netlist.c.

Referenced by Netlist(), and NetlistChanged().

const char netlist_help[] = "Perform various actions on netlists." [static]

Definition at line 294 of file netlist.c.

int netlist_needs_update = 0 [static]

Definition at line 90 of file netlist.c.

Referenced by Netlist(), and NetlistChanged().

const char netlist_syntax[] = "Net(add,net,pin)" [static]

Definition at line 289 of file netlist.c.

Referenced by Netlist().