ivtools-patch Mailing List for ivtools (Page 2)
Brought to you by:
johnston
You can subscribe to this list here.
1999 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2000 |
Jan
(17) |
Feb
(14) |
Mar
(7) |
Apr
(7) |
May
(20) |
Jun
(18) |
Jul
(5) |
Aug
(9) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
(1) |
2001 |
Jan
(3) |
Feb
(2) |
Mar
(5) |
Apr
(7) |
May
(9) |
Jun
(15) |
Jul
(10) |
Aug
(2) |
Sep
(10) |
Oct
(15) |
Nov
(14) |
Dec
(2) |
2002 |
Jan
(8) |
Feb
(13) |
Mar
(10) |
Apr
(3) |
May
(2) |
Jun
(7) |
Jul
(5) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(10) |
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(3) |
2004 |
Jan
(2) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(4) |
Nov
(1) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ivt...@li...> - 2002-11-02 22:31:22
|
Patch: ivtools-020926-johnston-068 For: ivtools-1.0.6 Author: joh...@us... Subject: migrate glyphs/text-editor to stand-alone ivtext Requires: This is an intermediate patch to ivtools-1.0.6. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - migrate glyphs/text-editor to stand-alone ivtext. - add Quit option under File menu. - first step in adding SVG support to export dialog box Index: glyphs_ivtools/Imakefile diff -c glyphs_ivtools/Imakefile:1.1 glyphs_ivtools/Imakefile:1.2 *** glyphs_ivtools/Imakefile:1.1 Fri Sep 13 09:49:03 2002 --- src/glyphs/Imakefile Thu Sep 26 17:56:19 2002 *************** *** 14,20 **** scrollable \ scrollfield \ strchooser \ - text-editor \ timestamp \ examples3.1 --- 14,19 ---- Index: IVGlyph/exportchooser.c diff -c IVGlyph/exportchooser.c:1.1 IVGlyph/exportchooser.c:1.2 *** IVGlyph/exportchooser.c:1.1 Fri Sep 13 09:48:56 2002 --- src/IVGlyph/exportchooser.c Thu Sep 26 17:56:16 2002 *************** *** 93,98 **** --- 93,104 ---- : false; } + boolean ExportChooser::svg_format() { + return ((ExportChooserImpl*)impl_)->_obse + ? strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "XSVG", 3) == 0 + : false; + } + boolean ExportChooser::execute_flag() { return ((ExportChooserImpl*)impl_)->_execute_flag; } Index: IVGlyph/exportchooser.h diff -c IVGlyph/exportchooser.h:1.1 IVGlyph/exportchooser.h:1.2 *** IVGlyph/exportchooser.h:1.1 Fri Sep 13 09:48:56 2002 --- src/IVGlyph/exportchooser.h Thu Sep 26 17:56:16 2002 *************** *** 55,60 **** --- 55,61 ---- virtual const char* format(); virtual boolean idraw_format(); virtual boolean postscript_format(); + virtual boolean svg_format(); virtual boolean by_pathname_flag(); virtual boolean execute_flag(); virtual boolean by_pathname_flag_button(); Index: IVGlyph/textedit.c diff -c IVGlyph/textedit.c:1.1 IVGlyph/textedit.c:1.2 *** IVGlyph/textedit.c:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textedit.c Thu Sep 26 17:56:16 2002 *************** *** 210,215 **** --- 210,221 ---- te_view_->load_popup(); } + void EivTextEditor::quit() + { + // quit without error check; Bug Alert! + te_view_->quit(); + } + int EivTextEditor::dot() { return te_view_->text_editor()->Dot(); Index: IVGlyph/textedit.h diff -c IVGlyph/textedit.h:1.1 IVGlyph/textedit.h:1.2 *** IVGlyph/textedit.h:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textedit.h Thu Sep 26 17:56:16 2002 *************** *** 52,57 **** --- 52,60 ---- void load_popup(); void save_popup(); + // before quitting invoke save or save-as as needed + void quit(); + // Selections // get dot and mark indices Index: IVGlyph/textview.c diff -c IVGlyph/textview.c:1.1 IVGlyph/textview.c:1.2 *** IVGlyph/textview.c:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textview.c Thu Sep 26 17:56:16 2002 *************** *** 94,99 **** --- 94,100 ---- { "Load...", &TE_View::load_popup, nil }, { "Save", &TE_View::save, nil }, { "Save As..", &TE_View::save_popup, nil }, + { "Quit", &TE_View::quit, nil }, { nil } }; *************** *** 288,293 **** --- 289,300 ---- { // save without error check; Bug Alert! (void) te_buffer_->save(); + } + + void TE_View::quit() + { + // save without error check; Bug Alert! + Session::instance()->quit(); } void TE_View::make_visible(const boolean scroll_page) Index: IVGlyph/textview.h diff -c IVGlyph/textview.h:1.1 IVGlyph/textview.h:1.2 *** IVGlyph/textview.h:1.1 Fri Sep 13 09:48:59 2002 --- src/IVGlyph/textview.h Thu Sep 26 17:56:16 2002 *************** *** 63,68 **** --- 63,69 ---- int save_as(const char* path); int save_current(); void save(); + void quit(); // InputHandler virtual void press(const Event&); Index: OverlayUnidraw/ovexport.c diff -c OverlayUnidraw/ovexport.c:1.1 OverlayUnidraw/ovexport.c:1.2 *** OverlayUnidraw/ovexport.c:1.1 Fri Sep 13 09:51:22 2002 --- src/OverlayUnidraw/ovexport.c Thu Sep 26 17:56:41 2002 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2002 Scott E. Johnston * Copyright (c) 1994, 1995, 1998 Vectaport Inc. * Copyright (c) 1990, 1991 Stanford University * *************** *** 110,117 **** style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"EPS", "idraw EPS", "drawtool"}; ! const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); Resource::ref(chooser_); --- 111,118 ---- style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"EPS", "idraw EPS", "drawtool", "SVG"}; ! const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s", "netscape %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); Resource::ref(chooser_); Index: src_ivtools/Imakefile diff -c src_ivtools/Imakefile:1.1 src_ivtools/Imakefile:1.2 *** src_ivtools/Imakefile:1.1 Fri Sep 13 09:47:30 2002 --- src/Imakefile Thu Sep 26 17:56:04 2002 *************** *** 46,51 **** --- 46,52 ---- \ Time \ IVGlyph \ + ivtext \ glyphs \ \ AttrGlyph \ Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2 *** top_ivtools/MANIFEST:1.1 Fri Sep 13 09:47:27 2002 --- ./MANIFEST Thu Sep 26 17:56:01 2002 *************** *** 1094,1103 **** ivtools-1.0/src/glyphs/strchooser/Imakefile ivtools-1.0/src/glyphs/strchooser/Makefile ivtools-1.0/src/glyphs/strchooser/main.c - ivtools-1.0/src/glyphs/text-editor/Imakefile - ivtools-1.0/src/glyphs/text-editor/Makefile - ivtools-1.0/src/glyphs/text-editor/README - ivtools-1.0/src/glyphs/text-editor/main.c ivtools-1.0/src/glyphs/timestamp/Imakefile ivtools-1.0/src/glyphs/timestamp/Makefile ivtools-1.0/src/glyphs/timestamp/main.c --- 1094,1099 ---- *************** *** 1560,1565 **** --- 1556,1565 ---- ivtools-1.0/src/iueserv_/Makefile ivtools-1.0/src/iueserv_/README ivtools-1.0/src/iueserv_/main.c + ivtools-1.0/src/ivtext/Imakefile + ivtools-1.0/src/ivtext/Makefile + ivtools-1.0/src/ivtext/README + ivtools-1.0/src/ivtext/main.c ivtools-1.0/src/ivxt/Imakefile ivtools-1.0/src/ivxt/Xd.h ivtools-1.0/src/ivxt/Xud.h Index: top_ivtools/README diff -c top_ivtools/README:1.1 top_ivtools/README:1.2 *** top_ivtools/README:1.1 Fri Sep 13 09:47:27 2002 --- ./README Thu Sep 26 17:56:02 2002 *************** *** 59,67 **** scrollable 2d scrollable glyph scrollfield 2d scrollable field-editor strchooser string chooser - text-editor emacs-like text editor timestamp editable time glyph Also all the glyph example programs from InterViews 3.1 have been added in an examples3.1 directory under the glyphs directory. --- 59,70 ---- scrollable 2d scrollable glyph scrollfield 2d scrollable field-editor strchooser string chooser timestamp editable time glyph + Plus a generally useful text display and editing program: + + ivtext emacs-like text editor + Also all the glyph example programs from InterViews 3.1 have been added in an examples3.1 directory under the glyphs directory. *************** *** 118,128 **** * More ivtools details ! ivtools is known to build with many versions of gcc (<= gcc-2.7.2, >= ! gcc-2.8.1, >= egcs-1.0.1, gcc-3.0.1) and on a variety of Unix'es: SunOS 4.1 (MIT's X11R5), Solaris 2.6 (X11R6), Irix 5.2 (SGI's X11R5), Linux 1.2 (Slackware 3.0, XFree86 3.1), Linux 2.* (RedHat 4.0 thru ! 6.0, Debian 2.*), NetBSD, FreeBSD, and Darwin (Mac OS X). There are contributed configs that are out of date for HPUX and Dec Alpha (though the HPUX contrib might almost have it right). It has been built on Windows NT 4.0 using Cygwin from Cygnus Solutions (see README.cygwin). --- 121,131 ---- * More ivtools details ! ivtools is known to build with many versions of gcc (>= gcc-2.8.1, ! >= egcs-1.0.1, gcc-3.0.*, gcc-3.1.*) and on a variety of Unix'es: SunOS 4.1 (MIT's X11R5), Solaris 2.6 (X11R6), Irix 5.2 (SGI's X11R5), Linux 1.2 (Slackware 3.0, XFree86 3.1), Linux 2.* (RedHat 4.0 thru ! 7.0, Debian 2.* and 3.*), NetBSD, FreeBSD, and Darwin (Mac OS X). There are contributed configs that are out of date for HPUX and Dec Alpha (though the HPUX contrib might almost have it right). It has been built on Windows NT 4.0 using Cygwin from Cygnus Solutions (see README.cygwin). *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/README Thu Sep 26 17:45:49 2002 *************** *** 0 **** --- 1,44 ---- + + Simple InterViews Text Editor + ----------------------------- + + This is my first version of an InterViews 3.1 texteditor class. I have tried + to implement a simple text editor that can be used in IV 3.1 applications. + The goal was _not_ to implement a full-featured editor (we have emacs, don't + we (-; ). + + It uses the 2.6 TextEditor/TextBuffer classes and was inspired by some code + posted by Frank Zenner (ze...@df...) a few month ago. Even if I + have not used any of his code directly it was very useful as an introduction + of how 2.6 classes can be used. + + Some features are: + + - loads/saves buffer from/to files + - dynamically allocates memory when buffer expands + - supports selectons (both primary and clipboard) from the editor + - have emacs-style (and Sun keyboard) key mappings + - popup-menu to load/save files + - Somewhat similar to Sun's Text Editor (left mouse button selects, + middle mouse button expand selection, right mouse button gives a + popup-menu) + - double-click selects word, tripple-click selects line + + I do not consider my work as completed, but I believe the editor is usable. + I have never used 2.6 classes before and I'm sure it could have been + structured in a better way. Comments are welcome! + + Things plan to do (if I could find the time): + + - add text search popup + - add at least one level of undo + - enable definition of menus and key mappings from resources + - add popup to enable specification of find patterns + - I bet there are bugs, but not currently known by me... + - add many more edit functions to the EivTextEditor class + + (the list could be much longer, but this is what I plan to implement) + + Have Fun! + + /Janne (ja...@to...) *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/Makefile Thu Sep 26 17:46:24 2002 *************** *** 0 **** --- 1,439 ---- + # Makefile generated by imake - do not edit! + # $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ + + # Read "template" to understand how this Makefile was generated. + # Edit <arch.def> to add support for a new platform. + # Edit <InterViews/iv-darwin.cf> to change platform-specific parameters. + # Edit <local.def> to change site-specific parameters. + # Edit <ivtext/Imakefile> to change actions that make should perform. + + # architecture: DARWIN + + # ------------------------------------------------------------------------- + # from <local.def>: + + GPLUSPLUS_INCLUDE_DIR = /usr/include/gcc/darwin/2.95.2/g++/ + TOOL_INCLUDE_DIR = /usr/local/include + + NORM_CCINCLUDES = -I$(CURRENT_DIR)/.. -I$(CURRENT_DIR)/../.. -I$(IVTOOLSSRC) $(BACKWARD_CCINCLUDES) -I$(IVTOOLSSRC)/include -I$(IVTOOLSSRC)/include/ivstd $(X_CCINCLUDES) + + APP_CCINCLUDES = $(NORM_CCINCLUDES) + + IVTOOLSSRC = /Users/scott/src/ivtools-1.0/src + + LIBUNIDRAWCOMMON = -L$(IVTOOLSSRC)/Unidraw-common/$(CPU) -lUnidraw-common + LIBIVCOMMON = -L$(IVTOOLSSRC)/IV-common/$(CPU) -lIV-common + LIBTIME = -L$(IVTOOLSSRC)/Time/$(CPU) -lTime + LIBATTRIBUTE = -L$(IVTOOLSSRC)/Attribute/$(CPU) -lAttribute + LIBCOMUTIL = -L$(IVTOOLSSRC)/ComUtil/$(CPU) -lComUtil + LIBCOMTERP = -L$(IVTOOLSSRC)/ComTerp/$(CPU) -lComTerp + LIBIVGLYPH = -L$(IVTOOLSSRC)/IVGlyph/$(CPU) -lIVGlyph + LIBATTRGLYPH = -L$(IVTOOLSSRC)/AttrGlyph/$(CPU) -lAttrGlyph + LIBCOMGLYPH = -L$(IVTOOLSSRC)/ComGlyph/$(CPU) -lComGlyph + LIBGLYPHTERP = -L$(IVTOOLSSRC)/GlyphTerp/$(CPU) -lGlyphTerp + LIBUNIIDRAW = -L$(IVTOOLSSRC)/UniIdraw/$(CPU) -lUniIdraw + LIBTOPOFACE = -L$(IVTOOLSSRC)/TopoFace/$(CPU) -lTopoFace + LIBOVERLAYUNIDRAW = -L$(IVTOOLSSRC)/OverlayUnidraw/$(CPU) -lOverlayUnidraw + + LIBACEDISPATCH = + + LIBCOMUNIDRAW = -L$(IVTOOLSSRC)/ComUnidraw/$(CPU) -lComUnidraw + LIBFRAMEUNIDRAW = -L$(IVTOOLSSRC)/FrameUnidraw/$(CPU) -lFrameUnidraw + LIBGRAPHUNIDRAW = -L$(IVTOOLSSRC)/GraphUnidraw/$(CPU) -lGraphUnidraw + LIBDRAWSERV = -L$(IVTOOLSSRC)/DrawServ/$(CPU) -lDrawServ + + DEPUNIDRAWCOMMON = $(IVTOOLSSRC)/Unidraw-common/$(CPU)/libUnidraw-common.$(VERSION).dylib + DEPIVCOMMON = $(IVTOOLSSRC)/IV-common/$(CPU)/libIV-common.$(VERSION).dylib + DEPTIME = $(IVTOOLSSRC)/Time/$(CPU)/libTime.$(VERSION).dylib + DEPATTRIBUTE = $(IVTOOLSSRC)/Attribute/$(CPU)/libAttribute.$(VERSION).dylib + DEPCOMUTIL = $(IVTOOLSSRC)/ComUtil/$(CPU)/libComUtil.$(VERSION).dylib + DEPCOMTERP = $(IVTOOLSSRC)/ComTerp/$(CPU)/libComTerp.$(VERSION).dylib + DEPIVGLYPH = $(IVTOOLSSRC)/IVGlyph/$(CPU)/libIVGlyph.$(VERSION).dylib + DEPATTRGLYPH = $(IVTOOLSSRC)/AttrGlyph/$(CPU)/libAttrGlyph.$(VERSION).dylib + DEPCOMGLYPH = $(IVTOOLSSRC)/ComGlyph/$(CPU)/libComGlyph.$(VERSION).dylib + DEPGLYPHTERP = $(IVTOOLSSRC)/GlyphTerp/$(CPU)/libGlyphTerp.$(VERSION).dylib + DEPUNIIDRAW = $(IVTOOLSSRC)/UniIdraw/$(CPU)/libUniIdraw.$(VERSION).dylib + DEPTOPOFACE = $(IVTOOLSSRC)/TopoFace/$(CPU)/libTopoFace.$(VERSION).dylib + DEPOVERLAYUNIDRAW = $(IVTOOLSSRC)/OverlayUnidraw/$(CPU)/libOverlayUnidraw.$(VERSION).dylib + + DEPACEDISPATCH = + + DEPCOMUNIDRAW = $(IVTOOLSSRC)/ComUnidraw/$(CPU)/libComUnidraw.$(VERSION).dylib + DEPFRAMEUNIDRAW = $(IVTOOLSSRC)/FrameUnidraw/$(CPU)/libFrameUnidraw.$(VERSION).dylib + DEPGRAPHUNIDRAW = $(IVTOOLSSRC)/GraphUnidraw/$(CPU)/libGraphUnidraw.$(VERSION).dylib + DEPDRAWSERV = $(IVTOOLSSRC)/DrawServ/$(CPU)/libDrawServ.$(VERSION).dylib + + # ------------------------------------------------------------------------- + + PROJECTDIR = /proj + + RELEASE = ivtools-1.0.6 + + VERSION = 1.0.6 + + REPOSITORY_FILES = *.c *.cc *.cxx *.C *.h Imakefile *.def template README INSTALL VERSION MANIFEST COPYRIGHT ANNOUNCE README.ivmkcm *.patch *.bugfix.? *.script *.sed comutil.arg comterp.err comutil.ci comterp.arg comterp.ci site.def.SUN4 site.def.LINUX site.def.SGI site.def.HP800 site.def.ALPHA site.def.CYGWIN site.def.NETBSD site.def.FREEBSD WishList *.defaults *.cf HOWTO Copyright *.sh CHANGES CHANGES-0.? *.cpp ivmkmf *.bash *.1 *.3 config.guess config.sub configure configure.in MANIFEST.perceps MANIFEST.comterp *.mk config.mk.in *.tmpl *.flt *.m4 config.defs.in + + SHELL = /bin/sh + + IMAKE = imake + IMAKEFLAGS = \ + -T "template"\ + -I$(ABSTOP)/config -I$(CONFIGDIR) -I$(CONFIGDIR)/.. -I$(XCONFIGDIR) -I$(IVTOOLSSRC)/../config\ + $(SPECIAL_IMAKEFLAGS) + SPECIAL_IMAKEFLAGS = + DEPEND = c++ -M + DEPEND_CCFLAGS = -w -DMAKEDEPEND $(CCDEFINES) $(CCINCLUDES) -I$(GPLUSPLUS_INCLUDE_DIR) -I$(TOOL_INCLUDE_DIR) -UHAVE_ACE + MAKE = make + PASSARCH = ARCH="$(ARCH)" SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS)" CMFLAGS="$(CMFLAGS)" CMMSG="$(CMMSG)" + ARCHORCPU = $(CPU) + ARCH = $(ARCHORCPU)$(SPECIAL_ARCH) + SPECIAL_ARCH = + + CCDRIVER = c++ + CCSUFFIX = c + CDRIVER = cc + CSUFFIX = c + SRC = /Users/scott/src/ivtools-1.0/src/ivtext/. + SLASH = / + SRCS = $(SRC)$(SLASH)*.$(CCSUFFIX) + OBJS = *.o + AOUT = a.out + + CCFLAGS = $(APP_CCFLAGS) $(IV_CCFLAGS) $(OTHER_CCFLAGS) $(EXTRA_CCFLAGS) + IV_CCFLAGS = \ + $(DEBUG_CCFLAGS)\ + $(OPTIMIZE_CCFLAGS)\ + $(SHARED_CCFLAGS)\ + $(CCDEFINES)\ + $(CCINCLUDES) + DEBUG_CCFLAGS = -g + OPTIMIZE_CCFLAGS = -O2 + SHARED_CCFLAGS = + EXTRA_CCFLAGS = + + CCDEFINES = $(APP_CCDEFINES) $(IV_CCDEFINES) $(OTHER_CCDEFINES) $(EXTRA_CCDEFINES) + IV_CCDEFINES = $(LANGUAGE_CCDEFINES) $(BACKWARD_CCDEFINES) + LANGUAGE_CCDEFINES = -Dcplusplus_2_1 + BACKWARD_CCDEFINES = + EXTRA_CCDEFINES = + + CLIPPOLY_CCDEFINES = + ACE_CCDEFINES = + IUE_CCDEFINES = + + CCINCLUDES = $(APP_CCINCLUDES) $(OTHER_CCINCLUDES) $(EXTRA_CCINCLUDES) + IV_CCINCLUDES = IvCCIncludes + BACKWARD_CCINCLUDES = + TOP_CCINCLUDES = -I$(INCSRC) + X_CCINCLUDES = -I$(XINCDIR) + EXTRA_CCINCLUDES = + + CLIPPOLY_CCINCLUDES = + ACE_CCINCLUDES = + IUE_CCINCLUDES = + + CFLAGS = $(APP_CCFLAGS) $(IV_CCFLAGS) $(OTHER_CCFLAGS) $(EXTRA_CCFLAGS) + + CCLDFLAGS = $(APP_CCLDFLAGS) $(IV_CCLDFLAGS) $(OTHER_CCLDFLAGS) $(EXTRA_CCLDFLAGS) + IV_CCLDFLAGS = \ + $(DEBUG_CCFLAGS)\ + $(OPTIMIZE_CCFLAGS)\ + $(NONSHARED_CCLDFLAGS) + NONSHARED_CCLDFLAGS = + SHARED_CCLDFLAGS = + EXTRA_CCLDFLAGS = + + CCDEPLIBS = $(APP_CCDEPLIBS) $(IV_CCDEPLIBS) $(OTHER_CCDEPLIBS) $(EXTRA_CCDEPLIBS) $(_CCDEPLIBS) + IV_CCDEPLIBS = \ + $(DEPLIBUNIDRAW)\ + $(DEPLIBGRAPHIC)\ + $(DEPLIBIV)\ + $(DEPLIBXEXT)\ + $(DEPLIBX11)\ + $(DEPLIBM) + EXTRA_CCDEPLIBS = + + CCLDLIBS = $(APP_CCLDLIBS) $(IV_CCLDLIBS) $(OTHER_CCLDLIBS) $(EXTRA_CCLDLIBS) + IV_CCLDLIBS = \ + $(LIBDIRPATH)\ + $(LDLIBUNIDRAW)\ + $(LDLIBGRAPHIC)\ + $(LDLIBIV)\ + $(XLIBDIRPATH)\ + $(LDLIBXEXT)\ + $(LDLIBX11)\ + $(ABSLIBDIRPATH) + SHARED_CCLDLIBS = + EXTRA_CCLDLIBS = -lstdc++ -lm + + CLIPPOLY_CCLDLIBS = + CLIPPOLYLIBDIR = + CLIPPOLYLIBBASE = libclippoly.so + ACE_CCLDLIBS = + ACELIBDIR = + ACELIBBASE = libACE.so + IUE_CCLDLIBS = + IUELIBDIR = + IUELIBBASE = libIUE.so + + INSTALL = install + INSTPGMFLAGS = -s + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + AR = ar clq + AS = as + CP = cp + CPP = /lib/cpp $(EXTRA_CCDEFINES) $(OTHER_CCDEFINES) + PREPROCESSCMD = $(CCDRIVER) -E $(EXTRA_CCDEFINES) $(OTHER_CCDEFINES) + LD = ld + LN = ln -s + MKDIRHIER = $(SHELL) $(SCRIPTSRC)/mkdirhier.sh + MV = mv + RANLIB = ranlib + RANLIBINSTFLAGS = + RM = rm -f + RMDIR = rm -rf + RM_CMD = $(RM) ,* .emacs_* *..c *.BAK *.CKP *.a *.bak *.ln *.o a.out core errs make.log make.out tags TAGS + TROFF = groff + + TOP = /Users/scott/src/ivtools-1.0 + RELTOP = ../../. + CURRENT_DIR = /Users/scott/src/ivtools-1.0/src/ivtext + + IVSRC = /Users/scott/src/ivtools-1.0/src + BINSRC = $(IVSRC)/bin + CONFIGSRC = $(RELTOP)/config + INCSRC = $(IVSRC)/include + LIBSRC = $(IVSRC) + MANSRC = $(IVSRC)/man + SCRIPTSRC = $(RELTOP)/src/scripts + + BINDIR = /usr/local/bin + CONFIGDIR = /usr/local/lib/ivtools/config + INCDIR = /usr/local/include + LIBDIR = /usr/local/lib + LIBABSDIR = /usr/local/lib + LIBALLDIR = /usr/local/lib/ivtools + MANDIR = /usr/local/man + + ABSCONFIGDIR = /usr/local/lib/ivtools/config + ABSLIBDIR = /usr/local/lib + ABSLIBALLDIR = /usr/local/lib/ivtools + RELLIBALLDIR = $(TOP)/lib/ivtools + XCONFIGDIR = /usr/X11R6/lib/X11/config + XINCDIR = /usr/X11R6/include + XLIBDIR = /usr/X11R6/lib + PSFONTDIR = /usr/lib/ps + + SOCKLEN_T_DEFINED = 0 + + include $(RELTOP)/config/config.mk + + all:: + + Makefile:: + -@if [ -f Makefile ]; then \ + $(RM) Makefile.bak; \ + $(MV) Makefile Makefile.bak; \ + else exit 0; fi + -@echo "Making Makefile" + -@if [ $(TOP) = $(CURRENT_DIR) ]; then \ + echo >.toplevel-make-makefile; else \ + echo >.not-toplevel-make-makefile; fi + -@if [ -f .toplevel-make-makefile ]; then \ + echo;\ + echo "remaking top-level Makefile using:";\ + echo " top-level directory -- $(ABSTOP)";\ + echo " ivtools config directory -- $(CONFIGSRC)";\ + echo " X11 config directory -- $(XCONFIGDIR)";\ + echo;\ + $(IMAKE) $(IMAKEFLAGS) -I$(ABSTOP)/config \ + -DTOPDIR=$(ABSTOP) -DRELTOPDIR=$(RELTOP) -DCURDIR=$(ABSTOP); fi + -@if [ -f .not-toplevel-make-makefile ]; then \ + $(IMAKE) $(IMAKEFLAGS) -DTOPDIR=$(TOP) \ + -DRELTOPDIR=$(RELTOP) -DCURDIR=$(CURRENT_DIR); fi + -@if [ $(TOP) = $(CURRENT_DIR) ]; then \ + $(RM) .toplevel-make-makefile; else \ + $(RM) .not-toplevel-make-makefile; fi + Makefiles:: + depend:: + install:: + uninstall:: + + clean:: + @$(RM_CMD) "#"* + + # ------------------------------------------------------------------------- + + # + # InterViews text-editor application + # + + PACKAGE = ivtext + + Makefiles:: + @echo "Making Makefiles" \ + "for $(ARCH) in $(CURRENT_DIR)/$(ARCH)" + -@if [ ! -d $(ARCH) ]; then \ + mkdir $(ARCH); \ + chmod g+w $(ARCH); \ + fi; \ + if [ -f $(ARCH)/Makefile ]; then \ + $(RM) $(ARCH)/Makefile.bak; \ + $(MV) $(ARCH)/Makefile $(ARCH)/Makefile.bak; \ + fi; \ + if [ ! -f $(ARCH)/Makefile ]; then \ + touch $(ARCH)/Makefile.depend; \ + fi; \ + $(IMAKE) $(IMAKEFLAGS) \ + -DTOPDIR=$(TOP) -DRELTOPDIR=../$(RELTOP) \ + -DCURDIR=$(CURRENT_DIR)/$(ARCH) \ + -DInObjectCodeDir -s $(ARCH)/Makefile + + depend:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "depending" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) depend; \ + ) else continue; fi; \ + done + + all:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "making all" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) all; \ + ) else continue; fi; \ + done + + install:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "installing" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) install; \ + ) else continue; fi; \ + done + + uninstall:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "uninstalling" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) uninstall; \ + ) else continue; fi; \ + done + + clean:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "cleaning" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) clean; \ + ) else continue; fi; \ + done + + Makefiles.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + Makefiles + depend.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + depend + all.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + all + install.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + install + clean.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + clean + + Makefiles.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + Makefiles + depend.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + depend + all.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + all + install.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + install + clean.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + clean + + cmchkin:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (cd $(TOP); cminstall); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + csh -c '(setenv REPOSITORY_FILES "$(REPOSITORY_FILES)"; \ + cmchkin $(PACKAGE) $(TOP)/cm $(TOP) $(CURRENT_DIR))'; fi + + cmtag:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + cmtag $(CMFLAGS) $(CMARGS); fi + + cmadd:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + csh -c '(setenv REPOSITORY_FILES "$(REPOSITORY_FILES)"; cmadd -m null_message)'; fi + + cmupdate:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else cmupdate; fi + + cmcommit:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ -z "$(CMMSG)" ]; then cmcommit $(CMFLAGS); \ + else cmcommit $(CMFLAGS) -m "$(CMMSG)"; fi; fi + *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/Imakefile Thu Sep 26 17:45:33 2002 *************** *** 0 **** --- 1,27 ---- + XCOMM + XCOMM InterViews text-editor application + XCOMM + + PACKAGE = ivtext + + #ifdef InObjectCodeDir + + CLIPPOLY_CCLDLIBS = + + APP_CCLDLIBS = $(LIBIVGLYPH) + #if HasDynamicSharedLibraries + APP_CCDEPLIBS = $(DEPIVGLYPH) + #endif + + Use_libInterViews() + ComplexProgramTarget(ivtext) + + MakeObjectFromSrcFlags(main,) + + IncludeDependencies() + + #else + + MakeInObjectCodeDir() + + #endif *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/main.c Thu Sep 26 17:45:49 2002 *************** *** 0 **** --- 1,78 ---- + // + // Simple Text Editor Buffer Implementation + // + // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories + // + // Permission is granted to any individual or institution to use, copy, + // modify, and distribute this software, provided that this complete + // copyright and permission notice is maintained, intact, in all copies + // and supporting documentation. + // + // Ellemtel Telecommunication Systems Labratories make no representation + // of the suitability of this software for any purpose. It is provided + // "as is" without any expressed or implied warranty. + // + // Jan Andersson, Torpa Konsult AB + // ja...@to... - 1993-08-29 + + #include <stdio.h> + + #include <IV-look/kit.h> + #include <InterViews/display.h> + #include <InterViews/layout.h> + #include <InterViews/session.h> + + #include <IVGlyph/textedit.h> + #include <IVGlyph/textwindow.h> + + class App { + public: + App(int, char**); + int run(); + private: + Session* session_; + EivTextEditor* text_edit_; + TextEditAppWindow* base_; + }; + + static PropertyData props[] = { + { "TextEdit*iconName", "Text Editor" }, + { "TextEdit*title", "InterViews Text Editor" }, + { "TextEdit*TextEditor*rows", "30" }, + { "TextEdit*TextEditor*columns", "80" }, + // { "TextEdit*TextEditor*textFont", "lucidasanstypewriter-14" }, + { "TextEdit*TextEditor*FileChooser*rows", "10" }, + { nil } + }; + + static OptionDesc options[] = { + { "-rows", "TextEdit*TextEditor*rows", OptionValueNext }, + { nil } + }; + + + int main(int argc, char** argv) { + App* a = new App(argc, argv); + return a->run(); + } + + App::App(int argc, char** argv) + { + session_ = new Session("TextEdit", argc, argv, options, props); + Display* display = session_->default_display(); + WidgetKit& kit = *WidgetKit::instance(); + const LayoutKit& layout = *LayoutKit::instance(); + + text_edit_ = new EivTextEditor(kit.style()); + + if (argc > 1) + text_edit_->load(argv[argc-1]); + + base_ = new TextEditAppWindow(text_edit_); + } + + int App::run() + { + return session_->run_window(base_); + } + *** /dev/null Thu Sep 26 17:57:08 PDT 2002 --- patches/ivtools-020926-johnston-068 *************** patches/ivtools-020926-johnston-068 *** 0 **** --- 1 ---- + ivtools-020926-johnston-068 |
From: <ivt...@li...> - 2002-11-02 22:29:57
|
Patch: ivtools-020918-johnston-067 For: ivtools-1.0.6 Author: joh...@us... Subject: touch up Secil's contrib, remove width arg from pokeline func Requires: This is an intermediate patch to ivtools-1.0.6. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - touch up Secil's contribution by removing the // SECIL comments, and removing the 'w' arg from the pokeline func. The number of arguments can easily be determined from the value list argument without traversing it, and this is more the style of other comdraw commands. If someone desired to pass a sublist this could be done several ways, including a new sublist command. Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.2 ComUnidraw/comeditor.c:1.3 *** ComUnidraw/comeditor.c:1.2 Fri Sep 13 12:19:22 2002 --- src/ComUnidraw/comeditor.c Wed Sep 18 09:47:37 2002 *************** *** 149,158 **** comterp->add_command("brush", new BrushFunc(comterp, this)); comterp->add_command("pattern", new PatternFunc(comterp, this)); comterp->add_command("colors", new ColorFunc(comterp, this)); - //SECIL comterp->add_command("fontbyname", new FontByNameFunc(comterp, this)); comterp->add_command("colorsrgb", new ColorRgbFunc(comterp, this)); - //SECIL comterp->add_command("nfonts", new NFontsFunc(comterp, this)); comterp->add_command("nbrushes", new NBrushesFunc(comterp, this)); comterp->add_command("npatterns", new NPatternsFunc(comterp, this)); --- 149,156 ---- *************** *** 221,229 **** comterp->add_command("poke", new PixelPokeFunc(comterp, this)); comterp->add_command("peek", new PixelPeekFunc(comterp, this)); - //SECIL comterp->add_command("pokeline", new PixelPokeLineFunc(comterp, this)); - //SECIL comterp->add_command("pcols", new PixelColsFunc(comterp, this)); comterp->add_command("prows", new PixelRowsFunc(comterp, this)); comterp->add_command("pflush", new PixelFlushFunc(comterp, this)); --- 219,225 ---- Index: ComUnidraw/grfunc.c diff -c ComUnidraw/grfunc.c:1.2 ComUnidraw/grfunc.c:1.3 *** ComUnidraw/grfunc.c:1.2 Fri Sep 13 12:19:22 2002 --- src/ComUnidraw/grfunc.c Wed Sep 18 09:47:37 2002 *************** *** 62,74 **** #include <Unidraw/Graphic/ellipses.h> #include <InterViews/transformer.h> - //SECIL #include <IV-2_6/InterViews/world.h> #include <IV-X11/Xlib.h> #include <IV-X11/xdisplay.h> #include <IV-X11/xfont.h> #include <X11/Xatom.h> - //SECIL #include <Attribute/aliterator.h> #include <Attribute/attrlist.h> --- 62,72 ---- *************** *** 680,686 **** } /*****************************************************************************/ - //SECIL FontByNameFunc::FontByNameFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { } --- 678,683 ---- *************** *** 816,822 **** execute_log(cmd); } /*****************************************************************************/ - //SECIL BrushFunc::BrushFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { } --- 813,818 ---- Index: ComUnidraw/grfunc.h diff -c ComUnidraw/grfunc.h:1.2 ComUnidraw/grfunc.h:1.3 *** ComUnidraw/grfunc.h:1.2 Fri Sep 13 12:19:22 2002 --- src/ComUnidraw/grfunc.h Wed Sep 18 09:47:37 2002 *************** *** 131,137 **** return "%s(fontnum) -- set current font from menu order"; } }; - //SECIL //: command for setting font state variable by font name in comdraw. // fontbyname(fontname) -- set current font by name class FontByNameFunc : public UnidrawFunc { --- 131,136 ---- *************** *** 172,178 **** return "%s(fgcolornum bgcolornum) -- set current colors from menu order"; } }; - //SECIL //:comand for setting color state variables by RGB name in comdraw. // colors(fgcolorname bgcolorname). The colorname format is "#RRGGBB" class ColorRgbFunc : public UnidrawFunc { --- 171,176 ---- *************** *** 180,188 **** ColorRgbFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s(fgcolorname bgcolorname) -- set current colors by RGB name. The colorname format is \"#RGB\" for 4 bits, \"#RRGGBB\" for 8 bits,\"#RRRGGGBBB\" for 12 bits,\"#RRRRGGGGBBBB\" for 16 bits"; } }; - //SECIL //: command to select graphics in comdraw. // select([compview ...] :all :clear) -- make these graphics the current selection, --- 178,185 ---- ColorRgbFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s(fgcolorname bgcolorname) -- set current colors by RGB name.\nThe colorname format is \"#RGB\" for 4 bits, \"#RRGGBB\" for 8 bits,\n\"#RRRGGGBBB\" for 12 bits,\"#RRRRGGGGBBBB\" for 16 bits"; } }; //: command to select graphics in comdraw. // select([compview ...] :all :clear) -- make these graphics the current selection, Index: ComUnidraw/pixelfunc.c diff -c ComUnidraw/pixelfunc.c:1.2 ComUnidraw/pixelfunc.c:1.3 *** ComUnidraw/pixelfunc.c:1.2 Fri Sep 13 12:19:22 2002 --- src/ComUnidraw/pixelfunc.c Wed Sep 18 09:47:37 2002 *************** *** 28,34 **** #include <Unidraw/iterator.h> #include <Unidraw/viewer.h> #include <Attribute/attrlist.h> - //SECIL #include <IV-2_6/InterViews/world.h> /*****************************************************************************/ PixelPokeLineFunc::PixelPokeLineFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { --- 28,33 ---- *************** *** 40,53 **** ComValue rastcompv(stack_arg(0)); ComValue xv(stack_arg(1)); ComValue yv(stack_arg(2)); ! ComValue wv(stack_arg(3)); ! ComValue vallistv(stack_arg(4)); int xval = xv.int_val(); int yval = yv.int_val(); - int wval = wv.int_val(); - int pixelvals[wval]; ! if(!vallistv.is_type(ComValue::ArrayType) || vallistv.array_len() != wval){ reset_stack(); push_stack(ComValue::nullval()); return; --- 39,49 ---- ComValue rastcompv(stack_arg(0)); ComValue xv(stack_arg(1)); ComValue yv(stack_arg(2)); ! ComValue vallistv(stack_arg(3)); int xval = xv.int_val(); int yval = yv.int_val(); ! if(!vallistv.is_type(ComValue::ArrayType) || vallistv.array_len() <= 1){ reset_stack(); push_stack(ComValue::nullval()); return; *************** *** 56,61 **** --- 52,59 ---- ALIterator i; AttributeValueList* avl = vallistv.array_val(); avl->First(i); + int wval = avl->Number(); + int pixelvals[wval]; for (int j=0; j<wval && !avl->Done(i); j++){ pixelvals[j]= avl->GetAttrVal(i)->int_val(); avl->Next(i); *************** *** 80,86 **** else push_stack(ComValue::nullval()); } - //SECIL /*****************************************************************************/ --- 78,83 ---- *************** *** 101,107 **** OverlayRaster* raster = rastrect ? rastrect->GetOriginal() : nil; if (raster) { ! raster->poke(xv.int_val(), yv.int_val(), valv.float_val(), valv.float_val(), valv.float_val(), 1.0); push_stack(rastcompv); } else push_stack(ComValue::nullval()); --- 98,109 ---- OverlayRaster* raster = rastrect ? rastrect->GetOriginal() : nil; if (raster) { ! ColorIntensity r,g,b; ! int pixelcolor = valv.int_val(); ! char colorname[7]; ! sprintf(colorname,"#%06x",pixelcolor); ! Color::find(World::current()->display(),colorname, r, g, b); ! raster->poke(xv.int_val(), yv.int_val(), r, g, b, 1.0); push_stack(rastcompv); } else push_stack(ComValue::nullval()); Index: ComUnidraw/pixelfunc.h diff -c ComUnidraw/pixelfunc.h:1.2 ComUnidraw/pixelfunc.h:1.3 *** ComUnidraw/pixelfunc.h:1.2 Fri Sep 13 12:19:23 2002 --- src/ComUnidraw/pixelfunc.h Wed Sep 18 09:47:37 2002 *************** *** 26,45 **** #include <ComUnidraw/unifunc.h> - //SECIL //: command to poke a line of pixel values into raster ! // pokeline(compview x y w vallist) -- poke pixel values of a line listed in vallist into raster. w is the width of the line(length of the list). class PixelPokeLineFunc : public UnidrawFunc { public: PixelPokeLineFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s(compview x y w vallist) -- poke pixel values of a line listed in vallist into raster. w is the width of the line(length of the list)"; } }; - - //SECIL //: command to poke pixel values into raster // poke(compview x y val) -- poke pixel value into raster --- 26,42 ---- #include <ComUnidraw/unifunc.h> //: command to poke a line of pixel values into raster ! // pokeline(compview x y vallist) -- poke pixel values of a line listed in vallist into raster. class PixelPokeLineFunc : public UnidrawFunc { public: PixelPokeLineFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s(compview x y vallist) -- poke list of values into a raster line."; } }; //: command to poke pixel values into raster // poke(compview x y val) -- poke pixel value into raster *** /dev/null Wed Sep 18 09:47:59 PDT 2002 --- patches/ivtools-020918-johnston-067 *************** patches/ivtools-020918-johnston-067 *** 0 **** --- 1 ---- + ivtools-020918-johnston-067 |
From: <ivt...@li...> - 2002-10-08 18:59:58
|
Patch: ivtools-020913-johnston-066 For: ivtools-1.0.6 Author: joh...@us... Subject: new comdraw funcs submitted by Secil Ugurel Requires: This is an intermediate patch to ivtools-1.0.6. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - new comdraw funcs submitted by Secil Ugurel: help(fontbyname colorsrgb pokeline) "fontbyname(fontname) -- set current font by X font name", "colorsrgb(fgcolorname bgcolorname) -- set current colors by RGB name. The colorname format is \"#RGB\" for 4 bits, \"#RRGGBB\" for 8 bits,\"#RRRGGGBBB\" for 12 bits,\"#RRRRGGGGBBBB\" for 16 bits", "pokeline(compview x y w vallist) -- poke pixel values of a line listed in vallist into raster. w is the width of the line(length of the list)" Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.1 ComUnidraw/comeditor.c:1.2 *** ComUnidraw/comeditor.c:1.1 Fri Sep 13 09:51:33 2002 --- src/ComUnidraw/comeditor.c Fri Sep 13 12:19:22 2002 *************** *** 149,155 **** comterp->add_command("brush", new BrushFunc(comterp, this)); comterp->add_command("pattern", new PatternFunc(comterp, this)); comterp->add_command("colors", new ColorFunc(comterp, this)); ! comterp->add_command("nfonts", new NFontsFunc(comterp, this)); comterp->add_command("nbrushes", new NBrushesFunc(comterp, this)); comterp->add_command("npatterns", new NPatternsFunc(comterp, this)); --- 149,158 ---- comterp->add_command("brush", new BrushFunc(comterp, this)); comterp->add_command("pattern", new PatternFunc(comterp, this)); comterp->add_command("colors", new ColorFunc(comterp, this)); ! //SECIL ! comterp->add_command("fontbyname", new FontByNameFunc(comterp, this)); ! comterp->add_command("colorsrgb", new ColorRgbFunc(comterp, this)); ! //SECIL comterp->add_command("nfonts", new NFontsFunc(comterp, this)); comterp->add_command("nbrushes", new NBrushesFunc(comterp, this)); comterp->add_command("npatterns", new NPatternsFunc(comterp, this)); *************** *** 218,223 **** --- 221,229 ---- comterp->add_command("poke", new PixelPokeFunc(comterp, this)); comterp->add_command("peek", new PixelPeekFunc(comterp, this)); + //SECIL + comterp->add_command("pokeline", new PixelPokeLineFunc(comterp, this)); + //SECIL comterp->add_command("pcols", new PixelColsFunc(comterp, this)); comterp->add_command("prows", new PixelRowsFunc(comterp, this)); comterp->add_command("pflush", new PixelFlushFunc(comterp, this)); Index: ComUnidraw/grfunc.c diff -c ComUnidraw/grfunc.c:1.1 ComUnidraw/grfunc.c:1.2 *** ComUnidraw/grfunc.c:1.1 Fri Sep 13 09:51:34 2002 --- src/ComUnidraw/grfunc.c Fri Sep 13 12:19:22 2002 *************** *** 62,67 **** --- 62,74 ---- #include <Unidraw/Graphic/ellipses.h> #include <InterViews/transformer.h> + //SECIL + #include <IV-2_6/InterViews/world.h> + #include <IV-X11/Xlib.h> + #include <IV-X11/xdisplay.h> + #include <IV-X11/xfont.h> + #include <X11/Xatom.h> + //SECIL #include <Attribute/aliterator.h> #include <Attribute/attrlist.h> *************** *** 673,678 **** --- 680,822 ---- } /*****************************************************************************/ + //SECIL + FontByNameFunc::FontByNameFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + static char *psfonttoxfont(char* f) + { + /* convert a PS name to a X... */ + char type[10]; + int size=0; + static char copy[256]; + static char name[256]; + static char *wght[] = { "bold","demi","light","demibold","book",0 }; + char *s; + + if (*f=='-') + return f; + + strcpy(copy,f); + s = copy; + while (*s) { + *s = tolower(*s); + s++; + } + f = copy+strlen(copy); + + s = strchr(copy,'-'); + if (!s) { + strcpy(type,"medium-r"); + } else { + *s=0; + s++; + for (size=0;wght[size];size++) + if (!strncmp(s,wght[size],strlen(wght[size]))) { + strcpy(type,wght[size]); + strcat(type,"-"); + s+=strlen(wght[size]); + break; + } + if (!wght[size]) + strcpy(type,"medium-"); + switch (*s) { + case 'i': + strcat(type,"i"); + break; + case 'o': + strcat(type,"o"); + break; + default: + strcat(type,"r"); + break; + } + } + + size = 11; + while (f[-1]>='0' && f[-1]<='9') + f--; + + if (*f) + size = atoi(f); + f[0] = 0; + if (f[-1]=='-') + f[-1] = 0; + sprintf(name,"-*-%s-%s-normal-*-%d-*", + copy, type, size ); + return name; + } + /*****************************************************************************/ + void FontByNameFunc::execute() { + ComValue& fontarg = stack_arg(0); + const char* fontval = fontarg.string_ptr(); + reset_stack(); + + char* fontvaldup=strdup(fontval); + Catalog* catalog = unidraw->GetCatalog(); + XDisplay* dpy =World::current()->display()->rep()->display_; + XFontStruct* xfs = XLoadQueryFont(dpy, fontvaldup); + PSFont* font = nil; + + if (!xfs){ + char* xfontval=psfonttoxfont(fontvaldup); + fontvaldup = strdup(xfontval); + xfs = XLoadQueryFont(dpy,xfontval); + if (!xfs){ + fprintf(stderr, "Can not load font: %s, \n", fontval); + fprintf(stderr, "Keeping the current font.\n"); + } + } + if (xfs){ + unsigned long value; + char fontname[CHARBUFSIZE]; + char fontsizeptr[CHARBUFSIZE]; + char fontfullname[CHARBUFSIZE]; + + XGetFontProperty(xfs, XA_FULL_NAME, &value); + strcpy(fontfullname, XGetAtomName(dpy, (Atom)value)); + + XGetFontProperty(xfs, XA_FONT_NAME, &value); + strcpy(fontname, XGetAtomName(dpy, (Atom)value)); + + XGetFontProperty(xfs,XA_POINT_SIZE, &value); + sprintf(fontsizeptr,"%d",(unsigned int)(value/10)); + + font = catalog->FindFont(fontvaldup,fontname,fontsizeptr); + delete fontvaldup; + } + FontCmd* cmd = nil; + + if (font) { + cmd = new FontCmd(_ed, font); + } + + execute_log(cmd); + } + /*****************************************************************************/ + ColorRgbFunc::ColorRgbFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void ColorRgbFunc::execute() { + ComValue& fgarg = stack_arg(0); + ComValue& bgarg = stack_arg(1); + const char* fgname = fgarg.string_ptr(); + const char* bgname = bgarg.string_ptr(); + reset_stack(); + PSColor* fgcolor=nil; + PSColor* bgcolor=nil; + Catalog* catalog = unidraw->GetCatalog(); + fgcolor = catalog->FindColor(fgname); + //This comparison is made because the user can set only the foreground color by calling + //colorsrgb with one argument. + if (strcmp(bgname,"sym")!=0){ + bgcolor = catalog->FindColor(bgname); + } + ColorCmd* cmd = new ColorCmd(_ed, fgcolor, bgcolor); + execute_log(cmd); + } + /*****************************************************************************/ + //SECIL BrushFunc::BrushFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { } Index: ComUnidraw/grfunc.h diff -c ComUnidraw/grfunc.h:1.1 ComUnidraw/grfunc.h:1.2 *** ComUnidraw/grfunc.h:1.1 Fri Sep 13 09:51:34 2002 --- src/ComUnidraw/grfunc.h Fri Sep 13 12:19:22 2002 *************** *** 131,136 **** --- 131,147 ---- return "%s(fontnum) -- set current font from menu order"; } }; + //SECIL + //: command for setting font state variable by font name in comdraw. + // fontbyname(fontname) -- set current font by name + class FontByNameFunc : public UnidrawFunc { + public: + FontByNameFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "%s(fontname) -- set current font by X font name"; } + }; + //: command for setting brush state variable in comdraw. // brush(brushnum) -- set current brush from menu order class BrushFunc : public UnidrawFunc { *************** *** 160,165 **** --- 171,188 ---- virtual const char* docstring() { return "%s(fgcolornum bgcolornum) -- set current colors from menu order"; } }; + + //SECIL + //:comand for setting color state variables by RGB name in comdraw. + // colors(fgcolorname bgcolorname). The colorname format is "#RRGGBB" + class ColorRgbFunc : public UnidrawFunc { + public: + ColorRgbFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "%s(fgcolorname bgcolorname) -- set current colors by RGB name. The colorname format is \"#RGB\" for 4 bits, \"#RRGGBB\" for 8 bits,\"#RRRGGGBBB\" for 12 bits,\"#RRRRGGGGBBBB\" for 16 bits"; } + }; + //SECIL //: command to select graphics in comdraw. // select([compview ...] :all :clear) -- make these graphics the current selection, Index: ComUnidraw/pixelfunc.c diff -c ComUnidraw/pixelfunc.c:1.1 ComUnidraw/pixelfunc.c:1.2 *** ComUnidraw/pixelfunc.c:1.1 Fri Sep 13 09:51:34 2002 --- src/ComUnidraw/pixelfunc.c Fri Sep 13 12:19:22 2002 *************** *** 28,33 **** --- 28,86 ---- #include <Unidraw/iterator.h> #include <Unidraw/viewer.h> #include <Attribute/attrlist.h> + //SECIL + #include <IV-2_6/InterViews/world.h> + /*****************************************************************************/ + PixelPokeLineFunc::PixelPokeLineFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void PixelPokeLineFunc::execute() { + Viewer* viewer = _ed->GetViewer(); + + ComValue rastcompv(stack_arg(0)); + ComValue xv(stack_arg(1)); + ComValue yv(stack_arg(2)); + ComValue wv(stack_arg(3)); + ComValue vallistv(stack_arg(4)); + int xval = xv.int_val(); + int yval = yv.int_val(); + int wval = wv.int_val(); + int pixelvals[wval]; + + if(!vallistv.is_type(ComValue::ArrayType) || vallistv.array_len() != wval){ + reset_stack(); + push_stack(ComValue::nullval()); + return; + } + + ALIterator i; + AttributeValueList* avl = vallistv.array_val(); + avl->First(i); + for (int j=0; j<wval && !avl->Done(i); j++){ + pixelvals[j]= avl->GetAttrVal(i)->int_val(); + avl->Next(i); + } + reset_stack(); + + RasterOvComp* rastcomp = (RasterOvComp*) rastcompv.geta(RasterOvComp::class_symid()); + OverlayRasterRect* rastrect = rastcomp ? rastcomp->GetOverlayRasterRect() : nil; + OverlayRaster* raster = rastrect ? rastrect->GetOriginal() : nil; + + if (raster) { + for(int j=0; j<wval; j++){ + ColorIntensity r,g,b; + int pixelcolor = pixelvals[j]; + char colorname[7]; + sprintf(colorname,"#%06x",pixelcolor); + Color::find(World::current()->display(),colorname, r, g, b); + raster->poke(xval+j, yval, r, g, b, 1.0); + } + push_stack(rastcompv); + } + else + push_stack(ComValue::nullval()); + } + //SECIL /*****************************************************************************/ Index: ComUnidraw/pixelfunc.h diff -c ComUnidraw/pixelfunc.h:1.1 ComUnidraw/pixelfunc.h:1.2 *** ComUnidraw/pixelfunc.h:1.1 Fri Sep 13 09:51:34 2002 --- src/ComUnidraw/pixelfunc.h Fri Sep 13 12:19:23 2002 *************** *** 26,31 **** --- 26,46 ---- #include <ComUnidraw/unifunc.h> + //SECIL + //: command to poke a line of pixel values into raster + // pokeline(compview x y w vallist) -- poke pixel values of a line listed in vallist into raster. w is the width of the line(length of the list). + + class PixelPokeLineFunc : public UnidrawFunc { + public: + PixelPokeLineFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "%s(compview x y w vallist) -- poke pixel values of a line listed in vallist into raster. w is the width of the line(length of the list)"; + } + }; + + //SECIL + //: command to poke pixel values into raster // poke(compview x y val) -- poke pixel value into raster class PixelPokeFunc : public UnidrawFunc { *** /dev/null Fri Sep 13 12:19:52 PDT 2002 --- patches/ivtools-020913-johnston-066 *************** patches/ivtools-020913-johnston-066 *** 0 **** --- 1 ---- + ivtools-020913-johnston-066 |
From: <ivt...@li...> - 2002-09-05 23:22:26
|
Patch: ivtools-020905-johnston-065 For: ivtools-1.0.6 Author: joh...@us... Subject: fixes for compiling with gcc-3.2 using ACE Requires: This is an intermediate patch to ivtools-1.0.6. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fixes for compiling with gcc-3.2 using ACE (on RedHat 6.2) Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.7 ComTerp/comterp.c:1.8 *** ComTerp/comterp.c:1.7 Fri Aug 2 11:34:29 2002 --- src/ComTerp/comterp.c Thu Sep 5 16:15:15 2002 *************** *** 23,28 **** --- 23,30 ---- * */ + #include <ComTerp/comhandler.h> + #include <ComTerp/_comterp.h> #include <ComTerp/_comutil.h> #include <ComTerp/assignfunc.h> *************** *** 30,36 **** #include <ComTerp/boolfunc.h> #include <ComTerp/bquotefunc.h> #include <ComTerp/comfunc.h> - #include <ComTerp/comhandler.h> #include <ComTerp/comterp.h> #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> --- 32,37 ---- Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.3 ComTerp/comterpserv.c:1.4 *** ComTerp/comterpserv.c:1.3 Fri Aug 2 11:34:29 2002 --- src/ComTerp/comterpserv.c Thu Sep 5 16:15:15 2002 *************** *** 22,30 **** * */ #include <ComTerp/_comterp.h> #include <ComTerp/_comutil.h> - #include <ComTerp/comhandler.h> #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/ctrlfunc.h> --- 22,31 ---- * */ + #include <ComTerp/comhandler.h> + #include <ComTerp/_comterp.h> #include <ComTerp/_comutil.h> #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/ctrlfunc.h> Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.4 ComTerp/ctrlfunc.c:1.5 *** ComTerp/ctrlfunc.c:1.4 Fri Aug 2 11:34:29 2002 --- src/ComTerp/ctrlfunc.c Thu Sep 5 16:15:15 2002 *************** *** 21,30 **** * */ - #include <ComTerp/ctrlfunc.h> #include <ComTerp/comhandler.h> ! #include <ComTerp/comvalue.h> #include <ComTerp/comterpserv.h> #include <Attribute/attrlist.h> #include <fstream.h> --- 21,31 ---- * */ #include <ComTerp/comhandler.h> ! ! #include <ComTerp/ctrlfunc.h> #include <ComTerp/comterpserv.h> + #include <ComTerp/comvalue.h> #include <Attribute/attrlist.h> #include <fstream.h> Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.4 ComTerp/debugfunc.c:1.5 *** ComTerp/debugfunc.c:1.4 Fri Aug 2 11:34:29 2002 --- src/ComTerp/debugfunc.c Thu Sep 5 16:15:15 2002 *************** *** 23,28 **** --- 23,29 ---- */ #include <ComTerp/comhandler.h> + #include <ComTerp/debugfunc.h> #include <ComTerp/comterpserv.h> #include <strstream.h> Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.3 ComTerp/helpfunc.c:1.4 *** ComTerp/helpfunc.c:1.3 Fri Aug 2 11:34:29 2002 --- src/ComTerp/helpfunc.c Thu Sep 5 16:15:15 2002 *************** *** 22,31 **** * */ - #include <ComTerp/helpfunc.h> #include <ComTerp/comhandler.h> ! #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> #include <Attribute/attrlist.h> #include <Attribute/attrvalue.h> --- 22,32 ---- * */ #include <ComTerp/comhandler.h> ! ! #include <ComTerp/helpfunc.h> #include <ComTerp/comterp.h> + #include <ComTerp/comvalue.h> #include <Attribute/attrlist.h> #include <Attribute/attrvalue.h> Index: ComTerp/iofunc.c diff -c ComTerp/iofunc.c:1.3 ComTerp/iofunc.c:1.4 *** ComTerp/iofunc.c:1.3 Fri Aug 2 11:34:29 2002 --- src/ComTerp/iofunc.c Thu Sep 5 16:15:15 2002 *************** *** 22,29 **** * */ - #include <ComTerp/iofunc.h> #include <ComTerp/comhandler.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> #include <Attribute/aliterator.h> --- 22,30 ---- * */ #include <ComTerp/comhandler.h> + + #include <ComTerp/iofunc.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> #include <Attribute/aliterator.h> Index: ComTerp/postfunc.c diff -c ComTerp/postfunc.c:1.3 ComTerp/postfunc.c:1.4 *** ComTerp/postfunc.c:1.3 Fri Aug 2 11:34:29 2002 --- src/ComTerp/postfunc.c Thu Sep 5 16:15:15 2002 *************** *** 22,29 **** * */ - #include <ComTerp/postfunc.h> #include <ComTerp/comhandler.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> --- 22,30 ---- * */ #include <ComTerp/comhandler.h> + + #include <ComTerp/postfunc.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> Index: ComTerp/symbolfunc.c diff -c ComTerp/symbolfunc.c:1.2 ComTerp/symbolfunc.c:1.3 *** ComTerp/symbolfunc.c:1.2 Thu Aug 1 11:39:29 2002 --- src/ComTerp/symbolfunc.c Thu Sep 5 16:15:15 2002 *************** *** 22,29 **** * */ - #include <ComTerp/symbolfunc.h> #include <ComTerp/comhandler.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> --- 22,30 ---- * */ #include <ComTerp/comhandler.h> + + #include <ComTerp/symbolfunc.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> Index: comterp/main.c diff -c comterp/main.c:1.3 comterp/main.c:1.4 *** comterp/main.c:1.3 Fri Aug 2 11:34:32 2002 --- src/comterp_/main.c Thu Sep 5 16:15:17 2002 *************** *** 21,28 **** * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - #include <ComTerp/comterpserv.h> - #ifdef HAVE_ACE #include <ComTerp/comhandler.h> #include <ace/SOCK_Connector.h> --- 21,26 ---- *************** *** 31,36 **** --- 29,37 ---- static u_short SERVER_PORT = 20000; static const char *const SERVER_HOST = ACE_DEFAULT_SERVER_HOST; #endif + + #include <ComTerp/comterpserv.h> + #include <fstream.h> Index: OverlayUnidraw/aceimport.c diff -c OverlayUnidraw/aceimport.c:1.3 OverlayUnidraw/aceimport.c:1.4 *** OverlayUnidraw/aceimport.c:1.3 Fri Aug 2 11:35:24 2002 --- src/OverlayUnidraw/aceimport.c Thu Sep 5 16:15:37 2002 *************** *** 23,30 **** #ifdef HAVE_ACE - #include <OverlayUnidraw/oved.h> #include <OverlayUnidraw/aceimport.h> #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <IVGlyph/importchooser.h> --- 23,31 ---- #ifdef HAVE_ACE #include <OverlayUnidraw/aceimport.h> + + #include <OverlayUnidraw/oved.h> #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <IVGlyph/importchooser.h> Index: drawtool/main.c diff -c drawtool/main.c:1.4 drawtool/main.c:1.5 *** drawtool/main.c:1.4 Fri Jun 28 12:46:38 2002 --- src/drawtool/main.c Thu Sep 5 16:15:39 2002 *************** *** 29,34 **** --- 29,39 ---- */ + #ifdef HAVE_ACE + #include <OverlayUnidraw/aceimport.h> + #include <AceDispatch/ace_dispatcher.h> + #endif + #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovcreator.h> #include <OverlayUnidraw/oved.h> *************** *** 38,48 **** #include <InterViews/world.h> #include <InterViews/event.h> - - #ifdef HAVE_ACE - #include <OverlayUnidraw/aceimport.h> - #include <AceDispatch/ace_dispatcher.h> - #endif #include <stream.h> #include <string.h> --- 43,48 ---- Index: ComUnidraw/comterp-acehandler.c diff -c ComUnidraw/comterp-acehandler.c:1.1 ComUnidraw/comterp-acehandler.c:1.2 *** ComUnidraw/comterp-acehandler.c:1.1 Fri Nov 2 13:07:06 2001 --- src/ComUnidraw/comterp-acehandler.c Thu Sep 5 16:15:40 2002 *************** *** 23,30 **** #ifdef HAVE_ACE - #include <ComUnidraw/comeditor.h> #include <ComUnidraw/comterp-acehandler.h> #include <ComTerp/comterpserv.h> #include <Unidraw/iterator.h> --- 23,31 ---- #ifdef HAVE_ACE #include <ComUnidraw/comterp-acehandler.h> + + #include <ComUnidraw/comeditor.h> #include <ComTerp/comterpserv.h> #include <Unidraw/iterator.h> Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.6 ComUnidraw/unifunc.c:1.7 *** ComUnidraw/unifunc.c:1.6 Fri Aug 2 11:35:30 2002 --- src/ComUnidraw/unifunc.c Thu Sep 5 16:15:40 2002 *************** *** 22,27 **** --- 22,32 ---- * */ + #ifdef HAVE_ACE + #include <ComTerp/comhandler.h> + #include <ace/SOCK_Connector.h> + #endif + #include <ComUnidraw/comeditor.h> #include <ComUnidraw/unifunc.h> #include <OverlayUnidraw/ovcatalog.h> *************** *** 57,67 **** #include <fstream.h> #endif #include <string.h> - - #ifdef HAVE_ACE - #include <ComTerp/comhandler.h> - #include <ace/SOCK_Connector.h> - #endif #define TITLE "UnidrawFunc" --- 62,67 ---- Index: comdraw/main.c diff -c comdraw/main.c:1.5 comdraw/main.c:1.6 *** comdraw/main.c:1.5 Tue Feb 19 16:18:21 2002 --- src/comdraw/main.c Thu Sep 5 16:15:42 2002 *************** *** 26,31 **** --- 26,37 ---- * comdraw main program. */ + #ifdef HAVE_ACE + #include <ComUnidraw/comterp-acehandler.h> + #include <OverlayUnidraw/aceimport.h> + #include <AceDispatch/ace_dispatcher.h> + #endif + #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovcreator.h> #include <ComUnidraw/comeditor.h> *************** *** 39,50 **** #include <Unidraw/iterator.h> #include <InterViews/world.h> - - #ifdef HAVE_ACE - #include <ComUnidraw/comterp-acehandler.h> - #include <OverlayUnidraw/aceimport.h> - #include <AceDispatch/ace_dispatcher.h> - #endif #include <stream.h> #include <string.h> --- 45,50 ---- Index: flipbook/main.c diff -c flipbook/main.c:1.4 flipbook/main.c:1.5 *** flipbook/main.c:1.4 Tue Feb 19 16:18:23 2002 --- src/flipbook/main.c Thu Sep 5 16:15:43 2002 *************** *** 26,31 **** --- 26,37 ---- * Frame editor main program. */ + #ifdef HAVE_ACE + #include <ComUnidraw/comterp-acehandler.h> + #include <OverlayUnidraw/aceimport.h> + #include <AceDispatch/ace_dispatcher.h> + #endif + #include <FrameUnidraw/framecatalog.h> #include <FrameUnidraw/framecreator.h> #include <FrameUnidraw/frameeditor.h> *************** *** 33,44 **** #include <OverlayUnidraw/ovunidraw.h> #include <InterViews/world.h> - - #ifdef HAVE_ACE - #include <ComUnidraw/comterp-acehandler.h> - #include <OverlayUnidraw/aceimport.h> - #include <AceDispatch/ace_dispatcher.h> - #endif #include <stdio.h> #include <stream.h> --- 39,44 ---- Index: graphdraw/main.c diff -c graphdraw/main.c:1.5 graphdraw/main.c:1.6 *** graphdraw/main.c:1.5 Tue Feb 19 16:18:26 2002 --- src/graphdraw/main.c Thu Sep 5 16:15:46 2002 *************** *** 26,31 **** --- 26,37 ---- * Graph editor main program. */ + #ifdef HAVE_ACE + #include <ComUnidraw/comterp-acehandler.h> + #include <OverlayUnidraw/aceimport.h> + #include <AceDispatch/ace_dispatcher.h> + #endif + #include <GraphUnidraw/graphcatalog.h> #include <GraphUnidraw/graphcreator.h> #include <GraphUnidraw/grapheditor.h> *************** *** 38,49 **** #include <string.h> #include <math.h> #include <version.h> - - #ifdef HAVE_ACE - #include <ComUnidraw/comterp-acehandler.h> - #include <OverlayUnidraw/aceimport.h> - #include <AceDispatch/ace_dispatcher.h> - #endif /*****************************************************************************/ --- 44,49 ---- Index: drawserv/main.c diff -c drawserv/main.c:1.3 drawserv/main.c:1.4 *** drawserv/main.c:1.3 Tue Feb 19 16:18:29 2002 --- src/drawserv_/main.c Thu Sep 5 16:15:47 2002 *************** *** 26,31 **** --- 26,37 ---- * drawserv main program. */ + #ifdef HAVE_ACE + #include <ComUnidraw/comterp-acehandler.h> + #include <OverlayUnidraw/aceimport.h> + #include <AceDispatch/ace_dispatcher.h> + #endif + #include <DrawServ/drawcatalog.h> #include <DrawServ/drawcreator.h> #include <DrawServ/drawcomps.h> *************** *** 43,54 **** #include <Unidraw/iterator.h> #include <InterViews/world.h> - - #ifdef HAVE_ACE - #include <ComUnidraw/comterp-acehandler.h> - #include <OverlayUnidraw/aceimport.h> - #include <AceDispatch/ace_dispatcher.h> - #endif #include <stream.h> #include <string.h> --- 49,54 ---- *** /dev/null Thu Sep 5 16:15:54 PDT 2002 --- patches/ivtools-020905-johnston-065 *************** patches/ivtools-020905-johnston-065 *** 0 **** --- 1 ---- + ivtools-020905-johnston-065 |
From: <ivt...@li...> - 2002-08-02 18:40:55
|
Patch: ivtools-020802-johnston-064 For: ivtools-1.0.5 Author: joh...@us... Subject: changes for compiling with gcc-2.96 on RedHat 7.*, new release 1.0.6 Requires: This is an intermediate patch to ivtools-1.0.5. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - changes for compiling with gcc-2.96 on RedHat 7.*. Makes for new release, ivtools-1.0.6 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.7 top_ivtools/CHANGES:1.8 *** top_ivtools/CHANGES:1.7 Thu Aug 1 11:52:10 2002 --- ./CHANGES Fri Aug 2 11:34:25 2002 *************** *** 1,3 **** --- 1,8 ---- + August 2nd, 2002 ivtools-1.0.6 + + - more changes for compiling with gcc-2.96 on RedHat 7.* + + August 1st, 2002 ivtools-1.0.5 - various compile time fixes for Solaris and Cygwin. Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.9 top_ivtools/INSTALL:1.10 *** top_ivtools/INSTALL:1.9 Thu Aug 1 11:52:10 2002 --- ./INSTALL Fri Aug 2 11:34:25 2002 *************** *** 1,7 **** INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.5 from source, the short version: ./configure make --- 1,7 ---- INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.6 from source, the short version: ./configure make *************** *** 10,16 **** And if that doesn't work... ! Instructions for building ivtools-1.0.5 from source, the long version: 0. Compilation Environment --- 10,16 ---- And if that doesn't work... ! Instructions for building ivtools-1.0.6 from source, the long version: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.8 top_ivtools/README:1.9 *** top_ivtools/README:1.8 Thu Aug 1 11:52:10 2002 --- ./README Fri Aug 2 11:34:25 2002 *************** *** 2,8 **** README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.5. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.6. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.6 top_ivtools/VERSION:1.7 *** top_ivtools/VERSION:1.6 Thu Aug 1 11:52:10 2002 --- ./VERSION Fri Aug 2 11:34:25 2002 *************** *** 1 **** ! Release 1.0.5 --- 1 ---- ! Release 1.0.6 Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.5 ComTerp/comhandler.c:1.6 *** ComTerp/comhandler.c:1.5 Wed Jul 24 15:24:42 2002 --- src/ComTerp/comhandler.c Fri Aug 2 11:34:29 2002 *************** *** 125,131 **** return -1; } else { if (!comterp_->stack_empty()) { ! #if __GNUG__<3 filebuf obuf(1); #else fileptr_filebuf obuf(stdout, ios_base::out); --- 125,131 ---- return -1; } else { if (!comterp_->stack_empty()) { ! #if __GNUC__<3 filebuf obuf(1); #else fileptr_filebuf obuf(stdout, ios_base::out); *************** *** 153,159 **** #endif char ch; ! #if __GNUG__<3 filebuf ibuf(fd); istream istr(&ibuf); --- 153,159 ---- #endif char ch; ! #if __GNUC__<3 filebuf ibuf(fd); istream istr(&ibuf); *************** *** 190,196 **** if (!comterp_ || !input_good) return -1; else if (!inbuf || !*inbuf) { ! #if __GNUG__<3 filebuf obuf(fd ? fd : 1); ostream ostr(&obuf); ostr << "\n"; --- 190,196 ---- if (!comterp_ || !input_good) return -1; else if (!inbuf || !*inbuf) { ! #if __GNUC__<3 filebuf obuf(fd ? fd : 1); ostream ostr(&obuf); ostr << "\n"; *************** *** 216,222 **** } else { if (inbuf[0]!='\004') cout << inbuf << "\n"; ! #if __GNUG__<3 filebuf obuf(fd ? fd : 1); ostream ostr(&obuf); ostr << "\n"; --- 216,222 ---- } else { if (inbuf[0]!='\004') cout << inbuf << "\n"; ! #if __GNUC__<3 filebuf obuf(fd ? fd : 1); ostream ostr(&obuf); ostr << "\n"; Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.6 ComTerp/comterp.c:1.7 *** ComTerp/comterp.c:1.6 Wed Jul 24 11:00:04 2002 --- src/ComTerp/comterp.c Fri Aug 2 11:34:29 2002 *************** *** 59,65 **** #include <string.h> #include <strstream.h> #include <unistd.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 59,65 ---- #include <string.h> #include <strstream.h> #include <unistd.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 287,293 **** } if (stepflag()) { ! #if __GNUG__<3 filebuf fbufout; fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout)); #else --- 287,293 ---- } if (stepflag()) { ! #if __GNUC__<3 filebuf fbufout; fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout)); #else *************** *** 876,882 **** errbuf_save[0] = '\0'; ! #if __GNUG__<3 filebuf fbuf; if (handler()) { int fd = Math::max(1, handler()->get_handle()); --- 876,882 ---- errbuf_save[0] = '\0'; ! #if __GNUC__<3 filebuf fbuf; if (handler()) { int fd = Math::max(1, handler()->get_handle()); *************** *** 1108,1114 **** if (read_expr()) { if (eval_expr(true)) { err_print( stderr, "comterp" ); ! #if __GNUG__<3 filebuf obuf(1); #else fileptr_filebuf obuf(stdout, ios_base::out); --- 1108,1114 ---- if (read_expr()) { if (eval_expr(true)) { err_print( stderr, "comterp" ); ! #if __GNUC__<3 filebuf obuf(1); #else fileptr_filebuf obuf(stdout, ios_base::out); Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.2 ComTerp/comterpserv.c:1.3 *** ComTerp/comterpserv.c:1.2 Wed Jul 24 11:00:04 2002 --- src/ComTerp/comterpserv.c Fri Aug 2 11:34:29 2002 *************** *** 31,37 **** #include <OS/math.h> #include <iostream.h> #include <string.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 31,37 ---- #include <OS/math.h> #include <iostream.h> #include <string.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 145,151 **** char* ComTerpServ::fd_fgets(char* s, int n, void* serv) { ComTerpServ* server = (ComTerpServ*)serv; int fd = Math::max(server->_fd, 1); ! #if __GNUG__<3 char* instr; filebuf fbuf; fbuf.attach(fd); --- 145,151 ---- char* ComTerpServ::fd_fgets(char* s, int n, void* serv) { ComTerpServ* server = (ComTerpServ*)serv; int fd = Math::max(server->_fd, 1); ! #if __GNUC__<3 char* instr; filebuf fbuf; fbuf.attach(fd); *************** *** 179,185 **** /* append a null byte */ outstr[outpos] = '\0'; ! #if __GNUG__>=3 if (ifptr) fclose(ifptr); #endif --- 179,185 ---- /* append a null byte */ outstr[outpos] = '\0'; ! #if __GNUC__>=3 if (ifptr) fclose(ifptr); #endif *************** *** 193,199 **** int& bufsize = server->_bufsiz; int fd = (int)server->_fd; ! #if __GNUG__<3 filebuf fbuf; fbuf.attach(fd); #else --- 193,199 ---- int& bufsize = server->_bufsiz; int fd = (int)server->_fd; ! #if __GNUC__<3 filebuf fbuf; fbuf.attach(fd); #else *************** *** 205,211 **** out.put(s[outpos]); out.flush(); outpos = 0; ! #if __GNUG__>=3 if (ofptr) fclose(ofptr); #endif return 1; --- 205,211 ---- out.put(s[outpos]); out.flush(); outpos = 0; ! #if __GNUC__>=3 if (ofptr) fclose(ofptr); #endif return 1; *************** *** 286,292 **** char inbuf[bufsiz]; char outbuf[bufsiz]; inbuf[0] = '\0'; ! #if __GNUG__<3 filebuf ibuf; ibuf.open(filename, "r"); #else --- 286,292 ---- char inbuf[bufsiz]; char outbuf[bufsiz]; inbuf[0] = '\0'; ! #if __GNUC__<3 filebuf ibuf; ibuf.open(filename, "r"); #else *************** *** 310,316 **** if (*inbuf && read_expr()) { if (eval_expr(true)) { err_print( stderr, "comterp" ); ! #if __GNUG__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); --- 310,316 ---- if (*inbuf && read_expr()) { if (eval_expr(true)) { err_print( stderr, "comterp" ); ! #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); *************** *** 318,324 **** #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUG__>=3 if (ofptr) fclose(ofptr); #endif status = -1; --- 318,324 ---- #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__>=3 if (ofptr) fclose(ofptr); #endif status = -1; *************** *** 331,337 **** } } else if (*inbuf) { err_print( stderr, "comterp" ); ! #if __GNUG__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); --- 331,337 ---- } } else if (*inbuf) { err_print( stderr, "comterp" ); ! #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); *************** *** 339,345 **** #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUG__>=3 if (ofptr) fclose(ofptr); #endif status = -1; --- 339,345 ---- #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__>=3 if (ofptr) fclose(ofptr); #endif status = -1; Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.3 ComTerp/ctrlfunc.c:1.4 *** ComTerp/ctrlfunc.c:1.3 Wed Jul 24 15:24:42 2002 --- src/ComTerp/ctrlfunc.c Fri Aug 2 11:34:29 2002 *************** *** 34,40 **** #define TITLE "CtrlFunc" ! #if __GNUG__>=3 static char newline; #endif --- 34,40 ---- #define TITLE "CtrlFunc" ! #if __GNUC__>=3 static char newline; #endif *************** *** 129,135 **** return; } ! #if __GNUG__<3 filebuf ofbuf; ofbuf.attach(socket.get_handle()); #else --- 129,135 ---- return; } ! #if __GNUC__<3 filebuf ofbuf; ofbuf.attach(socket.get_handle()); #else *************** *** 142,148 **** if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n"; out.flush(); if (nowaitv.is_false()) { ! #if __GNUG__<3 filebuf ifbuf; ifbuf.attach(socket.get_handle()); istream in(&ifbuf); --- 142,148 ---- if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n"; out.flush(); if (nowaitv.is_false()) { ! #if __GNUC__<3 filebuf ifbuf; ifbuf.attach(socket.get_handle()); istream in(&ifbuf); Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.3 ComTerp/debugfunc.c:1.4 *** ComTerp/debugfunc.c:1.3 Wed Jul 24 11:00:04 2002 --- src/ComTerp/debugfunc.c Fri Aug 2 11:34:29 2002 *************** *** 30,36 **** #else #include <vector.h> #endif ! #if __GNUG__>=3 #include <fstream.h> #endif --- 30,36 ---- #else #include <vector.h> #endif ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 87,93 **** cerr << sbuf2_s.str(); comterp()->push_servstate(); ! #if __GNUG__<3 filebuf fbufin; if (comterp()->handler()) { int fd = max(0, comterp()->handler()->get_handle()); --- 87,93 ---- cerr << sbuf2_s.str(); comterp()->push_servstate(); ! #if __GNUC__<3 filebuf fbufin; if (comterp()->handler()) { int fd = max(0, comterp()->handler()->get_handle()); *************** *** 99,105 **** ? comterp()->handler()->rdfptr() : stdin, ios_base::in); #endif istream in(&fbufin); ! #if __GNUG__<3 filebuf fbufout; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); --- 99,105 ---- ? comterp()->handler()->rdfptr() : stdin, ios_base::in); #endif istream in(&fbufin); ! #if __GNUC__<3 filebuf fbufout; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.2 ComTerp/helpfunc.c:1.3 *** ComTerp/helpfunc.c:1.2 Wed Jul 24 11:00:04 2002 --- src/ComTerp/helpfunc.c Fri Aug 2 11:34:29 2002 *************** *** 34,40 **** #include <iostream.h> #include <strstream.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 34,40 ---- #include <iostream.h> #include <strstream.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 127,133 **** reset_stack(); strstreambuf sbuf; ! #if __GNUG__<3 filebuf fbuf; if (comterp()->handler()) { int fd = Math::max(1, comterp()->handler()->get_handle()); --- 127,133 ---- reset_stack(); strstreambuf sbuf; ! #if __GNUC__<3 filebuf fbuf; if (comterp()->handler()) { int fd = Math::max(1, comterp()->handler()->get_handle()); *************** *** 168,174 **** #else *out << '\n'; #endif ! #if __GNUG__<3 out->form(comfuncs[i]->docstring(), symbol_pntr(command_ids[i])); #else { --- 168,174 ---- #else *out << '\n'; #endif ! #if __GNUC__<3 out->form(comfuncs[i]->docstring(), symbol_pntr(command_ids[i])); #else { *************** *** 198,204 **** first = false; else out->put('\n'); ! #if __GNUG__<3 out->form(comfunc->docstring(), symbol_pntr(value->command_symid())); #else { --- 198,204 ---- first = false; else out->put('\n'); ! #if __GNUC__<3 out->form(comfunc->docstring(), symbol_pntr(value->command_symid())); #else { Index: ComTerp/iofunc.c diff -c ComTerp/iofunc.c:1.2 ComTerp/iofunc.c:1.3 *** ComTerp/iofunc.c:1.2 Wed Jul 24 11:00:04 2002 --- src/ComTerp/iofunc.c Fri Aug 2 11:34:29 2002 *************** *** 31,37 **** #include <OS/math.h> #include <iostream.h> #include <strstream.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 31,37 ---- #include <OS/math.h> #include <iostream.h> #include <strstream.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 60,66 **** const char* fstr = formatstr.is_string() ? formatstr.string_ptr() : "nil"; ComValue::comterp(comterp()); ! #if __GNUG__<3 streambuf* strmbuf = nil; if (stringflag.is_false() && strflag.is_false() && symbolflag.is_false() && symflag.is_false()) { --- 60,66 ---- const char* fstr = formatstr.is_string() ? formatstr.string_ptr() : "nil"; ComValue::comterp(comterp()); ! #if __GNUC__<3 streambuf* strmbuf = nil; if (stringflag.is_false() && strflag.is_false() && symbolflag.is_false() && symflag.is_false()) { Index: ComTerp/parser.c diff -c ComTerp/parser.c:1.1 ComTerp/parser.c:1.2 *** ComTerp/parser.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/parser.c Fri Aug 2 11:34:29 2002 *************** *** 29,35 **** #define TITLE "Parser" ! #if __GNUG__>=3 static char newline; #endif --- 29,35 ---- #define TITLE "Parser" ! #if __GNUC__>=3 static char newline; #endif *************** *** 135,141 **** char* Parser::istream_fgets(char* s, int n, void* instreamp) { istream& in = *(istream*)instreamp; ! #if __GNUG__<3 char *instr; in.gets(&instr); #else --- 135,141 ---- char* Parser::istream_fgets(char* s, int n, void* instreamp) { istream& in = *(istream*)instreamp; ! #if __GNUC__<3 char *instr; in.gets(&instr); #else Index: ComTerp/postfunc.c diff -c ComTerp/postfunc.c:1.2 ComTerp/postfunc.c:1.3 *** ComTerp/postfunc.c:1.2 Wed Jul 24 11:00:04 2002 --- src/ComTerp/postfunc.c Fri Aug 2 11:34:29 2002 *************** *** 33,39 **** #include <OS/math.h> #include <iostream.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 33,39 ---- #include <OS/math.h> #include <iostream.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 46,52 **** void PostFixFunc::execute() { // print everything on the stack for this function ! #if __GNUG__<3 filebuf fbuf; if (comterp()->handler()) { int fd = Math::max(1, comterp()->handler()->get_handle()); --- 46,52 ---- void PostFixFunc::execute() { // print everything on the stack for this function ! #if __GNUC__<3 filebuf fbuf; if (comterp()->handler()) { int fd = Math::max(1, comterp()->handler()->get_handle()); Index: comtest/main.c diff -c comtest/main.c:1.1 comtest/main.c:1.2 *** comtest/main.c:1.1 Fri Nov 2 13:04:51 2001 --- src/comtest/main.c Fri Aug 2 11:34:30 2002 *************** *** 24,29 **** --- 24,30 ---- #include <ComTerp/scanner.h> #include <iostream.h> + #include <string.h> char* type_names[] = { "None", Index: comterp/main.c diff -c comterp/main.c:1.2 comterp/main.c:1.3 *** comterp/main.c:1.2 Wed Jul 24 15:24:44 2002 --- src/comterp_/main.c Fri Aug 2 11:34:32 2002 *************** *** 55,61 **** FPointObj fp(0.,0.); #endif ! #if __GNUG__>=3 static char newline; #endif --- 55,61 ---- FPointObj fp(0.,0.); #endif ! #if __GNUC__>=3 static char newline; #endif *************** *** 128,134 **** if (!telcat_flag) { ! #if __GNUG__<3 filebuf obuf; obuf.attach(server.get_handle()); #else --- 128,134 ---- if (!telcat_flag) { ! #if __GNUC__<3 filebuf obuf; obuf.attach(server.get_handle()); #else *************** *** 137,143 **** #endif ostream out(&obuf); ! #if __GNUG__<3 filebuf ibuf; ibuf.attach(server.get_handle()); #else --- 137,143 ---- #endif ostream out(&obuf); ! #if __GNUC__<3 filebuf ibuf; ibuf.attach(server.get_handle()); #else *************** *** 152,158 **** if (feof(inptr)) break; out << buffer; out.flush(); ! #if __GNUG__<3 char* inbuf; char ch; ch = in.get(); --- 152,158 ---- if (feof(inptr)) break; out << buffer; out.flush(); ! #if __GNUC__<3 char* inbuf; char ch; ch = in.get(); *************** *** 180,186 **** #endif } ! #if __GNUG__>=3 if (ofptr) fclose(ofptr); if (ifptr) fclose(ifptr); #endif --- 180,186 ---- #endif } ! #if __GNUC__>=3 if (ofptr) fclose(ofptr); if (ifptr) fclose(ifptr); #endif *************** *** 188,194 **** } else if (inptr) { ! #if __GNUG__<3 filebuf inbuf; inbuf.attach(fileno(inptr)); #else --- 188,194 ---- } else if (inptr) { ! #if __GNUC__<3 filebuf inbuf; inbuf.attach(fileno(inptr)); #else *************** *** 197,203 **** istream in(&inbuf); ! #if __GNUG__<3 filebuf obuf; obuf.attach(server.get_handle()); #else --- 197,203 ---- istream in(&inbuf); ! #if __GNUC__<3 filebuf obuf; obuf.attach(server.get_handle()); #else *************** *** 213,219 **** out.write(buffer, in.gcount()); } out.flush(); ! #if __GNUG__>=3 if (ofptr) fclose(ofptr); #endif } else --- 213,219 ---- out.write(buffer, in.gcount()); } out.flush(); ! #if __GNUC__>=3 if (ofptr) fclose(ofptr); #endif } else Index: src_os/string.c diff -c src_os/string.c:1.3 src_os/string.c:1.4 *** src_os/string.c:1.3 Fri Mar 1 14:10:09 2002 --- src/OS/string.c Fri Aug 2 11:34:35 2002 *************** *** 337,343 **** }; ostream& operator<< (ostream& out, const String& str) { ! #if defined(sun) && !defined(solaris) || __GNUG__>=3 out.write(str.string(), str.length()); #else out.write(str.string(), (streamsize)str.length()); --- 337,343 ---- }; ostream& operator<< (ostream& out, const String& str) { ! #if defined(sun) && !defined(solaris) || __GNUC__>=3 out.write(str.string(), str.length()); #else out.write(str.string(), (streamsize)str.length()); Index: src_dispatch/dispatcher.c diff -c src_dispatch/dispatcher.c:1.3 src_dispatch/dispatcher.c:1.4 *** src_dispatch/dispatcher.c:1.3 Fri Mar 1 14:10:11 2002 --- src/Dispatch/dispatcher.c Fri Aug 2 11:34:37 2002 *************** *** 60,66 **** #endif } ! #if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2) && __GNUG__<3 #define fds_bits __fds_bits #endif --- 60,66 ---- #endif } ! #if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2) && __GNUC__<3 #define fds_bits __fds_bits #endif *************** *** 633,639 **** ) { int nfound; #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUG__) static struct sigaction sv, osv; #else static struct sigvec sv, osv; --- 633,639 ---- ) { int nfound; #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUC__) static struct sigaction sv, osv; #else static struct sigvec sv, osv; *************** *** 648,654 **** if (!_cqueue->isEmpty()) { #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUG__) sv.sa_handler = fxSIGVECHANDLER(&Dispatcher::sigCLD); sv.sa_flags = SV_INTERRUPT; sigaction(SIGCLD, &sv, &osv); --- 648,654 ---- if (!_cqueue->isEmpty()) { #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUC__) sv.sa_handler = fxSIGVECHANDLER(&Dispatcher::sigCLD); sv.sa_flags = SV_INTERRUPT; sigaction(SIGCLD, &sv, &osv); *************** *** 694,700 **** } while (nfound < 0 && !handleError()); if (!_cqueue->isEmpty()) { #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUG__) sigaction(SIGCLD, &osv, (struct sigaction*) 0); #else sigvec(SIGCLD, &osv, (struct sigvec*) 0); --- 694,700 ---- } while (nfound < 0 && !handleError()); if (!_cqueue->isEmpty()) { #ifdef SV_INTERRUPT /* BSD-style */ ! #if defined(sun) && defined(__GNUC__) sigaction(SIGCLD, &osv, (struct sigaction*) 0); #else sigvec(SIGCLD, &osv, (struct sigvec*) 0); Index: IVGlyph/printchooser.c diff -c IVGlyph/printchooser.c:1.1 IVGlyph/printchooser.c:1.2 *** IVGlyph/printchooser.c:1.1 Fri Nov 2 13:05:31 2001 --- src/IVGlyph/printchooser.c Fri Aug 2 11:34:41 2002 *************** *** 50,55 **** --- 50,56 ---- #include <iostream.h> #include <stdio.h> + #include <string.h> implementActionCallback(PrintChooserImpl) implementFieldEditorCallback(PrintChooserImpl) Index: ComGlyph/comtextview.c diff -c ComGlyph/comtextview.c:1.1 ComGlyph/comtextview.c:1.2 *** ComGlyph/comtextview.c:1.1 Fri Nov 2 13:06:40 2001 --- src/ComGlyph/comtextview.c Fri Aug 2 11:35:09 2002 *************** *** 50,55 **** --- 50,56 ---- #include <ctype.h> #include <iostream.h> #include <strstream.h> + #include <string.h> #define XK_MISCELLANY /* to get the keysym's we need */ #include <X11/keysymdef.h> Index: Unidraw/catalog.c diff -c Unidraw/catalog.c:1.3 Unidraw/catalog.c:1.4 *** Unidraw/catalog.c:1.3 Wed Feb 20 11:54:00 2002 --- src/Unidraw/catalog.c Fri Aug 2 11:35:16 2002 *************** *** 276,282 **** _curMap = nil; _substMap = new ObjectMap(nil, COMPONENT); _clipboard = new Clipboard; ! #ifdef __GNUG__ _tmpfile = nil; #endif --- 276,282 ---- _curMap = nil; _substMap = new ObjectMap(nil, COMPONENT); _clipboard = new Clipboard; ! #ifdef __GNUC__ _tmpfile = nil; #endif *************** *** 367,373 **** _clipboard->DeleteComps(); delete _clipboard; ! #ifdef __GNUG__ if (_tmpfile != nil) { unlink(_tmpfile); delete _tmpfile; --- 367,373 ---- _clipboard->DeleteComps(); delete _clipboard; ! #ifdef __GNUC__ if (_tmpfile != nil) { unlink(_tmpfile); delete _tmpfile; *************** *** 668,674 **** ObjectMap empty_subst_map(obj, base_id); // copies _substMap = &empty_subst_map; ! #ifdef __GNUG__ filebuf obuf, ibuf; ObjectMap* prevMap = _curMap; char* prevTmp = _tmpfile; --- 668,674 ---- ObjectMap empty_subst_map(obj, base_id); // copies _substMap = &empty_subst_map; ! #ifdef __GNUC__ filebuf obuf, ibuf; ObjectMap* prevMap = _curMap; char* prevTmp = _tmpfile; Index: OverlayUnidraw/aceimport.c diff -c OverlayUnidraw/aceimport.c:1.2 OverlayUnidraw/aceimport.c:1.3 *** OverlayUnidraw/aceimport.c:1.2 Wed Jul 24 15:25:09 2002 --- src/OverlayUnidraw/aceimport.c Fri Aug 2 11:35:24 2002 *************** *** 89,95 **** } return _inptr->good() ? 0 : -1; #else ! #if __GNUG__<3 filebuf fbuf; if(fbuf.attach(fd)==0) return -1; #else --- 89,95 ---- } return _inptr->good() ? 0 : -1; #else ! #if __GNUC__<3 filebuf fbuf; if(fbuf.attach(fd)==0) return -1; #else Index: OverlayUnidraw/aceimport.h diff -c OverlayUnidraw/aceimport.h:1.4 OverlayUnidraw/aceimport.h:1.5 *** OverlayUnidraw/aceimport.h:1.4 Mon Jul 29 17:45:08 2002 --- src/OverlayUnidraw/aceimport.h Fri Aug 2 11:35:24 2002 *************** *** 64,70 **** // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! #if __GNUG__<3 filebuf* _filebuf; #else fileptr_filebuf* _filebuf; // associated input buffer# --- 64,70 ---- // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! #if __GNUC__<3 filebuf* _filebuf; #else fileptr_filebuf* _filebuf; // associated input buffer# Index: OverlayUnidraw/ovcatalog.c diff -c OverlayUnidraw/ovcatalog.c:1.3 OverlayUnidraw/ovcatalog.c:1.4 *** OverlayUnidraw/ovcatalog.c:1.3 Wed Jul 24 11:00:26 2002 --- src/OverlayUnidraw/ovcatalog.c Fri Aug 2 11:35:24 2002 *************** *** 181,187 **** _valid = true; } else { ! #if __GNUG__<3 filebuf fbuf; if (strcmp(name, "-") == 0) { _valid = fbuf.attach(fileno(stdin)) != 0; --- 181,187 ---- _valid = true; } else { ! #if __GNUC__<3 filebuf fbuf; if (strcmp(name, "-") == 0) { _valid = fbuf.attach(fileno(stdin)) != 0; Index: OverlayUnidraw/ovcomps.c diff -c OverlayUnidraw/ovcomps.c:1.2 OverlayUnidraw/ovcomps.c:1.3 *** OverlayUnidraw/ovcomps.c:1.2 Thu Aug 1 11:39:47 2002 --- src/OverlayUnidraw/ovcomps.c Fri Aug 2 11:35:24 2002 *************** *** 60,66 **** #include <unistd.h> #include <stdlib.h> ! #if __GNUG__<3 extern "C" { char* realpath(); --- 60,66 ---- #include <unistd.h> #include <stdlib.h> ! #if __GNUC__<2 || __GNUC__==2 && __GNUC_MINOR__<96 extern "C" { char* realpath(); Index: OverlayUnidraw/ovfile.c diff -c OverlayUnidraw/ovfile.c:1.2 OverlayUnidraw/ovfile.c:1.3 *** OverlayUnidraw/ovfile.c:1.2 Wed Jul 24 11:00:26 2002 --- src/OverlayUnidraw/ovfile.c Fri Aug 2 11:35:24 2002 *************** *** 220,226 **** OvImportCmd impcmd((Editor*)nil); FILE* fptr = popen(pathname, "r"); if (fptr) { ! #if __GNUG__<3 ifstream ifs; ifs.rdbuf()->attach(fileno(fptr)); #else --- 220,226 ---- OvImportCmd impcmd((Editor*)nil); FILE* fptr = popen(pathname, "r"); if (fptr) { ! #if __GNUC__<3 ifstream ifs; ifs.rdbuf()->attach(fileno(fptr)); #else Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.11 OverlayUnidraw/ovimport.c:1.12 *** OverlayUnidraw/ovimport.c:1.11 Wed Jul 31 15:11:09 2002 --- src/OverlayUnidraw/ovimport.c Fri Aug 2 11:35:24 2002 *************** *** 116,122 **** implementPtrList(StreamList,istream) implementPtrList(HandlerList,ReadImageHandler) ! #if __GNUG__>=3 static char newline; #endif --- 116,122 ---- implementPtrList(StreamList,istream) implementPtrList(HandlerList,ReadImageHandler) ! #if __GNUC__>=3 static char newline; #endif *************** *** 462,468 **** if (pos >= 0) { ! #if __GNUG__<3 char* buffer; in.gets(&buffer); #else --- 462,468 ---- if (pos >= 0) { ! #if __GNUC__<3 char* buffer; in.gets(&buffer); #else *************** *** 478,484 **** u_long width, height; do { ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 478,484 ---- u_long width, height; do { ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); *************** *** 487,493 **** } while (buffer[0] == '#'); sscanf(buffer, "%d %d", &width, &height); ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 487,493 ---- } while (buffer[0] == '#'); sscanf(buffer, "%d %d", &width, &height); ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); *************** *** 599,605 **** clr_fl(_fd, O_NONBLOCK); ! #if __GNUG__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(_fd); #else --- 599,605 ---- clr_fl(_fd, O_NONBLOCK); ! #if __GNUC__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(_fd); #else *************** *** 608,614 **** istream* ifs = new istream(fbuf); #endif _helper.add_stream(ifs); ! #if __GNUG__>=3 _helper.add_file(ifptr); #endif boolean empty; --- 608,614 ---- istream* ifs = new istream(fbuf); #endif _helper.add_stream(ifs); ! #if __GNUC__>=3 _helper.add_file(ifptr); #endif boolean empty; *************** *** 1093,1099 **** } else if (!is_url()) { fptr = popen(path_, "r"); if (fptr) { ! #if __GNUG__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(fptr)); #else --- 1093,1099 ---- } else if (!is_url()) { fptr = popen(path_, "r"); if (fptr) { ! #if __GNUC__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(fptr)); #else *************** *** 1399,1405 **** if (fptr) { ! #if __GNUG__<3 ifstream* in = new ifstream; in->rdbuf()->attach(fileno(fptr)); #else --- 1399,1405 ---- if (fptr) { ! #if __GNUC__<3 ifstream* in = new ifstream; in->rdbuf()->attach(fileno(fptr)); #else *************** *** 1488,1494 **** gunzip_fptr = popen(buffer, "r"); helper.add_pipe(gunzip_fptr); if (gunzip_fptr) { ! #if __GNUG__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(gunzip_fptr)); #else --- 1488,1494 ---- gunzip_fptr = popen(buffer, "r"); helper.add_pipe(gunzip_fptr); if (gunzip_fptr) { ! #if __GNUC__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(gunzip_fptr)); #else *************** *** 1501,1507 **** } else { int newfd = Pipe_Filter(instrm, "gunzip -c"); if (newfd != -1) { ! #if __GNUG__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(newfd); #else --- 1501,1507 ---- } else { int newfd = Pipe_Filter(instrm, "gunzip -c"); if (newfd != -1) { ! #if __GNUC__<3 ifstream* ifs = new ifstream; ifs->rdbuf()->attach(newfd); #else *************** *** 1548,1554 **** new_fd = fileno(pptr); } else new_fd = Pipe_Filter(*in, "tf=`ivtmpnam`;pstoedit -f idraw - $tf.%d;cat $tf.*;rm $tf.*"); ! #if __GNUG__<3 ifstream new_in; new_in.rdbuf()->attach(new_fd); #else --- 1548,1554 ---- new_fd = fileno(pptr); } else new_fd = Pipe_Filter(*in, "tf=`ivtmpnam`;pstoedit -f idraw - $tf.%d;cat $tf.*;rm $tf.*"); ! #if __GNUC__<3 ifstream new_in; new_in.rdbuf()->attach(new_fd); #else *************** *** 1586,1592 **** FILE* pptr = popen(buffer, "r"); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUG__<3 ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else --- 1586,1592 ---- FILE* pptr = popen(buffer, "r"); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUC__<3 ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else *************** *** 1650,1656 **** helper.add_pipe(pptr); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUG__<3 ifstream* new_in = new ifstream; new_in->rdbuf()->attach(fileno(pptr)); #else --- 1650,1656 ---- helper.add_pipe(pptr); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUC__<3 ifstream* new_in = new ifstream; new_in->rdbuf()->attach(fileno(pptr)); #else *************** *** 1680,1686 **** FILE* pptr = popen(buffer, "r"); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUG__<3 ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else --- 1680,1686 ---- FILE* pptr = popen(buffer, "r"); if (pptr) { cerr << "input opened with " << buffer << "\n"; ! #if __GNUC__<3 ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else *************** *** 1943,1949 **** OverlayRaster* OvImportCmd::PGM_Raster (istream& in, boolean ascii) { ! #if __GNUG__<3 char* buffer; in.gets(&buffer); #else --- 1943,1949 ---- OverlayRaster* OvImportCmd::PGM_Raster (istream& in, boolean ascii) { ! #if __GNUC__<3 char* buffer; in.gets(&buffer); #else *************** *** 1953,1959 **** #endif do { // CREATOR and other comments ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ); --- 1953,1959 ---- #endif do { // CREATOR and other comments ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ); *************** *** 1963,1969 **** int nrows, ncols; if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) { ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ); --- 1963,1969 ---- int nrows, ncols; if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) { ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ); *************** *** 1971,1977 **** #endif sscanf(buffer, "%d", &nrows); } ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ, '\n'); --- 1971,1977 ---- #endif sscanf(buffer, "%d", &nrows); } ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer, BUFSIZ, '\n'); *************** *** 2381,2387 **** OverlayRaster* OvImportCmd::PPM_Raster (istream& in, boolean ascii) { ! #if __GNUG__<3 char* buffer; in.gets(&buffer); // read magic number #else --- 2381,2387 ---- OverlayRaster* OvImportCmd::PPM_Raster (istream& in, boolean ascii) { ! #if __GNUC__<3 char* buffer; in.gets(&buffer); // read magic number #else *************** *** 2391,2397 **** #endif do { // CREATOR and other comments ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 2391,2397 ---- #endif do { // CREATOR and other comments ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); *************** *** 2400,2406 **** } while (buffer[0] == '#'); int nrows, ncols; sscanf(buffer, "%d %d", &ncols, &nrows); ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 2400,2406 ---- } while (buffer[0] == '#'); int nrows, ncols; sscanf(buffer, "%d %d", &ncols, &nrows); ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); *************** *** 2450,2456 **** fd = outfd; } else { ! #if __GNUG__<3 ifstream in2; in2.rdbuf()->attach(outfd); #else --- 2450,2456 ---- fd = outfd; } else { ! #if __GNUC__<3 ifstream in2; in2.rdbuf()->attach(outfd); #else *************** *** 2463,2469 **** if(close(outfd)==-1) cerr << "error in parent closing last end of the pipes\n"; ! #if __GNUG__>=3 if (infptr) fclose(infptr); #endif } --- 2463,2469 ---- if(close(outfd)==-1) cerr << "error in parent closing last end of the pipes\n"; ! #if __GNUC__>=3 if (infptr) fclose(infptr); #endif } *************** *** 2527,2533 **** } else if(close(pipe1[0])==-1) cerr << "error in child close of front end of pipe\n"; ! #if __GNUG__<3 ofstream out; out.rdbuf()->attach(pipe1[1]); char buffer[BUFSIZ]; --- 2527,2533 ---- } else if(close(pipe1[0])==-1) cerr << "error in child close of front end of pipe\n"; ! #if __GNUC__<3 ofstream out; out.rdbuf()->attach(pipe1[1]); char buffer[BUFSIZ]; *************** *** 2708,2714 **** Bitmap* OvImportCmd::PBM_Bitmap (istream& in) { Bitmap* bitmap = nil; ! #if __GNUG__<3 char* buffer; in.gets(&buffer); #else --- 2708,2714 ---- Bitmap* OvImportCmd::PBM_Bitmap (istream& in) { Bitmap* bitmap = nil; ! #if __GNUC__<3 char* buffer; in.gets(&buffer); #else *************** *** 2720,2726 **** boolean asciiflag = strncmp("P1", buffer, 2) == 0; do { // CREATOR and other comments ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 2720,2726 ---- boolean asciiflag = strncmp("P1", buffer, 2) == 0; do { // CREATOR and other comments ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); *************** *** 2730,2736 **** int nrows, ncols; if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) { ! #if __GNUG__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); --- 2730,2736 ---- int nrows, ncols; if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) { ! #if __GNUC__<3 in.gets(&buffer); #else in.get(buffer,BUFSIZ); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.5 ComUnidraw/unifunc.c:1.6 *** ComUnidraw/unifunc.c:1.5 Wed Jul 24 15:25:12 2002 --- src/ComUnidraw/unifunc.c Fri Aug 2 11:35:30 2002 *************** *** 53,61 **** #include <stdio.h> #include <strstream.h> #include <unistd.h> ! #if __GNUG__>=3 #include <fstream.h> #endif #ifdef HAVE_ACE #include <ComTerp/comhandler.h> --- 53,62 ---- #include <stdio.h> #include <strstream.h> #include <unistd.h> ! #if __GNUC__>=3 #include <fstream.h> #endif + #include <string.h> #ifdef HAVE_ACE #include <ComTerp/comhandler.h> *************** *** 402,408 **** #endif ! #if __GNUG__<3 filebuf fbuf; if (file.is_type(ComValue::StringType)) fbuf.open(file.string_ptr(), "w"); --- 403,409 ---- #endif ! #if __GNUC__<3 filebuf fbuf; if (file.is_type(ComValue::StringType)) fbuf.open(file.string_ptr(), "w"); *************** *** 495,501 **** if (string.is_true()||str.is_true()) out = new strstream(); else ! #if __GNUG__<3 out = new ostream(&fbuf); #else out = new ostream(pfbuf); --- 496,502 ---- if (string.is_true()||str.is_true()) out = new strstream(); else ! #if __GNUC__<3 out = new ostream(&fbuf); #else out = new ostream(pfbuf); *************** *** 561,567 **** } delete out; ! #if __GNUG__>=3 delete pfbuf; #endif --- 562,568 ---- } delete out; ! #if __GNUC__>=3 delete pfbuf; #endif Index: FrameUnidraw/framecatalog.c diff -c FrameUnidraw/framecatalog.c:1.3 FrameUnidraw/framecatalog.c:1.4 *** FrameUnidraw/framecatalog.c:1.3 Wed Jul 24 11:00:31 2002 --- src/FrameUnidraw/framecatalog.c Fri Aug 2 11:35:32 2002 *************** *** 55,67 **** _valid = true; } else { ! #if __GNUG__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); --- 55,67 ---- _valid = true; } else { ! #if __GNUC__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUC__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); *************** *** 71,77 **** } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = fptr ? new fileptr_filebuf(fptr, input) : nil; --- 71,77 ---- } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUC__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = fptr ? new fileptr_filebuf(fptr, input) : nil; *************** *** 85,91 **** } if (_valid) { ! #if __GNUG__<3 istream in(&fbuf); #else istream in(pfbuf); --- 85,91 ---- } if (_valid) { ! #if __GNUC__<3 istream in(&fbuf); #else istream in(pfbuf); *************** *** 114,120 **** } } ! #if __GNUG__>=3 delete pfbuf; #endif } --- 114,120 ---- } } ! #if __GNUC__>=3 delete pfbuf; #endif } Index: GraphUnidraw/graphcatalog.c diff -c GraphUnidraw/graphcatalog.c:1.3 GraphUnidraw/graphcatalog.c:1.4 *** GraphUnidraw/graphcatalog.c:1.3 Wed Jul 24 11:00:33 2002 --- src/GraphUnidraw/graphcatalog.c Fri Aug 2 11:35:35 2002 *************** *** 52,58 **** #include <stdio.h> #include <stream.h> #include <string.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 52,58 ---- #include <stdio.h> #include <stream.h> #include <string.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 75,87 **** _valid = true; } else { ! #if __GNUG__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); --- 75,87 ---- _valid = true; } else { ! #if __GNUC__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUC__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); *************** *** 91,97 **** } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = new fileptr_filebuf(fptr, input); --- 91,97 ---- } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUC__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = new fileptr_filebuf(fptr, input); *************** *** 105,111 **** } if (_valid) { ! #if __GNUG__<3 istream in(&fbuf); #else istream in(pfbuf); --- 105,111 ---- } if (_valid) { ! #if __GNUC__<3 istream in(&fbuf); #else istream in(pfbuf); *************** *** 131,137 **** comp = nil; } } ! #if __GNUG__>=3 delete pfbuf; #endif } --- 131,137 ---- comp = nil; } } ! #if __GNUC__>=3 delete pfbuf; #endif } Index: DrawServ/drawcatalog.c diff -c DrawServ/drawcatalog.c:1.4 DrawServ/drawcatalog.c:1.5 *** DrawServ/drawcatalog.c:1.4 Wed Jul 24 11:00:35 2002 --- src/DrawServ/drawcatalog.c Fri Aug 2 11:35:37 2002 *************** *** 37,43 **** #include <iostream.h> #include <stdio.h> #include <string.h> ! #if __GNUG__>=3 #include <fstream.h> #endif --- 37,43 ---- #include <iostream.h> #include <stdio.h> #include <string.h> ! #if __GNUC__>=3 #include <fstream.h> #endif *************** *** 60,72 **** _valid = true; } else { ! #if __GNUG__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); --- 60,72 ---- _valid = true; } else { ! #if __GNUC__<3 filebuf fbuf; #else filebuf* pfbuf = nil; #endif if (strcmp(name, "-") == 0) { ! #if __GNUC__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else pfbuf = new fileptr_filebuf(stdin, input); *************** *** 76,82 **** } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = new fileptr_filebuf(fptr, input); --- 76,82 ---- } else { fptr = fopen(name, "r"); fptr = OvImportCmd::CheckCompression(fptr, name, compressed); ! #if __GNUC__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else pfbuf = new fileptr_filebuf(fptr, input); *************** *** 90,96 **** } if (_valid) { ! #if __GNUG__<3 istream in(&fbuf); #else istream in(pfbuf); --- 90,96 ---- } if (_valid) { ! #if __GNUC__<3 istream in(&fbuf); #else istream in(pfbuf); *************** *** 116,122 **** comp = nil; } } ! #if __GNUG__>=3 delete pfbuf; #endif } --- 116,122 ---- comp = nil; } } ! #if __GNUC__>=3 delete pfbuf; #endif } Index: include_iviv-2_6/minmax.h diff -c include_iviv-2_6/minmax.h:1.2 include_iviv-2_6/minmax.h:1.3 *** include_iviv-2_6/minmax.h:1.2 Fri Jun 28 12:46:46 2002 --- src/include/IV-2_6/InterViews/minmax.h Fri Aug 2 11:35:40 2002 *************** *** 59,65 **** #endif /* !defined(min) && !defined(max) */ ! #if __GNUG__<3 && 0 /* removed, used Math::round from now on */ inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } #endif --- 59,65 ---- #endif /* !defined(min) && !defined(max) */ ! #if __GNUC__<3 && 0 /* removed, used Math::round from now on */ inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } #endif Index: include_unidraw/catalog.h diff -c include_unidraw/catalog.h:1.2 include_unidraw/catalog.h:1.3 *** include_unidraw/catalog.h:1.2 Thu Nov 29 07:39:32 2001 --- src/include/Unidraw/catalog.h Fri Aug 2 11:35:43 2002 *************** *** 227,233 **** ObjectMap* _curMap; ObjectMap* _substMap; float _fileVersion; ! #ifdef __GNUG__ char* _tmpfile; #endif --- 227,233 ---- ObjectMap* _curMap; ObjectMap* _substMap; float _fileVersion; ! #ifdef __GNUC__ char* _tmpfile; #endif Index: include_std/fstream.h diff -c include_std/fstream.h:1.2 include_std/fstream.h:1.3 *** include_std/fstream.h:1.2 Wed Jul 24 11:00:42 2002 --- src/include/ivstd/fstream.h Fri Aug 2 11:35:46 2002 *************** *** 1,10 **** #ifndef _iv_fstream_ #define _iv_fstream_ #include_next <fstream.h> ! #if __GNUG__>=3 #define input ios_base::in #define output ios_base::out ! #if __GNUG__>3 || __GNUG__==3 && __GNUC_MINOR__>0 #include <ext/stdio_filebuf.h> #define fileptr_filebuf __gnu_cxx::stdio_filebuf<char> #else --- 1,10 ---- #ifndef _iv_fstream_ #define _iv_fstream_ #include_next <fstream.h> ! #if __GNUC__>=3 #define input ios_base::in #define output ios_base::out ! #if __GNUC__>3 || __GNUC__==3 && __GNUC_MINOR__>0 #include <ext/stdio_filebuf.h> #define fileptr_filebuf __gnu_cxx::stdio_filebuf<char> #else Index: include_std/iostream.h diff -c include_std/iostream.h:1.2 include_std/iostream.h:1.3 *** include_std/iostream.h:1.2 Fri May 17 13:54:10 2002 --- src/include/ivstd/iostream.h Fri Aug 2 11:35:46 2002 *************** *** 3,9 **** #include <iosfwd> #include_next <iostream.h> ! #if __GNUG__>=3 #if 0 #include <unistd.h> --- 3,9 ---- #include <iosfwd> #include_next <iostream.h> ! #if __GNUC__>=3 #if 0 #include <unistd.h> Index: include_std/stdio.h diff -c include_std/stdio.h:1.2 include_std/stdio.h:1.3 *** include_std/stdio.h:1.2 Wed Feb 20 11:54:20 2002 --- src/include/ivstd/stdio.h Fri Aug 2 11:35:46 2002 *************** *** 1,6 **** --- 1,8 ---- #ifndef ivtools_stdio_h #define ivtools_stdio_h + #include <string.h> /* to work-around RedHat 7.* problem */ + #if defined(__cplusplus) #include_next <stdio.h> #else Index: include_std/version.h diff -c include_std/version.h:1.6 include_std/version.h:1.7 *** include_std/version.h:1.6 Thu Aug 1 11:52:22 2002 --- src/include/ivstd/version.h Fri Aug 2 11:35:46 2002 *************** *** 1,3 **** ! #define IvtoolsVersion 1.0.5 ! #define VersionString "1.0.5" ! #define ReleaseString "ivtools-1.0.5" --- 1,3 ---- ! #define IvtoolsVersion 1.0.6 ! #define VersionString "1.0.6" ! #define ReleaseString "ivtools-1.0.6" Index: utils_ivtools/thrower.cc diff -c utils_ivtools/thrower.cc:1.1 utils_ivtools/thrower.cc:1.2 *** utils_ivtools/thrower.cc:1.1 Fri Nov 2 13:07:54 2001 --- src/utils/thrower.cc Fri Aug 2 11:35:48 2002 *************** *** 23,30 **** */ #include "thrower.h" ! // Yes this is utterly simple, but can be revised for more sofisticated // error handling without editing all of the other files involved in // the downloader program. --- 23,31 ---- */ #include "thrower.h" + #include <stdlib.h> ! // Yes this is utterly simple, but can be revised for more sophisticated // error handling without editing all of the other files involved in // the downloader program. Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.7 config_ivtools/params.def:1.8 *** config_ivtools/params.def:1.7 Thu Aug 1 11:52:24 2002 --- config/params.def Fri Aug 2 11:35:52 2002 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.5 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.6 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.0.5 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.0.6 #endif VERSION = Version *** /dev/null Fri Aug 2 11:35:55 PDT 2002 --- patches/ivtools-020802-johnston-064 *************** patches/ivtools-020802-johnston-064 *** 0 **** --- 1 ---- + ivtools-020802-johnston-064 |
From: <ivt...@li...> - 2002-08-01 18:56:23
|
Patch: ivtools-020801-johnston-063 For: ivtools-1.0.4 Author: joh...@us... Subject: last patch leading up to ivtools-1.0.5 Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - last patch leading up to ivtools-1.0.5 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.6 top_ivtools/CHANGES:1.7 *** top_ivtools/CHANGES:1.6 Fri Jun 21 14:01:02 2002 --- ./CHANGES Thu Aug 1 11:52:10 2002 *************** *** 1,3 **** --- 1,37 ---- + August 1st, 2002 ivtools-1.0.5 + + - various compile time fixes for Solaris and Cygwin. + + - a proper fix for handling non-idraw PostScript. An improper fix was + introduced in ivtools-1.0.3 that made all idraw format files get + filtered through pstoedit (if you had it). Pointed out by Todd Gruhn. + + - changes required to compile ivtools with gcc-3.1. Most all in the area + of migrating from use of an fstream constructor that accepted a FILE* + to use of a derivative class (__gnu_cxx::stdio_filebuf<char>) that does + the same. Wrapped up the difference between 3.0.* and 3.1 by + conditionally defining a fileptr_fstream in src/include/ivstd/fstream.h + to filebuf for 3.0.* and __gnu_cxx::stdio_filebuf<char> for 3.1. + + ** Constant evolution of the behavior and API of filebuf has been the + single most challenging aspect of keeping ivtools compiling with gcc + and working for the past decade. I really hope things will be stable + for the next decade. ** + + - fixes for using ACE and ivtools with gcc-3.1 + + - fix up compiling with ACE using less than gcc-3.* + + - disable incremental display while incrementally loading from a URL. + A placeholder raster still gets inserted before the connection is + established, and the rest of the download and display is asynchronous, + which avoids hanging on a net connection. + + - compilation fixes based on feedback from Gregory Kriehn. Mostly + adding #include <string.h> where missing. Don't know why this wasn't + a problem in every environment. Should improve support for RedHat 7.*. + + June 21st, 2002 ivtools-1.0.4 - give special meaning to a set of parentheses that proceed the Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.8 top_ivtools/INSTALL:1.9 *** top_ivtools/INSTALL:1.8 Fri Jun 21 14:01:02 2002 --- ./INSTALL Thu Aug 1 11:52:10 2002 *************** *** 1,7 **** INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.4 from source, the short version: ./configure make --- 1,7 ---- INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.5 from source, the short version: ./configure make *************** *** 10,16 **** And if that doesn't work... ! Instructions for building ivtools-1.0.4 from source, the long version: 0. Compilation Environment --- 10,16 ---- And if that doesn't work... ! Instructions for building ivtools-1.0.5 from source, the long version: 0. Compilation Environment *************** *** 25,35 **** with "make -v" 0.c. The gcc compiler. Recently we've been building and testing with ! egcs-1.0.3, gcc-2.95.*, and gcc-3.0.1. gcc-2.8.1 would still work, as ! probably would gcc-2.7.2. You will also need an equivalent copy of ! libstdc++. libstdc++ comes bundled with gcc-3.0. Before that the ! libstdc++ version numbers stay roughly in synch with the gcc version ! numbers. If you have gcc-2.8.1 you'd want libstdc++-2.8.1, etc.. ** NOTE ** Do not use gcc-2.96. See http://www.ivtools.org/ivtools/faq.html#gcc-2.96-problem for more --- 25,36 ---- with "make -v" 0.c. The gcc compiler. Recently we've been building and testing with ! gcc-2.95.*, gcc-3.0.*, and gcc-3.1. egsc-1.0.3 would probably still ! work, as would gcc-2.8.1 and gcc-2.7.2. You will also need an ! equivalent copy of libstdc++. libstdc++ comes bundled with gcc-3.0 ! and greater. Before that the libstdc++ version numbers stay roughly ! in synch with the gcc version numbers. If you have gcc-2.8.1 you'd ! want libstdc++-2.8.1, etc.. ** NOTE ** Do not use gcc-2.96. See http://www.ivtools.org/ivtools/faq.html#gcc-2.96-problem for more Index: top_ivtools/README diff -c top_ivtools/README:1.7 top_ivtools/README:1.8 *** top_ivtools/README:1.7 Fri Jun 21 14:01:03 2002 --- ./README Thu Aug 1 11:52:10 2002 *************** *** 2,8 **** README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.4. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.5. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.5 top_ivtools/VERSION:1.6 *** top_ivtools/VERSION:1.5 Fri Jun 21 14:01:03 2002 --- ./VERSION Thu Aug 1 11:52:10 2002 *************** *** 1 **** ! Release 1.0.4 --- 1 ---- ! Release 1.0.5 Index: include_std/version.h diff -c include_std/version.h:1.5 include_std/version.h:1.6 *** include_std/version.h:1.5 Fri Jun 21 14:02:04 2002 --- src/include/ivstd/version.h Thu Aug 1 11:52:22 2002 *************** *** 1,3 **** ! #define IvtoolsVersion 1.0.4 ! #define VersionString "1.0.4" ! #define ReleaseString "ivtools-1.0.4" --- 1,3 ---- ! #define IvtoolsVersion 1.0.5 ! #define VersionString "1.0.5" ! #define ReleaseString "ivtools-1.0.5" Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.6 config_ivtools/params.def:1.7 *** config_ivtools/params.def:1.6 Fri Jun 21 14:02:12 2002 --- config/params.def Thu Aug 1 11:52:24 2002 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.4 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.5 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.0.4 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.0.5 #endif VERSION = Version *** /dev/null Thu Aug 1 11:52:26 PDT 2002 --- patches/ivtools-020801-johnston-063 *************** patches/ivtools-020801-johnston-063 *** 0 **** --- 1 ---- + ivtools-020801-johnston-063 |
From: <ivt...@li...> - 2002-08-01 18:45:28
|
Patch: ivtools-020801-johnston-062 For: ivtools-1.0.4 Author: joh...@us... Subject: compilation fixes based on feedback from Gregory Kriehn Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - compilation fixes based on feedback from Gregory Kriehn. Mostly adding #include <string.h> where missing. Don't know why this wasn't a problem in every environment. Index: ComTerp/symbolfunc.c diff -c ComTerp/symbolfunc.c:1.1 ComTerp/symbolfunc.c:1.2 *** ComTerp/symbolfunc.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/symbolfunc.c Thu Aug 1 11:39:29 2002 *************** *** 33,38 **** --- 33,39 ---- #include <Unidraw/iterator.h> #include <iostream.h> + #include <string.h> #define TITLE "SymbolFunc" Index: src_dispatch/rpcbuf.c diff -c src_dispatch/rpcbuf.c:1.3 src_dispatch/rpcbuf.c:1.4 *** src_dispatch/rpcbuf.c:1.3 Mon Jul 29 17:45:01 2002 --- src/Dispatch/rpcbuf.c Thu Aug 1 11:39:33 2002 *************** *** 44,50 **** #define SOMAXCONN 5 #endif ! #if defined(__sun) || !defined(__svr4__) extern "C" { int accept(); int bind(); --- 44,50 ---- #define SOMAXCONN 5 #endif ! #if defined(__sun) && !defined(__svr4__) extern "C" { int accept(); int bind(); Index: Time/timeglyph.c diff -c Time/timeglyph.c:1.2 Time/timeglyph.c:1.3 *** Time/timeglyph.c:1.2 Wed Jul 24 11:00:10 2002 --- src/Time/timeglyph.c Thu Aug 1 11:39:35 2002 *************** *** 37,42 **** --- 37,43 ---- #include <OS/string.h> #include <stdio.h> #include <stdlib.h> + #include <string.h> declareActionCallback(ObservableTime) implementActionCallback(ObservableTime) Index: Unidraw/gvupdater.c diff -c Unidraw/gvupdater.c:1.1 Unidraw/gvupdater.c:1.2 *** Unidraw/gvupdater.c:1.1 Fri Nov 2 13:06:49 2001 --- src/Unidraw/gvupdater.c Thu Aug 1 11:39:44 2002 *************** *** 38,43 **** --- 38,44 ---- #include <IV-2_6/_enter.h> #include <iostream.h> + #include <stdlib.h> /*****************************************************************************/ Index: OverlayUnidraw/ovcomps.c diff -c OverlayUnidraw/ovcomps.c:1.1 OverlayUnidraw/ovcomps.c:1.2 *** OverlayUnidraw/ovcomps.c:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/ovcomps.c Thu Aug 1 11:39:47 2002 *************** *** 58,63 **** --- 58,64 ---- #include <string.h> #include <sys/param.h> #include <unistd.h> + #include <stdlib.h> #if __GNUG__<3 extern "C" Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.12 ComUnidraw/comeditor.c:1.13 *** ComUnidraw/comeditor.c:1.12 Fri Jun 14 16:07:34 2002 --- src/ComUnidraw/comeditor.c Thu Aug 1 11:39:49 2002 *************** *** 59,64 **** --- 59,65 ---- #include <Attribute/attrlist.h> #include <strstream.h> + #include <string.h> /*****************************************************************************/ Index: DrawServ/drawcomps.c diff -c DrawServ/drawcomps.c:1.1 DrawServ/drawcomps.c:1.2 *** DrawServ/drawcomps.c:1.1 Fri Nov 2 13:07:16 2001 --- src/DrawServ/drawcomps.c Thu Aug 1 11:39:52 2002 *************** *** 39,44 **** --- 39,45 ---- #include <Unidraw/Graphic/picture.h> #include <Attribute/attrlist.h> #include <iostream.h> + #include <string.h> /*****************************************************************************/ Index: utils_ivtools/ivdl.cc diff -c utils_ivtools/ivdl.cc:1.1 utils_ivtools/ivdl.cc:1.2 *** utils_ivtools/ivdl.cc:1.1 Fri Nov 2 13:07:54 2001 --- src/utils/ivdl.cc Thu Aug 1 11:39:57 2002 *************** *** 26,31 **** --- 26,32 ---- #include "downloader.h" #include <iostream.h> + #include <stdlib.h> int main(int argc, char** argv) { *** /dev/null Thu Aug 1 11:40:01 PDT 2002 --- patches/ivtools-020801-johnston-062 *************** patches/ivtools-020801-johnston-062 *** 0 **** --- 1 ---- + ivtools-020801-johnston-062 |
From: <ivt...@li...> - 2002-07-31 22:17:31
|
Patch: ivtools-020731-johnston-061 For: ivtools-1.0.4 Author: joh...@us... Subject: disable incremental display while loading from URL Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - disable incremental display while incrementally loading from a URL. A placeholder raster still gets inserted before the connection is established, and the rest of the download and display is asynchronous, which avoids hanging on a net connection. Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.10 OverlayUnidraw/ovimport.c:1.11 *** OverlayUnidraw/ovimport.c:1.10 Wed Jul 24 11:00:26 2002 --- src/OverlayUnidraw/ovimport.c Wed Jul 31 15:11:09 2002 *************** *** 29,34 **** --- 29,37 ---- */ // #define OPEN_DRAWTOOL_URL // define for drawtool document loading from a URL + // #define RASTER_INCREMENTAL_DISPLAY // enable incremental display when doing + // incremental download + #include <OverlayUnidraw/grayraster.h> #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovclasses.h> *************** *** 560,565 **** --- 563,569 ---- rr->GetOverlayRaster()->rep()->modified_ = true; OverlayPainter::Uncache(_itr->raster()); + #ifdef RASTER_INCREMENTAL_DISPLAY // sets the damage indicator on the view side raster graphic // in RasterOvView::Update *************** *** 569,574 **** --- 573,579 ---- rr->damage_done(0); unidraw->Update(); + #endif } _save.seekp(0); *************** *** 654,659 **** --- 659,671 ---- } else if (stat == 0) { // eof // cerr << "im: " << _fd << ", EOF, closing" << endl; + + #ifndef RASTER_INCREMENTAL_DISPLAY + _comp->Notify(); + // rr->damage_done(0); + unidraw->Update(); + #endif + delete this; return -1; // don't ever call me again (i.e., detach me) } *** /dev/null Wed Jul 31 15:11:25 PDT 2002 --- patches/ivtools-020731-johnston-061 *************** patches/ivtools-020731-johnston-061 *** 0 **** --- 1 ---- + ivtools-020731-johnston-061 |
From: <ivt...@li...> - 2002-07-30 00:49:33
|
Patch: ivtools-020729-johnston-060 For: ivtools-1.0.4 Author: joh...@us... Subject: fix up compiling with ACE using < gcc-3.* Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fix up compiling with ACE using less than gcc-3.* Index: src_iv/Imakefile diff -c src_iv/Imakefile:1.2 src_iv/Imakefile:1.3 *** src_iv/Imakefile:1.2 Mon Jan 14 16:28:11 2002 --- src/IV/Imakefile Mon Jul 29 17:44:59 2002 *************** *** 195,201 **** DispatchObj(iohandler) #if BuildRPCClasses DispatchObj(iostreamb) ! DispatchObj(rpcbuf) DispatchObj(rpchdr) DispatchObj(rpcpeer) DispatchObj(rpcreader) --- 195,201 ---- DispatchObj(iohandler) #if BuildRPCClasses DispatchObj(iostreamb) ! DispatchObjFlags(rpcbuf,-DSOCKLEN_T_DEFINED=$(SOCKLEN_T_DEFINED)) DispatchObj(rpchdr) DispatchObj(rpcpeer) DispatchObj(rpcreader) Index: src_dispatch/rpcbuf.c diff -c src_dispatch/rpcbuf.c:1.2 src_dispatch/rpcbuf.c:1.3 *** src_dispatch/rpcbuf.c:1.2 Wed Feb 20 11:53:32 2002 --- src/Dispatch/rpcbuf.c Mon Jul 29 17:45:01 2002 *************** *** 55,60 **** --- 55,64 ---- } #endif + #if !defined(SOCKLEN_T_DEFINED) || !SOCKLEN_T_DEFINED + typedef int socklen_t; + #endif + // I need a pointer to an iostreamb so I can insert and extract values // in the length field of RPC requests. If I don't have a stream, I // won't allow you to call start_request(). Index: AttrGlyph/attredit.c diff -c AttrGlyph/attredit.c:1.1 AttrGlyph/attredit.c:1.2 *** AttrGlyph/attredit.c:1.1 Fri Nov 2 13:06:38 2001 --- src/AttrGlyph/attredit.c Mon Jul 29 17:45:06 2002 *************** *** 43,49 **** #include <strstream.h> #include <string.h> ! #if defined(LibStdCPlusPlus2) || defined(LibStdCPlusPlus3) #define STL_VECTOR #include <vector.h> #endif --- 43,50 ---- #include <strstream.h> #include <string.h> ! #if __GNUC__==2 && __GNUC_MINOR__<=7 ! #else #define STL_VECTOR #include <vector.h> #endif Index: OverlayUnidraw/aceimport.h diff -c OverlayUnidraw/aceimport.h:1.3 OverlayUnidraw/aceimport.h:1.4 *** OverlayUnidraw/aceimport.h:1.3 Wed Jul 24 15:25:09 2002 --- src/OverlayUnidraw/aceimport.h Mon Jul 29 17:45:08 2002 *************** *** 64,70 **** // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! fileptr_filebuf* _filebuf; // associated input buffer istream* _inptr; // associated input stream FILE* _infptr; // associated FILE* }; --- 64,74 ---- // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! #if __GNUG__<3 ! filebuf* _filebuf; ! #else ! fileptr_filebuf* _filebuf; // associated input buffer# ! #endif istream* _inptr; // associated input stream FILE* _infptr; // associated FILE* }; *** /dev/null Mon Jul 29 17:45:14 PDT 2002 --- patches/ivtools-020729-johnston-060 *************** patches/ivtools-020729-johnston-060 *** 0 **** --- 1 ---- + ivtools-020729-johnston-060 |
From: <ivt...@li...> - 2002-07-24 22:29:09
|
Patch: ivtools-020724-johnston-059 For: ivtools-1.0.4 Author: joh...@us... Subject: gcc-3.1 with ACE Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fixes for using ACE and ivtools with gcc-3.1 Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.4 ComTerp/comhandler.c:1.5 *** ComTerp/comhandler.c:1.4 Wed Jul 24 11:00:04 2002 --- src/ComTerp/comhandler.c Wed Jul 24 15:24:42 2002 *************** *** 28,33 **** --- 28,34 ---- #include <ComTerp/comterpserv.h> #include <iostream.h> + #include <fstream.h> #if __GNUC__==2 && __GNUC_MINOR__<=7 #else #include <vector.h> Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.2 ComTerp/ctrlfunc.c:1.3 *** ComTerp/ctrlfunc.c:1.2 Wed Jul 24 11:00:04 2002 --- src/ComTerp/ctrlfunc.c Wed Jul 24 15:24:42 2002 *************** *** 26,31 **** --- 26,32 ---- #include <ComTerp/comvalue.h> #include <ComTerp/comterpserv.h> #include <Attribute/attrlist.h> + #include <fstream.h> #ifdef HAVE_ACE #include <ace/SOCK_Connector.h> Index: comterp/main.c diff -c comterp/main.c:1.1 comterp/main.c:1.2 *** comterp/main.c:1.1 Fri Nov 2 13:04:52 2001 --- src/comterp_/main.c Wed Jul 24 15:24:44 2002 *************** *** 32,37 **** --- 32,39 ---- static const char *const SERVER_HOST = ACE_DEFAULT_SERVER_HOST; #endif + #include <fstream.h> + #include <iostream.h> #include <string.h> *************** *** 131,137 **** obuf.attach(server.get_handle()); #else FILE* ofptr = nil; ! filebuf obuf(ofptr = fdopen(server.get_handle(), "w"), ios_base::out); #endif ostream out(&obuf); --- 133,139 ---- obuf.attach(server.get_handle()); #else FILE* ofptr = nil; ! fileptr_filebuf obuf(ofptr = fdopen(server.get_handle(), "w"), ios_base::out); #endif ostream out(&obuf); *************** *** 140,146 **** ibuf.attach(server.get_handle()); #else FILE* ifptr = nil; ! filebuf ibuf(ifptr = fdopen(server.get_handle(), "r"), ios_base::in); #endif istream in(&ibuf); --- 142,148 ---- ibuf.attach(server.get_handle()); #else FILE* ifptr = nil; ! fileptr_filebuf ibuf(ifptr = fdopen(server.get_handle(), "r"), ios_base::in); #endif istream in(&ibuf); *************** *** 190,196 **** filebuf inbuf; inbuf.attach(fileno(inptr)); #else ! filebuf inbuf(inptr, ios_base::in); #endif istream in(&inbuf); --- 192,198 ---- filebuf inbuf; inbuf.attach(fileno(inptr)); #else ! fileptr_filebuf inbuf(inptr, ios_base::in); #endif istream in(&inbuf); *************** *** 200,206 **** obuf.attach(server.get_handle()); #else FILE* ofptr = nil; ! filebuf obuf(fdopen(server.get_handle(), "w"), ios_base::out); #endif ostream out(&obuf); --- 202,208 ---- obuf.attach(server.get_handle()); #else FILE* ofptr = nil; ! fileptr_filebuf obuf(fdopen(server.get_handle(), "w"), ios_base::out); #endif ostream out(&obuf); Index: OverlayUnidraw/aceimport.c diff -c OverlayUnidraw/aceimport.c:1.1 OverlayUnidraw/aceimport.c:1.2 *** OverlayUnidraw/aceimport.c:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/aceimport.c Wed Jul 24 15:25:09 2002 *************** *** 30,35 **** --- 30,36 ---- #include <IVGlyph/importchooser.h> #include <Unidraw/iterator.h> #include <Unidraw/unidraw.h> + #include <fstream.h> #include <stdio.h> /*****************************************************************************/ *************** *** 93,99 **** if(fbuf.attach(fd)==0) return -1; #else if (!_infptr) _infptr = fdopen(fd, "r"); ! filebuf fbuf(_infptr, ios_base::in); #endif istream in(&fbuf); int ch = in.get(); --- 94,100 ---- if(fbuf.attach(fd)==0) return -1; #else if (!_infptr) _infptr = fdopen(fd, "r"); ! fileptr_filebuf fbuf(_infptr, ios_base::in); #endif istream in(&fbuf); int ch = in.get(); Index: OverlayUnidraw/aceimport.h diff -c OverlayUnidraw/aceimport.h:1.2 OverlayUnidraw/aceimport.h:1.3 *** OverlayUnidraw/aceimport.h:1.2 Fri May 17 13:54:01 2002 --- src/OverlayUnidraw/aceimport.h Wed Jul 24 15:25:09 2002 *************** *** 35,41 **** #include <ace/SOCK_Acceptor.h> class OvImportCmd; ! class filebuf; #include <iosfwd> //: handler for import by socket into OverlayUnidraw. --- 35,41 ---- #include <ace/SOCK_Acceptor.h> class OvImportCmd; ! #include <fstream.h> #include <iosfwd> //: handler for import by socket into OverlayUnidraw. *************** *** 64,70 **** // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! filebuf* _filebuf; // associated input buffer istream* _inptr; // associated input stream FILE* _infptr; // associated FILE* }; --- 64,70 ---- // host we are connected to. OvImportCmd* _import_cmd; // associated import command ! fileptr_filebuf* _filebuf; // associated input buffer istream* _inptr; // associated input stream FILE* _infptr; // associated FILE* }; Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.4 ComUnidraw/unifunc.c:1.5 *** ComUnidraw/unifunc.c:1.4 Wed Jul 24 11:00:29 2002 --- src/ComUnidraw/unifunc.c Wed Jul 24 15:25:12 2002 *************** *** 460,466 **** if (handler) { ACE_SOCK_Stream peer = handler->peer(); ofptr = fdopen(peer.get_handle(), "r"); ! pfbuf = new filebuf(ofptr, output); } else #endif --- 460,466 ---- if (handler) { ACE_SOCK_Stream peer = handler->peer(); ofptr = fdopen(peer.get_handle(), "r"); ! pfbuf = new fileptr_filebuf(ofptr, output); } else #endif *************** *** 482,490 **** if (conn.connect (*socket, addr) == -1) ACE_ERROR ((LM_ERROR, "%p\n", "open")); ! pfbuf = new filebuf(ofptr = fdopen(socket->get_handle(), "r"), output); } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) { ! pfbuf = new filebuf(comterp()->handler()->rdfptr(), output); } else #endif pfbuf = new fileptr_filebuf(stdout, output); --- 482,490 ---- if (conn.connect (*socket, addr) == -1) ACE_ERROR ((LM_ERROR, "%p\n", "open")); ! pfbuf = new fileptr_filebuf(ofptr = fdopen(socket->get_handle(), "r"), output); } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) { ! pfbuf = new fileptr_filebuf(comterp()->handler()->rdfptr(), output); } else #endif pfbuf = new fileptr_filebuf(stdout, output); *** /dev/null Wed Jul 24 15:25:31 PDT 2002 --- patches/ivtools-020724-johnston-059 *************** patches/ivtools-020724-johnston-059 *** 0 **** --- 1 ---- + ivtools-020724-johnston-059 |
From: <ivt...@li...> - 2002-07-24 18:10:51
|
Patch: ivtools-020724-johnston-058 For: ivtools-1.0.4 Author: joh...@us... Subject: changed required for gcc-3.1 Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - changes required to compile ivtools with gcc-3.1. Most all in the area of migrating from use of an fstream constructor that accepted a FILE* to use of a derivative class (__gnu_cxx::stdio_filebuf<char>) that does the same. Wrapped up the difference between 3.0.* and 3.1 by conditionally defining a fileptr_fstream in src/include/ivstd/fstream.h to filebuf for 3.0.* and __gnu_cxx::stdio_filebuf<char> for 3.1. Constant evolution of the behavior and API of filebuf has been the single most challenging aspect of keeping ivtools compiling with gcc and working for the past decade. I really hope things will be stable for the next decade. Index: ComUtil/errsys.c diff -c ComUtil/errsys.c:1.3 ComUtil/errsys.c:1.4 *** ComUtil/errsys.c:1.3 Wed Jan 9 15:18:12 2002 --- src/ComUtil/errsys.c Wed Jul 24 11:00:01 2002 *************** *** 134,140 **** MAX_ERROR_OPENS ); /* Attempt to open error file */ ! errpath = getenv( "COMTERP_PATH" ); if (errpath) { strcpy( fullpath, errpath ); strcat( fullpath, "/" ); --- 134,140 ---- MAX_ERROR_OPENS ); /* Attempt to open error file */ ! errpath = (char*)getenv( "COMTERP_PATH" ); if (errpath) { strcpy( fullpath, errpath ); strcat( fullpath, "/" ); Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.3 ComTerp/comhandler.c:1.4 *** ComTerp/comhandler.c:1.3 Wed Mar 20 11:45:54 2002 --- src/ComTerp/comhandler.c Wed Jul 24 11:00:04 2002 *************** *** 127,133 **** #if __GNUG__<3 filebuf obuf(1); #else ! filebuf obuf(stdout, ios_base::out); #endif ostream ostr(&obuf); ostr << "timeexpr result: "; --- 127,133 ---- #if __GNUG__<3 filebuf obuf(1); #else ! fileptr_filebuf obuf(stdout, ios_base::out); #endif ostream ostr(&obuf); ostr << "timeexpr result: "; *************** *** 196,202 **** ostr.flush(); return 0; #else ! filebuf obuf(fd ? wrfptr() : stdout, ios_base::out); ostream ostr(&obuf); ostr << "\n"; ostr.flush(); --- 196,202 ---- ostr.flush(); return 0; #else ! fileptr_filebuf obuf(fd ? wrfptr() : stdout, ios_base::out); ostream ostr(&obuf); ostr << "\n"; ostr.flush(); *************** *** 221,227 **** ostr << "\n"; ostr.flush(); #else ! filebuf obuf(fd ? wrfptr() : stdout, ios_base::out); ostream ostr(&obuf); ostr << "\n"; ostr.flush(); --- 221,227 ---- ostr << "\n"; ostr.flush(); #else ! fileptr_filebuf obuf(fd ? wrfptr() : stdout, ios_base::out); ostream ostr(&obuf); ostr << "\n"; ostr.flush(); Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.5 ComTerp/comterp.c:1.6 *** ComTerp/comterp.c:1.5 Thu Mar 21 16:14:54 2002 --- src/ComTerp/comterp.c Wed Jul 24 11:00:04 2002 *************** *** 291,297 **** filebuf fbufout; fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout)); #else ! filebuf fbufout(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); #endif --- 291,297 ---- filebuf fbufout; fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout)); #else ! fileptr_filebuf fbufout(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); #endif *************** *** 884,890 **** } else fbuf.attach(fileno(stdout)); #else ! filebuf fbuf(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); #endif --- 884,890 ---- } else fbuf.attach(fileno(stdout)); #else ! fileptr_filebuf fbuf(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); #endif *************** *** 1111,1117 **** #if __GNUG__<3 filebuf obuf(1); #else ! filebuf obuf(stdout, ios_base::out); #endif ostream ostr(&obuf); ostr << "err\n"; --- 1111,1117 ---- #if __GNUG__<3 filebuf obuf(1); #else ! fileptr_filebuf obuf(stdout, ios_base::out); #endif ostream ostr(&obuf); ostr << "err\n"; Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.1 ComTerp/comterpserv.c:1.2 *** ComTerp/comterpserv.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/comterpserv.c Wed Jul 24 11:00:04 2002 *************** *** 154,160 **** #else char instr[BUFSIZ]; FILE* ifptr = fdopen(fd, "r"); ! filebuf fbuf(ifptr, ios_base::in); istream in (&fbuf); in.get(instr, BUFSIZ, '\n'); // needs to be generalized with <vector.h> #endif --- 154,160 ---- #else char instr[BUFSIZ]; FILE* ifptr = fdopen(fd, "r"); ! fileptr_filebuf fbuf(ifptr, ios_base::in); istream in (&fbuf); in.get(instr, BUFSIZ, '\n'); // needs to be generalized with <vector.h> #endif *************** *** 198,204 **** fbuf.attach(fd); #else FILE* ofptr = fdopen(fd, "w"); ! filebuf fbuf(ofptr, ios_base::out); #endif ostream out(&fbuf); for (; outpos < bufsize-1 && s[outpos]; outpos++) --- 198,204 ---- fbuf.attach(fd); #else FILE* ofptr = fdopen(fd, "w"); ! fileptr_filebuf fbuf(ofptr, ios_base::out); #endif ostream out(&fbuf); for (; outpos < bufsize-1 && s[outpos]; outpos++) *************** *** 290,296 **** filebuf ibuf; ibuf.open(filename, "r"); #else ! filebuf ibuf(fopen(filename, "r"), ios_base::in); #endif istream istr(&ibuf); ComValue* retval = nil; --- 290,296 ---- filebuf ibuf; ibuf.open(filename, "r"); #else ! fileptr_filebuf ibuf(fopen(filename, "r"), ios_base::in); #endif istream istr(&ibuf); ComValue* retval = nil; *************** *** 314,320 **** filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); ! filebuf obuf(ofptr, ios_base::out); #endif ostream ostr(&obuf); ostr.flush(); --- 314,320 ---- filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); ! fileptr_filebuf obuf(ofptr, ios_base::out); #endif ostream ostr(&obuf); ostr.flush(); *************** *** 335,341 **** filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); ! filebuf obuf(ofptr, ios_base::out); #endif ostream ostr(&obuf); ostr.flush(); --- 335,341 ---- filebuf obuf(handler() ? handler()->get_handle() : 1); #else FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); ! fileptr_filebuf obuf(ofptr, ios_base::out); #endif ostream ostr(&obuf); ostr.flush(); Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.1 ComTerp/ctrlfunc.c:1.2 *** ComTerp/ctrlfunc.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/ctrlfunc.c Wed Jul 24 11:00:04 2002 *************** *** 132,138 **** filebuf ofbuf; ofbuf.attach(socket.get_handle()); #else ! filebuf ofbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&ofbuf); --- 132,138 ---- filebuf ofbuf; ofbuf.attach(socket.get_handle()); #else ! fileptr_filebuf ofbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&ofbuf); *************** *** 148,154 **** char* buf; in.gets(&buf); #else ! filebuf ifbuf(comterp()->handler()->rdfptr(), ios_base::in); istream in(&ifbuf); char buf[BUFSIZ]; in.get(buf, BUFSIZ); --- 148,154 ---- char* buf; in.gets(&buf); #else ! fileptr_filebuf ifbuf(comterp()->handler()->rdfptr(), ios_base::in); istream in(&ifbuf); char buf[BUFSIZ]; in.get(buf, BUFSIZ); Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.2 ComTerp/debugfunc.c:1.3 *** ComTerp/debugfunc.c:1.2 Fri Nov 16 10:25:13 2001 --- src/ComTerp/debugfunc.c Wed Jul 24 11:00:04 2002 *************** *** 95,101 **** } else fbufin.attach(fileno(stdin)); #else ! filebuf fbufin(comterp() && comterp()->handler() && comterp()->handler()->rdfptr() ? comterp()->handler()->rdfptr() : stdin, ios_base::in); #endif istream in(&fbufin); --- 95,101 ---- } else fbufin.attach(fileno(stdin)); #else ! fileptr_filebuf fbufin(comterp() && comterp()->handler() && comterp()->handler()->rdfptr() ? comterp()->handler()->rdfptr() : stdin, ios_base::in); #endif istream in(&fbufin); *************** *** 107,113 **** } else fbufout.attach(fileno(stdout)); #else ! filebuf fbufout(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&fbufout); --- 107,113 ---- } else fbufout.attach(fileno(stdout)); #else ! fileptr_filebuf fbufout(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&fbufout); Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2 *** ComTerp/helpfunc.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/helpfunc.c Wed Jul 24 11:00:04 2002 *************** *** 136,142 **** ostream outs( comterp()->handler() ? ((streambuf*)&fbuf) : (streambuf*)&sbuf ); ostream *out = &outs; #else ! filebuf fbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #if 1 ostream outs(comterp()->handler() ? (streambuf*)&fbuf : (streambuf*)&sbuf); --- 136,142 ---- ostream outs( comterp()->handler() ? ((streambuf*)&fbuf) : (streambuf*)&sbuf ); ostream *out = &outs; #else ! fileptr_filebuf fbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #if 1 ostream outs(comterp()->handler() ? (streambuf*)&fbuf : (streambuf*)&sbuf); Index: ComTerp/iofunc.c diff -c ComTerp/iofunc.c:1.1 ComTerp/iofunc.c:1.2 *** ComTerp/iofunc.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/iofunc.c Wed Jul 24 11:00:04 2002 *************** *** 78,89 **** streambuf* strmbuf = nil; if (stringflag.is_false() && strflag.is_false() && symbolflag.is_false() && symflag.is_false()) { ! filebuf * fbuf = nil; if (comterp()->handler()) { ! fbuf = new filebuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); } else ! fbuf = new filebuf(errflag.is_false() ? stdout : stderr, ios_base::out); strmbuf = fbuf; } else strmbuf = new strstreambuf(); --- 78,89 ---- streambuf* strmbuf = nil; if (stringflag.is_false() && strflag.is_false() && symbolflag.is_false() && symflag.is_false()) { ! fileptr_filebuf * fbuf = nil; if (comterp()->handler()) { ! fbuf = new fileptr_filebuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); } else ! fbuf = new fileptr_filebuf(errflag.is_false() ? stdout : stderr, ios_base::out); strmbuf = fbuf; } else strmbuf = new strstreambuf(); Index: ComTerp/postfunc.c diff -c ComTerp/postfunc.c:1.1 ComTerp/postfunc.c:1.2 *** ComTerp/postfunc.c:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/postfunc.c Wed Jul 24 11:00:04 2002 *************** *** 54,60 **** } else fbuf.attach(fileno(stdout)); #else ! filebuf fbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&fbuf); --- 54,60 ---- } else fbuf.attach(fileno(stdout)); #else ! fileptr_filebuf fbuf(comterp()->handler() && comterp()->handler()->wrfptr() ? comterp()->handler()->wrfptr() : stdout, ios_base::out); #endif ostream out(&fbuf); Index: Time/timeglyph.c diff -c Time/timeglyph.c:1.1 Time/timeglyph.c:1.2 *** Time/timeglyph.c:1.1 Fri Nov 2 13:05:27 2001 --- src/Time/timeglyph.c Wed Jul 24 11:00:10 2002 *************** *** 56,62 **** time_->attach(this); WidgetKit& kit_ = *WidgetKit::instance(); const LayoutKit& layout_ = *LayoutKit::instance(); - Style* s = kit_.style(); Date date(time_->time()->date()); StringList* wdaylist = new StringList(7); --- 56,61 ---- Index: OverlayUnidraw/ovcatalog.c diff -c OverlayUnidraw/ovcatalog.c:1.2 OverlayUnidraw/ovcatalog.c:1.3 *** OverlayUnidraw/ovcatalog.c:1.2 Wed Feb 20 11:54:04 2002 --- src/OverlayUnidraw/ovcatalog.c Wed Jul 24 11:00:26 2002 *************** *** 212,218 **** name = nil; } if (!_valid && !ParamList::urltest(name)) return false; ! filebuf fbuf(stdin_flag ? stdin : fptr, ios_base::in); #endif if (_valid || ParamList::urltest(name)) { --- 212,218 ---- name = nil; } if (!_valid && !ParamList::urltest(name)) return false; ! fileptr_filebuf fbuf(stdin_flag ? stdin : fptr, ios_base::in); #endif if (_valid || ParamList::urltest(name)) { Index: OverlayUnidraw/ovfile.c diff -c OverlayUnidraw/ovfile.c:1.1 OverlayUnidraw/ovfile.c:1.2 *** OverlayUnidraw/ovfile.c:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/ovfile.c Wed Jul 24 11:00:26 2002 *************** *** 224,230 **** ifstream ifs; ifs.rdbuf()->attach(fileno(fptr)); #else ! filebuf fbuf(fptr, ios_base::in); istream ifs(&fbuf); #endif OverlayComp* child = (OverlayComp*) impcmd.Import(ifs); --- 224,230 ---- ifstream ifs; ifs.rdbuf()->attach(fileno(fptr)); #else ! fileptr_filebuf fbuf(fptr, ios_base::in); istream ifs(&fbuf); #endif OverlayComp* child = (OverlayComp*) impcmd.Import(ifs); Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.9 OverlayUnidraw/ovimport.c:1.10 *** OverlayUnidraw/ovimport.c:1.9 Tue Jul 16 11:36:28 2002 --- src/OverlayUnidraw/ovimport.c Wed Jul 24 11:00:26 2002 *************** *** 599,605 **** ifs->rdbuf()->attach(_fd); #else FILE* ifptr = fdopen(_fd, "r"); ! filebuf* fbuf = new filebuf(ifptr, ios_base::in); istream* ifs = new istream(fbuf); #endif _helper.add_stream(ifs); --- 599,605 ---- ifs->rdbuf()->attach(_fd); #else FILE* ifptr = fdopen(_fd, "r"); ! fileptr_filebuf* fbuf = new fileptr_filebuf(ifptr, ios_base::in); istream* ifs = new istream(fbuf); #endif _helper.add_stream(ifs); *************** *** 1085,1091 **** ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(fptr)); #else ! filebuf* fbuf = new filebuf(fptr, ios_base::in); istream* ifs = new istream(fbuf); #endif inptr_ = ifs; --- 1085,1091 ---- ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(fptr)); #else ! fileptr_filebuf* fbuf = new fileptr_filebuf(fptr, ios_base::in); istream* ifs = new istream(fbuf); #endif inptr_ = ifs; *************** *** 1391,1397 **** ifstream* in = new ifstream; in->rdbuf()->attach(fileno(fptr)); #else ! filebuf* fbuf = new filebuf(fptr, ios_base::in); istream* in = new istream(fbuf); #endif helper_->add_stream(in); --- 1391,1397 ---- ifstream* in = new ifstream; in->rdbuf()->attach(fileno(fptr)); #else ! fileptr_filebuf* fbuf = new fileptr_filebuf(fptr, ios_base::in); istream* in = new istream(fbuf); #endif helper_->add_stream(in); *************** *** 1480,1486 **** ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(gunzip_fptr)); #else ! filebuf* fbuf = new filebuf(gunzip_fptr, ios_base::in); istream* ifs = new istream(fbuf); #endif helper.add_stream(ifs); --- 1480,1486 ---- ifstream* ifs = new ifstream; ifs->rdbuf()->attach(fileno(gunzip_fptr)); #else ! fileptr_filebuf* fbuf = new fileptr_filebuf(gunzip_fptr, ios_base::in); istream* ifs = new istream(fbuf); #endif helper.add_stream(ifs); *************** *** 1494,1500 **** ifs->rdbuf()->attach(newfd); #else FILE* ifptr = fdopen(newfd, "r"); ! filebuf* fbuf = new filebuf(ifptr, ios_base::in); istream* ifs = new istream(fbuf); helper.add_file(ifptr); #endif --- 1494,1500 ---- ifs->rdbuf()->attach(newfd); #else FILE* ifptr = fdopen(newfd, "r"); ! fileptr_filebuf* fbuf = new fileptr_filebuf(ifptr, ios_base::in); istream* ifs = new istream(fbuf); helper.add_file(ifptr); #endif *************** *** 1542,1548 **** #else FILE* ifptr = fdopen(new_fd, "r"); helper.add_file(ifptr); ! filebuf fbuf(ifptr, ios_base::in); istream new_in(&fbuf); #endif comp = catalog->ReadPostScript(new_in); --- 1542,1548 ---- #else FILE* ifptr = fdopen(new_fd, "r"); helper.add_file(ifptr); ! fileptr_filebuf fbuf(ifptr, ios_base::in); istream new_in(&fbuf); #endif comp = catalog->ReadPostScript(new_in); *************** *** 1578,1584 **** ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else ! filebuf fbuf(pptr, ios_base::in); istream new_in(&fbuf); #endif comp = PNM_Image(new_in); --- 1578,1584 ---- ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else ! fileptr_filebuf fbuf(pptr, ios_base::in); istream new_in(&fbuf); #endif comp = PNM_Image(new_in); *************** *** 1642,1648 **** ifstream* new_in = new ifstream; new_in->rdbuf()->attach(fileno(pptr)); #else ! filebuf* fbuf = new filebuf(pptr, ios_base::in); istream* new_in = new istream(fbuf); #endif helper.add_stream(new_in); --- 1642,1648 ---- ifstream* new_in = new ifstream; new_in->rdbuf()->attach(fileno(pptr)); #else ! fileptr_filebuf* fbuf = new fileptr_filebuf(pptr, ios_base::in); istream* new_in = new istream(fbuf); #endif helper.add_stream(new_in); *************** *** 1672,1678 **** ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else ! filebuf fbuf(pptr, ios_base::in); istream new_in(&fbuf); #endif comp = PNM_Image(new_in); --- 1672,1678 ---- ifstream new_in; new_in.rdbuf()->attach(fileno(pptr)); #else ! fileptr_filebuf fbuf(pptr, ios_base::in); istream new_in(&fbuf); #endif comp = PNM_Image(new_in); *************** *** 2443,2449 **** in2.rdbuf()->attach(outfd); #else FILE* infptr = fdopen(outfd, "r"); ! filebuf fbuf(infptr, ios_base::in); istream in2(&fbuf); #endif --- 2443,2449 ---- in2.rdbuf()->attach(outfd); #else FILE* infptr = fdopen(outfd, "r"); ! fileptr_filebuf fbuf(infptr, ios_base::in); istream in2(&fbuf); #endif Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.3 ComUnidraw/unifunc.c:1.4 *** ComUnidraw/unifunc.c:1.3 Tue May 7 13:26:26 2002 --- src/ComUnidraw/unifunc.c Wed Jul 24 11:00:29 2002 *************** *** 464,470 **** } else #endif ! pfbuf = new filebuf(stdout, output); } else { --- 464,470 ---- } else #endif ! pfbuf = new fileptr_filebuf(stdout, output); } else { *************** *** 487,493 **** pfbuf = new filebuf(comterp()->handler()->rdfptr(), output); } else #endif ! pfbuf = new filebuf(stdout, output); } #endif --- 487,493 ---- pfbuf = new filebuf(comterp()->handler()->rdfptr(), output); } else #endif ! pfbuf = new fileptr_filebuf(stdout, output); } #endif Index: FrameUnidraw/framecatalog.c diff -c FrameUnidraw/framecatalog.c:1.2 FrameUnidraw/framecatalog.c:1.3 *** FrameUnidraw/framecatalog.c:1.2 Fri Mar 1 14:10:46 2002 --- src/FrameUnidraw/framecatalog.c Wed Jul 24 11:00:31 2002 *************** *** 64,70 **** #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new filebuf(stdin, input); _valid = 1; #endif name = nil; --- 64,70 ---- #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new fileptr_filebuf(stdin, input); _valid = 1; #endif name = nil; *************** *** 74,80 **** #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = fptr ? new filebuf(fptr, input) : nil; _valid = fptr ? 1 : 0; #endif if (compressed) { --- 74,80 ---- #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = fptr ? new fileptr_filebuf(fptr, input) : nil; _valid = fptr ? 1 : 0; #endif if (compressed) { Index: GraphUnidraw/graphcatalog.c diff -c GraphUnidraw/graphcatalog.c:1.2 GraphUnidraw/graphcatalog.c:1.3 *** GraphUnidraw/graphcatalog.c:1.2 Fri Jun 28 12:46:41 2002 --- src/GraphUnidraw/graphcatalog.c Wed Jul 24 11:00:33 2002 *************** *** 84,90 **** #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new filebuf(stdin, input); _valid = 1; #endif name = nil; --- 84,90 ---- #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new fileptr_filebuf(stdin, input); _valid = 1; #endif name = nil; *************** *** 94,100 **** #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = new filebuf(fptr, input); _valid = fptr ? 1 : 0; #endif if (compressed) { --- 94,100 ---- #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = new fileptr_filebuf(fptr, input); _valid = fptr ? 1 : 0; #endif if (compressed) { Index: DrawServ/drawcatalog.c diff -c DrawServ/drawcatalog.c:1.3 DrawServ/drawcatalog.c:1.4 *** DrawServ/drawcatalog.c:1.3 Fri Jun 28 12:46:43 2002 --- src/DrawServ/drawcatalog.c Wed Jul 24 11:00:35 2002 *************** *** 69,75 **** #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new filebuf(stdin, input); _valid = 1; #endif name = nil; --- 69,75 ---- #if __GNUG__<3 _valid = fbuf.attach(fileno(stdin)) != 0; #else ! pfbuf = new fileptr_filebuf(stdin, input); _valid = 1; #endif name = nil; *************** *** 79,85 **** #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = new filebuf(fptr, input); _valid = fptr ? 1 : 0; #endif if (compressed) { --- 79,85 ---- #if __GNUG__<3 _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false; #else ! pfbuf = new fileptr_filebuf(fptr, input); _valid = fptr ? 1 : 0; #endif if (compressed) { Index: include_std/fstream.h diff -c include_std/fstream.h:1.1 include_std/fstream.h:1.2 *** include_std/fstream.h:1.1 Fri Nov 2 13:07:50 2001 --- src/include/ivstd/fstream.h Wed Jul 24 11:00:42 2002 *************** *** 4,9 **** --- 4,15 ---- #if __GNUG__>=3 #define input ios_base::in #define output ios_base::out + #if __GNUG__>3 || __GNUG__==3 && __GNUC_MINOR__>0 + #include <ext/stdio_filebuf.h> + #define fileptr_filebuf __gnu_cxx::stdio_filebuf<char> + #else + #define fileptr_filebuf filebuf + #endif #else #define input "r" #define output "w" *** /dev/null Wed Jul 24 11:00:48 PDT 2002 --- patches/ivtools-020724-johnston-058 *************** patches/ivtools-020724-johnston-058 *** 0 **** --- 1 ---- + ivtools-020724-johnston-058 |
From: <ivt...@li...> - 2002-07-16 18:44:05
|
Patch: ivtools-020716-johnston-057 For: ivtools-1.0.4 Author: joh...@us... Subject: proper fix for handling non-idraw PostScript Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - a proper fix for handling non-idraw PostScript. An improper fix was introduced in ivtools-1.0.3 that made all idraw format files get filtered through pstoedit (if you had it). Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.8 OverlayUnidraw/ovimport.c:1.9 *** OverlayUnidraw/ovimport.c:1.8 Fri Jun 28 12:46:35 2002 --- src/OverlayUnidraw/ovimport.c Tue Jul 16 11:36:28 2002 *************** *** 973,986 **** if (ftype==UnknownFile) ftype = OvImportCmd::PostScriptFile; } - /* other PostScript files */ - if (!*creator && strncmp(line, "%!PS", 4)==0) { - ftype = OvImportCmd::PostScriptFile; - strcpy(creator, "PostScript"); - } - /* fullup idraw format */ if (!*creator && line[0] == '%' && line[1] == '!' ) { do { if (sscanf(line, "%%%%Creator: %s", creator)) { break; --- 973,981 ---- if (ftype==UnknownFile) ftype = OvImportCmd::PostScriptFile; } /* fullup idraw format */ if (!*creator && line[0] == '%' && line[1] == '!' ) { + ftype = OvImportCmd::PostScriptFile; do { if (sscanf(line, "%%%%Creator: %s", creator)) { break; *************** *** 990,998 **** } } while (in.getline(line, linesz) != NULL); chcnt = 0; ! if (*creator && ftype==UnknownFile) ftype = OvImportCmd::PostScriptFile; } - if (!*creator) { char *ptr = line; --- 985,992 ---- } } while (in.getline(line, linesz) != NULL); chcnt = 0; ! if (!*creator) strcpy(creator, "PostScript"); } if (!*creator) { char *ptr = line; *** /dev/null Tue Jul 16 11:36:54 PDT 2002 --- patches/ivtools-020716-johnston-057 *************** patches/ivtools-020716-johnston-057 *** 0 **** --- 1 ---- + ivtools-020716-johnston-057 |
From: <ivt...@li...> - 2002-06-28 21:45:42
|
Patch: ivtools-020628-johnston-056 For: ivtools-1.0.4 Author: joh...@us... Subject: more Cygwin related changes Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - more Cygwin related changes Index: IVGlyph/globals.c diff -c IVGlyph/globals.c:1.1 IVGlyph/globals.c:1.2 *** IVGlyph/globals.c:1.1 Fri Nov 2 13:05:31 2001 --- src/IVGlyph/globals.c Fri Jun 28 14:38:26 2002 *************** *** 201,212 **** GrowBuf(); } if (mlcount == 0) { ! mlx[mlcount] = round(x0); ! mly[mlcount] = round(y0); ++mlcount; } ! mlx[mlcount] = round(x1); ! mly[mlcount] = round(y1); ++mlcount; } --- 201,212 ---- GrowBuf(); } if (mlcount == 0) { ! mlx[mlcount] = Math::round(x0); ! mly[mlcount] = Math::round(y0); ++mlcount; } ! mlx[mlcount] = Math::round(x1); ! mly[mlcount] = Math::round(y1); ++mlcount; } Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.5 OverlayUnidraw/ovkit.c:1.6 *** OverlayUnidraw/ovkit.c:1.5 Fri Jun 14 16:07:32 2002 --- src/OverlayUnidraw/ovkit.c Fri Jun 28 14:38:34 2002 *************** *** 294,301 **** * These statements had to be moved down here to workaround * a strange cfront 3.0 bug. */ ! float w = round(atof(page_w) * ivinches); ! float h = round(atof(page_h) * ivinches); if (page_cols && page_rows) { int ncols = atoi(page_cols); int nrows = atoi(page_rows); --- 294,301 ---- * These statements had to be moved down here to workaround * a strange cfront 3.0 bug. */ ! float w = Math::round(atof(page_w) * ivinches); ! float h = Math::round(atof(page_h) * ivinches); if (page_cols && page_rows) { int ncols = atoi(page_cols); int nrows = atoi(page_rows); *** /dev/null Fri Jun 28 14:38:46 PDT 2002 --- patches/ivtools-020628-johnston-056 *************** patches/ivtools-020628-johnston-056 *** 0 **** --- 1 ---- + ivtools-020628-johnston-056 |
From: <ivt...@li...> - 2002-06-28 19:50:40
|
Patch: ivtools-020628-johnston-055 For: ivtools-1.0.4 Author: joh...@us... Subject: various compile time fixes Requires: This is an intermediate patch to ivtools-1.0.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - various compile time fixes for Solaris and Cygwin. Index: ComUtil/comutil.h diff -c ComUtil/comutil.h:1.1 ComUtil/comutil.h:1.2 *** ComUtil/comutil.h:1.1 Fri Nov 2 13:04:39 2001 --- src/ComUtil/comutil.h Fri Jun 28 12:46:09 2002 *************** *** 27,32 **** --- 27,33 ---- #include <ComUtil/comterp.err> #include <ComUtil/util.h> + #include <ctype.h> #include <stdio.h> /* ================================================================== */ Index: IVGlyph/textbuff.c diff -c IVGlyph/textbuff.c:1.1 IVGlyph/textbuff.c:1.2 *** IVGlyph/textbuff.c:1.1 Fri Nov 2 13:05:31 2001 --- src/IVGlyph/textbuff.c Fri Jun 28 12:46:16 2002 *************** *** 32,37 **** --- 32,38 ---- #include <OS/memory.h> #include <OS/string.h> + #include <ctype.h> #include <stdlib.h> #include <string.h> Index: OverlayUnidraw/algebra3.h diff -c OverlayUnidraw/algebra3.h:1.1 OverlayUnidraw/algebra3.h:1.2 *** OverlayUnidraw/algebra3.h:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/algebra3.h Fri Jun 28 12:46:35 2002 *************** *** 29,34 **** --- 29,35 ---- #include <assert.h> //#include <yvals.h> #include <math.h> + #include <ctype.h> // this line defines a new type: pointer to a function which returns a // double and takes as argument a double Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.7 OverlayUnidraw/ovimport.c:1.8 *** OverlayUnidraw/ovimport.c:1.7 Fri May 17 13:54:01 2002 --- src/OverlayUnidraw/ovimport.c Fri Jun 28 12:46:35 2002 *************** *** 93,98 **** --- 93,100 ---- #include <Dispatch/iohandler.h> #include <Dispatch/dispatcher.h> + + #include <ctype.h> #include <fstream.h> #include <string.h> #include <strstream.h> Index: drawtool/main.c diff -c drawtool/main.c:1.3 drawtool/main.c:1.4 *** drawtool/main.c:1.3 Wed Jan 30 14:12:10 2002 --- src/drawtool/main.c Fri Jun 28 12:46:38 2002 *************** *** 202,214 **** { nil } }; static char* usage = "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\ [-gray7] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\ [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\ [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]"; ! /*****************************************************************************/ int main (int argc, char** argv) { --- 202,223 ---- { nil } }; + + #ifdef HAVE_ACE static char* usage = "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\ + [-gray7] [-import port] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\ + [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ + [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\ + [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]"; + #else + static char* usage = + "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\ [-gray7] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\ [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\ [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]"; ! #endif /*****************************************************************************/ int main (int argc, char** argv) { Index: GraphUnidraw/graphcatalog.c diff -c GraphUnidraw/graphcatalog.c:1.1 GraphUnidraw/graphcatalog.c:1.2 *** GraphUnidraw/graphcatalog.c:1.1 Fri Nov 2 13:07:13 2001 --- src/GraphUnidraw/graphcatalog.c Fri Jun 28 12:46:41 2002 *************** *** 48,53 **** --- 48,54 ---- #include <InterViews/transformer.h> + #include <ctype.h> #include <stdio.h> #include <stream.h> #include <string.h> Index: DrawServ/drawcatalog.c diff -c DrawServ/drawcatalog.c:1.2 DrawServ/drawcatalog.c:1.3 *** DrawServ/drawcatalog.c:1.2 Wed Jan 30 14:12:17 2002 --- src/DrawServ/drawcatalog.c Fri Jun 28 12:46:43 2002 *************** *** 33,38 **** --- 33,39 ---- #include <OverlayUnidraw/ovimport.h> #include <TopoFace/topoedge.h> #include <Attribute/paramlist.h> + #include <ctype.h> #include <iostream.h> #include <stdio.h> #include <string.h> Index: include_iviv-2_6/minmax.h diff -c include_iviv-2_6/minmax.h:1.1 include_iviv-2_6/minmax.h:1.2 *** include_iviv-2_6/minmax.h:1.1 Fri Nov 2 13:07:27 2001 --- src/include/IV-2_6/InterViews/minmax.h Fri Jun 28 12:46:46 2002 *************** *** 59,65 **** #endif /* !defined(min) && !defined(max) */ ! #if __GNUG__<3 inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } #endif --- 59,65 ---- #endif /* !defined(min) && !defined(max) */ ! #if __GNUG__<3 && 0 /* removed, used Math::round from now on */ inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); } #endif Index: include_std/nan.h diff -c include_std/nan.h:1.2 include_std/nan.h:1.3 *** include_std/nan.h:1.2 Wed Feb 20 11:54:20 2002 --- src/include/ivstd/nan.h Fri Jun 28 12:46:51 2002 *************** *** 8,20 **** #else #include <math.h> #endif #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__APPLE__) ! #define isnanorinf(dval) (isnan(dval)||isinf(dval)) #elif defined(__alpha) #define isnanorinf(dval) (IsNANorINF(dval)) #else ! #define isnanorinf(dval) (dval==NAN /* || dval==INF */) #endif --- 8,23 ---- #else #include <math.h> #endif + #if defined(__sun__) && defined(__svr4__) + #include <ieeefp.h> + #endif #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__APPLE__) ! #define isnanorinf(dval) (!finite(dval)) #elif defined(__alpha) #define isnanorinf(dval) (IsNANorINF(dval)) #else ! #define isnanorinf(dval) (!finite(dval)) /* (dval==NAN || dval==INF ) */ #endif *** /dev/null Fri Jun 28 12:46:57 PDT 2002 --- patches/ivtools-020628-johnston-055 *************** patches/ivtools-020628-johnston-055 *** 0 **** --- 1 ---- + ivtools-020628-johnston-055 |
From: <ivt...@li...> - 2002-06-28 19:50:18
|
Patch: ivtools-020619-johnston-053 For: ivtools-1.0.3 Author: joh...@us... Subject: finalize AlphaTransparentRasterCmd Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - finalize AlphaTransparentRasterCmd with undo capability and instantaneous update Index: OverlayUnidraw/rastercmds.c diff -c OverlayUnidraw/rastercmds.c:1.2 OverlayUnidraw/rastercmds.c:1.3 *** OverlayUnidraw/rastercmds.c:1.2 Fri Jun 14 16:07:32 2002 --- src/OverlayUnidraw/rastercmds.c Wed Jun 19 14:48:02 2002 *************** *** 169,180 **** /*-----------------------------------------------------------------*/ AlphaTransparentRasterCmd::AlphaTransparentRasterCmd(ControlInfo* ci) : Command(ci) { } Command* AlphaTransparentRasterCmd::Copy() { ! Command* copy = new AlphaTransparentRasterCmd(GetControlInfo()); InitCopy(copy); ((AlphaTransparentRasterCmd*)copy)->_alpha = _alpha; return copy; } --- 169,183 ---- /*-----------------------------------------------------------------*/ AlphaTransparentRasterCmd::AlphaTransparentRasterCmd(ControlInfo* ci) : Command(ci) { + _alpha_set = false; } Command* AlphaTransparentRasterCmd::Copy() { ! Command* copy = new AlphaTransparentRasterCmd(CopyControlInfo()); InitCopy(copy); ((AlphaTransparentRasterCmd*)copy)->_alpha = _alpha; + ((AlphaTransparentRasterCmd*)copy)->_oldalpha = _oldalpha; + ((AlphaTransparentRasterCmd*)copy)->_alpha_set = _alpha_set; return copy; } *************** *** 189,203 **** } void AlphaTransparentRasterCmd::Execute() { - // find the rasters in the current comp and unhighlight ! char* newalpha = StrEditDialog::post ! (GetEditor()->GetWindow(), ! "Enter alpha value", "0.5"); ! if (newalpha) ! _alpha = atof(newalpha); ! else ! _alpha = 1.0; OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlaySelection* sel = (OverlaySelection*) ed->GetSelection(); --- 192,208 ---- } void AlphaTransparentRasterCmd::Execute() { ! if (!_alpha_set) { ! char* newalpha = StrEditDialog::post ! (GetEditor()->GetWindow(), ! "Enter alpha value", "0.5"); ! if (newalpha) ! _alpha = atof(newalpha); ! else ! _alpha = 1.0; ! _alpha_set = true; ! } OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlaySelection* sel = (OverlaySelection*) ed->GetSelection(); *************** *** 207,217 **** if (view->IsA(OVRASTER_VIEW)) { RasterOvView* rastview = (RasterOvView*)view; if (rastview) { ! OverlayRasterRect* rr = rastview->GetOverlayRasterRect(); if (rr) { rr->alphaval(_alpha); } } } } } --- 212,249 ---- if (view->IsA(OVRASTER_VIEW)) { RasterOvView* rastview = (RasterOvView*)view; if (rastview) { ! RasterOvComp* rastcomp = (RasterOvComp*)rastview->GetSubject(); ! OverlayRasterRect* rr = rastcomp->GetOverlayRasterRect(); if (rr) { + _oldalpha = rr->alphaval(); rr->alphaval(_alpha); + rastcomp->Notify(); + unidraw->Update(); + } + } + } + } + } + + void AlphaTransparentRasterCmd::Unexecute() { + + OverlayEditor* ed = (OverlayEditor*)GetEditor(); + OverlaySelection* sel = (OverlaySelection*) ed->GetSelection(); + Iterator i; + for (sel->First(i); !sel->Done(i); sel->Next(i)) { + GraphicView* view = sel->GetView(i); + if (view->IsA(OVRASTER_VIEW)) { + RasterOvView* rastview = (RasterOvView*)view; + if (rastview) { + RasterOvComp* rastcomp = (RasterOvComp*)rastview->GetSubject(); + OverlayRasterRect* rr = rastcomp->GetOverlayRasterRect(); + if (rr) { + rr->alphaval(_oldalpha); + rastcomp->Notify(); + unidraw->Update(); } } } } } + Index: OverlayUnidraw/rastercmds.h diff -c OverlayUnidraw/rastercmds.h:1.2 OverlayUnidraw/rastercmds.h:1.3 *** OverlayUnidraw/rastercmds.h:1.2 Fri Jun 14 16:07:32 2002 --- src/OverlayUnidraw/rastercmds.h Wed Jun 19 14:48:02 2002 *************** *** 80,85 **** --- 80,86 ---- AlphaTransparentRasterCmd(ControlInfo* ci); virtual void Execute(); + virtual void Unexecute(); virtual Command* Copy(); virtual ClassId GetClassId(); *************** *** 89,94 **** --- 90,97 ---- protected: float _alpha; + float _oldalpha; + boolean _alpha_set; }; *** /dev/null Wed Jun 19 14:48:10 PDT 2002 --- patches/ivtools-020619-johnston-053 *************** patches/ivtools-020619-johnston-053 *** 0 **** --- 1 ---- + ivtools-020619-johnston-053 |
From: <ivt...@li...> - 2002-06-21 21:12:15
|
Patch: ivtools-020621-johnston-054 For: ivtools-1.0.3 Author: joh...@us... Subject: final patch for 1.0.4 Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - final patch for 1.0.4 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.5 top_ivtools/CHANGES:1.6 *** top_ivtools/CHANGES:1.5 Mon Mar 11 12:03:47 2002 --- ./CHANGES Fri Jun 21 14:01:02 2002 *************** *** 1,3 **** --- 1,108 ---- + June 21st, 2002 ivtools-1.0.4 + + - give special meaning to a set of parentheses that proceed the + tuple operator ",", by adding an extra level of nesting to the + resultant list. Before the expression "(1,2),(3,4)" yielded + "{1,2,{3,4}}". Now it yields "{{1,2},{3,4}}" as one might expect. + This anomaly stemmed from the fact the tuple operator "," works + by concatenating its right-hand argument to its left-hand argument + if the left-hand argument is already a list (that's how the + interpreter concatenates a compound tuple-expression, i.e. "1,2,3,4"). + + - fix unitialized variable used when reading from sockets that would + cause a hang. + + - add comterp commands for the value of PI (pi), converting radians to + degrees (radtodeg), and converting degrees to radians (degtorad). + + - add new matrix transpose command (xpose), which takes a 2d list of numbers + (i.e. a matrix), and transposes them. Examples: + + xpose(1,2,3) + {{1,2,3}} + xpose((1,2),(3,4)) + {{1,3},{2,4}} + xpose((1,2,3),(11,12,13),(21,22,23)) + {{1,11,21},{2,12,22},{3,13,23}} + + - add a matrix addition capability to the comterp "+" operator. + + - add matrix multiplication to comterp "*" operator. + + If: + a=(1,4),(2,-3),(3,1),(-1,0) + b=(-1,2,1),(-9,2,-3) + + Then: + a*b + + Yields: + {{-37,10,-11},{25,-2,11},{-12,8,0},{1,-2,-1}} + + - extend matrix multiply to support vector inputs. Now: + + a=list,list(1),list(2),list(3) + b=list,list(1,2,3) + a*b + + Yields the same as: + + a=1,2,3 + b=list,list(1,2,3) + a*b + + Conversely: + + a=list,list(1,2,3) + b=list,list(1),list(2),list(3) + a*b + + Yields the same as: + + a=list,list(1,2,3) + b=1,2,3 + a*b + + And: + + list(2)*list(3) + + Yields: + + {{6}} + + - add support for panning with cursor keys (left/right/up/down) as well + as Page Up and Page Down (PgUp/PgDn) for larger vertical moves. + + - greatly improve the efficiency of rendering alpha-transparent + rasters with a TrueColor visual. Prior to this each input color was + being looked up in a table that could be as long as 2 to the 24th, + then the weighed average computed in floating point, then the result + rescaled into a TrueColor color. Now everything is done with nothing + more than 32 bit integer multiplies, adds, and shifts. Performance + has gone from a multi-second lag to adequately interactive. + + - rename "Custom Tools" to "Extra Tools". + + - migrate Attribute, Annotate, and GraphicLoc to "Extra Tools". + + - add a :next flag to comdraw's import func. It attempts to + auto-increment the numerics in the last URL and import again. + + - sync with diffs from latest Debian release (ivtools-0.9.2-6). + + - add gcc-2.96 warning to INSTALL and README files + + - remove installation of extraneous scripts when non-local install. + + - save/restore raster alpha-transparency value in drawing documents. + + - create AlphaTransparentCmd and make available under Edit/"Image Processing" + + - create raster peek command for comdraw (RasterPeekFunc). + + + March 11th, 2002 ivtools-1.0.3 - add missing src/include/ivstd/stdlib.h to MANIFEST. This was Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.7 top_ivtools/INSTALL:1.8 *** top_ivtools/INSTALL:1.7 Mon Jun 10 16:33:32 2002 --- ./INSTALL Fri Jun 21 14:01:02 2002 *************** *** 1,7 **** INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.3 from source, the short version: ./configure make --- 1,7 ---- INSTALL for ivtools-1.0 ! Instructions for building ivtools-1.0.4 from source, the short version: ./configure make *************** *** 10,16 **** And if that doesn't work... ! Instructions for building ivtools-1.0.3 from source, the long version: 0. Compilation Environment --- 10,16 ---- And if that doesn't work... ! Instructions for building ivtools-1.0.4 from source, the long version: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.6 top_ivtools/README:1.7 *** top_ivtools/README:1.6 Mon Jun 10 16:33:32 2002 --- ./README Fri Jun 21 14:01:03 2002 *************** *** 2,8 **** README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.3. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 1.0 ! This directory contains a release of ivtools 1.0.4. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.4 top_ivtools/VERSION:1.5 *** top_ivtools/VERSION:1.4 Mon Mar 11 12:03:47 2002 --- ./VERSION Fri Jun 21 14:01:03 2002 *************** *** 1 **** ! Release 1.0.3 --- 1 ---- ! Release 1.0.4 Index: include_std/version.h diff -c include_std/version.h:1.4 include_std/version.h:1.5 *** include_std/version.h:1.4 Mon Mar 11 12:04:28 2002 --- src/include/ivstd/version.h Fri Jun 21 14:02:04 2002 *************** *** 1,3 **** ! #define IvtoolsVersion 1.0.3 ! #define VersionString "1.0.3" ! #define ReleaseString "ivtools-1.0.3" --- 1,3 ---- ! #define IvtoolsVersion 1.0.4 ! #define VersionString "1.0.4" ! #define ReleaseString "ivtools-1.0.4" Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.5 config_ivtools/params.def:1.6 *** config_ivtools/params.def:1.5 Mon Mar 11 12:04:35 2002 --- config/params.def Fri Jun 21 14:02:12 2002 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.3 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.0.4 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.0.3 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.0.4 #endif VERSION = Version *** /dev/null Fri Jun 21 14:02:14 PDT 2002 --- patches/ivtools-020621-johnston-054 *************** patches/ivtools-020621-johnston-054 *** 0 **** --- 1 ---- + ivtools-020621-johnston-054 |
From: <ivt...@li...> - 2002-06-14 23:10:09
|
Patch: ivtools-020614-johnston-052 For: ivtools-1.0.3 Author: joh...@us... Subject: work AlphaTransparentCmd and RasterPeekFunc Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - work AlphaTransparentCmd and RasterPeekFunc Index: OverlayUnidraw/ovclasses.h diff -c OverlayUnidraw/ovclasses.h:1.1 OverlayUnidraw/ovclasses.h:1.2 *** OverlayUnidraw/ovclasses.h:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/ovclasses.h Fri Jun 14 16:07:32 2002 *************** *** 93,98 **** --- 93,99 ---- #define OVPRECISEBRUSH_CMD 2060 #define PUSH_CMD 2061 #define PULL_CMD 2062 + #define ALPHATRANSPARENT_CMD 2063 #define OVERLAY_COMP 2150 #define OVERLAYS_COMP 2151 Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.4 OverlayUnidraw/ovkit.c:1.5 *** OverlayUnidraw/ovkit.c:1.4 Tue May 7 13:26:24 2002 --- src/OverlayUnidraw/ovkit.c Fri Jun 14 16:07:32 2002 *************** *** 64,69 **** --- 64,70 ---- #include <OverlayUnidraw/ovtext.h> #include <OverlayUnidraw/ovunidraw.h> #include <OverlayUnidraw/ovviewer.h> + #include <OverlayUnidraw/rastercmds.h> #include <OverlayUnidraw/setattrbyexpr.h> #include <OverlayUnidraw/slctbyattr.h> *************** *** 1012,1028 **** "Precise Rotate "); mbi->menu()->append_item(kit.menu_item_separator()); ! MenuItem* graymenu = kit.menu_item(kit.label("Graylevel Processing ")); ! graymenu->menu(kit.pullright()); ! mbi->menu()->append_item(graymenu); ! MakeMenu(graymenu, new ScaleGrayCmd(new ControlInfo("Scale GrayImage", "", "")), "Scale Gray Image "); ! MakeMenu(graymenu, new LogScaleCmd(new ControlInfo("LogScale GrayImage", "", "")), "Logscale Gray Image "); ! MakeMenu(graymenu, new PseudocolorCmd(new ControlInfo("PseudoColor GrayImage", "", "")), "Pseudocolor Gray Image "); #ifdef CLIPPOLY --- 1013,1032 ---- "Precise Rotate "); mbi->menu()->append_item(kit.menu_item_separator()); ! MenuItem* imagemenu = kit.menu_item(kit.label("Image Processing ")); ! imagemenu->menu(kit.pullright()); ! mbi->menu()->append_item(imagemenu); ! MakeMenu(imagemenu, new AlphaTransparentRasterCmd(new ControlInfo("Alpha Transparency", "", "")), + "Alpha Transparency "); + MakeMenu(imagemenu, new ScaleGrayCmd(new ControlInfo("Scale GrayImage", + "", "")), "Scale Gray Image "); ! MakeMenu(imagemenu, new LogScaleCmd(new ControlInfo("LogScale GrayImage", "", "")), "Logscale Gray Image "); ! MakeMenu(imagemenu, new PseudocolorCmd(new ControlInfo("PseudoColor GrayImage", "", "")), "Pseudocolor Gray Image "); #ifdef CLIPPOLY Index: OverlayUnidraw/ovraster.c diff -c OverlayUnidraw/ovraster.c:1.5 OverlayUnidraw/ovraster.c:1.6 *** OverlayUnidraw/ovraster.c:1.5 Tue Jun 11 13:03:41 2002 --- src/OverlayUnidraw/ovraster.c Fri Jun 14 16:07:32 2002 *************** *** 1389,1394 **** --- 1389,1395 ---- float rval, gval, bval, aval; peek(x, y, rval, gval, bval, aval); val.double_ref() = (double) (gval*(float)0xff); + val.type(AttributeValue::DoubleType); } void OverlayRaster::graypoke(unsigned long x, unsigned long y, unsigned int i) Index: OverlayUnidraw/rastercmds.c diff -c OverlayUnidraw/rastercmds.c:1.1 OverlayUnidraw/rastercmds.c:1.2 *** OverlayUnidraw/rastercmds.c:1.1 Fri Nov 2 13:07:03 2001 --- src/OverlayUnidraw/rastercmds.c Fri Jun 14 16:07:32 2002 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2002 Scott E. Johnston * Copyright (c) 1997 Vectaport Inc. and R.B. Kissh & Associates * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 24,35 **** --- 25,41 ---- #include <OverlayUnidraw/ovclasses.h> #include <OverlayUnidraw/oved.h> #include <OverlayUnidraw/ovraster.h> + #include <OverlayUnidraw/ovselection.h> #include <OverlayUnidraw/ovviewer.h> #include <OverlayUnidraw/rastercmds.h> #include <Unidraw/unidraw.h> #include <Unidraw/iterator.h> + #include <IVGlyph/stredit.h> + + #include <InterViews/window.h> + // ----------------------------------------------------------------------- *************** *** 154,159 **** --- 160,215 ---- OverlayRaster* raster = rastview->GetOverlayRaster(); if (raster) { raster->unhighlight(); + } + } + } + } + } + + /*-----------------------------------------------------------------*/ + + AlphaTransparentRasterCmd::AlphaTransparentRasterCmd(ControlInfo* ci) : Command(ci) { + } + + Command* AlphaTransparentRasterCmd::Copy() { + Command* copy = new AlphaTransparentRasterCmd(GetControlInfo()); + InitCopy(copy); + ((AlphaTransparentRasterCmd*)copy)->_alpha = _alpha; + return copy; + } + + ClassId AlphaTransparentRasterCmd::GetClassId () { return ALPHATRANSPARENT_CMD; } + + boolean AlphaTransparentRasterCmd::IsA (ClassId id) { + return ALPHATRANSPARENT_CMD == id || Command::IsA(id); + } + + boolean AlphaTransparentRasterCmd::Reversible() { + return true; + } + + void AlphaTransparentRasterCmd::Execute() { + // find the rasters in the current comp and unhighlight + + char* newalpha = StrEditDialog::post + (GetEditor()->GetWindow(), + "Enter alpha value", "0.5"); + if (newalpha) + _alpha = atof(newalpha); + else + _alpha = 1.0; + + OverlayEditor* ed = (OverlayEditor*)GetEditor(); + OverlaySelection* sel = (OverlaySelection*) ed->GetSelection(); + Iterator i; + for (sel->First(i); !sel->Done(i); sel->Next(i)) { + GraphicView* view = sel->GetView(i); + if (view->IsA(OVRASTER_VIEW)) { + RasterOvView* rastview = (RasterOvView*)view; + if (rastview) { + OverlayRasterRect* rr = rastview->GetOverlayRasterRect(); + if (rr) { + rr->alphaval(_alpha); } } } Index: OverlayUnidraw/rastercmds.h diff -c OverlayUnidraw/rastercmds.h:1.1 OverlayUnidraw/rastercmds.h:1.2 *** OverlayUnidraw/rastercmds.h:1.1 Fri Nov 2 13:07:03 2001 --- src/OverlayUnidraw/rastercmds.h Fri Jun 14 16:07:32 2002 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2002 Scott E. Johnston * Copyright (c) 1999 Vectaport Inc. * Copyright (c) 1997 Vectaport Inc., R.B. Kissh & Associates * *************** *** 69,74 **** --- 70,94 ---- virtual boolean IsA(ClassId); virtual boolean Reversible(); + }; + + + + //: command to make raster alpha-transparent + class AlphaTransparentRasterCmd : public Command { + public: + AlphaTransparentRasterCmd(ControlInfo* ci); + + virtual void Execute(); + + virtual Command* Copy(); + virtual ClassId GetClassId(); + virtual boolean IsA(ClassId); + + virtual boolean Reversible(); + + protected: + float _alpha; }; Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.11 ComUnidraw/comeditor.c:1.12 *** ComUnidraw/comeditor.c:1.11 Tue Feb 19 16:18:19 2002 --- src/ComUnidraw/comeditor.c Fri Jun 14 16:07:34 2002 *************** *** 216,221 **** --- 216,222 ---- comterp->add_command("gtod", new GraphicToDrawingFunc(comterp, this)); comterp->add_command("poke", new PixelPokeFunc(comterp, this)); + comterp->add_command("peek", new PixelPeekFunc(comterp, this)); comterp->add_command("pcols", new PixelColsFunc(comterp, this)); comterp->add_command("prows", new PixelRowsFunc(comterp, this)); comterp->add_command("pflush", new PixelFlushFunc(comterp, this)); Index: ComUnidraw/pixelfunc.c diff -c ComUnidraw/pixelfunc.c:1.3 ComUnidraw/pixelfunc.c:1.4 *** ComUnidraw/pixelfunc.c:1.3 Thu Jan 31 10:20:46 2002 --- src/ComUnidraw/pixelfunc.c Fri Jun 14 16:07:34 2002 *************** *** 58,63 **** --- 58,90 ---- /*****************************************************************************/ + PixelPeekFunc::PixelPeekFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void PixelPeekFunc::execute() { + Viewer* viewer = _ed->GetViewer(); + + ComValue rastcompv(stack_arg(0)); + ComValue xv(stack_arg(1)); + ComValue yv(stack_arg(2)); + reset_stack(); + + RasterOvComp* rastcomp = (RasterOvComp*) rastcompv.geta(RasterOvComp::class_symid()); + OverlayRasterRect* rastrect = rastcomp ? rastcomp->GetOverlayRasterRect() : nil; + OverlayRaster* raster = rastrect ? rastrect->GetOriginal() : nil; + + if (raster) { + ComValue retval; + raster->graypeek(xv.int_val(), yv.int_val(), retval); + push_stack(retval); + } else + push_stack(ComValue::nullval()); + + + } + + /*****************************************************************************/ + PixelColsFunc::PixelColsFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { } Index: ComUnidraw/pixelfunc.h diff -c ComUnidraw/pixelfunc.h:1.3 ComUnidraw/pixelfunc.h:1.4 *** ComUnidraw/pixelfunc.h:1.3 Thu Jan 31 10:20:46 2002 --- src/ComUnidraw/pixelfunc.h Fri Jun 14 16:07:34 2002 *************** *** 36,41 **** --- 36,51 ---- return "%s(compview x y val) -- poke pixel value into raster"; } }; + //: command to peek pixel values from raster + // val=peek(compview x y) -- peek pixel value into raster + class PixelPeekFunc : public UnidrawFunc { + public: + PixelPeekFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "val=%s(compview x y) -- peek pixel value from raster"; } + }; + //: command to return number of columns in a raster // pcols(compview) -- number of columns in a raster class PixelColsFunc : public UnidrawFunc { *** /dev/null Fri Jun 14 16:07:40 PDT 2002 --- patches/ivtools-020614-johnston-052 *************** patches/ivtools-020614-johnston-052 *** 0 **** --- 1 ---- + ivtools-020614-johnston-052 |
From: <ivt...@li...> - 2002-06-11 20:06:09
|
Patch: ivtools-020611-johnston-051 For: ivtools-1.0 Author: joh...@us... Subject: save/restore alpha-transparency value Requires: This is an intermediate patch to ivtools-1.0. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - save/restore raster alpha-transparency value. Index: OverlayUnidraw/ovraster.c diff -c OverlayUnidraw/ovraster.c:1.4 OverlayUnidraw/ovraster.c:1.5 *** OverlayUnidraw/ovraster.c:1.4 Thu Jan 31 10:20:44 2002 --- src/OverlayUnidraw/ovraster.c Tue Jun 11 13:03:41 2002 *************** *** 179,184 **** --- 179,187 ---- pl->add_param("graydouble", ParamStruct::keyword, &RasterScript::ReadGrayDouble, this, this); + pl->add_param("alpha", ParamStruct::keyword, &RasterScript::ReadAlpha, + this, this); + pl->add_param("proc", ParamStruct::keyword, &RasterScript::ReadProcess, this, this); *************** *** 527,532 **** --- 530,537 ---- raster->write(out); } + if (rr->alphaval() != 1.0) out << " :alpha " << rr->alphaval(); + if (rr->xbeg()>=0 || rr->xend()>=0 || rr->ybeg()>=0 || rr->yend()>=0) out << " :sub " << rr->xbeg() << "," << *************** *** 868,873 **** --- 873,895 ---- gr->xend(xend); gr->ybeg(ybeg); gr->yend(yend); + return 0; + } + } + + + int RasterScript::ReadAlpha (istream& in, void* addr1, void* addr2, void* addr3, void* addr4) { + RasterOvComp* comp = (RasterOvComp*)addr1; + float alpha; + OverlayRasterRect* gr = comp ? (OverlayRasterRect*) comp->GetGraphic() : nil; + + ParamList::skip_space(in); + in >> alpha; + if (!in.good()) { + return -1; + } + else { + if (gr) gr->alphaval(alpha); return 0; } } Index: OverlayUnidraw/ovraster.h diff -c OverlayUnidraw/ovraster.h:1.3 OverlayUnidraw/ovraster.h:1.4 *** OverlayUnidraw/ovraster.h:1.3 Wed Jan 30 14:12:08 2002 --- src/OverlayUnidraw/ovraster.h Tue Jun 11 13:03:41 2002 *************** *** 189,194 **** --- 189,196 ---- // read floating point pixel values directly from serialized file. static int ReadGrayDouble(istream&, void*, void*, void*, void*); // read double floating point pixel values directly from serialized file. + static int ReadAlpha(istream&, void*, void*, void*, void*); + // read alpha-transparency value specification. static int ReadSub(istream&, void*, void*, void*, void*); // read sub-image specification. static int ReadProcess(istream&, void*, void*, void*, void*); *** /dev/null Tue Jun 11 13:03:52 PDT 2002 --- patches/ivtools-020611-johnston-051 *************** patches/ivtools-020611-johnston-051 *** 0 **** --- 1 ---- + ivtools-020611-johnston-051 |
From: <ivt...@li...> - 2002-06-11 20:05:56
|
Patch: ivtools-020610-johnston-050 For: ivtools-1.0.3 Author: joh...@us... Subject: add gcc-2.96 warning, other cleanups Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add gcc-2.96 warning - remove installation of extraneous scripts when non-local install. Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.6 top_ivtools/INSTALL:1.7 *** top_ivtools/INSTALL:1.6 Mon Mar 11 12:03:47 2002 --- ./INSTALL Mon Jun 10 16:33:32 2002 *************** *** 31,36 **** --- 31,40 ---- libstdc++ version numbers stay roughly in synch with the gcc version numbers. If you have gcc-2.8.1 you'd want libstdc++-2.8.1, etc.. + ** NOTE ** Do not use gcc-2.96. See + http://www.ivtools.org/ivtools/faq.html#gcc-2.96-problem for more + details. + Be aware that sometimes the include files for libstdc++ are in /usr/local/include/g++-2, a place that cannot be auto-determined by the configure script. Establishing a symbolic link to Index: top_ivtools/README diff -c top_ivtools/README:1.5 top_ivtools/README:1.6 *** top_ivtools/README:1.5 Mon Mar 11 12:03:47 2002 --- ./README Mon Jun 10 16:33:32 2002 *************** *** 130,135 **** --- 130,140 ---- (http://www.ivtools.org) and ivtools download page (http://www.ivtools.org/ivtools/download.html) + ** NOTE ** Do not use gcc-2.96, the default compiler shipped with + RedHat 7.*. This branch of gcc was never approved by the gcc + steering committee. The workaround is to upgrade to gcc-3.* or + downgrade to gcc-2.95.*. + If you have a question about this software, desire to add code, found a bug, want to request a feature, or wonder how to get further assistance, please send e-mail to the general purpose ivtools mailing Index: scripts_ivtools/Imakefile diff -c scripts_ivtools/Imakefile:1.1 scripts_ivtools/Imakefile:1.2 *** scripts_ivtools/Imakefile:1.1 Fri Nov 2 13:07:51 2001 --- src/scripts/Imakefile Mon Jun 10 16:33:44 2002 *************** *** 6,12 **** IvmkcmTargets($(PACKAGE)) ! PROGRAMS = ivmkmf ivct ivdt ivcd ivfb ivgd ivds #if InstallRelative CONFIGDIRSPEC = -T IMAKE_TEMPLATE -I$(CONFIGDIR) -I$(XCONFIGDIR) MAKEMAKESPEC = ARCH=$(CPU) CONFIGSRC=$(CONFIGDIR) XCONFIGDIR=$(XCONFIGDIR) --- 6,12 ---- IvmkcmTargets($(PACKAGE)) ! PROGRAMS = ivmkmf #if InstallRelative CONFIGDIRSPEC = -T IMAKE_TEMPLATE -I$(CONFIGDIR) -I$(XCONFIGDIR) MAKEMAKESPEC = ARCH=$(CPU) CONFIGSRC=$(CONFIGDIR) XCONFIGDIR=$(XCONFIGDIR) *************** *** 27,43 **** LDLIB_SPEC = LD_LIBRARY_PATH='$(LIBABSDIR)':$$LD_LIBRARY_PATH PATH_SPEC = PATH='$(BINDIR)':$$PATH - CppScriptTarget(ivct,ivct.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) - CppScriptTarget(ivdt,ivdt.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) - CppScriptTarget(ivcd,ivcd.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) - CppScriptTarget(ivfb,ivfb.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) - CppScriptTarget(ivgd,ivgd.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) - CppScriptTarget(ivds,ivds.cpp,-DLDLIB_SPEC='$(LDLIB_SPEC)' -DPATH_SPEC='$(PATH_SPEC)',) InstallScriptAs(mkgif89a.bash,$(BINDIR),mkgif89a) InstallScriptAs(mkgif89ac.bash,$(BINDIR),mkgif89ac) InstallScriptAs(ivgetjpg.bash,$(BINDIR),ivgetjpg) InstallScriptAs(cntsrclines.bash,$(BINDIR),cntsrclines) InstallScriptAs(ivtiftopnm.bash,$(BINDIR),ivtiftopnm) InstallScriptAs(pnmtopgm.sh,$(BINDIR),pnmtopgm) --- 27,41 ---- LDLIB_SPEC = LD_LIBRARY_PATH='$(LIBABSDIR)':$$LD_LIBRARY_PATH PATH_SPEC = PATH='$(BINDIR)':$$PATH + #if InstallRelative InstallScriptAs(mkgif89a.bash,$(BINDIR),mkgif89a) InstallScriptAs(mkgif89ac.bash,$(BINDIR),mkgif89ac) + #endif InstallScriptAs(ivgetjpg.bash,$(BINDIR),ivgetjpg) + #if InstallRelative InstallScriptAs(cntsrclines.bash,$(BINDIR),cntsrclines) + #endif InstallScriptAs(ivtiftopnm.bash,$(BINDIR),ivtiftopnm) InstallScriptAs(pnmtopgm.sh,$(BINDIR),pnmtopgm) *** /dev/null Mon Jun 10 16:33:46 PDT 2002 --- patches/ivtools-020610-johnston-050 *************** patches/ivtools-020610-johnston-050 *** 0 **** --- 1 ---- + ivtools-020610-johnston-050 |
From: <ivt...@li...> - 2002-05-17 21:01:17
|
Patch: ivtools-020517-johnston-049 For: ivtools-1.0.3 Author: joh...@us... Subject: synch with Debian release Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - sync with diffs from latest Debian release Index: ComTerp/comhandler.h diff -c ComTerp/comhandler.h:1.1 ComTerp/comhandler.h:1.2 *** ComTerp/comhandler.h:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/comhandler.h Fri May 17 13:53:47 2002 *************** *** 31,39 **** #ifdef HAVE_ACE #include <stdio.h> ! #if 0 /* does not work for ACE5.1 */ #define __USE_GNU - #include <sys/msg.h> #endif #include <signal.h> #include <ace/Acceptor.h> --- 31,38 ---- #ifdef HAVE_ACE #include <stdio.h> ! #ifdef __alpha__ #define __USE_GNU #endif #include <signal.h> #include <ace/Acceptor.h> Index: ComTerp/numfunc.c diff -c ComTerp/numfunc.c:1.5 ComTerp/numfunc.c:1.6 *** ComTerp/numfunc.c:1.5 Fri Apr 12 10:37:25 2002 --- src/ComTerp/numfunc.c Fri May 17 13:53:47 2002 *************** *** 29,34 **** --- 29,35 ---- #include <Attribute/attrlist.h> #include <OS/math.h> #include <math.h> + #include <string.h> #define TITLE "NumFunc" Index: OverlayUnidraw/aceimport.h diff -c OverlayUnidraw/aceimport.h:1.1 OverlayUnidraw/aceimport.h:1.2 *** OverlayUnidraw/aceimport.h:1.1 Fri Nov 2 13:07:02 2001 --- src/OverlayUnidraw/aceimport.h Fri May 17 13:54:01 2002 *************** *** 27,36 **** #define _unidraw_import_handler_ #include <stdio.h> - #if 0 /* does not work for ACE5.1 */ - #define __USE_GNU - #include <sys/msg.h> - #endif #include <signal.h> #include <ace/Acceptor.h> #include <ace/Reactor.h> --- 27,32 ---- Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.6 OverlayUnidraw/ovimport.c:1.7 *** OverlayUnidraw/ovimport.c:1.6 Mon Mar 11 11:57:09 2002 --- src/OverlayUnidraw/ovimport.c Fri May 17 13:54:01 2002 *************** *** 1597,1606 **** if (pathname && !return_fd && strcmp(pathname,"-")!=0 && !compressed) comp = TIFF_Image(pathname); else { ! if (OverlayKit::bincheck("tifftopnm")) { if (OverlayKit::bincheck("ivtiftopnm")) comp = PNM_Image_Filter(*in, return_fd, pnmfd, "ivtiftopnm"); ! else if (OverlayKit::bincheck("ivtiftopnm")) comp = PNM_Image_Filter(*in, return_fd, pnmfd, "tiftopnm"); else cerr << "ivtiftopnm or tiftopnm not found (part of ivtools)\n"; --- 1597,1608 ---- if (pathname && !return_fd && strcmp(pathname,"-")!=0 && !compressed) comp = TIFF_Image(pathname); else { ! /* ivtiftopnm (part of ivtools) is a stdin/stdout wrapper to tifftopnm */ ! /* tiftopnm is the older name for ivtiftopnm */ ! if (OverlayKit::bincheck("tifftopnm")) { if (OverlayKit::bincheck("ivtiftopnm")) comp = PNM_Image_Filter(*in, return_fd, pnmfd, "ivtiftopnm"); ! else if (OverlayKit::bincheck("tiftopnm")) comp = PNM_Image_Filter(*in, return_fd, pnmfd, "tiftopnm"); else cerr << "ivtiftopnm or tiftopnm not found (part of ivtools)\n"; Index: include_std/iostream.h diff -c include_std/iostream.h:1.1 include_std/iostream.h:1.2 *** include_std/iostream.h:1.1 Fri Nov 2 13:07:50 2001 --- src/include/ivstd/iostream.h Fri May 17 13:54:10 2002 *************** *** 1,5 **** --- 1,6 ---- #ifndef _iv_iostream_h_ #define _iv_iostream_h_ + #include <iosfwd> #include_next <iostream.h> #if __GNUG__>=3 *** /dev/null Fri May 17 13:54:14 PDT 2002 --- patches/ivtools-020517-johnston-049 *************** patches/ivtools-020517-johnston-049 *** 0 **** --- 1 ---- + ivtools-020517-johnston-049 |
From: <ivt...@li...> - 2002-05-07 20:39:28
|
Patch: ivtools-020507-johnston-048 For: ivtools-1.0.3 Author: joh...@us... Subject: matrix multiplication, efficient TrueColor raster alpha-transparency Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add matrix multiplication to comterp - greatly improve the efficiency of rendering alpha-transparent rasters with a TrueColor visual. Prior to this each input color was being looked up in a table that could be as long as 2 to the 24th, then the weighed average computed in floating point, then the result rescaled into a TrueColor color. Now everything is done with nothing more than 32 bit integer multiplies, adds, and shifts. Performance has gone from a multi-second lag to adequately interactive. - rename "Custom Tools" to "Extra Tools". - migrate Attribute, Annotate, and GraphicLoc to "Extra Tools". - add a :next flag to comdraw's import func. It attempts to auto-increment the numerics in the last URL and import again. Index: comterp/README diff -c comterp/README:1.4 comterp/README:1.5 *** comterp/README:1.4 Thu Mar 21 16:14:56 2002 --- src/comterp_/README Tue May 7 13:26:16 2002 *************** *** 166,171 **** --- 166,173 ---- matrix=xpose(matrix) -- transpose an arbitrary matrix + matrix=matrix*matrix -- matrix multiplication + STATISTICAL/RANDOM COMMANDS: val=sum(val1[,val2[,...,valn]]) -- return sum of values Index: src_x11/xwindow.c diff -c src_x11/xwindow.c:1.2 src_x11/xwindow.c:1.3 *** src_x11/xwindow.c:1.2 Wed Feb 20 11:53:28 2002 --- src/IV-X11/xwindow.c Tue May 7 13:26:17 2002 *************** *** 1592,1597 **** --- 1592,1598 ---- set_shift(v.red_mask, red_, red_shift_); set_shift(v.green_mask, green_, green_shift_); set_shift(v.blue_mask, blue_, blue_shift_); + bytesize_ = red_ == 0xff && green_ == 0xff && blue_ == 0xff; break; default: rgbtable_ = new RGBTable(512); *************** *** 1656,1662 **** */ void WindowVisual::find_color(unsigned long pixel, XColor& xc) { ! if (!ctable_->find(xc, pixel)) { xc.pixel = pixel; XQueryColor(info_.display_, info_.cmap_, &xc); ctable_->insert(pixel, xc); --- 1657,1668 ---- */ void WindowVisual::find_color(unsigned long pixel, XColor& xc) { ! if (bytesize_) { ! xc.pixel = pixel; ! xc.red = (pixel & 0xff0000)>>8 | (pixel & 0xff0000)>>16; ! xc.green = (pixel & 0x00ff00) | (pixel & 0x00ff00)>>8; ! xc.blue = (pixel & 0x0000ff)<<8 | (pixel & 0x0000ff); ! } else if (!ctable_->find(xc, pixel)) { xc.pixel = pixel; XQueryColor(info_.display_, info_.cmap_, &xc); ctable_->insert(pixel, xc); *************** *** 1694,1708 **** unsigned long r, g, b; switch (info_.visual_->c_class) { case TrueColor: ! r = rescale(red, 0xffff, red_); ! g = rescale(green, 0xffff, green_); ! b = rescale(blue, 0xffff, blue_); ! xc.pixel = ( (r << red_shift_) | (g << green_shift_) | (b << blue_shift_) ! ); ! xc.red = (unsigned short)rescale(r, red_, 0xffff); ! xc.green = (unsigned short)rescale(g, green_, 0xffff); ! xc.blue = (unsigned short)rescale(b, blue_, 0xffff); break; default: RGBTableEntry rgb; --- 1700,1721 ---- unsigned long r, g, b; switch (info_.visual_->c_class) { case TrueColor: ! xc.red = red; ! xc.green = green; ! xc.blue = blue; ! if (bytesize_) { ! xc.pixel = ! ((red & 0xff00) << 8) | ! (green & 0xff00) | ! ((blue & 0xff00) >> 8 ); ! } else { ! r = rescale(red, 0xffff, red_); ! g = rescale(green, 0xffff, green_); ! b = rescale(blue, 0xffff, blue_); ! xc.pixel = ( (r << red_shift_) | (g << green_shift_) | (b << blue_shift_) ! ); ! } break; default: RGBTableEntry rgb; Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.3 OverlayUnidraw/ovkit.c:1.4 *** OverlayUnidraw/ovkit.c:1.3 Fri Apr 19 09:49:19 2002 --- src/OverlayUnidraw/ovkit.c Tue May 7 13:26:24 2002 *************** *** 516,527 **** ToolButton* rotate; ToolButton* reshape; ToolButton* magnify; - ToolButton* attribute; _toolbars = layout.deck(1); ! PolyGlyph* vb = layout.vbox(19); _toolbar_vbox = new Glyph*[2]; _toolbar_vbox[0] = vb; --- 516,526 ---- ToolButton* rotate; ToolButton* reshape; ToolButton* magnify; _toolbars = layout.deck(1); ! PolyGlyph* vb = layout.vbox(); _toolbar_vbox = new Glyph*[2]; _toolbar_vbox[0] = vb; *************** *** 686,697 **** layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(gcspl)), _tg, _ed->MouseDocObservable(), mouse_cspl)); vb->append(MakeTool(new AnnotateTool(new ControlInfo("Annotate", "A", "A")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(anno)), _tg, _ed->MouseDocObservable(), mouse_anno)); ! vb->append(attribute = MakeTool(new AttributeTool(new ControlInfo("Attribute", "T", "T")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), ! layout.hcenter(attr)), _tg, _ed->MouseDocObservable(), mouse_attr)); #ifdef CLIPPOLY vb->append(MakeTool(new ClipRectTool(new ControlInfo("ClipRect", "C", "C")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), --- 685,709 ---- layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(gcspl)), _tg, _ed->MouseDocObservable(), mouse_cspl)); + + _toolbars->append(vb); + vb = layout.vbox(); + _toolbar_vbox[1] = vb; + vb->append(select); + vb->append(move); + vb->append(scale); + vb->append(rotate); + vb->append(reshape); + vb->append(magnify); + vb->append(MakeTool(new AttributeTool(new ControlInfo("Attribute", "T", "T")), + layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), + layout.hcenter(attr)), _tg, _ed->MouseDocObservable(), mouse_attr)); vb->append(MakeTool(new AnnotateTool(new ControlInfo("Annotate", "A", "A")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(anno)), _tg, _ed->MouseDocObservable(), mouse_anno)); ! vb->append(MakeTool(new GrLocTool(new ControlInfo("GraphicLoc", "", "")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), ! layout.hcenter(grloc)), _tg, _ed->MouseDocObservable(), mouse_grloc)); #ifdef CLIPPOLY vb->append(MakeTool(new ClipRectTool(new ControlInfo("ClipRect", "C", "C")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), *************** *** 699,723 **** vb->append(MakeTool(new ClipPolyTool(new ControlInfo("ClipPoly")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(clipp)), _tg, _ed->MouseDocObservable(), mouse_clipp)); if (!bintest("qhull")) vb->append(MakeTool(new ConvexHullTool(new ControlInfo("ConvexHull")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(hull)), _tg, _ed->MouseDocObservable(), mouse_convexhull)); - #endif - vb->append(MakeTool(new GrLocTool(new ControlInfo("GraphicLoc", "", "")), - layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), - layout.hcenter(grloc)), _tg, _ed->MouseDocObservable(), mouse_grloc)); - - _toolbars->append(vb); - vb = layout.vbox(); - _toolbar_vbox[1] = vb; - vb->append(select); - vb->append(move); - vb->append(scale); - vb->append(rotate); - vb->append(reshape); - vb->append(magnify); - vb->append(attribute); _toolbars->append(vb); _toolbars->flip_to(0); _toolbar = new Patch(_toolbars); --- 711,721 ---- vb->append(MakeTool(new ClipPolyTool(new ControlInfo("ClipPoly")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(clipp)), _tg, _ed->MouseDocObservable(), mouse_clipp)); + #endif if (!bintest("qhull")) vb->append(MakeTool(new ConvexHullTool(new ControlInfo("ConvexHull")), layout.overlay(layout.hcenter(layout.hspace(_maxwidth)), layout.hcenter(hull)), _tg, _ed->MouseDocObservable(), mouse_convexhull)); _toolbars->append(vb); _toolbars->flip_to(0); _toolbar = new Patch(_toolbars); *************** *** 1471,1477 **** MenuItem *mbi = kit.menubar_item(kit.label("Tools")); mbi->menu(kit.pulldown()); ! MenuItem* menu_item = kit.menu_item(kit.label("Custom Tools")); menu_item->action(new ActionCallback(OverlayKit)(this, &OverlayKit::toolbar1)); mbi->menu()->append_item(menu_item); --- 1469,1475 ---- MenuItem *mbi = kit.menubar_item(kit.label("Tools")); mbi->menu(kit.pulldown()); ! MenuItem* menu_item = kit.menu_item(kit.label("Extra Tools")); menu_item->action(new ActionCallback(OverlayKit)(this, &OverlayKit::toolbar1)); mbi->menu()->append_item(menu_item); Index: OverlayUnidraw/ovpainter.c diff -c OverlayUnidraw/ovpainter.c:1.5 OverlayUnidraw/ovpainter.c:1.6 *** OverlayUnidraw/ovpainter.c:1.5 Wed Feb 13 09:32:52 2002 --- src/OverlayUnidraw/ovpainter.c Tue May 7 13:26:24 2002 *************** *** 1185,1194 **** boolean transparent_val = 0; ! if (r_r->alphaval()<1.0 || transparent_val) { /* WITH alpha-tranparency */ /* adjust pwidth and pheight, because they might be in error */ XWindow win_ret; int x_ret, y_ret; --- 1185,1197 ---- boolean transparent_val = 0; ! if (r_r->alphaval()<1.0 /* || transparent_val */ ) { /* WITH alpha-tranparency */ + unsigned long alpha = (unsigned long)(r_r->alphaval() * 65535); + unsigned long beta = 65535 - alpha; + /* adjust pwidth and pheight, because they might be in error */ XWindow win_ret; int x_ret, y_ret; *************** *** 1218,1239 **** XColor xc1, xc2; d.rep()->default_visual_->find_color(val1, xc1); d.rep()->default_visual_->find_color(val2, xc2); ! float alpha = r_r->alphaval(); ! float beta = 1.0 - alpha; if (!(transparent_val && xc1.red==0xffff && xc1.green==0xffff && xc1.blue==0xffff)) { ! unsigned short newred = (short unsigned)(xc1.red*alpha+xc2.red*beta); ! unsigned short newgreen = (short unsigned)(xc1.green*alpha+xc2.green*beta); ! unsigned short newblue = (short unsigned)(xc1.blue*alpha+xc2.blue*beta); XColor newcolor; d.rep()->default_visual_->find_color((short unsigned int)newred, (short unsigned int)newgreen, (short unsigned int)newblue, newcolor); XPutPixel(im1, i, j, newcolor.pixel); } else { XPutPixel(im1, i, j, xc2.pixel); } } } --- 1221,1247 ---- XColor xc1, xc2; d.rep()->default_visual_->find_color(val1, xc1); d.rep()->default_visual_->find_color(val2, xc2); ! #if 0 if (!(transparent_val && xc1.red==0xffff && xc1.green==0xffff && xc1.blue==0xffff)) { ! #endif ! unsigned short newred = ! (unsigned short)((xc1.red*alpha+xc2.red*beta)>>16); ! unsigned short newgreen = ! (unsigned short)((xc1.green*alpha+xc2.green*beta)>>16); ! unsigned short newblue = ! (unsigned short)((xc1.blue*alpha+xc2.blue*beta)>>16); XColor newcolor; d.rep()->default_visual_->find_color((short unsigned int)newred, (short unsigned int)newgreen, (short unsigned int)newblue, newcolor); XPutPixel(im1, i, j, newcolor.pixel); + #if 0 } else { XPutPixel(im1, i, j, xc2.pixel); } + #endif } } Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.2 ComUnidraw/unifunc.c:1.3 *** ComUnidraw/unifunc.c:1.2 Wed Dec 19 15:14:26 2001 --- src/ComUnidraw/unifunc.c Tue May 7 13:26:26 2002 *************** *** 277,291 **** } void ImportFunc::execute() { ComValue pathnamev(stack_arg(0)); static int popen_symid = symbol_add("popen"); boolean popen_flag = stack_key(popen_symid).is_true(); reset_stack(); OvImportCmd* cmd; if (!pathnamev.is_array()) { ! if (nargs()==1) { ! if ((cmd = import(pathnamev.string_ptr(), popen_flag)) && cmd->component()) { ComValue compval(((OverlayComp*)cmd->component())->classid(), new ComponentView(cmd->component())); delete cmd; --- 277,318 ---- } void ImportFunc::execute() { + static char* lastpath = nil; + ComValue pathnamev(stack_arg(0)); static int popen_symid = symbol_add("popen"); boolean popen_flag = stack_key(popen_symid).is_true(); + static int next_symid = symbol_add("next"); + boolean next_flag = stack_key(next_symid).is_true(); reset_stack(); + + if (next_flag) { + if (lastpath) { + char* ptr = lastpath + strlen(lastpath) - 1; + while ((*ptr < '0' || *ptr > '9') && ptr > lastpath ) ptr--; + if (*ptr >= '0' && *ptr <= '9') { + do { + if (*ptr >= '0' && *ptr <= '8') *ptr = ++*ptr; + else *ptr = '0'; + } while (*ptr == '0' && --ptr > lastpath); + } + } else { + lastpath = strnew(pathnamev.string_ptr()); + } + } else { + delete lastpath; + lastpath = nil; + } + + if (!next_flag && pathnamev.is_string()) + lastpath = strnew(pathnamev.string_ptr()); + OvImportCmd* cmd; if (!pathnamev.is_array()) { ! if (nargs()==1 || next_flag) { ! if ((cmd = import(next_flag ? lastpath : pathnamev.string_ptr(), ! popen_flag)) && cmd->component()) { ComValue compval(((OverlayComp*)cmd->component())->classid(), new ComponentView(cmd->component())); delete cmd; Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.2 ComUnidraw/unifunc.h:1.3 *** ComUnidraw/unifunc.h:1.2 Wed Dec 19 15:14:26 2001 --- src/ComUnidraw/unifunc.h Tue May 7 13:26:26 2002 *************** *** 123,129 **** }; //: command to import a graphic file ! // compview=import(pathname :popen) -- import graphic file from pathname or URL, or from a command if :popen. class ImportFunc : public UnidrawFunc { public: ImportFunc(ComTerp*,Editor*); --- 123,130 ---- }; //: command to import a graphic file ! // compview=import(pathname :popen :next) -- import graphic file from pathname or URL, or from a command if :popen ! // (:next imports next in numeric series). class ImportFunc : public UnidrawFunc { public: ImportFunc(ComTerp*,Editor*); *************** *** 131,137 **** // helper method to import from path virtual void execute(); virtual const char* docstring() { ! return "compview=%s(pathname :popen) -- import graphic file from pathname or URL, or from a command if :popen"; } }; --- 132,138 ---- // helper method to import from path virtual void execute(); virtual const char* docstring() { ! return "compview=%s(pathname :popen :next) -- import graphic file from pathname or URL, or from a command if :popen\n(:next imports next in numeric series)"; } }; Index: comdraw/README diff -c comdraw/README:1.7 comdraw/README:1.8 *** comdraw/README:1.7 Thu Jan 31 10:20:48 2002 --- src/comdraw/README Tue May 7 13:26:27 2002 *************** *** 84,90 **** update() -- update viewer error=save([pathstr]) -- command to save document (to pathname) ! compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str :eps :idraw) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics --- 84,91 ---- update() -- update viewer error=save([pathstr]) -- command to save document (to pathname) ! compview=import(pathstr :popen :next) -- import graphic file from pathname or URL, or from a command if :popen ! (:next imports next in numeric series) export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str :eps :idraw) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics Index: include_x11/xwindow.h diff -c include_x11/xwindow.h:1.1 include_x11/xwindow.h:1.2 *** include_x11/xwindow.h:1.1 Fri Nov 2 13:07:29 2001 --- src/include/IV-X11/xwindow.h Tue May 7 13:26:30 2002 *************** *** 101,106 **** --- 101,107 ---- unsigned long blue_shift_; unsigned long white_; unsigned long xor_; + boolean bytesize_; static void find_visual_by_class_name(const String&, WindowVisualInfo&); static boolean find_layer(const String&, int& layer); Index: man1_ivtools/comdraw.1 diff -c man1_ivtools/comdraw.1:1.7 man1_ivtools/comdraw.1:1.8 *** man1_ivtools/comdraw.1:1.7 Thu Jan 31 10:20:57 2002 --- src/man/man1/comdraw.1 Tue May 7 13:26:33 2002 *************** *** 93,99 **** update() -- update viewer error=save([pathstr]) -- command to save document (to pathname) ! compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str :eps :idraw) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics --- 93,100 ---- update() -- update viewer error=save([pathstr]) -- command to save document (to pathname) ! compview=import(pathstr :popen :next) -- import graphic file from pathname or URL, or from a command if :popen ! (:next imports next in numeric series) export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str :eps :idraw) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics Index: man1_ivtools/comterp.1 diff -c man1_ivtools/comterp.1:1.4 man1_ivtools/comterp.1:1.5 *** man1_ivtools/comterp.1:1.4 Thu Mar 21 16:15:20 2002 --- src/man/man1/comterp.1 Tue May 7 13:26:33 2002 *************** *** 177,182 **** --- 177,184 ---- matrix=xpose(matrix) -- transpose an arbitrary matrix + matrix=matrix*matrix -- matrix multiplication + .SH STATISTICAL/RANDOM COMMANDS: sum(val1[,val2[,...,valn]]) -- return sum of values *** /dev/null Tue May 7 13:26:35 PDT 2002 --- patches/ivtools-020507-johnston-048 *************** patches/ivtools-020507-johnston-048 *** 0 **** --- 1 ---- + ivtools-020507-johnston-048 |
From: <ivt...@li...> - 2002-04-19 16:58:31
|
Patch: ivtools-020419-johnston-047 For: ivtools-1.0.3 Author: joh...@us... Subject: add support for panning with cursor keys and PgUp/PgDn Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add support for panning with cursor keys (left/right/up/down) as well as Page Up and Page Down (PgUp/PgDn) for larger vertical moves. Index: src_x11/xevent.c diff -c src_x11/xevent.c:1.1 src_x11/xevent.c:1.2 *** src_x11/xevent.c:1.1 Fri Nov 2 13:05:07 2001 --- src/IV-X11/xevent.c Fri Apr 19 09:49:05 2002 *************** *** 41,46 **** --- 41,47 ---- #include <IV-X11/xwindow.h> #include <X11/keysymdef.h> #include <string.h> + #include <stdio.h> event_tracker_ptr Event::_event_tracker = nil; *************** *** 358,363 **** --- 359,376 ---- buf[i] |= 0200; } } + + + #if 0 /* determined this would be better done in Editor::keystroke */ + if (!n) { + KeySym ks = XKeycodeToKeysym(rep()->display_->rep()->display_, xe.xkey.keycode, 0); + if (ks) { + strncpy(buf, (const char*)&ks, 2); + n = 2; + } + } + #endif + } return n; } Index: Unidraw/editor.c diff -c Unidraw/editor.c:1.1 Unidraw/editor.c:1.2 *** Unidraw/editor.c:1.1 Fri Nov 2 13:06:49 2001 --- src/Unidraw/editor.c Fri Apr 19 09:49:17 2002 *************** *** 39,46 **** #include <InterViews/style.h> #include <InterViews/target.h> #include <InterViews/window.h> ! #include <OS/list.h> declarePtrList(EditorImpl,TransientWindow) implementPtrList(EditorImpl,TransientWindow) --- 39,48 ---- #include <InterViews/style.h> #include <InterViews/target.h> #include <InterViews/window.h> ! #include <IV-X11/xdisplay.h> ! #include <IV-X11/xevent.h> #include <OS/list.h> + #include <string.h> declarePtrList(EditorImpl,TransientWindow) implementPtrList(EditorImpl,TransientWindow) *************** *** 117,122 **** --- 119,134 ---- if (n > 0) { buf[n] = '\0'; GetKeyMap()->Execute(buf); + } else if (e.rep()->xevent_.type == KeyPress) { + KeySym ks = XKeycodeToKeysym(e.rep()->display_->rep()->display_, + e.rep()->xevent_.xkey.keycode, 0); + if (ks) { + strncpy(buf, (const char*)&ks, 2); + n = 2; + buf[n] = '\0'; + GetKeyMap()->Execute(buf); + } + } } Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.2 OverlayUnidraw/ovkit.c:1.3 *** OverlayUnidraw/ovkit.c:1.2 Thu Nov 29 07:39:20 2001 --- src/OverlayUnidraw/ovkit.c Fri Apr 19 09:49:19 2002 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2002 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1998-2000 Vectaport Inc. * Copyright (c) 1994-1995 Vectaport Inc., Cartoactive Systems *************** *** 150,155 **** --- 151,158 ---- #include <Attribute/attrlist.h> #include <Attribute/attrvalue.h> + #include <X11/keysym.h> + #include <stdlib.h> #include <string.h> *************** *** 1306,1311 **** --- 1309,1318 ---- } MenuItem* OverlayKit::MakeViewMenu() { + /* for handling special keys */ + char keystr[3]; + keystr[2] = '\0'; + LayoutKit& lk = *LayoutKit::instance(); WidgetKit& kit = *WidgetKit::instance(); *************** *** 1381,1402 **** MenuItem* spani = kit.menu_item(kit.label("Small Pan ")); Menu* span = kit.pullright(); spani->menu(span); ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Up"), NO_PAN, PLUS_SMALL_PAN), "Small Pan Up "); ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Down"), NO_PAN, MINUS_SMALL_PAN), "Small Pan Down "); ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Left"), MINUS_SMALL_PAN, NO_PAN), "Small Pan Left "); ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Right"), PLUS_SMALL_PAN, NO_PAN), "Small Pan Right "); mbi->menu()->append_item(spani); MenuItem* lpani = kit.menu_item(kit.label("Large Pan ")); Menu* lpan = kit.pullright(); lpani->menu(lpan); ! MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Up"), NO_PAN, PLUS_LARGE_PAN), "Large Pan Up "); ! MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Down"), NO_PAN, MINUS_LARGE_PAN), "Large Pan Down "); MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Left"), MINUS_LARGE_PAN, NO_PAN), "Large Pan Left "); --- 1388,1415 ---- MenuItem* spani = kit.menu_item(kit.label("Small Pan ")); Menu* span = kit.pullright(); spani->menu(span); ! *(unsigned short*)keystr = XK_Up; ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Up", "", keystr), NO_PAN, PLUS_SMALL_PAN), "Small Pan Up "); ! *(unsigned short*)keystr = XK_Down; ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Down", "", keystr), NO_PAN, MINUS_SMALL_PAN), "Small Pan Down "); ! *(unsigned short*)keystr = XK_Left; ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Left", "", keystr), MINUS_SMALL_PAN, NO_PAN), "Small Pan Left "); ! *(unsigned short*)keystr = XK_Right; ! MakeMenu(spani, new FixedPanCmd(new ControlInfo("Small Pan Right", "", keystr), PLUS_SMALL_PAN, NO_PAN), "Small Pan Right "); mbi->menu()->append_item(spani); MenuItem* lpani = kit.menu_item(kit.label("Large Pan ")); Menu* lpan = kit.pullright(); lpani->menu(lpan); ! *(unsigned short*)keystr = XK_Page_Up; ! MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Up", "PgUp", keystr), NO_PAN, PLUS_LARGE_PAN), "Large Pan Up "); ! *(unsigned short*)keystr = XK_Page_Down; ! MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Down", "PgDn", keystr), NO_PAN, MINUS_LARGE_PAN), "Large Pan Down "); MakeMenu(lpani, new FixedPanCmd(new ControlInfo("Large Pan Left"), MINUS_LARGE_PAN, NO_PAN), "Large Pan Left "); *** /dev/null Fri Apr 19 09:49:31 PDT 2002 --- patches/ivtools-020419-johnston-047 *************** patches/ivtools-020419-johnston-047 *** 0 **** --- 1 ---- + ivtools-020419-johnston-047 |
From: <ivt...@li...> - 2002-04-12 17:48:44
|
Patch: ivtools-020412-johnston-046 For: ivtools-1.0.3 Author: joh...@us... Subject: extend matrix multiply to support vector inputs Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - extend matrix multiply to support vector inputs. Now: a=list,list(1),list(2),list(3) b=list,list(1,2,3) a*b Yields the same as: a=1,2,3 b=list,list(1,2,3) a*b Conversely: a=list,list(1,2,3) b=list,list(1),list(2),list(3) a*b Yields the same as: a=list,list(1,2,3) b=1,2,3 a*b And: list(2)*list(3) Yields: {{6}} Index: ComTerp/numfunc.c diff -c ComTerp/numfunc.c:1.4 ComTerp/numfunc.c:1.5 *** ComTerp/numfunc.c:1.4 Thu Apr 11 10:48:11 2002 --- src/ComTerp/numfunc.c Fri Apr 12 10:37:25 2002 *************** *** 27,32 **** --- 27,33 ---- #include <ComTerp/comterp.h> #include <Unidraw/iterator.h> #include <Attribute/attrlist.h> + #include <OS/math.h> #include <math.h> #define TITLE "NumFunc" *************** *** 455,461 **** list1->GetAttrVal(it2)->array_val()->Number() : 0; /* ensure inner dimension is the same */ ! if (j1max != i2max) return nil; /* ensure each row is of equal length */ list1->First(it1); --- 456,463 ---- list1->GetAttrVal(it2)->array_val()->Number() : 0; /* ensure inner dimension is the same */ ! /* allow for vector argument on rhs */ ! if (j1max != i2max && (j1max || i2max!=1)) return nil; /* ensure each row is of equal length */ list1->First(it1); *************** *** 494,533 **** AttributeValueList* row1 = row1v && row1v->is_array() ? row1v->array_val() : nil; ! if (!row1) break; ! ! /* loop over output columns */ ! for (int j3=0; j3<j3max; j3++) { ! row1->First(itj1); /* generate inner product */ ! for (int n=0; n<j1max; n++) { ! ! /* locate the value from the second matrix */ ! Iterator iti2, itj2; list2->First(iti2); for (int i=0; i<n; i++) list2->Next(iti2); ! AttributeValue* row2v = list1->GetAttrVal(iti2); ! AttributeValueList* row2 = row2v && row2v->is_array() ? ! row2v->array_val() : nil; ! if (row2) { ! row2->First(itj2); ! for (int j=0; j<j3; j++) row2->Next(itj2); ! } ! if (row1 && row2) { ! comterp()->push_stack(*row1->GetAttrVal(itj1)); ! comterp()->push_stack(*row2->GetAttrVal(itj2)); exec(2,0); if (n) addfunc.exec(2,0); } ! ! row1->Next(itj1); } prodrow->Append(new AttributeValue(comterp()->pop_stack())); } - /* done looping over output columsn */ list1->Next(iti1); } --- 496,566 ---- AttributeValueList* row1 = row1v && row1v->is_array() ? row1v->array_val() : nil; ! if (j3max) { ! /* loop over output columns */ ! for (int j3=0; j3<j3max; j3++) { ! ! if (row1) row1->First(itj1); ! ! /* generate inner product */ ! for (int n=0; n<Math::max(j1max,1); n++) { ! ! /* locate the value from the second matrix */ ! Iterator iti2, itj2; ! list2->First(iti2); ! for (int i=0; i<n; i++) list2->Next(iti2); ! AttributeValue* row2v = list1->GetAttrVal(iti2); ! AttributeValueList* row2 = row2v && row2v->is_array() ? ! row2v->array_val() : nil; ! if (row2) { ! row2->First(itj2); ! for (int j=0; j<j3; j++) row2->Next(itj2); ! } ! if ((row1 || !j1max) && row2) { ! if (row1) ! comterp()->push_stack(*row1->GetAttrVal(itj1)); ! else ! comterp()->push_stack(*row1v); ! comterp()->push_stack(*row2->GetAttrVal(itj2)); ! exec(2,0); ! if (n) addfunc.exec(2,0); ! } ! ! if (row1) row1->Next(itj1); ! } ! ! prodrow->Append(new AttributeValue(comterp()->pop_stack())); ! } ! /* done looping over output columsn */ ! } else { ! /* handle single output column */ + if (row1) row1->First(itj1); + /* generate inner product */ ! for (int n=0; n<Math::max(j1max,1); n++) { ! ! /* locate the value from the lhs vector */ ! Iterator iti2; list2->First(iti2); for (int i=0; i<n; i++) list2->Next(iti2); ! AttributeValue* val2v = list1->GetAttrVal(iti2); ! if ((row1 || !j1max) && val2v) { ! if (row1) ! comterp()->push_stack(*row1->GetAttrVal(itj1)); ! else ! comterp()->push_stack(*row1v); ! comterp()->push_stack(*val2v); exec(2,0); if (n) addfunc.exec(2,0); } ! ! if (row1) row1->Next(itj1); } prodrow->Append(new AttributeValue(comterp()->pop_stack())); } list1->Next(iti1); } *** /dev/null Fri Apr 12 10:37:50 PDT 2002 --- patches/ivtools-020412-johnston-046 *************** patches/ivtools-020412-johnston-046 *** 0 **** --- 1 ---- + ivtools-020412-johnston-046 |
From: <ivt...@li...> - 2002-04-11 17:56:10
|
Patch: ivtools-020411-johnston-045 For: ivtools-1.0.3 Author: joh...@us... Subject: add matrix multiplication to comterp "*" operator Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add matrix multiplication to comterp "*" operator. If: a=(1,4),(2,-3),(3,1),(-1,0) b=(-1,2,1),(-9,2,-3) Then: a*b Yields: {{-37,10,-11},{25,-2,11},{-12,8,0},{1,-2,-1}} Index: ComTerp/debugfunc.h diff -c ComTerp/debugfunc.h:1.2 ComTerp/debugfunc.h:1.3 *** ComTerp/debugfunc.h:1.2 Fri Nov 16 10:25:13 2001 --- src/ComTerp/debugfunc.h Thu Apr 11 10:48:11 2002 *************** *** 34,47 **** class ComValue; //: command for toggling or setting trace mode ! // val=trace([flag] :val) -- toggle or set trace mode class ComterpTraceFunc : public ComFunc { public: ComterpTraceFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "val=%s([flag] :val) -- toggle or set trace mode"; } }; //: command to pause script execution until C/R --- 34,47 ---- class ComValue; //: command for toggling or setting trace mode ! // val=trace([flag] :get) -- toggle or set trace mode class ComterpTraceFunc : public ComFunc { public: ComterpTraceFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "val=%s([flag] :get) -- toggle or set trace mode"; } }; //: command to pause script execution until C/R Index: ComTerp/listfunc.c diff -c ComTerp/listfunc.c:1.3 ComTerp/listfunc.c:1.4 *** ComTerp/listfunc.c:1.3 Thu Mar 21 16:14:54 2002 --- src/ComTerp/listfunc.c Thu Apr 11 10:48:11 2002 *************** *** 76,82 **** return; } ! } else avl->Append(new AttributeValue(listv)); } Resource::ref(avl); --- 76,82 ---- return; } ! } else if (nargs()) avl->Append(new AttributeValue(listv)); } Resource::ref(avl); Index: ComTerp/numfunc.c diff -c ComTerp/numfunc.c:1.3 ComTerp/numfunc.c:1.4 *** ComTerp/numfunc.c:1.3 Fri Mar 22 11:18:44 2002 --- src/ComTerp/numfunc.c Thu Apr 11 10:48:11 2002 *************** *** 412,421 **** --- 412,540 ---- case ComValue::DoubleType: result.double_ref() = operand1.double_val() * operand2.double_val(); break; + case ComValue::ArrayType: + { + if (operand2.is_array()) { + Resource::unref(result.array_val()); + AttributeValueList* avl = + MpyFunc::matrix_mpy(operand1.array_val(), operand2.array_val()); + if (avl) { + result.array_ref() = avl; + Resource::ref(result.array_val()); + } else + result.type(ComValue::UnknownType); // nil + } + else + result.type(ComValue::UnknownType); // nil + } + break; } reset_stack(); push_stack(result); + } + + AttributeValueList* MpyFunc::matrix_mpy(AttributeValueList* list1, + AttributeValueList* list2) { + + static AddFunc addfunc(comterp()); + Iterator it1, it2; + list1->First(it1); + list2->First(it2); + + // extract dimensions + int i1max, j1max; + int i2max, j2max; + i1max = list1->Number(); + i2max = list2->Number(); + j1max = list1->GetAttrVal(it1)->is_array() && + list1->GetAttrVal(it1)->array_val() ? + list1->GetAttrVal(it1)->array_val()->Number() : 0; + j2max = list2->GetAttrVal(it2)->is_array() && + list1->GetAttrVal(it2)->array_val() ? + list1->GetAttrVal(it2)->array_val()->Number() : 0; + + /* ensure inner dimension is the same */ + if (j1max != i2max) return nil; + + /* ensure each row is of equal length */ + list1->First(it1); + list1->Next(it1); + while (!list1->Done(it1)) { + int jlen = list1->GetAttrVal(it1)->is_array() && + list1->GetAttrVal(it1)->array_val() ? + list1->GetAttrVal(it1)->array_val()->Number() : 0; + if (jlen != j1max) return nil; + list1->Next(it1); + } + list2->First(it2); + list2->Next(it2); + while (!list2->Done(it2)) { + int jlen = list2->GetAttrVal(it2)->is_array() && + list2->GetAttrVal(it2)->array_val() ? + list2->GetAttrVal(it2)->array_val()->Number() : 0; + if (jlen != j2max) return nil; + list2->Next(it2); + } + + + AttributeValueList* product = new AttributeValueList(); + + int i3max = i1max; + int j3max = j2max; + + /* loop over output rows */ + Iterator iti1, itj1; + list1->First(iti1); + + for (int i3=0; i3<i3max; i3++) { + AttributeValueList* prodrow = new AttributeValueList(); + product->Append(new AttributeValue(prodrow)); + AttributeValue* row1v = list1->GetAttrVal(iti1); + AttributeValueList* row1 = row1v && row1v->is_array() ? + row1v->array_val() : nil; + + if (!row1) break; + + /* loop over output columns */ + for (int j3=0; j3<j3max; j3++) { + + row1->First(itj1); + + /* generate inner product */ + for (int n=0; n<j1max; n++) { + + /* locate the value from the second matrix */ + Iterator iti2, itj2; + list2->First(iti2); + for (int i=0; i<n; i++) list2->Next(iti2); + AttributeValue* row2v = list1->GetAttrVal(iti2); + AttributeValueList* row2 = row2v && row2v->is_array() ? + row2v->array_val() : nil; + if (row2) { + row2->First(itj2); + for (int j=0; j<j3; j++) row2->Next(itj2); + } + if (row1 && row2) { + comterp()->push_stack(*row1->GetAttrVal(itj1)); + comterp()->push_stack(*row2->GetAttrVal(itj2)); + exec(2,0); + if (n) addfunc.exec(2,0); + } + + row1->Next(itj1); + } + + prodrow->Append(new AttributeValue(comterp()->pop_stack())); + } + /* done looping over output columsn */ + + list1->Next(iti1); + } + /* done looping over output rows */ + + + return product; } DivFunc::DivFunc(ComTerp* comterp) : NumFunc(comterp) { Index: ComTerp/numfunc.h diff -c ComTerp/numfunc.h:1.2 ComTerp/numfunc.h:1.3 *** ComTerp/numfunc.h:1.2 Fri Mar 22 11:18:44 2002 --- src/ComTerp/numfunc.h Thu Apr 11 10:48:11 2002 *************** *** 80,92 **** }; //: * (multiply) operator. class MpyFunc : public NumFunc { public: MpyFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "* is the multiply operator"; } }; --- 80,95 ---- }; //: * (multiply) operator. + // multiplies numerics and matrices class MpyFunc : public NumFunc { public: MpyFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "* is the multiply operator for numerics and matrices"; } ! ! AttributeValueList* matrix_mpy(AttributeValueList*, AttributeValueList*); }; *** /dev/null Thu Apr 11 10:48:37 PDT 2002 --- patches/ivtools-020411-johnston-045 *************** patches/ivtools-020411-johnston-045 *** 0 **** --- 1 ---- + ivtools-020411-johnston-045 |
From: <ivt...@li...> - 2002-03-22 19:22:34
|
Patch: ivtools-020322-johnston-044 For: ivtools-1.0.3 Author: joh...@us... Subject: matrix addition operator Requires: This is an intermediate patch to ivtools-1.0.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - adds a matrix addition capability to the comterp "+" operator. Index: ComTerp/numfunc.c diff -c ComTerp/numfunc.c:1.2 ComTerp/numfunc.c:1.3 *** ComTerp/numfunc.c:1.2 Fri Nov 30 05:52:48 2001 --- src/ComTerp/numfunc.c Fri Mar 22 11:18:44 2002 *************** *** 25,30 **** --- 25,32 ---- #include <ComTerp/numfunc.h> #include <ComTerp/comvalue.h> #include <ComTerp/comterp.h> + #include <Unidraw/iterator.h> + #include <Attribute/attrlist.h> #include <math.h> #define TITLE "NumFunc" *************** *** 228,236 **** --- 230,269 ---- result.string_ref() = symbol_add(buffer); } break; + case ComValue::ArrayType: + { + if (operand2.is_array()) { + Resource::unref(result.array_val()); + result.array_ref() = + AddFunc::matrix_add(operand1.array_val(), operand2.array_val()); + Resource::ref(result.array_val()); + } + else + result.type(ComValue::UnknownType); // nil + } + break; + } reset_stack(); push_stack(result); + } + + + AttributeValueList* AddFunc::matrix_add(AttributeValueList* list1, + AttributeValueList* list2) { + AttributeValueList* sum = new AttributeValueList(); + Iterator it1, it2; + list1->First(it1); + list2->First(it2); + while (!list1->Done(it1) && !list2->Done(it2)) { + push_stack(*list1->GetAttrVal(it1)); + push_stack(*list2->GetAttrVal(it2)); + exec(2, 0); + sum->Append(new AttributeValue(comterp()->pop_stack())); + list1->Next(it1); + list2->Next(it2); + } + return sum; } SubFunc::SubFunc(ComTerp* comterp) : NumFunc(comterp) { Index: ComTerp/numfunc.h diff -c ComTerp/numfunc.h:1.1 ComTerp/numfunc.h:1.2 *** ComTerp/numfunc.h:1.1 Fri Nov 2 13:04:49 2001 --- src/ComTerp/numfunc.h Fri Mar 22 11:18:44 2002 *************** *** 45,57 **** }; //: + (plus) operator. class AddFunc : public NumFunc { public: AddFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "+ is the add operator"; } }; --- 45,60 ---- }; //: + (plus) operator. + // adds numerics and matrices, and concatenating strings class AddFunc : public NumFunc { public: AddFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "+ is the add operator for numerics and matrices, and the concatenation operator for strings"; } ! ! AttributeValueList* matrix_add(AttributeValueList*, AttributeValueList*); }; *** /dev/null Fri Mar 22 11:19:13 PST 2002 --- patches/ivtools-020322-johnston-044 *************** patches/ivtools-020322-johnston-044 *** 0 **** --- 1 ---- + ivtools-020322-johnston-044 |