pcb 4.1.1
An interactive printed circuit board layout editor.
|
Some commonly used macros not related to a special C-file. More...
Go to the source code of this file.
Defines | |
#define | SWAP_IDENT Settings.ShowBottomSide |
#define | SWAP_SIGN_X(x) (x) |
#define | SWAP_SIGN_Y(y) (-(y)) |
#define | SWAP_ANGLE(a) (-(a)) |
#define | SWAP_DELTA(d) (-(d)) |
#define | SWAP_X(x) (SWAP_SIGN_X(x)) |
#define | SWAP_Y(y) (PCB->MaxHeight +SWAP_SIGN_Y(y)) |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | SGN(a) ((a) >0 ? 1 : ((a) == 0 ? 0 : -1)) |
#define | SGNZ(a) ((a) >=0 ? 1 : -1) |
#define | MAKEMIN(a, b) if ((b) < (a)) (a) = (b) |
#define | MAKEMAX(a, b) if ((b) > (a)) (a) = (b) |
#define | ENTRIES(x) (sizeof((x))/sizeof((x)[0])) |
#define | UNKNOWN(a) ((a) && *(a) ? (a) : "(unknown)") |
#define | UNKNOWN_NAME(a, n) ((a) && *(a) ? (a) : (n)) |
#define | NSTRCMP(a, b) ((a) ? ((b) ? strcmp((a),(b)) : 1) : -1) |
#define | EMPTY(a) ((a) ? (a) : "") |
#define | EMPTY_STRING_P(a) ((a) ? (a)[0]==0 : 1) |
#define | XOR(a, b) (((a) && !(b)) || (!(a) && (b))) |
#define | SQUARE(x) ((float) (x) * (float) (x)) |
#define | TO_RADIANS(degrees) (M180 * (degrees)) |
#define | DOUBLE_TO_COORD(x) ((x) >= 0 ? (Coord)((x) + 0.5) : (Coord)((x) - 0.5)) |
#define | LAYER_ON_STACK(n) (&PCB->Data->Layer[LayerStack[(n)]]) |
#define | LAYER_PTR(n) (&PCB->Data->Layer[(n)]) |
#define | CURRENT |
#define | INDEXOFCURRENT |
#define | SILKLAYER |
#define | BACKSILKLAYER |
#define | TEST_SILK_LAYER(layer) (GetLayerNumber (PCB->Data, layer) >= max_copper_layer) |
#define | OBJECT_ID(p) (((AnyObjectType *) p)->ID) |
#define | PASTEBUFFER (&Buffers[Settings.BufferNumber]) |
#define | SET_FLAG(F, P) ((P)->Flags.f |= (F)) |
#define | CLEAR_FLAG(F, P) ((P)->Flags.f &= (~(F))) |
#define | TEST_FLAG(F, P) ((P)->Flags.f & (F) ? 1 : 0) |
#define | TOGGLE_FLAG(F, P) ((P)->Flags.f ^= (F)) |
#define | ASSIGN_FLAG(F, V, P) ((P)->Flags.f = ((P)->Flags.f & (~(F))) | ((V) ? (F) : 0)) |
#define | TEST_FLAGS(F, P) (((P)->Flags.f & (F)) == (F) ? 1 : 0) |
#define | FLAGS_EQUAL(F1, F2) pcb_flag_eq(&(F1), &(F2)) |
#define | THERMFLAG(L) (0xf << (4 *((L) % 2))) |
#define | TEST_THERM(L, P) ((P)->Flags.t[(L)/2] & THERMFLAG(L) ? 1 : 0) |
#define | GET_THERM(L, P) (((P)->Flags.t[(L)/2] >> (4 * ((L) % 2))) & 0xf) |
#define | CLEAR_THERM(L, P) (P)->Flags.t[(L)/2] &= ~THERMFLAG(L) |
#define | ASSIGN_THERM(L, V, P) (P)->Flags.t[(L)/2] = ((P)->Flags.t[(L)/2] & ~THERMFLAG(L)) | ((V) << (4 * ((L) % 2))) |
#define | TEST_ANY_THERMS(P) mem_any_set((P)->Flags.t, sizeof((P)->Flags.t)) |
#define | DESCRIPTION_INDEX 0 |
#define | NAMEONPCB_INDEX 1 |
#define | VALUE_INDEX 2 |
#define | NAME_INDEX(p) |
#define | ELEMENT_NAME(p, e) ((e)->Name[NAME_INDEX((p))].TextString) |
#define | DESCRIPTION_NAME(e) ((e)->Name[DESCRIPTION_INDEX].TextString) |
#define | NAMEONPCB_NAME(e) ((e)->Name[NAMEONPCB_INDEX].TextString) |
#define | VALUE_NAME(e) ((e)->Name[VALUE_INDEX].TextString) |
#define | ELEMENT_TEXT(p, e) ((e)->Name[NAME_INDEX((p))]) |
#define | DESCRIPTION_TEXT(e) ((e)->Name[DESCRIPTION_INDEX]) |
#define | NAMEONPCB_TEXT(e) ((e)->Name[NAMEONPCB_INDEX]) |
#define | VALUE_TEXT(e) ((e)->Name[VALUE_INDEX]) |
#define | TEXT_IS_VISIBLE(b, l, t) ((l)->On) |
#define | FRONT(o) ((TEST_FLAG(ONSOLDERFLAG, (o)) != 0) == SWAP_IDENT) |
#define | ON_SIDE(element, side) (TEST_FLAG (ONSOLDERFLAG, element) == (side == BOTTOM_SIDE)) |
#define | END_LOOP }} while (0) |
#define | STYLE_LOOP(top) |
#define | VIA_LOOP(top) |
#define | DRILL_LOOP(top) |
#define | NETLIST_LOOP(top) |
#define | NET_LOOP(top) |
#define | CONNECTION_LOOP(net) |
#define | ELEMENT_LOOP(top) |
#define | RAT_LOOP(top) |
#define | ELEMENTTEXT_LOOP(element) |
#define | ELEMENTNAME_LOOP(element) |
#define | PIN_LOOP(element) |
#define | PAD_LOOP(element) |
#define | ARC_LOOP(element) |
#define | ELEMENTLINE_LOOP(element) |
#define | ELEMENTARC_LOOP(element) |
#define | LINE_LOOP(layer) |
#define | TEXT_LOOP(layer) |
#define | POLYGON_LOOP(layer) |
#define | POLYGONPOINT_LOOP(polygon) |
#define | ENDALL_LOOP }} while (0); }} while(0) |
#define | ALLPIN_LOOP(top) |
#define | ALLPAD_LOOP(top) |
#define | ALLLINE_LOOP(top) |
#define | ALLARC_LOOP(top) |
#define | ALLPOLYGON_LOOP(top) |
#define | COPPERLINE_LOOP(top) |
#define | COPPERARC_LOOP(top) |
#define | COPPERPOLYGON_LOOP(top) |
#define | SILKLINE_LOOP(top) |
#define | SILKARC_LOOP(top) |
#define | SILKPOLYGON_LOOP(top) |
#define | ALLTEXT_LOOP(top) |
#define | VISIBLELINE_LOOP(top) |
#define | VISIBLEARC_LOOP(top) |
#define | VISIBLETEXT_LOOP(board) |
#define | VISIBLEPOLYGON_LOOP(top) |
#define | POINTER_LOOP(top) |
#define | MENU_LOOP(top) |
#define | ENTRY_LOOP(top) |
#define | GROUP_LOOP(data, group) |
#define | LAYER_LOOP(data, ml) |
#define | LAYER_TYPE_LOOP(data, ml, type) |
#define | VIA_IS_BURIED(via) (via->BuriedFrom != 0 || via->BuriedTo != 0) |
#define | VIA_ON_LAYER(via, layer) (layer >= via->BuriedFrom && layer <= via->BuriedTo ) |
Functions | |
int | mem_any_set (unsigned char *, int) |
Some commonly used macros not related to a special C-file.
The file is included by global.h after const.h
PCB, interactive printed circuit board design
Copyright (C) 1994,1995,1996 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 macro.h.
#define ALLARC_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l =0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ ARC_LOOP(layer)
Definition at line 341 of file macro.h.
Referenced by ActionMinClearGap(), ActionRipUp(), FreeRotateBuffer(), GetDataBoundingBox(), MirrorBuffer(), RotateBuffer(), SearchObjectByID(), SwapBuffer(), and XYtoNetLength().
#define ALLLINE_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ LINE_LOOP(layer)
Definition at line 334 of file macro.h.
Referenced by ActionMinClearGap(), ActionRipUp(), FreeRotateBuffer(), GatherSubnets(), GetDataBoundingBox(), MirrorBuffer(), RotateBuffer(), SearchObjectByID(), SwapBuffer(), and XYtoNetLength().
#define ALLPAD_LOOP | ( | top | ) |
ELEMENT_LOOP(top); \ PAD_LOOP(element)
Definition at line 330 of file macro.h.
Referenced by ChangeSelectedPaste(), CheckShorts(), ClearWarnings(), CreateRouteData(), DrawPaste(), DRCAll(), escape(), find_pairs(), gsvit_build_net_from_selected(), InitComponentLookup(), IsPasteEmpty(), padcleaner(), ProcNetlist(), and SelectByFlag().
#define ALLPIN_LOOP | ( | top | ) |
ELEMENT_LOOP(top); \ PIN_LOOP(element)\
Definition at line 326 of file macro.h.
Referenced by CheckShorts(), ClearWarnings(), CreateRouteData(), DRCAll(), find_pairs(), GetDrillInfo(), gsvit_build_net_from_selected(), move_all_thermals(), ProcNetlist(), SelectByFlag(), SwapBuffer(), and teardrops().
#define ALLPOLYGON_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ POLYGON_LOOP(layer)
Definition at line 348 of file macro.h.
Referenced by ActionMorphPolygon(), FreeRotateBuffer(), GatherSubnets(), GetDataBoundingBox(), MirrorBuffer(), PCBFileVersionNeeded(), RotateBuffer(), SearchObjectByID(), and SwapBuffer().
#define ALLTEXT_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ TEXT_LOOP(layer)
Definition at line 400 of file macro.h.
Referenced by GetDataBoundingBox(), RotateBuffer(), SearchObjectByID(), SelectedOperation(), and SwapBuffer().
#define ARC_LOOP | ( | element | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (element)->Arc, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ ArcType *arc = __iter->data;
Definition at line 269 of file macro.h.
Referenced by ChangeElementSize(), ConvertBufferToElement(), CopyElementLowLevel(), CopyPastebufferToLayout(), CreateNewArcOnLayer(), CreateRouteData(), draw_element_package(), DrawElementPackage(), EraseElement(), find_pairs(), FreeRotateElementLowLevel(), GlobalPuller(), gsvit_lookup_net_from_arc(), MirrorElementCoordinates(), MoveElementLowLevel(), pinout_set_data(), PrintFab(), RotateElementLowLevel(), SearchObjectByID(), SelectBlock(), SetElementBoundingBox(), SmashBufferElement(), XORDrawBuffer(), and XORDrawElement().
Definition at line 116 of file macro.h.
Referenced by AutoRoute(), SelectBlock(), SelectBuriedVias(), and SelectByFlag().
#define ASSIGN_THERM | ( | L, | |
V, | |||
P | |||
) | (P)->Flags.t[(L)/2] = ((P)->Flags.t[(L)/2] & ~THERMFLAG(L)) | ((V) << (4 * ((L) % 2))) |
Definition at line 126 of file macro.h.
Referenced by ChangePinThermal(), ChangeViaThermal(), common_string_to_flags(), IronDownAllUnfixedPaths(), move_one_thermal(), mptl_pin_callback(), and SwapBuffer().
#define BACKSILKLAYER |
#define CLEAR_FLAG | ( | F, | |
P | |||
) | ((P)->Flags.f &= (~(F))) |
Definition at line 113 of file macro.h.
Referenced by ActionDisplay(), ActionElementList(), ActionRenumber(), AddPolygonToBuffer(), ChangeArcClearSize(), ChangeLineClearSize(), ClearFlagOnLinesAndPolygons(), ClearFlagOnPinsViasAndPads(), ClearWarnings(), common_flags_to_string(), CopyPolygonLowLevel(), CreateNewLineOnLayer(), CreateNewPad(), CreateNewPin(), CreateNewVia(), CreateRouteData(), eps_hid_export_to_file(), GatherSubnets(), gerber_do_export(), layer_selector_toggle_callback(), LayerStringToLayerStack(), MoveArcToBuffer(), MoveElementToBuffer(), MoveLineToBuffer(), MoveObjectAndRubberband(), MovePolygonToBuffer(), MoveRatToBuffer(), MoveTextToLayerLowLevel(), MoveViaToBuffer(), NotifyMode(), png_hid_export_to_file(), ProcNetlist(), ps_hid_export_to_file(), ResetVisitPinsViasAndPads(), RotateObject(), SelectedOperation(), SetElementBoundingBox(), and Undo().
#define CLEAR_THERM | ( | L, | |
P | |||
) | (P)->Flags.t[(L)/2] &= ~THERMFLAG(L) |
Definition at line 125 of file macro.h.
Referenced by ChangePinThermal(), ChangeViaThermal(), and mptl_pin_callback().
#define CONNECTION_LOOP | ( | net | ) |
do { \ Cardinal n; \ ConnectionType *connection; \ for (n = (net)->ConnectionN-1; n != -1; n--) \ { \ connection = & (net)->Connection[n]
Definition at line 215 of file macro.h.
Referenced by AddAllRats(), CollectSubnets(), CreateRouteData(), import_clusters(), smartdisperse(), and TransferNet().
#define COPPERARC_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l =0; l < max_copper_layer; l++, layer++) \ { \ ARC_LOOP(layer)
Definition at line 362 of file macro.h.
Referenced by ClearFlagOnLinesAndPolygons(), DRCAll(), and gsvit_build_net_from_selected().
#define COPPERLINE_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer; l++, layer++) \ { \ LINE_LOOP(layer)
Definition at line 355 of file macro.h.
Referenced by ClearFlagOnLinesAndPolygons(), DRCAll(), and gsvit_build_net_from_selected().
#define COPPERPOLYGON_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer; l++, layer++) \ { \ POLYGON_LOOP(layer)
Definition at line 369 of file macro.h.
Referenced by ClearFlagOnLinesAndPolygons(), and gsvit_build_net_from_selected().
#define CURRENT |
(PCB->SilkActive ? &PCB->Data->Layer[ \ (Settings.ShowBottomSide ? bottom_silk_layer : top_silk_layer)] \ : LAYER_ON_STACK(0))
Definition at line 85 of file macro.h.
Referenced by ActionAttributes(), ActionChangeName(), ActionMoveToCurrentLayer(), ActionRedo(), ActionSetSame(), ActionUndo(), ChangeLayerName(), ChangePinThermal(), ChangeViaThermal(), check_snap_offgrid_line(), CopyAttachedPolygonToLayer(), create_arc(), create_line(), escape(), find_pair(), find_pairs(), find_pairs_1(), FitCrosshairIntoGrid(), GlobalPuller(), InsertPointIntoRat(), mark_line_for_deletion(), maybe_pull_1(), NotifyLine(), NotifyMode(), Puller(), reverse_arc(), and reverse_line().
#define DESCRIPTION_NAME | ( | e | ) | ((e)->Name[DESCRIPTION_INDEX].TextString) |
Definition at line 141 of file macro.h.
Referenced by ActionElementList(), apply_vendor_map(), CopyElementLowLevel(), ghid_pinout_window_show(), gsvit_write_xcentroids(), PrintBOM(), PrintElementNameList(), vendorIsElementMappable(), and WriteElementData().
#define DESCRIPTION_TEXT | ( | e | ) | ((e)->Name[DESCRIPTION_INDEX]) |
Definition at line 145 of file macro.h.
Referenced by ChangeElementNameSize(), CopyElementLowLevel(), CreateNewElement(), and WriteElementData().
Definition at line 78 of file macro.h.
Referenced by unit_to_coord().
#define DRILL_LOOP | ( | top | ) |
do { \ Cardinal n; \ DrillType *drill; \ for (n = 0; (top)->DrillN > 0 && n < (top)->DrillN; n++) \ { \ drill = &(top)->Drill[n]
Definition at line 194 of file macro.h.
Referenced by FreeDrillInfo(), and GetDrillInfo().
#define ELEMENT_LOOP | ( | top | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (top)->Element, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ ElementType *element = __iter->data;
Definition at line 222 of file macro.h.
Referenced by ActionAttributes(), ActionChangePinName(), ActionDisperseElements(), ActionDisplay(), ActionDJopt(), ActionElementList(), ActionElementSetAttr(), ActionListRotations(), ActionMinClearGap(), ActionMinMaskGap(), ActionRenumber(), ActionToggleHideName(), apply_vendor_map(), ChangeSelectedElementSide(), ClearFlagOnPinsViasAndPads(), collectSelectedElements(), ComputeCost(), CopyPastebufferToLayout(), DRCAll(), element_name_for(), find_element_by_refdes(), FreeDataMemory(), FreeRotateBuffer(), GetDataBoundingBox(), gsvit_write_xcentroids(), IPCD356_Netlist(), IPCD356_SanityCheck(), IPCD356_WriteNet(), LookupConnectionsToAllElements(), LookupUnusedPins(), netnode_browse(), PrintBOM(), read_pads(), read_points(), relocate(), renumber_block(), renumber_buffer(), ReportAllNetLengths(), ReportFoundPins(), ReportNetLength(), ResetVisitPinsViasAndPads(), RotateBuffer(), SearchElementByName(), SearchObjectByID(), SelectBlock(), SelectedOperation(), smartdisperse(), SwapBuffer(), UniqueElementName(), and XORDrawBuffer().
#define ELEMENT_NAME | ( | p, | |
e | |||
) | ((e)->Name[NAME_INDEX((p))].TextString) |
Definition at line 140 of file macro.h.
Referenced by QueryInputAndChangeObjectName().
#define ELEMENT_TEXT | ( | p, | |
e | |||
) | ((e)->Name[NAME_INDEX((p))]) |
Definition at line 144 of file macro.h.
Referenced by draw_element_name(), DrawElementName(), EraseElementName(), SelectBlock(), and SelectedOperation().
#define ELEMENTARC_LOOP | ( | element | ) |
#define ELEMENTLINE_LOOP | ( | element | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (element)->Line, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ LineType *line = __iter->data;
Definition at line 277 of file macro.h.
Referenced by ChangeElementSize(), CopyElementLowLevel(), draw_element_package(), DrawElementPackage(), DRCAll(), EraseElement(), FreeRotateElementLowLevel(), MirrorElementCoordinates(), MoveElementLowLevel(), pinout_set_data(), RotateElementLowLevel(), SearchObjectByID(), SetElementBoundingBox(), SmashBufferElement(), and XORDrawElement().
#define ELEMENTNAME_LOOP | ( | element | ) |
do { \ Cardinal n; \ char *textstring; \ for (n = MAX_ELEMENTNAMES-1; n != -1; n--) \ { \ textstring = (element)->Name[n].TextString
Definition at line 246 of file macro.h.
Referenced by FreeElementMemory().
#define ELEMENTTEXT_LOOP | ( | element | ) |
do { \ Cardinal n; \ TextType *text; \ for (n = MAX_ELEMENTNAMES-1; n != -1; n--) \ { \ text = &(element)->Name[n]
Definition at line 238 of file macro.h.
Referenced by ChangeElementNameSize(), DestroyElement(), FreeRotateElementLowLevel(), MirrorElementCoordinates(), MoveElementLowLevel(), MoveElementName(), r_delete_element(), RotateElementLowLevel(), RotateElementName(), SearchObjectByID(), SelectBlock(), SelectObject(), and SetElementBoundingBox().
#define EMPTY | ( | a | ) | ((a) ? (a) : "") |
Definition at line 71 of file macro.h.
Referenced by _draw_pv_name(), ActionChangeName(), draw_pad_name(), libnode_select(), library_window_callback_tree_selection_changed(), LoadFootprintByName(), PrintAndSelectUnusedPinsAndPadsOfElement(), PrintElementConnections(), PrintElementNameList(), PrintPadConnections(), PrintPinConnections(), QueryInputAndChangeObjectName(), ReadLibraryContents(), ReportDialog(), WriteElementData(), WriteLayerData(), WritePCBDataHeader(), and WriteViaData().
#define EMPTY_STRING_P | ( | a | ) | ((a) ? (a)[0]==0 : 1) |
Definition at line 72 of file macro.h.
Referenced by ActionElementList(), Parse(), ReadNetlist(), renumber_block(), renumber_buffer(), and WritePipe().
#define END_LOOP }} while (0) |
Definition at line 177 of file macro.h.
Referenced by acquire_twonets(), ActionAddRats(), ActionAttributes(), ActionChangePinName(), ActionDisperseElements(), ActionDisplay(), ActionDJopt(), ActionElementList(), ActionElementSetAttr(), ActionListRotations(), ActionMinClearGap(), ActionMinMaskGap(), ActionRenumber(), ActionRipUp(), ActionToggleHideName(), AddAllRats(), apply_vendor_map(), AssignDefaultLayerTypes(), AutoRoute(), ChangeBuriedViasAfterLayerCreate(), ChangeBuriedViasAfterLayerDelete(), ChangeBuriedViasAfterLayerMove(), ChangeElement2ndSize(), ChangeElementNameSize(), ChangeElementOctagon(), ChangeElementSize(), ChangeElementSquare(), ChangeSelectedElementSide(), ChangeSelectedHole(), ChangeSelectedViaLayers(), CheckArcPointForRubberbandConnection(), CheckLinePointForRubberbandConnection(), CheckPadForRubberbandConnection(), CheckPolygonForRubberbandConnection(), CheckShorts(), ClearFlagOnLinesAndPolygons(), ClearFlagOnPinsViasAndPads(), clearPoly(), ClrElementOctagon(), ClrElementSquare(), collectSelectedElements(), CollectSubnets(), ComputeCost(), ConvertBufferToElement(), CopyElementLowLevel(), CopyPastebufferToLayout(), create_lib_tree_model(), CreateNewArcOnLayer(), CreateNewPCB(), CreateNewVia(), CreateRouteData(), DeleteRats(), describe_location(), DestroyElement(), draw_element_package(), draw_element_pins_and_pads(), DrawElementPackage(), DrawElementPinsAndPads(), drc_lines(), DRCAll(), element_name_for(), ElementOrientation(), EraseElement(), EraseElementPinsAndPads(), escape(), find_element_by_refdes(), find_pairs(), FitCrosshairIntoGrid(), FlagCurrentStyle(), FreeDataMemory(), FreeDrillInfo(), FreeElementMemory(), FreeLibraryMemory(), FreeNetListListMemory(), FreeNetListMemory(), FreeRotateBuffer(), FreeRotateElementLowLevel(), GatherSubnets(), GetDataBoundingBox(), GetDrillInfo(), GlobalPuller(), gsvit_build_net_from_selected(), gsvit_lookup_net_from_arc(), gsvit_lookup_net_from_line(), gsvit_lookup_net_from_pad(), gsvit_lookup_net_from_polygon(), gsvit_lookup_net_from_pv(), gsvit_write_xcentroids(), import_clusters(), import_geometry(), IPCD356_Netlist(), IPCD356_SanityCheck(), IPCD356_WriteNet(), IronDownAllUnfixedPaths(), lookup_keepaway(), lookup_thickness(), LookupConnectionsToAllElements(), LookupRatLines(), LookupRubberbandLines(), LookupUnusedPins(), MirrorBuffer(), MirrorElementCoordinates(), move_all_thermals(), MoveElementLowLevel(), MoveElementName(), MoveElementToBuffer(), MovePolygonLowLevel(), nbcb_ripup(), net_model_create(), netlist_rip_up_cb(), netnode_browse(), node_model_create(), NotifyMode(), PCBFileVersionNeeded(), pinout_set_data(), PlowsPolygon(), PrintAndSelectUnusedPinsAndPadsOfElement(), PrintBOM(), PrintElementConnections(), PrintFab(), ProcNetlist(), r_delete_element(), rat_used(), read_lines(), read_pads(), read_points(), relocate(), RemoveDegradedVias(), renumber_block(), renumber_buffer(), ReportAllNetLengths(), ReportDialog(), ReportFoundPins(), ReportNetLength(), ResetSubnet(), ResetVisitPinsViasAndPads(), RotateBuffer(), RotateElementLowLevel(), RotateElementName(), RotatePolygonLowLevel(), RouteAll(), RouteOne(), SearchElementByName(), SearchLayerByName(), SearchObjectByID(), SearchPointByLocation(), SelectBlock(), SelectBuriedVias(), SelectByFlag(), SelectedOperation(), SelectObject(), SetElementBoundingBox(), SetElementOctagon(), SetElementSquare(), SetPolygonBoundingBox(), SetRouteStyle(), smartdisperse(), SmashBufferElement(), SwapBuffer(), teardrops(), touch_conflicts(), TransferNet(), UniqueElementName(), XORDrawBuffer(), and XORDrawElement().
#define ENDALL_LOOP }} while (0); }} while(0) |
Definition at line 324 of file macro.h.
Referenced by ActionMinClearGap(), ActionMorphPolygon(), ActionRipUp(), ChangeSelectedPaste(), CheckShorts(), ClearFlagOnLinesAndPolygons(), ClearWarnings(), CreateRouteData(), DrawPaste(), DRCAll(), find_pairs(), FreeRotateBuffer(), GatherSubnets(), GetDataBoundingBox(), GetDrillInfo(), gsvit_build_net_from_selected(), InitComponentLookup(), IsPasteEmpty(), MirrorBuffer(), move_all_thermals(), nbcb_ripup(), netlist_rip_up_cb(), padcleaner(), PCBFileVersionNeeded(), ProcNetlist(), RotateBuffer(), SearchObjectByID(), SelectByFlag(), SelectedOperation(), SwapBuffer(), teardrops(), and XYtoNetLength().
Definition at line 67 of file macro.h.
Referenced by flags_to_string(), GetFunctionID(), pcbflags_to_string(), string_to_flags(), and string_to_pcbflags().
#define ENTRY_LOOP | ( | top | ) |
do { \ Cardinal n; \ LibraryEntryType *entry; \ for (n = (top)->EntryN-1; n != -1; n--) \ { \ entry = &(top)->Entry[n]
Definition at line 453 of file macro.h.
Referenced by create_lib_tree_model(), describe_location(), FreeLibraryMemory(), node_model_create(), and ProcNetlist().
#define FLAGS_EQUAL | ( | F1, | |
F2 | |||
) | pcb_flag_eq(&(F1), &(F2)) |
Definition at line 119 of file macro.h.
Referenced by UndoFlag().
#define FRONT | ( | o | ) | ((TEST_FLAG(ONSOLDERFLAG, (o)) != 0) == SWAP_IDENT) |
Definition at line 158 of file macro.h.
Referenced by ActionElementList(), ActionToggleHideName(), CopyElement(), CopyPastebufferToLayout(), draw_element_name(), draw_element_package(), draw_element_pins_and_pads(), draw_pad(), DrawElementPinsAndPads(), DrawObject(), element_callback(), EMark_callback(), gsvit_write_xcentroids(), MoveElement(), MoveElementName(), name_callback(), pad_callback(), PrintBOM(), RemoveElement(), and XORDrawBuffer().
#define GET_THERM | ( | L, | |
P | |||
) | (((P)->Flags.t[(L)/2] >> (4 * ((L) % 2))) & 0xf) |
Definition at line 124 of file macro.h.
Referenced by common_flags_to_string(), move_one_thermal(), mptl_pin_callback(), NotifyMode(), and ThermPoly().
#define GROUP_LOOP | ( | data, | |
group | |||
) |
do { \ Cardinal entry; \ for (entry = 0; entry < ((PCBType *)(data->pcb))->LayerGroups.Number[(group)]; entry++) \ { \ LayerType *layer; \ Cardinal number; \ number = ((PCBType *)(data->pcb))->LayerGroups.Entries[(group)][entry]; \ if (number >= max_copper_layer) \ continue; \ layer = &data->Layer[number];
Definition at line 460 of file macro.h.
Referenced by CheckArcPointForRubberbandConnection(), CheckLinePointForRubberbandConnection(), CheckPadForRubberbandConnection(), CheckPolygonForRubberbandConnection(), clearPoly(), ConvertBufferToElement(), CreateRouteData(), drc_lines(), FitCrosshairIntoGrid(), import_geometry(), and PlowsPolygon().
#define INDEXOFCURRENT |
(PCB->SilkActive ? \ (Settings.ShowBottomSide ? bottom_silk_layer : top_silk_layer) \ : LayerStack[0])
Definition at line 88 of file macro.h.
Referenced by ChangePinThermal(), ChangeViaThermal(), drc_lines(), EnforceLineDRC(), identify_layer(), MoveLayerAction(), and NotifyMode().
#define LAYER_LOOP | ( | data, | |
ml | |||
) |
Definition at line 471 of file macro.h.
Referenced by PlowsPolygon(), SearchLayerByName(), and SelectBlock().
#define LAYER_ON_STACK | ( | n | ) | (&PCB->Data->Layer[LayerStack[(n)]]) |
Definition at line 83 of file macro.h.
Referenced by DrawEverything(), and SearchObjectByLocation().
Definition at line 84 of file macro.h.
Referenced by ActionDJopt(), ADD_ARC_TO_LIST(), ADD_LINE_TO_LIST(), ADD_POLYGON_TO_LIST(), CheckPinForRubberbandConnection(), CopyPastebufferToLayout(), create_pcb_line(), CreateRouteData(), DrawNewConnections(), DrawRecoveredObject(), DrawSilk(), export_pcb_drawarc(), export_pcb_drawline(), InitLayoutLookup(), IronDownAllUnfixedPaths(), layer_selector_rename_callback(), ListsEmpty(), LookupLOConnectionsToArc(), LookupLOConnectionsToLine(), LookupLOConnectionsToPad(), LookupLOConnectionsToPolygon(), LookupLOConnectionsToPVList(), LookupLOConnectionsToRatEnd(), LookupPVConnectionsToLOList(), move_corner(), move_line_to_layer(), PrintFab(), RD_DrawLine(), reassign_no_drc_flags(), ripout_livedraw_obj(), split_line(), SwapSides(), and UndoMoveToLayer().
#define LAYER_TYPE_LOOP | ( | data, | |
ml, | |||
type | |||
) |
#define LINE_LOOP | ( | layer | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (layer)->Line, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ LineType *line = __iter->data;
Definition at line 293 of file macro.h.
Referenced by ActionDJopt(), CheckPolygonForRubberbandConnection(), ConvertBufferToElement(), CopyPastebufferToLayout(), CreateRouteData(), find_pairs(), FreeDataMemory(), GlobalPuller(), gsvit_lookup_net_from_line(), PrintFab(), read_lines(), SelectBlock(), and XORDrawBuffer().
#define MAKEMAX | ( | a, | |
b | |||
) | if ((b) > (a)) (a) = (b) |
Definition at line 65 of file macro.h.
Referenced by __r_insert_node(), adjust_bounds(), ComputeCost(), M_POLYAREA_update_primary(), RouteAll(), SetElementBoundingBox(), and SetPolygonBoundingBox().
#define MAKEMIN | ( | a, | |
b | |||
) | if ((b) < (a)) (a) = (b) |
Definition at line 64 of file macro.h.
Referenced by __r_insert_node(), adjust_bounds(), ComputeCost(), M_POLYAREA_update_primary(), RouteAll(), SetElementBoundingBox(), and SetPolygonBoundingBox().
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
Definition at line 58 of file macro.h.
Referenced by ActionSelect(), ActionUnselect(), AddLine(), AddPad(), AddPart(), AddPin(), ArcPolyNoIntersect(), AutoPlaceSelected(), bloat_routebox(), break_box_edge(), BreakManyEdges(), ChangeArcClearSize(), ChangeLineClearSize(), ChangePadMaskSize(), ChangePinMaskSize(), ChangeViaMaskSize(), check_point_in_pad(), CheckArcPointForRubberbandConnection(), CheckLinePointForRubberbandConnection(), CheckPadForRubberbandConnection(), clip_box(), ComputeCost(), CreateDrawnLineOnLayer(), CreateNewElement(), createPerturbation(), CreateRouteData(), crosshair_update_range(), draw_dozen_cross(), draw_pad_name(), draw_slanted_cross(), expand_box(), fill_polyarea(), find_pairs(), flow_from_edge_to_edge(), FortyFiveLine(), GatherPadName(), GetDataBoundingBox(), ghid_cell_renderer_visibility_get_size(), ghid_drawing_area_expose_cb(), ghid_invalidate_lr(), ghid_render_pixmap(), ghid_violation_renderer_get_size(), ghid_zoom_view_abs(), ghid_zoom_view_fit(), gp_pad_cb(), hidgl_draw_grid(), InitAutoRouteParameters(), intersection_of_linesegs(), IsLineInPolygon(), LineArcIntersect(), LineLineIntersect(), LOCtoPVpoly_callback(), min_net_net_spacing(), min_oproute_net_spacing(), min_oproute_vertex_spacing(), min_spacing(), min_vertex_net_spacing(), oproute_min_spacing(), pan_common(), ParseGroupString(), penalty(), PinLineIntersect(), PV_TOUCH_PV(), RD_DrawLine(), redraw_region(), ReleaseMode(), RotateBoxLowLevel(), RouteOne(), SetArcBoundingBox(), SetCrosshairRange(), SetElementBoundingBox(), SetFontInfo(), SetLineBoundingBox(), SetPadBoundingBox(), SetPinBoundingBox(), SetTextBoundingBox(), should_compute_no_holes(), triangle_interior_capacity(), vector_insert_many(), and vertex_line_normal_intersection().
#define MENU_LOOP | ( | top | ) |
do { \ Cardinal l; \ LibraryMenuType *menu; \ for (l = (top)->MenuN-1; l != -1; l--) \ { \ menu = &(top)->Menu[l]
Definition at line 446 of file macro.h.
Referenced by create_lib_tree_model(), describe_location(), FreeLibraryMemory(), net_model_create(), ProcNetlist(), and rat_used().
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Definition at line 57 of file macro.h.
Referenced by ActionElementList(), ActionSelect(), ActionUnselect(), AddLine(), AddPad(), AddPart(), AutoPlaceSelected(), break_box_edge(), BreakManyEdges(), ChangeArcClearSize(), ChangeLineClearSize(), ChangePadClearSize(), ChangePinClearSize(), ChangeViaClearSize(), check_point_in_pad(), CheckPadForRubberbandConnection(), clip_box(), ComputeCost(), create_board_edge(), CreateDrawnLineOnLayer(), createPerturbation(), crosshair_update_range(), draw_dozen_cross(), draw_pad_name(), draw_slanted_cross(), DrawBackgroundImage(), DrawEMark(), drc_lines(), edge_min_spacing(), expand_box(), find_pairs(), FortyFiveLine(), GatherPadName(), GetDataBoundingBox(), ghid_drawing_area_expose_cb(), ghid_invalidate_lr(), ghid_port_ranges_scale(), ghid_render_pixmap(), ghid_trackball_expose(), ghid_zoom_view_abs(), gp_pad_cb(), gts_bbox_point_distance2(), hidgl_draw_grid(), InitAutoRouteParameters(), intersection_of_linesegs(), IsLineInPolygon(), pan_common(), penalty(), ps_hid_export_to_file(), RD_DrawLine(), RD_DrawManhattanLine(), redraw_region(), ReleaseMode(), RotateBoxLowLevel(), RouteOne(), rubber_callback(), SetArcBoundingBox(), SetCrosshairRange(), SetElementBoundingBox(), SetFontInfo(), SetLineBoundingBox(), SetPadBoundingBox(), SetTextBoundingBox(), should_compute_no_holes(), TracePath(), triangle_interior_capacity(), and vertex_line_normal_intersection().
#define NAME_INDEX | ( | p | ) |
(TEST_FLAG(NAMEONPCBFLAG,(p)) ? NAMEONPCB_INDEX :\ (TEST_FLAG(DESCRIPTIONFLAG, (p)) ? \ DESCRIPTION_INDEX : VALUE_INDEX))
Definition at line 137 of file macro.h.
Referenced by ChangeElementName(), ChangeElementText(), DrawEverything(), DrawSilk(), NotifyMode(), ReportDialog(), and SearchElementNameByLocation().
#define NAMEONPCB_INDEX 1 |
Definition at line 135 of file macro.h.
Referenced by ActionElementList(), ChangeElementName(), netnode_browse(), ReportAllNetLengths(), and ReportNetLength().
#define NAMEONPCB_NAME | ( | e | ) | ((e)->Name[NAMEONPCB_INDEX].TextString) |
Definition at line 142 of file macro.h.
Referenced by ActionAttributes(), ActionChangePinName(), ActionElementList(), ActionElementSetAttr(), ActionListRotations(), ActionRenumber(), AddNet(), apply_vendor_map(), CheckShorts(), ConnectionName(), ConvertBufferToElement(), CopyElementLowLevel(), describe_location(), DRCAll(), find_element_by_refdes(), ghid_pinout_window_show(), gsvit_write_xcentroids(), PrintBOM(), PrintElementNameList(), ProcNetlist(), renumber_block(), ReportFoundPins(), SmashBufferElement(), UniqueElementName(), vendorIsElementMappable(), and WriteElementData().
#define NAMEONPCB_TEXT | ( | e | ) | ((e)->Name[NAMEONPCB_INDEX]) |
Definition at line 146 of file macro.h.
Referenced by ActionToggleHideName(), CreateNewElement(), and GetDataBoundingBox().
#define NET_LOOP | ( | top | ) |
do { \ Cardinal n; \ NetType *net; \ for (n = (top)->NetN-1; n != -1; n--) \ { \ net = &(top)->Net[n]
Definition at line 208 of file macro.h.
Referenced by AddAllRats(), CollectSubnets(), CreateRouteData(), FreeNetListMemory(), import_clusters(), and smartdisperse().
#define NETLIST_LOOP | ( | top | ) |
do { \ Cardinal n; \ NetListType *netlist; \ for (n = (top)->NetListN-1; n != -1; n--) \ { \ netlist = &(top)->NetList[n]
Definition at line 201 of file macro.h.
Referenced by CreateRouteData(), FreeNetListListMemory(), and import_clusters().
#define NSTRCMP | ( | a, | |
b | |||
) | ((a) ? ((b) ? strcmp((a),(b)) : 1) : -1) |
Definition at line 70 of file macro.h.
Referenced by ActionChangePinName(), ActionDJopt(), ActionElementSetAttr(), ActionLoadVendorFrom(), bom_insert(), ChangeFlag(), ComputeCost(), CreateNewNet(), ElementOrientation(), FindPad(), gsvit_write_xcentroids(), InitPaths(), LoadBackgroundImage(), LoadNewlibFootprintsFromDir(), PrintBOM(), process_skips(), ProcNetlist(), resource_subres(), resource_value(), SearchElementByName(), SearchLayerByName(), SetRouteStyle(), UniqueElementName(), and vendorIsElementMappable().
#define OBJECT_ID | ( | p | ) | (((AnyObjectType *) p)->ID) |
Definition at line 102 of file macro.h.
Referenced by AddObjectTo2ndSizeUndoList(), AddObjectToChangeAnglesUndoList(), AddObjectToChangeNameUndoList(), AddObjectToClearPolyUndoList(), AddObjectToClearSizeUndoList(), AddObjectToCreateUndoList(), AddObjectToFlagUndoList(), AddObjectToInsertPointUndoList(), AddObjectToMaskSizeUndoList(), AddObjectToMirrorUndoList(), AddObjectToMoveToLayerUndoList(), AddObjectToMoveUndoList(), AddObjectToRemovePointUndoList(), AddObjectToRotateUndoList(), AddObjectToSetViaLayersUndoList(), AddObjectToSizeUndoList(), CopyObjectToUndoList(), and MoveObjectToRemoveUndoList().
#define ON_SIDE | ( | element, | |
side | |||
) | (TEST_FLAG (ONSOLDERFLAG, element) == (side == BOTTOM_SIDE)) |
Definition at line 165 of file macro.h.
Referenced by clearPad_callback(), DrawPaste(), element_callback(), IsPasteEmpty(), name_callback(), and pad_callback().
#define PAD_LOOP | ( | element | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (element)->Pad, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ PadType *pad = __iter->data;
Definition at line 261 of file macro.h.
Referenced by ActionChangePinName(), ActionDisplay(), ActionDJopt(), ActionMinClearGap(), ActionMinMaskGap(), ChangeElementSquare(), ClearFlagOnPinsViasAndPads(), ClrElementSquare(), ComputeCost(), CopyElementLowLevel(), DestroyElement(), draw_element_pins_and_pads(), DrawElementPinsAndPads(), DRCAll(), element_name_for(), ElementOrientation(), EraseElementPinsAndPads(), FreeElementMemory(), FreeRotateElementLowLevel(), gsvit_lookup_net_from_pad(), gsvit_write_xcentroids(), IPCD356_Netlist(), IPCD356_WriteNet(), LookupRatLines(), LookupRubberbandLines(), MirrorElementCoordinates(), MoveElementLowLevel(), MoveElementToBuffer(), netnode_browse(), NotifyMode(), pinout_set_data(), PlowsPolygon(), PrintAndSelectUnusedPinsAndPadsOfElement(), PrintBOM(), PrintElementConnections(), r_delete_element(), read_pads(), ReportAllNetLengths(), ReportDialog(), ReportFoundPins(), ReportNetLength(), ResetVisitPinsViasAndPads(), RotateElementLowLevel(), SearchObjectByID(), SelectBlock(), SelectedOperation(), SelectObject(), SetElementBoundingBox(), SetElementSquare(), SmashBufferElement(), and XORDrawElement().
#define PASTEBUFFER (&Buffers[Settings.BufferNumber]) |
Definition at line 107 of file macro.h.
Referenced by ActionElementList(), ActionFreeRotateBuffer(), ActionLoadFrom(), ActionPasteBuffer(), ActionRipUp(), ActionSelect(), click_cb(), ConvertBufferToElement(), CopyPastebufferToLayout(), crosshair_update_range(), DrawAttached(), libnode_select(), library_window_callback_tree_selection_changed(), LoadFootprint(), ReleaseMode(), renumber_buffer(), and WriteBuffer().
#define PIN_LOOP | ( | element | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (element)->Pin, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ PinType *pin = __iter->data;
Definition at line 253 of file macro.h.
Referenced by ActionChangePinName(), ActionDisplay(), ActionDJopt(), ActionMinClearGap(), ActionMinMaskGap(), apply_vendor_map(), ChangeElement2ndSize(), ChangeElementOctagon(), ChangeElementSquare(), ClearFlagOnPinsViasAndPads(), ClrElementOctagon(), ClrElementSquare(), ComputeCost(), CopyElementLowLevel(), DestroyElement(), draw_element_pins_and_pads(), DrawElementPinsAndPads(), DRCAll(), element_name_for(), ElementOrientation(), EraseElementPinsAndPads(), FreeElementMemory(), FreeRotateElementLowLevel(), gsvit_lookup_net_from_pv(), gsvit_write_xcentroids(), IPCD356_Netlist(), IPCD356_WriteNet(), LookupRatLines(), LookupRubberbandLines(), MirrorElementCoordinates(), MoveElementLowLevel(), MoveElementToBuffer(), netnode_browse(), NotifyMode(), pinout_set_data(), PlowsPolygon(), PrintAndSelectUnusedPinsAndPadsOfElement(), PrintBOM(), PrintElementConnections(), r_delete_element(), read_points(), ReportAllNetLengths(), ReportDialog(), ReportFoundPins(), ReportNetLength(), ResetVisitPinsViasAndPads(), RotateElementLowLevel(), SearchObjectByID(), SelectBlock(), SelectedOperation(), SelectObject(), SetElementBoundingBox(), SetElementOctagon(), SetElementSquare(), SmashBufferElement(), and XORDrawElement().
#define POINTER_LOOP | ( | top | ) |
Definition at line 439 of file macro.h.
Referenced by CheckShorts(), and CreateRouteData().
#define POLYGON_LOOP | ( | layer | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (layer)->Polygon, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ PolygonType *polygon = __iter->data;
Definition at line 309 of file macro.h.
Referenced by ConvertBufferToElement(), CopyPastebufferToLayout(), CreateRouteData(), FreeDataMemory(), gsvit_lookup_net_from_polygon(), SearchPointByLocation(), SelectBlock(), and XORDrawBuffer().
#define POLYGONPOINT_LOOP | ( | polygon | ) |
do { \ Cardinal n; \ PointType *point; \ for (n = (polygon)->PointN-1; n != -1; n--) \ { \ point = &(polygon)->Points[n]
Definition at line 317 of file macro.h.
Referenced by FreeRotateBuffer(), MirrorBuffer(), MovePolygonLowLevel(), RotatePolygonLowLevel(), SearchObjectByID(), SearchPointByLocation(), SetPolygonBoundingBox(), and SwapBuffer().
#define RAT_LOOP | ( | top | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (top)->Rat, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ RatType *line = __iter->data;
Definition at line 230 of file macro.h.
Referenced by acquire_twonets(), ActionAddRats(), AutoRoute(), ClearFlagOnLinesAndPolygons(), DeleteRats(), SearchObjectByID(), SelectBlock(), SelectByFlag(), and SelectedOperation().
#define SET_FLAG | ( | F, | |
P | |||
) | ((P)->Flags.f |= (F)) |
Definition at line 112 of file macro.h.
Referenced by ActionAddRats(), ActionDisplay(), ActionElementList(), ActionRenumber(), ActionUndo(), add_object_to_list(), CheckShorts(), common_string_to_flags(), ConvertBufferToElement(), CopyAttachedPolygonToLayer(), CreateNewPCB(), CreateNewPin(), CreateNewRat(), CreateNewVia(), CreateRouteData(), DrawShortestRats(), drc_callback(), DRCAll(), IPCD356_WriteNet(), layer_selector_toggle_callback(), LayerStringToLayerStack(), maybe_pull_1(), MoveRatToLayer(), MoveTextToLayerLowLevel(), pinout_set_data(), png_hid_export_to_file(), PrintAndSelectUnusedPinsAndPadsOfElement(), ProcNetlist(), pv_arc_callback(), pv_line_callback(), pv_pad_callback(), pv_pv_callback(), renumber_block(), renumber_buffer(), selection_changed_cb(), SetElementBoundingBox(), simple_optimize_corner(), and Undo().
#define SGN | ( | a | ) | ((a) >0 ? 1 : ((a) == 0 ? 0 : -1)) |
Definition at line 61 of file macro.h.
Referenced by AdjustTwoLine(), common_thindraw_pcb_pad(), createPerturbation(), drc_lines(), XORDrawAttachedArc(), and XORDrawAttachedLine().
#define SGNZ | ( | a | ) | ((a) >=0 ? 1 : -1) |
Definition at line 63 of file macro.h.
Referenced by NotifyMode(), and XORDrawAttachedArc().
#define SILKARC_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ layer += max_copper_layer + BOTTOM_SILK_LAYER; \ for (l = 0; l < 2; l++, layer++) \ { \ ARC_LOOP(layer)
#define SILKLAYER |
#define SILKLINE_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ layer += max_copper_layer + BOTTOM_SILK_LAYER; \ for (l = 0; l < 2; l++, layer++) \ { \ LINE_LOOP(layer)
Definition at line 376 of file macro.h.
Referenced by DRCAll().
#define SILKPOLYGON_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ layer += max_copper_layer + BOTTOM_SILK_LAYER; \ for (l = 0; l < 2; l++, layer++) \ { \ POLYGON_LOOP(layer)
#define STYLE_LOOP | ( | top | ) |
do { \ Cardinal n; \ RouteStyleType *style; \ for (n = 0; n < NUM_STYLES; n++) \ { \ style = &(top)->RouteStyle[n]
Definition at line 179 of file macro.h.
Referenced by CreateNewPCB(), FlagCurrentStyle(), lookup_keepaway(), lookup_thickness(), ProcNetlist(), and SetRouteStyle().
#define SWAP_ANGLE | ( | a | ) | (-(a)) |
Definition at line 48 of file macro.h.
Referenced by MirrorBuffer(), MirrorElementCoordinates(), and SwapBuffer().
#define SWAP_DELTA | ( | d | ) | (-(d)) |
Definition at line 49 of file macro.h.
Referenced by MirrorBuffer(), MirrorElementCoordinates(), and SwapBuffer().
#define SWAP_IDENT Settings.ShowBottomSide |
Definition at line 43 of file macro.h.
Referenced by ConvertBufferToElement(), DrawEverything(), FinishStroke(), NotifyMode(), SaveBufferElements(), SelectBlock(), SelectObject(), and SmashBufferElement().
Definition at line 46 of file macro.h.
Referenced by common_draw_pcb_text().
Definition at line 47 of file macro.h.
Referenced by common_draw_pcb_text().
Definition at line 50 of file macro.h.
Referenced by MirrorBuffer(), MirrorElementCoordinates(), and SwapBuffer().
Definition at line 51 of file macro.h.
Referenced by MirrorBuffer(), MirrorElementCoordinates(), and SwapBuffer().
#define TEST_ANY_THERMS | ( | P | ) | mem_any_set((P)->Flags.t, sizeof((P)->Flags.t)) |
Definition at line 129 of file macro.h.
Referenced by common_flags_to_string(), and simple_optimize_corner().
#define TEST_FLAG | ( | F, | |
P | |||
) | ((P)->Flags.f & (F) ? 1 : 0) |
Definition at line 114 of file macro.h.
Referenced by _draw_pad(), _draw_pv(), _draw_pv_name(), acquire_twonets(), ActionAddRats(), ActionAttributes(), ActionChangeSize(), ActionDisperseElements(), ActionDisplay(), ActionDJopt(), ActionElementList(), ActionMorphPolygon(), ActionMoveObject(), ActionRenumber(), ActionRipUp(), ActionSetViaLayers(), ActionToggleHideName(), ActionUndo(), add_object_to_list(), AddAllRats(), AddNet(), AddPad(), AddPin(), AddPolygon(), AdjustAttachedLine(), AdjustInsertPoint(), AdjustTwoLine(), apply_vendor_map(), arc_callback(), arc_sub_callback(), arcpoint_callback(), AttachForCopy(), AutoRoute(), ChangeArcClearSize(), ChangeArcJoin(), ChangeArcSize(), ChangeElement2ndSize(), ChangeElementName(), ChangeElementNameSize(), ChangeElementOctagon(), ChangeElementSide(), ChangeElementSize(), ChangeElementSquare(), ChangeFlag(), ChangeHole(), ChangeLineClearSize(), ChangeLineJoin(), ChangeLineSize(), ChangeObjectClearSize(), ChangeObjectViaLayers(), ChangePadClearSize(), ChangePadName(), ChangePadSize(), ChangePadSquare(), ChangePaste(), ChangePin2ndSize(), ChangePinClearSize(), ChangePinName(), ChangePinOctagon(), ChangePinSize(), ChangePinSquare(), ChangePolyClear(), ChangeSelectedClearSize(), ChangeSelectedElementSide(), ChangeSelectedHole(), ChangeSelectedPaste(), ChangeSelectedViaLayers(), ChangeTextJoin(), ChangeTextName(), ChangeTextSize(), ChangeVia2ndSize(), ChangeViaClearSize(), ChangeViaName(), ChangeViaOctagon(), ChangeViaSize(), check_point_in_pad(), check_point_in_pin(), check_snap_offgrid_line(), CheckPadForRat(), CheckPadForRubberbandConnection(), CheckPinForRubberbandConnection(), CheckPolygonForRubberbandConnection(), CheckShorts(), ClearFlagOnLinesAndPolygons(), ClearFlagOnPinsViasAndPads(), clearPin_callback(), clearPoly(), ClearWarnings(), ClosePolygon(), ClrArcJoin(), ClrElementOctagon(), ClrElementSquare(), ClrLineJoin(), ClrPadSquare(), ClrPinOctagon(), ClrPinSquare(), ClrTextJoin(), ClrViaOctagon(), collectSelectedElements(), CollectSubnets(), common_draw_pcb_arc(), common_draw_pcb_line(), common_draw_pcb_text(), common_fill_pcb_pad(), common_fill_pcb_polygon(), common_fill_pcb_pv(), common_flags_to_string(), common_gui_draw_pcb_polygon(), common_thindraw_pcb_pad(), common_thindraw_pcb_polygon(), common_thindraw_pcb_pv(), ComputeCost(), CopyAttachedPolygonToLayer(), CopyElement(), CreateNewPin(), CreateNewVia(), createPerturbation(), CreateRouteData(), cur_clip(), DeleteRats(), doPerturb(), draw_element_name(), draw_element_package(), draw_pad(), draw_pad_name(), DrawAttached(), DrawElementName(), DrawEMark(), DrawEverything(), DrawLayer(), DrawMask(), DrawNewConnections(), DrawPad(), DrawPaste(), DrawPin(), DrawRat(), DrawVia(), DRCAll(), drcArc_callback(), drcLine_callback(), drcPad_callback(), drcVia_callback(), element_callback(), EraseElementName(), ErasePad(), ErasePin(), EraseRat(), EraseVia(), escape(), export_pcb_drawarc(), export_pcb_drawline(), FillDrill(), find_pair_padarc_callback(), find_pair_padline_callback(), FindPad(), FitCrosshairIntoGrid(), FlagElementName(), FlagLayerShown(), FlagTESTFLAG(), GatherPVName(), GatherSubnets(), ghid_set_layer(), ghid_set_status_line_label(), gp_pad_cb(), gp_pin_cb(), gsvit_build_net_from_selected(), hidgl_fill_pcb_polygon(), hole_callback(), hole_counting_callback(), InitClip(), InitComponentLookup(), InitializeDrill(), IPCD356_Netlist(), IPCD356_WriteNet(), IronDownAllUnfixedPaths(), IsArcInPolygon(), IsLineInPolygon(), IsPasteEmpty(), IsPointInPad(), IsPointOnPin(), layer_button_callback(), layer_process(), LayersChanged(), lesstif_draw_arc(), lesstif_draw_line(), lesstif_draw_rect(), lesstif_fill_circle(), lesstif_fill_rect(), lesstif_set_layer(), lesstif_use_mask(), line_callback(), line_sub_callback(), LineLineIntersect(), linepoint_callback(), LinePoly(), ListStart(), LOCtoArcArc_callback(), LOCtoArcLine_callback(), LOCtoArcPad_callback(), LOCtoLineArc_callback(), LOCtoLineLine_callback(), LOCtoLinePad_callback(), LOCtoLineRat_callback(), LOCtoPad_callback(), LOCtoPadArc_callback(), LOCtoPadLine_callback(), LOCtoPadPad_callback(), LOCtoPadPoly_callback(), LOCtoPadRat_callback(), LOCtoPolyArc_callback(), LOCtoPolyLine_callback(), LOCtoPolyPad_callback(), LOCtoPolyRat_callback(), LOCtoPVarc_callback(), LOCtoPVline_callback(), LOCtoPVpad_callback(), LOCtoPVpoly_callback(), LOCtoPVrat_callback(), LOCtoRat_callback(), LookupLOConnectionsToArc(), LookupLOConnectionsToLine(), LookupLOConnectionsToPad(), LookupLOConnectionsToPolygon(), MorphPolygon(), MoveArcToLayer(), MoveLineToLayer(), MovePolygonToLayer(), MoveRatToLayer(), MoveTextToLayer(), name_callback(), nbcb_ripup(), netlist_rip_up_cb(), NotifyLine(), NotifyMode(), pad_callback(), pad_sub_callback(), padcleaner(), PinLineIntersect(), pinorvia_callback(), PinPoly(), plow_callback(), PlowsPolygon(), png_set_layer(), polygon_callback(), PolygonToRat_callback(), PrintAndSelectUnusedPinsAndPadsOfElement(), PrintElementConnections(), PrintFab(), ProcNetlist(), ps_draw_pcb_polygon(), pv_arc_callback(), pv_line_callback(), pv_pad_callback(), pv_poly_callback(), pv_pv_callback(), pv_rat_callback(), PV_TOUCH_PV(), rat_callback(), RD_DrawLine(), RD_DrawVia(), read_pads(), read_points(), relocate(), renumber_block(), ReportDialog(), ReportFoundPins(), ReportNetLength(), RotateScreenObject(), RotateTextLowLevel(), RouteAll(), rubber_callback(), SearchObjectByLocation(), SelectBlock(), SelectBuriedVias(), SelectByFlag(), SelectedOperation(), SelectObject(), set_object_color(), SetArcJoin(), SetElementOctagon(), SetElementSquare(), SetLineJoin(), SetLineSize(), SetMode(), SetPadBoundingBox(), SetPadSquare(), SetPinOctagon(), SetPinSquare(), SetTextBoundingBox(), SetTextJoin(), SetViaOctagon(), smartdisperse(), SmashBufferElement(), SubtractArc(), SubtractLine(), SubtractPad(), SubtractText(), text_callback(), text_sub_callback(), ThermPoly(), TracePath(), Undo(), UnsubtractArc(), UnsubtractLine(), UnsubtractText(), UpdateXY(), vendorIsElementMappable(), vertex_net_thickness(), XORDrawElement(), XORDrawMoveOrCopyObject(), and XYtoNetLength().
#define TEST_FLAGS | ( | F, | |
P | |||
) | (((P)->Flags.f & (F)) == (F) ? 1 : 0) |
Definition at line 117 of file macro.h.
Referenced by ActionMinClearGap(), ActionMinMaskGap(), ActionRipUp(), and mark_ends_pending().
Definition at line 96 of file macro.h.
Referenced by MoveLineToLayer(), and NotifyMode().
#define TEST_THERM | ( | L, | |
P | |||
) | ((P)->Flags.t[(L)/2] & THERMFLAG(L) ? 1 : 0) |
Definition at line 123 of file macro.h.
Referenced by common_flags_to_string(), LOCtoPVpoly_callback(), mptl_pin_callback(), pin_sub_callback(), pv_poly_callback(), SubtractPin(), and SwapBuffer().
#define TEXT_IS_VISIBLE | ( | b, | |
l, | |||
t | |||
) | ((l)->On) |
Definition at line 152 of file macro.h.
Referenced by SelectBlock(), and SelectedOperation().
#define TEXT_LOOP | ( | layer | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (layer)->Text, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ TextType *text = __iter->data;
Definition at line 301 of file macro.h.
Referenced by CopyPastebufferToLayout(), CreateRouteData(), FreeDataMemory(), PrintFab(), SelectBlock(), and XORDrawBuffer().
#define TO_RADIANS | ( | degrees | ) | (M180 * (degrees)) |
Definition at line 75 of file macro.h.
Referenced by gerber_draw_arc().
#define TOGGLE_FLAG | ( | F, | |
P | |||
) | ((P)->Flags.f ^= (F)) |
Definition at line 115 of file macro.h.
Referenced by ActionDisplay(), ActionToggleHideName(), ChangeArcJoin(), ChangeHole(), ChangeLineJoin(), ChangePadSquare(), ChangePaste(), ChangePinOctagon(), ChangePinSquare(), ChangePolyClear(), ChangeTextJoin(), ChangeViaOctagon(), CreateNewRubberbandEntry(), layer_button_callback(), MirrorElementCoordinates(), NotifyMode(), SelectObject(), SwapBuffer(), and toggle_pin_selected().
#define UNKNOWN | ( | a | ) | ((a) && *(a) ? (a) : "(unknown)") |
Definition at line 68 of file macro.h.
Referenced by ActionDumpLibrary(), ActionLoadVendorFrom(), ActionRenumber(), apply_vendor_map(), CheckShorts(), ConnectionName(), CreateNewPin(), DRCAll(), gerber_set_layer(), ghid_config_groups_changed(), ghid_pinout_window_show(), gsvit_write_xcentroids(), layer_process(), main(), PrintBOM(), PrintFab(), PrintPadConnections(), ReadLibraryContents(), ReportDialog(), vendorIsElementMappable(), and WritePCBNetlistData().
Definition at line 69 of file macro.h.
Referenced by describe_location().
#define VALUE_INDEX 2 |
Definition at line 136 of file macro.h.
Referenced by ActionElementList().
#define VALUE_NAME | ( | e | ) | ((e)->Name[VALUE_INDEX].TextString) |
Definition at line 143 of file macro.h.
Referenced by apply_vendor_map(), CopyElementLowLevel(), ghid_pinout_window_show(), gsvit_write_xcentroids(), PrintBOM(), PrintElementNameList(), vendorIsElementMappable(), and WriteElementData().
#define VALUE_TEXT | ( | e | ) | ((e)->Name[VALUE_INDEX]) |
Definition at line 147 of file macro.h.
Referenced by CreateNewElement().
#define VIA_IS_BURIED | ( | via | ) | (via->BuriedFrom != 0 || via->BuriedTo != 0) |
Definition at line 486 of file macro.h.
Referenced by _draw_pv(), add_plow(), ChangeBuriedViasAfterLayerCreate(), ChangeBuriedViasAfterLayerDelete(), ChangeBuriedViasAfterLayerMove(), ChangeObjectViaLayers(), ChangeSelectedViaLayers(), hole_callback(), hole_counting_callback(), pin_sub_callback(), pv_pv_callback(), RemoveDegradedVias(), SelectBuriedVias(), subtract_plow(), ViaIsOnAnyVisibleLayer(), and ViaIsOnLayerGroup().
#define VIA_LOOP | ( | top | ) |
do { \ GList *__iter, *__next; \ Cardinal n = 0; \ for (__iter = (top)->Via, __next = g_list_next (__iter); \ __iter != NULL; \ __iter = __next, __next = g_list_next (__iter), n++) { \ PinType *via = __iter->data;
Definition at line 186 of file macro.h.
Referenced by ActionDJopt(), ActionMinClearGap(), ActionMinMaskGap(), ActionRipUp(), apply_vendor_map(), ChangeBuriedViasAfterLayerCreate(), ChangeBuriedViasAfterLayerDelete(), ChangeBuriedViasAfterLayerMove(), ChangeSelectedHole(), ChangeSelectedViaLayers(), ClearFlagOnPinsViasAndPads(), ConvertBufferToElement(), CopyPastebufferToLayout(), CreateNewVia(), CreateRouteData(), DRCAll(), find_pairs(), FreeDataMemory(), FreeRotateBuffer(), GatherSubnets(), GetDataBoundingBox(), GetDrillInfo(), gsvit_build_net_from_selected(), gsvit_lookup_net_from_pv(), IPCD356_Netlist(), IPCD356_WriteNet(), MirrorBuffer(), move_all_thermals(), nbcb_ripup(), netlist_rip_up_cb(), PCBFileVersionNeeded(), read_points(), RemoveDegradedVias(), ResetVisitPinsViasAndPads(), RotateBuffer(), SearchObjectByID(), SelectBlock(), SelectBuriedVias(), SelectByFlag(), SelectedOperation(), SwapBuffer(), teardrops(), and XORDrawBuffer().
Definition at line 487 of file macro.h.
Referenced by add_plow(), ChangeBuriedViasAfterLayerMove(), pin_sub_callback(), and subtract_plow().
#define VISIBLEARC_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ if (layer->On) \ ARC_LOOP(layer)
Definition at line 415 of file macro.h.
Referenced by nbcb_ripup(), netlist_rip_up_cb(), SelectByFlag(), and SelectedOperation().
#define VISIBLELINE_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ if (layer->On) \ LINE_LOOP(layer)
Definition at line 407 of file macro.h.
Referenced by ActionRipUp(), nbcb_ripup(), netlist_rip_up_cb(), SelectByFlag(), and SelectedOperation().
#define VISIBLEPOLYGON_LOOP | ( | top | ) |
do { \ Cardinal l; \ LayerType *layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ if (layer->On) \ POLYGON_LOOP(layer)
Definition at line 431 of file macro.h.
Referenced by SelectByFlag(), and SelectedOperation().
#define VISIBLETEXT_LOOP | ( | board | ) |
do { \ Cardinal l; \ LayerType *layer = (board)->Data->Layer; \ for (l = 0; l < max_copper_layer + SILK_LAYER; l++, layer++) \ { \ TEXT_LOOP(layer); \ if (TEXT_IS_VISIBLE((board), layer, text))
#define XOR | ( | a, | |
b | |||
) | (((a) && !(b)) || (!(a) && (b))) |
Definition at line 73 of file macro.h.
Referenced by EnforceLineDRC(), NotifyMode(), pad_sub_callback(), and XORDrawAttachedArc().
int mem_any_set | ( | unsigned char * | , |
int | |||
) |
Definition at line 2100 of file src/misc.c.