libgeda

defines.h

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * libgeda - gEDA's Library
00003  * Copyright (C) 1998-2010 Ales Hvezda
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  * MA 02111-1301 USA.
00019  */
00020 
00025 #ifndef _DEFINES_H_INCL
00026 #define _DEFINES_H_INCL
00027 
00028 /* Current schematic/symbol file format */
00029 #define FILEFORMAT_VERSION     2
00030 
00031 /* release version which had file format changes */
00032 /* New file format changes after 20030921 use the above version */
00033 /* and not these #defines anymore. */
00034 #define VERSION_20000220 20000220
00035 #define VERSION_20000704 20000704
00036 #define VERSION_20020825 20020825
00037 #define VERSION_20030921 20030921
00038 /* 20030921 wasn't a real version, just a MinGW test version, but it is */
00039 /* out there */
00040 
00041 /* Set this string to something interesting to create a custom */
00042 /* version of gEDA/gaf.  This string is prepended to all messages that */
00043 /* output the program's version output.  You would set this if you are */
00044 /* creating a specific custom version of gEDA/gaf.  */
00045 /* For example, if you set this string to "FIX-", the resulting output is:  */
00046 /* FIX-1.0.0.20060906. */
00047 #define PREPEND_VERSION_STRING ""
00048 
00049 /* for color mechanism used in gschem */
00050 #define MAX_COLORS 25
00051 
00052 /* X's obsession with *64 */
00053 #define FULL_CIRCLE 360*64
00054 
00055 /* for show_name_value in st_objects */
00056 #define SHOW_NAME_VALUE         0
00057 #define SHOW_VALUE              1
00058 #define SHOW_NAME               2
00059 #define LEAVE_NAME_VALUE_ALONE  -1
00060 
00061 /* for visibility in st_objects */
00062 #define INVISIBLE               0
00063 #define VISIBLE                 1
00064 #define LEAVE_VISIBILITY_ALONE  -1
00065 
00066 /* For pin and net styles */
00067 #define THIN            0     
00068 #define THICK           1
00069 
00070 /* various thicknesses (in mils) */
00071 #define LINE_WIDTH  10
00072 #define NET_WIDTH   10
00073 #define PIN_WIDTH_NET   10
00074 #define BUS_WIDTH   30
00075 #define PIN_WIDTH_BUS   30
00076 
00077 /* various visual cue sizes (in mils) */
00078 #define CUE_BOX_SIZE        30
00079 #define JUNCTION_CUE_SIZE_NET   50
00080 #define JUNCTION_CUE_SIZE_BUS   30
00081 #define PIN_CUE_SIZE_NET    30
00082 #define PIN_CUE_SIZE_BUS    50
00083 
00084 /* For text location on component not found graphics */
00085 #define NOT_FOUND_TEXT_X    100
00086 #define NOT_FOUND_TEXT_Y    100
00087 
00088 #undef max
00089 #define max(a,b) ((a) > (b) ? (a) : (b))
00090 
00091 #undef min
00092 #define min(a,b) ((a) < (b) ? (a) : (b)) 
00093 
00094 /* for s_clib_getfilename() */
00095 #define OPEN_DIR    0
00096 #define READ_DIR    1
00097 #define CLOSE_DIR   2
00098 #define SET_COUNT   3
00099 
00100 /* for s_slib_search() */
00101 #define SLIB_SEARCH_START   0
00102 #define SLIB_SEARCH_NEXT    1
00103 #define SLIB_SEARCH_DONE    2
00104 
00105 /* for text alignment */
00106 /*   2 -- 5 -- 8  */
00107 /*   |    |    |  */
00108 /*   1 -- 4 -- 7  */
00109 /*   |    |    |  */
00110 /*   0 -- 3 -- 6  */
00111 #define LOWER_LEFT  0
00112 #define MIDDLE_LEFT 1
00113 #define UPPER_LEFT  2
00114 #define LOWER_MIDDLE    3
00115 #define MIDDLE_MIDDLE   4
00116 #define UPPER_MIDDLE    5
00117 #define LOWER_RIGHT 6
00118 #define MIDDLE_RIGHT    7
00119 #define UPPER_RIGHT 8
00120 
00121 /* one character string used to calculate tab's width */
00122 /* Warning: it MUST be a string. */
00123 #define TAB_CHAR_MODEL "b"
00124 
00125 /* The conn modes for type */
00126 #define CONN_NULL               0
00127 #define CONN_ENDPOINT       1
00128 #define CONN_MIDPOINT       2
00129 
00130 /* used by world_tiles to set the size of the array */
00131 #define MAX_TILES_X     10
00132 #define MAX_TILES_Y     10
00133 
00134 /* used for undo_savestate flag */
00135 #define UNDO_ALL        0
00136 #define UNDO_VIEWPORT_ONLY  1
00137 
00138 /* These are for where status information goes */
00139 #define LOG_WINDOW      0
00140 #define STDOUT_TTY      1
00141 #define BOTH_LOGWIN_STDOUT  2
00142 
00143 /* list copying flags */
00144 #define NORMAL_FLAG     0
00145 #define SELECTION_FLAG      1
00146 
00147 /* hierarchy loading flags */
00148 #define HIERARCHY_NORMAL_LOAD   0
00149 #define HIERARCHY_FORCE_LOAD    1
00150 
00151 /* hierarchy traversing flags */
00152 #define HIERARCHY_NODUPS (1<<0)
00153 #define HIERARCHY_POSTORDER (1<<1)
00154 #define HIERARCHY_INNERLOOP (1<<7)
00155 
00156 #define MILS_PER_INCH       1000 
00157 
00158 /* for text_output */
00159 #define VECTOR_FONTS        0
00160 #define PS_FONTS        1
00161 
00162 /* for print dialog box */
00163 #define EXTENTS         0
00164 #define WINDOW          1
00165 #define EXTENTS_NOMARGINS   2
00166 
00167 /* for output-capstyle */ 
00168 #define BUTT_CAP        0
00169 #define ROUND_CAP       1
00170 #define SQUARE_CAP      2
00171 
00172 /* for print dialog box */
00173 #define LANDSCAPE       0
00174 #define PORTRAIT        1
00175 
00176 /* for type to s_cue_output_all */
00177 #define POSTSCRIPT      0
00178 #define PNG         1
00179 
00180 /* for o_net_orientation */
00181 #define NEITHER         0
00182 #define HORIZONTAL      1
00183 #define VERTICAL        2
00184 #define HORIZONTAL_ABOVE    3
00185 #define HORIZONTAL_BELOW    4
00186 #define VERTICAL_LEFT       5
00187 #define VERTICAL_RIGHT      6
00188 
00189 /* for pin_type */
00190 #define PIN_TYPE_NET        0
00191 #define PIN_TYPE_BUS        1
00192 
00193 /* gnetlist: hierarchy_*_order */
00194 #define APPEND          0
00195 #define PREPEND         1
00196 
00197 /* gnetlist: netlist_mode */
00198 #define gEDA            0
00199 #define SPICE           1
00200 #define TANGO           2
00201 
00202 /* gnetlist: net-naming-priority */
00203 #define NETATTRIB_ATTRIBUTE 0
00204 #define NETNAME_ATTRIBUTE   1
00205 
00206 /* gschcheck: Error types */
00207 #define NO_ERR                  0
00208 #define FLOAT_NET               1
00209 #define FLOAT_PIN               2
00210 #define DUP_NET_NAME            4
00211 
00212 /* Max level of symlinks */
00213 #define MAX_LINK_LEVEL 256
00214 
00215 #if defined(__MINGW32__) && !defined(M_PI)
00216 #define M_PI  3.14159265358979323846
00217 #endif
00218 
00219 /* Logs a normal message. */
00220 #define s_log_message g_message
00221 
00222 /* Backup filename creation string */
00223 #define AUTOSAVE_BACKUP_FILENAME_STRING "#%s#"
00224 
00225 /* These permission bits are absent on MinGW */
00226 #ifndef S_IWGRP
00227 # define S_IWGRP 0
00228 #endif
00229 #ifndef S_IWOTH
00230 # define S_IWOTH 0
00231 #endif
00232 #ifndef S_IXGRP
00233 # define S_IXGRP 0
00234 #endif
00235 #ifndef S_IXOTH
00236 # define S_IXOTH 0
00237 #endif
00238 #ifndef S_IRWXG
00239 # define S_IRWXG 0
00240 #endif
00241 
00242 
00243 /* Used by the rc loading mechanism */
00244 #define RETURN_G_RC_MODE(rc, var, size) \
00245   return g_rc_mode_general(mode,        \
00246                            (rc),        \
00247                            &(var),      \
00248                            mode_table,  \
00249                            size)
00250 
00251 
00252 #endif /* !_DEFINES_H_INCL */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines