ivtools-patch Mailing List for ivtools
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...> - 2004-03-16 19:05:29
|
This is a single e-mail with 34 patch attachments. This represent 34 individual commits to the cvs server from 2/24/04 thru 3/16/04. For the most part it represents the evolution of drawserv toward a peer-to-peer drawing chat program. It does include one fix for the default -display argument introduced in ivtools-1.1.3. Now this should work on Unix boxes that disallow localhost, and thru ssh X forwarding. Scott Johnston |
|
From: <ivt...@li...> - 2004-02-24 18:17:03
|
Patch: ivtools-040224-johnston-012 For: ivtools-1.1.3 Author: joh...@us... Subject: change configure to delete include/IV-3_1/InterViews before making symbolic link Requires: This is an intermediate patch to ivtools-1.1.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: - change configure to delete include/IV-3_1/InterViews before making symbolic link Index: top_ivtools/configure diff -c top_ivtools/configure:1.2 top_ivtools/configure:1.3 *** top_ivtools/configure:1.2 Tue Feb 10 11:40:58 2004 --- ./configure Tue Feb 24 10:09:51 2004 *************** *** 4847,4858 **** echo #make symbolic links if they do not exist ! if test ! -d src/include/IV-3_1/InterViews ; then ! echo "establishing symbolic link for src/include/IV-3_1/InterViews" ! cd src/include/IV-3_1; ! ln -s ../InterViews; ! cd ../../..; ! fi if test ! -f src/IV-common/listimpl.c ; then echo "establishing symbolic links for src/IV-common" --- 4847,4857 ---- echo #make symbolic links if they do not exist ! echo "establishing symbolic link for src/include/IV-3_1/InterViews" ! cd src/include/IV-3_1; ! rm -rf InterViews; ! ln -s ../InterViews; ! cd ../../..; if test ! -f src/IV-common/listimpl.c ; then echo "establishing symbolic links for src/IV-common" Index: top_ivtools/configure.in diff -c top_ivtools/configure.in:1.2 top_ivtools/configure.in:1.3 *** top_ivtools/configure.in:1.2 Tue Feb 10 11:40:58 2004 --- ./configure.in Tue Feb 24 10:09:51 2004 *************** *** 394,405 **** echo #make symbolic links if they do not exist ! if test ! -d src/include/IV-3_1/InterViews ; then ! echo "establishing symbolic link for src/include/IV-3_1/InterViews" ! cd src/include/IV-3_1; ! ln -s ../InterViews; ! cd ../../..; ! fi if test ! -f src/IV-common/listimpl.c ; then echo "establishing symbolic links for src/IV-common" --- 394,404 ---- echo #make symbolic links if they do not exist ! echo "establishing symbolic link for src/include/IV-3_1/InterViews" ! cd src/include/IV-3_1; ! rm -rf InterViews; ! ln -s ../InterViews; ! cd ../../..; if test ! -f src/IV-common/listimpl.c ; then echo "establishing symbolic links for src/IV-common" *** /dev/null Tue Feb 24 10:10:24 PST 2004 --- patches/ivtools-040224-johnston-012 *************** patches/ivtools-040224-johnston-012 *** 0 **** --- 1 ---- + ivtools-040224-johnston-012 |
|
From: <ivt...@li...> - 2004-02-24 18:15:47
|
Patch: ivtools-040218-johnston-011
For: ivtools-1.1.2
Author: joh...@us...
Subject: a lot of fixes leading up to ivtools-1.1.3
Requires:
This is an intermediate patch to ivtools-1.1.2. 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 lot of fixes leading up to 1.1.3
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.3 ComTerp/comterp.c:1.4
*** ComTerp/comterp.c:1.3 Wed Feb 11 12:03:30 2004
--- src/ComTerp/comterp.c Wed Feb 18 09:29:10 2004
***************
*** 890,897 ****
? handler()->wrfptr() : stdout,
ios_base::out);
#else
! fileptr_filebuf fbuf(handler() ? handler()->get_handle() : 1,
! ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream out(&fbuf);
boolean eolflag = false;
--- 890,898 ----
? handler()->wrfptr() : stdout,
ios_base::out);
#else
! fileptr_filebuf fbuf(handler()&&handler()->get_handle()>0
! ? handler()->get_handle() : 1,
! ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream out(&fbuf);
boolean eolflag = false;
Index: ComTerp/comterpserv.c
diff -c ComTerp/comterpserv.c:1.2 ComTerp/comterpserv.c:1.3
*** ComTerp/comterpserv.c:1.2 Wed Feb 11 12:03:30 2004
--- src/ComTerp/comterpserv.c Wed Feb 18 09:29:10 2004
***************
*** 324,330 ****
FILE* ofptr = fdopen(handler() ?
handler()->get_handle() : 1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
#else
! fileptr_filebuf obuf(handler() ? (int)handler()->get_handle() : 1,
ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream ostr(&obuf);
--- 324,331 ----
FILE* ofptr = fdopen(handler() ?
handler()->get_handle() : 1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
#else
! fileptr_filebuf obuf(handler()&&handler()->get_handle()>0
! ? (int)handler()->get_handle() : 1,
ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream ostr(&obuf);
***************
*** 348,354 ****
FILE* ofptr = fdopen(handler() ? handler()->get_handle() :
1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
#else
! fileptr_filebuf obuf(handler() ? (int)handler()->get_handle() : 1,
ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
--- 349,356 ----
FILE* ofptr = fdopen(handler() ? handler()->get_handle() :
1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
#else
! fileptr_filebuf obuf(handler()&&handler()->get_handle()>0
! ? (int)handler()->get_handle() : 1,
ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.2 config_ivtools/params.def:1.3
*** config_ivtools/params.def:1.2 Thu Jan 29 10:52:21 2004
--- config/params.def Wed Feb 18 09:29:37 2004
***************
*** 27,33 ****
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.2
#endif
RELEASE = Release
--- 27,33 ----
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.3
#endif
RELEASE = Release
***************
*** 36,42 ****
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.2
#endif
VERSION = Version
--- 36,42 ----
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.3
#endif
VERSION = Version
Index: DrawServ/Imakefile
diff -c DrawServ/Imakefile:1.2 DrawServ/Imakefile:1.3
*** DrawServ/Imakefile:1.2 Thu Feb 12 13:27:07 2004
--- src/DrawServ/Imakefile Wed Feb 18 09:29:27 2004
***************
*** 8,25 ****
LIB = DrawServ
Use_libUnidraw()
Use_2_6()
MakeLibrary($(LIB),$(VERSION))
#define Obj26(file) MakeObjectFromSrcFlags(file,)
Obj26(drawcatalog)
Obj26(drawcreator)
Obj26(drawcomps)
Obj26(draweditor)
! Obj26(drawfunc)
Obj26(drawserv)
Obj26(drawviews)
--- 8,29 ----
LIB = DrawServ
+ OTHER_CCDEFINES = $(ACE_CCDEFINES)
+ OTHER_CCINCLUDES = $(ACE_CCINCLUDES)
+
Use_libUnidraw()
Use_2_6()
MakeLibrary($(LIB),$(VERSION))
#define Obj26(file) MakeObjectFromSrcFlags(file,)
+ #define Obj26A(file) MakeObjectFromSrcFlags(file, -D__ACE_INLINE__)
Obj26(drawcatalog)
Obj26(drawcreator)
Obj26(drawcomps)
Obj26(draweditor)
! Obj26A(drawfunc)
Obj26(drawserv)
Obj26(drawviews)
Index: DrawServ/drawfunc.c
diff -c DrawServ/drawfunc.c:1.1 DrawServ/drawfunc.c:1.2
*** DrawServ/drawfunc.c:1.1 Thu Feb 12 13:27:07 2004
--- src/DrawServ/drawfunc.c Wed Feb 18 09:29:27 2004
***************
*** 37,63 ****
}
void DrawServFunc::execute() {
! #if 1
reset_stack();
! printf("drawserv func is empty\n");
push_stack(ComValue::nullval());
#else
ComValue hostv(stack_arg(0, true));
! ComValue portv(stack_arg(1));
! ComValue cmdstrv(stack_arg(2));
! static int nowait_sym = symbol_add("nowait");
! ComValue nowaitv(stack_key(nowait_sym));
reset_stack();
- #ifdef HAVE_ACE
-
#if __GNUC__==3&&__GNUC_MINOR__<1
fprintf(stderr, "Please upgrade to gcc-3.1 or greater\n");
push_stack(ComValue::nullval());
return;
#endif
! if (hostv.is_string() && portv.is_known() && cmdstrv.is_string()) {
const char* hoststr = hostv.string_ptr();
const char* portstr = portv.is_string() ? portv.string_ptr() :
nil;
--- 37,63 ----
}
void DrawServFunc::execute() {
! #ifndef HAVE_ACE
!
reset_stack();
! fprintf(stderr, "rebuild ivtools with ACE support to get full
drawserv functionality\n");
push_stack(ComValue::nullval());
+
#else
+
ComValue hostv(stack_arg(0, true));
! static int port_sym = symbol_add("port");
! ComValue default_port(20002);
! ComValue portv(stack_key(port_sym, false, default_port, true));
reset_stack();
#if __GNUC__==3&&__GNUC_MINOR__<1
fprintf(stderr, "Please upgrade to gcc-3.1 or greater\n");
push_stack(ComValue::nullval());
return;
#endif
! if (hostv.is_string() && portv.is_known()) {
const char* hoststr = hostv.string_ptr();
const char* portstr = portv.is_string() ? portv.string_ptr() :
nil;
***************
*** 71,119 ****
return;
}
- #if __GNUC__<3
- filebuf ofbuf;
- ofbuf.attach(socket.get_handle());
- #else
- fileptr_filebuf ofbuf((int)socket.get_handle(), ios_base::out,
- false, static_cast<size_t>(BUFSIZ));
- #endif
- ostream out(&ofbuf);
- const char* cmdstr = cmdstrv.string_ptr();
- out << cmdstr;
- 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);
- char* buf;
- in.gets(&buf);
- #else
- char buf[BUFSIZ];
- int i=0;
- do {
- read(socket.get_handle(), buf+i++, 1);
- } while (i<BUFSIZ-1 && buf[i-1]!='\n');
- if (buf[i]=='\n') buf[i]==0;
- #endif
- ComValue& retval = comterpserv()->run(buf, true);
- push_stack(retval);
- }
-
if (socket.close () == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "close"));
}
return;
- #else
-
- cerr << "for the remote command to work rebuild comterp with ACE\n";
- return;
-
- #endif
#endif
}
--- 71,84 ----
return;
}
if (socket.close () == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "close"));
+
+ push_stack(ComValue::zeroval());
}
return;
#endif
}
Index: include_std/version.h
diff -c include_std/version.h:1.1 include_std/version.h:1.2
*** include_std/version.h:1.1 Fri Jan 9 11:46:11 2004
--- src/include/ivstd/version.h Wed Feb 18 09:29:33 2004
***************
*** 1,3 ****
! #define IvtoolsVersion 1.1.2
! #define VersionString "1.1.2"
! #define ReleaseString "ivtools-1.1.2"
--- 1,3 ----
! #define IvtoolsVersion 1.1.3
! #define VersionString "1.1.3"
! #define ReleaseString "ivtools-1.1.3"
Index: top_ivtools/CHANGES
diff -c top_ivtools/CHANGES:1.1 top_ivtools/CHANGES:1.2
*** top_ivtools/CHANGES:1.1 Fri Jan 9 11:42:09 2004
--- ./CHANGES Wed Feb 18 09:29:07 2004
***************
*** 1,3 ****
--- 1,15 ----
+ February 18th, 2004 ivtools-1.1.3
+
+ - continue evolution of iostreams usage to keep up with changes to
+ libstdc++-v3. Many thanks for reinstating a filebuf constructor that
+ accepts an integer file descriptor. Hard to wrap them around sockets
+ any other way.
+
+ - fix problem with use of ACE on Darwin with gcc-3.3.
+
+ - fix problem with lexical scanning introduced when "#" comment lines
+ were first handled.
+
December December 8th, 2003 ivtools-1.1.2
- fixes a problem with using gcc-2.95 to compile ivtools-1.1.*. It
Index: top_ivtools/Copyright
diff -c top_ivtools/Copyright:1.1 top_ivtools/Copyright:1.3
*** top_ivtools/Copyright:1.1 Fri Jan 9 11:42:09 2004
--- ./Copyright Wed Feb 18 09:29:07 2004
***************
*** 1,5 ****
/*
! * Copyright (c) 2001, 2002, 2003 Scott Johnston
* Copyright (c) 2000 Vectaport Inc., IET Inc
* Copyright (c) 1999 Vectaport Inc., IET Inc, R.B. Kissh and
Associates
* Copyright (c) 1998 Vectaport Inc., R.B. Kissh and Associates,
Eric F. Kahler
--- 1,5 ----
/*
! * Copyright (c) 2001, 2002, 2003, 2004 Scott E. Johnston
* Copyright (c) 2000 Vectaport Inc., IET Inc
* Copyright (c) 1999 Vectaport Inc., IET Inc, R.B. Kissh and
Associates
* Copyright (c) 1998 Vectaport Inc., R.B. Kissh and Associates,
Eric F. Kahler
Index: top_ivtools/INSTALL
diff -c top_ivtools/INSTALL:1.1 top_ivtools/INSTALL:1.2
*** top_ivtools/INSTALL:1.1 Fri Jan 9 11:42:09 2004
--- ./INSTALL Wed Feb 18 09:29:07 2004
***************
*** 1,7 ****
INSTALL for ivtools-1.1
! Instructions for building ivtools-1.1.2 from source, the short
version:
./configure
make
--- 1,7 ----
INSTALL for ivtools-1.1
! Instructions for building ivtools-1.1.3 from source, the short
version:
./configure
make
***************
*** 10,16 ****
And if that doesn't work...
! Instructions for building ivtools-1.1.2 from source, the long version:
0. Compilation Environment
--- 10,16 ----
And if that doesn't work...
! Instructions for building ivtools-1.1.3 from source, the long version:
0. Compilation Environment
Index: top_ivtools/README
diff -c top_ivtools/README:1.1 top_ivtools/README:1.2
*** top_ivtools/README:1.1 Fri Jan 9 11:42:09 2004
--- ./README Wed Feb 18 09:29:07 2004
***************
*** 2,8 ****
README for ivtools 1.1
! This directory contains a release of ivtools 1.1.2. 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.1
! This directory contains a release of ivtools 1.1.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.
Index: top_ivtools/VERSION
diff -c top_ivtools/VERSION:1.1 top_ivtools/VERSION:1.2
*** top_ivtools/VERSION:1.1 Fri Jan 9 11:42:09 2004
--- ./VERSION Wed Feb 18 09:29:07 2004
***************
*** 1 ****
! Release 1.1.2
--- 1 ----
! Release 1.1.3
*** /dev/null Wed Feb 18 09:29:39 PST 2004
--- patches/ivtools-040218-johnston-011
*************** patches/ivtools-040218-johnston-011
*** 0 ****
--- 1 ----
+ ivtools-040218-johnston-011
|
|
From: <ivt...@li...> - 2004-02-12 21:33:10
|
Patch: ivtools-040212-johnston-010
For: ivtools-1.1.2
Author: joh...@us...
Subject: add custom Editor and Unidraw class to DrawServ library.
Requires:
This is an intermediate patch to ivtools-1.1.2. 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 the DrawServ class library with its own specialized Editor
(DrawEditor) and Unidraw (DrawServ) class. Populate with an empty
drawserv func.
Index: DrawServ/Imakefile
diff -c DrawServ/Imakefile:1.1 DrawServ/Imakefile:1.2
*** DrawServ/Imakefile:1.1 Fri Jan 9 11:45:18 2004
--- src/DrawServ/Imakefile Thu Feb 12 13:27:07 2004
***************
*** 18,23 ****
--- 18,26 ----
Obj26(drawcatalog)
Obj26(drawcreator)
Obj26(drawcomps)
+ Obj26(draweditor)
+ Obj26(drawfunc)
+ Obj26(drawserv)
Obj26(drawviews)
Index: DrawServ/draweditor.c
diff -c /dev/null DrawServ/draweditor.c:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/draweditor.c Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,88 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ #include <DrawServ/drawcomps.h>
+ #include <DrawServ/draweditor.h>
+ #include <DrawServ/drawfunc.h>
+ #include <DrawServ/drawserv.h>
+
+ #include <Unidraw/catalog.h>
+
+ #include <ComTerp/comterpserv.h>
+
+
/
************************************************************************
*****/
+
+ DrawEditor::DrawEditor(OverlayComp* comp, OverlayKit* kit)
+ : FrameEditor(false, kit) {
+ Init(comp, "DrawEditor");
+ }
+
+ DrawEditor::DrawEditor(const char* file, OverlayKit* kit)
+ : FrameEditor(false, kit)
+ {
+ if (file == nil) {
+ Init();
+
+ } else {
+ Catalog* catalog = unidraw->GetCatalog();
+ OverlayComp* comp;
+
+ if (catalog->Retrieve(file, (Component*&) comp)) {
+ Init(comp);
+
+ } else {
+ Init();
+ fprintf(stderr, "drawserv: couldn't open %s\n", file);
+ }
+ }
+ }
+
+ DrawEditor::DrawEditor(boolean initflag, OverlayKit* kit)
+ : FrameEditor(initflag, kit) {
+ }
+
+ void DrawEditor::Init (OverlayComp* comp, const char* name) {
+ _curr_others = _prev_others = nil;
+ _num_curr_others = _num_prev_others = 0;
+ _texteditor = nil;
+ _autonewframe = false;
+ _autonewframe_tts = nil;
+ if (!comp) comp = new DrawIdrawComp;
+ _terp = new ComTerpServ();
+ ((OverlayUnidraw*)unidraw)->comterp(_terp);
+ AddCommands(_terp);
+ add_comterp("DrawServ", _terp);
+ _overlay_kit->Init(comp, name);
+ InitFrame();
+ }
+
+ void DrawEditor::InitCommands() {
+ FrameEditor::InitCommands();
+ }
+
+ void DrawEditor::AddCommands(ComTerp* comterp) {
+ FrameEditor::AddCommands(comterp);
+
+ comterp->add_command("drawserv", new DrawServFunc(comterp, this));
+ }
+
Index: DrawServ/draweditor.h
diff -c /dev/null DrawServ/draweditor.h:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/draweditor.h Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,50 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ #ifndef draweditor_h
+ #define draweditor_h
+
+ #include <FrameUnidraw/frameeditor.h>
+
+ //: editor for DrawServ application
+ class DrawEditor : public FrameEditor {
+ public:
+ DrawEditor(OverlayComp*, OverlayKit* = OverlayKit::Instance());
+ // constructor for using existing component.
+ DrawEditor(const char* file, OverlayKit* =
OverlayKit::Instance());
+ // constructor for building top-level component from a file.
+ DrawEditor(boolean initflag, OverlayKit* =
OverlayKit::Instance());
+ // constructor for use of derived classes.
+ void Init(OverlayComp* = nil, const char* name = "DrawEditor");
+ virtual void InitCommands();
+ // method for running Unidraw Command objects after OverlayEditor
+ // is constructed.
+ virtual void AddCommands(ComTerp*);
+ // method for adding ComFunc objects to the ComTerp associated
with
+ // this DrawEditor.
+
+ protected:
+
+ };
+
+ #endif
Index: DrawServ/drawfunc.c
diff -c /dev/null DrawServ/drawfunc.c:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/drawfunc.c Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,120 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ #ifdef HAVE_ACE
+ #include <ComTerp/comhandler.h>
+ #include <ace/SOCK_Connector.h>
+ #endif
+
+ #include <DrawServ/draweditor.h>
+ #include <DrawServ/drawfunc.h>
+
+ #define TITLE "DrawServFunc"
+
+
/
************************************************************************
*****/
+
+ DrawServFunc::DrawServFunc(ComTerp* comterp, DrawEditor* ed) :
UnidrawFunc(comterp, ed) {
+ }
+
+ void DrawServFunc::execute() {
+ #if 1
+ reset_stack();
+ printf("drawserv func is empty\n");
+ push_stack(ComValue::nullval());
+ #else
+ ComValue hostv(stack_arg(0, true));
+ ComValue portv(stack_arg(1));
+ ComValue cmdstrv(stack_arg(2));
+ static int nowait_sym = symbol_add("nowait");
+ ComValue nowaitv(stack_key(nowait_sym));
+ reset_stack();
+
+ #ifdef HAVE_ACE
+
+ #if __GNUC__==3&&__GNUC_MINOR__<1
+ fprintf(stderr, "Please upgrade to gcc-3.1 or greater\n");
+ push_stack(ComValue::nullval());
+ return;
+ #endif
+
+ if (hostv.is_string() && portv.is_known() && cmdstrv.is_string()) {
+
+ const char* hoststr = hostv.string_ptr();
+ const char* portstr = portv.is_string() ? portv.string_ptr() :
nil;
+ u_short portnum = portstr ? atoi(portstr) : portv.ushort_val();
+ ACE_INET_Addr addr (portnum, hoststr);
+ ACE_SOCK_Stream socket;
+ ACE_SOCK_Connector conn;
+ if (conn.connect (socket, addr) == -1) {
+ ACE_ERROR ((LM_ERROR, "%p\n", "open"));
+ push_stack(ComValue::nullval());
+ return;
+ }
+
+ #if __GNUC__<3
+ filebuf ofbuf;
+ ofbuf.attach(socket.get_handle());
+ #else
+ fileptr_filebuf ofbuf((int)socket.get_handle(), ios_base::out,
+ false, static_cast<size_t>(BUFSIZ));
+ #endif
+ ostream out(&ofbuf);
+ const char* cmdstr = cmdstrv.string_ptr();
+ out << cmdstr;
+ 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);
+ char* buf;
+ in.gets(&buf);
+ #else
+ char buf[BUFSIZ];
+ int i=0;
+ do {
+ read(socket.get_handle(), buf+i++, 1);
+ } while (i<BUFSIZ-1 && buf[i-1]!='\n');
+ if (buf[i]=='\n') buf[i]==0;
+ #endif
+ ComValue& retval = comterpserv()->run(buf, true);
+ push_stack(retval);
+ }
+
+ if (socket.close () == -1)
+ ACE_ERROR ((LM_ERROR, "%p\n", "close"));
+ }
+
+ return;
+
+ #else
+
+ cerr << "for the remote command to work rebuild comterp with ACE\n";
+ return;
+
+ #endif
+ #endif
+
+ }
+
Index: DrawServ/drawfunc.h
diff -c /dev/null DrawServ/drawfunc.h:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/drawfunc.h Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,41 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ #if !defined(_drawfunc_h)
+ #define _drawfunc_h
+
+ #include <DrawServ/draweditor.h>
+ #include <ComUnidraw/unifunc.h>
+
+ //: command to connect to another drawserv
+ // drawserv(hoststr :port portnum) -- connect to remote drawserv
+ class DrawServFunc : public UnidrawFunc {
+ public:
+ DrawServFunc(ComTerp*,DrawEditor*);
+ virtual void execute();
+ virtual const char* docstring() {
+ return "%s(hoststr :port portnum) -- connect to remote drawserv"; }
+ };
+
+ #endif /* !defined(_drawfunc_h) */
+
Index: DrawServ/drawserv.c
diff -c /dev/null DrawServ/drawserv.c:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/drawserv.c Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,42 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ /*
+ * Implementation of DrawServ class.
+ */
+
+ #include <DrawServ/drawserv.h>
+
/
************************************************************************
*****/
+
+ DrawServ::DrawServ (Catalog* c, int& argc, char** argv,
+ OptionDesc* od, PropertyData* pd)
+ : OverlayUnidraw(c, argc, argv, od, pd) {
+ }
+
+ DrawServ::DrawServ (Catalog* c, World* w)
+ : OverlayUnidraw(c, w) {
+ }
+
+ DrawServ::~DrawServ ()
+ {
+ }
Index: DrawServ/drawserv.h
diff -c /dev/null DrawServ/drawserv.h:1.1
*** /dev/null Thu Feb 12 13:27:08 2004
--- src/DrawServ/drawserv.h Thu Feb 12 13:27:07 2004
***************
*** 0 ****
--- 1,47 ----
+ /*
+ * Copyright (c) 2004 Scott E. Johnston
+ *
+ * Permission to use, copy, modify, distribute, and sell this
software and
+ * its documentation for any purpose is hereby granted without fee,
provided
+ * that the above copyright notice appear in all copies and that both
that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the copyright holders not be
used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. The copyright holders
make
+ * no representations about the suitability of this software for any
purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+ /*
+ * DrawServ - Unidraw derived from OverlayUnidraw for DrawServ library
+ */
+ #ifndef drawserv_h
+ #define drawserv_h
+
+ #include <OverlayUnidraw/ovunidraw.h>
+
+ //: Unidraw specialized for DrawServ
+ // Unidraw (OverlayUnidraw) specialized for DrawServ application.
+ // Networked application of the Unidraw framework.
+ class DrawServ : public OverlayUnidraw {
+ public:
+ DrawServ(
+ Catalog*, int& argc, char** argv,
+ OptionDesc* = nil, PropertyData* = nil
+ );
+ DrawServ(Catalog*, World*);
+ virtual ~DrawServ();
+
+ protected:
+ };
+
+ #endif
Index: drawserv_/main.c
diff -c drawserv_/main.c:1.2 drawserv_/main.c:1.3
*** drawserv_/main.c:1.2 Fri Jan 30 11:12:57 2004
--- src/drawserv_/main.c Thu Feb 12 13:27:09 2004
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2004 Scott E. Johnston
* Copyright (c) 1994-1999 Vectaport, Inc.
* Copyright (c) 1990, 1991 Stanford University
*
***************
*** 36,44 ****
#include <DrawServ/drawcatalog.h>
#include <DrawServ/drawcreator.h>
#include <DrawServ/drawcomps.h>
#include <DrawServ/drawkit.h>
- #include <FrameUnidraw/frameeditor.h>
#include <GraphUnidraw/grapheditor.h>
#include <OverlayUnidraw/ovellipse.h>
--- 37,46 ----
#include <DrawServ/drawcatalog.h>
#include <DrawServ/drawcreator.h>
#include <DrawServ/drawcomps.h>
+ #include <DrawServ/draweditor.h>
#include <DrawServ/drawkit.h>
+ #include <DrawServ/drawserv.h>
#include <GraphUnidraw/grapheditor.h>
#include <OverlayUnidraw/ovellipse.h>
***************
*** 213,219 ****
#endif
DrawCreator creator;
DrawCatalog* catalog = new DrawCatalog("ivtools drawserv",
&creator);
! OverlayUnidraw* unidraw = new OverlayUnidraw(
catalog, argc, argv, options, properties
);
--- 215,221 ----
#endif
DrawCreator creator;
DrawCatalog* catalog = new DrawCatalog("ivtools drawserv",
&creator);
! DrawServ* unidraw = new DrawServ(
catalog, argc, argv, options, properties
);
***************
*** 272,282 ****
} else {
const char* initial_file = (argc == 2) ? argv[1] : nil;
! FrameEditor* ed = nil;
if (initial_file)
! ed = new FrameEditor(initial_file, DrawKit::Instance());
else
! ed = new FrameEditor(new DrawIdrawComp, DrawKit::Instance());
unidraw->Open(ed);
--- 274,284 ----
} else {
const char* initial_file = (argc == 2) ? argv[1] : nil;
! DrawEditor* ed = nil;
if (initial_file)
! ed = new DrawEditor(initial_file, DrawKit::Instance());
else
! ed = new DrawEditor(new DrawIdrawComp, DrawKit::Instance());
unidraw->Open(ed);
Index: top_ivtools/MANIFEST
diff -c top_ivtools/MANIFEST:1.2 top_ivtools/MANIFEST:1.3
*** top_ivtools/MANIFEST:1.2 Tue Feb 10 11:40:58 2004
--- ./MANIFEST Thu Feb 12 13:26:51 2004
***************
*** 281,288 ****
--- 281,294 ----
ivtools-1.1/src/DrawServ/drawcomps.h
ivtools-1.1/src/DrawServ/drawcreator.c
ivtools-1.1/src/DrawServ/drawcreator.h
+ ivtools-1.1/src/DrawServ/draweditor.c
+ ivtools-1.1/src/DrawServ/draweditor.h
+ ivtools-1.1/src/DrawServ/drawfunc.c
+ ivtools-1.1/src/DrawServ/drawfunc.h
ivtools-1.1/src/DrawServ/drawkit.c
ivtools-1.1/src/DrawServ/drawkit.h
+ ivtools-1.1/src/DrawServ/drawserv.c
+ ivtools-1.1/src/DrawServ/drawserv.h
ivtools-1.1/src/DrawServ/drawviews.c
ivtools-1.1/src/DrawServ/drawviews.h
ivtools-1.1/src/FrameUnidraw/Imakefile
Index: top_ivtools/MANIFEST.perceps
diff -c top_ivtools/MANIFEST.perceps:1.1
top_ivtools/MANIFEST.perceps:1.2
*** top_ivtools/MANIFEST.perceps:1.1 Fri Jan 9 11:42:09 2004
--- ./MANIFEST.perceps Thu Feb 12 13:26:52 2004
***************
*** 69,75 ****
--- 69,78 ----
DrawServ/drawclasses.h
DrawServ/drawcomps.h
DrawServ/drawcreator.h
+ DrawServ/draweditor.h
+ DrawServ/drawfunc.h
DrawServ/drawkit.h
+ DrawServ/drawserv.h
DrawServ/drawviews.h
FrameUnidraw/framecatalog.h
FrameUnidraw/frameclasses.h
*** /dev/null Thu Feb 12 13:27:16 PST 2004
--- patches/ivtools-040212-johnston-010
*************** patches/ivtools-040212-johnston-010
*** 0 ****
--- 1 ----
+ ivtools-040212-johnston-010
|
|
From: <ivt...@li...> - 2004-02-12 20:50:29
|
Patch: ivtools-040212-johnston-009
For: ivtools-1.1.2
Author: joh...@us...
Subject: new virtual Unidraw method, ExecuteCmd
Requires:
This is an intermediate patch to ivtools-1.1.2. 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:
- localize all Unidraw Command execution into a virtual Unidraw
method, ::ExecuteCmd. Affects Command's executed by CommandDoer and
CommandPusher as well as other places. Expects a copy of the original
Command object, so it can decide whether or not to delete it or log it
to the history.
Index: Attribute/lexscan.c
diff -c Attribute/lexscan.c:1.2 Attribute/lexscan.c:1.3
*** Attribute/lexscan.c:1.2 Wed Feb 11 12:03:28 2004
--- src/Attribute/lexscan.c Thu Feb 12 12:43:12 2004
***************
*** 87,93 ****
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, '#", _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
unsigned tok_buflen = _bufptr-tokstart;
strncpy(_tokbuf, _buffer+tokstart, tok_buflen);
--- 87,93 ----
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, '#', _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
unsigned tok_buflen = _bufptr-tokstart;
strncpy(_tokbuf, _buffer+tokstart, tok_buflen);
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.3 ComTerp/ctrlfunc.c:1.4
*** ComTerp/ctrlfunc.c:1.3 Tue Feb 10 11:41:03 2004
--- src/ComTerp/ctrlfunc.c Thu Feb 12 12:43:15 2004
***************
*** 108,113 ****
--- 108,115 ----
return;
}
+
/
************************************************************************
*****/
+
RemoteFunc::RemoteFunc(ComTerp* comterp) : ComFunc(comterp) {
}
***************
*** 123,128 ****
--- 125,131 ----
#if __GNUC__==3&&__GNUC_MINOR__<1
fprintf(stderr, "Please upgrade to gcc-3.1 or greater\n");
+ push_stack(ComValue::nullval());
return;
#endif
***************
*** 179,185 ****
#else
- reset_stack();
cerr << "for the remote command to work rebuild comterp with ACE\n";
return;
--- 182,187 ----
Index: ComUnidraw/comeditor.c
diff -c ComUnidraw/comeditor.c:1.1 ComUnidraw/comeditor.c:1.2
*** ComUnidraw/comeditor.c:1.1 Fri Jan 9 11:45:00 2004
--- src/ComUnidraw/comeditor.c Thu Feb 12 12:43:37 2004
***************
*** 229,236 ****
--- 229,241 ----
/* virtual */ void ComEditor::ExecuteCmd(Command* cmd) {
if(!whiteboard())
+
+ /* normal Unidraw command execution */
OverlayEditor::ExecuteCmd(cmd);
+
else {
+
+ /* indirect command execution, all by script */
std::ostrstream sbuf;
boolean oldflag = OverlayScript::ptlist_parens();
OverlayScript::ptlist_parens(false);
***************
*** 262,268 ****
if (!scripted)
sbuf << "print(\"Failed attempt to generate script for a
PASTE_CMD\\n\" :err)";
sbuf.put('\0');
! cerr << sbuf.str() << "\n";
GetComTerp()->run(sbuf.str());
delete cmd;
}
--- 267,274 ----
if (!scripted)
sbuf << "print(\"Failed attempt to generate script for a
PASTE_CMD\\n\" :err)";
sbuf.put('\0');
! cout << sbuf.str() << "\n";
! cout.flush();
GetComTerp()->run(sbuf.str());
delete cmd;
}
Index: include_unidraw/unidraw.h
diff -c include_unidraw/unidraw.h:1.1 include_unidraw/unidraw.h:1.2
*** include_unidraw/unidraw.h:1.1 Fri Jan 9 11:45:57 2004
--- src/include/Unidraw/unidraw.h Thu Feb 12 12:43:44 2004
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2004 Scott E. Johnston
* Copyright (c) 1990, 1991 Stanford University
*
* Permission to use, copy, modify, distribute, and sell this
software and its
***************
*** 82,87 ****
--- 83,92 ----
void Redo(Component*, int = 1);
void ClearHistory(Component* = nil);
void ClearHistory(Editor*);
+
+ virtual void ExecuteCmd(Command*);
+ // indirection for command execution, will delete object
+
protected:
virtual void Process();
Index: OverlayUnidraw/ovdoer.c
diff -c OverlayUnidraw/ovdoer.c:1.1 OverlayUnidraw/ovdoer.c:1.2
*** OverlayUnidraw/ovdoer.c:1.1 Fri Jan 9 11:44:53 2004
--- src/OverlayUnidraw/ovdoer.c Thu Feb 12 12:43:34 2004
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2004 Scott E. Johnston
* Copyright (c) 1994 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this
software and
***************
*** 33,38 ****
--- 34,40 ----
}
void CommandDoer::Do() {
+ #if 0
Command* command = cmd;
if (command) {
if (command->Reversible()) {
***************
*** 52,57 ****
--- 54,62 ----
}
}
}
+ #else
+ unidraw->ExecuteCmd(cmd);
+ #endif
}
CommandPusher::CommandPusher(Command* c) {
Index: OverlayUnidraw/oved.c
diff -c OverlayUnidraw/oved.c:1.1 OverlayUnidraw/oved.c:1.2
*** OverlayUnidraw/oved.c:1.1 Fri Jan 9 11:44:53 2004
--- src/OverlayUnidraw/oved.c Thu Feb 12 12:43:34 2004
***************
*** 389,400 ****
}
/* virtual */ void OverlayEditor::ExecuteCmd(Command* cmd) {
! cmd->Execute();
! if (cmd->Reversible()) {
! cmd->Log();
! } else {
! delete cmd;
! }
}
void OverlayEditor::SetText() {
--- 389,395 ----
}
/* virtual */ void OverlayEditor::ExecuteCmd(Command* cmd) {
! unidraw->ExecuteCmd(cmd);
}
void OverlayEditor::SetText() {
Index: OverlayUnidraw/ovunidraw.c
diff -c OverlayUnidraw/ovunidraw.c:1.1 OverlayUnidraw/ovunidraw.c:1.2
*** OverlayUnidraw/ovunidraw.c:1.1 Fri Jan 9 11:44:54 2004
--- src/OverlayUnidraw/ovunidraw.c Thu Feb 12 12:43:34 2004
***************
*** 134,141 ****
}
for (_cmdq->First(it); !_cmdq->Done(it); _cmdq->First(it)) {
! CommandDoer doer(_cmdq->GetCommand(it));
! doer.Do();
_cmdq->Remove(_cmdq->GetCommand(it));
}
--- 134,140 ----
}
for (_cmdq->First(it); !_cmdq->Done(it); _cmdq->First(it)) {
! unidraw->ExecuteCmd(_cmdq->GetCommand(it)->Copy());
_cmdq->Remove(_cmdq->GetCommand(it));
}
Index: Unidraw/uctrls.c
diff -c Unidraw/uctrls.c:1.1 Unidraw/uctrls.c:1.2
*** Unidraw/uctrls.c:1.1 Fri Jan 9 11:44:39 2004
--- src/Unidraw/uctrls.c Thu Feb 12 12:43:31 2004
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2004 Scott E. Johnston
* Copyright (c) 1990, 1991 Stanford University
*
* Permission to use, copy, modify, distribute, and sell this
software and its
***************
*** 29,34 ****
--- 30,36 ----
#include <Unidraw/globals.h>
#include <Unidraw/iterator.h>
#include <Unidraw/uctrls.h>
+ #include <Unidraw/unidraw.h>
#include <Unidraw/Commands/command.h>
#include <Unidraw/Graphic/ulabel.h>
#include <Unidraw/Graphic/picture.h>
***************
*** 71,76 ****
--- 73,81 ----
if (cmd != nil) {
Busy();
+ #if 1
+ unidraw->ExecuteCmd(cmd->Copy());
+ #else
if (cmd->Reversible()) {
cmd = cmd->Copy();
cmd->Execute();
***************
*** 89,94 ****
--- 94,100 ----
cmd->Log();
}
}
+ #endif
Done();
}
Index: Unidraw/unidraw.c
diff -c Unidraw/unidraw.c:1.1 Unidraw/unidraw.c:1.2
*** Unidraw/unidraw.c:1.1 Fri Jan 9 11:44:39 2004
--- src/Unidraw/unidraw.c Thu Feb 12 12:43:31 2004
***************
*** 504,506 ****
--- 504,525 ----
past = history->_past;
future = history->_future;
}
+
+ void Unidraw::ExecuteCmd(Command *command) {
+ if (command) {
+ if (command->Reversible()) {
+ command->Execute();
+ if (command->Reversible()) {
+ command->Log();
+ } else {
+ delete command;
+ }
+ }
+ else {
+ command->Execute();
+ if (command->Reversible()) {
+ command->Log();
+ }
+ }
+ }
+ }
*** /dev/null Thu Feb 12 12:43:50 PST 2004
--- patches/ivtools-040212-johnston-009
*************** patches/ivtools-040212-johnston-009
*** 0 ****
--- 1 ----
+ ivtools-040212-johnston-009
|
|
From: <ivt...@li...> - 2004-02-11 20:10:18
|
Patch: ivtools-040211-johnston-008
For: ivtools-1.1.2
Author: joh...@us...
Subject: fix more lexical scanning and interpreter problems
Requires:
This is an intermediate patch to ivtools-1.1.2. 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:
- reinstate the skipping of "#" comments in shell scripts parsed by
the lexical scanner. This can be avoided by passing a null byte to
lexscan(), or can be customized by passing a different character (the
new argument is called linecmt).
- fix various ComTerpServ functionality, smoothing the use of the new
fd filebuf constructor.
Index: Attribute/commodule.c
diff -c Attribute/commodule.c:1.1 Attribute/commodule.c:1.2
*** Attribute/commodule.c:1.1 Fri Jan 9 11:42:18 2004
--- src/Attribute/commodule.c Wed Feb 11 12:03:28 2004
***************
*** 95,97 ****
--- 95,98 ----
_token[0] = '\0';
_linenum = 0;
}
+
Index: Attribute/lexscan.c
diff -c Attribute/lexscan.c:1.1 Attribute/lexscan.c:1.2
*** Attribute/lexscan.c:1.1 Fri Jan 9 11:42:18 2004
--- src/Attribute/lexscan.c Wed Feb 11 12:03:28 2004
***************
*** 63,69 ****
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
attr_value retval;
switch (toktype) {
--- 63,69 ----
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, '#', _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
attr_value retval;
switch (toktype) {
***************
*** 87,93 ****
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
unsigned tok_buflen = _bufptr-tokstart;
strncpy(_tokbuf, _buffer+tokstart, tok_buflen);
--- 87,93 ----
{
unsigned int toklen, tokstart;
int status = lexscan (_inptr, _infunc, _eoffunc, _errfunc, NULL,
NULL,
! _begcmt, _endcmt, '#", _buffer, _bufsiz, &_bufptr,
_token, _toksiz, &toklen, &toktype, &tokstart, &_linenum);
unsigned tok_buflen = _bufptr-tokstart;
strncpy(_tokbuf, _buffer+tokstart, tok_buflen);
***************
*** 119,121 ****
--- 119,122 ----
return new AttributeValue(valtype, tokval);
}
+
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.2 ComTerp/comterp.c:1.3
*** ComTerp/comterp.c:1.2 Tue Feb 10 11:41:03 2004
--- src/ComTerp/comterp.c Wed Feb 11 12:03:30 2004
***************
*** 139,144 ****
--- 139,145 ----
_trace_mode = 0;
_npause = 0;
_stepflag = 0;
+
}
***************
*** 884,890 ****
fbuf.attach(fd);
} else
fbuf.attach(fileno(stdout));
! #elif __GNUC__==3 && __GNUC_MINOR__<1 || 1
fileptr_filebuf fbuf(handler() && handler()->wrfptr()
? handler()->wrfptr() : stdout,
ios_base::out);
--- 885,891 ----
fbuf.attach(fd);
} else
fbuf.attach(fileno(stdout));
! #elif __GNUC__==3 && __GNUC_MINOR__<1
fileptr_filebuf fbuf(handler() && handler()->wrfptr()
? handler()->wrfptr() : stdout,
ios_base::out);
Index: ComTerp/comterpserv.c
diff -c ComTerp/comterpserv.c:1.1 ComTerp/comterpserv.c:1.2
*** ComTerp/comterpserv.c:1.1 Fri Jan 9 11:42:26 2004
--- src/ComTerp/comterpserv.c Wed Feb 11 12:03:30 2004
***************
*** 152,163 ****
fbuf.attach(fd);
istream in (&fbuf);
in.gets(&instr);
! #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
server->_instat = in.good();
--- 152,168 ----
fbuf.attach(fd);
istream in (&fbuf);
in.gets(&instr);
! #elif __GNUC__==3 && __GNUC_MINOR__<1
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>
+ #else
+ char instr[BUFSIZ];
+ fileptr_filebuf fbuf(fd, ios_base::in, false,
static_cast<size_t>(BUFSIZ));
+ istream in (&fbuf);
+ in.get(instr, BUFSIZ, '\n'); // needs to be generalized with
<vector.h>
#endif
server->_instat = in.good();
***************
*** 180,186 ****
/* append a null byte */
outstr[outpos] = '\0';
! #if __GNUC__>=3
if (ifptr) fclose(ifptr);
#endif
--- 185,191 ----
/* append a null byte */
outstr[outpos] = '\0';
! #if __GNUC__==3 && __GNUC_MINOR__<1
if (ifptr) fclose(ifptr);
#endif
***************
*** 197,212 ****
#if __GNUC__<3
filebuf fbuf;
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++)
out.put(s[outpos]);
out.flush();
outpos = 0;
! #if __GNUC__>=3
if (ofptr) fclose(ofptr);
#endif
return 1;
--- 202,219 ----
#if __GNUC__<3
filebuf fbuf;
fbuf.attach(fd);
! #elif __GNUC__==3 && __GNUC_MINOR__<1
FILE* ofptr = fdopen(fd, "w");
fileptr_filebuf fbuf(ofptr, ios_base::out);
+ #else
+ fileptr_filebuf fbuf(fd, ios_base::out, false,
static_cast<size_t>(BUFSIZ));
#endif
ostream out(&fbuf);
for (; outpos < bufsize-1 && s[outpos]; outpos++)
out.put(s[outpos]);
out.flush();
outpos = 0;
! #if __GNUC__==3 && __GNUC_MINOR__<1
if (ofptr) fclose(ofptr);
#endif
return 1;
***************
*** 313,325 ****
err_print( stderr, "comterp" );
#if __GNUC__<3
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();
! #if __GNUC__>=3
if (ofptr) fclose(ofptr);
#endif
status = -1;
--- 320,335 ----
err_print( stderr, "comterp" );
#if __GNUC__<3
filebuf obuf(handler() ? handler()->get_handle() : 1);
! #elif __GNUC__==3 && __GNUC_MINOR__<1
FILE* ofptr = fdopen(handler() ?
handler()->get_handle() : 1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
+ #else
+ fileptr_filebuf obuf(handler() ? (int)handler()->get_handle() : 1,
+ ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream ostr(&obuf);
ostr.flush();
! #if __GNUC__==3 && __GNUC_MINOR__<1
if (ofptr) fclose(ofptr);
#endif
status = -1;
***************
*** 334,346 ****
err_print( stderr, "comterp" );
#if __GNUC__<3
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();
! #if __GNUC__>=3
if (ofptr) fclose(ofptr);
#endif
status = -1;
--- 344,360 ----
err_print( stderr, "comterp" );
#if __GNUC__<3
filebuf obuf(handler() ? handler()->get_handle() : 1);
! #elif __GNUC__==3 && __GNUC_MINOR__<1
FILE* ofptr = fdopen(handler() ? handler()->get_handle() :
1, "w");
fileptr_filebuf obuf(ofptr, ios_base::out);
+ #else
+ fileptr_filebuf obuf(handler() ? (int)handler()->get_handle() : 1,
+ ios_base::out, false, static_cast<size_t>(BUFSIZ));
+
#endif
ostream ostr(&obuf);
ostr.flush();
! #if __GNUC__==3 && __GNUC_MINOR__<1
if (ofptr) fclose(ofptr);
#endif
status = -1;
Index: ComUtil/_lexscan.c
diff -c ComUtil/_lexscan.c:1.2 ComUtil/_lexscan.c:1.3
*** ComUtil/_lexscan.c:1.2 Tue Feb 10 11:41:01 2004
--- src/ComUtil/_lexscan.c Wed Feb 11 12:03:25 2004
***************
*** 75,81 ****
*/
int lexscan(void * infile,char * (*infunc)(),int (*eoffunc)(), int
(*errfunc)(),
! void * outfile,int (*outfunc)(),char * begcmt,char * endcmt,
char * buffer,unsigned bufsiz,unsigned * bufptr,char *
token,
unsigned toksiz, unsigned * toklen,unsigned * toktype,
unsigned * tokstart,unsigned * linenum )
--- 75,82 ----
*/
int lexscan(void * infile,char * (*infunc)(),int (*eoffunc)(), int
(*errfunc)(),
! void * outfile,int (*outfunc)(),
! char * begcmt,char * endcmt, char linecmt,
char * buffer,unsigned bufsiz,unsigned * bufptr,char *
token,
unsigned toksiz, unsigned * toklen,unsigned * toktype,
unsigned * tokstart,unsigned * linenum )
***************
*** 104,109 ****
--- 105,111 ----
(typically `fputs`). */
char * begcmt ;/* I String that begins comment. */
char * endcmt ;/* I String that ends comment. */
+ char linecmt ;/* I Character to start comment line. */
char * buffer ;/* I Buffer or file I/O. */
unsigned bufsiz ;/* I Size of `buffer` in bytes. */
unsigned * bufptr ;/* O Current location in `buffer`.*/
***************
*** 242,253 ****
(*outfunc) ( "> ", outfile);
_continuation_prompt = 0;
}
! #if 0
! while( (infunc_retval = (*infunc)( buffer, bufsiz, infile )) !=
NULL &&
! buffer[0] == '#') {} /* skip all script comments */
! #else
! infunc_retval = (*infunc)( buffer, bufsiz, infile );
! #endif
if( infunc_retval == NULL ) {
if( *toklen > 0 )
goto token_return;
--- 244,254 ----
(*outfunc) ( "> ", outfile);
_continuation_prompt = 0;
}
! if (linecmt)
! while( (infunc_retval = (*infunc)( buffer, bufsiz, infile )) !=
NULL &&
! buffer[0] == linecmt) {} /* skip all script comments */
! else
! infunc_retval = (*infunc)( buffer, bufsiz, infile );
if( infunc_retval == NULL ) {
if( *toklen > 0 )
goto token_return;
Index: ComUtil/_parser.c
diff -c ComUtil/_parser.c:1.1 ComUtil/_parser.c:1.2
*** ComUtil/_parser.c:1.1 Fri Jan 9 11:42:14 2004
--- src/ComUtil/_parser.c Wed Feb 11 12:03:26 2004
***************
*** 40,45 ****
--- 40,46 ----
int _continuation_prompt;
int _continuation_prompt_disabled = 0;
+ int _skip_shell_comments = 0;
infuncptr _oneshot_infunc;
static int get_next_token(void *infile, char *(*infunc)(), int
(*eoffunc)(),
Index: ComUtil/_scanner.c
diff -c ComUtil/_scanner.c:1.1 ComUtil/_scanner.c:1.2
*** ComUtil/_scanner.c:1.1 Fri Jan 9 11:42:14 2004
--- src/ComUtil/_scanner.c Wed Feb 11 12:03:26 2004
***************
*** 148,154 ****
/* Don't worry about status return, because token_type */
/* will be set to TOK_NONE */
status = lexscan( infile, infunc, eoffunc, errfunc, outfile,
outfunc,
! "/*", "*/", buffer, bufsiz, bufptr,
token, toksiz, toklen, toktype,
tokstart, linenum );
if( status != 0 )
--- 148,154 ----
/* Don't worry about status return, because token_type */
/* will be set to TOK_NONE */
status = lexscan( infile, infunc, eoffunc, errfunc, outfile,
outfunc,
! "/*", "*/", '#', buffer, bufsiz, bufptr,
token, toksiz, toklen, toktype,
tokstart, linenum );
if( status != 0 )
Index: ComUtil/comutil.arg
diff -c ComUtil/comutil.arg:1.1 ComUtil/comutil.arg:1.2
*** ComUtil/comutil.arg:1.1 Fri Jan 9 11:42:15 2004
--- src/ComUtil/comutil.arg Wed Feb 11 12:03:26 2004
***************
*** 56,69 ****
int lexscan(void *infile,char *(*infunc)(char*,int,void*),
int (*eoffunc)(void*),int (*errfunc)(void*),
void *outfile,int (*outfunc)(const char*,void*),
! char *begcmt,char *endcmt,
char *buffer,unsigned bufsiz,unsigned *bufptr,char *token,
unsigned toksiz,unsigned *toklen,unsigned *toktype,
unsigned *tokstart,unsigned *linenum );
#else
int lexscan(void *infile,char *(*infunc)(),
int (*eoffunc)(),int (*errfunc)(),
! void *outfile,int (*outfunc)(),char *begcmt,char *endcmt,
char *buffer,unsigned bufsiz,unsigned *bufptr,char *token,
unsigned toksiz,unsigned *toklen,unsigned *toktype,
unsigned *tokstart,unsigned *linenum );
--- 56,70 ----
int lexscan(void *infile,char *(*infunc)(char*,int,void*),
int (*eoffunc)(void*),int (*errfunc)(void*),
void *outfile,int (*outfunc)(const char*,void*),
! char *begcmt,char *endcmt,char linecmt,
char *buffer,unsigned bufsiz,unsigned *bufptr,char *token,
unsigned toksiz,unsigned *toklen,unsigned *toktype,
unsigned *tokstart,unsigned *linenum );
#else
int lexscan(void *infile,char *(*infunc)(),
int (*eoffunc)(),int (*errfunc)(),
! void *outfile,int (*outfunc)(),
! char *begcmt,char *endcmt,char linecmt,
char *buffer,unsigned bufsiz,unsigned *bufptr,char *token,
unsigned toksiz,unsigned *toklen,unsigned *toktype,
unsigned *tokstart,unsigned *linenum );
Index: ComUtil/errfile.c
diff -c ComUtil/errfile.c:1.1 ComUtil/errfile.c:1.2
*** ComUtil/errfile.c:1.1 Fri Jan 9 11:42:15 2004
--- src/ComUtil/errfile.c Wed Feb 11 12:03:26 2004
***************
*** 132,138 ****
/* Don't worry about status return, because token_type */
/* will be set to TOK_NONE */
status = lexscan( errstream, fgets, ffeof, fferror,
! NULL, NULL, NULL, NULL,
InputBuffer, MAX_INPUT_LENGTH+2, &colnum,
FormatBuffer, MAX_FORMAT_LENGTH+1, &token_length,
&token_type, &token_start, &linenum );
--- 132,138 ----
/* Don't worry about status return, because token_type */
/* will be set to TOK_NONE */
status = lexscan( errstream, fgets, ffeof, fferror,
! NULL, NULL, NULL, NULL, 0,
InputBuffer, MAX_INPUT_LENGTH+2, &colnum,
FormatBuffer, MAX_FORMAT_LENGTH+1, &token_length,
&token_type, &token_start, &linenum );
*** /dev/null Wed Feb 11 12:03:57 PST 2004
--- patches/ivtools-040211-johnston-008
*************** patches/ivtools-040211-johnston-008
*** 0 ****
--- 1 ----
+ ivtools-040211-johnston-008
|
|
From: <ivt...@li...> - 2004-02-11 00:02:35
|
Patch: ivtools-040210-johnston-007
For: ivtools-1.1.2
Author: joh...@us...
Subject: more gcc-3.3/ACE/comterp/configure/Darwin cleanup
Requires:
This is an intermediate patch to ivtools-1.1.2. 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 cleanup of problems introduced by evolution of gcc and
migration to Darwin. Finally they re-instated an iostreams filebuf
constructor that accepts a file handle (with gcc-3.1)! So for the
first time ever everything seems relatively happy on MacOS X and for
the first time in a couple years things are back up to par with
gcc-3.*/libstdc++-v3.
- fixed comterp error messages. I inadvertently disabled these a
while back when I hacked in a way of skipping shell script "#"
comments into the lexical scanner. You see, the error messages were
kept as a list of #define's in C source code...
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2
*** ComTerp/comterp.c:1.1 Fri Jan 9 11:42:25 2004
--- src/ComTerp/comterp.c Tue Feb 10 11:41:03 2004
***************
*** 884,893 ****
fbuf.attach(fd);
} else
fbuf.attach(fileno(stdout));
! #else
fileptr_filebuf fbuf(handler() && handler()->wrfptr()
? handler()->wrfptr() : stdout,
ios_base::out);
#endif
ostream out(&fbuf);
boolean eolflag = false;
--- 884,896 ----
fbuf.attach(fd);
} else
fbuf.attach(fileno(stdout));
! #elif __GNUC__==3 && __GNUC_MINOR__<1 || 1
fileptr_filebuf fbuf(handler() && handler()->wrfptr()
? handler()->wrfptr() : stdout,
ios_base::out);
+ #else
+ fileptr_filebuf fbuf(handler() ? handler()->get_handle() : 1,
+ ios_base::out, false, static_cast<size_t>(BUFSIZ));
#endif
ostream out(&fbuf);
boolean eolflag = false;
***************
*** 907,913 ****
break;
} else if (!func_for_next_expr() && val_for_next_func().is_null()) {
print_stack_top(out);
! out << "\n"; out.flush();
}
} else {
out << _errbuf << "\n"; out.flush();
--- 910,916 ----
break;
} else if (!func_for_next_expr() && val_for_next_func().is_null()) {
print_stack_top(out);
! out << "\n"; out.flush();
}
} else {
out << _errbuf << "\n"; out.flush();
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.2 ComTerp/ctrlfunc.c:1.3
*** ComTerp/ctrlfunc.c:1.2 Fri Jan 30 11:12:29 2004
--- src/ComTerp/ctrlfunc.c Tue Feb 10 11:41:03 2004
***************
*** 37,43 ****
--- 37,47 ----
#if __GNUC__>=3
static char newline;
+ #if __GNUC__>3||__GNUC_MINOR_>1
+ #include <ext/stdio_filebuf.h>
#endif
+ #endif
+
/
************************************************************************
*****/
***************
*** 116,121 ****
--- 120,131 ----
reset_stack();
#ifdef HAVE_ACE
+
+ #if __GNUC__==3&&__GNUC_MINOR__<1
+ fprintf(stderr, "Please upgrade to gcc-3.1 or greater\n");
+ return;
+ #endif
+
if (hostv.is_string() && portv.is_known() && cmdstrv.is_string()) {
const char* hoststr = hostv.string_ptr();
***************
*** 134,150 ****
filebuf ofbuf;
ofbuf.attach(socket.get_handle());
#else
! FILE* ofptr = fdopen(socket.get_handle(), "r");
! fileptr_filebuf ofbuf(ofptr, ios_base::out);
#endif
ostream out(&ofbuf);
const char* cmdstr = cmdstrv.string_ptr();
out << cmdstr;
if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
out.flush();
- #if __GNUC__>=3
- fclose(ofptr);
- #endif
if (nowaitv.is_false()) {
#if __GNUC__<3
filebuf ifbuf;
--- 144,157 ----
filebuf ofbuf;
ofbuf.attach(socket.get_handle());
#else
! fileptr_filebuf ofbuf((int)socket.get_handle(), ios_base::out,
! false, static_cast<size_t>(BUFSIZ));
#endif
ostream out(&ofbuf);
const char* cmdstr = cmdstrv.string_ptr();
out << cmdstr;
if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
out.flush();
if (nowaitv.is_false()) {
#if __GNUC__<3
filebuf ifbuf;
***************
*** 153,170 ****
char* buf;
in.gets(&buf);
#else
- FILE* fptr = fdopen(socket.get_handle(), "r");
- fileptr_filebuf ifbuf(fptr, ios_base::in);
- istream in(&ifbuf);
char buf[BUFSIZ];
! in.get(buf, BUFSIZ);
! in.get(newline);
#endif
ComValue& retval = comterpserv()->run(buf, true);
push_stack(retval);
- #if __GNUC__>=3
- fclose(fptr);
- #endif
}
if (socket.close () == -1)
--- 160,174 ----
char* buf;
in.gets(&buf);
#else
char buf[BUFSIZ];
! int i=0;
! do {
! read(socket.get_handle(), buf+i++, 1);
! } while (i<BUFSIZ-1 && buf[i-1]!='\n');
! if (buf[i]=='\n') buf[i]==0;
#endif
ComValue& retval = comterpserv()->run(buf, true);
push_stack(retval);
}
if (socket.close () == -1)
Index: ComUtil/_lexscan.c
diff -c ComUtil/_lexscan.c:1.1 ComUtil/_lexscan.c:1.2
*** ComUtil/_lexscan.c:1.1 Fri Jan 9 11:42:14 2004
--- src/ComUtil/_lexscan.c Tue Feb 10 11:41:01 2004
***************
*** 242,249 ****
--- 242,253 ----
(*outfunc) ( "> ", outfile);
_continuation_prompt = 0;
}
+ #if 0
while( (infunc_retval = (*infunc)( buffer, bufsiz, infile )) !=
NULL &&
buffer[0] == '#') {} /* skip all script comments */
+ #else
+ infunc_retval = (*infunc)( buffer, bufsiz, infile );
+ #endif
if( infunc_retval == NULL ) {
if( *toklen > 0 )
goto token_return;
Index: ComUtil/errsys.c
diff -c ComUtil/errsys.c:1.1 ComUtil/errsys.c:1.2
*** ComUtil/errsys.c:1.1 Fri Jan 9 11:42:15 2004
--- src/ComUtil/errsys.c Tue Feb 10 11:41:01 2004
***************
*** 137,157 ****
errpath = (char*)getenv( "COMTERP_PATH" );
if (errpath) {
strcpy( fullpath, errpath );
! strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
if (!fptr) {
strcpy( fullpath, RELLIBALLDIR );
! strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
if (!fptr) {
strcpy( fullpath, ABSLIBALLDIR );
! strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
--- 137,157 ----
errpath = (char*)getenv( "COMTERP_PATH" );
if (errpath) {
strcpy( fullpath, errpath );
! if (fullpath[strlen(fullpath)-1] != '/') strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
if (!fptr) {
strcpy( fullpath, RELLIBALLDIR );
! if (fullpath[strlen(fullpath)-1] != '/') strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
if (!fptr) {
strcpy( fullpath, ABSLIBALLDIR );
! if (fullpath[strlen(fullpath)-1] != '/') strcat( fullpath, "/" );
strcat( fullpath, errfile );
fptr = fopen(fullpath, "r");
}
Index: top_ivtools/MANIFEST
diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2
*** top_ivtools/MANIFEST:1.1 Fri Jan 9 11:42:09 2004
--- ./MANIFEST Tue Feb 10 11:40:58 2004
***************
*** 1553,1559 ****
ivtools-1.1/src/include/ivstd/stdlib.h
ivtools-1.1/src/include/ivstd/stream.h
ivtools-1.1/src/include/ivstd/string.h
- ivtools-1.1/src/include/ivstd/strstream.h
ivtools-1.1/src/include/ivstd/version.h
ivtools-1.1/src/iueserv_/Imakefile
ivtools-1.1/src/iueserv_/Makefile
--- 1553,1558 ----
Index: top_ivtools/aclocal.m4
diff -c top_ivtools/aclocal.m4:1.1 top_ivtools/aclocal.m4:1.2
*** top_ivtools/aclocal.m4:1.1 Fri Jan 9 11:42:09 2004
--- ./aclocal.m4 Tue Feb 10 11:40:58 2004
***************
*** 1,46 ****
- dnl ICE_CXX_INCLUDE_DIR
- dnl -------------------
- dnl
- dnl Set output variable CXX_INCLUDE_DIR to the name of a directory
- dnl where the C++ compiler looks for C++ include files.
- dnl
- AC_DEFUN(ICE_CXX_INCLUDE_DIR,
- [
- AC_MSG_CHECKING(for directory to install c++ include files)
- AC_CACHE_VAL(ice_cv_cxx_include_dir,
- [
- cat > conftest.cc << EOF
- #include <iostream.h>
- EOF
- changequote(,)dnl
- $CXXCPP $DEFS conftest.cc > conftest.ii 2>&5
- if test $? != 0; then
- AC_MSG_ERROR(${CXXCPP} could not find iostream.h)
- else
- ice_file=`grep '^# 1' conftest.ii | grep iostream.h | \
- head -1 | sed 's/^.*"\(.*\)".*$/\1/'`
- ice_cv_cxx_include_dir=`echo $ice_file | sed 's%iostream.h%%'`
- fi
- if test "$ice_cv_cxx_include_dir" = ""; then
- ice_cv_cxx_include_dir="$prefix/include"
- for pfx in "$prefix" "$exec_prefix"; do
- for dir in "$pfx/lib/g++-include" "$pfx/include/CC" \
- "$pfx/include" /usr/include /usr/local/include/g++-v3
/usr/local/include/g++-3 /usr/local/include/g++-2 ; do
- if test -d "$dir"; then
- ice_cv_cxx_include_dir="$dir"
- break
- fi
- done
- done
- fi
- changequote([,])dnl
- rm -f conftest.cc conftest.ii
- ])
- CXX_INCLUDE_DIR=$ice_cv_cxx_include_dir
- AC_MSG_RESULT(${CXX_INCLUDE_DIR})
- AC_SUBST(CXX_INCLUDE_DIR)
- ])dnl
-
AC_DEFUN(AC_TYPE_SOCKLEN_T,
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
--- 1,3 ----
Index: top_ivtools/configure
diff -c top_ivtools/configure:1.1 top_ivtools/configure:1.2
*** top_ivtools/configure:1.1 Fri Jan 9 11:42:09 2004
--- ./configure Tue Feb 10 11:40:58 2004
***************
*** 1,50 ****
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
! # Generated automatically using autoconf version 2.13
! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
! # Defaults:
! ac_help=
ac_default_prefix=/usr/local
! # Any additions from configure.in:
! ac_help="$ac_help
! --with-ace=<path> Path to ACE include files"
! ac_help="$ac_help
! --with-ace-libs=<path> Path to ACE libraries"
! ac_help="$ac_help
! --with-clippoly=<path> Path to clippoly include file"
! ac_help="$ac_help
! --with-clippoly-libs=<path> Path to clippoly libraries"
! ac_help="$ac_help
! --with-fresco=<path> path to Fresco include files (not-used)"
! ac_help="$ac_help
! --with-fresco-libs=<path> path to compiled Fresco libs (not-used)"
! ac_help="$ac_help
! --with-iue=<path> path to IUE directory"
! ac_help="$ac_help
! --with-iue-libs=<path> path to compiled IUE libs"
! ac_help="$ac_help
! --with-x use the X Window System"
! ac_help="$ac_help
! --enable-install-relative[=ARG] enable installation relative to the
source tree"
! ac_help="$ac_help
! --enable-use-rpath[=ARG] enable use of -rpath when linking"
! ac_help="$ac_help
! --enable-install-subdir[=ARG] enable installation in an ivtools
sub-directory"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
! build=NONE
! cache_file=./config.cache
exec_prefix=NONE
- host=NONE
no_create=
- nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
--- 1,287 ----
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
! # Generated by GNU Autoconf 2.57.
#
+ # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ # Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+ ## --------------------- ##
+ ## M4sh Initialization. ##
+ ## --------------------- ##
+
+ # Be Bourne compatible
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1;
then
+ set -o posix
+ fi
+
+ # Support unset when possible.
+ if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+ else
+ as_unset=false
+ fi
+
+
+ # Work around bugs in pre-3.0 UWIN ksh.
+ $as_unset ENV MAIL MAILPATH
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+
+ # NLS nuisances.
+ for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE
LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+ do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+ done
+
+ # Required to use basename.
+ if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/";
then
+ as_basename=basename
+ else
+ as_basename=false
+ fi
+
+
+ # Name of the executable.
+ as_me=`$as_basename "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+ echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+ # PATH needs CR, and LINENO needs CR and PATH.
+ # Avoid depending upon Character Ranges.
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+ as_cr_digits='0123456789'
+ as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+ fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh
COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute
path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || {
BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export
ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+ done
+ ;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a
POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+ }
+
+
+ case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+ ' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ esac
+
+ if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ rm -f conf$$ conf$$.exe conf$$.file
+ echo >conf$$.file
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more
generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP
2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.file
+
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+ else
+ as_mkdir_p=false
+ fi
+
+ as_executable_p="test -f"
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="sed
y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+ # Sed expression to map a string onto a valid variable name.
+ as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+ # IFS
+ # We need space, tab and new line, in precisely that order.
+ as_nl='
+ '
+ IFS=" $as_nl"
+
+ # CDPATH.
+ $as_unset CDPATH
+
! # Name of the host.
! # hostname on some systems (SVR3.2, Linux) returns a bogus exit
status,
! # so uname gets run too.
! ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
!
! exec 6>&1
!
! #
! # Initializations.
! #
ac_default_prefix=/usr/local
! ac_config_libobj_dir=.
! cross_compiling=no
! subdirs=
! MFLAGS=
! MAKEFLAGS=
! SHELL=${CONFIG_SHELL-/bin/sh}
!
! # Maximum number of lines to put in a shell here document.
! # This variable seems obsolete. It should probably be removed, and
! # only ac_max_sed_lines should be used.
! : ${ac_max_here_lines=38}
!
! # Identity of this package.
! PACKAGE_NAME=
! PACKAGE_TARNAME=
! PACKAGE_VERSION=
! PACKAGE_STRING=
! PACKAGE_BUGREPORT=
!
! ac_unique_file="configure.in"
! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix
program_transform_name bindir sbindir libexecdir datadir sysconfdir
sharedstatedir localstatedir libdir includedir oldincludedir infodir
mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T
LIBS build build_cpu build_vendor build_os host host_cpu host_vendor
host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS
ac_ct_CC CXXCPP RANLIB ac_ct_RANLIB CPP CXX_INCLUDE_DIR
LIBSTDCPLUSPLUS2 LIBSTDCPLUSPLUS3 x_includes x_libraries ACE ACE_LIBS
ACE_ENABLED CLIPPOLY CLIPPOLY_LIBS CLIPPOLY_ENABLED FRESCOLIBS
FRESCOINCS FRESCO_ENABLED IUE IUELIBS IUEINCS IUE_ENABLED QT QTLIBS
QTINCS QT_ENABLED IV IV_LIBS NO_BOOL PWD INSTALLRELATIVE USERPATH
INSTALLSUBDIR ac_cv_type_socklen_t LIBOBJS LTLIBOBJS'
! ac_subst_files=''
# Initialize some variables set by options.
+ ac_init_help=
+ ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
! cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
***************
*** 53,62 ****
silent=
site=
srcdir=
- target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
--- 290,304 ----
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
+
+ # Installation directory options.
+ # These are left unexpanded so users can "make install
exec_prefix=/foo"
+ # and all the variables that are supposed to be based on exec_prefix
+ # by default will actually change.
+ # Use braces instead of parens because sh, perl, etc. also accept
them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
***************
*** 70,86 ****
infodir='${prefix}/info'
mandir='${prefix}/man'
- # Initialize some other variables.
- subdirs=
- MFLAGS= MAKEFLAGS=
- SHELL=${CONFIG_SHELL-/bin/sh}
- # Maximum number of lines to put in a shell here document.
- ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
--- 312,320 ----
***************
*** 88,146 ****
continue
fi
! case "$ac_option" in
! -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
! *) ac_optarg= ;;
! esac
# Accept the important Cygnus configure options, so we can diagnose
typos.
! case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
! bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
! ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
! build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* |
--ca=* | --c=*)
! cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* |
--dat=* \
| --da=*)
! datadir="$ac_optarg" ;;
-disable-* | --disable-*)
! ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
! if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
! { echo "configure: error: $ac_feature: invalid feature name"
1>&2; exit 1; }
! fi
! ac_feature=`echo $ac_feature| sed 's/-/_/g'`
! eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
! ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
! if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
! { echo "configure: error: $ac_feature: invalid feature name"
1>&2; exit 1; }
! fi
! ac_feature=`echo $ac_feature| sed 's/-/_/g'`
! case "$ac_option" in
! *=*) ;;
*) ac_optarg=yes ;;
esac
! eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
--- 322,380 ----
continue
fi
! ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose
typos.
! case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
! bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
! ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
! build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* |
--ca=* | --c=*)
! cache_file=$ac_optarg ;;
!
! --config-cache | -C)
! cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* |
--dat=* \
| --da=*)
! datadir=$ac_optarg ;;
-disable-* | --disable-*)
! ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
! { echo "$as_me: error: invalid feature name: $ac_feature" >&2
! { (exit 1); exit 1; }; }
! ac_feature=`echo $ac_feature | sed 's/-/_/g'`
! eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
! ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
! { echo "$as_me: error: invalid feature name: $ac_feature" >&2
! { (exit 1); exit 1; }; }
! ac_feature=`echo $ac_feature | sed 's/-/_/g'`
! case $ac_option in
! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
! eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
***************
*** 149,243 ****
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=*
\
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* |
--exec-=* \
| --exec=* | --exe=* | --ex=*)
! exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
! -help | --help | --hel | --he)
! # Omit some internal or obsolete options to make the list less
imposing.
! # This message is too long to be a string in the A/UX 3.1 sh.
! cat << EOF
! Usage: configure [options] [host]
! Options: [defaults in brackets after descriptions]
! Configuration:
! --cache-file=FILE cache test results in FILE
! --help print this message
! --no-create do not create output files
! --quiet, --silent do not print \`checking...' messages
! --version print the version of autoconf that created
configure
! Directory and file names:
! --prefix=PREFIX install architecture-independent files in
PREFIX
! [$ac_default_prefix]
! --exec-prefix=EPREFIX install architecture-dependent files in
EPREFIX
! [same as prefix]
! --bindir=DIR user executables in DIR [EPREFIX/bin]
! --sbindir=DIR system admin executables in DIR
[EPREFIX/sbin]
! --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
! --datadir=DIR read-only architecture-independent data in
DIR
! [PREFIX/share]
! --sysconfdir=DIR read-only single-machine data in DIR
[PREFIX/etc]
! --sharedstatedir=DIR modifiable architecture-independent data in
DIR
! [PREFIX/com]
! --localstatedir=DIR modifiable single-machine data in DIR
[PREFIX/var]
! --libdir=DIR object code libraries in DIR [EPREFIX/lib]
! --includedir=DIR C header files in DIR [PREFIX/include]
! --oldincludedir=DIR C header files for non-gcc in DIR
[/usr/include]
! --infodir=DIR info documentation in DIR [PREFIX/info]
! --mandir=DIR man documentation in DIR [PREFIX/man]
! --srcdir=DIR find the sources in DIR [configure dir or
..]
! --program-prefix=PREFIX prepend PREFIX to installed program names
! --program-suffix=SUFFIX append SUFFIX to installed program names
! --program-transform-name=PROGRAM
! run sed PROGRAM on installed program names
! EOF
! cat << EOF
! Host type:
! --build=BUILD configure for building on BUILD [BUILD=HOST]
! --host=HOST configure for HOST [guessed]
! --target=TARGET configure for TARGET [TARGET=HOST]
! Features and packages:
! --disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
! --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
! --without-PACKAGE do not use PACKAGE (same as
--with-PACKAGE=no)
! --x-includes=DIR X include files are in DIR
! --x-libraries=DIR X library files are in DIR
! EOF
! if test -n "$ac_help"; then
! echo "--enable and --with options recognized:$ac_help"
! fi
! exit 0 ;;
-host | --host | --hos | --ho)
! ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
! host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* |
--include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
! includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* |
--inf=*)
! infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
! libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* |
--libexec=* \
| --libexe=* | --libex=* | --libe=*)
! libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
--- 383,429 ----
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=*
\
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* |
--exec-=* \
| --exec=* | --exe=* | --ex=*)
! exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
! -help | --help | --hel | --he | -h)
! ac_init_help=long ;;
! -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
! ac_init_help=recursive ;;
! -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
! ac_init_help=short ;;
-host | --host | --hos | --ho)
! ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
! host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* |
--include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
! includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* |
--inf=*)
! infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
! libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* |
--libexec=* \
| --libexe=* | --libex=* | --libe=*)
! libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
***************
*** 246,264 ****
-localstatedir=* | --localstatedir=* | --localstatedi=* |
--localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
! localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* |
--m=*)
! mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
! | --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
--- 432,450 ----
-localstatedir=* | --localstatedir=* | --localstatedi=* |
--localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
! localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* |
--m=*)
! mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
! | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
***************
*** 272,297 ****
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* |
--oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* |
--oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
! oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* |
--p=*)
! prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi |
--program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* |
--program-p=*)
! program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi |
--program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* |
--program-s=*)
! program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
--- 458,483 ----
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* |
--oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* |
--oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
! oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* |
--p=*)
! prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi |
--program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* |
--program-p=*)
! program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi |
--program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* |
--program-s=*)
! program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
***************
*** 308,314 ****
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
! program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
--- 494,500 ----
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
! program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
***************
*** 318,324 ****
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
! sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
--- 504,510 ----
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
! sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
***************
*** 329,386 ****
| --sharedstated=* | --sharedstate=* | --sharedstat=* |
--sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
! sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
! site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
! srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* |
--sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
! sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
! ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* |
--t=*)
! target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
! -version | --version | --versio | --versi | --vers)
! echo "configure generated by autoconf version 2.13"
! exit 0 ;;
-with-* | --with-*)
! ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
! if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
! { echo "configure: error: $ac_package: invalid package name"
1>&2; exit 1; }
! fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
! case "$ac_option" in
! *=*) ;;
*) ac_optarg=yes ;;
esac
! eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
! ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
! if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
! { echo "configure: error: $ac_package: invalid package name"
1>&2; exit 1; }
! fi
! ac_package=`echo $ac_package| sed 's/-/_/g'`
! eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
--- 515,571 ----
| --sharedstated=* | --sharedstate=* | --sharedstat=* |
--sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
! sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
! site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
! srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* |
--sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
! sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
! ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* |
--t=*)
! target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
! -version | --version | --versio | --versi | --vers | -V)
! ac_init_version=: ;;
-with-* | --with-*)
! ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
! { echo "$as_me: error: invalid package name: $ac_package" >&2
! { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
! case $ac_option in
! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
! eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
! ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
! { echo "$as_me: error: invalid package name: $ac_package" >&2
! { (exit 1); exit 1; }; }
! ac_package=`echo $ac_package | sed 's/-/_/g'`
! eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
***************
*** 391,489 ****
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* |
--x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
! x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* |
--x-l=*)
! x_libraries="$ac_optarg" ;;
! -*) { echo "configure: error: $ac_option: invalid option; use
--help to show usage" 1>&2; exit 1; }
;;
*)
! if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
! echo "configure: warning: $ac_option: invalid host type" 1>&2
! fi
! if test "x$nonopt" != xNONE; then
! { echo "configure: error: can only configure for one host and
one target at a time" 1>&2; exit 1; }
! fi
! nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
! { echo "configure: error: missing argument to --`echo $ac_prev |
sed 's/_/-/g'`" 1>&2; exit 1; }
! fi
!
! trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files;
exit 1' 1 2 15
!
! # File descriptor usage:
! # 0 standard input
! # 1 file creation
! # 2 errors and warnings
! # 3 some systems may open it to /dev/tty
! # 4 used on the Kubota Titan
! # 6 checking for... messages and results
! # 5 compiler messages saved in config.log
! if test "$silent" = yes; then
! exec 6>/dev/null
! else
! exec 6>&1
fi
- exec 5>./config.log
! echo "\
! This file contains any messages produced by compilers while
! running configure, to aid debugging if configure makes a mistake.
! " 1>&5
! # Strip out --no-create and --no-recursion so they do not pile up.
! # Also quote any args containing shell metacharacters.
! ac_configure_args=
! for ac_arg
do
! case "$ac_arg" in
! -no-create | --no-create | --no-creat | --no-crea | --no-cre \
! | --no-cr | --no-c) ;;
! -no-recursion | --no-recursion | --no-recursio | --no-recursi \
! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re |
--no-r) ;;
! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
! ac_configure_args="$ac_configure_args '$ac_arg'" ;;
! *) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
! # NLS nuisances.
! # Only set these to C if already set. These must not be set
unconditionally
! # because not all systems understand e.g. LANG=C (notably SCO).
! # Fixing LC_MESSAGES prevents Solaris sh from translating var values
in `set'!
! # Non-C LC_CTYPE values break the ctype check.
! if test "${LANG+set}" = set; then LANG=C; export LANG; fi
! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
! if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export
LC_MESSAGES; fi
! if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export
LC_CTYPE; fi
! # confdefs.h avoids OS command line length limits that DEFS can
exceed.
! rm -rf conftest* confdefs.h
! # AIX cpp loses on an empty file, so make sure it contains at least a
newline.
! echo > confdefs.h
! # A filename unique to this package, relative to the directory that
! # configure is in, which we can look for to find out if srcdir is
correct.
! ac_unique_file=configure.in
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
! ac_prog=$0
! ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
! test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
--- 576,685 ----
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* |
--x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
! x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* |
--x-l=*)
! x_libraries=$ac_optarg ;;
! -*) { echo "$as_me: error: unrecognized option: $ac_option
! Try \`$0 --help' for more information." >&2
! { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
! # FIXME: should be removed in autoconf 3.0.
! echo "$as_me: WARNING: you should use --build, --host, --target"
>&2
! expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
! echo "$as_me: WARNING: invalid host type: $ac_option" >&2
! : ${build_alias=$ac_option} ${host_alias=$ac_option}
${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
! ac_option=--`echo $ac_prev | sed 's/_/-/g'`
! { echo "$as_me: error: missing argument to $ac_option" >&2
! { (exit 1); exit 1; }; }
fi
! # Be sure to have absolute paths.
! for ac_var in exec_prefix prefix
! do
! eval ac_val=$`echo $ac_var`
! case $ac_val in
! [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
! *) { echo "$as_me: error: expected an absolute directory name
for --$ac_var: $ac_val" >&2
! { (exit 1); exit 1; }; };;
! esac
! done
! # Be sure to have absolute paths.
! for ac_var in bindir sbindir libexecdir datadir sysconfdir
sharedstatedir \
! localstatedir libdir includedir oldincludedir infodir
mandir
do
! eval ac_val=$`echo $ac_var`
! case $ac_val in
! [\\/$]* | ?:[\\/]* ) ;;
! *) { echo "$as_me: error: expected an absolute directory name
for --$ac_var: $ac_val" >&2
! { (exit 1); exit 1; }; };;
esac
done
! # There might be people who depend on the old broken behavior: `$host'
! # used to hold the argument of --host etc.
! # FIXME: To remove some day.
! build=$build_alias
! host=$host_alias
! target=$target_alias
!
! # FIXME: To remove some day.
! if test "x$host_alias" != x; then
! if test "x$build_alias" = x; then
! cross_compiling=maybe
! echo "$as_me: WARNING: If you wanted to set the --build type,
don't use --host.
! If a cross compiler is detected then cross compile mode will be
used." >&2
! elif test "x$build_alias" != "x$host_alias"; then
! cross_compiling=yes
! fi
! fi
! ac_tool_prefix=
! test -n "$host_alias" && ac_tool_prefix=$host_alias-
! test "$silent" = yes && exec 6>/dev/null
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
! ac_confdir=`(dirname "$0") 2>/dev/null ||
! $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
! X"$0" : 'X\(//\)[^/]' \| \
! X"$0" : 'X\(//\)$' \| \
! X"$0" : 'X\(/\)' \| \
! . : '\(.\)' 2>/dev/null ||
! echo X"$0" |
! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
! /^X\(\/\/\)[^/].*/{ s//\1/; q; }
! /^X\(\/\/\)$/{ s//\1/; q; }
! /^X\(\/\).*/{ s//\1/; q; }
! s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
***************
*** 493,505 ****
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
! { echo "configure: error: can not find sources in $ac_confdir or
.." 1>&2; exit 1; }
else
! { echo "configure: error: can not find sources in $srcdir" 1>&2;
exit 1; }
fi
fi
! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
--- 689,1155 ----
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
! { echo "$as_me: error: cannot find sources ($ac_unique_file) in
$ac_confdir or .." >&2
! { (exit 1); exit 1; }; }
else
! { echo "$as_me: error: cannot find sources ($ac_unique_file) in
$srcdir" >&2
! { (exit 1); exit 1; }; }
fi
+ fi
+ (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir'
does not work" >&2
+ { (exit 1); exit 1; }; }
+ srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ ac_env_build_alias_set=${build_alias+set}
+ ac_env_build_alias_value=$build_alias
+ ac_cv_env_build_alias_set=${build_alias+set}
+ ac_cv_env_build_alias_value=$build_alias
+ ac_env_host_alias_set=${host_alias+set}
+ ac_env_host_alias_value=$host_alias
+ ac_cv_env_host_alias_set=${host_alias+set}
+ ac_cv_env_host_alias_value=$host_alias
+ ac_env_target_alias_set=${target_alias+set}
+ ac_env_target_alias_value=$target_alias
+ ac_cv_env_target_alias_set=${target_alias+set}
+ ac_cv_env_target_alias_value=$target_alias
+ ac_env_CXX_set=${CXX+set}
+ ac_env_CXX_value=$CXX
+ ac_cv_env_CXX_set=${CXX+set}
+ ac_cv_env_CXX_value=$CXX
+ ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ ac_env_CXXFLAGS_value=$CXXFLAGS
+ ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ ac_env_LDFLAGS_set=${LDFLAGS+set}
+ ac_env_LDFLAGS_value=$LDFLAGS
+ ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ ac_cv_env_LDFLAGS_value=$LDFLAGS
+ ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ ac_env_CPPFLAGS_value=$CPPFLAGS
+ ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ ac_env_CC_set=${CC+set}
+ ac_env_CC_value=$CC
+ ac_cv_env_CC_set=${CC+set}
+ ac_cv_env_CC_value=$CC
+ ac_env_CFLAGS_set=${CFLAGS+set}
+ ac_env_CFLAGS_value=$CFLAGS
+ ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ ac_cv_env_CFLAGS_value=$CFLAGS
+ ac_env_CXXCPP_set=${CXXCPP+set}
+ ac_env_CXXCPP_value=$CXXCPP
+ ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ ac_cv_env_CXXCPP_value=$CXXCPP
+ ac_env_CPP_set=${CPP+set}
+ ac_env_CPP_value=$CPP
+ ac_cv_env_CPP_set=${CPP+set}
+ ac_cv_env_CPP_value=$CPP
+
+ #
+ # Report the --help message.
+ #
+ if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less
imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+ \`configure' configures this package to adapt to many kinds of
systems.
+
+ Usage: $0 [OPTION]... [VAR=VALUE]...
+
+ To assign environment variables (e.g., CC, CFLAGS...), specify them as
+ VAR=VALUE. See below for descriptions of some of the useful
variables.
+
+ Defaults for the options are specified in brackets.
+
+ Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included
packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or
\`..']
+
+ _ACEOF
+
+ cat <<_ACEOF
+ Installation directories:
+ --prefix=PREFIX install architecture-independent files in
PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in
EPREFIX
+ [PREFIX]
+
+ By default, \`make install' will install all the files in
+ \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can
specify
+ an installation prefix other than \`$ac_default_prefix' using
\`--prefix',
+ for instance \`--prefix=\$HOME'.
+
+ For better control, use the options below.
+
+ Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data
[PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data
[PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+ _ACEOF
+
+ cat <<\_ACEOF
+
+ X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
+ System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST
[BUILD]
+ _ACEOF
+ fi
+
+ if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+ Optional Features:
+ --disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-install-relative=ARG enable installation relative to the
source tree
+ --enable-use-rpath=ARG enable use of -rpath when linking
+ --enable-install-subdir=ARG enable installation in an ivtools
sub-directory
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as
--with-PACKAGE=no)
+ --with-ace=<path> Path to ACE include files
+ --with-ace-libs=<path> Path to ACE libraries
+ --with-clippoly=<path> Path to clippoly include file
+ --with-clippoly-libs=<path> Path to clippoly libraries
+ --with-fresco=<path> path to Fresco include files (not-used)
+ --with-fresco-libs=<path> path to compiled Fresco libs (not-used)
+ --with-iue=<path> path to IUE directory
+ --with-iue-libs=<path> path to compiled IUE libs
+ --with-qt=<path> path to QT directory
+ --with-qt-libs=<path> path to compiled QT libs
+ --with-x use the X Window System
+
+ Some influential environment variables:
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in
a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you
have
+ headers in a nonstandard directory <include dir>
+ CC C compiler command
+ CFLAGS C compiler flags
+ CXXCPP C++ preprocessor
+ CPP C preprocessor
+
+ Use these variables to override the choices made by `configure' or to
help
+ it to find libraries and programs with nonstandard names/locations.
+
+ _ACEOF
+ fi
+
+ if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+ if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+ else
+ ac_dir_suffix= ac_top_builddir=
+ fi
+
+ case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ esac
+ # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo
can be
+ # absolute.
+ ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style
configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in
$ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+ fi
+
+ test -n "$ac_init_help" && exit 0
+ if $ac_init_version; then
+ cat <<\_ACEOF
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+ exit 0
fi
! exec 5>config.log
! cat >&5 <<_ACEOF
! This file contains any messages produced by compilers while
! running configure, to aid debugging if configure makes a mistake.
!
! It was created by $as_me, which was
! generated by GNU Autoconf 2.57. Invocation command line was
!
! $ $0 $@
!
! _ACEOF
! {
! cat <<_ASUNAME
! ## --------- ##
! ## Platform. ##
! ## --------- ##
!
! hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
! uname -m = `(uname -m) 2>/dev/null || echo unknown`
! uname -r = `(uname -r) 2>/dev/null || echo unknown`
! uname -s = `(uname -s) 2>/dev/null || echo unknown`
! uname -v = `(uname -v) 2>/dev/null || echo unknown`
!
! /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
! /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
!
! /bin/arch = `(/bin/arch) 2>/dev/null ||
echo unknown`
! /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null ||
echo unknown`
! /usr/convex/getsysinfo = `(/usr/convex/...
[truncated message content] |
|
From: <ivt...@li...> - 2004-01-30 19:23:51
|
Patch: ivtools-040130-johnston-006
For: ivtools-1.1.2
Author: joh...@us...
Subject: fix use of ACE with gcc-3.*
Requires:
This is an intermediate patch to ivtools-1.1.2. 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 ivtools use of ACE when compiled with gcc-3.*. All calls to the
instance() method on the Reactor singleton had to be isolated into a
single module to guarantee that it really was a singleton. For more
details see my comp.soft-sys.ace newsgroup posting on Jan 30 2004 (as
joh...@ve...).
- first draft at fixing the comterp remote func, which doesn't use a
ComterpHandler.
Index: comdraw/main.c
diff -c comdraw/main.c:1.1 comdraw/main.c:1.2
*** comdraw/main.c:1.1 Fri Jan 9 11:45:03 2004
--- src/comdraw/main.c Fri Jan 30 11:12:48 2004
***************
*** 246,252 ****
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(IMPORT_REACTOR::instance()));
#endif
OverlayCreator creator;
OverlayCatalog* catalog = new OverlayCatalog("comdraw", &creator);
--- 246,252 ----
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(ComterpHandler::reactor_singleton()));
#endif
OverlayCreator creator;
OverlayCatalog* catalog = new OverlayCatalog("comdraw", &creator);
***************
*** 266,275 ****
const char* importstr = catalog->GetAttribute("import");
int importnum = atoi(importstr);
if (import_acceptor->open
! (ACE_INET_Addr (importnum)) == -1)
cerr << "comdraw: unable to open import port " << importnum
<< "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comdraw: unable to register UnidrawImportAcceptor
with ACE reactor\n";
else
--- 266,275 ----
const char* importstr = catalog->GetAttribute("import");
int importnum = atoi(importstr);
if (import_acceptor->open
! (ACE_INET_Addr (importnum), ComterpHandler::reactor_singleton()) ==
-1)
cerr << "comdraw: unable to open import port " << importnum
<< "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comdraw: unable to register UnidrawImportAcceptor
with ACE reactor\n";
else
***************
*** 282,291 ****
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum)) == -1)
cerr << "comdraw: unable to open port " << portnum << "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comdraw: unable to register ComterpAcceptor with
ACE reactor\n";
else
--- 282,291 ----
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum), ComterpHandler::reactor_singleton()) == -1)
cerr << "comdraw: unable to open port " << portnum << "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comdraw: unable to register ComterpAcceptor with
ACE reactor\n";
else
***************
*** 295,301 ****
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (COMTERP_REACTOR::instance ()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
cerr << "comdraw: unable to register quit handler with ACE
reactor\n";
--- 295,301 ----
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
cerr << "comdraw: unable to register quit handler with ACE
reactor\n";
***************
*** 319,327 ****
if (!stdin_off_str || strcmp(stdin_off_str, "false")==0) {
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
COMTERP_REACTOR::instance(), nil) == -1)
#else
! if (COMTERP_REACTOR::instance()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "comdraw: unable to open stdin with ACE\n";
--- 319,327 ----
if (!stdin_off_str || strcmp(stdin_off_str, "false")==0) {
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
ComterpHandler::reactor_singleton(), nil) == -1)
#else
! if (ComterpHandler::reactor_singleton()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "comdraw: unable to open stdin with ACE\n";
Index: ComTerp/comhandler.c
diff -c ComTerp/comhandler.c:1.1 ComTerp/comhandler.c:1.2
*** ComTerp/comhandler.c:1.1 Fri Jan 9 11:42:25 2004
--- src/ComTerp/comhandler.c Fri Jan 30 11:12:29 2004
***************
*** 45,51 ****
// Default constructor.
! ComterpHandler::ComterpHandler (void)
{
comterp_ = new ComTerpServ(BUFSIZ*BUFSIZ);
comterp_->handler(this);
--- 45,54 ----
// Default constructor.
! ComterpHandler::ComterpHandler (void)
! #if 0
! : ACE_Svc_Handler<ACE_SOCK_Stream,
ACE_NULL_SYNCH>(0,0,ComterpHandler::reactor_singleton())
! #endif
{
comterp_ = new ComTerpServ(BUFSIZ*BUFSIZ);
comterp_->handler(this);
***************
*** 67,77 ****
int ComterpHandler::timeoutscriptid() { return _timeoutscriptid; }
void ComterpHandler::timeoutscriptid(int timeoutscriptid) {
if (_timeoutscriptid != -1)
! COMTERP_REACTOR::instance ()->cancel_timer (this);
_timeoutscriptid = timeoutscriptid;
if (_timeoutscriptid != -1) {
! if (COMTERP_REACTOR::instance ()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (timeoutseconds()),
--- 70,80 ----
int ComterpHandler::timeoutscriptid() { return _timeoutscriptid; }
void ComterpHandler::timeoutscriptid(int timeoutscriptid) {
if (_timeoutscriptid != -1)
! ComterpHandler::reactor_singleton()->cancel_timer (this);
_timeoutscriptid = timeoutscriptid;
if (_timeoutscriptid != -1) {
! if (ComterpHandler::reactor_singleton()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (timeoutseconds()),
***************
*** 88,94 ****
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) disconnected from %s\n", this->peer_name_));
#if 0
! COMTERP_REACTOR::instance ()->cancel_timer (this);
#endif
this->peer ().close ();
if (_timeoutscriptid<0)
--- 91,97 ----
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) disconnected from %s\n", this->peer_name_));
#if 0
! ComterpHandler::reactor_singleton()->cancel_timer (this);
#endif
this->peer ().close ();
if (_timeoutscriptid<0)
***************
*** 246,257 ****
ACE_OS::strncpy (this->peer_name_, buffer,
MAXHOSTNAMELEN + 1);
! if (COMTERP_REACTOR::instance ()->register_handler
(this, ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) can't register with reactor\n"), -1);
#if defined(__NetBSD__) /* this seems to be required for NetBSD */
! else if (COMTERP_REACTOR::instance ()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (10),
--- 249,260 ----
ACE_OS::strncpy (this->peer_name_, buffer,
MAXHOSTNAMELEN + 1);
! if (ComterpHandler::reactor_singleton()->register_handler
(this, ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) can't register with reactor\n"), -1);
#if defined(__NetBSD__) /* this seems to be required for NetBSD */
! else if (ComterpHandler::reactor_singleton()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (10),
***************
*** 275,280 ****
--- 278,291 ----
{
this->destroy ();
return 0;
+ }
+
+ // Our Reactor Singleton.
+ typedef ACE_Singleton<ACE_Reactor, ACE_Null_Mutex>
+ REACTOR;
+
+ ACE_Reactor* ComterpHandler::reactor_singleton() {
+ return REACTOR::instance();
}
#endif /* HAVE_ACE */
Index: ComTerp/comhandler.h
diff -c ComTerp/comhandler.h:1.1 ComTerp/comhandler.h:1.2
*** ComTerp/comhandler.h:1.1 Fri Jan 9 11:42:25 2004
--- src/ComTerp/comhandler.h Fri Jan 30 11:12:29 2004
***************
*** 40,48 ****
--- 40,53 ----
#include <ace/Singleton.h>
#include <ace/Svc_Handler.h>
#include <ace/SOCK_Acceptor.h>
+ #include <ace/Test_and_Set.h>
class ComTerpServ;
+ //: An ACE_Test_and_Set Singleton.
+ typedef ACE_Singleton<ACE_Test_and_Set <ACE_Null_Mutex,
sig_atomic_t>, ACE_Null_Mutex>
+ COMTERP_QUIT_HANDLER;
+
//: handler to invoke ComTerp on socket (version with ACE)
class ComterpHandler : public ACE_Svc_Handler<ACE_SOCK_STREAM,
ACE_NULL_SYNCH>
{
***************
*** 91,96 ****
--- 96,104 ----
FILE* rdfptr() { return _rdfptr; }
// file pointer for reading from handle
+ static ACE_Reactor* reactor_singleton();
+ // alternate way of getting at reactor singleton
+
protected:
// = Demultiplexing hooks.
virtual int handle_input (ACE_HANDLE);
***************
*** 119,133 ****
static int _logger_mode;
// mode for logging commands: 0 = no log, 1 = log only
- };
! //: A Reactor Singleton.
! typedef ACE_Singleton<ACE_Reactor, ACE_Null_Mutex>
! COMTERP_REACTOR;
!
! //: An ACE_Test_and_Set Singleton.
! typedef ACE_Singleton<ACE_Test_and_Set <ACE_Null_Mutex,
sig_atomic_t>, ACE_Null_Mutex>
! COMTERP_QUIT_HANDLER;
//: Specialize a ComterpAcceptor.
typedef ACE_Acceptor <ComterpHandler, ACE_SOCK_ACCEPTOR>
--- 127,134 ----
static int _logger_mode;
// mode for logging commands: 0 = no log, 1 = log only
! };
//: Specialize a ComterpAcceptor.
typedef ACE_Acceptor <ComterpHandler, ACE_SOCK_ACCEPTOR>
***************
*** 156,161 ****
--- 157,163 ----
protected:
int _handle;
ComTerpServ* comterp_;
+
};
#endif
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.1 ComTerp/ctrlfunc.c:1.2
*** ComTerp/ctrlfunc.c:1.1 Fri Jan 9 11:42:26 2004
--- src/ComTerp/ctrlfunc.c Fri Jan 30 11:12:29 2004
***************
*** 134,147 ****
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);
const char* cmdstr = cmdstrv.string_ptr();
out << cmdstr;
if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
out.flush();
if (nowaitv.is_false()) {
#if __GNUC__<3
filebuf ifbuf;
--- 134,150 ----
filebuf ofbuf;
ofbuf.attach(socket.get_handle());
#else
! FILE* ofptr = fdopen(socket.get_handle(), "r");
! fileptr_filebuf ofbuf(ofptr, ios_base::out);
#endif
ostream out(&ofbuf);
const char* cmdstr = cmdstrv.string_ptr();
out << cmdstr;
if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
out.flush();
+ #if __GNUC__>=3
+ fclose(ofptr);
+ #endif
if (nowaitv.is_false()) {
#if __GNUC__<3
filebuf ifbuf;
***************
*** 150,156 ****
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);
--- 153,160 ----
char* buf;
in.gets(&buf);
#else
! FILE* fptr = fdopen(socket.get_handle(), "r");
! fileptr_filebuf ifbuf(fptr, ios_base::in);
istream in(&ifbuf);
char buf[BUFSIZ];
in.get(buf, BUFSIZ);
***************
*** 158,163 ****
--- 162,170 ----
#endif
ComValue& retval = comterpserv()->run(buf, true);
push_stack(retval);
+ #if __GNUC__>=3
+ fclose(fptr);
+ #endif
}
if (socket.close () == -1)
Index: comterp_/Imakefile
diff -c comterp_/Imakefile:1.1 comterp_/Imakefile:1.2
*** comterp_/Imakefile:1.1 Fri Jan 9 11:42:31 2004
--- src/comterp_/Imakefile Fri Jan 30 11:12:31 2004
***************
*** 16,22 ****
ComplexProgramTarget(comterp)
-
#define Obj(file) MakeObjectFromSrcFlags(file, -D__ACE_INLINE__)
Obj(main)
--- 16,21 ----
Index: comterp_/main.c
diff -c comterp_/main.c:1.1 comterp_/main.c:1.2
*** comterp_/main.c:1.1 Fri Jan 9 11:42:31 2004
--- src/comterp_/main.c Fri Jan 30 11:12:31 2004
***************
*** 71,85 ****
#ifdef HAVE_ACE
if (server_flag || logger_flag) {
! ComterpAcceptor* peer_acceptor = new ComterpAcceptor();
ComterpHandler::logger_mode(logger_flag);
int portnum = argc > 2 ? atoi(argv[2]) :
atoi(ACE_DEFAULT_SERVER_PORT_STR);
! if (peer_acceptor->open (ACE_INET_Addr (portnum)) == -1)
cerr << "comterp: unable to open port " << portnum << "
with ACE\n";
#if !defined(__NetBSD__) /* this is not the way to do it for NetBSD
*/
! else if (COMTERP_REACTOR::instance ()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comterp: error registering acceptor with ACE
reactor\n";
#endif
--- 71,87 ----
#ifdef HAVE_ACE
if (server_flag || logger_flag) {
! ComterpAcceptor* peer_acceptor =
! new ComterpAcceptor(ComterpHandler::reactor_singleton());
ComterpHandler::logger_mode(logger_flag);
int portnum = argc > 2 ? atoi(argv[2]) :
atoi(ACE_DEFAULT_SERVER_PORT_STR);
! if (peer_acceptor->open (ACE_INET_Addr (portnum),
! ComterpHandler::reactor_singleton()) == -1)
cerr << "comterp: unable to open port " << portnum << "
with ACE\n";
#if !defined(__NetBSD__) /* this is not the way to do it for NetBSD
*/
! else if (ComterpHandler::reactor_singleton()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "comterp: error registering acceptor with ACE
reactor\n";
#endif
***************
*** 90,96 ****
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event
loop below will
// exit.
! if (COMTERP_REACTOR::instance ()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"registering service with ACE_Reactor\n"), -1);
--- 92,98 ----
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event
loop below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"registering service with ACE_Reactor\n"), -1);
***************
*** 98,111 ****
// Start up one on stdin
if (!logger_flag) {
ComterpHandler* stdin_handler = new ComterpHandler();
! if (COMTERP_REACTOR::instance()->register_handler(0, stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
cerr << "comterp: unable to open stdin with ACE\n";
}
// Perform logging service until COMTERP_QUIT_HANDLER
receives SIGINT.
while (COMTERP_QUIT_HANDLER::instance ()->is_set () == 0)
! COMTERP_REACTOR::instance ()->handle_events ();
return 0;
}
--- 100,113 ----
// Start up one on stdin
if (!logger_flag) {
ComterpHandler* stdin_handler = new ComterpHandler();
! if (ComterpHandler::reactor_singleton()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
cerr << "comterp: unable to open stdin with ACE\n";
}
// Perform logging service until COMTERP_QUIT_HANDLER
receives SIGINT.
while (COMTERP_QUIT_HANDLER::instance ()->is_set () == 0)
! ComterpHandler::reactor_singleton()->handle_events ();
return 0;
}
Index: drawserv_/main.c
diff -c drawserv_/main.c:1.1 drawserv_/main.c:1.2
*** drawserv_/main.c:1.1 Fri Jan 9 11:45:20 2004
--- src/drawserv_/main.c Fri Jan 30 11:12:57 2004
***************
*** 30,35 ****
--- 30,36 ----
#include <ComUnidraw/comterp-acehandler.h>
#include <OverlayUnidraw/aceimport.h>
#include <AceDispatch/ace_dispatcher.h>
+ #include <Comterp/comhandler.h>
#endif
#include <DrawServ/drawcatalog.h>
***************
*** 208,214 ****
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(IMPORT_REACTOR::instance()));
#endif
DrawCreator creator;
DrawCatalog* catalog = new DrawCatalog("ivtools drawserv",
&creator);
--- 209,215 ----
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(ComterpHandler::reactor_singleton()));
#endif
DrawCreator creator;
DrawCatalog* catalog = new DrawCatalog("ivtools drawserv",
&creator);
***************
*** 226,232 ****
(ACE_INET_Addr (importnum)) == -1)
cerr << "drawserv: unable to open import port " << importnum
<< "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawserv: unable to register UnidrawImportAcceptor
with ACE reactor\n";
else
--- 227,233 ----
(ACE_INET_Addr (importnum)) == -1)
cerr << "drawserv: unable to open import port " << importnum
<< "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawserv: unable to register UnidrawImportAcceptor
with ACE reactor\n";
else
***************
*** 239,248 ****
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum)) == -1)
cerr << "drawserv: unable to open port " << portnum << "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawserv: unable to register ComterpAcceptor with
ACE reactor\n";
else
--- 240,249 ----
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum), ComterpHandler::reactor_singleton()) == -1)
cerr << "drawserv: unable to open port " << portnum << "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawserv: unable to register ComterpAcceptor with
ACE reactor\n";
else
***************
*** 252,258 ****
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (COMTERP_REACTOR::instance ()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
cerr << "drawserv: unable to register quit handler with ACE
reactor\n";
--- 253,259 ----
// Register COMTERP_QUIT_HANDLER to receive SIGINT commands.
When received,
// COMTERP_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, COMTERP_QUIT_HANDLER::instance ()) == -1)
cerr << "drawserv: unable to register quit handler with ACE
reactor\n";
***************
*** 283,291 ****
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
COMTERP_REACTOR::instance(), nil) == -1)
#else
! if (COMTERP_REACTOR::instance()->register_handler(0, stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "drawserv: unable to open stdin with ACE\n";
--- 284,292 ----
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
ComterpHandler::reactor_singleton(), nil) == -1)
#else
! if (ComterpHandler::reactor_singleton()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "drawserv: unable to open stdin with ACE\n";
Index: drawtool/main.c
diff -c drawtool/main.c:1.1 drawtool/main.c:1.2
*** drawtool/main.c:1.1 Fri Jan 9 11:44:57 2004
--- src/drawtool/main.c Fri Jan 30 11:12:46 2004
***************
*** 32,37 ****
--- 32,38 ----
#ifdef HAVE_ACE
#include <OverlayUnidraw/aceimport.h>
#include <AceDispatch/ace_dispatcher.h>
+ #include <Comterp/comhandler.h>
#endif
#include <OverlayUnidraw/ovcatalog.h>
***************
*** 224,230 ****
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(IMPORT_REACTOR::instance()));
#endif
int exit_status = 0;
OverlayCreator creator;
--- 225,231 ----
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(ComterpHandler::reactor_singleton()));
#endif
int exit_status = 0;
OverlayCreator creator;
***************
*** 248,254 ****
(ACE_INET_Addr (importnum)) == -1)
cerr << "drawtool: unable to open import port " << importnum
<< "\n";
! else if (IMPORT_REACTOR::instance ()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawtool: unable to register UnidrawImportAcceptor
with ACE reactor\n";
--- 249,255 ----
(ACE_INET_Addr (importnum)) == -1)
cerr << "drawtool: unable to open import port " << importnum
<< "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "drawtool: unable to register UnidrawImportAcceptor
with ACE reactor\n";
***************
*** 258,264 ****
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (IMPORT_REACTOR::instance ()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "drawtool: unable to register quit handler with ACE
reactor\n";
--- 259,265 ----
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "drawtool: unable to register quit handler with ACE
reactor\n";
Index: flipbook/main.c
diff -c flipbook/main.c:1.1 flipbook/main.c:1.2
*** flipbook/main.c:1.1 Fri Jan 9 11:45:09 2004
--- src/flipbook/main.c Fri Jan 30 11:12:52 2004
***************
*** 232,238 ****
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(IMPORT_REACTOR::instance()));
#endif
int exit_status = 0;
FrameCreator creator;
--- 232,238 ----
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(ComterpHandler::reactor_singleton()));
#endif
int exit_status = 0;
FrameCreator creator;
***************
*** 255,261 ****
(ACE_INET_Addr (importnum)) == -1)
cerr << "flipbook: unable to open import port " << importnum
<< "\n";
! else if (IMPORT_REACTOR::instance ()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "flipbook: unable to register UnidrawImportAcceptor
with ACE reactor\n";
--- 255,261 ----
(ACE_INET_Addr (importnum)) == -1)
cerr << "flipbook: unable to open import port " << importnum
<< "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "flipbook: unable to register UnidrawImportAcceptor
with ACE reactor\n";
***************
*** 268,277 ****
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum)) == -1)
cerr << "flipbook: unable to open port " << portnum << "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "flipbook: unable to register ComterpAcceptor with
ACE reactor\n";
else
--- 268,277 ----
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum), ComterpHandler::reactor_singleton()) == -1)
cerr << "flipbook: unable to open port " << portnum << "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "flipbook: unable to register ComterpAcceptor with
ACE reactor\n";
else
***************
*** 281,287 ****
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (IMPORT_REACTOR::instance ()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "flipbook: unable to register quit handler with ACE
reactor\n";
--- 281,287 ----
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "flipbook: unable to register quit handler with ACE
reactor\n";
***************
*** 300,308 ****
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
COMTERP_REACTOR::instance(), nil) == -1)
#else
! if (COMTERP_REACTOR::instance()->register_handler(0, stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "flipbook: unable to open stdin with ACE\n";
--- 300,308 ----
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
ComterpHandler::reactor_singleton(), nil) == -1)
#else
! if (ComterpHandler::reactor_singleton()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "flipbook: unable to open stdin with ACE\n";
Index: graphdraw/main.c
diff -c graphdraw/main.c:1.1 graphdraw/main.c:1.2
*** graphdraw/main.c:1.1 Fri Jan 9 11:45:15 2004
--- src/graphdraw/main.c Fri Jan 30 11:12:55 2004
***************
*** 215,221 ****
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(IMPORT_REACTOR::instance()));
#endif
int exit_status = 0;
GraphCreator creator;
--- 215,221 ----
int main (int argc, char** argv) {
#ifdef HAVE_ACE
! Dispatcher::instance(new
AceDispatcher(ComterpHandler::reactor_singleton()));
#endif
int exit_status = 0;
GraphCreator creator;
***************
*** 239,245 ****
(ACE_INET_Addr (importnum)) == -1)
cerr << "flipbook: unable to open import port " << importnum
<< "\n";
! else if (IMPORT_REACTOR::instance ()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "graphdraw: unable to register UnidrawImportAcceptor
with ACE reactor\n";
--- 239,245 ----
(ACE_INET_Addr (importnum)) == -1)
cerr << "flipbook: unable to open import port " << importnum
<< "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(import_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "graphdraw: unable to register UnidrawImportAcceptor
with ACE reactor\n";
***************
*** 252,261 ****
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum)) == -1)
cerr << "graphdraw: unable to open port " << portnum << "\n";
! else if (COMTERP_REACTOR::instance ()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "graphdraw: unable to register ComterpAcceptor with
ACE reactor\n";
else
--- 252,261 ----
const char* portstr = catalog->GetAttribute("comdraw");
int portnum = atoi(portstr);
if (peer_acceptor->open
! (ACE_INET_Addr (portnum), ComterpHandler::reactor_singleton()) == -1)
cerr << "graphdraw: unable to open port " << portnum << "\n";
! else if (ComterpHandler::reactor_singleton()->register_handler
(peer_acceptor, ACE_Event_Handler::READ_MASK) == -1)
cerr << "graphdraw: unable to register ComterpAcceptor with
ACE reactor\n";
else
***************
*** 265,271 ****
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (IMPORT_REACTOR::instance ()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "graphdraw: unable to register quit handler with ACE
reactor\n";
--- 265,271 ----
// Register IMPORT_QUIT_HANDLER to receive SIGINT commands. When
received,
// IMPORT_QUIT_HANDLER becomes "set" and thus, the event loop
below will
// exit.
! if (ComterpHandler::reactor_singleton()->register_handler
(SIGINT, IMPORT_QUIT_HANDLER::instance ()) == -1)
cerr << "graphdraw: unable to register quit handler with ACE
reactor\n";
***************
*** 280,288 ****
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
COMTERP_REACTOR::instance(), nil) == -1)
#else
! if (COMTERP_REACTOR::instance()->register_handler(0, stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "graphdraw: unable to open stdin with ACE\n";
--- 280,288 ----
/* Start up one on stdin */
UnidrawComterpHandler* stdin_handler = new UnidrawComterpHandler();
#if 0
! if (ACE::register_stdin_handler(stdin_handler,
ComterpHandler::reactor_singleton(), nil) == -1)
#else
! if (ComterpHandler::reactor_singleton()->register_handler(0,
stdin_handler,
ACE_Event_Handler::READ_MASK)==-1)
#endif
cerr << "graphdraw: unable to open stdin with ACE\n";
Index: OverlayUnidraw/aceimport.c
diff -c OverlayUnidraw/aceimport.c:1.1 OverlayUnidraw/aceimport.c:1.2
*** OverlayUnidraw/aceimport.c:1.1 Fri Jan 9 11:44:52 2004
--- src/OverlayUnidraw/aceimport.c Fri Jan 30 11:12:43 2004
***************
*** 31,36 ****
--- 31,37 ----
#include <IVGlyph/importchooser.h>
#include <Unidraw/iterator.h>
#include <Unidraw/unidraw.h>
+ #include <Comterp/comhandler.h>
#include <fstream.h>
#include <stdio.h>
***************
*** 54,60 ****
{
cerr << this->peer_name_ << " disconnected from import port\n";
#if 0
! IMPORT_REACTOR::instance ()->cancel_timer (this);
#endif
this->peer ().close ();
if (_infptr) {
--- 55,61 ----
{
cerr << this->peer_name_ << " disconnected from import port\n";
#if 0
! ComterpHandler::reactor_singleton()->cancel_timer (this);
#endif
this->peer ().close ();
if (_infptr) {
***************
*** 121,132 ****
addr.get_host_name (),
MAXHOSTNAMELEN + 1);
! if (IMPORT_REACTOR::instance ()->register_handler
(this, ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) can't register with reactor\n"), -1);
#if 0
! else if (IMPORT_REACTOR::instance ()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (10),
--- 122,133 ----
addr.get_host_name (),
MAXHOSTNAMELEN + 1);
! if (ComterpHandler::reactor_singleton()->register_handler
(this, ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) can't register with reactor\n"), -1);
#if 0
! else if (ComterpHandler::reactor_singleton()->schedule_timer
(this,
(const void *) this,
ACE_Time_Value (10),
Index: OverlayUnidraw/aceimport.h
diff -c OverlayUnidraw/aceimport.h:1.1 OverlayUnidraw/aceimport.h:1.2
*** OverlayUnidraw/aceimport.h:1.1 Fri Jan 9 11:44:52 2004
--- src/OverlayUnidraw/aceimport.h Fri Jan 30 11:12:43 2004
***************
*** 33,38 ****
--- 33,39 ----
#include <ace/Singleton.h>
#include <ace/Svc_Handler.h>
#include <ace/SOCK_Acceptor.h>
+ #include <ace/Test_and_Set.h>
class OvImportCmd;
#include <fstream.h>
***************
*** 72,81 ****
istream* _inptr; // associated input stream
FILE* _infptr; // associated FILE*
};
-
- //: a Reactor Singleton.
- typedef ACE_Singleton<ACE_Reactor, ACE_Null_Mutex>
- IMPORT_REACTOR;
//: an ACE_Test_and_Set Singleton for Ctrl-C.
typedef ACE_Singleton<ACE_Test_and_Set <ACE_Null_Mutex,
sig_atomic_t>, ACE_Null_Mutex>
--- 73,78 ----
*** /dev/null Fri Jan 30 11:13:08 PST 2004
--- patches/ivtools-040130-johnston-006
*************** patches/ivtools-040130-johnston-006
*** 0 ****
--- 1 ----
+ ivtools-040130-johnston-006
|
|
From: <ivt...@li...> - 2004-01-30 19:15:16
|
Patch: ivtools-040129-johnston-005
For: ivtools-1.1.2
Author: joh...@us...
Subject: fix configure script, add qt option, other minor fixes
Requires:
This is an intermediate patch to ivtools-1.1.2. 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:
- minor fix to ParamList::urltest
- make ComValue printing insert "(null)" when string pointer is null.
- eval func doc fix
- remove test for C++ include directory from configure script
(configure.in). This was troublesome, and was only being used for
"make depend", which no longer needed it.
- add configure test for Qt library.
- default -display to "localhost:0.0"
Index: Attribute/paramlist.c
diff -c Attribute/paramlist.c:1.1 Attribute/paramlist.c:1.2
*** Attribute/paramlist.c:1.1 Fri Jan 9 11:42:18 2004
--- src/Attribute/paramlist.c Thu Jan 29 10:51:46 2004
***************
*** 888,894 ****
boolean ParamList::urltest(const char* buf) {
if (!buf) return false;
! static boolean file_url_ok = bincheck("w3c") || bincheck("curl");
return
strncasecmp("http://", buf, 7)==0 ||
strncasecmp("ftp://", buf, 6)==0 ||
--- 888,894 ----
boolean ParamList::urltest(const char* buf) {
if (!buf) return false;
! static boolean file_url_ok = url_use_ok();
return
strncasecmp("http://", buf, 7)==0 ||
strncasecmp("ftp://", buf, 6)==0 ||
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.1 ComTerp/comvalue.c:1.2
*** ComTerp/comvalue.c:1.1 Fri Jan 9 11:42:26 2004
--- src/ComTerp/comvalue.c Thu Jan 29 10:51:49 2004
***************
*** 158,169 ****
case ComValue::SymbolType:
if (brief) {
if (svp->global_flag()) out << "global(";
! out << symbol_pntr( svp->symbol_ref());
if (svp->global_flag()) out << ")";
} else {
title = "symbol( ";
symbol = symbol_pntr( svp->symbol_ref() );
! out << title << symbol;
counter = strlen(title) + strlen(symbol);
while( ++counter < 32 ) out << ' ';
out << ") narg " << svp->narg() << " nkey " << svp->nkey() <<
--- 158,170 ----
case ComValue::SymbolType:
if (brief) {
if (svp->global_flag()) out << "global(";
! symbol = symbol_pntr(svp->symbol_ref());
! out << (symbol ? symbol : "(null)");
if (svp->global_flag()) out << ")";
} else {
title = "symbol( ";
symbol = symbol_pntr( svp->symbol_ref() );
! out << title << (symbol ? symbol : "(null)");
counter = strlen(title) + strlen(symbol);
while( ++counter < 32 ) out << ' ';
out << ") narg " << svp->narg() << " nkey " << svp->nkey() <<
Index: ComTerp/ctrlfunc.h
diff -c ComTerp/ctrlfunc.h:1.1 ComTerp/ctrlfunc.h:1.2
*** ComTerp/ctrlfunc.h:1.1 Fri Jan 9 11:42:26 2004
--- src/ComTerp/ctrlfunc.h Thu Jan 29 10:51:49 2004
***************
*** 97,103 ****
virtual void execute();
virtual const char* docstring() {
! return "str|lst=%s(cmdstr) -- evaluate string as commands,
optionally return symbol instead of nil"; }
};
--- 97,103 ----
virtual void execute();
virtual const char* docstring() {
! return "str|lst=%s(cmdstr :symret) -- evaluate string as
commands, optionally return symbol instead of nil"; }
};
Index: config_ivtools/config.defs.in
diff -c config_ivtools/config.defs.in:1.1
config_ivtools/config.defs.in:1.2
*** config_ivtools/config.defs.in:1.1 Fri Jan 9 11:46:46 2004
--- config/config.defs.in Thu Jan 29 10:52:21 2004
***************
*** 38,43 ****
--- 38,49 ----
#define IueLibDir @IUELIBS@
#endif
+ #if @QT_ENABLED@
+ #define QtDir @QT@
+ #define QtLibDir @QTLIBS@
+ #define QtIncDir @QTINCS@
+ #endif
+
#undef CCDriver
#define CCDriver @CXX@
Index: config_ivtools/config.mk
diff -c config_ivtools/config.mk:1.1 config_ivtools/config.mk:1.2
*** config_ivtools/config.mk:1.1 Fri Jan 9 11:46:46 2004
--- config/config.mk Thu Jan 29 10:52:21 2004
***************
*** 1,4 ****
! XCONFIGDIR = NONE/X11/config
ABSTOP = /Users/scott/src/ivtools-1.1
CPU = DARWIN
LIBSTDCPLUSPLUS2 = 0
--- 1,4 ----
! XCONFIGDIR = /usr/X11R6/lib/X11/config
ABSTOP = /Users/scott/src/ivtools-1.1
CPU = DARWIN
LIBSTDCPLUSPLUS2 = 0
Index: config_ivtools/gcc.def
diff -c config_ivtools/gcc.def:1.1 config_ivtools/gcc.def:1.2
*** config_ivtools/gcc.def:1.1 Fri Jan 9 11:46:46 2004
--- config/gcc.def Thu Jan 29 10:52:21 2004
***************
*** 2,16 ****
* Other definitions for gcc/g++.
*/
- GPLUSPLUS_INCLUDE_DIR = GPlusPlusIncludeDir
TOOL_INCLUDE_DIR = ToolIncludeDir
#ifndef DependCCFlags
#if 1 /* without -D__GNUG__ */
! #define DependCCFlags -w -DMAKEDEPEND $(CCDEFINES) $(CCINCLUDES)
-I$(GPLUSPLUS_INCLUDE_DIR) \
-I$(TOOL_INCLUDE_DIR) -UHAVE_ACE
#else /* with -D__GNUG__ */
! #define DependCCFlags -D__GNUG__ -DMAKEDEPEND $(CCDEFINES)
$(CCINCLUDES) -I$(GPLUSPLUS_INCLUDE_DIR) \
-I$(TOOL_INCLUDE_DIR) -UHAVE_ACE
#endif
#endif
--- 2,15 ----
* Other definitions for gcc/g++.
*/
TOOL_INCLUDE_DIR = ToolIncludeDir
#ifndef DependCCFlags
#if 1 /* without -D__GNUG__ */
! #define DependCCFlags -w -DMAKEDEPEND $(CCDEFINES) $(CCINCLUDES) \
-I$(TOOL_INCLUDE_DIR) -UHAVE_ACE
#else /* with -D__GNUG__ */
! #define DependCCFlags -D__GNUG__ -DMAKEDEPEND $(CCDEFINES)
$(CCINCLUDES) \
-I$(TOOL_INCLUDE_DIR) -UHAVE_ACE
#endif
#endif
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.1 config_ivtools/params.def:1.2
*** config_ivtools/params.def:1.1 Fri Jan 9 11:46:47 2004
--- config/params.def Thu Jan 29 10:52:21 2004
***************
*** 464,471 ****
#endif
#endif
#ifndef OtherCCDefines
! #define OtherCCDefines $(CLIPPOLY_CCDEFINES) $(ACE_CCDEFINES)
$(IUE_DEFINES)
#endif
CCDEFINES = CCDefines
--- 464,479 ----
#endif
#endif
+ #ifndef QtCCDefines
+ #ifdef QtDir
+ #define QtCCDefines /**/
+ #else
+ #define QtCCDefines /**/
+ #endif
+ #endif
+
#ifndef OtherCCDefines
! #define OtherCCDefines $(CLIPPOLY_CCDEFINES) $(ACE_CCDEFINES)
$(IUE_DEFINES) $(QT_DEFINES)
#endif
CCDEFINES = CCDefines
***************
*** 480,485 ****
--- 488,494 ----
CLIPPOLY_CCDEFINES = ClipPolyCCDefines
ACE_CCDEFINES = AceCCDefines
IUE_CCDEFINES = IueCCDefines
+ QT_CCDEFINES = QtCCDefines
/*
* Define the includes passed to the CC driver when we compile a C++
file.
***************
*** 542,549 ****
#endif
#endif
#ifndef OtherCCIncludes
! #define OtherCCIncludes $(CLIPPOLY_CCINCLUDES) $(ACE_CCINCLUDES)
$(IUE_CCINCLUDES)
#endif
CCINCLUDES = CCIncludes
--- 551,566 ----
#endif
#endif
+ #ifndef QtCCIncludes
+ #ifdef QtDir
+ #define QtCCIncludes -I$(QTINCS)
+ #else
+ #define QtCCIncludes /**/
+ #endif
+ #endif
+
#ifndef OtherCCIncludes
! #define OtherCCIncludes $(CLIPPOLY_CCINCLUDES) $(ACE_CCINCLUDES)
$(IUE_CCINCLUDES) $(QT_CCINCLUDES)
#endif
CCINCLUDES = CCIncludes
***************
*** 559,564 ****
--- 576,582 ----
CLIPPOLY_CCINCLUDES = ClipPolyCCIncludes
ACE_CCINCLUDES = AceCCIncludes
IUE_CCINCLUDES = IueCCIncludes
+ QT_CCINCLUDES = QtCCIncludes
#ifdef ClipPolyDir
CLIPPOLYDIR = ClipPolyDir
#endif
***************
*** 571,576 ****
--- 589,597 ----
#ifdef IueDir
IUEDIR = IueDir
#endif
+ #ifdef QtDir
+ QTDIR = QtDir
+ #endif
/*
* Define the flags passed to the CC driver when we link a C++
program.
***************
*** 980,987 ****
#define IueLibBase libIUE.so /* only for installing symbolic link */
#endif
#ifndef OtherCCLdLibs
! #define OtherCCLdLibs $(CLIPPOLY_CCLDLIBS) $(ACE_CCLDLIBS)
$(IUE_CCLDLIBS)
#endif
#ifndef SharedCCLdLibs
--- 1001,1020 ----
#define IueLibBase libIUE.so /* only for installing symbolic link */
#endif
+ #ifndef QtLibDir
+ #ifdef QtDir
+ #define QtLibDir $(QTLIBS)
+ #else
+ #define QtLibDir /**/
+ #endif
+ #endif
+
+ #ifndef QtLibBase
+ #define QtLibBase libQt.so /* only for installing symbolic link */
+ #endif
+
#ifndef OtherCCLdLibs
! #define OtherCCLdLibs $(CLIPPOLY_CCLDLIBS) $(ACE_CCLDLIBS)
$(IUE_CCLDLIBS) $(QT_CCLDLIBS)
#endif
#ifndef SharedCCLdLibs
***************
*** 1009,1014 ****
--- 1042,1050 ----
IUE_CCLDLIBS = IueCCLdLibs
IUELIBDIR = IueLibDir
IUELIBBASE = IueLibBase
+ QT_CCLDLIBS = QtCCLdLibs
+ QTLIBDIR = QtLibDir
+ QTLIBBASE = QtLibBase
/*
* Define how to install a program, library, header, man page, or
data file.
Index: include_std/strstream.h
diff -c include_std/strstream.h:1.1 include_std/strstream.h:removed
*** include_std/strstream.h:1.1 Fri Jan 9 11:46:11 2004
--- src/include/ivstd/strstream.h Thu Jan 29 10:52:17 2004
***************
*** 1,6 ****
- #include <strstream>
- using std::strstream;
- using std::istrstream;
- using std::ostrstream;
- using std::strstreambuf;
-
--- 0 ----
Index: src_interviews/session.c
diff -c src_interviews/session.c:1.1 src_interviews/session.c:1.2
*** src_interviews/session.c:1.1 Fri Jan 9 11:42:39 2004
--- src/InterViews/session.c Thu Jan 29 10:51:51 2004
***************
*** 725,731 ****
} else if (style_->find_attribute(String("display"), name)) {
default_ = Display::open(name);
} else {
! default_ = Display::open();
}
if (default_ == nil) {
if (name.length() > 0) {
--- 725,731 ----
} else if (style_->find_attribute(String("display"), name)) {
default_ = Display::open(name);
} else {
! default_ = Display::open("localhost:0.0");
}
if (default_ == nil) {
if (name.length() > 0) {
*** /dev/null Thu Jan 29 10:52:24 PST 2004
--- patches/ivtools-040129-johnston-005
*************** patches/ivtools-040129-johnston-005
*** 0 ****
--- 1 ----
+ ivtools-040129-johnston-005
|
|
From: <ivt...@li...> - 2003-12-08 19:22:15
|
Patch: ivtools-031208-johnston-004
For: ivtools-1.1.1
Author: joh...@us...
Subject: patch leading up to ivtools-1.1.2
Requires:
This is an intermediate patch to ivtools-1.1.1. 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:
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.2 config_ivtools/params.def:1.3
*** config_ivtools/params.def:1.2 Mon Nov 17 22:24:27 2003
--- config/params.def Mon Dec 8 11:21:44 2003
***************
*** 27,33 ****
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.1
#endif
RELEASE = Release
--- 27,33 ----
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.2
#endif
RELEASE = Release
***************
*** 36,42 ****
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.1
#endif
VERSION = Version
--- 36,42 ----
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.2
#endif
VERSION = Version
Index: include_std/version.h
diff -c include_std/version.h:1.1 include_std/version.h:1.2
*** include_std/version.h:1.1 Wed Oct 29 13:44:18 2003
--- src/include/ivstd/version.h Mon Dec 8 11:21:30 2003
***************
*** 1,3 ****
! #define IvtoolsVersion 1.1.0
! #define VersionString "1.1.0"
! #define ReleaseString "ivtools-1.1.0"
--- 1,3 ----
! #define IvtoolsVersion 1.1.2
! #define VersionString "1.1.2"
! #define ReleaseString "ivtools-1.1.2"
Index: top_ivtools/CHANGES
diff -c top_ivtools/CHANGES:1.2 top_ivtools/CHANGES:1.3
*** top_ivtools/CHANGES:1.2 Mon Dec 8 11:09:29 2003
--- ./CHANGES Mon Dec 8 11:20:21 2003
***************
*** 1,3 ****
--- 1,12 ----
+ December December 8th, 2003 ivtools-1.1.2
+
+ - fixes a problem with using gcc-2.95 to compile ivtools-1.1.*. It
+ avoids the use of a local copy of strstream.h, which worked fine for
+ gcc-3.3, but not for gcc-2.9.5. Instead it uses strstream directly,
+ and appends istrstream and ostrstream with the std:: using prefix.
+ Fix contributed by Mark Davies.
+
+
November 16th, 2003 ivtools-1.1.1
- add missing src/include/ivstd/strstream.h to MANIFEST file and tar file
Index: top_ivtools/INSTALL
diff -c top_ivtools/INSTALL:1.2 top_ivtools/INSTALL:1.3
*** top_ivtools/INSTALL:1.2 Mon Dec 8 11:09:29 2003
--- ./INSTALL Mon Dec 8 11:20:21 2003
***************
*** 1,7 ****
! INSTALL for ivtools-1.1.1
! Instructions for building ivtools-1.1 from source, the short version:
./configure
make
--- 1,7 ----
! INSTALL for ivtools-1.1
! Instructions for building ivtools-1.1.2 from source, the short version:
./configure
make
***************
*** 10,16 ****
And if that doesn't work...
! Instructions for building ivtools-1.1 from source, the long version:
0. Compilation Environment
--- 10,16 ----
And if that doesn't work...
! Instructions for building ivtools-1.1.2 from source, the long version:
0. Compilation Environment
Index: top_ivtools/README
diff -c top_ivtools/README:1.2 top_ivtools/README:1.3
*** top_ivtools/README:1.2 Mon Dec 8 11:09:29 2003
--- ./README Mon Dec 8 11:20:21 2003
***************
*** 2,8 ****
README for ivtools 1.1
! This directory contains a release of ivtools 1.1.1. 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.1
! This directory contains a release of ivtools 1.1.2. 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.2 top_ivtools/VERSION:1.3
*** top_ivtools/VERSION:1.2 Mon Dec 8 11:09:29 2003
--- ./VERSION Mon Dec 8 11:20:22 2003
***************
*** 1 ****
! Release 1.1.1
--- 1 ----
! Release 1.1.2
*** /dev/null Mon Dec 8 11:21:57 PST 2003
--- patches/ivtools-031208-johnston-004
*************** patches/ivtools-031208-johnston-004
*** 0 ****
--- 1 ----
+ ivtools-031208-johnston-004
|
|
From: <ivt...@li...> - 2003-12-08 19:19:36
|
Patch: ivtools-031208-johnston-003
For: ivtools-1.1.1
Author: joh...@us...
Subject: fix problem with strstream.h
Requires:
This is an intermediate patch to ivtools-1.1. 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:
- this patch fixes a problem with using gcc-2.95 to compile
ivtools-1.1.1. It avoids the use of a local copy of strstream.h,
which worked fine for gcc-3.3, but not for gcc-2.9.5. Instead it uses
strstream directly, and appends istrstream and ostrstream with the
std:: using prefix. Fix contributed by Mark Davies.
Index: AttrGlyph/attredit.c
diff -c AttrGlyph/attredit.c:1.1 AttrGlyph/attredit.c:1.2
*** AttrGlyph/attredit.c:1.1 Wed Oct 29 13:35:30 2003
--- src/AttrGlyph/attredit.c Mon Dec 8 10:57:38 2003
***************
*** 41,47 ****
#include <IVGlyph/textedit.h>
! #include <strstream.h>
#include <string.h>
#if __GNUC__==2 && __GNUC_MINOR__<=7
#else
--- 41,47 ----
#include <IVGlyph/textedit.h>
! #include <strstream>
#include <string.h>
#if __GNUC__==2 && __GNUC_MINOR__<=7
#else
***************
*** 139,145 ****
#else
vbuf.push_back(' ');
#endif
! strstream valstr;
valstr << *attr->Value() << '\0';
const char* val = valstr.str();
int vallen = val ? strlen(val) : 0;
--- 139,145 ----
#else
vbuf.push_back(' ');
#endif
! std::strstream valstr;
valstr << *attr->Value() << '\0';
const char* val = valstr.str();
int vallen = val ? strlen(val) : 0;
Index: Attribute/paramlist.c
diff -c Attribute/paramlist.c:1.1 Attribute/paramlist.c:1.2
*** Attribute/paramlist.c:1.1 Wed Oct 29 13:24:38 2003
--- src/Attribute/paramlist.c Mon Dec 8 10:57:07 2003
***************
*** 39,45 ****
#include <stdio.h>
#include <string.h>
#ifndef __APPLE__
! #include <strstream.h>
#endif
/*****************************************************************************/
--- 39,45 ----
#include <stdio.h>
#include <string.h>
#ifndef __APPLE__
! #include <strstream>
#endif
/*****************************************************************************/
Index: ComGlyph/attrdialog.c
diff -c ComGlyph/attrdialog.c:1.1 ComGlyph/attrdialog.c:1.2
*** ComGlyph/attrdialog.c:1.1 Wed Oct 29 13:35:37 2003
--- src/ComGlyph/attrdialog.c Mon Dec 8 10:57:40 2003
***************
*** 49,55 ****
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream.h>
/*****************************************************************************/
--- 49,55 ----
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream>
/*****************************************************************************/
***************
*** 186,192 ****
const int bufsiz = BUFSIZ;
char buf[bufsiz];
! strstream outstr(buf, bufsiz);
outstr << retval;
outstr.put('\0');
result_->textvalue(buf);
--- 186,192 ----
const int bufsiz = BUFSIZ;
char buf[bufsiz];
! std::strstream outstr(buf, bufsiz);
outstr << retval;
outstr.put('\0');
result_->textvalue(buf);
Index: ComGlyph/comtextview.c
diff -c ComGlyph/comtextview.c:1.1 ComGlyph/comtextview.c:1.2
*** ComGlyph/comtextview.c:1.1 Wed Oct 29 13:35:37 2003
--- src/ComGlyph/comtextview.c Mon Dec 8 10:57:40 2003
***************
*** 49,55 ****
#include <ComTerp/comvalue.h>
#include <ctype.h>
#include <iostream.h>
! #include <strstream.h>
#include <string.h>
#define XK_MISCELLANY /* to get the keysym's we need */
--- 49,55 ----
#include <ComTerp/comvalue.h>
#include <ctype.h>
#include <iostream.h>
! #include <strstream>
#include <string.h>
#define XK_MISCELLANY /* to get the keysym's we need */
***************
*** 232,238 ****
#else
ComValue result(comterp()->pop_stack());
#endif
! ostream* out = new strstream();
if (*comterp()->errmsg()) {
*out << comterp()->errmsg() << "\n";
} else {
--- 232,238 ----
#else
ComValue result(comterp()->pop_stack());
#endif
! ostream* out = new std::strstream();
if (*comterp()->errmsg()) {
*out << comterp()->errmsg() << "\n";
} else {
***************
*** 248,254 ****
}
out->put('\0');
out->flush();
! strstream* sout = (strstream*)out;
insert_string(sout->str(), strlen(sout->str()));
comterp()->brief(old_brief);
delete out;
--- 248,254 ----
}
out->put('\0');
out->flush();
! std::strstream* sout = (std::strstream*)out;
insert_string(sout->str(), strlen(sout->str()));
comterp()->brief(old_brief);
delete out;
Index: ComGlyph/terpdialog.c
diff -c ComGlyph/terpdialog.c:1.1 ComGlyph/terpdialog.c:1.2
*** ComGlyph/terpdialog.c:1.1 Wed Oct 29 13:35:37 2003
--- src/ComGlyph/terpdialog.c Mon Dec 8 10:57:40 2003
***************
*** 49,55 ****
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream.h>
/*****************************************************************************/
--- 49,55 ----
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream>
/*****************************************************************************/
***************
*** 446,452 ****
} else {
char buf[BUFSIZ];
buf[0] = '\0';
! ostrstream ostr(buf, BUFSIZ);
ostr << retval;
ostr << '\0';
--- 446,452 ----
} else {
char buf[BUFSIZ];
buf[0] = '\0';
! std::ostrstream ostr(buf, BUFSIZ);
ostr << retval;
ostr << '\0';
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2
*** ComTerp/comterp.c:1.1 Wed Oct 29 13:25:26 2003
--- src/ComTerp/comterp.c Mon Dec 8 10:57:10 2003
***************
*** 58,64 ****
#include <ctype.h>
#include <iostream.h>
#include <string.h>
! #include <strstream.h>
#include <unistd.h>
#if __GNUC__>=3
#include <fstream.h>
--- 58,64 ----
#include <ctype.h>
#include <iostream.h>
#include <string.h>
! #include <strstream>
#include <unistd.h>
#if __GNUC__>=3
#include <fstream.h>
Index: ComTerp/debugfunc.c
diff -c ComTerp/debugfunc.c:1.1 ComTerp/debugfunc.c:1.2
*** ComTerp/debugfunc.c:1.1 Wed Oct 29 13:25:27 2003
--- src/ComTerp/debugfunc.c Mon Dec 8 10:57:10 2003
***************
*** 26,32 ****
#include <ComTerp/debugfunc.h>
#include <ComTerp/comterpserv.h>
! #include <strstream.h>
#if __GNUC__==2 && __GNUC_MINOR__<=7
#else
#include <vector.h>
--- 26,32 ----
#include <ComTerp/debugfunc.h>
#include <ComTerp/comterpserv.h>
! #include <strstream>
#if __GNUC__==2 && __GNUC_MINOR__<=7
#else
#include <vector.h>
***************
*** 76,88 ****
comterp()->npause()++;
if (msgstrv.is_string()) {
! ostrstream sbuf1_s;
sbuf1_s << (stepfunc() ? "step(" : "pause(") <<
comterp()->npause() << "): "
<< msgstrv.string_ptr() << "\n";
sbuf1_s.put('\0');
cerr << sbuf1_s.str();
}
! ostrstream sbuf2_s;
sbuf2_s << (stepfunc() ? "step(" : "pause(") <<
comterp()->npause() << "): enter command or press C/R to continue\n";
sbuf2_s.put('\0');
cerr << sbuf2_s.str();
--- 76,88 ----
comterp()->npause()++;
if (msgstrv.is_string()) {
! std::ostrstream sbuf1_s;
sbuf1_s << (stepfunc() ? "step(" : "pause(") <<
comterp()->npause() << "): "
<< msgstrv.string_ptr() << "\n";
sbuf1_s.put('\0');
cerr << sbuf1_s.str();
}
! std::ostrstream sbuf2_s;
sbuf2_s << (stepfunc() ? "step(" : "pause(") <<
comterp()->npause() << "): enter command or press C/R to continue\n";
sbuf2_s.put('\0');
cerr << sbuf2_s.str();
***************
*** 149,155 ****
}
} while (cvect[0] != '\n');
comterp()->pop_servstate();
! ostrstream sbuf_e;
sbuf_e << (stepfunc() ? "end of step(" : "end of pause(") <<
comterp()->npause()-- << ")\n";
sbuf_e.put('\0');
cerr << sbuf_e.str();
--- 149,155 ----
}
} while (cvect[0] != '\n');
comterp()->pop_servstate();
! std::ostrstream sbuf_e;
sbuf_e << (stepfunc() ? "end of step(" : "end of pause(") <<
comterp()->npause()-- << ")\n";
sbuf_e.put('\0');
cerr << sbuf_e.str();
Index: ComTerp/helpfunc.c
diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2
*** ComTerp/helpfunc.c:1.1 Wed Oct 29 13:25:27 2003
--- src/ComTerp/helpfunc.c Mon Dec 8 10:57:10 2003
***************
*** 34,40 ****
#include <OS/math.h>
#include <iostream.h>
! #include <strstream.h>
#if __GNUC__>=3
#include <fstream.h>
#endif
--- 34,40 ----
#include <OS/math.h>
#include <iostream.h>
! #include <strstream>
#if __GNUC__>=3
#include <fstream.h>
#endif
***************
*** 127,133 ****
reset_stack();
! strstreambuf sbuf;
#if __GNUC__<3
filebuf fbuf;
if (comterp()->handler()) {
--- 127,133 ----
reset_stack();
! std::strstreambuf sbuf;
#if __GNUC__<3
filebuf fbuf;
if (comterp()->handler()) {
Index: ComTerp/iofunc.c
diff -c ComTerp/iofunc.c:1.1 ComTerp/iofunc.c:1.2
*** ComTerp/iofunc.c:1.1 Wed Oct 29 13:25:28 2003
--- src/ComTerp/iofunc.c Mon Dec 8 10:57:10 2003
***************
*** 31,37 ****
#include <Attribute/attrlist.h>
#include <OS/math.h>
#include <iostream.h>
! #include <strstream.h>
#if __GNUC__>=3
#include <fstream.h>
#endif
--- 31,37 ----
#include <Attribute/attrlist.h>
#include <OS/math.h>
#include <iostream.h>
! #include <strstream>
#if __GNUC__>=3
#include <fstream.h>
#endif
***************
*** 73,79 ****
} else
fbuf->attach(fileno(errflag.is_false() ? stdout : stderr));
} else {
! strmbuf = new strstreambuf();
}
#else
streambuf* strmbuf = nil;
--- 73,79 ----
} else
fbuf->attach(fileno(errflag.is_false() ? stdout : stderr));
} else {
! strmbuf = new std::strstreambuf();
}
#else
streambuf* strmbuf = nil;
***************
*** 87,93 ****
fbuf = new fileptr_filebuf(errflag.is_false() ? stdout :
stderr, ios_base::out);
strmbuf = fbuf;
} else
! strmbuf = new strstreambuf();
#endif
ostream out(strmbuf);
--- 87,93 ----
fbuf = new fileptr_filebuf(errflag.is_false() ? stdout :
stderr, ios_base::out);
strmbuf = fbuf;
} else
! strmbuf = new std::strstreambuf();
#endif
ostream out(strmbuf);
***************
*** 177,187 ****
if (stringflag.is_true() || strflag.is_true()) {
out << '\0';
! ComValue retval(((strstreambuf*)strmbuf)->str());
push_stack(retval);
} else if (symbolflag.is_true() || symflag.is_true()) {
out << '\0';
! int symbol_id = symbol_add(((strstreambuf*)strmbuf)->str());
ComValue retval(symbol_id, ComValue::SymbolType);
push_stack(retval);
}
--- 177,187 ----
if (stringflag.is_true() || strflag.is_true()) {
out << '\0';
! ComValue retval(((std::strstreambuf*)strmbuf)->str());
push_stack(retval);
} else if (symbolflag.is_true() || symflag.is_true()) {
out << '\0';
! int symbol_id = symbol_add(((std::strstreambuf*)strmbuf)->str());
ComValue retval(symbol_id, ComValue::SymbolType);
push_stack(retval);
}
Index: ComUnidraw/comeditor.c
diff -c ComUnidraw/comeditor.c:1.1 ComUnidraw/comeditor.c:1.2
*** ComUnidraw/comeditor.c:1.1 Wed Oct 29 13:37:58 2003
--- src/ComUnidraw/comeditor.c Mon Dec 8 10:57:52 2003
***************
*** 58,64 ****
#include <Attribute/attrlist.h>
! #include <strstream.h>
#include <string.h>
/*****************************************************************************/
--- 58,64 ----
#include <Attribute/attrlist.h>
! #include <strstream>
#include <string.h>
/*****************************************************************************/
***************
*** 231,237 ****
if(!whiteboard())
OverlayEditor::ExecuteCmd(cmd);
else {
! ostrstream sbuf;
boolean oldflag = OverlayScript::ptlist_parens();
OverlayScript::ptlist_parens(false);
switch (cmd->GetClassId()) {
--- 231,237 ----
if(!whiteboard())
OverlayEditor::ExecuteCmd(cmd);
else {
! std::ostrstream sbuf;
boolean oldflag = OverlayScript::ptlist_parens();
OverlayScript::ptlist_parens(false);
switch (cmd->GetClassId()) {
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.1 ComUnidraw/unifunc.c:1.2
*** ComUnidraw/unifunc.c:1.1 Wed Oct 29 13:38:01 2003
--- src/ComUnidraw/unifunc.c Mon Dec 8 10:57:52 2003
***************
*** 56,62 ****
#include <ComTerp/comvalue.h>
#include <Attribute/attrlist.h>
#include <stdio.h>
! #include <strstream.h>
#include <unistd.h>
#if __GNUC__>=3
#include <fstream.h>
--- 56,62 ----
#include <ComTerp/comvalue.h>
#include <Attribute/attrlist.h>
#include <stdio.h>
! #include <strstream>
#include <unistd.h>
#if __GNUC__>=3
#include <fstream.h>
***************
*** 494,500 ****
#endif
ostream* out;
if (string.is_true()||str.is_true())
! out = new strstream();
else
#if __GNUC__<3
out = new ostream(&fbuf);
--- 494,500 ----
#endif
ostream* out;
if (string.is_true()||str.is_true())
! out = new std::strstream();
else
#if __GNUC__<3
out = new ostream(&fbuf);
***************
*** 557,563 ****
if (string.is_true()||str.is_true()) {
*out << '\0'; out->flush();
! ComValue retval(((strstream*)out)->str());
push_stack(retval);
}
delete out;
--- 557,563 ----
if (string.is_true()||str.is_true()) {
*out << '\0'; out->flush();
! ComValue retval(((std::strstream*)out)->str());
push_stack(retval);
}
delete out;
***************
*** 652,665 ****
tv->insert_string((char*)msgstrv.string_ptr(),
strlen(msgstrv.string_ptr()));
tv->insert_char('\n');
}
! ostrstream sbuf_s;
sbuf_s << "pause(" << comterpserv()->npause() << "): enter
command or press C/R to continue\n";
sbuf_s.put('\0');
tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str()));
comterpserv()->push_servstate();
unidraw->Run();
comterpserv()->pop_servstate();
! ostrstream sbuf_e;
sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n";
sbuf_e.put('\0');
tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str()));
--- 652,665 ----
tv->insert_string((char*)msgstrv.string_ptr(),
strlen(msgstrv.string_ptr()));
tv->insert_char('\n');
}
! std::ostrstream sbuf_s;
sbuf_s << "pause(" << comterpserv()->npause() << "): enter
command or press C/R to continue\n";
sbuf_s.put('\0');
tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str()));
comterpserv()->push_servstate();
unidraw->Run();
comterpserv()->pop_servstate();
! std::ostrstream sbuf_e;
sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n";
sbuf_e.put('\0');
tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str()));
Index: GraphUnidraw/nodecomp.c
diff -c GraphUnidraw/nodecomp.c:1.1 GraphUnidraw/nodecomp.c:1.2
*** GraphUnidraw/nodecomp.c:1.1 Wed Oct 29 13:38:53 2003
--- src/GraphUnidraw/nodecomp.c Mon Dec 8 10:57:55 2003
***************
*** 78,84 ****
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream.h>
FullGraphic* NodeView::_nv_gs = nil;
--- 78,84 ----
#include <iostream.h>
#include <stdio.h>
#include <string.h>
! #include <strstream>
FullGraphic* NodeView::_nv_gs = nil;
***************
*** 602,608 ****
GetComTerp();
boolean old_brief = comterp->brief();
comterp->brief(true);
! ostrstream outstr;
NodeComp* node;
int incnt = 1;
while (node = NodeIn(incnt)) {
--- 602,608 ----
GetComTerp();
boolean old_brief = comterp->brief();
comterp->brief(true);
! std::ostrstream outstr;
NodeComp* node;
int incnt = 1;
while (node = NodeIn(incnt)) {
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.1 OverlayUnidraw/ovimport.c:1.2
*** OverlayUnidraw/ovimport.c:1.1 Wed Oct 29 13:37:33 2003
--- src/OverlayUnidraw/ovimport.c Mon Dec 8 10:57:47 2003
***************
*** 100,106 ****
#include <ctype.h>
#include <fstream.h>
#include <string.h>
! #include <strstream.h>
#include <fcntl.h>
#include <errno.h>
#include <phold.h>
--- 100,106 ----
#include <ctype.h>
#include <fstream.h>
#include <string.h>
! #include <strstream>
#include <fcntl.h>
#include <errno.h>
#include <phold.h>
***************
*** 246,252 ****
class ReadPpmIterator {
public:
ReadPpmIterator(OverlayRaster*);
! void getPixels(strstream&);
OverlayRaster* raster() const;
u_long xcur() { return _xcur; }
u_long ycur() { return _ycur; }
--- 246,252 ----
class ReadPpmIterator {
public:
ReadPpmIterator(OverlayRaster*);
! void getPixels(std::strstream&);
OverlayRaster* raster() const;
u_long xcur() { return _xcur; }
u_long ycur() { return _ycur; }
***************
*** 282,288 ****
{
}
! void ReadPpmIterator::getPixels(strstream& in) {
// cerr << "pcount: " << in.pcount() << "\ttellg: " << in.tellg() << endl;
while((in.pcount() - in.tellg()) >= 3 && in.good() && !in.eof()) {
u_char r, g, b;
--- 282,288 ----
{
}
! void ReadPpmIterator::getPixels(std::strstream& in) {
// cerr << "pcount: " << in.pcount() << "\ttellg: " << in.tellg() << endl;
while((in.pcount() - in.tellg()) >= 3 && in.good() && !in.eof()) {
u_char r, g, b;
***************
*** 357,363 ****
ReadPpmIterator* _itr;
! ostrstream _save;
};
HandlerList ReadImageHandler::_handlers;
--- 357,363 ----
ReadPpmIterator* _itr;
! std::ostrstream _save;
};
HandlerList ReadImageHandler::_handlers;
***************
*** 442,448 ****
int ReadImageHandler::process(const char* newdat, int len) {
! strstream in;
in.write(_save.str(), _save.tellp());
_save.freeze(0);
in.write(newdat, len);
--- 442,448 ----
int ReadImageHandler::process(const char* newdat, int len) {
! std::strstream in;
in.write(_save.str(), _save.tellp());
_save.freeze(0);
in.write(newdat, len);
***************
*** 452,458 ****
"^[ \f\n\r\t\v]*[0-9]+[ \f\n\r\t\v]+[0-9]+[ \f\n\r\t\v]+[0-9]+"
);
! ostrstream tmp; // need to placate Regexp :-(
tmp.write(in.str(), in.pcount());
in.freeze(0);
int pos = endOfHeader.Search(
--- 452,458 ----
"^[ \f\n\r\t\v]*[0-9]+[ \f\n\r\t\v]+[0-9]+[ \f\n\r\t\v]+[0-9]+"
);
! std::ostrstream tmp; // need to placate Regexp :-(
tmp.write(in.str(), in.pcount());
in.freeze(0);
int pos = endOfHeader.Search(
Index: OverlayUnidraw/ovipcmds.c
diff -c OverlayUnidraw/ovipcmds.c:1.1 OverlayUnidraw/ovipcmds.c:1.2
*** OverlayUnidraw/ovipcmds.c:1.1 Wed Oct 29 13:37:34 2003
--- src/OverlayUnidraw/ovipcmds.c Mon Dec 8 10:57:47 2003
***************
*** 76,82 ****
#include <stdlib.h>
#include <string.h>
#include <iostream.h>
! #include <strstream.h>
RasterTerp::RasterTerp(Editor* ed) : _editor(ed) {
--- 76,82 ----
#include <stdlib.h>
#include <string.h>
#include <iostream.h>
! #include <strstream>
RasterTerp::RasterTerp(Editor* ed) : _editor(ed) {
***************
*** 639,645 ****
"Enter min and max for linear scaling of gray values",
"0.0 1.0");
if (newminmax) {
! istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
--- 639,645 ----
"Enter min and max for linear scaling of gray values",
"0.0 1.0");
if (newminmax) {
! std::istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
***************
*** 731,737 ****
char* newminmax = StrEditDialog::post
(GetEditor()->GetWindow(), message, range);
if (newminmax) {
! istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
--- 731,737 ----
char* newminmax = StrEditDialog::post
(GetEditor()->GetWindow(), message, range);
if (newminmax) {
! std::istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
***************
*** 815,821 ****
"Enter min and max for logarithmic scaling of gray values",
"0.0 1.0");
if (newminmax) {
! istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
--- 815,821 ----
"Enter min and max for logarithmic scaling of gray values",
"0.0 1.0");
if (newminmax) {
! std::istrstream in(newminmax);
float fmin, fmax;
in >> fmin >> fmax;
if (in.good()) {
Index: OverlayUnidraw/ovprecise.c
diff -c OverlayUnidraw/ovprecise.c:1.1 OverlayUnidraw/ovprecise.c:1.2
*** OverlayUnidraw/ovprecise.c:1.1 Wed Oct 29 13:37:35 2003
--- src/OverlayUnidraw/ovprecise.c Mon Dec 8 10:57:47 2003
***************
*** 39,45 ****
#include <InterViews/window.h>
#include <stdio.h>
#include <string.h>
! #include <strstream.h>
/*****************************************************************************/
--- 39,45 ----
#include <InterViews/window.h>
#include <stdio.h>
#include <string.h>
! #include <strstream>
/*****************************************************************************/
***************
*** 90,96 ****
_default_enumval = cur_unit;
if (movestr) {
! istrstream in(movestr);
float xmove = 0, ymove = 0;
in >> xmove >> ymove;
--- 90,96 ----
_default_enumval = cur_unit;
if (movestr) {
! std::istrstream in(movestr);
float xmove = 0, ymove = 0;
in >> xmove >> ymove;
***************
*** 135,141 ****
"Enter X and Y scaling:",
default_scalestr);
if (scalestr) {
! istrstream in(scalestr);
float xscale = 0.0, yscale = 0.0;
in >> xscale >> yscale;
if (xscale !=0.0 && yscale != 0.0) {
--- 135,141 ----
"Enter X and Y scaling:",
default_scalestr);
if (scalestr) {
! std::istrstream in(scalestr);
float xscale = 0.0, yscale = 0.0;
in >> xscale >> yscale;
if (xscale !=0.0 && yscale != 0.0) {
***************
*** 173,179 ****
"Enter rotation in degrees:",
default_rotatestr);
if (rotatestr) {
! istrstream in(rotatestr);
float angle = 0.0;
in >> angle;
if (angle!=0.0) {
--- 173,179 ----
"Enter rotation in degrees:",
default_rotatestr);
if (rotatestr) {
! std::istrstream in(rotatestr);
float angle = 0.0;
in >> angle;
if (angle!=0.0) {
***************
*** 218,224 ****
"Enter width and height of page:",
default_pagestr);
if (pagestr) {
! istrstream in(pagestr);
int xpage = 0, ypage = 0;
in >> xpage >> ypage;
if (xpage !=0 && ypage != 0) {
--- 218,224 ----
"Enter width and height of page:",
default_pagestr);
if (pagestr) {
! std::istrstream in(pagestr);
int xpage = 0, ypage = 0;
in >> xpage >> ypage;
if (xpage !=0 && ypage != 0) {
***************
*** 256,262 ****
"Enter brush width in pixels:",
default_widthstr);
if (widthstr) {
! istrstream in(widthstr);
float width = 0;
in >> width;
if (width>=0.0) {
--- 256,262 ----
"Enter brush width in pixels:",
default_widthstr);
if (widthstr) {
! std::istrstream in(widthstr);
float width = 0;
in >> width;
if (width>=0.0) {
Index: src_x11/xdrag.c
diff -c src_x11/xdrag.c:1.1 src_x11/xdrag.c:1.2
*** src_x11/xdrag.c:1.1 Wed Oct 29 13:27:20 2003
--- src/IV-X11/xdrag.c Mon Dec 8 10:57:16 2003
***************
*** 41,47 ****
#include <OS/math.h>
#include <OS/types.h>
#include <string.h>
! #include <strstream.h>
// how is this done portably? it is used to generate a name unique to
// this process.
--- 41,47 ----
#include <OS/math.h>
#include <OS/types.h>
#include <string.h>
! #include <strstream>
// how is this done portably? it is used to generate a name unique to
// this process.
***************
*** 129,135 ****
Atom property = None;
if (length != 0) {
char buffer[256];
! ostrstream name(buffer, 256);
name << dragName << "_" << Host::name() << "_" << getpid() << "_" <<
dropUid++ << '\0';
property = XInternAtom(display, name.str(), False);
--- 129,135 ----
Atom property = None;
if (length != 0) {
char buffer[256];
! std::ostrstream name(buffer, 256);
name << dragName << "_" << Host::name() << "_" << getpid() << "_" <<
dropUid++ << '\0';
property = XInternAtom(display, name.str(), False);
Index: Unidraw/catalog.c
diff -c Unidraw/catalog.c:1.1 Unidraw/catalog.c:1.2
*** Unidraw/catalog.c:1.1 Wed Oct 29 13:36:24 2003
--- src/Unidraw/catalog.c Mon Dec 8 10:57:42 2003
***************
*** 63,69 ****
#include <stdlib.h>
#include <string.h>
#include <stream.h>
! #include <strstream.h>
#ifdef SYSV
#include <OS/types.h>
#include <unistd.h>
--- 63,69 ----
#include <stdlib.h>
#include <string.h>
#include <stream.h>
! #include <strstream>
#ifdef SYSV
#include <OS/types.h>
#include <unistd.h>
***************
*** 1660,1666 ****
}
} else {
! istrstream in(definition, strlen(definition) + 1);
int data[patternHeight];
int i;
for (i = 0; !in.eof() && in.good() && i < patternHeight; i++) {
--- 1660,1666 ----
}
} else {
! std::istrstream in(definition, strlen(definition) + 1);
int data[patternHeight];
int i;
for (i = 0; !in.eof() && in.good() && i < patternHeight; i++) {
*** /dev/null Mon Dec 8 10:58:11 PST 2003
--- patches/ivtools-031208-johnston-002
*************** patches/ivtools-031208-johnston-002
*** 0 ****
--- 1 ----
+ ivtools-031208-johnston-003
|
|
From: <ivt...@li...> - 2003-12-08 19:18:13
|
Patch: ivtools-031208-johnston-002 For: ivtools-1.1 Author: joh...@us... Subject: left over patch to bring things up to 1.1.1 Requires: This is an intermediate patch to ivtools-1.1.1. 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: - left over patch to bring things up to 1.1.1 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.1 top_ivtools/CHANGES:1.2 *** top_ivtools/CHANGES:1.1 Wed Oct 29 13:23:10 2003 --- ./CHANGES Mon Dec 8 11:09:29 2003 *************** *** 1,4 **** ! October 29th, 2002 ivtools-1.1.0 - re-enable use of shared memory for X11 image rendering under MacOS X --- 1,9 ---- ! November 16th, 2003 ivtools-1.1.1 ! ! - add missing src/include/ivstd/strstream.h to MANIFEST file and tar file ! ! ! October 29th, 2003 ivtools-1.1.0 - re-enable use of shared memory for X11 image rendering under MacOS X Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.1 top_ivtools/INSTALL:1.2 *** top_ivtools/INSTALL:1.1 Wed Oct 29 13:23:11 2003 --- ./INSTALL Mon Dec 8 11:09:29 2003 *************** *** 1,5 **** ! INSTALL for ivtools-1.1.0 Instructions for building ivtools-1.1 from source, the short version: --- 1,5 ---- ! INSTALL for ivtools-1.1.1 Instructions for building ivtools-1.1 from source, the short version: Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2 *** top_ivtools/MANIFEST:1.1 Wed Oct 29 13:23:11 2003 --- ./MANIFEST Mon Dec 8 11:09:29 2003 *************** *** 1553,1558 **** --- 1553,1559 ---- ivtools-1.1/src/include/ivstd/stdlib.h ivtools-1.1/src/include/ivstd/stream.h ivtools-1.1/src/include/ivstd/string.h + ivtools-1.1/src/include/ivstd/strstream.h ivtools-1.1/src/include/ivstd/version.h ivtools-1.1/src/iueserv_/Imakefile ivtools-1.1/src/iueserv_/Makefile Index: top_ivtools/README diff -c top_ivtools/README:1.1 top_ivtools/README:1.2 *** top_ivtools/README:1.1 Wed Oct 29 13:23:12 2003 --- ./README Mon Dec 8 11:09:29 2003 *************** *** 2,8 **** README for ivtools 1.1 ! This directory contains a release of ivtools 1.1.0. 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.1 ! This directory contains a release of ivtools 1.1.1. 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.1 top_ivtools/VERSION:1.2 *** top_ivtools/VERSION:1.1 Wed Oct 29 13:23:12 2003 --- ./VERSION Mon Dec 8 11:09:29 2003 *************** *** 1 **** ! Release 1.1.0 --- 1 ---- ! Release 1.1.1 *** /dev/null Mon Dec 8 11:10:08 PST 2003 --- patches/ivtools-031208-johnston-003 *************** patches/ivtools-031208-johnston-003 *** 0 **** --- 1 ---- + ivtools-031208-johnston-002 |
|
From: <ivt...@li...> - 2003-11-18 06:22:15
|
Patch: ivtools-031117-johnston-001
For: ivtools-1.1.0
Author: joh...@us...
Subject: add ivstd/strstream.h to MANIFEST, roll out new tar file
Requires:
This is an intermediate patch to ivtools-1.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:
- add ivstd/strstream.h to MANIFEST, roll out new tar file
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.1 config_ivtools/params.def:1.2
*** config_ivtools/params.def:1.1 Wed Oct 29 13:47:42 2003
--- config/params.def Mon Nov 17 22:24:27 2003
***************
*** 27,33 ****
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.0
#endif
RELEASE = Release
--- 27,33 ----
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.1.1
#endif
RELEASE = Release
***************
*** 36,42 ****
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.0
#endif
VERSION = Version
--- 36,42 ----
* VersionNumber
*/
#ifndef Version
! #define Version 1.1.1
#endif
VERSION = Version
*** /dev/null Mon Nov 17 22:24:43 PST 2003
--- patches/ivtools-031117-johnston-001
*************** patches/ivtools-031117-johnston-001
*** 0 ****
--- 1 ----
+ ivtools-031117-johnston-001
|
|
From: <ivt...@li...> - 2003-10-22 18:55:13
|
Patch: ivtools-031022-johnston-082
For: ivtools-1.0.7
Author: joh...@us...
Subject: add -svgexport flag to drawtool that by default suppresses SVG export
Requires:
This is an intermediate patch to ivtools-1.0.7. 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 -svgexport flag to drawtool that by default suppresses (the
incomplete) SVG export mechanism.
Index: drawtool/main.c
diff -c drawtool/main.c:1.1 drawtool/main.c:1.2
*** drawtool/main.c:1.1 Fri Sep 13 09:51:30 2002
--- src/drawtool/main.c Wed Oct 22 11:00:13 2003
***************
*** 159,164 ****
--- 159,165 ----
{ "*opaque_off", "false" },
{ "*ptrloc", "false" },
{ "*dithermap", "false" },
+ { "*svgexport", "false" },
#ifdef HAVE_ACE
{ "*import", "20001" },
#endif
***************
*** 194,199 ****
--- 195,201 ----
{ "-opoff", "*opaque_off", OptionValueImplicit, "true" },
{ "-ptrloc", "*ptrloc", OptionValueImplicit, "true" },
{ "-dithermap", "*dithermap", OptionValueImplicit, "true" },
+ { "-svgexport", "*svgexport", OptionValueImplicit, "true" },
#ifdef HAVE_ACE
{ "-import", "*import", OptionValueNext },
#endif
***************
*** 208,222 ****
"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
/*****************************************************************************/
--- 210,224 ----
"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 ]
[-slider_off|-soff]\n\
! [-svgexport] [-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 ]
[-slider_off|-soff]\n\
! [-svgexport] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]";
#endif
/*****************************************************************************/
Index: OverlayUnidraw/ovexport.c
diff -c OverlayUnidraw/ovexport.c:1.3 OverlayUnidraw/ovexport.c:1.4
*** OverlayUnidraw/ovexport.c:1.3 Mon Oct 7 13:01:56 2002
--- src/OverlayUnidraw/ovexport.c Wed Oct 22 11:00:08 2003
***************
*** 113,122 ****
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_);
} else {
style = chooser_->style();
--- 113,127 ----
style = new Style(Session::instance()->style());
style->attribute("subcaption", "Export selected graphics to file:");
style->attribute("open", "Export");
! const char *formats_svg[] = {"EPS", "idraw EPS", "drawtool", "SVG"};
! const char *formats_nosvg[] = {"EPS", "idraw EPS", "drawtool"};
! const char *svg_arg =
unidraw->GetCatalog()->GetAttribute("svgexport");
! const boolean svg_flag = svg_arg && strcmp(svg_arg, "true")==0;
! const char **formats = svg_flag ? formats_svg : formats_nosvg;
! int nformats = (svg_flag ? sizeof(formats_svg) :
sizeof(formats_nosvg)) / sizeof(char*);
const char *commands[] = {"ghostview %s", "idraw %s",
"drawtool %s", "netscape %s"};
chooser_ = new ExportChooser(".", WidgetKit::instance(), style,
! formats, nformats, commands, nil, true);
Resource::ref(chooser_);
} else {
style = chooser_->style();
*** /dev/null Wed Oct 22 11:00:37 PDT 2003
--- patches/ivtools-031022-johnston-082
*************** patches/ivtools-031022-johnston-082
*** 0 ****
--- 1 ----
+ ivtools-031022-johnston-082
|
|
From: <ivt...@li...> - 2003-10-19 20:28:49
|
Patch: ivtools-031019-johnston-081 For: ivtools-1.0.7 Author: joh...@us... Subject: The right way to fix a problem with config files Requires: This is an intermediate patch to ivtools-1.0.7. 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: - the cpp bundled with gcc-3.3 has a bug, and gets confused by back-slashed commas in macro arguments (it thinks they start a new argument, which they don't). This introduced a problem to long stable config files, but a workaround is here. - this also fixes things so FreeBSD can configure on alpha architectures. Index: config_ivtools/arch.def diff -c config_ivtools/arch.def:1.1 config_ivtools/arch.def:1.2 *** config_ivtools/arch.def:1.1 Fri Sep 13 09:54:32 2002 --- config/arch.def Sun Oct 19 12:13:26 2003 *************** *** 430,436 **** #define MacroFile InterViews/iv-stratus.cf #endif ! #if defined(__alpha) && !defined(__linux__) #undef ALPHA #undef alpha #define AlphaArchitecture --- 430,436 ---- #define MacroFile InterViews/iv-stratus.cf #endif ! #if defined(__alpha) && !defined(__linux__) && !defined(__FreeBSD__) #undef ALPHA #undef alpha #define AlphaArchitecture Index: config_ivtools/rules.def diff -c config_ivtools/rules.def:1.3 config_ivtools/rules.def:1.4 *** config_ivtools/rules.def:1.3 Fri Jul 18 12:16:36 2003 --- config/rules.def Sun Oct 19 12:13:26 2003 *************** *** 731,737 **** @echo "building $@" @@\ $(RM) $@~ @@\ $(RM) Concat(lib,libname.so) @@\ ! SharedLibraryCmdSun(ldobjs,/*-Wl\,-soname=Concat(lib\,libname.so.rev)*/) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ $(LN) $@ Concat(lib,libname.so) @@\ --- 731,737 ---- @echo "building $@" @@\ $(RM) $@~ @@\ $(RM) Concat(lib,libname.so) @@\ ! SharedLibraryCmd(ldobjs,/*-Wl\,-soname=Concat(lib\,libname.so.rev)*/) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ $(LN) $@ Concat(lib,libname.so) @@\ *** /dev/null Sun Oct 19 12:13:35 PDT 2003 --- patches/ivtools-031019-johnston-081 *************** patches/ivtools-031019-johnston-081 *** 0 **** --- 1 ---- + ivtools-031019-johnston-081 |
|
From: <ivt...@li...> - 2003-10-19 20:14:30
|
Patch: ivtools-030718-johnston-080
For: ivtools-1.0.7
Author: joh...@us...
Subject: what it took to get it built with ACE on MacOS X
Requires:
This is an intermediate patch to ivtools-1.0.7. 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:
- what it took to get it built with ACE on MacOS X (though it doesn't
work yet).
Index: Attribute/paramlist.c
diff -c Attribute/paramlist.c:1.2 Attribute/paramlist.c:1.3
*** Attribute/paramlist.c:1.2 Mon Jul 7 12:23:57 2003
--- src/Attribute/paramlist.c Fri Jul 18 12:15:22 2003
***************
*** 38,44 ****
--- 38,46 ----
#include <iostream.h>
#include <stdio.h>
#include <string.h>
+ #ifndef __APPLE__
#include <strstream.h>
+ #endif
/*****************************************************************************/
Index: ComTerp/comterpserv.h
diff -c ComTerp/comterpserv.h:1.1 ComTerp/comterpserv.h:1.2
*** ComTerp/comterpserv.h:1.1 Fri Sep 13 09:47:51 2002
--- src/ComTerp/comterpserv.h Fri Jul 18 12:15:26 2003
***************
*** 33,38 ****
--- 33,42 ----
* Server-oriented interpreter deals with strings
*/
+ #ifdef HAVE_ACE
+ #include <ace/config.h>
+ #endif
+
#include <ComTerp/comterp.h>
//: extended ComTerp that works with buffered IO.
Index: config_ivtools/rules.def
diff -c config_ivtools/rules.def:1.2 config_ivtools/rules.def:1.3
*** config_ivtools/rules.def:1.2 Tue Nov 26 15:29:31 2002
--- config/rules.def Fri Jul 18 12:16:36 2003
***************
*** 714,720 ****
Concat(lib,libname.so.rev): depobjs @@\
@echo "building $@" @@\
$(RM) $@~ @@\
! SharedLibraryCmd(ldobjs,-Wl\,-soname=Concat(lib\,libname.so.rev))@@\
$(RM) $@ @@\
$(MV) $@~ $@ @@\
@@\
--- 714,720 ----
Concat(lib,libname.so.rev): depobjs @@\
@echo "building $@" @@\
$(RM) $@~ @@\
!
SharedLibraryCmd(ldobjs,/*-Wl\,-soname=Concat(lib\,libname.so.rev)*/)@@\
$(RM) $@ @@\
$(MV) $@~ $@ @@\
@@\
***************
*** 731,737 ****
@echo "building $@" @@\
$(RM) $@~ @@\
$(RM) Concat(lib,libname.so) @@\
! SharedLibraryCmd(ldobjs,-Wl\,-soname=Concat(lib\,libname.so.rev))@@\
$(RM) $@ @@\
$(MV) $@~ $@ @@\
$(LN) $@ Concat(lib,libname.so) @@\
--- 731,737 ----
@echo "building $@" @@\
$(RM) $@~ @@\
$(RM) Concat(lib,libname.so) @@\
!
SharedLibraryCmdSun(ldobjs,/*-Wl\,-soname=Concat(lib\,libname.so.rev)*/)
@@\
$(RM) $@ @@\
$(MV) $@~ $@ @@\
$(LN) $@ Concat(lib,libname.so) @@\
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 Sat Nov 16 09:02:32 2002
--- src/include/ivstd/fstream.h Fri Jul 18 12:16:26 2003
***************
*** 4,10 ****
#if __GNUC__>=3
#define input ios_base::in
#define output ios_base::out
! #if __GNUC__>3 || __GNUC__==3 && __GNUC_MINOR__>0 && !defined(__APPLE__)
#include <ext/stdio_filebuf.h>
#define fileptr_filebuf __gnu_cxx::stdio_filebuf<char>
#else
--- 4,10 ----
#if __GNUC__>=3
#define input ios_base::in
#define output ios_base::out
! #if __GNUC__>3 || __GNUC__==3 && __GNUC_MINOR__>0 /* &&
!defined(__APPLE__) */
#include <ext/stdio_filebuf.h>
#define fileptr_filebuf __gnu_cxx::stdio_filebuf<char>
#else
Index: top_ivtools/configure
diff -c top_ivtools/configure:1.1 top_ivtools/configure:1.2
*** top_ivtools/configure:1.1 Fri Sep 13 09:47:27 2002
--- ./configure Fri Jul 18 12:15:17 2003
***************
*** 644,659 ****
echo ""
else
echo "Building with ACE support ACE=$ACE"
! if test -f $ACE_LIBS/libACE.a -o -f $ACE_LIBS/libACE.so ; then
echo "$ac_t""Found libACE.* in $ACE_LIBS " 1>&6
ACE_ENABLED=1
else
! if test -f $ACE/ace/libACE.a -o -f $ACE/ace/libACE.so ; then
echo "$ac_t""Found libACE.* in $ACE/ace " 1>&6
ACE_ENABLED=1
ACE_LIBS=$ACE/ace
else
! { echo "configure: error: Can not find
libACE.a or libACE.so in $ACE_LIBS ($ACE).
Use --with-ace-libs to specify location of
ACE " 1>&2; exit 1; }
fi
--- 644,659 ----
echo ""
else
echo "Building with ACE support ACE=$ACE"
! if test -f $ACE_LIBS/libACE.a -o -f $ACE_LIBS/libACE.so -o -f
$ACE_LIBS/libACE.dylib ; then
echo "$ac_t""Found libACE.* in $ACE_LIBS " 1>&6
ACE_ENABLED=1
else
! if test -f $ACE/ace/libACE.a -o -f $ACE/ace/libACE.so
-o -f $ACE/ace/libACE.dylib ; then
echo "$ac_t""Found libACE.* in $ACE/ace " 1>&6
ACE_ENABLED=1
ACE_LIBS=$ACE/ace
else
! { echo "configure: error: Can not find
libACE.a or libACE.so or libACE.dylib in $ACE_LIBS ($ACE).
Use --with-ace-libs to specify location of
ACE " 1>&2; exit 1; }
fi
***************
*** 692,708 ****
echo ""
else
echo "Building with clippoly support CLIPPOLY=$CLIPPOLY"
! if test -f $CLIPPOLY_LIBS/libclippoly.a -o -f
$CLIPPOLY_LIBS/libclippoly.so ; then
echo "$ac_t""Found libclippoly.* in $CLIPPOLY_LIBS " 1>&6
CLIPPOLY_ENABLED=1
else
! if test -f $CLIPPOLY/libclippoly.a -o -f
$CLIPPOLY/libclippoly.so ; then
echo "$ac_t""Found libclippoly.* in $CLIPPOLY " 1>&6
CLIPPOLY_ENABLED=1
CLIPPOLY_LIBS=$CLIPPOLY
else
! { echo "configure: error: Can not find libclippoly.a
or libclippoly.so in $CLIPPOLY ($CLIPPOLY_LIBS)
Use --with-clippoly-libs to specify location of clippoly libraries"
1>&2; exit 1; }
fi
fi
--- 692,708 ----
echo ""
else
echo "Building with clippoly support CLIPPOLY=$CLIPPOLY"
! if test -f $CLIPPOLY_LIBS/libclippoly.a -o -f
$CLIPPOLY_LIBS/libclippoly.so -o -f $CLIPPOLY_LIBS/libclippoly.dylib
; then
echo "$ac_t""Found libclippoly.* in $CLIPPOLY_LIBS " 1>&6
CLIPPOLY_ENABLED=1
else
! if test -f $CLIPPOLY/libclippoly.a -o -f
$CLIPPOLY/libclippoly.so -o -f $CLIPPOLY/libclippoly.dylib ; then
echo "$ac_t""Found libclippoly.* in $CLIPPOLY " 1>&6
CLIPPOLY_ENABLED=1
CLIPPOLY_LIBS=$CLIPPOLY
else
! { echo "configure: error: Can not find libclippoly.a
or libclippoly.so or libclippoly.dylib in $CLIPPOLY ($CLIPPOLY_LIBS)
Use --with-clippoly-libs to specify location of clippoly libraries"
1>&2; exit 1; }
fi
fi
Index: top_ivtools/configure.in
diff -c top_ivtools/configure.in:1.1 top_ivtools/configure.in:1.2
*** top_ivtools/configure.in:1.1 Fri Sep 13 09:47:28 2002
--- ./configure.in Fri Jul 18 12:15:17 2003
***************
*** 49,64 ****
echo ""
else
echo "Building with ACE support ACE=$ACE"
! if test -f $ACE_LIBS/libACE.a -o -f $ACE_LIBS/libACE.so ; then
AC_MSG_RESULT( Found libACE.* in $ACE_LIBS )
ACE_ENABLED=1
else
! if test -f $ACE/ace/libACE.a -o -f $ACE/ace/libACE.so ; then
AC_MSG_RESULT( Found libACE.* in $ACE/ace )
ACE_ENABLED=1
ACE_LIBS=$ACE/ace
else
! AC_MSG_ERROR( Can not find libACE.a or
libACE.so in $ACE_LIBS ($ACE).
Use --with-ace-libs to specify location of ACE )
fi
--- 49,64 ----
echo ""
else
echo "Building with ACE support ACE=$ACE"
! if test -f $ACE_LIBS/libACE.a -o -f $ACE_LIBS/libACE.so -o -f
$ACE_LIBS/libACE.dylib ; then
AC_MSG_RESULT( Found libACE.* in $ACE_LIBS )
ACE_ENABLED=1
else
! if test -f $ACE/ace/libACE.a -o -f $ACE/ace/libACE.so
-o -f $ACE/ace/libACE.dylib ; then
AC_MSG_RESULT( Found libACE.* in $ACE/ace )
ACE_ENABLED=1
ACE_LIBS=$ACE/ace
else
! AC_MSG_ERROR( Can not find libACE.a or
libACE.so or libACE.dylib in $ACE_LIBS ($ACE).
Use --with-ace-libs to specify location of ACE )
fi
***************
*** 89,105 ****
echo ""
else
echo "Building with clippoly support CLIPPOLY=$CLIPPOLY"
! if test -f $CLIPPOLY_LIBS/libclippoly.a -o -f
$CLIPPOLY_LIBS/libclippoly.so ; then
AC_MSG_RESULT( Found libclippoly.* in $CLIPPOLY_LIBS )
CLIPPOLY_ENABLED=1
else
! if test -f $CLIPPOLY/libclippoly.a -o -f
$CLIPPOLY/libclippoly.so ; then
AC_MSG_RESULT( Found libclippoly.* in $CLIPPOLY )
CLIPPOLY_ENABLED=1
CLIPPOLY_LIBS=$CLIPPOLY
else
! AC_MSG_ERROR( Can not find libclippoly.a or
libclippoly.so in $CLIPPOLY ($CLIPPOLY_LIBS)
Use --with-clippoly-libs to specify location of clippoly libraries)
fi
fi
--- 89,105 ----
echo ""
else
echo "Building with clippoly support CLIPPOLY=$CLIPPOLY"
! if test -f $CLIPPOLY_LIBS/libclippoly.a -o -f
$CLIPPOLY_LIBS/libclippoly.so -o -f $CLIPPOLY_LIBS/libclippoly.dylib
; then
AC_MSG_RESULT( Found libclippoly.* in $CLIPPOLY_LIBS )
CLIPPOLY_ENABLED=1
else
! if test -f $CLIPPOLY/libclippoly.a -o -f
$CLIPPOLY/libclippoly.so -o -f $CLIPPOLY/libclippoly.dylib ; then
AC_MSG_RESULT( Found libclippoly.* in $CLIPPOLY )
CLIPPOLY_ENABLED=1
CLIPPOLY_LIBS=$CLIPPOLY
else
! AC_MSG_ERROR( Can not find libclippoly.a or
libclippoly.so or libclippoly.dylib in $CLIPPOLY ($CLIPPOLY_LIBS)
Use --with-clippoly-libs to specify location of clippoly libraries)
fi
fi
*** /dev/null Fri Jul 18 12:16:40 PDT 2003
--- patches/ivtools-030718-johnston-075
*************** patches/ivtools-030718-johnston-075
*** 0 ****
--- 1 ----
+ ivtools-030718-johnston-075
|
|
From: <ivt...@li...> - 2003-10-19 20:08:42
|
Patch: ivtools-030708-johnston-079
For: ivtools-1.0.7
Author: joh...@us...
Subject: fix up some AttrValue stuff
Requires:
This is an intermediate patch to ivtools-1.0.7. 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 some AttrValue stuff
Index: Attribute/attrvalue.c
diff -c Attribute/attrvalue.c:1.1 Attribute/attrvalue.c:1.2
*** Attribute/attrvalue.c:1.1 Fri Sep 13 09:47:40 2002
--- src/Attribute/attrvalue.c Tue Jul 8 08:34:02 2003
***************
*** 92,98 ****
AttributeValue::AttributeValue(unsigned int v, ValueType type) {
clear();
_type = type;
! _v.dfunsval = v;
}
AttributeValue::AttributeValue(unsigned int kv, unsigned int kn,
ValueType type) {
--- 92,114 ----
AttributeValue::AttributeValue(unsigned int v, ValueType type) {
clear();
_type = type;
! if ( type >= CharType && type <= UShortType ) {
! switch (type) {
! case CharType:
! _v.charval = v;
! break;
! case UCharType:
! _v.ucharval = v;
! break;
! case ShortType:
! _v.shortval = v;
! break;
! case UShortType:
! _v.ushortval = v;
! break;
! }
! } else
! _v.dfunsval = v;
}
AttributeValue::AttributeValue(unsigned int kv, unsigned int kn,
ValueType type) {
***************
*** 105,111 ****
AttributeValue::AttributeValue(int v, ValueType type) {
clear();
_type = type;
! _v.dfintval = v;
}
AttributeValue::AttributeValue(unsigned long v) {
--- 121,143 ----
AttributeValue::AttributeValue(int v, ValueType type) {
clear();
_type = type;
! if ( type >= CharType && type <= UShortType ) {
! switch (type) {
! case CharType:
! _v.charval = v;
! break;
! case UCharType:
! _v.ucharval = v;
! break;
! case ShortType:
! _v.shortval = v;
! break;
! case UShortType:
! _v.ushortval = v;
! break;
! }
! } else
! _v.dfintval = v;
}
AttributeValue::AttributeValue(unsigned long v) {
*** /dev/null Tue Jul 8 08:35:42 PDT 2003
--- patches/ivtools-030708-johnston-079
*************** patches/ivtools-030708-johnston-079
*** 0 ****
--- 1 ----
+ ivtools-030708-johnston-079
|
|
From: <ivt...@li...> - 2002-11-26 23:35:31
|
Patch: ivtools-021126-johnston-076
For: ivtools-1.0.6
Author: joh...@us...
Subject: Jaguar patches from Ben Hines, plus ready for ivtools-1.0.7
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:
- apply diffs generated by Ben Hines in creating a fink package for
Jaguar (MacOS X 10.2)
- get ready for 1.0.7
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.1 config_ivtools/params.def:1.2
*** config_ivtools/params.def:1.1 Fri Sep 13 09:54:34 2002
--- config/params.def Tue Nov 26 15:29:30 2002
***************
*** 27,33 ****
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.0.6
#endif
RELEASE = Release
--- 27,33 ----
* Name of the software release
*/
#ifndef Release
! #define Release ivtools-1.0.7
#endif
RELEASE = Release
***************
*** 36,42 ****
* VersionNumber
*/
#ifndef Version
! #define Version 1.0.6
#endif
VERSION = Version
--- 36,42 ----
* VersionNumber
*/
#ifndef Version
! #define Version 1.0.7
#endif
VERSION = Version
Index: config_ivtools/rules.def
diff -c config_ivtools/rules.def:1.1 config_ivtools/rules.def:1.2
*** config_ivtools/rules.def:1.1 Fri Sep 13 09:54:35 2002
--- config/rules.def Tue Nov 26 15:29:31 2002
***************
*** 1093,1105 ****
--- 1093,1115 ----
#define InstallSymLink(dir, file) /**/
#else
#if !defined(SVR4)
+ #if defined(DARWIN)
#define InstallSymLink(dir, file) @@\
install:: @@\
MakeDir(dir) @@\
+ cp -f file dir @@\
+ @@\
+ uninstall:: @@\
+ $(RM) dir/file
+ #else
+ #define InstallSymLink(dir, file) @@\
+ install:: @@\
+ MakeDir(dir) @@\
cp -fd file dir @@\
@@\
uninstall:: @@\
$(RM) dir/file
+ #endif
#else
#define InstallSymLink(dir, file) @@\
install:: @@\
Index: include_std/version.h
diff -c include_std/version.h:1.1 include_std/version.h:1.2
*** include_std/version.h:1.1 Fri Sep 13 09:53:15 2002
--- src/include/ivstd/version.h Tue Nov 26 15:29:20 2002
***************
*** 1,3 ****
! #define IvtoolsVersion 1.0.6
! #define VersionString "1.0.6"
! #define ReleaseString "ivtools-1.0.6"
--- 1,3 ----
! #define IvtoolsVersion 1.0.7
! #define VersionString "1.0.7"
! #define ReleaseString "ivtools-1.0.7"
Index: include_x11/xraster.h
diff -c include_x11/xraster.h:1.2 include_x11/xraster.h:1.3
*** include_x11/xraster.h:1.2 Sat Nov 16 09:02:25 2002
--- src/include/IV-X11/xraster.h Tue Nov 26 15:29:07 2002
***************
*** 30,36 ****
#define iv_xraster_h
// should be defined externally
! #if !defined(__CYGWIN__)&&!defined(__APPLE__)
#define XSHM
#endif
--- 30,36 ----
#define iv_xraster_h
// should be defined externally
! #if !defined(__CYGWIN__)&&(!defined(__APPLE__)||__GNUC__>2)
#define XSHM
#endif
Index: src_os/string.c
diff -c src_os/string.c:1.1 src_os/string.c:1.2
*** src_os/string.c:1.1 Fri Sep 13 09:48:23 2002
--- src/OS/string.c Tue Nov 26 15:28:15 2002
***************
*** 33,39 ****
*/
extern "C" {
! #ifdef __APPLE__
#ifndef tolower
extern wchar_t tolower(wchar_t);
#endif
--- 33,39 ----
*/
extern "C" {
! #if defined(__APPLE__)&&__GNUC__<3
#ifndef tolower
extern wchar_t tolower(wchar_t);
#endif
Index: Time/Date.h
diff -c Time/Date.h:1.1 Time/Date.h:1.2
*** Time/Date.h:1.1 Fri Sep 13 09:48:50 2002
--- src/Time/Date.h Tue Nov 26 15:28:20 2002
***************
*** 36,41 ****
--- 36,42 ----
*/
#include <OS/types.h>
+ #include <time.h>
#include <iostream.h>
#define NO_NESTED_TYPES 1
Index: Time/Time.h
diff -c Time/Time.h:1.1 Time/Time.h:1.2
*** Time/Time.h:1.1 Fri Sep 13 09:48:50 2002
--- src/Time/Time.h Tue Nov 26 15:28:20 2002
***************
*** 48,53 ****
--- 48,57 ----
#if defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__APPLE__)
+ #if defined(__APPLE__)
+ #include_next <time.h>
+ #endif
+
#include <sys/time.h>
#if defined(__NetBSD__)
#include </usr/include/sys/time.h>
***************
*** 79,86 ****
--- 83,95 ----
*/
#include <OS/types.h>
+ #if !defined(__APPLE_)
#include <iostream.h>
#include_next <time.h>
+ #else
+ #include <iosfwd>
+ #include <iostream>
+ #endif
#define NO_NESTED_TYPES 1
*** /dev/null Tue Nov 26 15:29:36 PST 2002
--- patches/ivtools-021126-johnston-076
*************** patches/ivtools-021126-johnston-076
*** 0 ****
--- 1 ----
+ ivtools-021126-johnston-076
|
|
From: <ivt...@li...> - 2002-11-26 23:34:35
|
Patch: ivtools-021116-johnston-075
For: ivtools-1.0.6
Author: joh...@us...
Subject: two fixes for MacOS X
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:
- disable use of X11 shared memory extension for MacOS X. This may
only be a problem with 10.1, or only be a problem with XFree86 4.2, so
it may be reinstated in the future.
- customize iostream include files for MacOS X Jaguar (10.2), to mask
the difference between Apple's version of gcc-3.1 libstdc++ and
everyone elses. This is untested, so let me know if it worked for you.
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 Sep 13 09:53:15 2002
--- src/include/ivstd/fstream.h Sat Nov 16 09:02:32 2002
***************
*** 4,10 ****
#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
--- 4,10 ----
#if __GNUC__>=3
#define input ios_base::in
#define output ios_base::out
! #if __GNUC__>3 || __GNUC__==3 && __GNUC_MINOR__>0 && !defined(__APPLE__)
#include <ext/stdio_filebuf.h>
#define fileptr_filebuf __gnu_cxx::stdio_filebuf<char>
#else
Index: include_x11/xraster.h
diff -c include_x11/xraster.h:1.1 include_x11/xraster.h:1.2
*** include_x11/xraster.h:1.1 Fri Sep 13 09:52:25 2002
--- src/include/IV-X11/xraster.h Sat Nov 16 09:02:25 2002
***************
*** 30,36 ****
#define iv_xraster_h
// should be defined externally
! #if !defined(__CYGWIN__)
#define XSHM
#endif
--- 30,36 ----
#define iv_xraster_h
// should be defined externally
! #if !defined(__CYGWIN__)&&!defined(__APPLE__)
#define XSHM
#endif
*** /dev/null Sat Nov 16 09:02:41 PST 2002
--- patches/ivtools-021116-johnston-075
*************** patches/ivtools-021116-johnston-075
*** 0 ****
--- 1 ----
+ ivtools-021116-johnston-075
|
|
From: <ivt...@li...> - 2002-11-07 18:42:31
|
Patch: ivtools-021102-johnston-072
For: ivtools-1.0.6
Author: joh...@us...
Subject: new idraw format 13 supports executable fonts
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:
- a new version number 13 for the idraw format adds support for
executable fonts (as opposed to static fonts). Required by recent
versions of RedHat Linux.
Index: include_components/psformat.h
diff -c include_components/psformat.h:1.1 include_components/psformat.h:1.2
*** include_components/psformat.h:1.1 Fri Sep 13 09:53:03 2002
--- src/include/Unidraw/Components/psformat.h Sat Nov 2 14:28:04 2002
***************
*** 31,38 ****
#include <Unidraw/enter-scope.h>
! static const float PSV_CAPJOINSTYLE = 13; // support for capstyle/joinstyle
// (probably won't be
backward compatible)
static const float PSV_FLOATWIDTH = 12; // floating point line width
// (not backward
compatible if utilized)
static const float PSV_CLOSEPATH = 11; // addition of
"closepath" to ellipse
--- 31,39 ----
#include <Unidraw/enter-scope.h>
! static const float PSV_CAPJOINSTYLE = 14; // support for capstyle/joinstyle
// (probably won't be
backward compatible)
+ static const float PSV_LOADFONT = 13; // support for executable fonts
static const float PSV_FLOATWIDTH = 12; // floating point line width
// (not backward
compatible if utilized)
static const float PSV_CLOSEPATH = 11; // addition of
"closepath" to ellipse
***************
*** 58,63 ****
static const float PSV_FGCOLOR = 2; // added foreground color
static const float PSV_ORIGINAL = 1; // original format
! #define PSV_LATEST PSV_FLOATWIDTH
#endif
--- 59,64 ----
static const float PSV_FGCOLOR = 2; // added foreground color
static const float PSV_ORIGINAL = 1; // original format
! #define PSV_LATEST PSV_LOADFONT
#endif
Index: Unidraw/psview.c
diff -c Unidraw/psview.c:1.1 Unidraw/psview.c:1.2
*** Unidraw/psview.c:1.1 Fri Sep 13 09:50:55 2002
--- src/Unidraw/psview.c Sat Nov 2 14:27:38 2002
***************
*** 571,577 ****
out << "gsave\n";
out << "fgred fggreen fgblue setrgbcolor\n";
out << "/fontDict printFont printSize scalefont dup setfont def\n";
! out << "/descender fontDict begin 0 [FontBBox] 1 get FontMatrix end\n";
out << "transform exch pop def\n";
out << "/vertoffset 1 printSize sub descender sub def {\n";
out << "0 vertoffset moveto show\n";
--- 571,577 ----
out << "gsave\n";
out << "fgred fggreen fgblue setrgbcolor\n";
out << "/fontDict printFont printSize scalefont dup setfont def\n";
! out << "/descender fontDict begin 0 /FontBBox load 1 get
FontMatrix end\n";
out << "transform exch pop def\n";
out << "/vertoffset 1 printSize sub descender sub def {\n";
out << "0 vertoffset moveto show\n";
*** /dev/null Sat Nov 2 14:28:22 PST 2002
--- patches/ivtools-021102-johnston-072
*************** patches/ivtools-021102-johnston-072
*** 0 ****
--- 1 ----
+ ivtools-021102-johnston-072
|
|
From: <ivt...@li...> - 2002-11-07 00:30:11
|
Patch: ivtools-021106-johnston-074
For: ivtools-1.0.6
Author: joh...@us...
Subject: fix out-of-order destruction of objects at program termination
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:
- fix out-of-order destruction of member objects of the central
Unidraw object at program termination.
Index: Unidraw/unidraw.c
diff -c Unidraw/unidraw.c:1.1 Unidraw/unidraw.c:1.2
*** Unidraw/unidraw.c:1.1 Fri Sep 13 09:50:58 2002
--- src/Unidraw/unidraw.c Wed Nov 6 12:13:08 2002
***************
*** 211,220 ****
Unidraw::~Unidraw () {
CloseAll();
ClearHistory();
- delete _histories;
delete _editors;
delete _deadEditors;
delete _catalog;
delete _world;
}
--- 211,220 ----
Unidraw::~Unidraw () {
CloseAll();
ClearHistory();
delete _editors;
delete _deadEditors;
delete _catalog;
+ delete _histories;
delete _world;
}
*** /dev/null Wed Nov 6 12:13:32 PST 2002
--- patches/ivtools-021106-johnston-074
*************** patches/ivtools-021106-johnston-074
*** 0 ****
--- 1 ----
+ ivtools-021106-johnston-074
|
|
From: <ivt...@li...> - 2002-11-07 00:29:20
|
Patch: ivtools-021106-johnston-073
For: ivtools-1.0.6
Author: joh...@us...
Subject: SVG fill colors, with support for fg/bg averaged colors and none
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:
- expanded support for SVG fill colors, with support for a none color,
and for blending foreground and background colors (from 0 to 100%).
Index: OverlayUnidraw/scriptview.c
diff -c OverlayUnidraw/scriptview.c:1.3 OverlayUnidraw/scriptview.c:1.4
*** OverlayUnidraw/scriptview.c:1.3 Tue Oct 22 12:10:09 2002
--- src/OverlayUnidraw/scriptview.c Wed Nov 6 12:08:24 2002
***************
*** 145,150 ****
--- 145,185 ----
}
}
+ void OverlayScript::Colors (ostream& out) {
+ if (!svg_format()) {
+ FgColor(out);
+ BgColor(out);
+ } else {
+
+ PSColor* fgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetFgColor();
+ PSColor* bgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetBgColor();
+
+ ColorIntensity fr, fg, fb;
+ fgcolor->GetIntensities(fr, fg, fb);
+
+ out << "stroke: rgb("
+ << (int)(fr*100) << "%,"
+ << (int)(fg*100) << "%,"
+ << (int)(fb*100) << "%); ";
+
+ ColorIntensity br, bg, bb;
+ bgcolor->GetIntensities(br, bg, bb);
+
+ PSPattern* pat = (PSPattern*)
GetOverlayComp()->GetGraphic()->GetPattern();
+ if (pat != nil && !pat->None() &&
+ pat->GetGrayLevel()>=0.0 && pat->GetGrayLevel()<=1.0) {
+
+ float fp = 100.0*(1.0-pat->GetGrayLevel());
+ float bp = 100.0-fp;
+ out << "fill: rgb("
+ << (int)(fr*fp+br*bp) << "%,"
+ << (int)(fg*fp+bg*bp) << "%,"
+ << (int)(fb*fp+bb*bp) << "%); ";
+ }
+ }
+
+ }
+
void OverlayScript::FgColor (ostream& out) {
PSColor* fgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetFgColor();
***************
*** 154,173 ****
ColorIntensity r, g, b;
fgcolor->GetIntensities(r, g, b);
! if (!svg_format()) {
! out << " :fgcolor \"" << name << "\"";
! out << "," << r << "," << g << "," << b;
! } else {
! out << "stroke: rgb("
! << (int)(r*100) << "%,"
! << (int)(g*100) << "%,"
! << (int)(b*100) << "%) ";
! out << "fill-color: rgb("
! << (int)(r*100) << "%,"
! << (int)(g*100) << "%,"
! << (int)(b*100) << "%) ";
! }
!
}
}
--- 189,197 ----
ColorIntensity r, g, b;
fgcolor->GetIntensities(r, g, b);
! out << " :fgcolor \"" << name << "\"";
! out << "," << r << "," << g << "," << b;
!
}
}
***************
*** 180,190 ****
ColorIntensity r, g, b;
bgcolor->GetIntensities(r, g, b);
- if (!svg_format()) {
out << " :bgcolor \"" << name << "\"";
out << "," << r << "," << g << "," << b;
! }
!
}
}
--- 204,212 ----
ColorIntensity r, g, b;
bgcolor->GetIntensities(r, g, b);
out << " :bgcolor \"" << name << "\"";
out << "," << r << "," << g << "," << b;
!
}
}
***************
*** 212,220 ****
if (pat->None()) {
! if (!svg_format()) {
out << " :nonepat";
! }
} else if (pat->GetSize() > 0) {
--- 234,243 ----
if (pat->None()) {
! if (!svg_format())
out << " :nonepat";
! else
! out << "fill: none;";
} else if (pat->GetSize() > 0) {
***************
*** 754,761 ****
out << " gs(";
FillBg(out);
Brush(out);
! FgColor(out);
! BgColor(out);
Font(out);
Pattern(out);
out << ")";
--- 777,783 ----
out << " gs(";
FillBg(out);
Brush(out);
! Colors(out);
Font(out);
Pattern(out);
out << ")";
***************
*** 853,860 ****
if (svg_format()) out << "style=\"";
FillBg(out);
Brush(out);
! FgColor(out);
! BgColor(out);
Pattern(out);
if (svg_format()) out << "\" ";
}
--- 875,881 ----
if (svg_format()) out << "style=\"";
FillBg(out);
Brush(out);
! Colors(out);
Pattern(out);
if (svg_format()) out << "\" ";
}
***************
*** 870,877 ****
else {
FillBg(out);
Brush(out);
! FgColor(out);
! BgColor(out);
Font(out);
Pattern(out);
}
--- 891,897 ----
else {
FillBg(out);
Brush(out);
! Colors(out);
Font(out);
Pattern(out);
}
***************
*** 899,906 ****
if (cb)
out << " :gs " << MatchedGS(cb);
else {
! FgColor(out);
! BgColor(out);
}
}
Transformation(out);
--- 919,925 ----
if (cb)
out << " :gs " << MatchedGS(cb);
else {
! Colors(out);
}
}
Transformation(out);
Index: OverlayUnidraw/scriptview.h
diff -c OverlayUnidraw/scriptview.h:1.3 OverlayUnidraw/scriptview.h:1.4
*** OverlayUnidraw/scriptview.h:1.3 Tue Oct 22 12:10:09 2002
--- src/OverlayUnidraw/scriptview.h Wed Nov 6 12:08:24 2002
***************
*** 174,179 ****
--- 174,180 ----
protected:
virtual void FillBg(ostream& out);
virtual void Brush(ostream& out);
+ virtual void Colors(ostream& out);
virtual void FgColor(ostream& out);
virtual void BgColor(ostream& out);
virtual void Font(ostream& out);
*** /dev/null Wed Nov 6 12:09:00 PST 2002
--- patches/ivtools-021106-johnston-073
*************** patches/ivtools-021106-johnston-073
*** 0 ****
--- 1 ----
+ ivtools-021106-johnston-073
|
|
From: <ivt...@li...> - 2002-11-02 22:34:33
|
Patch: ivtools-021022-johnston-071
For: ivtools-1.0.6
Author: joh...@us...
Subject: fix drawserv attribute expression propogation mechanism
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:
- fix drawser attribute expression propogation used for Null
Convention Logic emulation (http://www.theseus.com).
- SVG rectangle export work.
Index: Attribute/attrlist.c
diff -c Attribute/attrlist.c:1.1 Attribute/attrlist.c:1.2
*** Attribute/attrlist.c:1.1 Fri Sep 13 09:47:40 2002
--- src/Attribute/attrlist.c Tue Oct 22 12:09:20 2002
***************
*** 217,226 ****
out << "\"" << string << "\"";
break;
case AttributeValue::CharType:
! out << attrval->char_ref();
break;
case AttributeValue::UCharType:
! out << attrval->char_ref();
break;
case AttributeValue::IntType:
out << attrval->int_ref();
--- 217,226 ----
out << "\"" << string << "\"";
break;
case AttributeValue::CharType:
! out << "'" << attrval->char_ref() << "'";
break;
case AttributeValue::UCharType:
! out << "'" << attrval->char_ref() << "'";
break;
case AttributeValue::IntType:
out << attrval->int_ref();
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.2 ComUnidraw/unifunc.c:1.3
*** ComUnidraw/unifunc.c:1.2 Fri Sep 27 11:57:12 2002
--- src/ComUnidraw/unifunc.c Tue Oct 22 12:10:17 2002
***************
*** 512,519 ****
compout(comp, out);
*out << ")\n";
} else {
- OverlayPS::idraw_format(idraw_flag.is_true());
OverlayPS* psv = (OverlayPS*) comp->Create(POSTSCRIPT_VIEW);
comp->Attach(psv);
psv->Update();
psv->Emit(*out);
--- 512,519 ----
compout(comp, out);
*out << ")\n";
} else {
OverlayPS* psv = (OverlayPS*) comp->Create(POSTSCRIPT_VIEW);
+ psv->idraw_format(idraw_flag.is_true());
comp->Attach(psv);
psv->Update();
psv->Emit(*out);
Index: DrawServ/drawcatalog.c
diff -c DrawServ/drawcatalog.c:1.1 DrawServ/drawcatalog.c:1.2
*** DrawServ/drawcatalog.c:1.1 Fri Sep 13 09:51:58 2002
--- src/DrawServ/drawcatalog.c Tue Oct 22 12:10:23 2002
***************
*** 184,189 ****
--- 184,191 ----
_edges[i]->Edge()->
attach_nodes(start_id < 0 ? nil : _nodes[start_id]->Node(),
end_id < 0 ? nil : _nodes[end_id]->Node());
+ if (start_id >=0 && end_id >=0)
+ _edges[i]->NodeStart()->attach(_edges[i]->NodeEnd());
}
delete _startnode; _startnode = nil;
delete _endnode; _endnode = nil;
Index: OverlayUnidraw/ovrect.c
diff -c OverlayUnidraw/ovrect.c:1.1 OverlayUnidraw/ovrect.c:1.2
*** OverlayUnidraw/ovrect.c:1.1 Fri Sep 13 09:51:24 2002
--- src/OverlayUnidraw/ovrect.c Tue Oct 22 12:10:09 2002
***************
*** 393,404 ****
RectOvComp* comp = (RectOvComp*) GetSubject();
comp->GetRect()->GetOriginal(l, b, r, t);
! out << "rectangle(";
! out << l << "," << b << "," << r << "," << t;
MinGS(out);
Annotation(out);
Attributes(out);
! out << ")";
return out.good();
}
--- 393,412 ----
RectOvComp* comp = (RectOvComp*) GetSubject();
comp->GetRect()->GetOriginal(l, b, r, t);
! if (!svg_format()) {
! out << "rectangle(";
! out << l << "," << b << "," << r << "," << t;
! } else {
! out << "<rect x=\"" << l << "\" y=\"" << b
! << "\" width=\"" << r-l << "\" height=\"" << t-b << "\" ";;
! }
MinGS(out);
Annotation(out);
Attributes(out);
! if (!svg_format())
! out << ")";
! else
! out << "/>\n";
return out.good();
}
Index: OverlayUnidraw/scriptview.c
diff -c OverlayUnidraw/scriptview.c:1.2 OverlayUnidraw/scriptview.c:1.3
*** OverlayUnidraw/scriptview.c:1.2 Mon Oct 7 13:01:56 2002
--- src/OverlayUnidraw/scriptview.c Tue Oct 22 12:10:09 2002
***************
*** 111,143 ****
out << w;
} else {
out << "stroke-width: " << w << "; ";
- out << "stroke-dasharray: ";
! /* reverse dash bit field */
! int reverse_p = 0;
! for (int i=0; i<16; i++) {
! reverse_p <<= 1;
! reverse_p |= p & 0x1;
! p >>= 1;
! }
!
! /* output count of on/off runs */
! boolean lastbit=1;
! int dashlen = 0;
! for (int i=0; i<16; i++) {
! boolean bit = reverse_p & 1;
! if (lastbit==bit) dashlen++;
! if (lastbit != bit || i==15) {
! out << dashlen;
! if (i != 15 ) out << ", ";
! dashlen=1;
}
! lastbit = bit;
! reverse_p >>= 1;
}
- out << "; ";
}
!
}
}
}
--- 111,146 ----
out << w;
} else {
out << "stroke-width: " << w << "; ";
! if (p != 0xffff) {
! out << "stroke-dasharray: ";
!
! /* reverse dash bit field */
! int reverse_p = 0;
! for (int i=0; i<16; i++) {
! reverse_p <<= 1;
! reverse_p |= p & 0x1;
! p >>= 1;
}
!
! /* output count of on/off runs */
! boolean lastbit=1;
! int dashlen = 0;
! for (int i=0; i<16; i++) {
! boolean bit = reverse_p & 1;
! if (lastbit==bit) dashlen++;
! if (lastbit != bit || i==15) {
! out << dashlen;
! if (i != 15 ) out << ", ";
! dashlen=1;
! }
! lastbit = bit;
! reverse_p >>= 1;
! }
! out << "; ";
}
}
!
}
}
}
***************
*** 159,164 ****
--- 162,171 ----
<< (int)(r*100) << "%,"
<< (int)(g*100) << "%,"
<< (int)(b*100) << "%) ";
+ out << "fill-color: rgb("
+ << (int)(r*100) << "%,"
+ << (int)(g*100) << "%,"
+ << (int)(b*100) << "%) ";
}
}
***************
*** 244,249 ****
--- 251,271 ----
out << " :graypat " << graylevel;
}
}
+ }
+ }
+
+ void OverlayScript::Transformation(ostream& out, char* keyword,
Graphic* gr = nil) {
+ Transformer* t = gr ? gr->GetTransformer() :
GetOverlayComp()->GetGraphic()->GetTransformer();
+ Transformer identity;
+
+ if (t != nil && *t != identity) {
+ char key[strlen(keyword)+4];
+ sprintf(key," :%s ",keyword);
+ float a00, a01, a10, a11, a20, a21;
+ t->GetEntries(a00, a01, a10, a11, a20, a21);
+ out << key;
+ out << a00 << "," << a01 << "," << a10 << ",";
+ out << a11 << "," << a20 << "," << a21;
}
}
Index: OverlayUnidraw/scriptview.h
diff -c OverlayUnidraw/scriptview.h:1.2 OverlayUnidraw/scriptview.h:1.3
*** OverlayUnidraw/scriptview.h:1.2 Mon Oct 7 13:01:57 2002
--- src/OverlayUnidraw/scriptview.h Tue Oct 22 12:10:09 2002
***************
*** 179,184 ****
--- 179,185 ----
virtual void Font(ostream& out);
virtual void Pattern(ostream& out);
virtual void Transformation(ostream& out);
+ virtual void Transformation(ostream& out, char* keyword,
Graphic* gr = nil);
virtual void Annotation(ostream& out);
void Attributes(ostream& out);
*** /dev/null Tue Oct 22 12:10:51 PDT 2002
--- patches/ivtools-021022-johnston-071
*************** patches/ivtools-021022-johnston-071
*** 0 ****
--- 1 ----
+ ivtools-021022-johnston-071
|
|
From: <ivt...@li...> - 2002-11-02 22:33:31
|
Patch: ivtools-021007-johnston-070
For: ivtools-1.0.6
Author: joh...@us...
Subject: SVG line export, export defaults to all if none selected
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:
- for those interested in playing along at home, ivtools now supports
export of line graphics via SVG, with support for variable widths,
colors, and dash-patterns.
- the export dialog box now defaults to everything if nothing is selected
in the drawing editor.
Index: IVGlyph/exportchooser.c
diff -c IVGlyph/exportchooser.c:1.2 IVGlyph/exportchooser.c:1.3
*** IVGlyph/exportchooser.c:1.2 Thu Sep 26 17:56:16 2002
--- src/IVGlyph/exportchooser.c Mon Oct 7 13:01:21 2002
***************
*** 95,101 ****
boolean ExportChooser::svg_format() {
return ((ExportChooserImpl*)impl_)->_obse
! ?
strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(),
"XSVG", 3) == 0
: false;
}
--- 95,101 ----
boolean ExportChooser::svg_format() {
return ((ExportChooserImpl*)impl_)->_obse
! ?
strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(),
"SVG", 3) == 0
: false;
}
Index: OverlayUnidraw/ovarrow.c
diff -c OverlayUnidraw/ovarrow.c:1.2 OverlayUnidraw/ovarrow.c:1.3
*** OverlayUnidraw/ovarrow.c:1.2 Fri Sep 27 11:57:05 2002
--- src/OverlayUnidraw/ovarrow.c Mon Oct 7 13:01:56 2002
***************
*** 344,361 ****
head = comp->GetArrowLine()->Head();
tail = comp->GetArrowLine()->Tail();
! out << "arrowline(";
! out << x0 << "," << y0 << "," << x1 << "," << y1;
! if (arrow_scale != 1 )
out << " :arrowscale " << arrow_scale;
! if (head)
out << " :head";
! if (tail)
out << " :tail";
! MinGS(out);
! Annotation(out);
! Attributes(out);
! out << ")";
return out.good();
}
--- 344,373 ----
head = comp->GetArrowLine()->Head();
tail = comp->GetArrowLine()->Tail();
! if (!svg_format()) {
!
! out << "arrowline(";
! out << x0 << "," << y0 << "," << x1 << "," << y1;
! if (arrow_scale != 1 )
out << " :arrowscale " << arrow_scale;
! if (head)
out << " :head";
! if (tail)
out << " :tail";
! MinGS(out);
! Annotation(out);
! Attributes(out);
! out << ")";
!
! } else {
!
! out << "<line x1=\"" << x0 << "\" y1=\"" << y0 << "\" x2=\""
<< x1 << "\" y2=\"" << y1 << "\" ";
! MinGS(out);
! Annotation(out);
! Attributes(out);
! out << " />\n";
! }
!
return out.good();
}
Index: OverlayUnidraw/ovexport.c
diff -c OverlayUnidraw/ovexport.c:1.2 OverlayUnidraw/ovexport.c:1.3
*** OverlayUnidraw/ovexport.c:1.2 Thu Sep 26 17:56:41 2002
--- src/OverlayUnidraw/ovexport.c Mon Oct 7 13:01:56 2002
***************
*** 98,109 ****
--- 98,111 ----
void OvExportCmd::Execute () {
Editor* ed = GetEditor();
+ #if 0
Selection* s = ed->GetSelection();
if (s->IsEmpty()) {
GAcknowledgeDialog::post
(ed->GetWindow(), "Nothing selected for export", nil, "no selection");
return;
}
+ #endif
Style* style;
boolean reset_caption = false;
***************
*** 170,234 ****
Selection* s = editor->GetSelection();
OverlayIdrawComp* real_top = (OverlayIdrawComp*)editor->GetComponent();
boolean ok = false;
! if (!s->IsEmpty()) {
! OverlayIdrawComp* false_top = new OverlayIdrawComp();
! Iterator i;
! s->First(i);
! while (!s->Done(i)) {
! if (chooser_->idraw_format() || chooser_->postscript_format())
! false_top->Append(new
OverlayComp(s->GetView(i)->GetGraphicComp()->GetGraphic()->Copy()));
! else
!
false_top->Append((OverlayComp*)s->GetView(i)->GetGraphicComp()->Copy());
! s->Next(i);
! }
! OverlayPS* ovpsv;
! if (chooser_->idraw_format() || chooser_->postscript_format())
! ovpsv = (OverlayPS*) false_top->Create(POSTSCRIPT_VIEW);
! else
! ovpsv = (OverlayPS*) false_top->Create(SCRIPT_VIEW);
! if (ovpsv != nil) {
!
! filebuf fbuf;
! char* tmpfilename;
!
! if (chooser_->to_printer()) {
! tmpfilename = tmpnam(nil);
! false_top->SetPathName(tmpfilename);
! ok = fbuf.open(tmpfilename, output) != 0;
! } else {
! ok = fbuf.open(pathname, output) != 0;
! }
!
! if (ok) {
! ostream out(&fbuf);
! false_top->Attach(ovpsv);
! ovpsv->SetCommand(this);
! if (!chooser_->idraw_format() &&
!chooser_->postscript_format())
!
((OverlayIdrawScript*)ovpsv)->SetByPathnameFlag(chooser_->by_pathname_flag());
! ovpsv->Update();
! ok = ovpsv->Emit(out);
! fbuf.close();
!
! if (chooser_->to_printer()) {
! char cmd[CHARBUFSIZE];
! if (strstr(pathname, "%s")) {
! char buf[CHARBUFSIZE];
! sprintf(buf, pathname, tmpfilename);
! sprintf(cmd, "(%s;rm %s)&", buf, tmpfilename);
! } else
! sprintf(cmd, "(%s %s;rm %s)&", pathname,
tmpfilename, tmpfilename);
! ok = system(cmd) == 0;
! }
! }
! delete ovpsv;
}
!
! delete false_top;
}
return ok;
}
const char* OvExportCmd::format() { return chooser_->format(); }
boolean OvExportCmd::idraw_format() { return chooser_->idraw_format(); }
--- 172,244 ----
Selection* s = editor->GetSelection();
OverlayIdrawComp* real_top = (OverlayIdrawComp*)editor->GetComponent();
boolean ok = false;
+
+ boolean empty = s->IsEmpty();
! OverlayIdrawComp* false_top = new OverlayIdrawComp();
! Iterator i;
! empty ? real_top->First(i) : s->First(i);
! while (empty ? !real_top->Done(i) : !s->Done(i)) {
! if (chooser_->idraw_format() || chooser_->postscript_format()) {
! OverlayComp* oc = empty
! ? new OverlayComp(real_top->GetComp(i)->GetGraphic()->Copy())
! : new
OverlayComp(s->GetView(i)->GetGraphicComp()->GetGraphic()->Copy());
! false_top->Append(oc);
! } else {
! OverlayComp* oc = empty
! ? (OverlayComp*)real_top->GetComp(i)->Copy()
! : (OverlayComp*)s->GetView(i)->GetGraphicComp()->Copy();
! false_top->Append(oc);
! }
! empty ? real_top->Next(i) : s->Next(i);
! }
!
! OverlayPS* ovpsv;
! if (chooser_->idraw_format() || chooser_->postscript_format())
! ovpsv = (OverlayPS*) false_top->Create(POSTSCRIPT_VIEW);
! else
! ovpsv = (OverlayPS*) false_top->Create(SCRIPT_VIEW);
! if (ovpsv != nil) {
!
! filebuf fbuf;
! char* tmpfilename;
!
! if (chooser_->to_printer()) {
! tmpfilename = tmpnam(nil);
! false_top->SetPathName(tmpfilename);
! ok = fbuf.open(tmpfilename, output) != 0;
! } else {
! ok = fbuf.open(pathname, output) != 0;
! }
!
! if (ok) {
! ostream out(&fbuf);
! false_top->Attach(ovpsv);
! ovpsv->SetCommand(this);
! if (!chooser_->idraw_format() && !chooser_->postscript_format())
!
((OverlayIdrawScript*)ovpsv)->SetByPathnameFlag(chooser_->by_pathname_flag());
! ovpsv->Update();
! ok = ovpsv->Emit(out);
! fbuf.close();
! if (chooser_->to_printer()) {
! char cmd[CHARBUFSIZE];
! if (strstr(pathname, "%s")) {
! char buf[CHARBUFSIZE];
! sprintf(buf, pathname, tmpfilename);
! sprintf(cmd, "(%s;rm %s)&", buf, tmpfilename);
! } else
! sprintf(cmd, "(%s %s;rm %s)&", pathname, tmpfilename, tmpfilename);
! ok = system(cmd) == 0;
}
! }
! delete ovpsv;
}
+
+ delete false_top;
return ok;
}
const char* OvExportCmd::format() { return chooser_->format(); }
boolean OvExportCmd::idraw_format() { return chooser_->idraw_format(); }
+ boolean OvExportCmd::svg_format() { return chooser_->svg_format(); }
Index: OverlayUnidraw/ovexport.h
diff -c OverlayUnidraw/ovexport.h:1.1 OverlayUnidraw/ovexport.h:1.2
*** OverlayUnidraw/ovexport.h:1.1 Fri Sep 13 09:51:22 2002
--- src/OverlayUnidraw/ovexport.h Mon Oct 7 13:01:56 2002
***************
*** 57,62 ****
--- 57,64 ----
// return string that indicates format: "drawtool" or "idraw".
virtual boolean idraw_format();
// true when format is "idraw".
+ virtual boolean svg_format();
+ // true when format is "svg".
protected:
ExportChooser* chooser_;
Index: OverlayUnidraw/ovpsview.c
diff -c OverlayUnidraw/ovpsview.c:1.2 OverlayUnidraw/ovpsview.c:1.3
*** OverlayUnidraw/ovpsview.c:1.2 Fri Sep 27 11:57:06 2002
--- src/OverlayUnidraw/ovpsview.c Mon Oct 7 13:01:56 2002
***************
*** 27,32 ****
--- 27,34 ----
*/
#include <OverlayUnidraw/ovclasses.h>
+ #include <OverlayUnidraw/ovexport.h>
+ #include <OverlayUnidraw/ovprint.h>
#include <OverlayUnidraw/ovpsview.h>
#include <UniIdraw/idarrows.h>
Index: OverlayUnidraw/ovpsview.h
diff -c OverlayUnidraw/ovpsview.h:1.2 OverlayUnidraw/ovpsview.h:1.3
*** OverlayUnidraw/ovpsview.h:1.2 Fri Sep 27 11:57:06 2002
--- src/OverlayUnidraw/ovpsview.h Mon Oct 7 13:01:56 2002
***************
*** 63,70 ****
virtual void Creator(ostream&);
// output idraw as creator
! boolean idraw_format();
! void idraw_format(boolean);
protected:
OverlayPS(OverlayComp* = nil);
static boolean _idraw_format;
--- 63,74 ----
virtual void Creator(ostream&);
// output idraw as creator
! boolean idraw_format();
! // true if exporting idraw EPS
! void idraw_format(boolean);
! // set flag for exporting idraw EPS
! // can be overridden by flag associated with Command objects
!
protected:
OverlayPS(OverlayComp* = nil);
static boolean _idraw_format;
Index: OverlayUnidraw/scriptview.c
diff -c OverlayUnidraw/scriptview.c:1.1 OverlayUnidraw/scriptview.c:1.2
*** OverlayUnidraw/scriptview.c:1.1 Fri Sep 13 09:51:26 2002
--- src/OverlayUnidraw/scriptview.c Mon Oct 7 13:01:56 2002
***************
*** 1,5 ****
/*
! * Copyright (c) 1994-1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this
software and its
* documentation for any purpose is hereby granted without fee, provided
--- 1,6 ----
/*
! * Copyright (C) 2002 Scott E. Johnston
! * Copyright (C) 1994-1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this
software and its
* documentation for any purpose is hereby granted without fee, provided
***************
*** 26,31 ****
--- 27,33 ----
#include <OverlayUnidraw/scriptview.h>
#include <OverlayUnidraw/ovcatalog.h>
#include <OverlayUnidraw/ovclasses.h>
+ #include <OverlayUnidraw/ovexport.h>
#include <ComTerp/parser.h>
***************
*** 66,71 ****
--- 68,74 ----
/*****************************************************************************/
boolean OverlayScript::_ptlist_parens = true;
+ boolean OverlayScript::_svg_format = false;
ClassId OverlayScript::GetClassId () { return OVERLAY_SCRIPT; }
***************
*** 81,88 ****
}
void OverlayScript::FillBg (ostream& out) {
! int filled = GetOverlayComp()->GetGraphic()->BgFilled();
out << " :fillbg " << filled;
}
void OverlayScript::Brush (ostream& out) {
--- 84,93 ----
}
void OverlayScript::FillBg (ostream& out) {
! int filled = GetOverlayComp()->GetGraphic()->BgFilled();
! if (!svg_format()) {
out << " :fillbg " << filled;
+ }
}
void OverlayScript::Brush (ostream& out) {
***************
*** 90,106 ****
if (brush != nil) {
! if (brush->None()) {
! out << " :nonebr";
} else {
! out << " :brush ";
! int p = brush->GetLinePattern();
! out << p << ",";
! float w = brush->width();
! out << w;
}
}
}
--- 95,144 ----
if (brush != nil) {
! if (brush->None()) {
!
! if (!svg_format()) {
! out << " :nonebr";
! }
!
! } else {
! int p = brush->GetLinePattern();
! float w = brush->width();
+ if (!svg_format()) {
+ out << " :brush ";
+ out << p << ",";
+ out << w;
} else {
! out << "stroke-width: " << w << "; ";
! out << "stroke-dasharray: ";
!
! /* reverse dash bit field */
! int reverse_p = 0;
! for (int i=0; i<16; i++) {
! reverse_p <<= 1;
! reverse_p |= p & 0x1;
! p >>= 1;
! }
! /* output count of on/off runs */
! boolean lastbit=1;
! int dashlen = 0;
! for (int i=0; i<16; i++) {
! boolean bit = reverse_p & 1;
! if (lastbit==bit) dashlen++;
! if (lastbit != bit || i==15) {
! out << dashlen;
! if (i != 15 ) out << ", ";
! dashlen=1;
! }
! lastbit = bit;
! reverse_p >>= 1;
! }
! out << "; ";
}
+
+ }
}
}
***************
*** 108,119 ****
PSColor* fgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetFgColor();
if (fgcolor != nil) {
! const char* name = fgcolor->GetName();
! out << " :fgcolor \"" << name << "\"";
! ColorIntensity r, g, b;
! fgcolor->GetIntensities(r, g, b);
out << "," << r << "," << g << "," << b;
}
}
--- 146,166 ----
PSColor* fgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetFgColor();
if (fgcolor != nil) {
!
! const char* name = fgcolor->GetName();
! ColorIntensity r, g, b;
! fgcolor->GetIntensities(r, g, b);
! if (!svg_format()) {
! out << " :fgcolor \"" << name << "\"";
out << "," << r << "," << g << "," << b;
+ } else {
+ out << "stroke: rgb("
+ << (int)(r*100) << "%,"
+ << (int)(g*100) << "%,"
+ << (int)(b*100) << "%) ";
+ }
+
}
}
***************
*** 121,144 ****
PSColor* bgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetBgColor();
if (bgcolor != nil) {
- const char* name = bgcolor->GetName();
- out << " :bgcolor \"" << name << "\"";
! ColorIntensity r, g, b;
! bgcolor->GetIntensities(r, g, b);
out << "," << r << "," << g << "," << b;
}
}
void OverlayScript::Font (ostream& out) {
PSFont* font = (PSFont*) GetOverlayComp()->GetGraphic()->GetFont();
if (font != nil) {
const char* name = font->GetName();
- out << " :font \"" << name << "\"" << ",";
const char* pf = font->GetPrintFont();
- out << "\"" << pf << "\"" << ",";
const char* ps = font->GetPrintSize();
! out << ps;
}
}
--- 168,200 ----
PSColor* bgcolor = (PSColor*)
GetOverlayComp()->GetGraphic()->GetBgColor();
if (bgcolor != nil) {
! const char* name = bgcolor->GetName();
! ColorIntensity r, g, b;
! bgcolor->GetIntensities(r, g, b);
!
! if (!svg_format()) {
! out << " :bgcolor \"" << name << "\"";
out << "," << r << "," << g << "," << b;
+ }
+
}
}
void OverlayScript::Font (ostream& out) {
PSFont* font = (PSFont*) GetOverlayComp()->GetGraphic()->GetFont();
if (font != nil) {
+
const char* name = font->GetName();
const char* pf = font->GetPrintFont();
const char* ps = font->GetPrintSize();
!
! if (!svg_format()) {
! out << " :font \"" << name << "\"" << ",";
! out << "\"" << pf << "\"" << ",";
! out << ps;
! }
!
}
}
***************
*** 146,202 ****
PSPattern* pat = (PSPattern*)
GetOverlayComp()->GetGraphic()->GetPattern();
if (pat != nil) {
! if (pat->None()) {
! out << " :nonepat";
! } else if (pat->GetSize() > 0) {
! const int* data = pat->GetData();
! int size = pat->GetSize();
! char buf[BUFSIZ];
! out << " :pattern ";
!
! if (size <= 8) {
! for (int i = 0; i < 8; i++) {
! sprintf(buf, "0x%02x", data[i] & 0xff);
! out << buf;
! if (i < 7 ) out << ",";
! }
!
! } else {
! for (int i = 0; i < patternHeight; i++) {
! sprintf(buf, "0x%0*x", patternWidth/4, data[i]);
! if (i != patternHeight - 1) {
! out << buf << ",";
! } else {
! out << buf;
! }
! }
}
!
! } else {
! float graylevel = pat->GetGrayLevel();
! out << " :graypat " << graylevel;
}
}
}
void OverlayScript::Transformation (ostream& out) {
! Transformation(out, "transform");
! }
!
! void OverlayScript::Transformation (ostream& out, char* keyword,
Graphic* gr) {
! Transformer* t = gr ? gr->GetTransformer() :
GetOverlayComp()->GetGraphic()->GetTransformer();
Transformer identity;
if (t != nil && *t != identity) {
! char key[strlen(keyword)+4];
! sprintf(key," :%s ",keyword);
! float a00, a01, a10, a11, a20, a21;
! t->GetEntries(a00, a01, a10, a11, a20, a21);
! out << key;
out << a00 << "," << a01 << "," << a10 << ",";
out << a11 << "," << a20 << "," << a21;
}
}
--- 202,269 ----
PSPattern* pat = (PSPattern*)
GetOverlayComp()->GetGraphic()->GetPattern();
if (pat != nil) {
+
+ if (pat->None()) {
+ if (!svg_format()) {
+ out << " :nonepat";
+ }
! } else if (pat->GetSize() > 0) {
!
! const int* data = pat->GetData();
! int size = pat->GetSize();
! char buf[BUFSIZ];
!
! if (!svg_format()) {
!
! out << " :pattern ";
!
! if (size <= 8) {
! for (int i = 0; i < 8; i++) {
! sprintf(buf, "0x%02x", data[i] & 0xff);
! out << buf;
! if (i < 7 ) out << ",";
}
!
! } else {
! for (int i = 0; i < patternHeight; i++) {
! sprintf(buf, "0x%0*x", patternWidth/4, data[i]);
! if (i != patternHeight - 1) {
! out << buf << ",";
! } else {
! out << buf;
! }
! }
! }
! }
!
! } else {
! float graylevel = pat->GetGrayLevel();
! if (!svg_format()) {
! out << " :graypat " << graylevel;
}
+ }
}
}
void OverlayScript::Transformation (ostream& out) {
! Graphic *gr = GetOverlayComp()->GetGraphic();
! Transformer* t = gr ? gr->GetTransformer() : nil;
Transformer identity;
if (t != nil && *t != identity) {
! float a00, a01, a10, a11, a20, a21;
! t->GetEntries(a00, a01, a10, a11, a20, a21);
! if (!svg_format()) {
! out << " :transform ";
out << a00 << "," << a01 << "," << a10 << ",";
out << a11 << "," << a20 << "," << a21;
+ } else {
+ out << "transform=\"matrix(";
+ out << a00 << " " << a01 << " " << a10 << " ";
+ out << a11 << " " << a20 << " " << a21 << ")\"";
+ }
}
}
***************
*** 205,213 ****
const char* anno = comp->GetAnnotation();
if (!anno)
return;
! out << " :annotation " << "\n";
! int indent = Indent(out);
! ParamList::output_text(out, anno, indent);
}
OverlayScript* OverlayScript::CreateOverlayScript (OverlayComp* comp) {
--- 272,282 ----
const char* anno = comp->GetAnnotation();
if (!anno)
return;
! if (!svg_format()) {
! out << " :annotation " << "\n";
! int indent = Indent(out);
! ParamList::output_text(out, anno, indent);
! }
}
OverlayScript* OverlayScript::CreateOverlayScript (OverlayComp* comp) {
***************
*** 262,267 ****
--- 331,347 ----
return true;
}
+ boolean OverlayScript::svg_format() {
+ boolean format = OverlayScript::_svg_format;
+ Command* cmd = GetCommand();
+ if (cmd) {
+ if (GetCommand()->IsA(OV_EXPORT_CMD))
+ format = ((OvExportCmd*)GetCommand())->svg_format();
+ }
+ return format;
+ }
+
+ void OverlayScript::svg_format(boolean flag) { _svg_format = flag; }
/*****************************************************************************/
***************
*** 745,758 ****
void OverlayScript::MinGS (ostream& out) {
if (!DefaultGS()) {
Clipboard* cb = GetGSList();
! if (cb)
out << " :gs " << MatchedGS(cb);
else {
FillBg(out);
Brush(out);
FgColor(out);
BgColor(out);
Pattern(out);
}
}
Transformation(out);
--- 825,840 ----
void OverlayScript::MinGS (ostream& out) {
if (!DefaultGS()) {
Clipboard* cb = GetGSList();
! if (cb && !svg_format())
out << " :gs " << MatchedGS(cb);
else {
+ if (svg_format()) out << "style=\"";
FillBg(out);
Brush(out);
FgColor(out);
BgColor(out);
Pattern(out);
+ if (svg_format()) out << "\" ";
}
}
Transformation(out);
***************
*** 1164,1169 ****
--- 1246,1254 ----
}
boolean OverlayIdrawScript::Emit (ostream& out) {
+ if (svg_format())
+ return EmitSvg(out);
+
out << "drawtool(";
/* make list and output unique point lists */
***************
*** 1254,1257 ****
--- 1339,1386 ----
boolean OverlayIdrawScript::GetByPathnameFlag() {
return _by_pathname;
}
+
+ boolean OverlayIdrawScript::EmitSvg (ostream& out) {
+ out << "<?xml version=\"1.0\"?>\n";
+ out << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0/EN\"\n";
+ out << "
\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n";
+
+ Coord l, b, r, t;
+ GetBox(l, b, r, t);
+
+ Coord w = r - l;
+ Coord h = t - b;
+
+ out << "<svg width=\"" << w << "\" height=\"" << h << "\" >\n";
+ out << "<title>ivtools drawing</title>\n";
+ out << "<desc>ivtools drawing</desc>\n";
+
+ out << "<g transform=\"matrix(1 0 0 -1 " << -l << " " << t << ")\" >\n";
+
+ /* output graphic components */
+ boolean status = true;
+ Iterator i;
+ First(i);
+
+ static int readonly_symval = symbol_add("readonly");
+ for (; status && !Done(i); ) {
+ OverlayScript* ev = (OverlayScript*)GetView(i);
+ boolean readonly = false;
+ AttributeList *al;
+ if (al = ev->GetOverlayComp()->attrlist()) {
+ AttributeValue* av = al->find(readonly_symval);
+ if (av) readonly = av->is_true();
+ }
+ if (!readonly) {
+ Indent(out);
+ status = ev->Definition(out);
+ }
+ Next(i);
+ }
+
+ out << "</g>\n";
+ out << "</svg>\n";
+ return status;
+ }
+
Index: OverlayUnidraw/scriptview.h
diff -c OverlayUnidraw/scriptview.h:1.1 OverlayUnidraw/scriptview.h:1.2
*** OverlayUnidraw/scriptview.h:1.1 Fri Sep 13 09:51:26 2002
--- src/OverlayUnidraw/scriptview.h Mon Oct 7 13:01:57 2002
***************
*** 1,5 ****
/*
! * Copyright (c) 1994-1997,1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this
software and its
* documentation for any purpose is hereby granted without fee, provided
--- 1,6 ----
/*
! * Copyright (C) 2002 Scott E. Johnston
! * Copyright (C) 1994-1997,1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this
software and its
* documentation for any purpose is hereby granted without fee, provided
***************
*** 164,169 ****
--- 165,176 ----
static void ptlist_parens(boolean flag) { _ptlist_parens = flag; }
// set flag that indicates putting parens around pointlist's
+ boolean svg_format();
+ // true if exporting SVG
+ void svg_format(boolean);
+ // set flag for exporting SVG
+ // can be overridden by flag associated with Command objects
+
protected:
virtual void FillBg(ostream& out);
virtual void Brush(ostream& out);
***************
*** 172,178 ****
virtual void Font(ostream& out);
virtual void Pattern(ostream& out);
virtual void Transformation(ostream& out);
- virtual void Transformation(ostream& out, char* keyword,
Graphic* gr = nil);
virtual void Annotation(ostream& out);
void Attributes(ostream& out);
--- 179,184 ----
***************
*** 185,190 ****
--- 191,197 ----
OverlayScript* _parent;
static boolean _ptlist_parens;
+ static boolean _svg_format;
};
//: composite version of OverlayScript.
***************
*** 288,293 ****
--- 295,303 ----
// return pointer to list of point lists that are stored in components.
virtual Clipboard* GetPicList();
// return pointer to list of composite graphics that are stored
in components.
+
+ virtual boolean EmitSvg(ostream&);
+ // serialize entire document to ostream in SVG format.
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
*** /dev/null Mon Oct 7 13:02:23 PDT 2002
--- patches/ivtools-021007-johnston-070
*************** patches/ivtools-021007-johnston-070
*** 0 ****
--- 1 ----
+ ivtools-021007-johnston-070
|
|
From: <ivt...@li...> - 2002-11-02 22:32:35
|
Patch: ivtools-020927-johnston-069
For: ivtools-1.0.6
Author: joh...@us...
Subject: refactor OverlayPS::idraw_format
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:
- refactor OverlayPS::idraw_format to be a pair of set/get methods
where the get method overrides the internal static member value
(_idraw_format) with the value of an idraw_format flag on an
associated Command if there is one, either OvExportCmd or OvPrintCmd.
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.1 ComUnidraw/unifunc.c:1.2
*** ComUnidraw/unifunc.c:1.1 Fri Sep 13 09:51:35 2002
--- src/ComUnidraw/unifunc.c Fri Sep 27 11:57:12 2002
***************
*** 512,518 ****
compout(comp, out);
*out << ")\n";
} else {
! OverlayPS::idraw_format = idraw_flag.is_true();
OverlayPS* psv = (OverlayPS*) comp->Create(POSTSCRIPT_VIEW);
comp->Attach(psv);
psv->Update();
--- 512,518 ----
compout(comp, out);
*out << ")\n";
} else {
! OverlayPS::idraw_format(idraw_flag.is_true());
OverlayPS* psv = (OverlayPS*) comp->Create(POSTSCRIPT_VIEW);
comp->Attach(psv);
psv->Update();
Index: OverlayUnidraw/ovarrow.c
diff -c OverlayUnidraw/ovarrow.c:1.1 OverlayUnidraw/ovarrow.c:1.2
*** OverlayUnidraw/ovarrow.c:1.1 Fri Sep 13 09:51:20 2002
--- src/OverlayUnidraw/ovarrow.c Fri Sep 27 11:57:05 2002
***************
*** 621,636 ****
boolean ArrowMultiLinePS::Definition (ostream& out) {
! Command* cmd = GetCommand();
! boolean idraw_format = OverlayPS::idraw_format;
! if (cmd) {
! if (cmd->IsA(OVPRINT_CMD))
! idraw_format = ((OvPrintCmd*)cmd)->idraw_format();
! else if (cmd->IsA(OV_EXPORT_CMD))
! idraw_format = true;
! }
!
! if (idraw_format) {
ArrowMultiLineOvComp* comp = (ArrowMultiLineOvComp*) GetSubject();
ArrowMultiLine* aml = comp->GetArrowMultiLine();
--- 621,627 ----
boolean ArrowMultiLinePS::Definition (ostream& out) {
! if (idraw_format()) {
ArrowMultiLineOvComp* comp = (ArrowMultiLineOvComp*) GetSubject();
ArrowMultiLine* aml = comp->GetArrowMultiLine();
Index: OverlayUnidraw/ovpsview.c
diff -c OverlayUnidraw/ovpsview.c:1.1 OverlayUnidraw/ovpsview.c:1.2
*** OverlayUnidraw/ovpsview.c:1.1 Fri Sep 13 09:51:24 2002
--- src/OverlayUnidraw/ovpsview.c Fri Sep 27 11:57:06 2002
***************
*** 101,107 ****
/*****************************************************************************/
! boolean OverlayPS::idraw_format = true;
ClassId OverlayPS::GetClassId () { return OVERLAY_PS; }
--- 101,107 ----
/*****************************************************************************/
! boolean OverlayPS::_idraw_format = true;
ClassId OverlayPS::GetClassId () { return OVERLAY_PS; }
***************
*** 114,120 ****
}
void OverlayPS::Creator (ostream& out) {
! out << "%%Creator: " << (idraw_format ? "idraw" : "unidraw") << "\n";
}
UList* OverlayPS::GetPSFonts () {
--- 114,120 ----
}
void OverlayPS::Creator (ostream& out) {
! out << "%%Creator: " << (idraw_format() ? "idraw" : "unidraw") << "\n";
}
UList* OverlayPS::GetPSFonts () {
***************
*** 182,187 ****
--- 182,201 ----
OverlayComp* OverlayPS::GetOverlayComp () {
return (OverlayComp*) GetSubject();
}
+
+ boolean OverlayPS::idraw_format() {
+ boolean format = OverlayPS::_idraw_format;
+ Command* cmd = GetCommand();
+ if (cmd) {
+ if (GetCommand()->IsA(OV_EXPORT_CMD))
+ format = ((OvExportCmd*)GetCommand())->idraw_format();
+ else if (GetCommand() && GetCommand()->IsA(OVPRINT_CMD))
+ format = ((OvPrintCmd*)GetCommand())->idraw_format();
+ }
+ return format;
+ }
+
+ void OverlayPS::idraw_format(boolean flag) { _idraw_format = flag; }
/*****************************************************************************/
Index: OverlayUnidraw/ovpsview.h
diff -c OverlayUnidraw/ovpsview.h:1.1 OverlayUnidraw/ovpsview.h:1.2
*** OverlayUnidraw/ovpsview.h:1.1 Fri Sep 13 09:51:24 2002
--- src/OverlayUnidraw/ovpsview.h Fri Sep 27 11:57:06 2002
***************
*** 63,71 ****
virtual void Creator(ostream&);
// output idraw as creator
! static boolean idraw_format;
protected:
OverlayPS(OverlayComp* = nil);
Command* _command;
};
--- 63,73 ----
virtual void Creator(ostream&);
// output idraw as creator
! boolean idraw_format();
! void idraw_format(boolean);
protected:
OverlayPS(OverlayComp* = nil);
+ static boolean _idraw_format;
Command* _command;
};
Index: OverlayUnidraw/ovraster.c
diff -c OverlayUnidraw/ovraster.c:1.1 OverlayUnidraw/ovraster.c:1.2
*** OverlayUnidraw/ovraster.c:1.1 Fri Sep 13 09:51:24 2002
--- src/OverlayUnidraw/ovraster.c Fri Sep 27 11:57:06 2002
***************
*** 364,376 ****
Coord w = raster->Width();
Coord h = raster->Height();
! boolean idraw_format = OverlayPS::idraw_format;
! if (GetCommand() && GetCommand()->IsA(OV_EXPORT_CMD))
! idraw_format = ((OvExportCmd*)GetCommand())->idraw_format();
! else if (GetCommand() && GetCommand()->IsA(OVPRINT_CMD))
! idraw_format = ((OvPrintCmd*)GetCommand())->idraw_format();
!
! if (idraw_format) {
out << "Begin " << MARK << " " << "Rast\n";
Transformation(out);
--- 364,370 ----
Coord w = raster->Width();
Coord h = raster->Height();
! if (idraw_format()) {
out << "Begin " << MARK << " " << "Rast\n";
Transformation(out);
*** /dev/null Fri Sep 27 11:57:36 PDT 2002
--- patches/ivtools-020927-johnston-069
*************** patches/ivtools-020927-johnston-069
*** 0 ****
--- 1 ----
+ ivtools-020927-johnston-069
|