Corrected problems having to do with color (blue and green were swapped)
and incorrect call to cairo_set_source_rgba which is in an unused function and has no effect except with versions of Tcl less than 8.6 where "load -lazy" is not available and unknown functions cause immediate exit. Cleaned up remaining references to OpenGL in the Cairo code, and updated the copyright and acknowledged Chuan Chen, who coded the Cairo interface. No attempt yet to deal with memory leaks caused by calling Cairo "create" functions without the accompanying "destroy" functions.
This commit is contained in:
parent
83e609eaca
commit
1d3bb0d698
1236
database/database.h
1236
database/database.h
File diff suppressed because it is too large
Load Diff
18
defs.mak
18
defs.mak
|
|
@ -6,9 +6,9 @@
|
|||
# Be aware that running scripts/configure again will overwrite
|
||||
# any changes!
|
||||
|
||||
SHELL = /bin/bash
|
||||
SHELL = /bin/sh
|
||||
|
||||
prefix = /home/chuan/Desktop/magic_install
|
||||
prefix = /home/tim/cad
|
||||
exec_prefix = ${prefix}
|
||||
bindir = ${exec_prefix}/bin
|
||||
libdir = ${exec_prefix}/lib
|
||||
|
|
@ -16,7 +16,7 @@ mandir = ${prefix}/share/man
|
|||
|
||||
SCRIPTS = ${MAGICDIR}/scripts
|
||||
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL = /bin/install -c
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
|
|
@ -49,28 +49,28 @@ CP = cp
|
|||
AR = ar
|
||||
ARFLAGS = crv
|
||||
LINK = ld -r
|
||||
LD = /usr/bin/ld
|
||||
M4 = /usr/bin/m4
|
||||
LD = /bin/ld
|
||||
M4 = /bin/m4
|
||||
MCPP = ${MAGICDIR}/scripts/preproc.py
|
||||
SCPP = gcc -E -x c
|
||||
RANLIB = ranlib
|
||||
SHDLIB_EXT = .so
|
||||
LDDL_FLAGS = ${LDFLAGS} -shared -Wl,-soname,$@ -Wl,--version-script=${MAGICDIR}/magic/symbol.map
|
||||
LD_RUN_PATH =
|
||||
LIB_SPECS = -L/usr/lib/x86_64-linux-gnu -ltk8.6 -L/usr/lib/x86_64-linux-gnu -ltcl8.6
|
||||
LIB_SPECS = -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6
|
||||
WISH_EXE = /usr/bin/wish
|
||||
TCL_LIB_DIR = /usr/lib
|
||||
MAGIC_VERSION = 8.2
|
||||
MAGIC_REVISION = 19
|
||||
MAGIC_REVISION = 22
|
||||
|
||||
CC = gcc
|
||||
CPP = gcc -E
|
||||
CXX = g++
|
||||
|
||||
CPPFLAGS = -I. -I${MAGICDIR}
|
||||
DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"19\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DNDEBUG -DGCORE=\"/usr/bin/gcore\"
|
||||
DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"22\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DNDEBUG -DGCORE=\"/bin/gcore\"
|
||||
DFLAGS += -DSHDLIB_EXT=\".so\"
|
||||
CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC -I/usr/include/tcl8.6/tk-private/generic -I/usr/include/tcl8.6
|
||||
CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC
|
||||
|
||||
READLINE_DEFS =
|
||||
READLINE_LIBS =
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
/* grTCairo1.c
|
||||
*
|
||||
* Copyright (C) 2003 Open Circuit Design, Inc., for MultiGiG Ltd.
|
||||
* Copyright (C) 2017 Open Circuit Design
|
||||
*
|
||||
* This file contains primitive functions for OpenGL running under
|
||||
* This file contains primitive functions for Cairo running under
|
||||
* an X window system in a Tcl/Tk interpreter environment
|
||||
*
|
||||
* Written by Chuan Chen
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -19,10 +21,6 @@
|
|||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
/*
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
*/
|
||||
#include <cairo/cairo-xlib.h>
|
||||
|
||||
#include "tcltk/tclmagic.h"
|
||||
|
|
@ -43,21 +41,16 @@
|
|||
#include "database/database.h"
|
||||
#include "drc/drc.h"
|
||||
#include "utils/macros.h"
|
||||
//#include "graphics/grTCairoInt.h"
|
||||
#include "graphics/grTCairoInt.h"
|
||||
#include "utils/paths.h"
|
||||
#include "graphics/grTkCommon.h"
|
||||
|
||||
uint8_t **grTCairoStipples;
|
||||
HashTable grTCairoWindowTable;
|
||||
//GLXContext grXcontext;
|
||||
cairo_surface_t *grCairoSurface;
|
||||
cairo_t *grCairoContext;
|
||||
XVisualInfo *grVisualInfo;
|
||||
|
||||
//TCairo_CURRENT tcairoCurrent= {(Tk_Font)0, 0, 0, 0, 0,
|
||||
// (Tk_Window)0, (Window)0, (MagWindow *)NULL};
|
||||
|
||||
TCAIRO_CURRENT tcairoCurrent = {(Tk_Font)0, 0, 0, 0, 0,
|
||||
(Tk_Window)0, (Window)0, (MagWindow *)NULL
|
||||
};
|
||||
|
|
@ -103,49 +96,20 @@ int c; /* New value for current color */
|
|||
static int oldMask = -1;
|
||||
|
||||
int lr, lb, lg;
|
||||
//GLfloat fr, fb, fg;
|
||||
//GLfloat aval; /* Alpha default value was 0.75 */
|
||||
float fr, fb, fg, aval;
|
||||
|
||||
if (mask == -65) mask = 127; /* All planes */
|
||||
if (mask == oldMask && c == oldColor) return;
|
||||
|
||||
//GR_TCairo_FLUSH_BATCH();
|
||||
GR_TCAIRO_FLUSH_BATCH();
|
||||
|
||||
GrGetColor(c, &lr, &lb, &lg);
|
||||
GrGetColor(c, &lr, &lg, &lb);
|
||||
|
||||
fr = ((float)lr / 255);
|
||||
fg = ((float)lg / 255);
|
||||
fb = ((float)lb / 255);
|
||||
aval = ((float)mask / 127.0);
|
||||
|
||||
/*
|
||||
if (mask == 127)
|
||||
{
|
||||
glDisable(GL_BLEND);
|
||||
aval = 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Calculate a "supercolor", outside of the normal color range,
|
||||
//but which results in the desired color after a blend with
|
||||
//the background color.
|
||||
|
||||
fr = fr * 2 - 0.8;
|
||||
fg = fg * 2 - 0.8;
|
||||
fb = fb * 2 - 0.8;
|
||||
|
||||
aval = (GLfloat)mask / 127.0; // mask translates to alpha in
|
||||
//the OpenGL version.
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
*/
|
||||
|
||||
//glColor4f(fr, fb, fg, aval);
|
||||
|
||||
cairo_set_source_rgba(grCairoContext, fr, fg, fb, aval);
|
||||
|
||||
oldColor = c;
|
||||
|
|
@ -170,28 +134,6 @@ grtcairoSetLineStyle (style)
|
|||
int style; /* New stipple pattern for lines. */
|
||||
{
|
||||
// unimplemented for cairo
|
||||
/*
|
||||
static int oldStyle = -1;
|
||||
GLushort glstyle;
|
||||
|
||||
style &= 0xFF;
|
||||
if (style == oldStyle) return;
|
||||
oldStyle = style;
|
||||
GR_TCairo_FLUSH_BATCH();
|
||||
|
||||
switch (style) {
|
||||
case 0xFF:
|
||||
case 0x00:
|
||||
glDisable(GL_LINE_STIPPLE);
|
||||
break;
|
||||
default:
|
||||
glstyle = style | (style << 8);
|
||||
glEnable(GL_LINE_STIPPLE);
|
||||
glLineStipple(1, glstyle);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -225,7 +167,7 @@ int numstipples; /* Number of stipples */
|
|||
pdata = (uint8_t *)mallocMagic(128 * sizeof(uint8_t));
|
||||
n = 0;
|
||||
|
||||
/* expand magic's default 8x8 stipple to OpenGL's 32x32 */
|
||||
/* expand magic's default 8x8 stipple to 32x32 */
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
|
|
@ -263,18 +205,12 @@ int stipple; /* The stipple number to be used. */
|
|||
oldStip = stipple;
|
||||
GR_TCAIRO_FLUSH_BATCH();
|
||||
if (stipple == 0 || stipple > grNumStipples) {
|
||||
//glDisable(GL_POLYGON_STIPPLE);
|
||||
//cairo_set_source_rgb(grCairoContext, 0, 0, 0);
|
||||
currentStipple = cairo_pattern_create_rgba(0, 0, 0, 1);
|
||||
} else {
|
||||
if (stipplePatterns[stipple] == (cairo_pattern_t *)NULL) MainExit(1);
|
||||
//glEnable(GL_POLYGON_STIPPLE);
|
||||
//glPolygonStipple(grTCairoStipples[stipple]);
|
||||
cairo_pattern_set_extend(stipplePatterns[stipple], CAIRO_EXTEND_REPEAT);
|
||||
cairo_pattern_set_filter(stipplePatterns[stipple], CAIRO_FILTER_NEAREST);
|
||||
currentStipple = stipplePatterns[stipple];
|
||||
//cairo_set_source(grCairoContext, stipplePatterns[stipple]);
|
||||
//cairo_mask_surface(grCairoContext, grCairoSurface, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -299,13 +235,6 @@ bool
|
|||
GrTCairoInit ()
|
||||
{
|
||||
bool rstatus;
|
||||
/*
|
||||
#ifdef THREE_D
|
||||
static int attributeList[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None };
|
||||
#else
|
||||
static int attributeList[] = { GLX_RGBA, None, None };
|
||||
#endif
|
||||
*/
|
||||
|
||||
tcairoCurrent.window = Tk_MainWindow(magicinterp); // XDefaultRootWindow(grXdpy) ??
|
||||
if (tcairoCurrent.window == NULL)
|
||||
|
|
@ -320,7 +249,6 @@ GrTCairoInit ()
|
|||
|
||||
grXscrn = DefaultScreen(grXdpy);
|
||||
|
||||
//grVisualInfo = glXChooseVisual(grXdpy, grXscrn, attributeList);
|
||||
XVisualInfo grtemplate;
|
||||
int gritems;
|
||||
grtemplate.screen = grXscrn;
|
||||
|
|
@ -331,43 +259,19 @@ GrTCairoInit ()
|
|||
{
|
||||
TxError("No suitable visual!\n");
|
||||
return FALSE;
|
||||
/*
|
||||
// Try for a double-buffered configuration
|
||||
#ifdef THREE_D
|
||||
attributeList[1] = None;
|
||||
#else
|
||||
attributeList[1] = GLX_DOUBLEBUFFER;
|
||||
#endif
|
||||
grVisualInfo = glXChooseVisual(grXdpy, grXscrn, attributeList);
|
||||
if (!grVisualInfo)
|
||||
{
|
||||
TxError("No suitable visual!\n");
|
||||
return FALSE;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
grXscrn = grVisualInfo->screen;
|
||||
tcairoCurrent.depth = grVisualInfo->depth;
|
||||
|
||||
/* TRUE = Direct rendering, FALSE = Indirect rendering */
|
||||
/* (note that direct rendering may not be able to deal with pixmaps) */
|
||||
//grXcontext = glXCreateContext(grXdpy, grVisualInfo, NULL, GL_FALSE);
|
||||
|
||||
grCairoSurface = cairo_xlib_surface_create(grXdpy, tcairoCurrent.windowid, grVisualInfo->visual, Tk_Width(tcairoCurrent.window), Tk_Height(tcairoCurrent.window));
|
||||
grCairoContext = cairo_create(grCairoSurface);
|
||||
|
||||
/* Basic GL parameters */
|
||||
/*
|
||||
glLineWidth(1.0);
|
||||
glShadeModel (GL_FLAT);
|
||||
glPixelStorei(GL_PACK_LSB_FIRST, TRUE);
|
||||
*/
|
||||
cairo_set_line_width(grCairoContext, 1.0);
|
||||
cairo_set_source_rgb(grCairoContext, 0, 0, 0);
|
||||
currentStipple = cairo_pattern_create_rgba(0, 0, 0, 1);
|
||||
|
||||
/* OpenGL sets its own names for colormap and dstyle file types */
|
||||
/* Use OpenGL names for colormap and dstyle file types */
|
||||
grCMapType = "OpenGL";
|
||||
grDStyleType = "OpenGL";
|
||||
|
||||
|
|
@ -418,19 +322,17 @@ void
|
|||
GrTCairoFlush ()
|
||||
{
|
||||
GR_TCAIRO_FLUSH_BATCH();
|
||||
//glFlush();
|
||||
//glFinish();
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define glTransYs(n) (DisplayHeight(grXdpy, grXscrn)-(n))
|
||||
#define grTransYs(n) (DisplayHeight(grXdpy, grXscrn)-(n))
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------
|
||||
* Set the OpenGL viewport (projection matrix) for a window
|
||||
* Set the Cairo projection matrix for a window
|
||||
*---------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
|
@ -441,50 +343,9 @@ int llx, lly, width, height;
|
|||
grCairoSurface = cairo_xlib_surface_create(grXdpy, tcairoCurrent.windowid, grVisualInfo->visual, width, height);
|
||||
grCairoContext = cairo_create(grCairoSurface);
|
||||
|
||||
/* Because this tends to result in thick lines, it has been moved */
|
||||
/* the line drawing routine so it can be enabled for individual */
|
||||
/* lines. */
|
||||
/* glEnable(GL_LINE_SMOOTH); */
|
||||
|
||||
/* Force draw to front buffer (in case of double-buffered config) */
|
||||
//glDrawBuffer(GL_FRONT);
|
||||
|
||||
//glMatrixMode(GL_PROJECTION);
|
||||
//glLoadIdentity();
|
||||
cairo_identity_matrix(grCairoContext);
|
||||
|
||||
//glViewport((GLsizei)llx, (GLsizei)lly, (GLsizei) width, (GLsizei) height);
|
||||
// cairo equivalent??
|
||||
|
||||
/* scale to fit window */
|
||||
/*
|
||||
#ifdef CAIRO_INVERT_Y
|
||||
//glScalef(1.0 / (float)(width >> 1), -1.0 / (float)(height >> 1), 1.0);
|
||||
#else
|
||||
//glScalef(1.0 / (float)(width >> 1), 1.0 / (float)(height >> 1), 1.0);
|
||||
#endif
|
||||
*/
|
||||
//cairo_translate(grCairoContext, (width >> 1), (height >> 1));
|
||||
//cairo_translate(grCairoContext, width/2.0, height/2.0);
|
||||
cairo_translate(grCairoContext, 0, height);
|
||||
|
||||
|
||||
//cairo_scale(grCairoContext, width >> 1, -(height >> 1));
|
||||
cairo_scale(grCairoContext, 1.0, -1.0);
|
||||
//cairo_scale(grCairoContext, 1.0 / width, -1.0 / height);
|
||||
|
||||
|
||||
/* magic origin maps to window center; move to window origin */
|
||||
|
||||
//glTranslated(-(GLsizei)(width >> 1), -(GLsizei)(height >> 1), 0);
|
||||
|
||||
|
||||
/* Remaining transformations are done on the modelview matrix */
|
||||
|
||||
//glMatrixMode(GL_MODELVIEW);
|
||||
//glLoadIdentity();
|
||||
//cairo_identity_matrix(grCairoContext);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -850,8 +711,8 @@ keys_and_buttons:
|
|||
|
||||
screenRect.r_xbot = ConfigureEvent->x;
|
||||
screenRect.r_xtop = ConfigureEvent->x + width;
|
||||
screenRect.r_ytop = glTransYs(ConfigureEvent->y);
|
||||
screenRect.r_ybot = glTransYs(ConfigureEvent->y + height);
|
||||
screenRect.r_ytop = grTransYs(ConfigureEvent->y);
|
||||
screenRect.r_ybot = grTransYs(ConfigureEvent->y + height);
|
||||
|
||||
need_resize = (screenRect.r_xbot != mw->w_screenArea.r_xbot ||
|
||||
screenRect.r_xtop != mw->w_screenArea.r_xtop ||
|
||||
|
|
@ -1084,7 +945,7 @@ char *name;
|
|||
char *windowplace;
|
||||
char windowname[10];
|
||||
int x = w->w_frameArea.r_xbot;
|
||||
int y = glTransYs(w->w_frameArea.r_ytop);
|
||||
int y = grTransYs(w->w_frameArea.r_ytop);
|
||||
int width = w->w_frameArea.r_xtop - w->w_frameArea.r_xbot;
|
||||
int height = w->w_frameArea.r_ytop - w->w_frameArea.r_ybot;
|
||||
unsigned long attribmask = CWBackPixel | CWBorderPixel | CWColormap;
|
||||
|
|
@ -1099,8 +960,8 @@ char *name;
|
|||
(unsigned int *)&width, (unsigned int *)&height);
|
||||
w->w_frameArea.r_xbot = x;
|
||||
w->w_frameArea.r_xtop = x + width;
|
||||
w->w_frameArea.r_ytop = glTransYs(y);
|
||||
w->w_frameArea.r_ybot = glTransYs(y + height);
|
||||
w->w_frameArea.r_ytop = grTransYs(y);
|
||||
w->w_frameArea.r_ybot = grTransYs(y + height);
|
||||
WindReframe(w, &(w->w_frameArea), FALSE, FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -1175,7 +1036,6 @@ char *name;
|
|||
|
||||
wind = Tk_WindowId(tkwind);
|
||||
tcairoCurrent.windowid = wind;
|
||||
//glXMakeCurrent(grXdpy, (GLXDrawable)wind, grXcontext);
|
||||
grCairoSurface = cairo_xlib_surface_create(grXdpy, tcairoCurrent.windowid, grVisualInfo->visual, Tk_Width(tcairoCurrent.window), Tk_Height(tcairoCurrent.window));
|
||||
grCairoContext = cairo_create(grCairoSurface);
|
||||
|
||||
|
|
@ -1212,7 +1072,7 @@ char *name;
|
|||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* GrTCairoDelete --
|
||||
* Destroy a Tk/OpenGL window.
|
||||
* Destroy a Tk/Cairo window.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
|
|
@ -1260,7 +1120,7 @@ MagWindow *w;
|
|||
if (w->w_flags & WIND_OFFSCREEN) return;
|
||||
|
||||
Tk_MoveResizeWindow((Tk_Window)w->w_grdata,
|
||||
w->w_frameArea.r_xbot, glTransYs(w->w_frameArea.r_ytop),
|
||||
w->w_frameArea.r_xbot, grTransYs(w->w_frameArea.r_ytop),
|
||||
w->w_frameArea.r_xtop - w->w_frameArea.r_xbot,
|
||||
w->w_frameArea.r_ytop - w->w_frameArea.r_ybot);
|
||||
}
|
||||
|
|
@ -1388,7 +1248,7 @@ GrTCairoUnlock(w)
|
|||
MagWindow *w;
|
||||
{
|
||||
/* GR_TCairo_FLUSH_BATCH(); */
|
||||
GrTCairoFlush(); /* (?) Adds glFlush and glFinish to the above. */
|
||||
GrTCairoFlush();
|
||||
grSimpleUnlock(w);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
/* grTOGL2.c -
|
||||
/* grTCairo2.c -
|
||||
*
|
||||
* Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd.
|
||||
* Copyright 2017 Open Circuit Design
|
||||
*
|
||||
* This file contains additional functions to manipulate an X
|
||||
* color display. Included here are rectangle drawing and color map
|
||||
* loading.
|
||||
*
|
||||
* Written by Chuan Chen
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
char *getenv();
|
||||
|
||||
/*
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
*/
|
||||
#include <cairo/cairo-xlib.h>
|
||||
|
||||
#include "tcltk/tclmagic.h"
|
||||
|
|
@ -24,13 +22,11 @@ char *getenv();
|
|||
#include "windows/windows.h"
|
||||
#include "graphics/graphics.h"
|
||||
#include "graphics/graphicsInt.h"
|
||||
//#include "grTOGLInt.h"
|
||||
#include "grTCairoInt.h"
|
||||
|
||||
#include "textio/txcommands.h"
|
||||
|
||||
extern char *DBWStyleType;
|
||||
//extern GLXContext grXcontext;
|
||||
extern Display *grXdpy;
|
||||
|
||||
extern cairo_t *grCairoContext;
|
||||
|
|
@ -38,9 +34,9 @@ extern cairo_surface_t *grCairoSurface;
|
|||
extern cairo_pattern_t *currentStipple;
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* GrOGLSetCMap --
|
||||
* GrTCairoSetCMap --
|
||||
*
|
||||
* OpenGL uses RGB values as read from the colormap file,
|
||||
* Cairo uses RGB values as read from the colormap file,
|
||||
* directly, so there is no need to install colors into a
|
||||
* colormap. Therefore, this is a null routine.
|
||||
*
|
||||
|
|
@ -64,7 +60,7 @@ Rect grtcairoDiagonal[TCAIRO_BATCH_SIZE];
|
|||
int grtcairoNbDiagonal = 0;
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglDrawLines:
|
||||
* grtcairoDrawLines:
|
||||
* This routine draws a batch of lines.
|
||||
*
|
||||
* Results: None.
|
||||
|
|
@ -79,23 +75,6 @@ grtcairoDrawLines(lines, nb)
|
|||
Rect lines[];
|
||||
int nb;
|
||||
{
|
||||
/*
|
||||
#ifdef OGL_SERVER_SIDE_ONLY
|
||||
int i;
|
||||
|
||||
glBegin(GL_LINES);
|
||||
for (i = 0; i < nb; i++)
|
||||
{
|
||||
glVertex2i(lines[i].r_ll.p_x, lines[i].r_ll.p_y);
|
||||
glVertex2i(lines[i].r_ur.p_x, lines[i].r_ur.p_y);
|
||||
}
|
||||
glEnd();
|
||||
#else
|
||||
glVertexPointer(2, GL_INT, 0, (GLvoid *)lines);
|
||||
glDrawArrays(GL_LINES, 0, nb << 1);
|
||||
#endif
|
||||
*/
|
||||
|
||||
int i;
|
||||
for (i = 0; i < nb; i++)
|
||||
{
|
||||
|
|
@ -108,7 +87,7 @@ int nb;
|
|||
}
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglDrawLine:
|
||||
* grtcairoDrawLine:
|
||||
* This routine draws a line.
|
||||
*
|
||||
* Results: None.
|
||||
|
|
@ -123,9 +102,8 @@ grtcairoDrawLine (x1, y1, x2, y2)
|
|||
int x1, y1; /* Screen coordinates of first point. */
|
||||
int x2, y2; /* Screen coordinates of second point. */
|
||||
{
|
||||
/* Treat straight and diagonal lines separately. Some */
|
||||
/* implementations of OpenGL make straight lines twice as thick */
|
||||
/* when smoothing is enabled. */
|
||||
/* Treat straight and diagonal lines separately. */
|
||||
/* (Done for OpenGL; possibly not necessary for Cairo) */
|
||||
|
||||
if ((x1 == x2) || (y1 == y2))
|
||||
{
|
||||
|
|
@ -148,7 +126,7 @@ int x2, y2; /* Screen coordinates of second point. */
|
|||
}
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglFillRects:
|
||||
* grtcairoFillRects:
|
||||
* This routine draws a bunch of solid rectangles.
|
||||
*
|
||||
* Results: None.
|
||||
|
|
@ -163,24 +141,6 @@ grtcairoFillRects(rects, nb)
|
|||
TCairoRect rects[];
|
||||
int nb;
|
||||
{
|
||||
/*
|
||||
#ifdef OGL_SERVER_SIDE_ONLY
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nb; i++)
|
||||
{
|
||||
glRecti(rects[i].r_ll.p_x, rects[i].r_ll.p_y,
|
||||
rects[i].r_ur.p_x, rects[i].r_ur.p_y);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
glVertexPointer(2, GL_INT, 0, (GLvoid *)rects);
|
||||
glDrawArrays(GL_QUADS, 0, nb << 2);
|
||||
|
||||
#endif
|
||||
*/
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nb; i++)
|
||||
|
|
@ -188,16 +148,14 @@ int nb;
|
|||
cairo_rectangle(grCairoContext,
|
||||
rects[i].r_ll.p_x, rects[i].r_ll.p_y,
|
||||
rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y);
|
||||
TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y);
|
||||
// TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y);
|
||||
}
|
||||
cairo_clip(grCairoContext);
|
||||
cairo_mask(grCairoContext, currentStipple);
|
||||
|
||||
//cairo_fill(grCairoContext);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglFillRect:
|
||||
* grtcairoFillRect:
|
||||
* This routine draws a solid rectangle.
|
||||
*
|
||||
* Results: None.
|
||||
|
|
@ -220,19 +178,17 @@ Rect *r; /* Address of a rectangle in screen
|
|||
grtcairoRects[grtcairoNbRects].r_ur.p_x = r->r_ur.p_x;
|
||||
grtcairoRects[grtcairoNbRects].r_ur.p_y = r->r_ur.p_y;
|
||||
|
||||
#ifndef OGL_SERVER_SIDE_ONLY
|
||||
grtcairoRects[grtcairoNbRects].r_ul.p_x = r->r_ll.p_x;
|
||||
grtcairoRects[grtcairoNbRects].r_ul.p_y = r->r_ur.p_y;
|
||||
|
||||
grtcairoRects[grtcairoNbRects].r_lr.p_x = r->r_ur.p_x;
|
||||
grtcairoRects[grtcairoNbRects].r_lr.p_y = r->r_ll.p_y;
|
||||
#endif
|
||||
|
||||
grtcairoNbRects++;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglFillPolygon:
|
||||
* grtcairoFillPolygon:
|
||||
* This routine draws a solid (convex) polygon
|
||||
*
|
||||
* Results: None.
|
||||
|
|
@ -248,14 +204,6 @@ Point *tp;
|
|||
int np;
|
||||
{
|
||||
int i;
|
||||
/*
|
||||
glEnable(GL_POLYGON_SMOOTH);
|
||||
glBegin(GL_POLYGON);
|
||||
for (i = 0; i < np; i++)
|
||||
glVertex2i(tp[i].p_x, tp[i].p_y);
|
||||
glEnd();
|
||||
glDisable(GL_POLYGON_SMOOTH);
|
||||
*/
|
||||
cairo_move_to(grCairoContext, tp[0].p_x, tp[0].p_y);
|
||||
for (i = 1; i < np; i++)
|
||||
cairo_line_to(grCairoContext, tp[i].p_x, tp[i].p_y);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
/* grTOGL3.c -
|
||||
/* grTCairo3.c -
|
||||
*
|
||||
* Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd.
|
||||
* Copyright 2017 Open Circuit Design
|
||||
*
|
||||
* This file contains additional functions to manipulate an X window system
|
||||
* color display. Included here are device-dependent routines to draw and
|
||||
* erase text and draw a grid.
|
||||
*
|
||||
* Written by Chuan Chen
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
*/
|
||||
|
||||
#include <cairo/cairo-xlib.h>
|
||||
|
||||
#include <math.h>
|
||||
|
|
@ -33,7 +28,6 @@
|
|||
#include "utils/signals.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/hash.h"
|
||||
//#include "graphics/grTOGLInt.h"
|
||||
#include "graphics/grTCairoInt.h"
|
||||
#include "graphics/grTkCommon.h"
|
||||
#include "database/fonts.h"
|
||||
|
|
@ -46,11 +40,9 @@ static GC grXcopyGC = (GC)NULL;
|
|||
|
||||
/* locals */
|
||||
|
||||
//GLuint grXBases[4];
|
||||
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglDrawGrid:
|
||||
* grtcairoDrawGrid:
|
||||
* grxDrawGrid adds a grid to the grid layer, using the current
|
||||
* write mask and color.
|
||||
*
|
||||
|
|
@ -88,18 +80,12 @@ Rect *clip; /* a clipping rectangle */
|
|||
ystart = prect->r_ybot % ysize;
|
||||
while (ystart < clip->r_ybot << SUBPIXELBITS) ystart += ysize;
|
||||
|
||||
//grtoglSetLineStyle(outline);
|
||||
|
||||
//glBegin(GL_LINES);
|
||||
|
||||
snum = 0;
|
||||
low = clip->r_ybot;
|
||||
hi = clip->r_ytop;
|
||||
for (x = xstart; x < (clip->r_xtop + 1) << SUBPIXELBITS; x += xsize)
|
||||
{
|
||||
shifted = x >> SUBPIXELBITS;
|
||||
//glVertex2i(shifted, low);
|
||||
//glVertex2i(shifted, hi);
|
||||
cairo_move_to(grCairoContext, shifted, low);
|
||||
cairo_line_to(grCairoContext, shifted, hi);
|
||||
snum++;
|
||||
|
|
@ -111,23 +97,19 @@ Rect *clip; /* a clipping rectangle */
|
|||
for (y = ystart; y < (clip->r_ytop + 1) << SUBPIXELBITS; y += ysize)
|
||||
{
|
||||
shifted = y >> SUBPIXELBITS;
|
||||
//glVertex2i(low, shifted);
|
||||
//glVertex2i(hi, shifted);
|
||||
cairo_move_to(grCairoContext, low, shifted);
|
||||
cairo_line_to(grCairoContext, hi, shifted);
|
||||
snum++;
|
||||
}
|
||||
//glEnd();
|
||||
cairo_stroke(grCairoContext);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglLoadFont
|
||||
* This local routine transfers the X font bitmaps
|
||||
* into OpenGL display lists for simple text
|
||||
* rendering.
|
||||
* grtcairoLoadFont
|
||||
* This local routine loads the default ("toy API")
|
||||
* font for Cairo.
|
||||
*
|
||||
* Results: Success/Failure
|
||||
*
|
||||
|
|
@ -138,28 +120,13 @@ Rect *clip; /* a clipping rectangle */
|
|||
bool
|
||||
grtcairoLoadFont()
|
||||
{
|
||||
/*
|
||||
Font id;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
id = Tk_FontId(grTkFonts[i]);
|
||||
|
||||
grXBases[i] = glGenLists(256);
|
||||
if (grXBases[i] == 0) {
|
||||
TxError("Out of display lists!\n");
|
||||
return FALSE;
|
||||
}
|
||||
glXUseXFont(id, 0, 256, grXBases[i]);
|
||||
}
|
||||
*/
|
||||
cairo_select_font_face(grCairoContext, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglSetCharSize:
|
||||
* grtcairoSetCharSize:
|
||||
* This local routine sets the character size in the display,
|
||||
* if necessary.
|
||||
*
|
||||
|
|
@ -200,7 +167,7 @@ int size; /* Width of characters, in pixels (6 or 8). */
|
|||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* GrTOGLTextSize --
|
||||
* GrTCairoTextSize --
|
||||
*
|
||||
* Determine the size of a text string.
|
||||
*
|
||||
|
|
@ -254,16 +221,11 @@ Rect *r;
|
|||
r->r_xbot = 0;
|
||||
}
|
||||
|
||||
/* OpenGL backing store functions (now removed from the X11-based ones) */
|
||||
/* Since we always paint into the front buffer, the back buffer is */
|
||||
/* always available for backing store. We need not create or destroy */
|
||||
/* it. We just use the w_backingStore location to store whether the */
|
||||
/* backing store contains valid data or not. */
|
||||
/* Cairo backing store functions (now removed from the X11-based ones) */
|
||||
|
||||
void
|
||||
grtcairoFreeBackingStore(MagWindow *window)
|
||||
{
|
||||
//window->w_backingStore = (ClientData)0;
|
||||
Pixmap pmap = (Pixmap)window->w_backingStore;
|
||||
if (pmap == (Pixmap)NULL) return;
|
||||
XFreePixmap(grXdpy, pmap);
|
||||
|
|
@ -274,7 +236,6 @@ void
|
|||
grtcairoCreateBackingStore(MagWindow *w)
|
||||
{
|
||||
Pixmap pmap;
|
||||
//Window wind = (Window)w->w_grdata;
|
||||
Tk_Window tkwind = (Tk_Window)w->w_grdata;
|
||||
Window wind;
|
||||
unsigned int width, height;
|
||||
|
|
@ -282,18 +243,12 @@ grtcairoCreateBackingStore(MagWindow *w)
|
|||
XGCValues gcValues;
|
||||
int grDepth;
|
||||
|
||||
|
||||
|
||||
/* ignore all windows other than layout */
|
||||
//if (w->w_client != DBWclientID) return;
|
||||
|
||||
/* Deferred */
|
||||
if (tkwind == NULL) return;
|
||||
|
||||
//w->w_backingStore = (ClientData)1;
|
||||
|
||||
wind = (Window)Tk_WindowId(tkwind);
|
||||
|
||||
/* ignore all windows other than layout */
|
||||
if (w->w_client != DBWclientID) return;
|
||||
|
||||
/* deferred */
|
||||
|
|
@ -312,9 +267,6 @@ grtcairoCreateBackingStore(MagWindow *w)
|
|||
|
||||
grDepth = Tk_Depth((Tk_Window)w->w_grdata);
|
||||
|
||||
//if (grClass == 3) grDepth = 8; /* Needed since grDisplay.depth is reset
|
||||
// to 7 if Pseudocolor */
|
||||
|
||||
pmap = XCreatePixmap(grXdpy, wind, width, height, grDepth);
|
||||
w->w_backingStore = (ClientData)pmap;
|
||||
}
|
||||
|
|
@ -326,9 +278,6 @@ grtcairoGetBackingStore(MagWindow *w, Rect *area)
|
|||
int xbot, ybot;
|
||||
Rect r;
|
||||
|
||||
// GLboolean result;
|
||||
// GLint rasterpos[4];
|
||||
|
||||
if (w->w_backingStore == (ClientData)0) return FALSE;
|
||||
|
||||
GEO_EXPAND(area, 1, &r);
|
||||
|
|
@ -340,25 +289,6 @@ grtcairoGetBackingStore(MagWindow *w, Rect *area)
|
|||
xbot = r.r_xbot;
|
||||
ybot = r.r_ybot;
|
||||
|
||||
/*
|
||||
glDrawBuffer(GL_FRONT);
|
||||
glReadBuffer(GL_BACK);
|
||||
glRasterPos2i((GLint)xbot, (GLint)ybot);
|
||||
*/
|
||||
/* Check for valid raster position */
|
||||
// glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, (GLboolean *)(&result));
|
||||
// glGetIntegerv(GL_CURRENT_RASTER_POSITION, (GLint *)(&rasterpos[0]));
|
||||
|
||||
// TxPrintf("Raster valid = %d, position = %d %d %d %d\n",
|
||||
// (int)result, (int)rasterpos[0], (int)rasterpos[1],
|
||||
// (int)rasterpos[2], (int)rasterpos[3]);
|
||||
// if (result == 0)
|
||||
// TxPrintf("Intended position = %d %d\n", xbot, ybot);
|
||||
/*
|
||||
glDisable(GL_BLEND);
|
||||
glCopyPixels(xbot, ybot, width, height, GL_COLOR);
|
||||
*/
|
||||
|
||||
Window root_return;
|
||||
int x_return, y_return;
|
||||
unsigned int width_return, height_return;
|
||||
|
|
@ -374,7 +304,6 @@ grtcairoGetBackingStore(MagWindow *w, Rect *area)
|
|||
|
||||
cairo_surface_t *backingStoreSurface;
|
||||
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width_return, height_return);
|
||||
// backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
|
||||
cairo_set_source_surface(grCairoContext, backingStoreSurface, 0, 0);
|
||||
cairo_rectangle(grCairoContext, xbot, ybot, width, height);
|
||||
cairo_set_operator(grCairoContext, CAIRO_OPERATOR_SOURCE);
|
||||
|
|
@ -387,53 +316,7 @@ grtcairoGetBackingStore(MagWindow *w, Rect *area)
|
|||
bool
|
||||
grtcairoScrollBackingStore(MagWindow *w, Point *shift)
|
||||
{
|
||||
/*
|
||||
unsigned int width, height;
|
||||
int xorigin, yorigin, xshift, yshift;
|
||||
|
||||
if (w->w_backingStore == (ClientData)0)
|
||||
{
|
||||
TxPrintf("grtoglScrollBackingStore %d %d failure\n",
|
||||
shift->p_x, shift->p_y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
width = w->w_screenArea.r_xtop - w->w_screenArea.r_xbot;
|
||||
height = w->w_screenArea.r_ytop - w->w_screenArea.r_ybot;
|
||||
xorigin = 0;
|
||||
yorigin = 0;
|
||||
xshift = shift->p_x;
|
||||
yshift = shift->p_y;
|
||||
|
||||
if (xshift > 0)
|
||||
width -= xshift;
|
||||
else if (xshift < 0)
|
||||
{
|
||||
width += xshift;
|
||||
xorigin = -xshift;
|
||||
xshift = 0;
|
||||
}
|
||||
if (yshift > 0)
|
||||
height -= yshift;
|
||||
else if (yshift < 0)
|
||||
{
|
||||
height += yshift;
|
||||
yorigin = -yshift;
|
||||
yshift = 0;
|
||||
}
|
||||
|
||||
glDrawBuffer(GL_BACK);
|
||||
glReadBuffer(GL_BACK);
|
||||
glRasterPos2i((GLint)xshift, (GLint)yshift);
|
||||
glDisable(GL_BLEND);
|
||||
glCopyPixels(xorigin, yorigin, width, height, GL_COLOR);
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
|
||||
return TRUE;
|
||||
*/
|
||||
|
||||
// copied from grX11su3.c
|
||||
// (copied from grX11su3.c)
|
||||
Pixmap pmap;
|
||||
unsigned int width, height;
|
||||
int xorigin, yorigin, xshift, yshift;
|
||||
|
|
@ -470,17 +353,11 @@ grtcairoScrollBackingStore(MagWindow *w, Point *shift)
|
|||
yshift = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
XCopyArea(grXdpy, pmap, pmap, grXcopyGC, xorigin, yorigin, width, height,
|
||||
xshift, yshift);
|
||||
*/
|
||||
|
||||
/* TxPrintf("grx11ScrollBackingStore %d %d\n", shift->p_x, shift->p_y); */
|
||||
|
||||
cairo_surface_t *backingStoreSurface;
|
||||
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
|
||||
cairo_set_source_surface(grCairoContext, backingStoreSurface, xshift, yshift);
|
||||
//cairo_rectangle(grCairoContext, xorigin, yorigin, width, height);
|
||||
cairo_rectangle(grCairoContext, xshift, yshift, width, height);
|
||||
cairo_set_operator(grCairoContext, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_fill(grCairoContext);
|
||||
|
|
@ -494,9 +371,6 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area)
|
|||
unsigned int width, height;
|
||||
int ybot, xbot;
|
||||
|
||||
// GLboolean result;
|
||||
// GLint rasterpos[4];
|
||||
|
||||
if (w->w_backingStore == (ClientData)0) return;
|
||||
|
||||
width = area->r_xtop - area->r_xbot;
|
||||
|
|
@ -514,26 +388,6 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area)
|
|||
height -= ybot;
|
||||
ybot = 0;
|
||||
}
|
||||
/*
|
||||
glReadBuffer(GL_FRONT);
|
||||
glDrawBuffer(GL_BACK);
|
||||
glRasterPos2i((GLint)xbot, (GLint)ybot);
|
||||
*/
|
||||
// Check for valid raster position
|
||||
// glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, (GLboolean *)(&result));
|
||||
// glGetIntegerv(GL_CURRENT_RASTER_POSITION, (GLint *)(&rasterpos[0]));
|
||||
|
||||
// TxPrintf("Raster valid = %d, position = %d %d %d %d\n",
|
||||
// (int)result, (int)rasterpos[0], (int)rasterpos[1],
|
||||
// (int)rasterpos[2], (int)rasterpos[3]);
|
||||
// if (result == 0)
|
||||
// TxPrintf("Intended position = %d %d\n", xbot, ybot);
|
||||
/*
|
||||
glDisable(GL_BLEND);
|
||||
glCopyPixels(xbot, ybot, width, height, GL_COLOR);
|
||||
|
||||
glDrawBuffer(GL_FRONT); // Return to normal front rendering
|
||||
*/
|
||||
|
||||
Window root_return;
|
||||
int x_return, y_return;
|
||||
|
|
@ -548,7 +402,6 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area)
|
|||
XGetGeometry(grXdpy, pmap, &root_return, &x_return, &y_return, &width_return, &height_return, &border_width_return, &depth_return);
|
||||
|
||||
cairo_surface_t *backingStoreSurface;
|
||||
//backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width_return, height_return);
|
||||
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
|
||||
cairo_t *tempContext = cairo_create(backingStoreSurface);
|
||||
cairo_set_source_surface(tempContext, grCairoSurface, 0.0, 0.0);
|
||||
|
|
@ -564,7 +417,7 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area)
|
|||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* GrTOGLReadPixel --
|
||||
* GrTCairoReadPixel --
|
||||
*
|
||||
* Read one pixel from the screen.
|
||||
*
|
||||
|
|
@ -582,13 +435,13 @@ GrTCairoReadPixel (w, x, y)
|
|||
MagWindow *w;
|
||||
int x, y; /* the location of a pixel in screen coords */
|
||||
{
|
||||
return 0; /* OpenGL has no such function, so return 0 */
|
||||
return 0; /* (unimplemented) */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* GrTOGLBitBlt --
|
||||
* GrTCairoBitBlt --
|
||||
*
|
||||
* Copy information in bit block transfers.
|
||||
*
|
||||
|
|
@ -605,51 +458,15 @@ GrTCairoBitBlt(r, p)
|
|||
Rect *r;
|
||||
Point *p;
|
||||
{
|
||||
/*
|
||||
glCopyPixels(r->r_xbot, r->r_ybot, r->r_xtop - r->r_xbot + 1,
|
||||
r->r_ytop - r->r_ybot + 1, GL_COLOR);
|
||||
*/
|
||||
|
||||
//cairo_set_source_surface(grCairoContext, grCairoSurface, p->p_x, p->p_y);
|
||||
// do some stuff
|
||||
|
||||
; // unimplemented
|
||||
// (unimplemented)
|
||||
}
|
||||
|
||||
#ifdef VECTOR_FONTS
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Technically, there should be no self-intersecting polygons in outline
|
||||
* fonts. However, decomposition of bezier curves into line segments
|
||||
* may occasionally produce one, so it needs to be handled.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
// unused in cairo graphics
|
||||
void
|
||||
myCombine(GLdouble coords[3], GLdouble *vertex_data[4],
|
||||
GLfloat weight[4], GLdouble **outData, void *dataptr)
|
||||
{
|
||||
// This needs to be free'd at the end of gluTessEndPolygon()!
|
||||
GLdouble *new = (GLdouble *)mallocMagic(2 * sizeof(GLdouble));
|
||||
new[0] = coords[0];
|
||||
new[1] = coords[1];
|
||||
*outData = new;
|
||||
// Diagnostic
|
||||
TxError("Intersecting polygon in char \"%c\" at %g %g!\n",
|
||||
*((char *)dataptr), coords[0], coords[1]);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* Draw a text character
|
||||
* This routine differs from grtoglFillPolygon() in that it uses the
|
||||
* glu library to handle non-convex polygons as may appear in font
|
||||
* outlines.
|
||||
* This routine is similar to grtcairoFillPolygon()
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
|
@ -662,8 +479,6 @@ int pixsize;
|
|||
Point *tp;
|
||||
int np, nptotal;
|
||||
int i, j;
|
||||
// static GLUtesselator *tess = NULL;
|
||||
// static GLdouble *v = NULL;
|
||||
static int maxnp = 0;
|
||||
FontChar *ccur;
|
||||
|
||||
|
|
@ -679,67 +494,17 @@ int pixsize;
|
|||
}
|
||||
}
|
||||
cairo_fill(grCairoContext);
|
||||
|
||||
/*
|
||||
if (tess == NULL)
|
||||
{
|
||||
tess = gluNewTess();
|
||||
gluTessCallback(tess, GLU_TESS_BEGIN, (_GLUfuncptr)glBegin);
|
||||
gluTessCallback(tess, GLU_TESS_VERTEX, (_GLUfuncptr)glVertex3dv);
|
||||
gluTessCallback(tess, GLU_TESS_END, (_GLUfuncptr)glEnd);
|
||||
gluTessCallback(tess, GLU_TESS_COMBINE_DATA, (_GLUfuncptr)myCombine);
|
||||
}
|
||||
// Boundary-only does not look particularly good. . .
|
||||
gluTessProperty(tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE);
|
||||
|
||||
nptotal = 0;
|
||||
for (ccur = clist; ccur != NULL; ccur = ccur->fc_next)
|
||||
nptotal += ccur->fc_numpoints;
|
||||
|
||||
if (nptotal > maxnp)
|
||||
{
|
||||
if (v != NULL) freeMagic((char *)v);
|
||||
maxnp = nptotal;
|
||||
v = (GLdouble *)mallocMagic(nptotal * 3 * sizeof(GLdouble));
|
||||
}
|
||||
|
||||
j = 0;
|
||||
for (ccur = clist; ccur != NULL; ccur = ccur->fc_next)
|
||||
{
|
||||
tp = ccur->fc_points;
|
||||
np = ccur->fc_numpoints;
|
||||
|
||||
for (i = 0; i < np; i++, j += 3) {
|
||||
v[j] = tp[i].p_x;
|
||||
v[j + 1] = tp[i].p_y;
|
||||
v[j + 2] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
gluTessBeginPolygon(tess, (GLvoid *)(&tc));
|
||||
j = 0;
|
||||
for (ccur = clist; ccur != NULL; ccur = ccur->fc_next)
|
||||
{
|
||||
np = ccur->fc_numpoints;
|
||||
gluTessBeginContour(tess);
|
||||
for (i = 0; i < np; i++, j += 3) {
|
||||
gluTessVertex(tess, &v[j], &v[j]);
|
||||
}
|
||||
gluTessEndContour(tess);
|
||||
}
|
||||
gluTessEndPolygon(tess);
|
||||
*/
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglFontText:
|
||||
* grtcairoFontText:
|
||||
*
|
||||
* This routine draws text from font vectors using the
|
||||
* font vector routines in DBlabel.c. Text is clipped
|
||||
* to the clipping rectangle.
|
||||
*
|
||||
* For speed, we should be transferring the font
|
||||
* vectors into OpenGL display lists!
|
||||
* For speed, should we be transferring the font
|
||||
* vectors into cairo glyphs?
|
||||
*
|
||||
*---------------------------------------------------------
|
||||
*/
|
||||
|
|
@ -757,20 +522,11 @@ LinkedRect *obscure; /* List of obscuring areas */
|
|||
char *tptr;
|
||||
Point *coffset; /* vector to next character */
|
||||
Rect *cbbox;
|
||||
//GLfloat fsize, matvals[16];
|
||||
float fsize;
|
||||
FontChar *clist;
|
||||
int cheight, baseline;
|
||||
float tmp;
|
||||
|
||||
/* Keep it simple for now---ignore clip and obscure */
|
||||
/*
|
||||
glDisable(GL_BLEND);
|
||||
glPushMatrix();
|
||||
glTranslated(pos->p_x, pos->p_y, 0);
|
||||
glRotated(rotate, 0, 0, 1);
|
||||
*/
|
||||
|
||||
cairo_save(grCairoContext);
|
||||
cairo_translate(grCairoContext, pos->p_x, pos->p_y);
|
||||
cairo_rotate(grCairoContext, ((double)rotate) / 360 * 2 * M_PI);
|
||||
|
|
@ -778,9 +534,7 @@ LinkedRect *obscure; /* List of obscuring areas */
|
|||
/* Get label size */
|
||||
cbbox = &DBFontList[font]->mf_extents;
|
||||
|
||||
//fsize = (GLfloat)size / (GLfloat)cbbox->r_ytop;
|
||||
fsize = (uint8_t)size / (uint8_t)cbbox->r_ytop;
|
||||
//glScalef(fsize, fsize, 1.0);
|
||||
cairo_scale(grCairoContext, fsize, fsize);
|
||||
|
||||
/* Adjust to baseline */
|
||||
|
|
@ -791,24 +545,21 @@ LinkedRect *obscure; /* List of obscuring areas */
|
|||
if (cbbox->r_ybot < baseline)
|
||||
baseline = cbbox->r_ybot;
|
||||
}
|
||||
//glTranslated(0, -baseline, 0);
|
||||
cairo_translate(grCairoContext, 0, -baseline);
|
||||
|
||||
for (tptr = text; *tptr != '\0'; tptr++)
|
||||
{
|
||||
DBFontChar(font, *tptr, &clist, &coffset, NULL);
|
||||
grtcairoDrawCharacter(clist, *tptr, size);
|
||||
//glTranslated(coffset->p_x, coffset->p_y, 0);
|
||||
cairo_translate(grCairoContext, coffset->p_x, coffset->p_y);
|
||||
}
|
||||
//glPopMatrix();
|
||||
cairo_restore(grCairoContext);
|
||||
}
|
||||
|
||||
#endif /* VECTOR_FONTS */
|
||||
|
||||
/*---------------------------------------------------------
|
||||
* grtoglPutText:
|
||||
* grtcairoPutText:
|
||||
* (modified on SunPutText)
|
||||
*
|
||||
* This routine puts a chunk of text on the screen in the current
|
||||
|
|
@ -867,19 +618,8 @@ LinkedRect *obscure; /* A list of obscuring rectangles */
|
|||
/* copy the text to the color screen */
|
||||
if ((overlap.r_xbot < overlap.r_xtop) && (overlap.r_ybot <= overlap.r_ytop))
|
||||
{
|
||||
//glScissor(overlap.r_xbot, overlap.r_ybot, overlap.r_xtop - overlap.r_xbot,
|
||||
// overlap.r_ytop - overlap.r_ybot);
|
||||
cairo_rectangle(grCairoContext, overlap.r_xbot, overlap.r_ybot, overlap.r_xtop - overlap.r_xbot, overlap.r_ytop - overlap.r_ybot);
|
||||
cairo_clip(grCairoContext);
|
||||
/*
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
glRasterPos2i(pos->p_x, pos->p_y);
|
||||
glListBase(grXBases[(toglCurrent.fontSize == GR_TEXT_DEFAULT) ?
|
||||
GR_TEXT_SMALL : toglCurrent.fontSize]);
|
||||
glCallLists(strlen(text), GL_UNSIGNED_BYTE, (unsigned char *)text);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
*/
|
||||
cairo_move_to(grCairoContext, location.r_xbot, location.r_ybot);
|
||||
cairo_show_text(grCairoContext, text);
|
||||
cairo_fill(grCairoContext);
|
||||
|
|
@ -887,7 +627,7 @@ LinkedRect *obscure; /* A list of obscuring rectangles */
|
|||
}
|
||||
|
||||
|
||||
/* grTOGLGeoSub:
|
||||
/* grTCairoGeoSub:
|
||||
* return the tallest sub-rectangle of r not obscured by area
|
||||
* area must be within r.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/* grTCairo4.c -
|
||||
*
|
||||
* Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd.
|
||||
* Copyright 2017 Open Circuit Design
|
||||
*
|
||||
* This file contains functions to manage the graphics tablet associated
|
||||
* with the X display.
|
||||
*
|
||||
* Written by Chuan Chen
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
|
|
@ -39,6 +40,7 @@ extern Display *grXdpy;
|
|||
void
|
||||
GrTCairoDisableTablet ()
|
||||
{
|
||||
/* (Unimplemented) */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -57,6 +59,7 @@ GrTCairoDisableTablet ()
|
|||
void
|
||||
GrTCairoEnableTablet ()
|
||||
{
|
||||
/* (Unimplemented) */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
/* grTOGL5.c -
|
||||
/* grTCairo5.c -
|
||||
*
|
||||
* Copyright 2003 Open Circuit Design, Inc., for MultiGiG Ltd.
|
||||
* Copyright 2017 Open Circuit Design
|
||||
*
|
||||
* Manipulate the programable cursor on the graphics display.
|
||||
*
|
||||
* Written by Chuan Chen
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
//#include <GL/gl.h>
|
||||
//#include <GL/glx.h>
|
||||
#include <cairo/cairo-xlib.h>
|
||||
|
||||
#include "tcltk/tclmagic.h"
|
||||
|
|
@ -24,7 +23,6 @@
|
|||
#include "graphics/graphics.h"
|
||||
#include "graphics/graphicsInt.h"
|
||||
#include "grTkCommon.h"
|
||||
//#include "grTOGLInt.h"
|
||||
#include "grTCairoInt.h"
|
||||
|
||||
extern Display *grXdpy;
|
||||
|
|
@ -35,7 +33,7 @@ extern cairo_t *grCairoContext;
|
|||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* GrTOGLDrawGlyph --
|
||||
* GrTCairoDrawGlyph --
|
||||
*
|
||||
* Draw one glyph on the display.
|
||||
*
|
||||
|
|
@ -99,20 +97,15 @@ Point *p; /* screen pos of lower left corner */
|
|||
mask = GrStyleTable[thisp].mask << 1;
|
||||
color = GrStyleTable[thisp].color;
|
||||
GrGetColor(color, &red, &green, &blue);
|
||||
//glColor4ub((GLubyte)red, (GLubyte)green, (GLubyte)blue,
|
||||
// (GLubyte)mask);
|
||||
cairo_set_source_rgba(grCairoContext, ((float)red / 255), ((float)green / 255), ((float)blue / 255), ((float)mask / 127.0));
|
||||
//glBegin(GL_POINTS);
|
||||
}
|
||||
x1 = bBox.r_xbot + x;
|
||||
//glVertex2i((GLint)x1, (GLint)y1);
|
||||
cairo_rectangle(grCairoContext, x1, y1, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lastp != -1) {
|
||||
cairo_fill(grCairoContext);
|
||||
//glEnd();
|
||||
}
|
||||
} else {
|
||||
/* do pixel by pixel clipping */
|
||||
|
|
@ -158,13 +151,8 @@ Point *p; /* screen pos of lower left corner */
|
|||
mask = GrStyleTable[*pixelp].mask << 1;
|
||||
color = GrStyleTable[*pixelp].color;
|
||||
GrGetColor(color, &red, &green, &blue);
|
||||
cairo_set_source_rbga(grCairoContext, ((float)red / 255), ((float)green / 255), ((float)blue / 255), ((float)mask / 127.0));
|
||||
cairo_set_source_rgba(grCairoContext, ((float)red / 255), ((float)green / 255), ((float)blue / 255), ((float)mask / 127.0));
|
||||
|
||||
//glColor4ub((GLubyte)red, (GLubyte)green,
|
||||
// (GLubyte)blue, (GLubyte)mask);
|
||||
//glBegin(GL_POINTS);
|
||||
//glVertex2i((GLint)startx, (GLint)yloc);
|
||||
//glEnd();
|
||||
cairo_rectangle(grCairoContext, startx, yloc, 1, 1);
|
||||
cairo_fill(grCairoContext);
|
||||
}
|
||||
|
|
@ -181,7 +169,7 @@ Point *p; /* screen pos of lower left corner */
|
|||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* GrTOGLSetCursor:
|
||||
* GrTCairoSetCursor:
|
||||
*
|
||||
* Make the cursor be a new pattern, as defined in the display styles file.
|
||||
*
|
||||
|
|
|
|||
3821
install.log
3821
install.log
File diff suppressed because it is too large
Load Diff
|
|
@ -1,248 +0,0 @@
|
|||
# 1 "proto.magicrc.in"
|
||||
# 1 "<built-in>"
|
||||
# 1 "<command-line>"
|
||||
# 1 "/usr/include/stdc-predef.h" 1 3 4
|
||||
# 1 "<command-line>" 2
|
||||
# 1 "proto.magicrc.in"
|
||||
# 9 "proto.magicrc.in"
|
||||
puts stdout "Processing system .magicrc file"
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
|
||||
macro a "select visible"
|
||||
macro A "select more visible"
|
||||
macro ^A "select less visible"
|
||||
|
||||
macro b "box"
|
||||
macro B "findbox"
|
||||
|
||||
macro c "copy"
|
||||
|
||||
macro d "delete"
|
||||
macro ^D "erase $"
|
||||
|
||||
macro e "edit"
|
||||
|
||||
macro f "sideways"
|
||||
macro F "upsidedown"
|
||||
|
||||
macro g "grid"
|
||||
macro G "grid 2"
|
||||
|
||||
macro i "select cell"
|
||||
macro I "select more cell"
|
||||
|
||||
macro Control_XK_i "select less cell"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
imacro l "label "
|
||||
|
||||
macro L "shell ls"
|
||||
macro ^L "redraw"
|
||||
|
||||
macro m "move"
|
||||
macro M "stretch"
|
||||
|
||||
macro ^N ""
|
||||
|
||||
macro o "openwindow"
|
||||
macro O "closewindow"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
imacro p "paint "
|
||||
|
||||
|
||||
|
||||
macro Control_Shift_XK_q "quit"
|
||||
|
||||
|
||||
macro r "clockwise"
|
||||
macro R "clockwise 270"
|
||||
macro ^R "clockwise 180"
|
||||
|
||||
macro s "select"
|
||||
macro S "select more"
|
||||
macro ^S "select less"
|
||||
|
||||
macro Control_Shift_XK_s "undo ; select"
|
||||
|
||||
|
||||
macro u "undo"
|
||||
macro U "redo"
|
||||
|
||||
macro v "view"
|
||||
macro V "xview"
|
||||
|
||||
macro w "writeall"
|
||||
macro W "writeall force"
|
||||
|
||||
macro x "expand"
|
||||
macro X "unexpand"
|
||||
macro ^X "expand toggle"
|
||||
|
||||
macro z "zoom .5"
|
||||
macro Z "zoom 2"
|
||||
macro ^Z "findbox zoom"
|
||||
|
||||
macro Control_Shift_XK_z "center"
|
||||
|
||||
|
||||
macro ? "drc why"
|
||||
macro / "select area; what ; select clear"
|
||||
|
||||
macro , "select clear"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
macro " " "tool"
|
||||
|
||||
imacro XK_colon ":"
|
||||
imacro XK_semicolon ":"
|
||||
|
||||
macro Shift_XK_space "tool box"
|
||||
macro Control_XK_space "tool wiring"
|
||||
|
||||
macro XK_Left "scroll l .1 w"
|
||||
macro Shift_XK_Left "scroll l 1 w"
|
||||
macro Control_XK_Left "box grow w 1"
|
||||
macro Control_Shift_XK_Left "box shrink e 1"
|
||||
macro XK_Right "scroll r .1 w"
|
||||
macro Shift_XK_Right "scroll r 1 w"
|
||||
macro Control_XK_Right "box grow e 1"
|
||||
macro Control_Shift_XK_Right "box shrink w 1"
|
||||
macro XK_Up "scroll u .1 w"
|
||||
macro Shift_XK_Up "scroll u 1 w"
|
||||
macro Control_XK_Up "box grow n 1"
|
||||
macro Control_Shift_XK_Up "box shrink s 1"
|
||||
macro XK_Down "scroll d .1 w"
|
||||
macro Shift_XK_Down "scroll d 1 w"
|
||||
macro Control_XK_Down "box grow s 1"
|
||||
macro Control_Shift_XK_Down "box shrink n 1"
|
||||
|
||||
|
||||
macro XK_KP_Delete "box size 0 0"
|
||||
macro XK_KP_Insert "box size 4 4"
|
||||
macro XK_KP_0 "box size 7 2"
|
||||
macro Shift_XK_KP_0 "box size 7 2"
|
||||
macro XK_0 "box size 7 2"
|
||||
macro Control_XK_KP_0 "box size 2 7"
|
||||
macro Control_XK_KP_Insert "box size 2 7"
|
||||
macro XK_KP_End "move sw 1"
|
||||
macro XK_KP_Down "move d 1"
|
||||
macro XK_KP_2 "stretch d 1"
|
||||
macro Shift_XK_KP_2 "stretch d 1"
|
||||
macro XK_2 "stretch d 1"
|
||||
macro XK_KP_Next "move se 1"
|
||||
macro XK_KP_Left "move l 1"
|
||||
macro XK_KP_4 "stretch l 1"
|
||||
macro Shift_XK_KP_4 "stretch l 1"
|
||||
macro XK_4 "stretch l 1"
|
||||
macro XK_KP_Begin "findbox zoom"
|
||||
macro XK_KP_5 "findbox"
|
||||
macro Shift_XK_KP_5 "findbox"
|
||||
macro XK_5 "findbox"
|
||||
macro XK_KP_Right "move r 1"
|
||||
macro XK_KP_6 "stretch r 1"
|
||||
macro Shift_XK_KP_6 "stretch r 1"
|
||||
macro XK_6 "stretch r 1"
|
||||
macro XK_KP_Home "move nw 1"
|
||||
macro XK_KP_Up "move u 1"
|
||||
macro XK_KP_8 "stretch u 1"
|
||||
macro Shift_XK_KP_8 "stretch u 1"
|
||||
macro XK_8 "stretch u 1"
|
||||
macro XK_KP_Prior "move ne 1"
|
||||
|
||||
macro XK_Pointer_Button4 "scroll u .05 w"
|
||||
macro XK_Pointer_Button5 "scroll d .05 w"
|
||||
|
||||
macro XK_F1 "paint ndiff"
|
||||
macro XK_F2 "paint pdiff"
|
||||
macro XK_F3 "paint poly"
|
||||
macro XK_F4 "paint poly2"
|
||||
macro XK_F5 "paint m1"
|
||||
macro XK_F6 "paint m2"
|
||||
macro XK_F7 "paint m3"
|
||||
macro XK_F8 "paint m4"
|
||||
macro XK_F9 "paint ndc"
|
||||
macro XK_F10 "paint pdc"
|
||||
macro XK_F11 "paint pc"
|
||||
macro XK_F12 "paint via"
|
||||
# 235 "proto.magicrc.in"
|
||||
macro Control_Button1 "*bypass box move bl cursor"
|
||||
macro Control_Button2 "*bypass paint cursor"
|
||||
macro Control_Button3 "*bypass box corner ur cursor"
|
||||
|
||||
macro Button1 "*bypass box move bl cursor"
|
||||
macro Shift_Button1 "*bypass box corner bl cursor"
|
||||
macro Button2 "*bypass paint cursor"
|
||||
macro Shift_Button2 "*bypass erase cursor"
|
||||
macro Button3 "*bypass box corner ur cursor"
|
||||
macro Shift_Button3 "*bypass box move ur cursor"
|
||||
# 258 "proto.magicrc.in"
|
||||
macro color Button1 "pushbutton left"
|
||||
macro color Button2 "pushbutton middle"
|
||||
macro color Button3 "pushbutton right"
|
||||
macro color u "undo"
|
||||
macro color U "redo"
|
||||
macro color plus "color next"
|
||||
macro color minus "color last"
|
||||
|
||||
macro netlist Button1 "pushbutton left"
|
||||
macro netlist Button2 "pushbutton middle"
|
||||
macro netlist Button3 "pushbutton right"
|
||||
|
||||
macro wind3d L "level up"
|
||||
macro wind3d l "level down"
|
||||
macro wind3d C "cif"
|
||||
macro wind3d " " "defaults"
|
||||
macro wind3d ^L "refresh"
|
||||
macro wind3d Z "zoom 2.0 1 rel"
|
||||
macro wind3d z "zoom 0.5 1 rel"
|
||||
macro wind3d 1 "view 0 10 0 rel"
|
||||
macro wind3d 2 "view 0 -10 0 rel"
|
||||
macro wind3d 3 "view 10 0 0 rel"
|
||||
macro wind3d 4 "view -10 0 0 rel"
|
||||
macro wind3d 5 "view 0 0 10 rel"
|
||||
macro wind3d 6 "view 0 0 -10 rel"
|
||||
macro wind3d 7 "view 0 1 0 rel"
|
||||
macro wind3d 8 "view 0 -1 0 rel"
|
||||
macro wind3d 9 "view 1 0 0 rel"
|
||||
macro wind3d 0 "view -1 0 0 rel"
|
||||
|
||||
macro wind3d XK_Up "scroll 0 -0.25 0 rel"
|
||||
macro wind3d XK_Down "scroll 0 0.25 0 rel"
|
||||
macro wind3d XK_Left "scroll 0.25 0 0 rel"
|
||||
macro wind3d XK_Right "scroll -0.25 0 0 rel"
|
||||
macro wind3d XK_minus "view 0 0 1 rel"
|
||||
macro wind3d XK_equal "view 0 0 -1 rel"
|
||||
macro wind3d XK_greater "zoom 1 2.0 rel"
|
||||
macro wind3d XK_less "zoom 1 0.5 rel"
|
||||
|
||||
|
||||
|
||||
|
||||
setlabel font FreeSans.pt3 0.58
|
||||
setlabel font FreeSerif.pt3 0.58
|
||||
setlabel font FreeMono.pt3 0.6
|
||||
|
||||
|
||||
|
||||
|
||||
magic::suspendout
|
||||
if {![catch {set Opts(tools)}]} { magic::enable_tools }
|
||||
set GND "gnd!"
|
||||
set VDD "vdd!"
|
||||
magic::resumeout
|
||||
catch {source ${CAD_ROOT}/magic/sys/site.def}
|
||||
|
|
@ -1 +0,0 @@
|
|||
readline-4.3
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
tech
|
||||
format 28
|
||||
gdsquery
|
||||
end
|
||||
|
||||
version
|
||||
version 0.1
|
||||
description "Minimal technology file for querying an unknown GDS database"
|
||||
end
|
||||
|
||||
planes
|
||||
end
|
||||
|
||||
types
|
||||
end
|
||||
|
||||
contact
|
||||
end
|
||||
|
||||
styles
|
||||
styletype mos
|
||||
end
|
||||
|
||||
compose
|
||||
end
|
||||
|
||||
connect
|
||||
end
|
||||
|
||||
cifoutput
|
||||
style generic
|
||||
scalefactor 1
|
||||
end
|
||||
|
||||
cifinput
|
||||
style generic
|
||||
scalefactor 1
|
||||
end
|
||||
|
||||
# mzrouter
|
||||
# end
|
||||
|
||||
drc
|
||||
end
|
||||
|
||||
extract
|
||||
end
|
||||
|
||||
# wiring
|
||||
# end
|
||||
|
||||
# router
|
||||
# end
|
||||
|
||||
# plowing
|
||||
# end
|
||||
|
||||
# plot
|
||||
# end
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
tech
|
||||
format 28
|
||||
minimum
|
||||
end
|
||||
|
||||
version
|
||||
version 0.0
|
||||
description "Minimum technology file structure"
|
||||
end
|
||||
|
||||
planes
|
||||
end
|
||||
|
||||
types
|
||||
end
|
||||
|
||||
contact
|
||||
end
|
||||
|
||||
styles
|
||||
styletype mos
|
||||
end
|
||||
|
||||
compose
|
||||
end
|
||||
|
||||
connect
|
||||
end
|
||||
|
||||
cifoutput
|
||||
end
|
||||
|
||||
cifinput
|
||||
end
|
||||
|
||||
# mzrouter
|
||||
# end
|
||||
|
||||
drc
|
||||
end
|
||||
|
||||
extract
|
||||
end
|
||||
|
||||
# wiring
|
||||
# end
|
||||
|
||||
# router
|
||||
# end
|
||||
|
||||
# plowing
|
||||
# end
|
||||
|
||||
# plot
|
||||
# end
|
||||
3332
scmos/scmos-sub.tech
3332
scmos/scmos-sub.tech
File diff suppressed because it is too large
Load Diff
4410
scmos/scmos-tm.tech
4410
scmos/scmos-tm.tech
File diff suppressed because it is too large
Load Diff
6391
scmos/scmos.tech
6391
scmos/scmos.tech
File diff suppressed because it is too large
Load Diff
6380
scmos/scmosWR.tech
6380
scmos/scmosWR.tech
File diff suppressed because it is too large
Load Diff
|
|
@ -4,22 +4,22 @@ running configure, to aid debugging if configure makes a mistake.
|
|||
It was created by configure, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure --prefix=/home/chuan/Desktop/magic_install --without-opengl
|
||||
$ ./configure --without-opengl --prefix=/home/tim/cad
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = ubuntu
|
||||
hostname = stravinsky
|
||||
uname -m = x86_64
|
||||
uname -r = 3.19.0-25-generic
|
||||
uname -r = 4.1.13-100.fc21.x86_64
|
||||
uname -s = Linux
|
||||
uname -v = #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015
|
||||
uname -v = #1 SMP Tue Nov 10 13:13:20 UTC 2015
|
||||
|
||||
/usr/bin/uname -p = unknown
|
||||
/usr/bin/uname -p = x86_64
|
||||
/bin/uname -X = unknown
|
||||
|
||||
/bin/arch = unknown
|
||||
/bin/arch = x86_64
|
||||
/usr/bin/arch -k = unknown
|
||||
/usr/convex/getsysinfo = unknown
|
||||
/usr/bin/hostinfo = unknown
|
||||
|
|
@ -27,14 +27,12 @@ uname -v = #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015
|
|||
/usr/bin/oslevel = unknown
|
||||
/bin/universe = unknown
|
||||
|
||||
PATH: /usr/local/sbin
|
||||
PATH: /usr/local/bin
|
||||
PATH: /usr/sbin
|
||||
PATH: /usr/bin
|
||||
PATH: /sbin
|
||||
PATH: .
|
||||
PATH: /bin
|
||||
PATH: /usr/games
|
||||
PATH: /usr/local/games
|
||||
PATH: /sbin
|
||||
PATH: /usr/bin
|
||||
PATH: /usr/sbin
|
||||
PATH: /usr/local/bin
|
||||
|
||||
|
||||
## ----------- ##
|
||||
|
|
@ -48,12 +46,12 @@ configure:2531: result: x86_64-unknown-linux-gnu
|
|||
configure:2551: checking target system type
|
||||
configure:2564: result: x86_64-unknown-linux-gnu
|
||||
configure:2656: checking for gcc
|
||||
configure:2672: found /usr/bin/gcc
|
||||
configure:2672: found /bin/gcc
|
||||
configure:2683: result: gcc
|
||||
configure:2912: checking for C compiler version
|
||||
configure:2921: gcc --version >&5
|
||||
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
|
||||
Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
|
@ -61,11 +59,11 @@ configure:2932: $? = 0
|
|||
configure:2921: gcc -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=gcc
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
|
||||
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
|
||||
configure:2932: $? = 0
|
||||
configure:2921: gcc -V >&5
|
||||
gcc: error: unrecognized command line option '-V'
|
||||
|
|
@ -127,7 +125,7 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:3472: result: gcc -E
|
||||
|
|
@ -148,16 +146,16 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:3592: checking for g++
|
||||
configure:3608: found /usr/bin/g++
|
||||
configure:3608: found /bin/g++
|
||||
configure:3619: result: g++
|
||||
configure:3646: checking for C++ compiler version
|
||||
configure:3655: g++ --version >&5
|
||||
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
|
||||
Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
|
@ -165,11 +163,11 @@ configure:3666: $? = 0
|
|||
configure:3655: g++ -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=g++
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
|
||||
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
|
||||
configure:3666: $? = 0
|
||||
configure:3655: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
|
|
@ -194,24 +192,24 @@ configure:3823: gcc -o conftest -g conftest.c >&5
|
|||
configure:3823: $? = 0
|
||||
configure:3840: result: none required
|
||||
configure:3862: checking for a BSD-compatible install
|
||||
configure:3930: result: /usr/bin/install -c
|
||||
configure:3930: result: /bin/install -c
|
||||
configure:3984: checking for ranlib
|
||||
configure:4000: found /usr/bin/ranlib
|
||||
configure:4000: found /bin/ranlib
|
||||
configure:4011: result: ranlib
|
||||
configure:4038: checking for gm4
|
||||
configure:4071: result: no
|
||||
configure:4038: checking for gnum4
|
||||
configure:4071: result: no
|
||||
configure:4038: checking for m4
|
||||
configure:4056: found /usr/bin/m4
|
||||
configure:4068: result: /usr/bin/m4
|
||||
configure:4056: found /bin/m4
|
||||
configure:4068: result: /bin/m4
|
||||
configure:4086: checking for python3
|
||||
configure:4104: found /usr/bin/python3
|
||||
configure:4117: result: /usr/bin/python3
|
||||
configure:4104: found /bin/python3
|
||||
configure:4117: result: /bin/python3
|
||||
configure:4162: checking for ld used by GCC
|
||||
configure:4225: result: /usr/bin/ld
|
||||
configure:4232: checking if the linker (/usr/bin/ld) is GNU ld
|
||||
GNU ld (GNU Binutils for Ubuntu) 2.24
|
||||
configure:4225: result: /bin/ld
|
||||
configure:4232: checking if the linker (/bin/ld) is GNU ld
|
||||
GNU ld version 2.24
|
||||
configure:4244: result: yes
|
||||
configure:4251: checking for grep that handles long lines and -e
|
||||
configure:4309: result: /bin/grep
|
||||
|
|
@ -304,7 +302,7 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
|
|
@ -345,7 +343,7 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
|
|
@ -435,7 +433,7 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
|
|
@ -508,7 +506,7 @@ configure: failed program was:
|
|||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define MAGIC_REVISION "22"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
|
|
@ -553,14 +551,12 @@ configure:5118: gcc -o conftest -g conftest.c >&5
|
|||
configure:5118: $? = 0
|
||||
configure:5127: result: yes
|
||||
configure:5342: checking for gcore
|
||||
configure:5360: found /usr/bin/gcore
|
||||
configure:5373: result: /usr/bin/gcore
|
||||
configure:5360: found /bin/gcore
|
||||
configure:5373: result: /bin/gcore
|
||||
configure:5385: checking for csh
|
||||
configure:5403: found /bin/csh
|
||||
configure:5416: result: /bin/csh
|
||||
configure:5430: checking for X
|
||||
configure:5538: gcc -E conftest.c
|
||||
configure:5538: $? = 0
|
||||
configure:5569: gcc -o conftest -g conftest.c -lX11 >&5
|
||||
configure:5569: $? = 0
|
||||
configure:5619: result: libraries , headers
|
||||
|
|
@ -588,122 +584,20 @@ configure:6094: $? = 0
|
|||
configure:6103: result: yes
|
||||
configure:6139: checking for XOpenDevice in -lXi
|
||||
configure:6164: gcc -o conftest -g conftest.c -lXi >&5
|
||||
/usr/bin/ld: cannot find -lXi
|
||||
collect2: error: ld returned 1 exit status
|
||||
configure:6164: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME ""
|
||||
| #define PACKAGE_TARNAME ""
|
||||
| #define PACKAGE_VERSION ""
|
||||
| #define PACKAGE_STRING ""
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define SIZEOF_VOID_P 8
|
||||
| #define SIZEOF_UNSIGNED_INT 4
|
||||
| #define SIZEOF_UNSIGNED_LONG 8
|
||||
| #define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SETENV 1
|
||||
| #define HAVE_PUTENV 1
|
||||
| #define HAVE_SYS_MMAN_H 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define HAVE_LIMITS_H 1
|
||||
| #define HAVE_PATHS_H 1
|
||||
| #define HAVE_VA_COPY 1
|
||||
| #define HAVE___VA_COPY 1
|
||||
| /* end confdefs.h. */
|
||||
|
|
||||
| /* Override any GCC internal prototype to avoid an error.
|
||||
| Use char because int might match the return type of a GCC
|
||||
| builtin and then its argument prototype would still apply. */
|
||||
| #ifdef __cplusplus
|
||||
| extern "C"
|
||||
| #endif
|
||||
| char XOpenDevice ();
|
||||
| int
|
||||
| main ()
|
||||
| {
|
||||
| return XOpenDevice ();
|
||||
| ;
|
||||
| return 0;
|
||||
| }
|
||||
configure:6173: result: no
|
||||
configure:6164: $? = 0
|
||||
configure:6173: result: yes
|
||||
configure:6179: checking for XmuInternAtom in -lXmu
|
||||
configure:6204: gcc -o conftest -g conftest.c -lXmu >&5
|
||||
/usr/bin/ld: cannot find -lXmu
|
||||
collect2: error: ld returned 1 exit status
|
||||
configure:6204: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME ""
|
||||
| #define PACKAGE_TARNAME ""
|
||||
| #define PACKAGE_VERSION ""
|
||||
| #define PACKAGE_STRING ""
|
||||
| #define PACKAGE_BUGREPORT ""
|
||||
| #define PACKAGE_URL ""
|
||||
| #define MAGIC_VERSION "8.2"
|
||||
| #define MAGIC_REVISION "19"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define SIZEOF_VOID_P 8
|
||||
| #define SIZEOF_UNSIGNED_INT 4
|
||||
| #define SIZEOF_UNSIGNED_LONG 8
|
||||
| #define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SETENV 1
|
||||
| #define HAVE_PUTENV 1
|
||||
| #define HAVE_SYS_MMAN_H 1
|
||||
| #define HAVE_DIRENT_H 1
|
||||
| #define HAVE_LIMITS_H 1
|
||||
| #define HAVE_PATHS_H 1
|
||||
| #define HAVE_VA_COPY 1
|
||||
| #define HAVE___VA_COPY 1
|
||||
| /* end confdefs.h. */
|
||||
|
|
||||
| /* Override any GCC internal prototype to avoid an error.
|
||||
| Use char because int might match the return type of a GCC
|
||||
| builtin and then its argument prototype would still apply. */
|
||||
| #ifdef __cplusplus
|
||||
| extern "C"
|
||||
| #endif
|
||||
| char XmuInternAtom ();
|
||||
| int
|
||||
| main ()
|
||||
| {
|
||||
| return XmuInternAtom ();
|
||||
| ;
|
||||
| return 0;
|
||||
| }
|
||||
configure:6213: result: no
|
||||
configure:6204: $? = 0
|
||||
configure:6213: result: yes
|
||||
configure:6219: checking for XextFindDisplay in -lXext
|
||||
configure:6244: gcc -o conftest -g conftest.c -lXext >&5
|
||||
configure:6244: $? = 0
|
||||
configure:6253: result: yes
|
||||
configure:6333: checking for tclConfig.sh
|
||||
configure:6407: result: /usr/lib/tcl8.6/tclConfig.sh
|
||||
configure:6407: result: /usr/lib64/tclConfig.sh
|
||||
configure:6423: checking for tkConfig.sh
|
||||
configure:6496: result: /usr/lib/tk8.6/tkConfig.sh
|
||||
configure:6496: result: /usr/lib64/tkConfig.sh
|
||||
configure:6630: checking for wish executable
|
||||
configure:6658: result: /usr/bin/wish
|
||||
configure:6664: checking for tclsh executable
|
||||
|
|
@ -737,7 +631,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
|||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on ubuntu
|
||||
on stravinsky
|
||||
|
||||
config.status:799: creating defs.mak
|
||||
config.status:902: WARNING: 'defs.mak.in' seems to ignore the --datarootdir setting
|
||||
|
|
@ -805,18 +699,18 @@ ac_cv_header_unistd_h=yes
|
|||
ac_cv_host=x86_64-unknown-linux-gnu
|
||||
ac_cv_lib_ICE_IceConnectionNumber=yes
|
||||
ac_cv_lib_Xext_XextFindDisplay=yes
|
||||
ac_cv_lib_Xi_XOpenDevice=no
|
||||
ac_cv_lib_Xmu_XmuInternAtom=no
|
||||
ac_cv_lib_Xi_XOpenDevice=yes
|
||||
ac_cv_lib_Xmu_XmuInternAtom=yes
|
||||
ac_cv_lib_cairo_cairo_user_to_device=yes
|
||||
ac_cv_objext=o
|
||||
ac_cv_path_CSH=/bin/csh
|
||||
ac_cv_path_EGREP='/bin/grep -E'
|
||||
ac_cv_path_GCORE=/usr/bin/gcore
|
||||
ac_cv_path_GCORE=/bin/gcore
|
||||
ac_cv_path_GREP=/bin/grep
|
||||
ac_cv_path_LD=/usr/bin/ld
|
||||
ac_cv_path_M4=/usr/bin/m4
|
||||
ac_cv_path_PYTHON3=/usr/bin/python3
|
||||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_path_LD=/bin/ld
|
||||
ac_cv_path_M4=/bin/m4
|
||||
ac_cv_path_PYTHON3=/bin/python3
|
||||
ac_cv_path_install='/bin/install -c'
|
||||
ac_cv_prog_CPP='gcc -E'
|
||||
ac_cv_prog_ac_ct_CC=gcc
|
||||
ac_cv_prog_ac_ct_CXX=g++
|
||||
|
|
@ -844,7 +738,7 @@ CPPFLAGS=''
|
|||
CSH='/bin/csh'
|
||||
CXX='g++'
|
||||
CXXFLAGS='-g -O2'
|
||||
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"19\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1'
|
||||
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"22\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1'
|
||||
DEPEND_FLAG='-MM'
|
||||
ECHO_C=''
|
||||
ECHO_N='printf'
|
||||
|
|
@ -852,23 +746,23 @@ ECHO_T=''
|
|||
EGREP='/bin/grep -E'
|
||||
EXEEXT=''
|
||||
EXTRA_LIB_SPECS='-ldl'
|
||||
GCORE='/usr/bin/gcore'
|
||||
GCORE='/bin/gcore'
|
||||
GREP='/bin/grep'
|
||||
INC_SPECS=' -I/usr/include/tcl8.6/tk-private/generic -I/usr/include/tcl8.6'
|
||||
INC_SPECS=''
|
||||
INSTALL_DATA='${INSTALL} -m 644'
|
||||
INSTALL_PROGRAM='${INSTALL}'
|
||||
INSTALL_SCRIPT='${INSTALL}'
|
||||
INSTALL_TARGET='install-tcl'
|
||||
LD='/usr/bin/ld'
|
||||
LD='/bin/ld'
|
||||
LDDL_FLAGS='-shared -Wl,-soname,$@ -Wl,--version-script=${MAGICDIR}/magic/symbol.map'
|
||||
LDFLAGS=''
|
||||
LD_RUN_PATH=''
|
||||
LIBOBJS=''
|
||||
LIBS='-lcairo '
|
||||
LIB_SPECS=' -L/usr/lib/x86_64-linux-gnu -ltk8.6 -L/usr/lib/x86_64-linux-gnu -ltcl8.6'
|
||||
LIB_SPECS=' -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6'
|
||||
LTLIBOBJS=''
|
||||
M4='/usr/bin/m4'
|
||||
MAGIC_REVISION='19'
|
||||
M4='/bin/m4'
|
||||
MAGIC_REVISION='22'
|
||||
MAGIC_VERSION='8.2'
|
||||
MCPP='${MAGICDIR}/scripts/preproc.py'
|
||||
OA=''
|
||||
|
|
@ -882,12 +776,12 @@ PACKAGE_TARNAME=''
|
|||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION=''
|
||||
PATH_SEPARATOR=':'
|
||||
PYTHON3='/usr/bin/python3'
|
||||
PYTHON3='/bin/python3'
|
||||
RANLIB='ranlib'
|
||||
SCPP='gcc -E -x c'
|
||||
SCRIPTS=''
|
||||
SHDLIB_EXT='.so'
|
||||
SHELL='/bin/bash'
|
||||
SHELL='/bin/sh'
|
||||
SHLIB_CFLAGS='-Wimplicit-int -fPIC'
|
||||
SHLIB_LD=''
|
||||
SHLIB_LIB_SPECS=''
|
||||
|
|
@ -939,7 +833,7 @@ mandir='${datarootdir}/man'
|
|||
modules=' ext2sim ext2spice calma cif plot lef garouter grouter irouter mzrouter router gcr tcltk'
|
||||
oldincludedir='/usr/include'
|
||||
pdfdir='${docdir}'
|
||||
prefix='/home/chuan/Desktop/magic_install'
|
||||
prefix='/home/tim/cad'
|
||||
program_transform_name='s,x,x,'
|
||||
programs=' net2ir tcltk'
|
||||
psdir='${docdir}'
|
||||
|
|
@ -969,7 +863,7 @@ unused=' readline lisp'
|
|||
#define PACKAGE_BUGREPORT ""
|
||||
#define PACKAGE_URL ""
|
||||
#define MAGIC_VERSION "8.2"
|
||||
#define MAGIC_REVISION "19"
|
||||
#define MAGIC_REVISION "22"
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
# Generated by configure.
|
||||
# Run this file to recreate the current configuration.
|
||||
# Compiler output produced by configure, useful for debugging
|
||||
|
|
@ -8,7 +8,7 @@ debug=false
|
|||
ac_cs_recheck=false
|
||||
ac_cs_silent=false
|
||||
|
||||
SHELL=${CONFIG_SHELL-/bin/bash}
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
export SHELL
|
||||
## -------------------- ##
|
||||
## M4sh Initialization. ##
|
||||
|
|
@ -417,7 +417,7 @@ $config_files
|
|||
|
||||
Report bugs to the package provider."
|
||||
|
||||
ac_cs_config="'--prefix=/home/chuan/Desktop/magic_install' '--without-opengl' 'CFLAGS=-g'"
|
||||
ac_cs_config="'--without-opengl' '--prefix=/home/tim/cad' 'CFLAGS=-g'"
|
||||
ac_cs_version="\
|
||||
config.status
|
||||
configured by ./configure, generated by GNU Autoconf 2.69,
|
||||
|
|
@ -427,9 +427,9 @@ Copyright (C) 2012 Free Software Foundation, Inc.
|
|||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
ac_pwd='/home/chuan/Desktop/magic-8.2/scripts'
|
||||
ac_pwd='/home/tim/gitsrc/magic-8.2/scripts'
|
||||
srcdir='..'
|
||||
INSTALL='/usr/bin/install -c'
|
||||
INSTALL='/bin/install -c'
|
||||
test -n "$AWK" || AWK=awk
|
||||
# The default lists apply if the user does not specify any file.
|
||||
ac_need_defaults=:
|
||||
|
|
@ -496,10 +496,10 @@ if $ac_cs_silent; then
|
|||
fi
|
||||
|
||||
if $ac_cs_recheck; then
|
||||
set X /bin/bash './configure' '--prefix=/home/chuan/Desktop/magic_install' '--without-opengl' 'CFLAGS=-g' $ac_configure_extra_args --no-create --no-recursion
|
||||
set X /bin/sh './configure' '--without-opengl' '--prefix=/home/tim/cad' 'CFLAGS=-g' $ac_configure_extra_args --no-create --no-recursion
|
||||
shift
|
||||
$as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
|
||||
CONFIG_SHELL='/bin/bash'
|
||||
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
|
||||
CONFIG_SHELL='/bin/sh'
|
||||
export CONFIG_SHELL
|
||||
exec "$@"
|
||||
fi
|
||||
|
|
@ -588,7 +588,7 @@ S["INSTALL_TARGET"]="install-tcl"
|
|||
S["ALL_TARGET"]="tcl"
|
||||
S["OA_LIBS"]=""
|
||||
S["OA"]=""
|
||||
S["MAGIC_REVISION"]="19"
|
||||
S["MAGIC_REVISION"]="22"
|
||||
S["MAGIC_VERSION"]="8.2"
|
||||
S["SCPP"]="gcc -E -x c"
|
||||
S["MCPP"]="${MAGICDIR}/scripts/preproc.py"
|
||||
|
|
@ -620,12 +620,12 @@ S["gr_libs"]=" -lX11 -lcairo -lfontconfig -lfreetype"
|
|||
S["TCL_LIB_DIR"]="/usr/lib"
|
||||
S["TCLSH_EXE"]="/usr/bin/tclsh"
|
||||
S["WISH_EXE"]="/usr/bin/wish"
|
||||
S["LIB_SPECS"]=" -L/usr/lib/x86_64-linux-gnu -ltk8.6 -L/usr/lib/x86_64-linux-gnu -ltcl8.6"
|
||||
S["INC_SPECS"]=" -I/usr/include/tcl8.6/tk-private/generic -I/usr/include/tcl8.6"
|
||||
S["LIB_SPECS"]=" -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6"
|
||||
S["INC_SPECS"]=""
|
||||
S["EXTRA_LIB_SPECS"]="-ldl"
|
||||
S["SHLIB_LIB_SPECS"]=""
|
||||
S["LDDL_FLAGS"]="-shared -Wl,-soname,$@ -Wl,--version-script=${MAGICDIR}/magic/symbol.map"
|
||||
S["LD"]="/usr/bin/ld"
|
||||
S["LD"]="/bin/ld"
|
||||
S["SHLIB_LD"]=""
|
||||
S["SHDLIB_EXT"]=".so"
|
||||
S["X_EXTRA_LIBS"]=""
|
||||
|
|
@ -634,11 +634,11 @@ S["X_PRE_LIBS"]=" -lSM -lICE"
|
|||
S["X_CFLAGS"]=""
|
||||
S["XMKMF"]=""
|
||||
S["CSH"]="/bin/csh"
|
||||
S["GCORE"]="/usr/bin/gcore"
|
||||
S["GCORE"]="/bin/gcore"
|
||||
S["EGREP"]="/bin/grep -E"
|
||||
S["GREP"]="/bin/grep"
|
||||
S["PYTHON3"]="/usr/bin/python3"
|
||||
S["M4"]="/usr/bin/m4"
|
||||
S["PYTHON3"]="/bin/python3"
|
||||
S["M4"]="/bin/m4"
|
||||
S["RANLIB"]="ranlib"
|
||||
S["INSTALL_DATA"]="${INSTALL} -m 644"
|
||||
S["INSTALL_SCRIPT"]="${INSTALL}"
|
||||
|
|
@ -674,7 +674,7 @@ S["ECHO_T"]=""
|
|||
S["ECHO_N"]="-n"
|
||||
S["ECHO_C"]=""
|
||||
S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DMAGIC_VERSION="\
|
||||
"\\\"8.2\\\" -DMAGIC_REVISION=\\\"19\\\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHA"\
|
||||
"\\\"8.2\\\" -DMAGIC_REVISION=\\\"22\\\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHA"\
|
||||
"VE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_U"\
|
||||
"NSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE"\
|
||||
"_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -"\
|
||||
|
|
@ -699,7 +699,7 @@ S["libexecdir"]="${exec_prefix}/libexec"
|
|||
S["sbindir"]="${exec_prefix}/sbin"
|
||||
S["bindir"]="${exec_prefix}/bin"
|
||||
S["program_transform_name"]="s,x,x,"
|
||||
S["prefix"]="/home/chuan/Desktop/magic_install"
|
||||
S["prefix"]="/home/tim/cad"
|
||||
S["exec_prefix"]="${prefix}"
|
||||
S["PACKAGE_URL"]=""
|
||||
S["PACKAGE_BUGREPORT"]=""
|
||||
|
|
@ -708,7 +708,7 @@ S["PACKAGE_VERSION"]=""
|
|||
S["PACKAGE_TARNAME"]=""
|
||||
S["PACKAGE_NAME"]=""
|
||||
S["PATH_SEPARATOR"]=":"
|
||||
S["SHELL"]="/bin/bash"
|
||||
S["SHELL"]="/bin/sh"
|
||||
_ACAWK
|
||||
cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
|
||||
for (key in S) S_is_set[key] = 1
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
# Be aware that running scripts/configure again will overwrite
|
||||
# any changes!
|
||||
|
||||
SHELL = /bin/bash
|
||||
SHELL = /bin/sh
|
||||
|
||||
prefix = /home/chuan/Desktop/magic_install
|
||||
prefix = /home/tim/cad
|
||||
exec_prefix = ${prefix}
|
||||
bindir = ${exec_prefix}/bin
|
||||
libdir = ${exec_prefix}/lib
|
||||
|
|
@ -16,7 +16,7 @@ mandir = ${prefix}/share/man
|
|||
|
||||
SCRIPTS = ${MAGICDIR}/scripts
|
||||
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL = /bin/install -c
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
|
|
@ -49,28 +49,28 @@ CP = cp
|
|||
AR = ar
|
||||
ARFLAGS = crv
|
||||
LINK = ld -r
|
||||
LD = /usr/bin/ld
|
||||
M4 = /usr/bin/m4
|
||||
LD = /bin/ld
|
||||
M4 = /bin/m4
|
||||
MCPP = ${MAGICDIR}/scripts/preproc.py
|
||||
SCPP = gcc -E -x c
|
||||
RANLIB = ranlib
|
||||
SHDLIB_EXT = .so
|
||||
LDDL_FLAGS = ${LDFLAGS} -shared -Wl,-soname,$@ -Wl,--version-script=${MAGICDIR}/magic/symbol.map
|
||||
LD_RUN_PATH =
|
||||
LIB_SPECS = -L/usr/lib/x86_64-linux-gnu -ltk8.6 -L/usr/lib/x86_64-linux-gnu -ltcl8.6
|
||||
LIB_SPECS = -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6
|
||||
WISH_EXE = /usr/bin/wish
|
||||
TCL_LIB_DIR = /usr/lib
|
||||
MAGIC_VERSION = 8.2
|
||||
MAGIC_REVISION = 19
|
||||
MAGIC_REVISION = 22
|
||||
|
||||
CC = gcc
|
||||
CPP = gcc -E
|
||||
CXX = g++
|
||||
|
||||
CPPFLAGS = -I. -I${MAGICDIR}
|
||||
DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"19\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DNDEBUG -DGCORE=\"/usr/bin/gcore\"
|
||||
DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"22\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DX11_BACKING_STORE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DNDEBUG -DGCORE=\"/bin/gcore\"
|
||||
DFLAGS += -DSHDLIB_EXT=\".so\"
|
||||
CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC -I/usr/include/tcl8.6/tk-private/generic -I/usr/include/tcl8.6
|
||||
CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC
|
||||
|
||||
READLINE_DEFS =
|
||||
READLINE_LIBS =
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ for i in $@; do
|
|||
esac
|
||||
done
|
||||
#
|
||||
eval /home/chuan/Desktop/magic_install/lib/magic/tcl/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
|
||||
eval /home/tim/cad/lib/magic/tcl/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
|
||||
drc off
|
||||
box 0 0 0 0
|
||||
ext2sim $esargs
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ for i in $@; do
|
|||
esac
|
||||
done
|
||||
#
|
||||
eval /home/chuan/Desktop/magic_install/lib/magic/tcl/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
|
||||
eval /home/tim/cad/lib/magic/tcl/magicdnull -dnull -noconsole -nowrapper $mgargs <<EOF
|
||||
drc off
|
||||
box 0 0 0 0
|
||||
ext2spice $esargs
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# For installation, put this file (magic.sh) in a known executable path.
|
||||
# Put startup script "magic.tcl", shared library "tclmagic.so", and
|
||||
# "wish" replacement "magicexec" in ${CAD_ROOT}/magic/tcl/.
|
||||
#
|
||||
# This script starts magic under the Tcl interpreter,
|
||||
# reading commands from a special startup script which
|
||||
# launches magic and retains the Tcl interactive interpreter.
|
||||
|
||||
# Parse for the argument "-c[onsole]". If it exists, run magic
|
||||
# with the TkCon console. Strip this argument from the argument list.
|
||||
|
||||
TKCON=true
|
||||
DNULL=
|
||||
MAGIC_WISH=/usr/bin/wish
|
||||
export MAGIC_WISH
|
||||
|
||||
# Hacks for Cygwin
|
||||
if [ "`uname | cut -d_ -f1`" = "CYGWIN" ]; then
|
||||
export PATH="$PATH:/usr/lib"
|
||||
export DISPLAY=${DISPLAY:=":0"}
|
||||
fi
|
||||
|
||||
# Preserve quotes in arguments
|
||||
arglist=''
|
||||
for i in "$@" ; do
|
||||
case $i in
|
||||
-noc*) TKCON=;;
|
||||
-dnull) DNULL=true;;
|
||||
--version) TKCON=; DNULL=true;;
|
||||
--prefix) TKCON=; DNULL=true;;
|
||||
*) arglist="$arglist${arglist:+ }\"${i//\"/\\\"}\"";;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $TKCON ]; then
|
||||
|
||||
if [ $DNULL ]; then
|
||||
exec /home/chuan/Desktop/magic_install/lib/magic/tcl/tkcon.tcl -eval "source /home/chuan/Desktop/magic_install/lib/magic/tcl/console.tcl" \
|
||||
-slave "set argc $#; set argv [list $*]; source /home/chuan/Desktop/magic_install/lib/magic/tcl/magic.tcl"
|
||||
else
|
||||
exec /home/chuan/Desktop/magic_install/lib/magic/tcl/tkcon.tcl -eval "source /home/chuan/Desktop/magic_install/lib/magic/tcl/console.tcl" \
|
||||
-slave "package require Tk; set argc $#; set argv [list $arglist]; \
|
||||
source /home/chuan/Desktop/magic_install/lib/magic/tcl/magic.tcl"
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
#
|
||||
# Run the stand-in for wish (magicexec), which acts exactly like "wish"
|
||||
# except that it replaces ~/.wishrc with magic.tcl. This executable is
|
||||
# *only* needed when running without the console; the console itself is
|
||||
# capable of sourcing the startup script.
|
||||
#
|
||||
# With option "-dnull" we set up for operation without Tk (simple interpreter
|
||||
# only, efficient for running in batch mode).
|
||||
#
|
||||
if [ $DNULL ]; then
|
||||
exec /home/chuan/Desktop/magic_install/lib/magic/tcl/magicdnull -nowrapper "$@"
|
||||
else
|
||||
exec /home/chuan/Desktop/magic_install/lib/magic/tcl/magicexec -- "$@"
|
||||
fi
|
||||
fi
|
||||
406
tcltk/magic.tcl
406
tcltk/magic.tcl
|
|
@ -1,406 +0,0 @@
|
|||
# Wishrc startup for ToolScript (magic)
|
||||
#
|
||||
# For installation: Put this file and also magicwrap.so into
|
||||
# directory /home/chuan/Desktop/magic_install/lib/magic/tcl, and set the "load" line below
|
||||
# to point to the location of magicwrap.so. Also see comments
|
||||
# in shell script "magic.sh".
|
||||
|
||||
global Opts
|
||||
|
||||
# If we called magic via the non-console script, then we want to reset
|
||||
# the environment variable HOME to its original value.
|
||||
|
||||
if {${tcl_version} >= 8.6} {
|
||||
load -lazy /home/chuan/Desktop/magic_install/lib/magic/tcl/tclmagic.so
|
||||
} else {
|
||||
load /home/chuan/Desktop/magic_install/lib/magic/tcl/tclmagic.so
|
||||
}
|
||||
|
||||
# It is important to make sure no magic commands overlap with Tcl built-in
|
||||
# commands, because otherwise the namespace import will fail.
|
||||
|
||||
proc pushnamespace { name } {
|
||||
|
||||
set y [namespace eval ${name} info commands ::${name}::*]
|
||||
set z [info commands]
|
||||
|
||||
# Watch especially for magic "wizard" commands, as we don't want to confuse
|
||||
# the literal "*" with a regular expression *. "regsub" below takes care of it.
|
||||
|
||||
foreach v $y {
|
||||
regsub -all {\*} $v {\\*} i
|
||||
set x [namespace tail $i]
|
||||
if {[lsearch $z $x] < 0} {
|
||||
namespace import $i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc popnamespace { name } {
|
||||
set z [info commands]
|
||||
set l [expr [string length ${name}] + 5]
|
||||
|
||||
while {[set v [lsearch $z ${name}_tcl_*]] >= 0} {
|
||||
set y [lindex $z $v]
|
||||
set w [string range $y $l end]
|
||||
interp alias {} ::$w {}
|
||||
rename ::$y ::$w
|
||||
puts "Info: replacing ::$w with ::$y"
|
||||
}
|
||||
namespace forget ::${name}::*
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Define the drcstate procedure expected by the background DRC code.
|
||||
|
||||
proc magic::drcstate {option} {
|
||||
# (Null proc---see wrapper.tcl for a useful version)
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Define these console routines so that they don't produce errors
|
||||
# when Magic is run in batch mode
|
||||
|
||||
if {[catch {tkcon title}]} {
|
||||
proc magic::suspendout {} {}
|
||||
proc magic::resumeout {} {}
|
||||
proc magic::dialog {} {}
|
||||
proc magic::consolegeometry {} {}
|
||||
proc magic::consolefocus {} {}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Cross-Application section
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# Check namespaces for existence of other applications
|
||||
set UsingIRSIM 0
|
||||
set UsingXCircuit 0
|
||||
set UsingNetgen 0
|
||||
set nlist [namespace children]
|
||||
foreach i $nlist {
|
||||
switch $i {
|
||||
::irsim { set UsingIRSIM 1 }
|
||||
::xcircuit { set UsingXCircuit 1 }
|
||||
::netgen { set UsingNetgen 1 }
|
||||
}
|
||||
}
|
||||
|
||||
# Setup IRSIM assuming that the Tcl version is installed.
|
||||
# We do not need to rename procedure irsim to NULL because it is
|
||||
# redefined in a script, which simply overwrites the original.
|
||||
|
||||
proc irsim { args } {
|
||||
global CAD_ROOT
|
||||
set irsimscript [glob -nocomplain ${CAD_ROOT}/irsim/tcl/irsim.tcl]
|
||||
if { ${irsimscript} == {} } {
|
||||
puts stderr "\"irsim\" requires Tcl-based IRSIM version 9.6 or newer."
|
||||
puts stderr "Could not find script \"irsim.tcl\". If IRSIM is installed in a"
|
||||
puts stderr "place other than CAD_ROOT (=${CAD_ROOT}), use the command"
|
||||
puts stderr "\"source <path>/irsim.tcl\" before doing \"irsim\"."
|
||||
} else {
|
||||
source $irsimscript
|
||||
eval {irsim} $args
|
||||
}
|
||||
}
|
||||
|
||||
# Setup Xcircuit assuming that the Tcl version is installed.
|
||||
|
||||
proc xcircuit { args } {
|
||||
global CAD_ROOT
|
||||
global argc
|
||||
global argv
|
||||
set xcircscript [glob -nocomplain ${CAD_ROOT}/xcircuit*/xcircuit.tcl]
|
||||
if { ${xcircscript} == {} } {
|
||||
puts stderr "\"xcircuit\" requires Tcl-based XCircuit version 3.1 or newer."
|
||||
puts stderr "Could not find script \"xcircuit.tcl\". If XCircuit is installed in a"
|
||||
puts stderr "place other than CAD_ROOT (=${CAD_ROOT}), use the command"
|
||||
puts stderr "\"source <path>/xcircuit.tcl\"."
|
||||
} else {
|
||||
# if there are multiple installed versions, choose the highest version.
|
||||
if {[llength $xcircscript] > 1} {
|
||||
set xcircscript [lindex [lsort -decreasing -dictionary $xcircscript] 0]
|
||||
}
|
||||
# execute script in the scope of magic, because its variable space is
|
||||
# not modularized.
|
||||
set argv $args
|
||||
set argc [llength $args]
|
||||
uplevel #0 source $xcircscript
|
||||
}
|
||||
}
|
||||
|
||||
# Setup Netgen assuming that the Tcl version is installed.
|
||||
|
||||
proc netgen { args } {
|
||||
global CAD_ROOT
|
||||
global argc
|
||||
global argv
|
||||
set netgenscript [glob -nocomplain ${CAD_ROOT}/netgen/tcl/netgen.tcl]
|
||||
if { ${netgenscript} == {} } {
|
||||
puts stderr "\"netgen\" requires Tcl-based Netgen version 1.2 or newer."
|
||||
puts stderr "Could not find script \"netgen.tcl\". If Netgen is installed in a"
|
||||
puts stderr "place other than CAD_ROOT (=${CAD_ROOT}), use the command"
|
||||
puts stderr "\"source <path>/netgen.tcl\"."
|
||||
} else {
|
||||
set argv $args
|
||||
set argc [llength $args]
|
||||
uplevel #0 source $netgenscript
|
||||
}
|
||||
}
|
||||
|
||||
# Add the "echo" command
|
||||
|
||||
proc echo {args} {
|
||||
puts stdout $args
|
||||
}
|
||||
|
||||
# Parse argument list for "-c[onsole]" and "-now[rapper]".
|
||||
|
||||
set celllist {}
|
||||
set do_wrapper true
|
||||
set do_recover false
|
||||
set argafter {magic::initialize}
|
||||
set x {}
|
||||
for {set i 0} {$i < $argc} {incr i 1} {
|
||||
set x [lindex $argv $i]
|
||||
#
|
||||
# Command-line argument handling goes here
|
||||
# We have to handle all of magic's command line arguments so we can
|
||||
# figure out if a cell has been named for preloading.
|
||||
#
|
||||
switch -regexp -- $x {
|
||||
^-now(rap)?(per)?$ { ;# This regexp accepts -now, -nowrap, and -nowrapper
|
||||
set do_wrapper false
|
||||
}
|
||||
^-dnull {
|
||||
set do_wrapper false
|
||||
lappend argafter $x
|
||||
}
|
||||
^-r(e)?(cover)?$ {
|
||||
set do_recover true
|
||||
}
|
||||
^-rc(file)?$ {
|
||||
lappend argafter $x
|
||||
incr i 1
|
||||
lappend argafter [lindex $argv $i]
|
||||
}
|
||||
^-d -
|
||||
^-g -
|
||||
^-m -
|
||||
^-i -
|
||||
^-T {
|
||||
lappend argafter $x
|
||||
incr i 1
|
||||
lappend argafter [lindex $argv $i]
|
||||
}
|
||||
^-F {
|
||||
lappend argafter $x
|
||||
incr i 1
|
||||
lappend argafter [lindex $argv $i]
|
||||
incr i 1
|
||||
lappend argafter [lindex $argv $i]
|
||||
}
|
||||
^--version {
|
||||
puts stdout "8.2.19"
|
||||
exit 0
|
||||
}
|
||||
^--prefix {
|
||||
puts stdout $CAD_ROOT
|
||||
exit 0
|
||||
}
|
||||
^-D -
|
||||
^-n* {
|
||||
lappend argafter $x
|
||||
}
|
||||
default {
|
||||
lappend celllist $x
|
||||
lappend argafter $x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {$do_wrapper} {
|
||||
source ${CAD_ROOT}/magic/tcl/wrapper.tcl
|
||||
lappend argafter "-nowindow" ;# Set no-initial-window option in magic.
|
||||
}
|
||||
unset x i do_wrapper
|
||||
if {[catch {eval $argafter}]} { ;# magic::initialize ${argv}
|
||||
exit 1
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Check for presence of padlist manager script and include it
|
||||
|
||||
if {[file exists ${CAD_ROOT}/magic/tcl/padlist.tcl]} {
|
||||
source ${CAD_ROOT}/magic/tcl/padlist.tcl
|
||||
set Opts(padlist) 0
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Check for presence of the miscellaneous tools script and include it
|
||||
|
||||
if {[file exists ${CAD_ROOT}/magic/tcl/tools.tcl]} {
|
||||
source ${CAD_ROOT}/magic/tcl/tools.tcl
|
||||
set Opts(tools) 0
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Check for presence of the mazerouter script and include it
|
||||
|
||||
if {[file exists ${CAD_ROOT}/magic/tcl/mazeroute.tcl]} {
|
||||
source ${CAD_ROOT}/magic/tcl/mazeroute.tcl
|
||||
set Opts(mazeroute) 0
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Check for presence of the toolkit script and include it
|
||||
# NOTE: This supercedes the older toolkit which is now
|
||||
# named toolkit_rev0.tcl, and the intermediate bsitools.tcl,
|
||||
# which are folded into the newer toolkit.tcl.
|
||||
|
||||
if {[file exists ${CAD_ROOT}/magic/tcl/toolkit.tcl]} {
|
||||
source ${CAD_ROOT}/magic/tcl/toolkit.tcl
|
||||
set Opts(toolkit) 0
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Magic start function drops back to interpreter after initialization & setup
|
||||
|
||||
set auto_noexec 1 ;# don't EVER call UNIX commands w/o "shell" in front
|
||||
|
||||
# Have we called magic from tkcon or a clone thereof? If so, set MagicConsole
|
||||
|
||||
if {[lsearch [interp aliases] tkcon] != -1} {
|
||||
set MagicConsole tkcon
|
||||
catch {wm withdraw .}
|
||||
|
||||
# Get rid of some overlapping tkcon commands which are not needed.
|
||||
|
||||
if {[lsearch [info commands] orig_edit] < 0} {rename edit orig_edit}
|
||||
if {[lsearch [info commands] orig_dump] < 0} {rename dump orig_dump}
|
||||
if {[lsearch [info commands] orig_what] < 0} {rename what orig_what}
|
||||
} else {
|
||||
rename unknown tcl_unknown
|
||||
proc unknown { args } {
|
||||
# CAD tools special:
|
||||
# Check for commands which were renamed to tcl_(command)
|
||||
|
||||
set cmd [lindex $args 0]
|
||||
if {[lsearch [info commands] tcl_$cmd] >= 0} {
|
||||
set arglist [concat tcl_$cmd [lrange $args 1 end]]
|
||||
set ret [catch {eval $arglist} result]
|
||||
if {$ret == 0} {
|
||||
return $result
|
||||
} else {
|
||||
return -code $ret -errorcode $errorCode $result
|
||||
}
|
||||
}
|
||||
return [eval [concat tcl_unknown $args]]
|
||||
}
|
||||
}
|
||||
|
||||
# Set up certain commands to act like they do in non-Tcl-based magic;
|
||||
# These are the commands whose names have been extended so they don't
|
||||
# conflict with existing Tcl/Tk commands. This renaming & importing
|
||||
# *requires* the special code in the magic Tcl command dispatcher to
|
||||
# find and deal with each of these renamed commands!
|
||||
|
||||
if {[lsearch [info commands] orig_clock] < 0} {rename clock orig_clock}
|
||||
if {[lsearch [info commands] tcl_flush] < 0} {rename flush tcl_flush}
|
||||
if {[lsearch [info commands] tcl_load] < 0} {rename load tcl_load}
|
||||
if {[lsearch [info commands] tcl_array] < 0} {rename array tcl_array}
|
||||
if {[lsearch [info commands] tcl_label] < 0} {catch {rename label tcl_label}}
|
||||
if {[lsearch [info commands] tcl_grid] < 0} {catch {rename grid tcl_grid}}
|
||||
|
||||
namespace eval magic namespace export *
|
||||
pushnamespace magic
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Read system startup files (mostly macro definitions)
|
||||
# Read user startup file, if any
|
||||
# Load initial cell, if any
|
||||
|
||||
magic::startup
|
||||
|
||||
if {![catch {set toptitle [wm title .]}]} {
|
||||
if {[string range $toptitle 0 3] == "wish"} {
|
||||
wm withdraw .
|
||||
}
|
||||
if {[string range $toptitle 0 8] == "magicexec"} {
|
||||
wm withdraw .
|
||||
}
|
||||
unset toptitle
|
||||
}
|
||||
|
||||
# After loading, magic will wander off and do a complete DRC check
|
||||
# before executing the rest of the script unless we temporarily
|
||||
# disable the DRC checker.
|
||||
|
||||
set drcstate [drc status]
|
||||
drc off
|
||||
|
||||
# Initial window for wrapper, if defined.
|
||||
# empty string is equivalent to passing NULL cell name.
|
||||
#
|
||||
# If a startup file has created a window, then don't make another one.
|
||||
|
||||
if {[info commands magic::openwrapper] != {}} {
|
||||
if {[windownames layout] == {}} {
|
||||
set winname [magic::openwrapper]
|
||||
magic::techmanager initall
|
||||
magic::scrollupdate $winname
|
||||
|
||||
foreach cellname $celllist {
|
||||
set fext [file extension $cellname]
|
||||
puts stdout "handling file entry $cellname extension $fext"
|
||||
switch $fext {
|
||||
.lef -
|
||||
.LEF {lef read $cellname}
|
||||
.def -
|
||||
.DEF {def read $cellname}
|
||||
.gds -
|
||||
.GDS -
|
||||
.gds2 -
|
||||
.GDS2 -
|
||||
.gdsii -
|
||||
.GDSII {gds read $cellname}
|
||||
.cif -
|
||||
.CIF {cif read $cellname}
|
||||
.tcl {source $cellname}
|
||||
.mag -
|
||||
"" {magic::load $cellname}
|
||||
default {puts stderr "don't know how to load file $cellname"}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# Initial geometry handler for the default window, non-wrapper version
|
||||
catch {wm geometry .magic1 ${Opts(geometry)}}
|
||||
}
|
||||
|
||||
# Print the technology name and description
|
||||
puts stdout "Using technology \"[tech name]\", version [lindex [tech version] 0]"
|
||||
|
||||
# Set a box, and set the view; if no cell has been loaded, choose a default
|
||||
# view.
|
||||
if {![box exists]} {
|
||||
box 0 0 1 1 ;# create a unit box
|
||||
}
|
||||
if {[llength $celllist] > 0} {
|
||||
view
|
||||
} else {
|
||||
view -9 -9 10 10
|
||||
}
|
||||
|
||||
# The Tcl version handles the "-r" on the command line by calling
|
||||
# command crash recover.
|
||||
|
||||
if {$do_recover} {crash recover}
|
||||
|
||||
# Unset global TCL variables so they don't conflict with magic nodes.
|
||||
unset celllist nlist do_recover
|
||||
|
||||
if {$drcstate == 1} {
|
||||
drc on
|
||||
}
|
||||
unset drcstate
|
||||
BIN
tcltk/magicdnull
BIN
tcltk/magicdnull
Binary file not shown.
BIN
tcltk/magicexec
BIN
tcltk/magicexec
Binary file not shown.
Loading…
Reference in New Issue