pcb 4.1.1
An interactive printed circuit board layout editor.

error.c File Reference

Error and debug functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <stdarg.h>
#include <signal.h>
#include <fcntl.h>
#include "global.h"
#include "data.h"
#include "error.h"
#include "file.h"
#include "misc.h"
Include dependency graph for error.c:

Go to the source code of this file.

Defines

#define utf8_dup_string(a, b)   *(a) = strdup(b)
#define USE_SYS_ERRLIST

Functions

void Message (const char *Format,...)
 Output of message in a dialog window or log window.
void OpenErrorMessage (char *Filename)
 Print standard 'open error'.
void PopenErrorMessage (char *Filename)
 Print standard 'popen error'.
void OpendirErrorMessage (char *DirName)
 Print standard 'opendir'.
void ChdirErrorMessage (char *DirName)
 Print standard 'chdir error'.
void MyFatal (char *Format,...)
 Output of fatal error message.
void CatchSignal (int Signal)
 Catches signals which abort the program.

Variables

int sys_nerr
char * sys_errlist []

Detailed Description

Error and debug functions.


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 error.c.


Define Documentation

#define USE_SYS_ERRLIST

Definition at line 76 of file error.c.

#define utf8_dup_string (   a,
 
)    *(a) = strdup(b)

Function Documentation

void CatchSignal ( int  Signal)

Catches signals which abort the program.

Definition at line 203 of file error.c.

References MyFatal(), and s.

Here is the call graph for this function:

void ChdirErrorMessage ( char *  DirName)

Print standard 'chdir error'.

Definition at line 164 of file error.c.

References _, Message(), sys_errlist, sys_nerr, and utf8_dup_string.

Referenced by LoadNewlibFootprintsFromDir(), and ParseLibraryTree().

Here is the call graph for this function:

void Message ( const char *  Format,
  ... 
)

Output of message in a dialog window or log window.

Definition at line 91 of file error.c.

References args, gui, and hid_st::logv.

Referenced by ActionAttributes(), ActionChangeSize(), ActionDRCheck(), ActionElementSetAttr(), ActionImport(), ActionListLayertypes(), ActionLoadVendorFrom(), ActionMessage(), ActionMoveObject(), ActionPasteBuffer(), ActionRenumber(), ActionSetLayertype(), ActionSetViaLayers(), AddAllRats(), AddNet(), append_drc_violation(), apply_vendor_map(), AutoPlaceSelected(), AutoRoute(), ChangeBuriedViasAfterLayerMove(), ChangeElementName(), ChangeFlag(), ChdirErrorMessage(), check_file_version(), check_unique_accel(), CheckShorts(), ClosePolygon(), CollectSubnets(), config_layers_apply(), ConvertBufferToElement(), CreateDefaultFont(), CreateNewPin(), CreateNewVia(), drc_callback(), DRCAll(), EraseObject(), FinishStroke(), gcode_finish_png(), gcode_start_gcode(), gerber_set_layer(), get_menu_filename(), GetObjectBoundingBox(), GetUndoSlot(), ghid_load_menus(), ghid_main_menu_real_add_resource(), GlobalPuller(), gsvit_finish_png(), gsvit_write_xcentroids(), hid_actionv(), hid_parse_actionstring(), hid_register_actions(), hid_save_settings(), HideCrosshair(), hybrid_router(), IPCD356_Netlist(), IPCD356_SanityCheck(), lesstif_menu(), LoadFootprint(), LoadFootprintByName(), LoadNewlibFootprintsFromDir(), LookupLOConnectionsToLOList(), main(), MirrorBuffer(), MoveArcToLayer(), MoveLayer(), MoveLayerAction(), MoveLineToLayer(), MovePolygonToLayer(), MoveTextToLayer(), nelma_finish_png(), Netlist(), NotifyMode(), OpendirErrorMessage(), OpenErrorMessage(), PanAction(), Parse(), ParseConnection(), ParseFont(), ParseLibraryTree(), pcb_spawnvp(), png_do_export(), png_set_color(), png_set_layer(), png_use_mask(), PopenErrorMessage(), Popup(), previous_edge(), PrintBOM(), process_skips(), ProcNetlist(), ps_calibrate_1(), pv_arc_callback(), pv_line_callback(), pv_pad_callback(), pv_pv_callback(), rat_callback(), ReadEdifNetlist(), ReadLibraryContents(), ReadNetlist(), real_load_pcb(), Redo(), rematch(), renumber_block(), renumber_buffer(), ReportDialog(), ReportNetLengthByName(), RestoreCrosshair(), RestoreMode(), RestoreUndoSerialNumber(), roar_router(), RotateScreenObject(), RouteAll(), SaveInTMP(), SearchObjectByID(), SeekPad(), selection_changed_cb(), SetMode(), smartdisperse(), SmashBufferElement(), status(), Subtract(), toporouter_export(), toporouter_free(), toporouter_new(), translate_accelerator(), Undo(), UndoFlag(), UndoMirror(), UpdateXY(), use_gc(), vendorDrillMap(), vendorIsElementMappable(), WritePipe(), and yyerror().

void MyFatal ( char *  Format,
  ... 
)

Output of fatal error message.

Definition at line 184 of file error.c.

References args, EmergencySave(), and Progname.

Referenced by CatchSignal().

Here is the call graph for this function:

void OpendirErrorMessage ( char *  DirName)

Print standard 'opendir'.

Definition at line 144 of file error.c.

References _, Message(), sys_errlist, sys_nerr, and utf8_dup_string.

Referenced by LoadNewlibFootprintsFromDir().

Here is the call graph for this function:

void OpenErrorMessage ( char *  Filename)

Print standard 'open error'.

Definition at line 104 of file error.c.

References _, Message(), sys_errlist, sys_nerr, and utf8_dup_string.

Referenced by CheckAndOpenFile(), and WritePCBFile().

Here is the call graph for this function:

void PopenErrorMessage ( char *  Filename)

Print standard 'popen error'.

Definition at line 124 of file error.c.

References _, Message(), sys_errlist, sys_nerr, and utf8_dup_string.

Referenced by ExpandFilename(), Parse(), ReadLibraryContents(), ReadNetlist(), and WritePipe().

Here is the call graph for this function:


Variable Documentation

char* sys_errlist[]

Array of error messages.

Referenced by ChdirErrorMessage(), OpendirErrorMessage(), OpenErrorMessage(), and PopenErrorMessage().

int sys_nerr

Number of messages available from array.

Referenced by ChdirErrorMessage(), OpendirErrorMessage(), OpenErrorMessage(), and PopenErrorMessage().