Merge pull request #99 from rafmag/master

Fixed issues with rotating and flipping images + other bugs
This commit is contained in:
StefanSchippers 2023-01-16 21:07:34 +01:00 committed by GitHub
commit dd596fb671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1111 additions and 42 deletions

3
.gitignore vendored
View File

@ -27,4 +27,7 @@ src/parselabel.h
src/rawtovcd
src/xschem
/build
CMakeLists.txt
.vscode

21
CMakeLists.txt Normal file
View File

@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.12)
project(xschem LANGUAGES C)
file(GLOB_RECURSE PROJECT_SOURCE_FILES CONFIGURE_DEPENDS src/*.c)
list(REMOVE_ITEM PROJECT_SOURCE_FILES /home/rafmag/xschem/src/rawtovcd.c)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC src/ /usr/include/cairo /usr/include/tcl8.6)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CMAKE_DL_LIBS} tcl8.6 tk8.6 cairo xcb X11 xcb-render X11-xcb Xpm m jpeg)
set(EXPAND_LABEL expandlabel)
add_custom_target(expandlabel
bison -d -o ../src/expandlabel.c ../src/expandlabel.y
)
set(PARSE_LABEL parselabel)
add_custom_target(parselabel
flex -l -o ../src/parselabel.c ../src/parselabel.l
)
add_dependencies(${PROJECT_NAME} ${EXPAND_LABEL} ${PARSE_LABEL})

32
Makefile.conf Normal file
View File

@ -0,0 +1,32 @@
###############################################################
# Generated by scconfig - DO NOT EDIT - will be overwritten #
# Source: Makefile.conf.in; to regenerate run ./configure #
###############################################################
PREFIX=/usr/local
CC=gcc
CFLAGS=-pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6
LDFLAGS=-lm -lcairo -lX11 -lxcb -lxcb-render -lX11-xcb -lXpm -ltcl8.6 -ltk8.6
BINDIR=$(DESTDIR)$(install_root)$(PREFIX)/bin
SHAREDIR=$(DESTDIR)$(install_root)$(PREFIX)/share
DOCDIR=$(DESTDIR)$(install_root)$(PREFIX)/share/doc
XSHAREDIR=$(SHAREDIR)/xschem
XDOCDIR=$(DOCDIR)/xschem
MANDIR=$(SHAREDIR)/man
USER_CONF_DIR=~/.xschem
SCCBOX=$(ROOT)/scconfig/sccbox
## specify user schematic/symbol libraries;
## you may redefine it later in .xschem or xschemrc startup files
user_library_dir=~/.xschem/xschem_library
## specify system-wide symbol libraries;
## you may redefine it later in ~/.xschem/xschemrc or
## `pwd`/.xschemrc startup files
system_library_dir=$(DESTDIR)$(install_root)/usr/local/share/xschem/xschem_library/devices
## default search path
xschem_library_path=~/.xschem/xschem_library:/usr/local/share/xschem/xschem_library/devices:/usr/local/share/doc/xschem/examples:/usr/local/share/doc/xschem/ngspice:/usr/local/share/doc/xschem/logic:/usr/local/share/doc/xschem/xschem_simulator:/usr/local/share/doc/xschem/generators:/usr/local/share/doc/xschem/binto7seg:/usr/local/share/doc/xschem/pcb:/usr/local/share/doc/xschem/rom8k

30
config.h Normal file
View File

@ -0,0 +1,30 @@
/*************************************************************/
/* Generated by scconfig - DO NOT EDIT - will be overwritten */
/* Source: config.h.in; to regenerate run ./configure */
/*************************************************************/
/* Define this var if cairo is available and is to be used */
#define HAS_CAIRO 1
/* Define this var if Xlib's xcb is available */
#define HAS_XCB 1
/* Define this var if dup2(2) is available */
#define HAS_DUP2 1
/* Define this var if popen(3) is available */
#define HAS_POPEN 1
/* Define this var if popen(3) is not available but fork(2) and pipe(2) are available */
/*#undef HAS_PIPE */
#define PREFIX "/usr/local"
#define XSCHEM_LIBRARY_PATH "~/.xschem/xschem_library:/usr/local/share/xschem/xschem_library/devices:/usr/local/share/doc/xschem/examples:/usr/local/share/doc/xschem/ngspice:/usr/local/share/doc/xschem/logic:/usr/local/share/doc/xschem/xschem_simulator:/usr/local/share/doc/xschem/generators:/usr/local/share/doc/xschem/binto7seg:/usr/local/share/doc/xschem/pcb:/usr/local/share/doc/xschem/rom8k"
#define USER_CONF_DIR "~/.xschem"
#define XSCHEM_SHAREDIR PREFIX "/share/xschem"
/* Extra includes required by the detected libs (may be empty): */
#define _XOPEN_SOURCE

186
doc/manpages/xschem.1 Normal file
View File

@ -0,0 +1,186 @@
.\" xschem - manual
.\" Copyright (C) 2018 Tibor 'Igor2' Palinkas
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License along
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.\" Contact: TODO: an email address
.TH xschem 1 2018-01-01 "" "xschem manual"
.SH NAME
xschem - schematic capture and netlisting EDA tool
.SH SYNPOSIS
.nf
.sp
\fBxschem [\fIoptions\fB] [\fIinputfile\fB]
.fi
.SH DECSRIPTION
.BR Xschem
is a schematic capture program, it allows creation of
hierarchical representation of circuits with a top down approach.
.SH OPTIONS
.TP
.B -h, --help
Print help and exit.
.TP
.B -b, --detach
Detach xschem from console.
.TP
.B -n, --netlist
Do a netlist of the given schematic cell.
.TP
.B -v, --version
Print version information and exit.
.TP
.B -V, --vhdl
Set netlist type to VHDL.
.TP
.B -S, --simulate
Run a simulation of the current schematc file (spice/Verilog/VHDL, depending on the netlist type chosen).
.TP
.B -w, --verilog
Set netlist type to Verilog.
.TP
.B --tcl <tcl_script>
Execute specified tcl instructions before any other action, this can be used to change xschemrc variables.
.TP
.B --command <tcl_cmd>
Execute specified tcl commands after completing startup.
.TP
.B --script <file>
Execute specified tcl file as a command script (perhaps with xschem commands).
.TP
.B --tcp-port <number>
Listen to specified tcp port for client connections. (number >=1024).
.TP
.B -i, --no_rcload
Do not load any xschemrc file.
.TP
.B -o, --netlist_path
Set output for netlist.
.TP
.B -N, --netlist_filename
Set name (only name, not path) of top level netlist file.
.TP
.B -t, --tedax
Set netlist type to tEDAx.
.TP
.B -s, --spice
Set netlist type to SPICE.
.TP
.B -y, --symbol
Set netlist type to symbol global property edit.
.TP
.B -x, --no_x
Dont use X (only command mode).
.TP
.B -z, --rainbow
Use a raibow-looking layer color table.
.TP
.B -W, --waves
Show simulation waveforms.
.TP
.B -f, --flat_netlist
Set flat netlist (for spice format only).
.TP
.B -r, --no_readline
Start without the tclreadline package ( this is necessary if stdin and stdout are to be redirected for example to /dev/null).
.TP
.B -c, --color_ps
Set color postscript.
.TP
.B --plotfile <file>
Use <file> as output for plot export (png, svg, postscript/pdf)
.TP
.B --rcfile <file>
Use <file> as a rc file for startup instead of the default xschemrc.
.TP
.B -p, --postscript, --pdf
Export pdf schematic.
.TP
.B --png
Export png schematic.
.TP
.B --svg
Export svg schematic.
.TP
.B -q, --quit
Quit after doing things (no interactive mode).
.TP
.B -l file, --log file
Set a log file.
.TP
.B -d n, --debug n
Set debug level: 1, 2, 3,...: C program debug, -1, -2, -3...: TCL frontend debug.
.SH FILES
.TP
.B /usr/local/share/xschem/xschemrc
default configuration.
.TP
.B ~/.xschem/xschemrc
user configuration; if exists overrides settings from default configuration;
may be partial: settings not overridden will remain as set from the system
config.
.TP
.B ./xschemrc
local/per-project configuration; if exists overrides settings from
the user configuration and default configuration.
.TP
.B /usr/local/share/xschem/systemlib
builtin essentials, such as font and missing symbol graphics.
.TP
.B /usr/local/share/xschem/utile
TODO.
.TP

237
scconfig/config.cache Normal file
View File

@ -0,0 +1,237 @@
/tmpasm/IFS=" \t\r\n"
/runtime/libs/gui/xopendisplay/Lflags=
/runtime/cc/cc=gcc
/runtime/sys/ext_stalib=.a
/runtime/sys/ext_dynlib=.so
/runtime/libs/io/dup2/includes=
/runtime/libs/gui/cairo-xcb/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/runtime/libs/gui/cairo-xcb/presents=true
/runtime/parsgen/flex=flex
/runtime/sys/system_name=GNU/Linux
/runtime/libs/gui/xopendisplay/includes=
/runtime/libs/gui/xgetxcbconnection/presents=true
/runtime/sys/path_sep_escaped=/
/runtime/sys/cross=false
/runtime/libs/gui/cairo/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/runtime/sys/shell_eats_backslash=true
/runtime/sys/ext_exe=
/runtime/libs/script/tk/includes=
/runtime/libs/io/popen/presents=true
/runtime/sys/ext_dynlib_native=.so
/runtime/libs/gui/cairo/ldflags=-lcairo
/runtime/libs/gui/xcb_render/includes=
/runtime/parsgen/flex/presents=true
/runtime/parsgen/bison=bison
/runtime/libs/gui/cairo/includes=
/runtime/sys/uname=Linux MSI 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
/runtime/sys/class=UNIX
/runtime/cc/cflags= -pipe -O2
/runtime/libs/script/tcl/includes=
/runtime/libs/gui/xpm/includes=
/runtime/libs/gui/xpm/ldflags=-lX11 -lXpm
/runtime/libs/gui/cairo-xcb/ldflags=-lcairo
/runtime/libs/gui/xcb_render/ldflags=-lX11 -lxcb-render
/runtime/libs/io/dup2/presents=true
/runtime/sys/shell_needs_quote=true
/runtime/libs/gui/xpm/cflags=
/runtime/libs/gui/xopendisplay/cflags=
/runtime/libs/gui/xopendisplay/presents=true
/runtime/fstools/awk=awk
/runtime/sys/tmp=/home/rafmag/xschem/scconfig/
/runtime/libs/script/tk/presents=true
/runtime/sys/machine_name=x86_64
/runtime/libs/gui/xcb_render/cflags=
/runtime/libs/script/tcl/ldflags=-ltcl8.6
/runtime/libs/gui/xcb_render/presents=true
/runtime/libs/gui/xcb/includes=
/runtime/libs/gui/xcb/ldflags=-lX11 -lxcb
/runtime/cc/fpic=-fPIC
/runtime/libs/gui/cairo/presents=true
/runtime/sys/path_sep=/
/runtime/libs/script/tcl/presents=true
/runtime/libs/gui/xpm/presents=true
/runtime/libs/gui/xcb/cflags=
/runtime/libs/gui/cairo-xcb/includes=#include <cairo-xcb.h>\n
/runtime/cc/ldflags=
/runtime/sys/shell_escape_char=\
/runtime/sys/emu=
/runtime/libs/gui/xgetxcbconnection/includes=
/runtime/libs/gui/xopendisplay/ldflags=-lX11
/runtime/libs/script/tk/cflags=-I/usr/include/tcl8.6
/runtime/libs/gui/xgetxcbconnection/ldflags=-lX11 -lX11-xcb
/runtime/libs/io/popen/includes=#define _XOPEN_SOURCE\n
/runtime/libs/io/popen/ldflags=
/runtime/sys/name=Linux
/runtime/libs/gui/xgetxcbconnection/cflags=
/runtime/libs/io/dup2/cflags=
/runtime/parsgen/bison/presents=true
/runtime/libs/script/tcl/cflags=-I/usr/include/tcl8.6
/runtime/sys/cross_blind=false
/runtime/libs/io/popen/cflags=
/runtime/sys/shell=/bin/sh -c
/runtime/libs/io/dup2/ldflags=
/runtime/libs/script/tk/ldflags=-ltcl8.6 -ltk8.6
/runtime/libs/gui/xcb/presents=true
/target/libs/gui/xopendisplay/Lflags=
/target/cc/cc=gcc
/target/sys/ext_stalib=.a
/target/sys/ext_dynlib=.so
/target/libs/io/dup2/includes=
/target/libs/gui/cairo-xcb/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/target/libs/gui/cairo-xcb/presents=true
/target/parsgen/flex=flex
/target/sys/system_name=GNU/Linux
/target/libs/gui/xopendisplay/includes=
/target/libs/gui/xgetxcbconnection/presents=true
/target/sys/path_sep_escaped=/
/target/sys/cross=false
/target/libs/gui/cairo/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/target/sys/shell_eats_backslash=true
/target/sys/ext_exe=
/target/libs/script/tk/includes=
/target/libs/io/popen/presents=true
/target/sys/ext_dynlib_native=.so
/target/libs/gui/cairo/ldflags=-lcairo
/target/libs/gui/xcb_render/includes=
/target/parsgen/flex/presents=true
/target/parsgen/bison=bison
/target/libs/gui/cairo/includes=
/target/sys/uname=Linux MSI 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
/target/sys/class=UNIX
/target/cc/cflags= -pipe -O2
/target/libs/script/tcl/includes=
/target/libs/gui/xpm/includes=
/target/libs/gui/xpm/ldflags=-lX11 -lXpm
/target/libs/gui/cairo-xcb/ldflags=-lcairo
/target/libs/gui/xcb_render/ldflags=-lX11 -lxcb-render
/target/libs/io/dup2/presents=true
/target/sys/shell_needs_quote=true
/target/libs/gui/xpm/cflags=
/target/libs/gui/xopendisplay/cflags=
/target/libs/gui/xopendisplay/presents=true
/target/fstools/awk=awk
/target/sys/tmp=/home/rafmag/xschem/scconfig/
/target/libs/script/tk/presents=true
/target/sys/machine_name=x86_64
/target/libs/gui/xcb_render/cflags=
/target/libs/script/tcl/ldflags=-ltcl8.6
/target/libs/gui/xcb_render/presents=true
/target/libs/gui/xcb/includes=
/target/libs/gui/xcb/ldflags=-lX11 -lxcb
/target/cc/fpic=-fPIC
/target/libs/gui/cairo/presents=true
/target/sys/path_sep=/
/target/libs/script/tcl/presents=true
/target/libs/gui/xpm/presents=true
/target/libs/gui/xcb/cflags=
/target/libs/gui/cairo-xcb/includes=#include <cairo-xcb.h>\n
/target/cc/ldflags=
/target/sys/shell_escape_char=\
/target/sys/emu=
/target/libs/gui/xgetxcbconnection/includes=
/target/libs/gui/xopendisplay/ldflags=-lX11
/target/libs/script/tk/cflags=-I/usr/include/tcl8.6
/target/libs/gui/xgetxcbconnection/ldflags=-lX11 -lX11-xcb
/target/libs/io/popen/includes=#define _XOPEN_SOURCE\n
/target/libs/io/popen/ldflags=
/target/sys/name=Linux
/target/libs/gui/xgetxcbconnection/cflags=
/target/libs/io/dup2/cflags=
/target/parsgen/bison/presents=true
/target/libs/script/tcl/cflags=-I/usr/include/tcl8.6
/target/sys/cross_blind=false
/target/libs/io/popen/cflags=
/target/sys/shell=/bin/sh -c
/target/libs/io/dup2/ldflags=
/target/libs/script/tk/ldflags=-ltcl8.6 -ltk8.6
/target/libs/gui/xcb/presents=true
/local/xschem/user-lib-path=~/.xschem/xschem_library
/local/global_cflags=-fPIC
/local/xschem/profile=false
/local/xschem/includes="#define _XOPEN_SOURCE\n"
/local/install_shares="\n keys.help xschem.help xschem.tcl break.awk convert_to_verilog2001.awk\n flatten.awk flatten_tedax.awk flatten_savenodes.awk make_sym.awk make_sym_lcc.awk\n symgen.awk order_labels.awk sort_labels.awk spice.awk tedax.awk verilog.awk\n vhdl.awk hspice_backannotate.tcl add_custom_menu.tcl\n add_custom_button.tcl change_index.tcl icon.xpm resources.tcl xschemrc\n ngspice_backannotate.tcl gschemtoxschem.awk traversal.tcl\n"
/local/xschem/xschem-lib-path=~/.xschem/xschem_library:/usr/local/share/xschem/xschem_library/devices:/usr/local/share/doc/xschem/examples:/usr/local/share/doc/xschem/ngspice:/usr/local/share/doc/xschem/logic:/usr/local/share/doc/xschem/xschem_simulator:/usr/local/share/doc/xschem/generators:/usr/local/share/doc/xschem/binto7seg:/usr/local/share/doc/xschem/pcb:/usr/local/share/doc/xschem/rom8k
/local/xschem/debug=false
/local/obj= icon.o callback.o actions.o move.o check.o clip.o draw.o globals.o main.o netlist.o hash_iterator.o findnet.o scheduler.o store.o xinit.o select.o font.o editprop.o save.o paste.o token.o psprint.o node_hash.o hilight.o options.o vhdl_netlist.o svgdraw.o spice_netlist.o tedax_netlist.o verilog_netlist.o parselabel.o expandlabel.o in_memory_undo.o cairo_jpg.o
/local/src="\n icon.c callback.c actions.c move.c check.c clip.c draw.c globals.c\n main.c netlist.c hash_iterator.c findnet.c scheduler.c store.c xinit.c\n select.c font.c editprop.c save.c paste.c token.c psprint.c node_hash.c\n hilight.c options.c vhdl_netlist.c svgdraw.c spice_netlist.c\n tedax_netlist.c verilog_netlist.c parselabel.c expandlabel.c\n in_memory_undo.c cairo_jpg.c\n"
/local/xschem/ldflags=-lm -lcairo -lX11 -lxcb -lxcb-render -lX11-xcb -lXpm -ltcl8.6 -ltk8.6
/local/xschem/sys-lib-path=/usr/local/share/xschem/xschem_library/devices
/local/xschem/cflags=-pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/tcl8.6
/local/xschem/symbols=false
/local/xschem/prefix=/usr/local
/local/xschem/user-conf-dir=~/.xschem
/local/n=traversal.tcl
/local/o=cairo_jpg.o
/host/libs/gui/xopendisplay/Lflags=
/host/cc/cc=gcc
/host/sys/ext_stalib=.a
/host/sys/ext_dynlib=.so
/host/libs/io/dup2/includes=
/host/libs/gui/cairo-xcb/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/host/libs/gui/cairo-xcb/presents=true
/host/parsgen/flex=flex
/host/sys/system_name=GNU/Linux
/host/libs/gui/xopendisplay/includes=
/host/libs/gui/xgetxcbconnection/presents=true
/host/sys/path_sep_escaped=/
/host/sys/cross=false
/host/libs/gui/cairo/cflags=-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
/host/sys/shell_eats_backslash=true
/host/sys/ext_exe=
/host/libs/script/tk/includes=
/host/libs/io/popen/presents=true
/host/sys/ext_dynlib_native=.so
/host/libs/gui/cairo/ldflags=-lcairo
/host/libs/gui/xcb_render/includes=
/host/parsgen/flex/presents=true
/host/parsgen/bison=bison
/host/libs/gui/cairo/includes=
/host/sys/uname=Linux MSI 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
/host/sys/class=UNIX
/host/cc/cflags= -pipe -O2
/host/libs/script/tcl/includes=
/host/libs/gui/xpm/includes=
/host/libs/gui/xpm/ldflags=-lX11 -lXpm
/host/libs/gui/cairo-xcb/ldflags=-lcairo
/host/libs/gui/xcb_render/ldflags=-lX11 -lxcb-render
/host/libs/io/dup2/presents=true
/host/sys/shell_needs_quote=true
/host/libs/gui/xpm/cflags=
/host/libs/gui/xopendisplay/cflags=
/host/libs/gui/xopendisplay/presents=true
/host/fstools/awk=awk
/host/sys/tmp=/home/rafmag/xschem/scconfig/
/host/libs/script/tk/presents=true
/host/sys/machine_name=x86_64
/host/libs/gui/xcb_render/cflags=
/host/libs/script/tcl/ldflags=-ltcl8.6
/host/libs/gui/xcb_render/presents=true
/host/libs/gui/xcb/includes=
/host/libs/gui/xcb/ldflags=-lX11 -lxcb
/host/cc/fpic=-fPIC
/host/libs/gui/cairo/presents=true
/host/sys/path_sep=/
/host/libs/script/tcl/presents=true
/host/libs/gui/xpm/presents=true
/host/libs/gui/xcb/cflags=
/host/libs/gui/cairo-xcb/includes=#include <cairo-xcb.h>\n
/host/cc/ldflags=
/host/sys/shell_escape_char=\
/host/sys/emu=
/host/libs/gui/xgetxcbconnection/includes=
/host/libs/gui/xopendisplay/ldflags=-lX11
/host/libs/script/tk/cflags=-I/usr/include/tcl8.6
/host/libs/gui/xgetxcbconnection/ldflags=-lX11 -lX11-xcb
/host/libs/io/popen/includes=#define _XOPEN_SOURCE\n
/host/libs/io/popen/ldflags=
/host/sys/name=Linux
/host/libs/gui/xgetxcbconnection/cflags=
/host/libs/io/dup2/cflags=
/host/parsgen/bison/presents=true
/host/libs/script/tcl/cflags=-I/usr/include/tcl8.6
/host/sys/cross_blind=false
/host/libs/io/popen/cflags=
/host/sys/shell=/bin/sh -c
/host/libs/io/dup2/ldflags=
/host/libs/script/tk/ldflags=-ltcl8.6 -ltk8.6
/host/libs/gui/xcb/presents=true

321
scconfig/config.log Normal file
View File

@ -0,0 +1,321 @@
CLI arg 0: './configure'
(Required node: 'sys/name')
(Required node: 'sys/tmp')
(Required node: 'sys/shell')
###report### Looking for a shell... finding a shell
testing '/bin/sh -c' as shell
run: ' /bin/sh -c echo hello >scc_30886 2>>scc_89383.out'
========= empty stderr =================
run result: 0
stdout: '
'
refused.
testing '/bin/sh -c' as shell
run: ' /bin/sh -c "echo hello" >scc_36915 2>>scc_92777.out'
========= empty stderr =================
run result: 0
stdout: 'hello
'
accepted.
###report### /bin/sh -c
found a shell '/bin/sh -c', need quote: true
###report### Looking for a shell escape character... finding shell escape character...
run: ' echo \\\ \{\}\&\;\| >scc_38335 2>>scc_47793.out'
========= empty stderr =================
run result: 0
stdout: '\ {}&;|
'
###report### found: '\'
found shell escape char '\'
###report### Detecting temp dir... Finding temp dir (current working directory)...
testing if shell eats \...
run: ' /bin/sh -c "echo c:\n" >scc_60492 2>>scc_85386.out'
========= empty stderr =================
run result: 0
stdout: 'c:n
'
shell eats \...
run: ' /bin/sh -c "pwd" >scc_41421 2>>scc_16649.out'
========= empty stderr =================
run result: 0
stdout: '/home/rafmag/xschem/scconfig
'
cwd is '/home/rafmag/xschem/scconfig/'
trying detected temp dir '/home/rafmag/xschem/scconfig/'
validating temp dir '/home/rafmag/xschem/scconfig/'
temp dir works!
###report### validated /home/rafmag/xschem/scconfig/
Detected temp dir '/home/rafmag/xschem/scconfig/'
Path sep: '/'
###report### Checking for system type... [find_uname] checking for sys/name
not set, running
run: ' /bin/sh -c "uname -a" >/home/rafmag/xschem/scconfig/scc_68690 2>>/home/rafmag/xschem/scconfig/scc_90027.out'
========= empty stderr =================
run result: 0
stdout: 'Linux MSI 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
'
run: ' /bin/sh -c "uname -m" >/home/rafmag/xschem/scconfig/scc_97763 2>>/home/rafmag/xschem/scconfig/scc_20059.out'
========= empty stderr =================
run result: 0
stdout: 'x86_64
'
run: ' /bin/sh -c "uname -o" >/home/rafmag/xschem/scconfig/scc_80540 2>>/home/rafmag/xschem/scconfig/scc_13926.out'
========= empty stderr =================
run result: 0
stdout: 'GNU/Linux
'
###report### OK (name: Linux; class: UNIX)
(Required node: 'cc/fpic')
(Required node: 'cc/cc')
###report### Checking for cc (target)... find_cc: trying to find cc (target)...
find_cc: Detecting cc (host)
trying cc:try_flags with cc='gcc' cflags='' ldflags=''
compile: '/bin/sh -c "gcc /home/rafmag/xschem/scconfig/scc_83426.c -o /home/rafmag/xschem/scconfig/scc_55736 2>&1" >/home/rafmag/xschem/scconfig/scc_89172.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_55736 >/home/rafmag/xschem/scconfig/scc_95368 2>>/home/rafmag/xschem/scconfig/scc_5211.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
find_cc: Detecting -pipe
compile: '/bin/sh -c "gcc -pipe /home/rafmag/xschem/scconfig/scc_2567.c -o /home/rafmag/xschem/scconfig/scc_65782 2>&1" >/home/rafmag/xschem/scconfig/scc_56429.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_65782 >/home/rafmag/xschem/scconfig/scc_22862 2>>/home/rafmag/xschem/scconfig/scc_21530.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
find_cc: final test on cc and all flags
compile: '/bin/sh -c "gcc -pipe /home/rafmag/xschem/scconfig/scc_65123.c -o /home/rafmag/xschem/scconfig/scc_3135 2>&1" >/home/rafmag/xschem/scconfig/scc_74067.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_3135 >/home/rafmag/xschem/scconfig/scc_79802 2>>/home/rafmag/xschem/scconfig/scc_13929.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('gcc', ' -pipe', '')
find_cc: conclusion: cc='gcc' cflags=' -pipe' ldflags=''
###report### Checking for -fpic... find_fpic: trying to find -fpic...
trying cc:try_flags with cc='gcc' cflags='' ldflags='-fPIC'
compile: '/bin/sh -c "gcc -pipe /home/rafmag/xschem/scconfig/scc_34022.c -fPIC -o /home/rafmag/xschem/scconfig/scc_33069 2>&1" >/home/rafmag/xschem/scconfig/scc_23058.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_33069 >/home/rafmag/xschem/scconfig/scc_61393 2>>/home/rafmag/xschem/scconfig/scc_98167.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK (-fPIC)
(Required node: 'libs/io/popen/*')
###report### Checking for popen(3)... find_io_popen: trying to find popen(3)...
trying '#define _XOPEN_SOURCE' and '' and '', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_18456.c -o /home/rafmag/xschem/scconfig/scc_78042 2>&1" >/home/rafmag/xschem/scconfig/scc_75011.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_78042 >/home/rafmag/xschem/scconfig/scc_77373 2>>/home/rafmag/xschem/scconfig/scc_76229.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('#define _XOPEN_SOURCE\n', '' and '')
(Required node: 'libs/io/dup2/*')
###report### Checking for dup2(2)... find_io_dup2: trying to find dup2(2)...
trying '' and '' and '', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_84421.c -o /home/rafmag/xschem/scconfig/scc_13784 2>&1" >/home/rafmag/xschem/scconfig/scc_44919.out'
========= output dump start ============
/home/rafmag/xschem/scconfig/scc_84421.c: In function main:
/home/rafmag/xschem/scconfig/scc_84421.c:6:17: warning: ignoring return value of write declared with attribute warn_unused_result [-Wunused-result]
6 | write(4, "OK\n", 3);
| ^~~~~~~~~~~~~~~~~~~
========= output dump end ==============
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_13784 >/home/rafmag/xschem/scconfig/scc_75198 2>>/home/rafmag/xschem/scconfig/scc_98537.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '' and '')
(Required node: 'parsgen/flex/presents')
###report### Checking for flex... find_flex: trying to find flex...
run: ' flex /home/rafmag/xschem/scconfig/scc_94324.lex >/home/rafmag/xschem/scconfig/scc_64370 2>>/home/rafmag/xschem/scconfig/scc_98315.out'
========= empty stderr =================
run result: 0
stdout: ''
###report### Found.
(Required node: 'parsgen/bison/presents')
###report### Checking for bison... find_bison: trying to find bison...
run: ' bison /home/rafmag/xschem/scconfig/scc_66413.y >/home/rafmag/xschem/scconfig/scc_76091 2>>/home/rafmag/xschem/scconfig/scc_3526.out'
========= empty stderr =================
run result: 0
stdout: ''
###report### Found.
(Required node: 'libs/script/tk/*')
(Required node: 'libs/gui/xopendisplay/cflags')
###report### Checking for XOpenDisplay... find_xopendisplay:
trying '' and '' and '-lX11', with no run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_68980.c -lX11 -o /home/rafmag/xschem/scconfig/scc_41873 2>&1" >/home/rafmag/xschem/scconfig/scc_59956.out'
========= empty stderr =================
compile result: 0
###report### OK ('', '' and '-lX11')
###report### Checking for tk... find_tk: trying to find tk...
###report### 8.6... trying '' and '' and '-ltcl86', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_6862.c -ltcl86 -o /home/rafmag/xschem/scconfig/scc_6996 2>&1" >/home/rafmag/xschem/scconfig/scc_99170.out'
========= output dump start ============
/home/rafmag/xschem/scconfig/scc_6862.c:3:10: fatal error: tcl.h: No such file or directory
3 | #include <tcl.h>
| ^~~~~~~
compilation terminated.
========= output dump end ==============
compile result: 256
trying '' and '' and '-ltcl8.6', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_97281.c -ltcl8.6 -o /home/rafmag/xschem/scconfig/scc_20925 2>&1" >/home/rafmag/xschem/scconfig/scc_2305.out'
========= output dump start ============
/home/rafmag/xschem/scconfig/scc_97281.c:3:10: fatal error: tcl.h: No such file or directory
3 | #include <tcl.h>
| ^~~~~~~
compilation terminated.
========= output dump end ==============
compile result: 256
trying '' and '-I/usr/include/tcl86' and '-ltcl86', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/tcl86 /home/rafmag/xschem/scconfig/scc_77084.c -ltcl86 -o /home/rafmag/xschem/scconfig/scc_60336 2>&1" >/home/rafmag/xschem/scconfig/scc_36327.out'
========= output dump start ============
/home/rafmag/xschem/scconfig/scc_77084.c:3:10: fatal error: tcl.h: No such file or directory
3 | #include <tcl.h>
| ^~~~~~~
compilation terminated.
========= output dump end ==============
compile result: 256
trying '' and '-I/usr/include/tcl8.6' and '-ltcl8.6', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/tcl8.6 /home/rafmag/xschem/scconfig/scc_26505.c -ltcl8.6 -o /home/rafmag/xschem/scconfig/scc_21729 2>&1" >/home/rafmag/xschem/scconfig/scc_50846.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_21729 >/home/rafmag/xschem/scconfig/scc_25857 2>>/home/rafmag/xschem/scconfig/scc_61313.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '-I/usr/include/tcl8.6' and '-ltcl8.6')
trying '' and '-I/usr/include/tcl8.6 ' and '-ltcl8.6 -ltk86', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/tcl8.6 /home/rafmag/xschem/scconfig/scc_16124.c -ltcl8.6 -ltk86 -o /home/rafmag/xschem/scconfig/scc_19582 2>&1" >/home/rafmag/xschem/scconfig/scc_53895.out'
========= output dump start ============
/usr/bin/ld: cannot find -ltk86
collect2: error: ld returned 1 exit status
========= output dump end ==============
compile result: 256
trying '' and '-I/usr/include/tcl8.6 ' and '-ltcl8.6 -ltk8.6', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/tcl8.6 /home/rafmag/xschem/scconfig/scc_545.c -ltcl8.6 -ltk8.6 -o /home/rafmag/xschem/scconfig/scc_33367 2>&1" >/home/rafmag/xschem/scconfig/scc_98814.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_33367 >/home/rafmag/xschem/scconfig/scc_90364 2>>/home/rafmag/xschem/scconfig/scc_15434.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '-I/usr/include/tcl8.6 ' and '-ltcl8.6 -ltk8.6')
(Required node: 'fstools/awk')
###report### Checking for awk... find_fstools_awk: trying to find awk...
trying 'awk'
run: ' /bin/sh -c "awk -v "t=blobb" -f /home/rafmag/xschem/scconfig/scc_44043.awk" >/home/rafmag/xschem/scconfig/scc_71087 2>>/home/rafmag/xschem/scconfig/scc_13750.out'
========= empty stderr =================
run result: 0
stdout: 'BloBB
'
###report### OK (awk)
(Required node: 'libs/gui/xpm/*')
###report### Checking for xpm... find_xpm:
trying '' and '' and '-lX11 -lXpm', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_26808.c -lX11 -lXpm -o /home/rafmag/xschem/scconfig/scc_47178 2>&1" >/home/rafmag/xschem/scconfig/scc_17276.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_47178 >/home/rafmag/xschem/scconfig/scc_93584 2>>/home/rafmag/xschem/scconfig/scc_95788.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '' and '-lX11 -lXpm')
(Required node: 'libs/gui/cairo/*')
###report### Checking for cairo... find_cairo: running pkg-config...
run: ' pkg-config --cflags cairo >/home/rafmag/xschem/scconfig/scc_2651 2>>/home/rafmag/xschem/scconfig/scc_5403.out'
========= empty stderr =================
run result: 0
stdout: '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
'
run: ' pkg-config --libs cairo >/home/rafmag/xschem/scconfig/scc_12399 2>>/home/rafmag/xschem/scconfig/scc_92754.out'
========= empty stderr =================
run result: 0
stdout: '-lcairo
'
trying '' and '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 /home/rafmag/xschem/scconfig/scc_99932.c -lcairo -o /home/rafmag/xschem/scconfig/scc_49676 2>&1" >/home/rafmag/xschem/scconfig/scc_95060.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_49676 >/home/rafmag/xschem/scconfig/scc_47739 2>>/home/rafmag/xschem/scconfig/scc_93368.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
(Required node: 'libs/gui/cairo-xcb/*')
(Required node: 'libs/gui/cairo')
###report### Checking for cairo... find_cairo: running pkg-config...
run: ' pkg-config --cflags cairo >/home/rafmag/xschem/scconfig/scc_36226 2>>/home/rafmag/xschem/scconfig/scc_10012.out'
========= empty stderr =================
run result: 0
stdout: '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16
'
run: ' pkg-config --libs cairo >/home/rafmag/xschem/scconfig/scc_48094 2>>/home/rafmag/xschem/scconfig/scc_98586.out'
========= empty stderr =================
run result: 0
stdout: '-lcairo
'
trying '' and '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 /home/rafmag/xschem/scconfig/scc_97539.c -lcairo -o /home/rafmag/xschem/scconfig/scc_80570 2>&1" >/home/rafmag/xschem/scconfig/scc_40795.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_80570 >/home/rafmag/xschem/scconfig/scc_60378 2>>/home/rafmag/xschem/scconfig/scc_51434.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
###report### Checking for cairo-xcb... find_cairo-xcb:
trying '#include <cairo-xcb.h>' and '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo', with a run
compile: '/bin/sh -c "gcc -pipe -O2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 /home/rafmag/xschem/scconfig/scc_97467.c -lcairo -o /home/rafmag/xschem/scconfig/scc_10097 2>&1" >/home/rafmag/xschem/scconfig/scc_66601.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_10097 >/home/rafmag/xschem/scconfig/scc_73317 2>>/home/rafmag/xschem/scconfig/scc_12902.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('#include <cairo-xcb.h>\n', '-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16' and '-lcairo')
(Required node: 'libs/gui/xcb/*')
###report### Checking for xcb... find_xcb:
trying '' and '' and '-lX11 -lxcb', with a run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_70492.c -lX11 -lxcb -o /home/rafmag/xschem/scconfig/scc_60756 2>&1" >/home/rafmag/xschem/scconfig/scc_26652.out'
========= empty stderr =================
compile result: 0
run: ' /home/rafmag/xschem/scconfig/scc_60756 >/home/rafmag/xschem/scconfig/scc_60280 2>>/home/rafmag/xschem/scconfig/scc_97301.out'
========= empty stderr =================
run result: 0
stdout: 'OK
'
###report### OK ('', '' and '-lX11 -lxcb')
(Required node: 'libs/gui/xgetxcbconnection/*')
###report### Checking for xgetxcbconnection... find_xgetxcbconnection:
trying '' and '' and '-lX11 -lX11-xcb', with no run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_24286.c -lX11 -lX11-xcb -o /home/rafmag/xschem/scconfig/scc_53865 2>&1" >/home/rafmag/xschem/scconfig/scc_9441.out'
========= empty stderr =================
compile result: 0
###report### OK ('', '' and '-lX11 -lX11-xcb')
(Required node: 'libs/gui/xcb_render/*')
###report### Checking for xcb_render... find_xcb_render:
trying '' and '' and '-lX11 -lxcb-render', with no run
compile: '/bin/sh -c "gcc -pipe -O2 /home/rafmag/xschem/scconfig/scc_29689.c -lX11 -lxcb-render -o /home/rafmag/xschem/scconfig/scc_46619 2>&1" >/home/rafmag/xschem/scconfig/scc_28444.out'
========= empty stderr =================
compile result: 0
###report### OK ('', '' and '-lX11 -lxcb-render')

BIN
scconfig/configure vendored Executable file

Binary file not shown.

BIN
scconfig/sccbox Executable file

Binary file not shown.

210
src/Makefile Normal file
View File

@ -0,0 +1,210 @@
###############################################################
# Generated by scconfig - DO NOT EDIT - will be overwritten #
# Source: Makefile.in; to regenerate run ./configure #
###############################################################
ROOT = ..
OBJ = icon.o callback.o actions.o move.o check.o clip.o draw.o globals.o main.o netlist.o hash_iterator.o findnet.o scheduler.o store.o xinit.o select.o font.o editprop.o save.o paste.o token.o psprint.o node_hash.o hilight.o options.o vhdl_netlist.o svgdraw.o spice_netlist.o tedax_netlist.o verilog_netlist.o parselabel.o expandlabel.o in_memory_undo.o cairo_jpg.o
all: xschem rawtovcd
include $(ROOT)/Makefile.conf
rawtovcd: rawtovcd.o
$(CC) -o rawtovcd rawtovcd.o -lm
xschem: $(OBJ)
$(CC) -o xschem $(OBJ) $(LDFLAGS) -ljpeg
parselabel.c: parselabel.l expandlabel.h
flex -l -oparselabel.c parselabel.l
expandlabel.c expandlabel.h: expandlabel.y
bison -d -o expandlabel.c expandlabel.y
parselabel.o: expandlabel.h
$(OBJ): xschem.h ../config.h Makefile
clean: FORCE
rm -rf rawtovcd xschem *.o expandlabel.[ch] parselabel.c
# Explicit rule for each object:
icon.o: icon.c
$(CC) -c $(CFLAGS) -o icon.o icon.c
callback.o: callback.c
$(CC) -c $(CFLAGS) -o callback.o callback.c
actions.o: actions.c
$(CC) -c $(CFLAGS) -o actions.o actions.c
move.o: move.c
$(CC) -c $(CFLAGS) -o move.o move.c
check.o: check.c
$(CC) -c $(CFLAGS) -o check.o check.c
clip.o: clip.c
$(CC) -c $(CFLAGS) -o clip.o clip.c
draw.o: draw.c
$(CC) -c $(CFLAGS) -o draw.o draw.c
globals.o: globals.c
$(CC) -c $(CFLAGS) -o globals.o globals.c
main.o: main.c
$(CC) -c $(CFLAGS) -o main.o main.c
netlist.o: netlist.c
$(CC) -c $(CFLAGS) -o netlist.o netlist.c
hash_iterator.o: hash_iterator.c
$(CC) -c $(CFLAGS) -o hash_iterator.o hash_iterator.c
findnet.o: findnet.c
$(CC) -c $(CFLAGS) -o findnet.o findnet.c
scheduler.o: scheduler.c
$(CC) -c $(CFLAGS) -o scheduler.o scheduler.c
store.o: store.c
$(CC) -c $(CFLAGS) -o store.o store.c
xinit.o: xinit.c
$(CC) -c $(CFLAGS) -o xinit.o xinit.c
select.o: select.c
$(CC) -c $(CFLAGS) -o select.o select.c
font.o: font.c
$(CC) -c $(CFLAGS) -o font.o font.c
editprop.o: editprop.c
$(CC) -c $(CFLAGS) -o editprop.o editprop.c
save.o: save.c
$(CC) -c $(CFLAGS) -o save.o save.c
paste.o: paste.c
$(CC) -c $(CFLAGS) -o paste.o paste.c
token.o: token.c
$(CC) -c $(CFLAGS) -o token.o token.c
psprint.o: psprint.c
$(CC) -c $(CFLAGS) -o psprint.o psprint.c
node_hash.o: node_hash.c
$(CC) -c $(CFLAGS) -o node_hash.o node_hash.c
hilight.o: hilight.c
$(CC) -c $(CFLAGS) -o hilight.o hilight.c
options.o: options.c
$(CC) -c $(CFLAGS) -o options.o options.c
vhdl_netlist.o: vhdl_netlist.c
$(CC) -c $(CFLAGS) -o vhdl_netlist.o vhdl_netlist.c
svgdraw.o: svgdraw.c
$(CC) -c $(CFLAGS) -o svgdraw.o svgdraw.c
spice_netlist.o: spice_netlist.c
$(CC) -c $(CFLAGS) -o spice_netlist.o spice_netlist.c
tedax_netlist.o: tedax_netlist.c
$(CC) -c $(CFLAGS) -o tedax_netlist.o tedax_netlist.c
verilog_netlist.o: verilog_netlist.c
$(CC) -c $(CFLAGS) -o verilog_netlist.o verilog_netlist.c
parselabel.o: parselabel.c
$(CC) -c $(CFLAGS) -o parselabel.o parselabel.c
expandlabel.o: expandlabel.c
$(CC) -c $(CFLAGS) -o expandlabel.o expandlabel.c
in_memory_undo.o: in_memory_undo.c
$(CC) -c $(CFLAGS) -o in_memory_undo.o in_memory_undo.c
cairo_jpg.o: cairo_jpg.c
$(CC) -c $(CFLAGS) -o cairo_jpg.o cairo_jpg.c
rawtovcd.o: rawtovcd.c
$(CC) -c $(CFLAGS) -o rawtovcd.o rawtovcd.c
install: xschem rawtovcd FORCE
$(SCCBOX) mkdir -p "$(BINDIR)"
$(SCCBOX) mkdir -p "$(XSHAREDIR)"
$(SCCBOX) install -f xschem "$(BINDIR)"/xschem
$(SCCBOX) install -f rawtovcd "$(BINDIR)"/rawtovcd
$(SCCBOX) install -f -d systemlib/* "$(XSHAREDIR)"/systemlib
$(SCCBOX) install -f keys.help "$(XSHAREDIR)"/keys.help
$(SCCBOX) install -f xschem.help "$(XSHAREDIR)"/xschem.help
$(SCCBOX) install -f xschem.tcl "$(XSHAREDIR)"/xschem.tcl
$(SCCBOX) install -f break.awk "$(XSHAREDIR)"/break.awk
$(SCCBOX) install -f convert_to_verilog2001.awk "$(XSHAREDIR)"/convert_to_verilog2001.awk
$(SCCBOX) install -f flatten.awk "$(XSHAREDIR)"/flatten.awk
$(SCCBOX) install -f flatten_tedax.awk "$(XSHAREDIR)"/flatten_tedax.awk
$(SCCBOX) install -f flatten_savenodes.awk "$(XSHAREDIR)"/flatten_savenodes.awk
$(SCCBOX) install -f make_sym.awk "$(XSHAREDIR)"/make_sym.awk
$(SCCBOX) install -f make_sym_lcc.awk "$(XSHAREDIR)"/make_sym_lcc.awk
$(SCCBOX) install -f symgen.awk "$(XSHAREDIR)"/symgen.awk
$(SCCBOX) install -f order_labels.awk "$(XSHAREDIR)"/order_labels.awk
$(SCCBOX) install -f sort_labels.awk "$(XSHAREDIR)"/sort_labels.awk
$(SCCBOX) install -f spice.awk "$(XSHAREDIR)"/spice.awk
$(SCCBOX) install -f tedax.awk "$(XSHAREDIR)"/tedax.awk
$(SCCBOX) install -f verilog.awk "$(XSHAREDIR)"/verilog.awk
$(SCCBOX) install -f vhdl.awk "$(XSHAREDIR)"/vhdl.awk
$(SCCBOX) install -f hspice_backannotate.tcl "$(XSHAREDIR)"/hspice_backannotate.tcl
$(SCCBOX) install -f add_custom_menu.tcl "$(XSHAREDIR)"/add_custom_menu.tcl
$(SCCBOX) install -f add_custom_button.tcl "$(XSHAREDIR)"/add_custom_button.tcl
$(SCCBOX) install -f change_index.tcl "$(XSHAREDIR)"/change_index.tcl
$(SCCBOX) install -f icon.xpm "$(XSHAREDIR)"/icon.xpm
$(SCCBOX) install -f resources.tcl "$(XSHAREDIR)"/resources.tcl
$(SCCBOX) install -f xschemrc "$(XSHAREDIR)"/xschemrc
$(SCCBOX) install -f ngspice_backannotate.tcl "$(XSHAREDIR)"/ngspice_backannotate.tcl
$(SCCBOX) install -f gschemtoxschem.awk "$(XSHAREDIR)"/gschemtoxschem.awk
$(SCCBOX) install -f traversal.tcl "$(XSHAREDIR)"/traversal.tcl
distclean: clean
uninstall: FORCE
$(SCCBOX) rm "$(BINDIR)"/xschem
$(SCCBOX) rm "$(BINDIR)"/rawtovcd
$(SCCBOX) rm "$(XSHAREDIR)"/systemlib/*
$(SCCBOX) rm "$(XSHAREDIR)"/keys.help
$(SCCBOX) rm "$(XSHAREDIR)"/xschem.help
$(SCCBOX) rm "$(XSHAREDIR)"/xschem.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/break.awk
$(SCCBOX) rm "$(XSHAREDIR)"/convert_to_verilog2001.awk
$(SCCBOX) rm "$(XSHAREDIR)"/flatten.awk
$(SCCBOX) rm "$(XSHAREDIR)"/flatten_tedax.awk
$(SCCBOX) rm "$(XSHAREDIR)"/flatten_savenodes.awk
$(SCCBOX) rm "$(XSHAREDIR)"/make_sym.awk
$(SCCBOX) rm "$(XSHAREDIR)"/make_sym_lcc.awk
$(SCCBOX) rm "$(XSHAREDIR)"/symgen.awk
$(SCCBOX) rm "$(XSHAREDIR)"/order_labels.awk
$(SCCBOX) rm "$(XSHAREDIR)"/sort_labels.awk
$(SCCBOX) rm "$(XSHAREDIR)"/spice.awk
$(SCCBOX) rm "$(XSHAREDIR)"/tedax.awk
$(SCCBOX) rm "$(XSHAREDIR)"/verilog.awk
$(SCCBOX) rm "$(XSHAREDIR)"/vhdl.awk
$(SCCBOX) rm "$(XSHAREDIR)"/hspice_backannotate.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/add_custom_menu.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/add_custom_button.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/change_index.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/icon.xpm
$(SCCBOX) rm "$(XSHAREDIR)"/resources.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/xschemrc
$(SCCBOX) rm "$(XSHAREDIR)"/ngspice_backannotate.tcl
$(SCCBOX) rm "$(XSHAREDIR)"/gschemtoxschem.awk
$(SCCBOX) rm "$(XSHAREDIR)"/traversal.tcl
FORCE:

View File

@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://raw.githubusercontent.com/rahra/cairo_jpg/master/src/cairo_jpg.c

View File

@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://raw.githubusercontent.com/rahra/cairo_jpg/master/src/cairo_jpg.h

View File

@ -3215,15 +3215,23 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2
} else { /* resize image to fit in rectangle */
rw = abs((int)(*x2 - *x1));
rh = abs((int)(*y2 - *y1));
scalex = rw/w * xctx->mooz;
scaley = rh/h * xctx->mooz;
if (rot == 1 || rot == 3)
{
scalex = rh/w * xctx->mooz;
scaley = rw/h * xctx->mooz;
}else
{
scalex = rw/w * xctx->mooz;
scaley = rh/h * xctx->mooz;
}
}
if(dr && xctx->draw_pixmap) {
cairo_translate(xctx->cairo_save_ctx, x, y);
if(flip && (rot == 0 || rot == 2)) cairo_scale(xctx->cairo_save_ctx, -scalex, scaley);
else if(flip && (rot == 1 || rot == 3)) cairo_scale(xctx->cairo_save_ctx, scalex, -scaley);
else cairo_scale(xctx->cairo_save_ctx, scalex, scaley);
cairo_rotate(xctx->cairo_save_ctx, rot * XSCH_PI * 0.5);
if(flip && (rot == 0 || rot == 2)) cairo_scale(xctx->cairo_save_ctx, -scalex, scaley);
else if(flip && (rot == 1 || rot == 3)) cairo_scale(xctx->cairo_save_ctx, -scalex, scaley);
else cairo_scale(xctx->cairo_save_ctx, scalex, scaley);
cairo_set_source_surface(xctx->cairo_save_ctx, emb_ptr->image, 0. , 0.);
cairo_rectangle(xctx->cairo_save_ctx, 0, 0, w , h );
/* cairo_fill(xctx->cairo_save_ctx);
@ -3233,10 +3241,10 @@ void draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2
}
if(dr && xctx->draw_window) {
cairo_translate(xctx->cairo_ctx, x, y);
cairo_rotate(xctx->cairo_ctx, rot * XSCH_PI * 0.5);
if(flip && (rot == 0 || rot == 2)) cairo_scale(xctx->cairo_ctx, -scalex, scaley);
else if(flip && (rot == 1 || rot == 3)) cairo_scale(xctx->cairo_ctx, scalex, -scaley);
else cairo_scale(xctx->cairo_ctx, scalex, scaley);
cairo_rotate(xctx->cairo_ctx, rot * XSCH_PI * 0.5);
cairo_set_source_surface(xctx->cairo_ctx, emb_ptr->image, 0. , 0.);
cairo_rectangle(xctx->cairo_ctx, 0, 0, w , h );
/* cairo_fill(xctx->cairo_ctx);

View File

@ -25,7 +25,7 @@
#define Y_TO_PS(y) ( (y+xctx->yorigin)* xctx->mooz )
/* FIXME This must be investigated, without some fflushes the ps file is corrupted */
#define FFLUSH_PS
//#define FFLUSH_PS
#if 0
* /* FIXME: overflow check. Not used, BTW */
@ -135,7 +135,7 @@ unsigned char* bin2hex(const unsigned char* bin, size_t len)
return out;
}
void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2)
void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2, int rot, int flip)
{
int i;
size_t data_size;
@ -188,22 +188,19 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2)
unsigned char png_b = png_data[i + 2];
unsigned char png_a = png_data[i + 3];
double ainv=((double)(0xFF - png_a)) / ((double)(0xFF));
if(invertImage)
{
png_data[i + 0] = (unsigned char)(0xFF-png_r) +
(unsigned char)((double)BG_r * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 1] = (unsigned char)(0xFF-png_g) +
(unsigned char)((double)BG_g * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 2] = (unsigned char)(0xFF-png_b) +
(unsigned char)((double)BG_b * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 3] = (unsigned char)0xFF;
}else {
png_data[i + 0] = png_r +
(unsigned char)((double)BG_r * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 1] = png_g +
(unsigned char)((double)BG_g * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 2] = png_b +
(unsigned char)((double)BG_b * ((double)(0xFF - png_a)) / ((double)(0xFF)));
png_data[i + 0] = (0xFF-png_r) + (unsigned char)((double)BG_r * ainv);
png_data[i + 1] = (0xFF-png_g) + (unsigned char)((double)BG_g * ainv);
png_data[i + 2] = (0xFF-png_b) + (unsigned char)((double)BG_b * ainv);
png_data[i + 3] = 0xFF;
}else
{
png_data[i + 0] = png_r + (unsigned char)((double)BG_r * ainv);
png_data[i + 1] = png_g + (unsigned char)((double)BG_g * ainv);
png_data[i + 2] = png_b + (unsigned char)((double)BG_b * ainv);
png_data[i + 3] = 0xFF;
}
}
@ -221,13 +218,32 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2)
* fclose(fp);
*/
hexEncodedJPG = bin2hex(jpgData, fileSize);
fprintf(fd, "gsave\n");
fprintf(fd, "gsave\n");
fprintf(fd, "%g %g translate\n", X_TO_PS(x1), Y_TO_PS(y1));
fprintf(fd, "%g %g scale\n", X_TO_PS(x2) - X_TO_PS(x1), Y_TO_PS(y2) - Y_TO_PS(y1));
fprintf(fd, "%d\n", png_size_x);
fprintf(fd, "%d\n", png_size_y);
if(rot==1) fprintf(fd, "90 rotate\n");
if(rot==2) fprintf(fd, "180 rotate\n");
if(rot==3) fprintf(fd, "270 rotate\n");
fprintf(fd, "%g %g scale\n", (X_TO_PS(x2) - X_TO_PS(x1))*0.97, (Y_TO_PS(y2) - Y_TO_PS(y1))*0.97);
fprintf(fd, "%g\n", (double)png_size_x);
fprintf(fd, "%g\n", (double)png_size_y);
fprintf(fd, "8\n");
fprintf(fd, "[%d 0 0 %d 0 0]\n", png_size_x, png_size_y);
if(!flip)
{
if(rot==1) fprintf(fd, "[%g 0 0 %g 0 %g]\n", (double)png_size_y, (double)png_size_x, (double)png_size_y);
else if(rot==2) fprintf(fd, "[%g 0 0 %g %g %g]\n", (double)png_size_x, (double)png_size_y, (double)png_size_x, (double)png_size_y);
else if(rot==3) fprintf(fd, "[%g 0 0 %g %g 0]\n", (double)png_size_y, (double)png_size_x, (double)png_size_x);
else fprintf(fd, "[%g 0 0 %g 0 0]\n", (double)png_size_x, (double)png_size_y);
}
else
{
if(rot==1) fprintf(fd, "[%g 0 0 %g %g %g]\n", -(double)png_size_y, (double)png_size_x, (double)png_size_x, (double)png_size_y);
else if(rot==2) fprintf(fd, "[%g 0 0 %g 0 %g]\n", -(double)png_size_x, (double)png_size_y, (double)png_size_y);
else if(rot==3) fprintf(fd, "[%g 0 0 %g 0 0]\n", -(double)png_size_y, (double)png_size_x);
else fprintf(fd, "[%g 0 0 %g %g 0]\n", -(double)png_size_x, (double)png_size_y, (double)png_size_x);
}
fprintf(fd, "(%s)\n", hexEncodedJPG);
fprintf(fd, "/ASCIIHexDecode\n");
fprintf(fd, "filter\n");
@ -238,11 +254,10 @@ void ps_drawPNG(xRect* r, double x1, double y1, double x2, double y2)
fprintf(fd, "3\n");
fprintf(fd, "colorimage\n");
fprintf(fd, "grestore\n");
#ifdef FFLUSH_PS /* FIXME: why is this needed? */
fflush(fd);
#endif
my_free(1663, &hexEncodedJPG);
free(jpgData);
fflush(fd);
}
@ -350,12 +365,11 @@ void ps_embedded_graph(xRect* r, double rx1, double ry1, double rx2, double ry2)
fprintf(fd, "3\n");
fprintf(fd, "colorimage\n");
fprintf(fd, "grestore\n");
#ifdef FFLUSH_PS /* FIXME: why is this needed? */
fflush(fd);
#endif
my_free(1666, &hexEncodedJPG);
free(jpgData);
fflush(fd);
#endif
}
static void set_lw(void)
{
@ -868,7 +882,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
RECTORDER(x1,y1,x2,y2);
if (rect.flags & 1024) /* image */
{
ps_drawPNG(&rect, x0 + x1, y0 + y1, x0 + x2, y0 + y2);
ps_drawPNG(&rect, x0 + x1, y0 + y1, x0 + x2, y0 + y2, rot, flip);
continue;
}
ps_filledrect(layer, x0+x1, y0+y1, x0+x2, y0+y2, rect.dash, rect.fill);
@ -1135,17 +1149,18 @@ void create_ps(char **psfile, int what)
xctx->line[c][i].x2, xctx->line[c][i].y2, xctx->line[c][i].dash);
for(i=0;i<xctx->rects[c];i++)
{
if (c == GRIDLAYER && (xctx->rect[c][i].flags & 1024)) { /* image */
xRect* r = &xctx->rect[c][i];
/* PNG Code Here */
ps_drawPNG(r, r->x1, r->y1, r->x2, r->y2);
xRect* r = &xctx->rect[c][i];
/* PNG Code Here */
ps_drawPNG(r, r->x1, r->y1, r->x2, r->y2,0 ,0);
continue;
}
else if (c == GRIDLAYER && (xctx->rect[c][i].flags & 1)) { /* graph */
xRect* r = &xctx->rect[c][i];
ps_embedded_graph(r, r->x1, r->y1, r->x2, r->y2);
if (c == GRIDLAYER && (xctx->rect[c][i].flags & 1)) { /* graph */
xRect* r = &xctx->rect[c][i];
ps_embedded_graph(r, r->x1, r->y1, r->x2, r->y2);
}
/* else if(c != GRIDLAYER || !(xctx->rect[c][i].flags & 1) ) */
else {
if(c != GRIDLAYER || !(xctx->rect[c][i].flags & 1) ) {
ps_filledrect(c, xctx->rect[c][i].x1, xctx->rect[c][i].y1,
xctx->rect[c][i].x2, xctx->rect[c][i].y2, xctx->rect[c][i].dash, xctx->rect[c][i].fill);
}