ivtools-patch Mailing List for ivtools (Page 11)
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...> - 2000-02-25 23:22:11
|
Patch: ivtools-000226-johnston-027
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- derive ComGlyph's ComTextEditor and ComTE_View from IVGlyph's
EivTextEditor and TE_View. This adds an interactive command
interpreter capability to the text editor object, where the user can
enter expressions and see results computed. While a command history
plus anything else goes to stdout, the results follow just the
expression, so it is sometimes easier to keep track of the commands
you're using. All of stdout could be rerouted to the texteditor
window in the future. vhclmaps vhclviewer is the first place in the
source tree where this capability is exposed for now. Check it out.
- settle on "dotname" for the command that returns the name of a
name/value attribute pair. This is because "." (dot) is the operator
used to create attribute list objects in the comterp command
interpreter. Normally most attribute objects are automatically
indirected to the attribute value when finally applied, but in this
command overrides that and returns the symbol which is the attribute
name.
Index: top_ivtools/MANIFEST
diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2
*** top_ivtools/MANIFEST:1.1 Tue Jan 18 03:06:44 2000
--- ./MANIFEST Sat Feb 26 03:07:22 2000
***************
*** 125,130 ****
--- 125,134 ----
ivtools-0.8/src/ComGlyph/Makefile
ivtools-0.8/src/ComGlyph/attrdialog.c
ivtools-0.8/src/ComGlyph/attrdialog.h
+ ivtools-0.8/src/ComGlyph/comtextedit.c
+ ivtools-0.8/src/ComGlyph/comtextedit.h
+ ivtools-0.8/src/ComGlyph/comtextview.c
+ ivtools-0.8/src/ComGlyph/comtextview.h
ivtools-0.8/src/ComGlyph/terpdialog.c
ivtools-0.8/src/ComGlyph/terpdialog.h
ivtools-0.8/src/ComTerp/Imakefile
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.8 ComTerp/comterp.c:1.9
*** ComTerp/comterp.c:1.8 Wed Feb 23 04:27:32 2000
--- src/ComTerp/comterp.c Sat Feb 26 03:07:26 2000
***************
*** 679,687 ****
_quitflag = flag;
}
! int ComTerp::run(boolean once) {
! int status = 0;
_errbuf[0] = '\0';
filebuf fbuf;
if (handler()) {
--- 679,689 ----
_quitflag = flag;
}
! int ComTerp::run(boolean one_expr) {
! int status = 1;
_errbuf[0] = '\0';
+ char errbuf_save[BUFSIZ];
+ errbuf_save[0] = '\0';
filebuf fbuf;
if (handler()) {
***************
*** 695,701 ****
--- 697,707 ----
while (!eof() && !quitflag() && !eolflag) {
if (read_expr()) {
+ status = 0;
+ int top_before = _stack_top;
eval_expr();
+ if (top_before == _stack_top)
+ status = 2;
err_str( _errbuf, BUFSIZ, "comterp" );
if (strlen(_errbuf)==0) {
if (quitflag()) {
***************
*** 707,725 ****
}
} else {
out << _errbuf << "\n"; out.flush();
_errbuf[0] = '\0';
}
} else {
err_str( _errbuf, BUFSIZ, "comterp" );
if (strlen(_errbuf)>0) {
out << _errbuf << "\n"; out.flush();
_errbuf[0] = '\0';
! } else
eolflag = true;
}
_stack_top = -1;
! if (once) break;
}
return status;
}
--- 713,736 ----
}
} else {
out << _errbuf << "\n"; out.flush();
+ strcpy(errbuf_save, _errbuf);
_errbuf[0] = '\0';
}
} else {
err_str( _errbuf, BUFSIZ, "comterp" );
if (strlen(_errbuf)>0) {
out << _errbuf << "\n"; out.flush();
+ strcpy(errbuf_save, _errbuf);
_errbuf[0] = '\0';
! } else {
eolflag = true;
+ if (errbuf_save[0]) strcpy(_errbuf, errbuf_save);
+ }
}
_stack_top = -1;
! if (one_expr) break;
}
+ if (status==1 && _pfnum==0) status=2;
return status;
}
***************
*** 771,777 ****
add_command("iterate", new IterateFunc(this));
add_command("dot", new DotFunc(this));
! add_command("name", new DotNameFunc(this));
add_command("list", new ListFunc(this));
add_command("at", new ListAtFunc(this));
--- 782,788 ----
add_command("iterate", new IterateFunc(this));
add_command("dot", new DotFunc(this));
! add_command("dotname", new DotNameFunc(this));
add_command("list", new ListFunc(this));
add_command("at", new ListAtFunc(this));
Index: ComTerp/comterp.h
diff -c ComTerp/comterp.h:1.4 ComTerp/comterp.h:1.5
*** ComTerp/comterp.h:1.4 Sat Feb 19 00:59:05 2000
--- src/ComTerp/comterp.h Sat Feb 26 03:07:26 2000
***************
*** 148,155 ****
virtual void exit(int status=0);
// call _exit().
! virtual int run(boolean once=false);
! // run interpreter until end-of-file or quit command, unless 'once' is true.
virtual int runfile(const char* filename);
// run interpreter on contents of 'filename'.
void add_defaults();
--- 148,159 ----
virtual void exit(int status=0);
// call _exit().
! virtual int run(boolean one_expr=false);
! // run interpreter until end-of-file or quit command, unless
! // 'one_expr' is true. Leave 'one_expr' false when using a ComTerpServ.
! // Return Value: -1 if eof, 0 if normal operation, 1 if
! // partial expression parsed, 2 if no result computed
!
virtual int runfile(const char* filename);
// run interpreter on contents of 'filename'.
void add_defaults();
***************
*** 206,211 ****
--- 210,218 ----
void clr_val_for_next_func();
// clear out ComValue to pass to subequent command
+ unsigned int& linenum() { return _linenum; }
+ // count of lines processed
+
protected:
void incr_stack();
void incr_stack(int n);
***************
*** 232,237 ****
--- 239,245 ----
unsigned int _stack_siz;
boolean _quitflag;
char* _errbuf;
+ char* _errbuf2;
int _pfoff;
boolean _brief; // when used to produce ComValue output
boolean _just_reset;
Index: IVGlyph/textedit.c
diff -c IVGlyph/textedit.c:1.1 IVGlyph/textedit.c:1.2
*** IVGlyph/textedit.c:1.1 Tue Jan 18 03:08:21 2000
--- src/IVGlyph/textedit.c Sat Feb 26 03:07:33 2000
***************
*** 52,82 ****
#include "texteditor.h"
#include "textview.h"
- // Adjustable, used to control scrolling
- class TE_Adjustable : public Adjustable, public Observer {
- public:
- TE_Adjustable(TE_View*);
-
- virtual void update(Observable*);
-
- virtual Coord lower(DimensionName) const;
- virtual Coord upper(DimensionName) const;
- virtual Coord length(DimensionName) const;
- virtual Coord cur_lower(DimensionName) const;
- virtual Coord cur_upper(DimensionName) const;
- virtual Coord cur_length(DimensionName) const;
-
- virtual void scroll_forward(DimensionName);
- virtual void scroll_backward(DimensionName);
- virtual void page_forward(DimensionName);
- virtual void page_backward(DimensionName);
-
- virtual void scroll_to(DimensionName, Coord lower);
- virtual void scroll_by(DimensionName, long);
- private:
- TE_View* te_view_;
- };
-
// TE Adjustable
TE_Adjustable::TE_Adjustable(TE_View* te_view)
--- 52,57 ----
***************
*** 155,160 ****
--- 130,137 ----
notify(Dimension_Y); // notify scrollbar
}
+
+ EivTextEditor::EivTextEditor() { }
EivTextEditor::EivTextEditor(Style* s, boolean active)
{
Index: IVGlyph/textedit.h
diff -c IVGlyph/textedit.h:1.1 IVGlyph/textedit.h:1.2
*** IVGlyph/textedit.h:1.1 Tue Jan 18 03:08:21 2000
--- src/IVGlyph/textedit.h Sat Feb 26 03:07:33 2000
***************
*** 28,41 ****
--- 28,46 ----
// TextEditor*textFont fixed
//
+ #include <InterViews/monoglyph.h>
+
typedef unsigned int EivTextUnit;
+ class Style;
+ class InputHandler;
class TE_Adjustable;
class TE_View;
class EivTextEditor : public MonoGlyph {
public:
EivTextEditor(Style*, boolean active= true);
+ EivTextEditor();
virtual ~EivTextEditor();
// load/save file. Default for save is to save to current
***************
*** 90,95 ****
--- 95,128 ----
TE_View* te_view_;
Glyph* sb_;
Style* style_;
+ };
+
+ #include <InterViews/adjust.h>
+ #include <InterViews/observe.h>
+
+ // Adjustable, used to control scrolling
+ class TE_Adjustable : public Adjustable, public Observer {
+ public:
+ TE_Adjustable(TE_View*);
+
+ virtual void update(Observable*);
+
+ virtual FloatCoord lower(DimensionName) const;
+ virtual FloatCoord upper(DimensionName) const;
+ virtual FloatCoord length(DimensionName) const;
+ virtual FloatCoord cur_lower(DimensionName) const;
+ virtual FloatCoord cur_upper(DimensionName) const;
+ virtual FloatCoord cur_length(DimensionName) const;
+
+ virtual void scroll_forward(DimensionName);
+ virtual void scroll_backward(DimensionName);
+ virtual void page_forward(DimensionName);
+ virtual void page_backward(DimensionName);
+
+ virtual void scroll_to(DimensionName, FloatCoord lower);
+ virtual void scroll_by(DimensionName, long);
+ private:
+ TE_View* te_view_;
};
#endif
Index: IVGlyph/textview.h
diff -c IVGlyph/textview.h:1.4 IVGlyph/textview.h:1.5
*** IVGlyph/textview.h:1.4 Wed Feb 2 03:09:40 2000
--- src/IVGlyph/textview.h Sat Feb 26 03:07:33 2000
***************
*** 131,137 ****
const char* text();
void text(const char*, boolean update =true);
! private:
void scroll_to_line(int line);
void make_visible(const boolean scroll_page = true);
int event_to_index(const Event&);
--- 131,138 ----
const char* text();
void text(const char*, boolean update =true);
!
! protected:
void scroll_to_line(int line);
void make_visible(const boolean scroll_page = true);
int event_to_index(const Event&);
Index: ComGlyph/Imakefile
diff -c ComGlyph/Imakefile:1.1 ComGlyph/Imakefile:1.2
*** ComGlyph/Imakefile:1.1 Tue Jan 18 03:09:44 2000
--- src/ComGlyph/Imakefile Sat Feb 26 03:07:46 2000
***************
*** 16,21 ****
--- 16,23 ----
#define Obj31(file) MakeObjectFromSrcFlags(file, -Uiv2_6_compatible -I$(TOP)/src/include $(TOP_CCINCLUDES))
Obj31(attrdialog)
+ Obj31(comtextedit)
+ Obj31(comtextview)
Obj31(terpdialog)
IncludeDependencies()
Index: ComGlyph/comtextedit.c
diff -c /dev/null ComGlyph/comtextedit.c:1.1
*** /dev/null Sat Feb 26 03:07:47 2000
--- src/ComGlyph/comtextedit.c Sat Feb 26 03:07:46 2000
***************
*** 0 ****
--- 1,110 ----
+ /*
+ * Copyright (c) 2000 IET Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * related documentation and data files 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.
+ */
+
+
+ // layered on top of classes distributed with this license:
+ //
+ // Simple Text Editor Implementation
+ //
+ // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories
+ //
+ // Permission is granted to any individual or institution to use, copy,
+ // modify, and distribute this software, provided that this complete
+ // copyright and permission notice is maintained, intact, in all copies
+ // and supporting documentation.
+ //
+ // Ellemtel Telecommunication Systems Labratories make no representation
+ // of the suitability of this software for any purpose. It is provided
+ // "as is" without any expressed or implied warranty.
+ //
+ // Jan Andersson, Torpa Konsult AB
+ // ja...@to... - 1993-08-29
+ //
+
+ #include <ComTerp/comterpserv.h>
+ #include <ComGlyph/comtextedit.h>
+ #include <ComGlyph/comtextview.h>
+ #include <IVGlyph/textbuff.h>
+ #include <InterViews/background.h>
+ #include <InterViews/color.h>
+ #include <InterViews/layout.h>
+ #include <InterViews/session.h>
+ #include <InterViews/style.h>
+ #include <InterViews/style.h>
+ #include <IV-look/kit.h>
+ #include <OS/string.h>
+
+ ComTextEditor::ComTextEditor(Style* s, ComTerpServ* comterp, boolean active) : EivTextEditor() {
+
+ const LayoutKit& layout = *LayoutKit::instance();
+ WidgetKit& kit = *WidgetKit::instance();
+
+ style_ = new Style("TextEditor", s);
+ Resource::ref(style_);
+
+ double rows = 24;
+ (void) style_->find_attribute("rows", rows);
+ double cols = 80;
+ (void) style_->find_attribute("columns", cols);
+
+ // create buffer and view
+ EivTextBuffer* te_buffer = new EivTextBuffer();
+ te_view_ = new ComTE_View(style_, te_buffer, int(rows), int(cols), active);
+ ((ComTE_View*)te_view_)->comterp(comterp);
+
+ // attach adjustable and scrollbar
+ te_adjustable_ = new TE_Adjustable(te_view_);
+ te_view_->attach(te_adjustable_);
+ sb_ = kit.vscroll_bar(te_adjustable_);
+
+ Display* d = Session::instance()->default_display();
+ const Color* bg = Color::lookup(d, "#aaaaaa");
+ if (bg == nil)
+ bg = new Color(0.7,0.7,0.7,1.0);
+
+ body(
+ new Background(
+ layout.margin(
+ layout.hbox(
+ kit.inset_frame(
+ layout.vcenter(layout.margin(te_view_, 2.0), 1.0)
+ ),
+ layout.hspace(4.0),
+ sb_
+ ),
+ 5.0),
+ bg
+ )
+ );
+ }
+
+ ComTextEditor::~ComTextEditor()
+ {
+ }
+
+ ComTE_View* ComTextEditor::comtextview() { return (ComTE_View*)te_view_; }
+
+
+
+
+
+
Index: ComGlyph/comtextedit.h
diff -c /dev/null ComGlyph/comtextedit.h:1.1
*** /dev/null Sat Feb 26 03:07:47 2000
--- src/ComGlyph/comtextedit.h Sat Feb 26 03:07:46 2000
***************
*** 0 ****
--- 1,60 ----
+ /*
+ * Copyright (c) 2000 IET Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * related documentation and data files 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.
+ */
+
+
+ // layered on top of classes distributed with this license:
+ //
+ // Simple Text Editor
+ //
+ //
+ // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories
+ //
+ // Permission is granted to any individual or institution to use, copy,
+ // modify, and distribute this software, provided that this complete
+ // copyright and permission notice is maintained, intact, in all copies
+ // and supporting documentation.
+ //
+ // Ellemtel Telecommunication Systems Labratories make no representation
+ // of the suitability of this software for any purpose. It is provided
+ // "as is" without any expressed or implied warranty.
+ //
+ // Jan Andersson, Torpa Konsult AB
+ // ja...@to... - 1993-08-29
+
+ #ifndef com_texteditor_h
+ #define com_texteditor_h
+
+ #include <IVGlyph/textedit.h>
+
+ class ComTE_View;
+ class ComTerpServ;
+ class Style;
+
+ class ComTextEditor : public EivTextEditor {
+ public:
+ ComTextEditor(Style*, ComTerpServ* comterp=nil, boolean active=true);
+ virtual ~ComTextEditor(); ComTE_View* comtextview();
+
+ };
+
+ #endif
+
Index: ComGlyph/comtextview.c
diff -c /dev/null ComGlyph/comtextview.c:1.1
*** /dev/null Sat Feb 26 03:07:47 2000
--- src/ComGlyph/comtextview.c Sat Feb 26 03:07:46 2000
***************
*** 0 ****
--- 1,242 ----
+ /*
+ * Copyright (c) 2000 IET Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * related documentation and data files 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.
+ */
+
+
+ // layered on top of classes distributed with this license:
+ //
+ // Simple Text Editor Implementation
+ //
+ // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories
+ //
+ // Permission is granted to any individual or institution to use, copy,
+ // modify, and distribute this software, provided that this complete
+ // copyright and permission notice is maintained, intact, in all copies
+ // and supporting documentation.
+ //
+ // Ellemtel Telecommunication Systems Labratories make no representation
+ // of the suitability of this software for any purpose. It is provided
+ // "as is" without any expressed or implied warranty.
+ //
+ // Jan Andersson, Torpa Konsult AB
+ // ja...@to... - 1993-08-29
+ //
+
+
+ #include <ComGlyph/comtextview.h>
+ #include <IVGlyph/textbuff.h>
+ #include <IVGlyph/texteditor.h>
+ #include <InterViews/event.h>
+ #include <ComTerp/comterpserv.h>
+ #include <ComTerp/comvalue.h>
+ #include <ctype.h>
+ #include <iostream.h>
+ #include <strstream.h>
+
+ #define XK_MISCELLANY /* to get the keysym's we need */
+ #include <X11/keysymdef.h>
+
+ // Note: Sun-specific keyboard symbols
+ static TE_ViewKeySymInfo default_key_sym_map[] = {
+ { XK_Down, &TE_View::down },
+ { XK_Up, &TE_View::up },
+ { XK_Left, &TE_View::left },
+ { XK_Right, &TE_View::right },
+ { XK_BackSpace, &TE_View::delete_backward },
+ { XK_Delete, &TE_View::delete_backward },
+ { XK_Return, (TE_ViewKeyFunc)&ComTE_View::newline },
+ { XK_Linefeed, (TE_ViewKeyFunc)&ComTE_View::newline },
+ { XK_KP_Enter, (TE_ViewKeyFunc)&ComTE_View::newline },
+ { XK_R9, &TE_View::page_up }, // PgUp
+ { XK_R15, &TE_View::page_down }, // PgDn
+ { XK_L6, &TE_View::copy }, // Copy (L6)
+ { XK_L8, &TE_View::paste_buffer }, // Paste (L8)
+ { XK_L9, &TE_View::find_selection_forward }, // Find (L9)
+ { XK_L10, &TE_View::cut }, // Cut (L10)
+ { XK_R7, &TE_View::beginning_of_text }, // Home
+ { XK_R13, &TE_View::end_of_text }, // End
+ { 0, nil }
+ };
+
+ implementSelectionCallback(ComTE_View);
+ implementActionCallback(ComTE_View);
+
+ // TE View
+
+ ComTE_View::ComTE_View(Style* s, EivTextBuffer* te_buffer, int rows, int cols,
+ boolean active)
+ : TE_View(s, te_buffer, rows, cols, active)
+ {
+ _continuation = false;
+ _parendepth = 0;
+ }
+
+ ComTE_View::~ComTE_View()
+ {
+ }
+
+ void ComTE_View::keystroke(const Event& e)
+ {
+ if (active_) {
+ current_window_ = e.window();
+
+ // check if known key symbol
+ unsigned long keysym = e.keysym();
+ for (TE_ViewKeySymInfo* k = &default_key_sym_map[0];
+ k->keysym != 0; k++) {
+ if (keysym == k->keysym) {
+ TE_ViewKeyFunc f = k->func;
+ (this->*f)();
+ return;
+ }
+ }
+
+ // map event to key
+ signed char c;
+ if (e.mapkey((char *)&c, 1) == 0)
+ return;
+
+ // check if known key map
+ #ifndef __sgi /* avoid SGI gcc warning */
+ if (c >= 0) { // fix alt-V on linux/pc
+ #else
+ if (1) {
+ #endif
+ TE_ViewKeyFunc f = key_[c];
+ if (f != nil) {
+ (this->*f)();
+ return;
+ }
+ }
+
+ #ifndef __sgi /* avoid SGI gcc warning */
+ if (c >= 0 && (isspace(c) || !iscntrl(c)))
+ #else
+ if (isspace(c) || !iscntrl(c))
+ #endif
+ insert_char(c);
+ else
+ cerr << "Unknown character - ignored!\n";
+ }
+ }
+
+ void ComTE_View::newline()
+ {
+ beginning_of_line();
+ int mark = text_editor_->Dot();
+ end_of_line();
+ int dot = text_editor_->Dot();
+ int len = dot-mark;
+ char* buffer = new char [len+1];
+ te_buffer_->Copy(mark, buffer, len);
+ buffer[len] = '\0';
+
+ /* put newline in text editor */
+ insert_char('\n');
+
+ /* run this line through comterp */
+ boolean old_brief = comterp()->brief();
+ comterp()->brief(1);
+ cout << "\n" << comterp()->linenum()+1 << ": " << buffer << "\n";
+
+ /* strip # comments */
+ /* and keep track of paren depth at the same time */
+ boolean inquote = false;
+ char* bufptr = buffer;
+ while(*bufptr) {
+ if (!inquote && (*bufptr== '(' || *bufptr=='[' || *bufptr =='{'))
+ _parendepth++;
+ else if (!inquote && (*bufptr== ')' || *bufptr==']' || *bufptr =='}'))
+ _parendepth--;
+
+ if (!inquote && *bufptr=='#')
+ *bufptr = '\0';
+ else if (*bufptr=='"') {
+ if (inquote) {
+ if (*(bufptr-1)!= '\\') inquote = false;
+ } else
+ inquote = true;
+ }
+ ++bufptr;
+ }
+
+ /* check for trailing semi-colon that isn't in parens, and remove it */
+ bufptr = buffer + strlen(buffer) - 1;
+ if (!_parendepth) {
+ while(bufptr>=buffer) {
+ char ch = *bufptr;
+ if (ch==';') {
+ *bufptr=' ';
+ break;
+ } else if (!isspace(ch))
+ break;
+ bufptr--;
+ }
+ }
+
+ /* remove the "> " prompt if there was one */
+ bufptr = buffer;
+ if (_continuation) {
+ if (buffer[0]=='>') {
+ beginning_of_line();
+ backward_line();
+ delete_forward();
+ insert_char(' ');
+ bufptr++;
+ if (buffer[1]==' ') {
+ delete_forward();
+ insert_char(' ');
+ bufptr++;
+ }
+ }
+ forward_line();
+ end_of_line();
+ }
+
+ /* load and interpret if expression closed */
+ comterp()->load_string(bufptr);
+ int status = comterp()->ComTerp::run(false /* !once */);
+ comterp()->linenum()--;
+ ComValue result(comterp()->stack_top(1));
+ ostream* out = new strstream();
+ if (*comterp()->errmsg()) {
+ *out << comterp()->errmsg() << "\n";
+ cout << comterp()->errmsg() << "\n";
+ } else {
+ if (status==0) {
+ result.comterp(comterp());
+ *out << result << "\n";
+ _continuation = false;
+ _parendepth=0;
+ } else if (status==1) {
+ insert_string("> ", 2);
+ _continuation = true;
+ }
+ }
+ out->put('\0');
+ out->flush();
+ strstream* sout = (strstream*)out;
+ insert_string(sout->str(), strlen(sout->str()));
+ comterp()->brief(old_brief);
+ delete out;
+ delete buffer;
+ }
+
Index: ComGlyph/comtextview.h
diff -c /dev/null ComGlyph/comtextview.h:1.1
*** /dev/null Sat Feb 26 03:07:47 2000
--- src/ComGlyph/comtextview.h Sat Feb 26 03:07:46 2000
***************
*** 0 ****
--- 1,68 ----
+ /*
+ * Copyright (c) 2000 IET Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * related documentation and data files 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.
+ */
+
+ // layered on top of classes distributed with this license:
+ //
+ // Simple Text Editor Implementation
+ //
+ // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories
+ //
+ // Permission is granted to any individual or institution to use, copy,
+ // modify, and distribute this software, provided that this complete
+ // copyright and permission notice is maintained, intact, in all copies
+ // and supporting documentation.
+ //
+ // Ellemtel Telecommunication Systems Labratories make no representation
+ // of the suitability of this software for any purpose. It is provided
+ // "as is" without any expressed or implied warranty.
+ //
+ // Jan Andersson, Torpa Konsult AB
+ // ja...@to... - 1993-08-29
+ //
+
+ #ifndef comtextview_h
+ #define comtextview_h
+
+ #include <IVGlyph/textview.h>
+
+ class ComTerpServ;
+
+ class ComTE_View :public TE_View {
+ public:
+ ComTE_View(Style*, EivTextBuffer*, int rows, int cols, boolean active);
+ ~ComTE_View();
+
+ virtual void keystroke(const Event&);
+ void newline();
+ ComTerpServ* comterp() { return _comterp; }
+ void comterp(ComTerpServ* cterp) { _comterp = cterp; }
+ private:
+
+ ComTerpServ* _comterp;
+ boolean _continuation;
+ int _parendepth;
+ };
+
+ declareSelectionCallback(ComTE_View);
+ declareActionCallback(ComTE_View);
+
+ #endif
Index: ComUnidraw/comeditor.h
diff -c ComUnidraw/comeditor.h:1.1 ComUnidraw/comeditor.h:1.2
*** ComUnidraw/comeditor.h:1.1 Tue Jan 18 03:11:05 2000
--- src/ComUnidraw/comeditor.h Sat Feb 26 03:07:50 2000
***************
*** 49,55 ****
--- 49,59 ----
ComTerpServ* GetComTerp() { return _terp;}
// return pointer to associated ComTerp (always a ComTerpServ).
+ ComTerpServ* comterp() { return _terp;}
+ // return pointer to associated ComTerp (always a ComTerpServ).
void SetComTerp(ComTerpServ* terp) { _terp = terp;}
+ // set pointer to associated ComTerp (always a ComTerpServ).
+ void comterp(ComTerpServ* terp) { _terp = terp;}
// set pointer to associated ComTerp (always a ComTerpServ).
virtual void ExecuteCmd(Command* cmd);
Index: FrameUnidraw/framekit.c
diff -c FrameUnidraw/framekit.c:1.2 FrameUnidraw/framekit.c:1.3
*** FrameUnidraw/framekit.c:1.2 Wed Feb 23 04:27:54 2000
--- src/FrameUnidraw/framekit.c Sat Feb 26 03:07:52 2000
***************
*** 65,70 ****
--- 65,71 ----
#include <UniIdraw/idkybd.h>
+ #include <InterViews/box.h>
#include <InterViews/frame.h>
#include <InterViews/layout.h>
#include <InterViews/session.h>
***************
*** 74,80 ****
#include <InterViews/window.h>
#include <IV-look/kit.h>
#include <IV-look/mf_kit.h>
! #include <IVGlyph/textedit.h>
#include <OS/string.h>
--- 75,81 ----
#include <InterViews/window.h>
#include <IV-look/kit.h>
#include <IV-look/mf_kit.h>
! #include <ComGlyph/comtextedit.h>
#include <OS/string.h>
***************
*** 96,101 ****
--- 97,104 ----
FrameKit* FrameKit::_framekit = nil;
FrameKit::FrameKit () {
+ _set_button_flag = true;
+ _clr_button_flag = true;
}
FrameKit* FrameKit::Instance() {
***************
*** 178,215 ****
ed->GetKeyMap()->Execute(CODE_SELECT);
topbox->append(ed);
if (!bookgeom) {
! EivTextEditor* texteditor = new EivTextEditor(wk.style());
((FrameEditor*)ed)->_texteditor = texteditor;
! Button* set = wk.push_button("Set", new ActionCallback(FrameEditor)(
(FrameEditor*)ed, &FrameEditor::SetText
! ));
! Button* clear = wk.push_button("Clear", new ActionCallback(FrameEditor)(
(FrameEditor*)ed, &FrameEditor::ClearText
! ));
! topbox->append(
! wk.outset_frame(
! layout.hbox(
! layout.vcenter(
! layout.margin(
! layout.vbox(
! layout.hcenter(set),
! layout.vspace(10),
! layout.hcenter(clear)
! ),
! 10
! )
! ),
! layout.vcenter(texteditor)
! )
! )
! );
! topbox->append(
! wk.outset_frame(
! layout.hbox(
! layout.vcenter(mousedoc_observer)
! )
! )
! );
}
ManagedWindow* w = new ApplicationWindow(topbox);
--- 181,253 ----
ed->GetKeyMap()->Execute(CODE_SELECT);
topbox->append(ed);
if (!bookgeom) {
! boolean set_flag = ((FrameKit*)kit)->_set_button_flag;
! boolean clr_flag = ((FrameKit*)kit)->_clr_button_flag;
! EivTextEditor* texteditor = nil;
! if(!set_flag && !clr_flag) {
! texteditor = new ComTextEditor(wk.style(), ed->comterp());
! }
! else
! texteditor = new EivTextEditor(wk.style());
((FrameEditor*)ed)->_texteditor = texteditor;
! Button* set = set_flag ? wk.push_button("Set", new ActionCallback(FrameEditor)(
(FrameEditor*)ed, &FrameEditor::SetText
! )) : nil;
! Button* clear = clr_flag ? wk.push_button("Clear", new ActionCallback(FrameEditor)(
(FrameEditor*)ed, &FrameEditor::ClearText
! )) : nil;
! Glyph* buttonbox = nil;
! if (set && !clear) {
! buttonbox =
! layout.vbox(
! layout.hcenter(set));
! } else if (!set && clear) {
! buttonbox =
! layout.vbox(
! layout.hcenter(clear));
! } else if (set && clear) {
! buttonbox =
! layout.vbox(
! layout.hcenter(set),
! layout.vspace(10),
! layout.hcenter(clear)
! );
! }
! if (buttonbox) {
! topbox->append(
! wk.outset_frame(
! layout.hbox(
! layout.vcenter(
! layout.margin(
! buttonbox,
! 10
! )
! ),
! layout.vcenter(texteditor)
! )
! )
! );
! } else {
! topbox->append(
! wk.outset_frame(
! layout.hbox(
! layout.vcenter(
! layout.margin(
! layout.vbox(
! wk.label("type help"),
! layout.vspace(10),
! wk.label("to print"),
! layout.vspace(10),
! wk.label("info to stdout")
! ),
! 10
! )
! ),
! layout.vcenter(texteditor)
! )
! )
! );
! }
}
ManagedWindow* w = new ApplicationWindow(topbox);
Index: FrameUnidraw/framekit.h
diff -c FrameUnidraw/framekit.h:1.1 FrameUnidraw/framekit.h:1.2
*** FrameUnidraw/framekit.h:1.1 Tue Jan 18 03:11:16 2000
--- src/FrameUnidraw/framekit.h Sat Feb 26 03:07:52 2000
***************
*** 55,60 ****
--- 55,62 ----
static FrameKit* Instance();
protected:
static FrameKit* _framekit;
+ boolean _set_button_flag;
+ boolean _clr_button_flag;
};
#include <InterViews/action.h>
*** /dev/null Sat Feb 26 03:08:07 PST 2000
--- patches/ivtools-000226-johnston-027
*************** patches/ivtools-000226-johnston-027
*** 0 ****
--- 1 ----
+ ivtools-000226-johnston-027
|
|
From: <ivt...@li...> - 2000-02-23 00:39:22
|
Patch: ivtools-000223-johnston-026
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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 new symval command to returns the symbol value instead of looking up the value of that symbol in the variable tables.
- documented acos, asin, and atan as returning radians, and cos, sin,
tan as taking radians.
- created autonewframe command in flipbook command interpreter, and
synched it with the "Auto New Frame" checkbox on the Frame pulldown
menu. So now you can set/reset this feature from either the GUI or
interpreter, and the GUI reflects the state.
Index: Attribute/attrvalue.c
diff -c Attribute/attrvalue.c:1.4 Attribute/attrvalue.c:1.5
*** Attribute/attrvalue.c:1.4 Mon Feb 21 20:48:38 2000
--- src/Attribute/attrvalue.c Wed Feb 23 04:27:30 2000
***************
*** 210,215 ****
--- 210,217 ----
return boolean_ref();
case AttributeValue::SymbolType:
return (boolean) int_val();
+ case AttributeValue::ObjectType:
+ return (boolean) obj_val();
default:
return 0;
}
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.7 ComTerp/comterp.c:1.8
*** ComTerp/comterp.c:1.7 Mon Feb 21 20:48:41 2000
--- src/ComTerp/comterp.c Wed Feb 23 04:27:32 2000
***************
*** 808,813 ****
--- 808,814 ----
add_command("help", new HelpFunc(this));
add_command("symid", new SymIdFunc(this));
+ add_command("symval", new SymValFunc(this));
add_command("symbol", new SymbolFunc(this), "symval");
add_command("symvar", new SymVarFunc(this));
add_command("postfix", new PostFixFunc(this));
Index: ComTerp/mathfunc.h
diff -c ComTerp/mathfunc.h:1.1 ComTerp/mathfunc.h:1.2
*** ComTerp/mathfunc.h:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/mathfunc.h Wed Feb 23 04:27:32 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1998,1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 79,116 ****
};
//: arc-cosine command for ComTerp.
! // dbl=acos(x) -- returns the arc cosine of x.
class ACosFunc : public ComFunc {
public:
ACosFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc cosine of x"; }
};
//: arc-sine command for ComTerp.
! // dbl=asin(x) -- returns the arc sine of x.
class ASinFunc : public ComFunc {
public:
ASinFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc sine of x"; }
};
//: arc-tangent command for ComTerp.
! // dbl=atan(x) -- returns the arc tangent of x.
class ATanFunc : public ComFunc {
public:
ATanFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc tangent of x"; }
};
--- 80,117 ----
};
//: arc-cosine command for ComTerp.
! // dbl=acos(x) -- returns the arc cosine of x in radians.
class ACosFunc : public ComFunc {
public:
ACosFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc cosine of x in radians"; }
};
//: arc-sine command for ComTerp.
! // dbl=asin(x) -- returns the arc sine of x in radians.
class ASinFunc : public ComFunc {
public:
ASinFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc sine of x in radians"; }
};
//: arc-tangent command for ComTerp.
! // dbl=atan(x) -- returns the arc tangent of x in radians.
class ATanFunc : public ComFunc {
public:
ATanFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the arc tangent of x in radians"; }
};
***************
*** 127,164 ****
};
//: cosine command for ComTerp.
! // dbl=cos(x) -- returns the cosine of x.
class CosFunc : public ComFunc {
public:
CosFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the cosine of x"; }
};
//: sine command for ComTerp.
! // dbl=sin(x) -- returns the sine of x.
class SinFunc : public ComFunc {
public:
SinFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the sine of x"; }
};
//: tangent command for ComTerp.
! // dbl=tan(x) -- returns the tangent of x.
class TanFunc : public ComFunc {
public:
TanFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the tangent of x"; }
};
--- 128,165 ----
};
//: cosine command for ComTerp.
! // dbl=cos(x) -- returns the cosine of x radians.
class CosFunc : public ComFunc {
public:
CosFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the cosine of x radians"; }
};
//: sine command for ComTerp.
! // dbl=sin(x) -- returns the sine of x radians.
class SinFunc : public ComFunc {
public:
SinFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the sine of x radians"; }
};
//: tangent command for ComTerp.
! // dbl=tan(x) -- returns the tangent of x radians.
class TanFunc : public ComFunc {
public:
TanFunc(ComTerp*);
virtual void execute();
virtual const char* docstring() {
! return "dbl=%s(x) -- returns the tangent of x radians"; }
};
Index: ComTerp/symbolfunc.c
diff -c ComTerp/symbolfunc.c:1.2 ComTerp/symbolfunc.c:1.3
*** ComTerp/symbolfunc.c:1.2 Tue Feb 15 04:56:31 2000
--- src/ComTerp/symbolfunc.c Wed Feb 23 04:27:32 2000
***************
*** 72,77 ****
--- 72,114 ----
/*****************************************************************************/
+ SymValFunc::SymValFunc(ComTerp* comterp) : ComFunc(comterp) {
+ }
+
+ void SymValFunc::execute() {
+ // return each symbol in the arguments as is
+ boolean noargs = !nargs() && !nkeys();
+ int numargs = nargs();
+ if (!numargs) return;
+ int symbol_ids[numargs];
+ for (int i=0; i<numargs; i++) {
+ ComValue& val = stack_arg(i, true);
+ if (val.is_type(AttributeValue::CommandType))
+ symbol_ids[i] = val.command_symid();
+ else if (val.is_type(AttributeValue::StringType))
+ symbol_ids[i] = val.string_val();
+ else if (val.is_type(AttributeValue::SymbolType))
+ symbol_ids[i] = val.symbol_val();
+ else
+ symbol_ids[i] = -1;
+ }
+ reset_stack();
+
+ if (numargs>1) {
+ AttributeValueList* avl = new AttributeValueList();
+ ComValue retval(avl);
+ for (int i=0; i<numargs; i++)
+ avl->Append(new AttributeValue(symbol_ids[i], AttributeValue::SymbolType));
+ push_stack(retval);
+ } else {
+ ComValue retval (symbol_ids[0], AttributeValue::SymbolType);
+ push_stack(retval);
+ }
+
+ }
+
+ /*****************************************************************************/
+
SymbolFunc::SymbolFunc(ComTerp* comterp) : ComFunc(comterp) {
}
Index: ComTerp/symbolfunc.h
diff -c ComTerp/symbolfunc.h:1.1 ComTerp/symbolfunc.h:1.2
*** ComTerp/symbolfunc.h:1.1 Tue Jan 18 03:07:06 2000
--- src/ComTerp/symbolfunc.h Wed Feb 23 04:27:32 2000
***************
*** 44,49 ****
--- 44,61 ----
return "%s(symbol [symbol...]) -- return id(s) associated with symbol(s)"; }
};
+ //: symbol value command for ComTerp.
+ // symval(symbol [symbol...]) -- preserve symbol(s) and return without lookup
+ class SymValFunc : public ComFunc {
+ public:
+ SymValFunc(ComTerp*);
+ virtual void execute();
+
+ virtual boolean post_eval() { return true; }
+ virtual const char* docstring() {
+ return "%s(symbol [symbol...]) -- preserve symbol(s) and return without lookup"; }
+ };
+
//: symbol command for ComTerp.
// symbol(symid [symid ...]) -- return symbol(s) associated with integer id(s)
class SymbolFunc : public ComFunc {
Index: comterp/README
diff -c comterp/README:1.2 comterp/README:1.3
*** comterp/README:1.2 Mon Feb 21 20:48:43 2000
--- src/comterp_/README Wed Feb 23 04:27:34 2000
***************
*** 115,133 ****
dbl=pow(x y) -- returns the value of x raised to the power of y
! dbl=acos(x) -- returns the arc cosine of x
! dbl=asin(x) -- returns the arc sine of x
! dbl=atan(x) -- returns the arc tangent of x
dbl=atan2(y x) -- returns the arc tangent of y over x
! dbl=cos(x) -- returns the cosine of x
! dbl=sin(x) -- returns the sine of x
! dbl=tan(x) -- returns the tangent of x
dbl=sqrt(x) -- returns square root of x
--- 115,133 ----
dbl=pow(x y) -- returns the value of x raised to the power of y
! dbl=acos(x) -- returns the arc cosine of x in radians
! dbl=asin(x) -- returns the arc sine of x in radians
! dbl=atan(x) -- returns the arc tangent of x in radians
dbl=atan2(y x) -- returns the arc tangent of y over x
! dbl=cos(x) -- returns the cosine of x radians
! dbl=sin(x) -- returns the sine of x radians
! dbl=tan(x) -- returns the tangent of x radians
dbl=sqrt(x) -- returns square root of x
***************
*** 179,184 ****
--- 179,186 ----
[str]=print(val :string|:str :err) -- print value with format string
symid(symbol [symbol...]) -- return integer id(s) associated with symbol(s)
+
+ symval(symbol [symbol...]) -- return symbols as is without lookup
symbol(symid [symid...]) -- return symbol(s) associated with integer id(s)
Index: OverlayUnidraw/oved.h
diff -c OverlayUnidraw/oved.h:1.1 OverlayUnidraw/oved.h:1.2
*** OverlayUnidraw/oved.h:1.1 Tue Jan 18 03:10:46 2000
--- src/OverlayUnidraw/oved.h Wed Feb 23 04:27:51 2000
***************
*** 32,38 ****
#include <UniIdraw/ided.h>
#include <OverlayUnidraw/ovkit.h>
#include <InterViews/action.h>
!
class AttributeList;
class ComTerpServ;
class Editor;
--- 32,40 ----
#include <UniIdraw/ided.h>
#include <OverlayUnidraw/ovkit.h>
#include <InterViews/action.h>
! extern "C" {
! #include <ComUtil/comutil.h>
! }
class AttributeList;
class ComTerpServ;
class Editor;
Index: FrameUnidraw/frameeditor.c
diff -c FrameUnidraw/frameeditor.c:1.1 FrameUnidraw/frameeditor.c:1.2
*** FrameUnidraw/frameeditor.c:1.1 Tue Jan 18 03:11:15 2000
--- src/FrameUnidraw/frameeditor.c Wed Feb 23 04:27:54 2000
***************
*** 50,55 ****
--- 50,56 ----
#include <InterViews/box.h>
#include <InterViews/border.h>
#include <InterViews/glue.h>
+ #include <InterViews/telltale.h>
#include <IV-2_6/InterViews/frame.h>
#include <IV-2_6/InterViews/panner.h>
***************
*** 97,109 ****
void FrameEditor::Init (OverlayComp* comp, const char* name) {
_curr_other = _prev_other = 0;
_texteditor = nil;
if (!comp) comp = new FrameIdrawComp;
_terp = new ComTerpServ();
AddCommands(_terp);
add_comterp("Flipbook", _terp);
_overlay_kit->Init(comp, name);
InitFrame();
- _autonewframe = false;
}
void FrameEditor::InitCommands() {
--- 98,111 ----
void FrameEditor::Init (OverlayComp* comp, const char* name) {
_curr_other = _prev_other = 0;
_texteditor = nil;
+ _autonewframe = false;
+ _autonewframe_tts = nil;
if (!comp) comp = new FrameIdrawComp;
_terp = new ComTerpServ();
AddCommands(_terp);
add_comterp("Flipbook", _terp);
_overlay_kit->Init(comp, name);
InitFrame();
}
void FrameEditor::InitCommands() {
***************
*** 205,210 ****
--- 207,213 ----
ComEditor::AddCommands(comterp);
comterp->add_command("moveframe", new MoveFrameFunc(comterp, this));
comterp->add_command("createframe", new CreateFrameFunc(comterp, this));
+ comterp->add_command("autonewframe", new AutoNewFrameFunc(comterp, this));
}
void FrameEditor::DoAutoNewFrame() {
***************
*** 213,216 ****
--- 216,224 ----
cmd->Execute();
cmd->Log();
}
+ }
+
+ void FrameEditor::ToggleAutoNewFrame() {
+ _autonewframe = !_autonewframe;
+ if (_autonewframe_tts) _autonewframe_tts->set(TelltaleState::is_chosen, _autonewframe);
}
Index: FrameUnidraw/frameeditor.h
diff -c FrameUnidraw/frameeditor.h:1.1 FrameUnidraw/frameeditor.h:1.2
*** FrameUnidraw/frameeditor.h:1.1 Tue Jan 18 03:11:15 2000
--- src/FrameUnidraw/frameeditor.h Wed Feb 23 04:27:54 2000
***************
*** 32,37 ****
--- 32,38 ----
class FrameNumberState;
class FrameListState;
class FrameView;
+ class TelltaleState;
//: ComEditor specialized for multi-frame use.
class FrameEditor : public ComEditor {
***************
*** 81,87 ****
FrameListState*& frameliststate() { return _frameliststate; }
// return reference to pointer to current-frame-count state variable
! void ToggleAutoNewFrame() { _autonewframe = !_autonewframe; }
// toggle flag which indicates a new frame should be automatically
// created whenever anything is imported.
boolean AutoNewFrame() { return _autonewframe; }
--- 82,88 ----
FrameListState*& frameliststate() { return _frameliststate; }
// return reference to pointer to current-frame-count state variable
! void ToggleAutoNewFrame();
// toggle flag which indicates a new frame should be automatically
// created whenever anything is imported.
boolean AutoNewFrame() { return _autonewframe; }
***************
*** 100,105 ****
--- 101,107 ----
int _curr_other;
int _prev_other;
boolean _autonewframe;
+ TelltaleState* _autonewframe_tts;
friend FrameKit;
};
Index: FrameUnidraw/framefunc.c
diff -c FrameUnidraw/framefunc.c:1.1 FrameUnidraw/framefunc.c:1.2
*** FrameUnidraw/framefunc.c:1.1 Tue Jan 18 03:11:16 2000
--- src/FrameUnidraw/framefunc.c Wed Feb 23 04:27:54 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 29,34 ****
--- 30,38 ----
#include <Unidraw/viewer.h>
#include <ComTerp/comvalue.h>
+ static int on_symid = symbol_add("on");
+ static int off_symid = symbol_add("off");
+
/*****************************************************************************/
MoveFrameFunc::MoveFrameFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) {
***************
*** 75,80 ****
--- 79,107 ----
execute_log(cmd);
ComValue retval(cmd->moveframecmd()->actualmotion(), ComValue::IntType);
push_stack(retval);
+ }
+ }
+
+ /*****************************************************************************/
+
+ AutoNewFrameFunc::AutoNewFrameFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) {
+ }
+
+ void AutoNewFrameFunc::execute() {
+ ComValue onflagv(stack_key(on_symid));
+ ComValue offflagv(stack_key(off_symid));
+ reset_stack();
+
+ FrameEditor* ed = (FrameEditor*)GetEditor();
+
+ if (ed) {
+ if (onflagv.is_false() && offflagv.is_false()) {
+ ed->ToggleAutoNewFrame();
+ } else if (onflagv.is_true()) {
+ if (!ed->AutoNewFrame()) ed->ToggleAutoNewFrame();
+ } else if (offflagv.is_true()) {
+ if (ed->AutoNewFrame()) ed->ToggleAutoNewFrame();
+ }
}
}
Index: FrameUnidraw/framefunc.h
diff -c FrameUnidraw/framefunc.h:1.1 FrameUnidraw/framefunc.h:1.2
*** FrameUnidraw/framefunc.h:1.1 Tue Jan 18 03:11:16 2000
--- src/FrameUnidraw/framefunc.h Wed Feb 23 04:27:54 2000
***************
*** 46,49 ****
--- 46,59 ----
return "%s(:before) -- create and move to new frame"; }
};
+ //: interpreter command to toggle the autonewframe flag
+ // autonewframe(:on :off) -- command to toggle the autonewframe flag
+ class AutoNewFrameFunc : public UnidrawFunc {
+ public:
+ AutoNewFrameFunc(ComTerp*,Editor*);
+ virtual void execute();
+ virtual const char* docstring() {
+ return "%s(:on :off) -- command to toggle autonewframe"; }
+ };
+
#endif /* !defined(_framefunc_h) */
Index: FrameUnidraw/framekit.c
diff -c FrameUnidraw/framekit.c:1.1 FrameUnidraw/framekit.c:1.2
*** FrameUnidraw/framekit.c:1.1 Tue Jan 18 03:11:16 2000
--- src/FrameUnidraw/framekit.c Wed Feb 23 04:27:54 2000
***************
*** 317,322 ****
--- 317,323 ----
#else
menu_item = kit.check_menu_item(kit.label("Auto New Frame"));
menu_item->state()->set(TelltaleState::is_chosen, ((FrameEditor*)GetEditor())->AutoNewFrame());
+ ((FrameEditor*)GetEditor())->_autonewframe_tts = menu_item->state();
AutoNewFrameCmd::default_instance(new AutoNewFrameCmd(GetEditor()));
menu_item->action
(new ActionCallback(AutoNewFrameCmd)
Index: man1_ivtools/comterp.1
diff -c man1_ivtools/comterp.1:1.2 man1_ivtools/comterp.1:1.3
*** man1_ivtools/comterp.1:1.2 Mon Feb 21 20:49:14 2000
--- src/man/man1/comterp.1 Wed Feb 23 04:28:04 2000
***************
*** 125,143 ****
dbl=pow(x y) -- returns the value of x raised to the power of y
! dbl=acos(x) -- returns the arc cosine of x
! dbl=asin(x) -- returns the arc sine of x
! dbl=atan(x) -- returns the arc tangent of x
dbl=atan2(y x) -- returns the arc tangent of y over x
! dbl=cos(x) -- returns the cosine of x
! dbl=sin(x) -- returns the sine of x
! dbl=tan(x) -- returns the tangent of x
dbl=sqrt(x) -- returns square root of x
--- 125,143 ----
dbl=pow(x y) -- returns the value of x raised to the power of y
! dbl=acos(x) -- returns the arc cosine of x in radians
! dbl=asin(x) -- returns the arc sine of x in radians
! dbl=atan(x) -- returns the arc tangent of x in radians
dbl=atan2(y x) -- returns the arc tangent of y over x
! dbl=cos(x) -- returns the cosine of x radians
! dbl=sin(x) -- returns the sine of x radians
! dbl=tan(x) -- returns the tangent of x radians
dbl=sqrt(x) -- returns square root of x
***************
*** 187,192 ****
--- 187,194 ----
[str]=print(val :string|:str :err) -- print value
symid(symbol [symbol...]) -- return integer id(s) associated with symbol(s)
+
+ symval(symbol [symbol...]) -- return symbols as is without lookup
symbol(symid [symid...]) -- return symbol(s) associated with integer id(s)
*** /dev/null Wed Feb 23 04:28:09 PST 2000
--- patches/ivtools-000223-johnston-026
*************** patches/ivtools-000223-johnston-026
*** 0 ****
--- 1 ----
+ ivtools-000223-johnston-026
|
|
From: <ivt...@li...> - 2000-02-21 16:57:02
|
Patch: ivtools-000221-johnston-025
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:
patch -p0 <ThisFile
Summary of Changes:
- migrate ComValue::geta() to AttributeValue::geta(). This is the
method that returns a void* to an ObjectType if the classid matches.
Work for every object but ComFunc's and AttributeValueList's, which
have their own types (CommandType and ArrayType).
- create a list func that initializes an empty list object.
- extended the print func to invoke the ostream ComValue "<<" operator
if it only has one argument.
Index: Attribute/attrvalue.c
diff -c Attribute/attrvalue.c:1.3 Attribute/attrvalue.c:1.4
*** Attribute/attrvalue.c:1.3 Sat Feb 19 00:59:03 2000
--- src/Attribute/attrvalue.c Mon Feb 21 20:48:38 2000
***************
*** 866,868 ****
--- 866,875 ----
return is_object() && class_symid() == Attribute::class_symid();
}
+ void* AttributeValue::geta(int id) {
+ if (is_object(id))
+ return obj_val();
+ else
+ return nil;
+ }
+
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.6 Attribute/attrvalue.h:1.7
*** Attribute/attrvalue.h:1.6 Sat Feb 19 00:59:03 2000
--- src/Attribute/attrvalue.h Mon Feb 21 20:48:38 2000
***************
*** 287,292 ****
--- 287,295 ----
boolean is_attribute();
// returns true if ObjectType with an Attribute object.
+ void* geta(int id);
+ // get the class symbol id associated with an ObjectType.
+
friend ostream& operator << (ostream& s, const AttributeValue&);
// output AttributeValue to ostream.
Index: ComTerp/assignfunc.c
diff -c ComTerp/assignfunc.c:1.3 ComTerp/assignfunc.c:1.4
*** ComTerp/assignfunc.c:1.3 Sat Feb 19 04:37:11 2000
--- src/ComTerp/assignfunc.c Mon Feb 21 20:48:40 2000
***************
*** 33,38 ****
--- 33,40 ----
/*****************************************************************************/
+ int AssignFunc::_symid = -1;
+
AssignFunc::AssignFunc(ComTerp* comterp) : ComFunc(comterp) {
}
Index: ComTerp/assignfunc.h
diff -c ComTerp/assignfunc.h:1.1 ComTerp/assignfunc.h:1.2
*** ComTerp/assignfunc.h:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/assignfunc.h Mon Feb 21 20:48:40 2000
***************
*** 38,43 ****
--- 38,45 ----
virtual void execute();
virtual const char* docstring() {
return "= is the assigment operator"; }
+
+ CLASS_SYMID("AssignFunc");
};
//: %= (mod assign) operator .
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.6 ComTerp/comterp.c:1.7
*** ComTerp/comterp.c:1.6 Sat Feb 19 04:37:12 2000
--- src/ComTerp/comterp.c Mon Feb 21 20:48:41 2000
***************
*** 771,777 ****
--- 771,779 ----
add_command("iterate", new IterateFunc(this));
add_command("dot", new DotFunc(this));
+ add_command("name", new DotNameFunc(this));
+ add_command("list", new ListFunc(this));
add_command("at", new ListAtFunc(this));
add_command("size", new ListSizeFunc(this));
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.5 ComTerp/comvalue.c:1.6
*** ComTerp/comvalue.c:1.5 Sat Feb 19 04:37:12 2000
--- src/ComTerp/comvalue.c Mon Feb 21 20:48:41 2000
***************
*** 341,353 ****
return _zeroval;
}
- void* ComValue::geta(int id) {
- if (is_object(id))
- return obj_val();
- else
- return nil;
- }
-
boolean ComValue::is_comfunc(int func_classid) {
return is_type(CommandType) &&
func_classid==((ComFunc*)obj_val())->classid();
--- 341,346 ----
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.8 ComTerp/comvalue.h:1.9
*** ComTerp/comvalue.h:1.8 Sat Feb 19 00:59:05 2000
--- src/ComTerp/comvalue.h Mon Feb 21 20:48:41 2000
***************
*** 116,125 ****
boolean is_comfunc(int func_classid);
// returns true if CommandType with ComFunc
-
- void* geta(int id);
- // get the class symbol id associated with an ObjectType.
-
friend ostream& operator << (ostream& s, const ComValue&);
// print contents to ostream, brief or not depending on
// associated ComTerp brief flag.
--- 116,121 ----
Index: ComTerp/dotfunc.c
diff -c ComTerp/dotfunc.c:1.3 ComTerp/dotfunc.c:1.4
*** ComTerp/dotfunc.c:1.3 Sat Feb 19 00:59:05 2000
--- src/ComTerp/dotfunc.c Mon Feb 21 20:48:41 2000
***************
*** 47,53 ****
return;
}
if (!after_part.is_symbol()) {
! cerr << "expression after \".\" needs to be a symbol\n";
return;
}
--- 47,53 ----
return;
}
if (!after_part.is_symbol()) {
! cerr << "expression after \".\" needs to be a symbol or evaluate to a syymbol\n";
return;
}
***************
*** 61,67 ****
al = (AttributeList*) ((ComValue*) vptr)->obj_val();
} else {
al = new AttributeList();
! ComValue* comval = new ComValue(AttributeList::class_symid(), al);
comterp()->localtable()->insert(before_symid, comval);
}
} else
--- 61,68 ----
al = (AttributeList*) ((ComValue*) vptr)->obj_val();
} else {
al = new AttributeList();
! Resource::ref(al);
! ComValue* comval = new ComValue(AttributeList::class_symid(), (void*)al);
comterp()->localtable()->insert(before_symid, comval);
}
} else
***************
*** 83,89 ****
}
void DotNameFunc::execute() {
! ComValue dotted_pair(stack_arg(0));
reset_stack();
if (dotted_pair.class_symid() != Attribute::class_symid()) return;
Attribute *attr = (Attribute*)dotted_pair.obj_val();
--- 84,90 ----
}
void DotNameFunc::execute() {
! ComValue dotted_pair(stack_arg(0, true));
reset_stack();
if (dotted_pair.class_symid() != Attribute::class_symid()) return;
Attribute *attr = (Attribute*)dotted_pair.obj_val();
Index: ComTerp/dotfunc.h
diff -c ComTerp/dotfunc.h:1.2 ComTerp/dotfunc.h:1.3
*** ComTerp/dotfunc.h:1.2 Sat Feb 19 00:59:05 2000
--- src/ComTerp/dotfunc.h Mon Feb 21 20:48:41 2000
***************
*** 42,48 ****
CLASS_SYMID("DotFunc");
};
! //: dname returns name field of a dotted pair
class DotNameFunc : public ComFunc {
public:
DotNameFunc(ComTerp*);
--- 42,48 ----
CLASS_SYMID("DotFunc");
};
! //: name returns name field of a dotted pair
class DotNameFunc : public ComFunc {
public:
DotNameFunc(ComTerp*);
***************
*** 52,58 ****
return "%s(attribute) returns name field of a dotted pair"; }
};
! //: dval returns value field of a dotted pair
class DotValFunc : public ComFunc {
public:
DotValFunc(ComTerp*);
--- 52,58 ----
return "%s(attribute) returns name field of a dotted pair"; }
};
! //: value returns value field of a dotted pair
class DotValFunc : public ComFunc {
public:
DotValFunc(ComTerp*);
Index: ComTerp/iofunc.c
diff -c ComTerp/iofunc.c:1.1 ComTerp/iofunc.c:1.2
*** ComTerp/iofunc.c:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/iofunc.c Mon Feb 21 20:48:41 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 64,143 ****
}
ostream out(strmbuf);
! switch( printval.type() )
! {
! case ComValue::SymbolType:
! case ComValue::StringType:
! out.form(fstr, symbol_pntr( printval.symbol_ref()));
! break;
!
! case ComValue::BooleanType:
! out.form(fstr, printval.boolean_ref());
! break;
!
! case ComValue::CharType:
! out.form(fstr, printval.char_ref());
! break;
!
! case ComValue::UCharType:
! out.form(fstr, printval.uchar_ref());
! break;
!
! case ComValue::IntType:
! out.form(fstr, printval.int_ref());
! break;
!
! case ComValue::UIntType:
! out.form(fstr, printval.uint_ref());
! break;
!
! case ComValue::LongType:
! out.form(fstr, printval.long_ref());
! break;
!
! case ComValue::ULongType:
! out.form(fstr, printval.ulong_ref());
! break;
!
! case ComValue::FloatType:
! out.form(fstr, printval.float_ref());
! break;
!
! case ComValue::DoubleType:
! out.form(fstr, printval.double_ref());
! break;
!
! case ComValue::ArrayType:
! {
! ALIterator i;
! AttributeValueList* avl = printval.array_val();
! avl->First(i);
! boolean first = true;
! while (!avl->Done(i)) {
! ComValue val(*avl->GetAttrVal(i));
! push_stack(formatstr);
! push_stack(val);
! push_funcstate(2,0);
! execute();
! pop_funcstate();
! avl->Next(i);
! if (!avl->Done(i)) out << "\n";
}
! }
! break;
! case ComValue::BlankType:
! out << "<blank>";
! break;
!
! case ComValue::UnknownType:
! out.form(fstr);
! break;
!
! default:
! break;
! }
if (stringflag.is_true()) {
--- 65,153 ----
}
ostream out(strmbuf);
! if (nargs()==1) {
!
! if (formatstr.is_string())
! out << formatstr.symbol_ptr();
! else
! out << formatstr; // which could be arbitrary ComValue
! } else {
! switch( printval.type() )
! {
! case ComValue::SymbolType:
! case ComValue::StringType:
! out.form(fstr, symbol_pntr( printval.symbol_ref()));
! break;
!
! case ComValue::BooleanType:
! out.form(fstr, printval.boolean_ref());
! break;
!
! case ComValue::CharType:
! out.form(fstr, printval.char_ref());
! break;
!
! case ComValue::UCharType:
! out.form(fstr, printval.uchar_ref());
! break;
!
! case ComValue::IntType:
! out.form(fstr, printval.int_ref());
! break;
!
! case ComValue::UIntType:
! out.form(fstr, printval.uint_ref());
! break;
!
! case ComValue::LongType:
! out.form(fstr, printval.long_ref());
! break;
!
! case ComValue::ULongType:
! out.form(fstr, printval.ulong_ref());
! break;
!
! case ComValue::FloatType:
! out.form(fstr, printval.float_ref());
! break;
!
! case ComValue::DoubleType:
! out.form(fstr, printval.double_ref());
! break;
!
! case ComValue::ArrayType:
! {
!
! ALIterator i;
! AttributeValueList* avl = printval.array_val();
! avl->First(i);
! boolean first = true;
! while (!avl->Done(i)) {
! ComValue val(*avl->GetAttrVal(i));
! push_stack(formatstr);
! push_stack(val);
! push_funcstate(2,0);
! execute();
! pop_funcstate();
! avl->Next(i);
! if (!avl->Done(i)) out << "\n";
! }
}
! break;
! case ComValue::BlankType:
! out << "<blank>";
! break;
!
! case ComValue::UnknownType:
! out.form(fstr);
! break;
!
! default:
! break;
! }
! }
if (stringflag.is_true()) {
Index: ComTerp/iofunc.h
diff -c ComTerp/iofunc.h:1.1 ComTerp/iofunc.h:1.2
*** ComTerp/iofunc.h:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/iofunc.h Mon Feb 21 20:48:41 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1998,1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 34,40 ****
class ComValue;
//: value printing command for ComTerp.
! // [str]=print(fmtstr val :string) -- print value with format string.
class PrintFunc : public ComFunc {
public:
PrintFunc(ComTerp*);
--- 35,42 ----
class ComValue;
//: value printing command for ComTerp.
! // [str]=print(fmtstr val :string|:str :err) -- print value with format string
! // [str]=print(val :string|:str :err) -- print value
class PrintFunc : public ComFunc {
public:
PrintFunc(ComTerp*);
Index: ComTerp/listfunc.c
diff -c ComTerp/listfunc.c:1.1 ComTerp/listfunc.c:1.2
*** ComTerp/listfunc.c:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/listfunc.c Mon Feb 21 20:48:41 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 26,37 ****
--- 27,53 ----
#include <ComTerp/comterp.h>
#include <Attribute/aliterator.h>
#include <Attribute/attrlist.h>
+ #include <Attribute/attribute.h>
#include <iostream.h>
#define TITLE "ListFunc"
/*****************************************************************************/
+ ListFunc::ListFunc(ComTerp* comterp) : ComFunc(comterp) {
+ }
+
+ void ListFunc::execute() {
+ reset_stack();
+
+ AttributeValueList* avl = new AttributeValueList();
+ Resource::ref(avl);
+ ComValue retval(avl);
+ push_stack(retval);
+ }
+
+ /*****************************************************************************/
+
ListAtFunc::ListAtFunc(ComTerp* comterp) : ComFunc(comterp) {
}
***************
*** 53,58 ****
--- 69,88 ----
count++;
}
}
+ } else if (listv.is_object(AttributeList::class_symid())) {
+ AttributeList* al = (AttributeList*)listv.obj_val();
+ if (al && nv.int_val()<al->Number()) {
+ int count = 0;
+ Iterator it;
+ for (al->First(it); !al->Done(it); al->Next(it)) {
+ if (count==nv.int_val()) {
+ ComValue retval(Attribute::class_symid(), (void*) al->GetAttr(it));
+ push_stack(retval);
+ return;
+ }
+ count++;
+ }
+ }
}
push_stack(ComValue::nullval());
}
***************
*** 73,79 ****
--- 103,117 ----
push_stack(retval);
return;
}
+ } else if (listv.is_object(AttributeList::class_symid())) {
+ AttributeList* al = (AttributeList*)listv.obj_val();
+ if (al) {
+ ComValue retval(al->Number());
+ push_stack(retval);
+ return;
+ }
}
push_stack(ComValue::nullval());
}
+
Index: ComTerp/listfunc.h
diff -c ComTerp/listfunc.h:1.1 ComTerp/listfunc.h:1.2
*** ComTerp/listfunc.h:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/listfunc.h Mon Feb 21 20:48:41 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 32,37 ****
--- 33,49 ----
class ComTerp;
class ComValue;
+
+ //: create list command for ComTerp.
+ // lst=list() -- create an empty list.
+ class ListFunc : public ComFunc {
+ public:
+ ListFunc(ComTerp*);
+
+ virtual void execute();
+ virtual const char* docstring() {
+ return "lst=%s() -- create an empty list"; }
+ };
//: list member command for ComTerp.
// val=at(list n) -- return the nth item in a list.
Index: comterp/README
diff -c comterp/README:1.1 comterp/README:1.2
*** comterp/README:1.1 Tue Jan 18 03:07:08 2000
--- src/comterp_/README Mon Feb 21 20:48:43 2000
***************
*** 153,158 ****
--- 153,160 ----
LIST COMMANDS:
+ lst=list() -- create an empty list
+
val=at(list n) -- return nth item in a list
num=size(list) -- return size of a list
***************
*** 174,179 ****
--- 176,182 ----
help(cmdname [cmdname ...]) -- help for commands
[str]=print(fmtstr val :string|:str :err) -- print value with format string
+ [str]=print(val :string|:str :err) -- print value with format string
symid(symbol [symbol...]) -- return integer id(s) associated with symbol(s)
Index: man1_ivtools/comterp.1
diff -c man1_ivtools/comterp.1:1.1 man1_ivtools/comterp.1:1.2
*** man1_ivtools/comterp.1:1.1 Tue Jan 18 03:13:42 2000
--- src/man/man1/comterp.1 Mon Feb 21 20:49:14 2000
***************
*** 162,167 ****
--- 162,169 ----
srand(seedval) -- seed random number generator
.SH LIST COMMANDS:
+
+ lst=list() -- create an empty list
val=at(list n) -- return nth item in a list
***************
*** 182,187 ****
--- 184,190 ----
help(cmdname [cmdname ...]) -- help for commands
[str]=print(fmtstr val :string|:str :err) -- print value with format string
+ [str]=print(val :string|:str :err) -- print value
symid(symbol [symbol...]) -- return integer id(s) associated with symbol(s)
*** /dev/null Mon Feb 21 20:49:19 PST 2000
--- patches/ivtools-000221-johnston-025
*************** patches/ivtools-000221-johnston-025
*** 0 ****
--- 1 ----
+ ivtools-000221-johnston-025
|
|
From: <ivt...@li...> - 2000-02-19 00:37:04
|
Patch: ivtools-000219-johnston-024
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- compress some code by making use of the new ComValue::is_object(int
classid) method to test both whether something has a generic void*
pointer for its value, and whether it has a known matching classid
(based on a id in a symbol table for that kind of object).
Index: ComTerp/assignfunc.c
diff -c ComTerp/assignfunc.c:1.2 ComTerp/assignfunc.c:1.3
*** ComTerp/assignfunc.c:1.2 Sun Feb 13 21:43:36 2000
--- src/ComTerp/assignfunc.c Sat Feb 19 04:37:11 2000
***************
*** 54,60 ****
Unref(attrlist);
} else
comterp()->localtable()->insert(operand1.symbol_val(), operand2);
! } else if (operand1.type() == ComValue::ObjectType && operand1.class_symid() == Attribute::class_symid()) {
Attribute* attr = (Attribute*)operand1.obj_val();
attr->Value(operand2);
} else {
--- 54,60 ----
Unref(attrlist);
} else
comterp()->localtable()->insert(operand1.symbol_val(), operand2);
! } else if (operand1.is_object(Attribute::class_symid())) {
Attribute* attr = (Attribute*)operand1.obj_val();
attr->Value(operand2);
} else {
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.5 ComTerp/comterp.c:1.6
*** ComTerp/comterp.c:1.5 Sat Feb 19 00:59:05 2000
--- src/ComTerp/comterp.c Sat Feb 19 04:37:12 2000
***************
*** 614,620 ****
} else
return ComValue::nullval();
}
! } else if (comval.type() == ComValue::ObjectType && comval.class_symid() == Attribute::class_symid()) {
comval.assignval(*((Attribute*)comval.obj_val())->Value());
--- 614,620 ----
} else
return ComValue::nullval();
}
! } else if (comval.is_object(Attribute::class_symid())) {
comval.assignval(*((Attribute*)comval.obj_val())->Value());
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.4 ComTerp/comvalue.c:1.5
*** ComTerp/comvalue.c:1.4 Sat Feb 19 00:59:05 2000
--- src/ComTerp/comvalue.c Sat Feb 19 04:37:12 2000
***************
*** 342,348 ****
}
void* ComValue::geta(int id) {
! if (type() == ComValue::ObjectType && obj_type_val() == id)
return obj_val();
else
return nil;
--- 342,348 ----
}
void* ComValue::geta(int id) {
! if (is_object(id))
return obj_val();
else
return nil;
*** /dev/null Sat Feb 19 04:37:47 PST 2000
--- patches/ivtools-000219-johnston-024
*************** patches/ivtools-000219-johnston-024
*** 0 ****
--- 1 ----
+ ivtools-000219-johnston-024
|
|
From: <ivt...@li...> - 2000-02-19 00:29:25
|
Patch: ivtools-000217-johnston-023
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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
- AttributeList::add_attr fix.
- add mechanism to ComTerp to pass values to the next expression
(ComTerp::val_for_next_func) and invoke a func on the next symbol
(ComTerp::func_for_next_sym). This allows for the stringing together
of stand-alone expressions interspersed by keywords that lack
parenthization.
- add ComValue constructor that takes a ComFunc* directly and makes
something of CommandType.
Summary of Changes:
Index: ComUtil/symbols.c
diff -c ComUtil/symbols.c:1.1 ComUtil/symbols.c:1.2
*** ComUtil/symbols.c:1.1 Tue Jan 18 03:06:51 2000
--- src/ComUtil/symbols.c Thu Feb 17 04:54:48 2000
***************
*** 406,413 ****
Description:
Returns a pointer to the symbol string for the `id` parameter. CAUTION:
! DO NOT MODIFY THE STRING. May change this to duplicate the string in the
! future.
See Also: symbol_add(), symbol_len()
--- 406,412 ----
Description:
Returns a pointer to the symbol string for the `id` parameter. CAUTION:
! DO NOT MODIFY THE STRING.
See Also: symbol_add(), symbol_len()
Index: Attribute/_comutil.h
diff -c Attribute/_comutil.h:1.2 Attribute/_comutil.h:1.3
*** Attribute/_comutil.h:1.2 Tue Feb 15 04:56:24 2000
--- src/Attribute/_comutil.h Thu Feb 17 04:54:49 2000
***************
*** 16,19 ****
--- 16,22 ----
protected: \
static int _symid;
+ // backward compatibility
+ #define classid(name) CLASS_SYMID(name)
+
#endif /* !defined(__comutil.h) */
Index: Attribute/attrlist.c
diff -c Attribute/attrlist.c:1.2 Attribute/attrlist.c:1.3
*** Attribute/attrlist.c:1.2 Sun Feb 13 21:43:33 2000
--- src/Attribute/attrlist.c Thu Feb 17 04:54:50 2000
***************
*** 101,107 ****
ALIterator i;
for (First(i); !Done(i); Next(i)) {
Attribute* old_attr = GetAttr(i);
! if (attr->SymbolId() == old_attr->SymbolId()) {
old_attr->Value(attr->Value());
return -1;
}
--- 101,107 ----
ALIterator i;
for (First(i); !Done(i); Next(i)) {
Attribute* old_attr = GetAttr(i);
! if (old_attr && attr->SymbolId() == old_attr->SymbolId()) {
old_attr->Value(attr->Value());
return -1;
}
***************
*** 263,275 ****
return find(id);
}
! AttributeValue* AttributeList::find(int id) {
! if (id==-1)
return nil;
ALIterator i;
for (First(i); !Done(i); Next(i)) {
Attribute* attr = GetAttr(i);
! if (attr->SymbolId() == id) {
return attr->Value();
}
}
--- 263,275 ----
return find(id);
}
! AttributeValue* AttributeList::find(int symid) {
! if (symid==-1)
return nil;
ALIterator i;
for (First(i); !Done(i); Next(i)) {
Attribute* attr = GetAttr(i);
! if (attr->SymbolId() == symid) {
return attr->Value();
}
}
***************
*** 278,284 ****
AttributeList* AttributeList::merge(AttributeList* al) {
if (al) {
! Iterator it;
for( al->First(it); !al->Done(it); al->Next(it))
add_attribute(new Attribute(*al->GetAttr(it)));
}
--- 278,284 ----
AttributeList* AttributeList::merge(AttributeList* al) {
if (al) {
! ALIterator it;
for( al->First(it); !al->Done(it); al->Next(it))
add_attribute(new Attribute(*al->GetAttr(it)));
}
***************
*** 378,384 ****
AttributeValueList* attrlist = (AttributeValueList*)&al;
ALIterator i;
! for (attrlist->First(i); !attrlist->Done(i); attrlist->Next(i)) {
AttributeValue* attrval = attrlist->GetAttrVal(i);
char* string;
--- 378,384 ----
AttributeValueList* attrlist = (AttributeValueList*)&al;
ALIterator i;
! for (attrlist->First(i); !attrlist->Done(i);) {
AttributeValue* attrval = attrlist->GetAttrVal(i);
char* string;
***************
*** 418,423 ****
--- 418,427 ----
out << "Unknown type";
break;
}
+
+ attrlist->Next(i);
+ if (!attrlist->Done(i)) out << ",";
+
}
return out;
}
Index: Attribute/attrlist.h
diff -c Attribute/attrlist.h:1.3 Attribute/attrlist.h:1.4
*** Attribute/attrlist.h:1.3 Tue Feb 15 04:56:25 2000
--- src/Attribute/attrlist.h Thu Feb 17 04:54:50 2000
***************
*** 137,144 ****
AttributeValue* find(const char*);
// find AttributeValue by symbol.
! AttributeValue* find(int);
// find AttributeValue by symbol id.
protected:
int add_attr(Attribute* attr);
--- 137,145 ----
AttributeValue* find(const char*);
// find AttributeValue by symbol.
! AttributeValue* find(int symid);
// find AttributeValue by symbol id.
+
protected:
int add_attr(Attribute* attr);
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.4 Attribute/attrvalue.h:1.5
*** Attribute/attrvalue.h:1.4 Tue Feb 15 04:56:25 2000
--- src/Attribute/attrvalue.h Thu Feb 17 04:54:50 2000
***************
*** 253,258 ****
--- 253,261 ----
// returns true if CommandType (for use of ComTerp).
boolean is_object() { return is_type(ObjectType); }
// returns true if ObjectType.
+ boolean is_object(int class_symid) { return is_type(ObjectType) &&
+ this->class_symid() == class_symid; }
+ // returns true if ObjectType and matching class_symid.
static boolean is_char(ValueType t)
{ return t==CharType || t==UCharType; }
Index: ComTerp/comfunc.c
diff -c ComTerp/comfunc.c:1.1 ComTerp/comfunc.c:1.2
*** ComTerp/comfunc.c:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/comfunc.c Thu Feb 17 04:54:52 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 30,35 ****
--- 31,38 ----
#define TITLE "ComFunc"
/*****************************************************************************/
+
+ int ComFunc::_symid = -1;
ComFunc::ComFunc(ComTerp* comterp) {
_comterp = comterp;
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.3 ComTerp/comterp.c:1.4
*** ComTerp/comterp.c:1.3 Tue Feb 15 04:56:30 2000
--- src/ComTerp/comterp.c Thu Feb 17 04:54:52 2000
***************
*** 114,119 ****
--- 114,121 ----
_just_reset = false;
_defaults_added = false;
_handler = nil;
+ _val_for_next_func = nil;
+ _func_for_next_sym = nil;
}
***************
*** 187,201 ****
}
void ComTerp::eval_expr_internals(int pedepth) {
! ComValue& sv = pop_stack(false);
if (sv.type() == ComValue::CommandType) {
ComFunc* func = (ComFunc*)sv.obj_val();
! func->push_funcstate(sv.narg(), sv.nkey(), pedepth, sv.command_symid());
func->execute();
func->pop_funcstate();
! if (_just_reset) {
push_stack(ComValue::blankval());
_just_reset = false;
}
--- 189,204 ----
}
void ComTerp::eval_expr_internals(int pedepth) {
! ComValue sv = pop_stack(false);
if (sv.type() == ComValue::CommandType) {
ComFunc* func = (ComFunc*)sv.obj_val();
! func->push_funcstate(sv.narg(), sv.nkey(),
! pedepth, sv.command_symid());
func->execute();
func->pop_funcstate();
! if (_just_reset && !_func_for_next_sym) {
push_stack(ComValue::blankval());
_just_reset = false;
}
***************
*** 210,216 ****
func->push_funcstate(1, 0, pedepth, func->funcid());
func->execute();
func->pop_funcstate();
! if (_just_reset) {
push_stack(ComValue::blankval());
_just_reset = false;
}
--- 213,219 ----
func->push_funcstate(1, 0, pedepth, func->funcid());
func->execute();
func->pop_funcstate();
! if (_just_reset && val_for_next_func().is_null()) {
push_stack(ComValue::blankval());
_just_reset = false;
}
***************
*** 690,696 ****
if (quitflag()) {
status = -1;
break;
! } else {
print_stack_top(out);
out << "\n"; out.flush();
}
--- 693,699 ----
if (quitflag()) {
status = -1;
break;
! } else if (!func_for_next_sym() && val_for_next_func().is_null()) {
print_stack_top(out);
out << "\n"; out.flush();
}
***************
*** 760,767 ****
add_command("iterate", new IterateFunc(this));
add_command("dot", new DotFunc(this));
- add_command("dname", new DotNameFunc(this));
- add_command("dval", new DotValFunc(this));
add_command("at", new ListAtFunc(this));
add_command("size", new ListSizeFunc(this));
--- 763,768 ----
***************
*** 1038,1043 ****
--- 1039,1067 ----
void ComTerp::func_for_next_sym(ComFunc* func) {
if (!_func_for_next_sym)
_func_for_next_sym = func;
+ }
+
+ ComFunc* ComTerp::func_for_next_sym() {
+ return _func_for_next_sym;
+ }
+
+ void ComTerp::val_for_next_func(ComValue& val) {
+ if (_val_for_next_func) {
+ delete _val_for_next_func;
+ }
+ _val_for_next_func = new ComValue(val);
+ }
+
+ ComValue& ComTerp::val_for_next_func() {
+ if (_val_for_next_func) {
+ return *_val_for_next_func;
+ } else
+ return ComValue::nullval();
+ }
+
+ void ComTerp::clr_val_for_next_func() {
+ delete _val_for_next_func;
+ _val_for_next_func = nil;
}
Index: ComTerp/comterp.h
diff -c ComTerp/comterp.h:1.2 ComTerp/comterp.h:1.3
*** ComTerp/comterp.h:1.2 Tue Feb 15 04:56:31 2000
--- src/ComTerp/comterp.h Thu Feb 17 04:54:52 2000
***************
*** 196,202 ****
--- 196,211 ----
void func_for_next_sym(ComFunc* func);
// set ComFunc to use on subsequent expression
+ ComFunc* func_for_next_sym();
+ // get ComFunc to use on subsequent expression
+ void val_for_next_func(ComValue& val);
+ // set ComValue to pass to subequent command
+ ComValue& val_for_next_func();
+ // get ComValue to pass to subequent command
+ void clr_val_for_next_func();
+ // clear out ComValue to pass to subequent command
+
protected:
void incr_stack();
void incr_stack(int n);
***************
*** 247,252 ****
--- 256,264 ----
ComFunc* _func_for_next_sym;
// ComFunc to run on next symbol
+
+ ComValue* _val_for_next_func;
+ // ComValue to pass to next command
friend class ComFunc;
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.2 ComTerp/comvalue.c:1.3
*** ComTerp/comvalue.c:1.2 Sun Feb 13 21:43:36 2000
--- src/ComTerp/comvalue.c Thu Feb 17 04:54:52 2000
***************
*** 22,27 ****
--- 22,28 ----
*
*/
+ #include <ComTerp/comfunc.h>
#include <ComTerp/comvalue.h>
#include <ComTerp/comterp.h>
#include <Attribute/attrlist.h>
***************
*** 85,90 ****
--- 86,92 ----
ComValue::ComValue(int classid, void* ptr) : AttributeValue(classid, ptr) {zero_vals();}
ComValue::ComValue(AttributeValueList* avl) : AttributeValue(avl) {zero_vals();}
ComValue::ComValue(const char* string) : AttributeValue(string) {zero_vals();}
+ ComValue::ComValue(ComFunc* func) : AttributeValue(ComFunc::class_symid(), func) {zero_vals(); type(ComValue::CommandType); command_symid(func->funcid()); }
ComValue::~ComValue() {
}
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.6 ComTerp/comvalue.h:1.7
*** ComTerp/comvalue.h:1.6 Sun Feb 13 21:43:36 2000
--- src/ComTerp/comvalue.h Thu Feb 17 04:54:52 2000
***************
*** 32,37 ****
--- 32,38 ----
#include <ComTerp/_comterp.h>
#include <Attribute/attrvalue.h>
+ class ComFunc;
class ComTerp;
//: AttributeValue with extensions for use with ComTerp.
***************
*** 81,86 ****
--- 82,89 ----
// ArrayType constructor.
ComValue(const char* val);
// StringType constructor.
+ ComValue(ComFunc* func);
+ // CommandType constructor.
void init();
// initialize member variables.
Index: ComTerp/dotfunc.c
diff -c ComTerp/dotfunc.c:1.1 ComTerp/dotfunc.c:1.2
*** ComTerp/dotfunc.c:1.1 Sun Feb 13 21:43:36 2000
--- src/ComTerp/dotfunc.c Thu Feb 17 04:54:52 2000
***************
*** 49,55 ****
return;
}
-
/* lookup value of before variable */
void* vptr = nil;
AttributeList* al = nil;
--- 49,54 ----
*** /dev/null Thu Feb 17 04:55:36 PST 2000
--- patches/ivtools-000217-johnston-216
*************** patches/ivtools-000217-johnston-216
*** 0 ****
--- 1 ----
+ ivtools-000217-johnston-216
|
|
From: <ivt...@li...> - 2000-02-18 22:12:04
|
Patch: ivtools-000219-johnston-022
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:
patch -p0 <ThisFile
Summary of Changes:
- new twist to the classid stuff. Now classid() gets defined as a
virtual function along with static methods for class_name() and
class_symid() when you add the CLASS_SYMID macro
(<Attribute/_comutil.h>) to a class definition. This was used for
identifying derived ComFunc's, ComFunc's that have a func symbol id as
well, but might vary with internationalization or other custom changes
to the interpreter. But the symbol id of the class name itself
doesn't change.
Index: Attribute/_comutil.h
diff -c Attribute/_comutil.h:1.3 Attribute/_comutil.h:1.4
*** Attribute/_comutil.h:1.3 Thu Feb 17 04:54:49 2000
--- src/Attribute/_comutil.h Sat Feb 19 00:59:03 2000
***************
*** 10,22 ****
// unique id for a given type of component.
#define CLASS_SYMID(name) \
public: \
static const char* class_name() {return name;}\
static int class_symid()\
{ if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
protected: \
static int _symid;
-
- // backward compatibility
- #define classid(name) CLASS_SYMID(name)
-
#endif /* !defined(__comutil.h) */
--- 10,20 ----
// unique id for a given type of component.
#define CLASS_SYMID(name) \
public: \
+ virtual int classid() { return _symid; }\
static const char* class_name() {return name;}\
static int class_symid()\
{ if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
protected: \
static int _symid;
#endif /* !defined(__comutil.h) */
+
Index: Attribute/attrvalue.c
diff -c Attribute/attrvalue.c:1.2 Attribute/attrvalue.c:1.3
*** Attribute/attrvalue.c:1.2 Sun Feb 13 21:43:33 2000
--- src/Attribute/attrvalue.c Sat Feb 19 00:59:03 2000
***************
*** 541,547 ****
return _v.objval.type;
}
! unsigned int AttributeValue::class_symid() {
return _v.objval.type;
}
--- 541,547 ----
return _v.objval.type;
}
! unsigned int& AttributeValue::class_symid() {
return _v.objval.type;
}
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.5 Attribute/attrvalue.h:1.6
*** Attribute/attrvalue.h:1.5 Thu Feb 17 04:54:50 2000
--- src/Attribute/attrvalue.h Sat Feb 19 00:59:03 2000
***************
*** 183,189 ****
unsigned int symbol_val(); // symbol id by value.
void* obj_val(); // void* pointer to object by value.
unsigned int obj_type_val(); // classid of object by value.
! unsigned int class_symid(); // classid of object by value.
AttributeValueList* array_val(); // values in list by value.
unsigned int array_type_val(); // type of values in list by value
unsigned int keyid_val(); // symbol id of keyword by value.
--- 183,189 ----
unsigned int symbol_val(); // symbol id by value.
void* obj_val(); // void* pointer to object by value.
unsigned int obj_type_val(); // classid of object by value.
! unsigned int& class_symid(); // classid of object by value.
AttributeValueList* array_val(); // values in list by value.
unsigned int array_type_val(); // type of values in list by value
unsigned int keyid_val(); // symbol id of keyword by value.
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.4 ComTerp/comterp.c:1.5
*** ComTerp/comterp.c:1.4 Thu Feb 17 04:54:52 2000
--- src/ComTerp/comterp.c Sat Feb 19 00:59:05 2000
***************
*** 115,121 ****
_defaults_added = false;
_handler = nil;
_val_for_next_func = nil;
! _func_for_next_sym = nil;
}
--- 115,121 ----
_defaults_added = false;
_handler = nil;
_val_for_next_func = nil;
! _func_for_next_expr = nil;
}
***************
*** 192,213 ****
ComValue sv = pop_stack(false);
if (sv.type() == ComValue::CommandType) {
!
! ComFunc* func = (ComFunc*)sv.obj_val();
! func->push_funcstate(sv.narg(), sv.nkey(),
! pedepth, sv.command_symid());
func->execute();
func->pop_funcstate();
! if (_just_reset && !_func_for_next_sym) {
push_stack(ComValue::blankval());
_just_reset = false;
}
} else if (sv.type() == ComValue::SymbolType) {
! if (_func_for_next_sym) {
! ComFunc* func = _func_for_next_sym;
! _func_for_next_sym = nil;
push_stack(sv);
func->push_funcstate(1, 0, pedepth, func->funcid());
--- 192,221 ----
ComValue sv = pop_stack(false);
if (sv.type() == ComValue::CommandType) {
!
! ComFunc* func = nil;
! if (_func_for_next_expr) {
! func = _func_for_next_expr;
! _func_for_next_expr = nil;
! push_stack(sv);
! func->push_funcstate(1, 0, pedepth, func->funcid());
! } else {
! func = (ComFunc*)sv.obj_val();
! func->push_funcstate(sv.narg(), sv.nkey(),
! pedepth, sv.command_symid());
! }
func->execute();
func->pop_funcstate();
! if (_just_reset && !_func_for_next_expr) {
push_stack(ComValue::blankval());
_just_reset = false;
}
} else if (sv.type() == ComValue::SymbolType) {
! if (_func_for_next_expr) {
! ComFunc* func = _func_for_next_expr;
! _func_for_next_expr = nil;
push_stack(sv);
func->push_funcstate(1, 0, pedepth, func->funcid());
***************
*** 232,238 ****
push_stack(lookup_symval(sv));
}
! } else if (sv.type() == ComValue::ObjectType && sv.class_symid() == Attribute::class_symid()) {
push_stack(*((Attribute*)sv.obj_val())->Value());
--- 240,246 ----
push_stack(lookup_symval(sv));
}
! } else if (sv.is_object(Attribute::class_symid())) {
push_stack(*((Attribute*)sv.obj_val())->Value());
***************
*** 693,699 ****
if (quitflag()) {
status = -1;
break;
! } else if (!func_for_next_sym() && val_for_next_func().is_null()) {
print_stack_top(out);
out << "\n"; out.flush();
}
--- 701,707 ----
if (quitflag()) {
status = -1;
break;
! } else if (!func_for_next_expr() && val_for_next_func().is_null()) {
print_stack_top(out);
out << "\n"; out.flush();
}
***************
*** 1036,1048 ****
*sfs = ComFuncState(funcstate);
}
! void ComTerp::func_for_next_sym(ComFunc* func) {
! if (!_func_for_next_sym)
! _func_for_next_sym = func;
}
! ComFunc* ComTerp::func_for_next_sym() {
! return _func_for_next_sym;
}
void ComTerp::val_for_next_func(ComValue& val) {
--- 1044,1056 ----
*sfs = ComFuncState(funcstate);
}
! void ComTerp::func_for_next_expr(ComFunc* func) {
! if (!_func_for_next_expr)
! _func_for_next_expr = func;
}
! ComFunc* ComTerp::func_for_next_expr() {
! return _func_for_next_expr;
}
void ComTerp::val_for_next_func(ComValue& val) {
Index: ComTerp/comterp.h
diff -c ComTerp/comterp.h:1.3 ComTerp/comterp.h:1.4
*** ComTerp/comterp.h:1.3 Thu Feb 17 04:54:52 2000
--- src/ComTerp/comterp.h Sat Feb 19 00:59:05 2000
***************
*** 194,202 ****
virtual boolean is_serv() { return false; }
// flag to test if ComTerp or ComTerpServ
! void func_for_next_sym(ComFunc* func);
// set ComFunc to use on subsequent expression
! ComFunc* func_for_next_sym();
// get ComFunc to use on subsequent expression
void val_for_next_func(ComValue& val);
--- 194,202 ----
virtual boolean is_serv() { return false; }
// flag to test if ComTerp or ComTerpServ
! void func_for_next_expr(ComFunc* func);
// set ComFunc to use on subsequent expression
! ComFunc* func_for_next_expr();
// get ComFunc to use on subsequent expression
void val_for_next_func(ComValue& val);
***************
*** 254,261 ****
ComterpHandler* _handler;
// I/O handler for this ComTerp.
! ComFunc* _func_for_next_sym;
! // ComFunc to run on next symbol
ComValue* _val_for_next_func;
// ComValue to pass to next command
--- 254,261 ----
ComterpHandler* _handler;
// I/O handler for this ComTerp.
! ComFunc* _func_for_next_expr;
! // ComFunc to run on next expression
ComValue* _val_for_next_func;
// ComValue to pass to next command
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.3 ComTerp/comvalue.c:1.4
*** ComTerp/comvalue.c:1.3 Thu Feb 17 04:54:52 2000
--- src/ComTerp/comvalue.c Sat Feb 19 00:59:05 2000
***************
*** 291,297 ****
case ComValue::ObjectType:
if (svp->class_symid() == Attribute::class_symid())
! out << "<" << *((Attribute*)svp->obj_val())->Value() << ">";
else
out << "<" << symbol_pntr(svp->class_symid()) << ">";
break;
--- 291,297 ----
case ComValue::ObjectType:
if (svp->class_symid() == Attribute::class_symid())
! out << *((Attribute*)svp->obj_val())->Value();
else
out << "<" << symbol_pntr(svp->class_symid()) << ">";
break;
***************
*** 348,350 ****
--- 348,354 ----
return nil;
}
+ boolean ComValue::is_comfunc(int func_classid) {
+ return is_type(CommandType) &&
+ func_classid==((ComFunc*)obj_val())->classid();
+ }
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.7 ComTerp/comvalue.h:1.8
*** ComTerp/comvalue.h:1.7 Thu Feb 17 04:54:52 2000
--- src/ComTerp/comvalue.h Sat Feb 19 00:59:05 2000
***************
*** 113,118 ****
--- 113,121 ----
// return true if UnknownType.
boolean null() { return unknown(); }
// return true if UnknownType.
+ boolean is_comfunc(int func_classid);
+ // returns true if CommandType with ComFunc
+
void* geta(int id);
// get the class symbol id associated with an ObjectType.
Index: ComTerp/dotfunc.c
diff -c ComTerp/dotfunc.c:1.2 ComTerp/dotfunc.c:1.3
*** ComTerp/dotfunc.c:1.2 Thu Feb 17 04:54:52 2000
--- src/ComTerp/dotfunc.c Sat Feb 19 00:59:05 2000
***************
*** 31,36 ****
--- 31,38 ----
/*****************************************************************************/
+ int DotFunc::_symid = -1;
+
DotFunc::DotFunc(ComTerp* comterp) : ComFunc(comterp) {
}
Index: ComTerp/dotfunc.h
diff -c ComTerp/dotfunc.h:1.1 ComTerp/dotfunc.h:1.2
*** ComTerp/dotfunc.h:1.1 Sun Feb 13 21:43:36 2000
--- src/ComTerp/dotfunc.h Sat Feb 19 00:59:05 2000
***************
*** 38,43 ****
--- 38,45 ----
virtual void execute();
virtual const char* docstring() {
return ". makes compound variables"; }
+
+ CLASS_SYMID("DotFunc");
};
//: dname returns name field of a dotted pair
Index: ComTerp/strmfunc.c
diff -c ComTerp/strmfunc.c:1.1 ComTerp/strmfunc.c:1.2
*** ComTerp/strmfunc.c:1.1 Tue Jan 18 03:07:05 2000
--- src/ComTerp/strmfunc.c Sat Feb 19 00:59:05 2000
***************
*** 36,41 ****
--- 36,43 ----
/*****************************************************************************/
+ int StreamFunc::_symid;
+
StreamFunc::StreamFunc(ComTerp* comterp) : StrmFunc(comterp) {
}
Index: ComTerp/strmfunc.h
diff -c ComTerp/strmfunc.h:1.1 ComTerp/strmfunc.h:1.2
*** ComTerp/strmfunc.h:1.1 Tue Jan 18 03:07:05 2000
--- src/ComTerp/strmfunc.h Sat Feb 19 00:59:05 2000
***************
*** 49,54 ****
--- 49,56 ----
virtual const char* docstring() {
return ", is the stream operator"; }
+ CLASS_SYMID("StreamFunc");
+
};
//: ** (repeat) operator.
*** /dev/null Sat Feb 19 00:59:41 PST 2000
--- patches/ivtools-000219-johnston-022
*************** patches/ivtools-000219-johnston-022
*** 0 ****
--- 1 ----
+ ivtools-000219-johnston-022
|
|
From: <ivt...@li...> - 2000-02-17 18:03:54
|
Patch: ivtools-000215-johnston-021
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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
- migrate macro for declaring symbol-table based class ids to one
place -- Attribute/_comutil.h. Rename it CLASS_SYMID (from classid).
- store the symbol id for a given ComFunc in a new _funcid member variable.
- create a ComTerp::eval_expr method that takes an array of fully
code-converted ComValue's ready to be executed.
- set up so that a ComFunc execute method can ask ComTerp to invoke a
certain ComFunc on the subsequent symbol to be encountered after the
ComFunc execute method returns (ComTerp::func_for_next_sym()).
- modify the various func of symbolfunc.c to generate scalar or vector
results depending on whether there is a single or multiple argument.
Affected are symbol, symid, and symvar.
Summary of Changes:
Index: Attribute/_comutil.h
diff -c Attribute/_comutil.h:1.1 Attribute/_comutil.h:1.2
*** Attribute/_comutil.h:1.1 Tue Jan 18 03:06:54 2000
--- src/Attribute/_comutil.h Tue Feb 15 04:56:24 2000
***************
*** 3,6 ****
--- 3,19 ----
extern "C" {
#include <ComUtil/comutil.h>
}
+
+ //: define methods for a class name and class symbol id.
+ // adds ::class_name() and ::class_symid() based on 'name' to any
+ // class definition. For use in servers built on ComTerp for generating a
+ // unique id for a given type of component.
+ #define CLASS_SYMID(name) \
+ public: \
+ static const char* class_name() {return name;}\
+ static int class_symid()\
+ { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
+ protected: \
+ static int _symid;
+
#endif /* !defined(__comutil.h) */
Index: Attribute/attribute.h
diff -c Attribute/attribute.h:1.2 Attribute/attribute.h:1.3
*** Attribute/attribute.h:1.2 Sun Feb 13 21:43:33 2000
--- src/Attribute/attribute.h Tue Feb 15 04:56:25 2000
***************
*** 24,40 ****
#ifndef _attribute_h
#define _attribute_h
! //: define methods for a class name and class symbol id.
! // adds ::class_name() and ::class_symid() based on 'name' to any
! // class definition. For use in servers built on ComTerp for generating a
! // unique id for a given type of component.
! #define classid(name) \
! public: \
! static const char* class_name() {return name;}\
! static int class_symid()\
! { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
! protected: \
! static int _symid;
extern "C" {
int symbol_add(char*);
--- 24,30 ----
#ifndef _attribute_h
#define _attribute_h
! #include <Attribute/_comutil.h>
extern "C" {
int symbol_add(char*);
***************
*** 81,87 ****
friend AttributeList;
! classid("Attribute");
};
#endif
--- 71,77 ----
friend AttributeList;
! CLASS_SYMID("Attribute");
};
#endif
Index: Attribute/attrlist.h
diff -c Attribute/attrlist.h:1.2 Attribute/attrlist.h:1.3
*** Attribute/attrlist.h:1.2 Sun Feb 13 21:43:33 2000
--- src/Attribute/attrlist.h Tue Feb 15 04:56:25 2000
***************
*** 30,53 ****
#include <OS/enter-scope.h>
#include <InterViews/resource.h>
#ifndef ALITERATOR
#define ALIterator _lib_iv(Iterator)
#define AList _lib_iv(UList)
#endif
- //: define methods for a class name and class symbol id.
- // adds ::class_name() and ::class_symid() based on 'name' to any
- // class definition. For use in servers built on ComTerp for generating a
- // unique id for a given type of component.
- #define classid(name) \
- public: \
- static const char* class_name() {return name;}\
- static int class_symid()\
- { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
- protected: \
- static int _symid;
-
class ALIterator;
class AList;
class istream;
--- 30,42 ----
#include <OS/enter-scope.h>
#include <InterViews/resource.h>
+ #include <Attribute/_comutil.h>
#ifndef ALITERATOR
#define ALIterator _lib_iv(Iterator)
#define AList _lib_iv(UList)
#endif
class ALIterator;
class AList;
class istream;
***************
*** 160,166 ****
AList* _alist;
unsigned int _count;
! classid("AttributeList");
};
//: list of AttributeValue objects.
--- 149,155 ----
AList* _alist;
unsigned int _count;
! CLASS_SYMID("AttributeList");
};
//: list of AttributeValue objects.
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.3 Attribute/attrvalue.h:1.4
*** Attribute/attrvalue.h:1.3 Sun Feb 13 21:43:33 2000
--- src/Attribute/attrvalue.h Tue Feb 15 04:56:25 2000
***************
*** 27,32 ****
--- 27,33 ----
#include <stdlib.h>
#include <OS/enter-scope.h>
+ #include <Attribute/_comutil.h>
extern "C" {
int symbol_add(char*);
Index: ComTerp/_comutil.h
diff -c ComTerp/_comutil.h:1.1 ComTerp/_comutil.h:1.2
*** ComTerp/_comutil.h:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/_comutil.h Tue Feb 15 04:56:30 2000
***************
*** 1,6 ****
! #ifndef __comutil_h
! #define __comutil_h
extern "C" {
#include <ComUtil/comutil.h>
}
! #endif /* !defined(__comutil.h) */
--- 1,6 ----
! #ifndef __comutil2_h
! #define __comutil2_h
extern "C" {
#include <ComUtil/comutil.h>
}
! #endif /* !defined(__comutil2_h) */
Index: ComTerp/comfunc.h
diff -c ComTerp/comfunc.h:1.1 ComTerp/comfunc.h:1.2
*** ComTerp/comfunc.h:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/comfunc.h Tue Feb 15 04:56:30 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 32,37 ****
--- 33,39 ----
#include <stdlib.h>
#include <OS/types.h>
#include <ComTerp/comvalue.h>
+ #include <Attribute/_comutil.h>
class AttributeList;
class ComFuncState;
***************
*** 149,161 ****
--- 151,173 ----
// to the invocation of this ComFunc. 'dflt' is used whenever a
// keyword has no matching argument.
+ void funcid(int id) { _funcid = id; }
+ // set symbol id of name for func
+ int funcid() { return _funcid; }
+ // get symbol id of name for func
+
ComValue& lookup_symval(ComValue&);
+ // lookup variable value given a symbol ComValue
+ ComValue& lookup_symval(int symid);
+ // lookup variable value given a symbol id.
void assign_symval(int id, ComValue*);
virtual boolean post_eval() { return false; }
virtual const char* docstring() { return "%s: no docstring method defined"; }
static int bintest(const char* name);
static boolean bincheck(const char* name);
+
+
protected:
***************
*** 195,201 ****
--- 207,215 ----
// currently interpreting expression.
ComTerp* _comterp;
+ int _funcid;
+ CLASS_SYMID("ComFunc");
};
//: state object for holding invocation specific data about a ComFunc.
Index: ComTerp/comhandler.c
diff -c ComTerp/comhandler.c:1.1 ComTerp/comhandler.c:1.2
*** ComTerp/comhandler.c:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/comhandler.c Tue Feb 15 04:56:30 2000
***************
*** 154,160 ****
inbuf[len] = '\0';
#endif
comterp_->load_string(inbuf);
! if (fd)
cerr << "command via ACE -- " << inbuf << "\n";
#else
comterp_->_infunc = (infuncptr)&ComTerpServ::fd_fgets;
--- 154,160 ----
inbuf[len] = '\0';
#endif
comterp_->load_string(inbuf);
! if (fd>0)
cerr << "command via ACE -- " << inbuf << "\n";
#else
comterp_->_infunc = (infuncptr)&ComTerpServ::fd_fgets;
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.2 ComTerp/comterp.c:1.3
*** ComTerp/comterp.c:1.2 Sun Feb 13 21:43:36 2000
--- src/ComTerp/comterp.c Tue Feb 15 04:56:30 2000
***************
*** 165,170 ****
--- 165,191 ----
return FUNCOK;
}
+ int ComTerp::eval_expr(ComValue* pfvals, int npfvals) {
+ int save_pfoff = _pfoff;
+ int save_pfnum = _pfnum;
+ ComValue* save_pfcomvals = _pfcomvals;
+
+ _pfoff = 0;
+ _pfnum = npfvals;
+ _pfcomvals = pfvals;
+
+ while (_pfoff < _pfnum) {
+ load_sub_expr();
+ eval_expr_internals();
+ }
+
+ _pfoff = save_pfoff;
+ _pfnum = save_pfnum;
+ _pfcomvals = save_pfcomvals;
+
+ return FUNCOK;
+ }
+
void ComTerp::eval_expr_internals(int pedepth) {
ComValue& sv = pop_stack(false);
***************
*** 180,203 ****
}
} else if (sv.type() == ComValue::SymbolType) {
!
! if (_alist) {
! int id = sv.symbol_val();
! AttributeValue* val = _alist->find(id);
! if (val) {
! ComValue newval(*val);
! push_stack(newval);
! } else
! push_stack(ComValue::nullval());
! } else
! push_stack(lookup_symval(sv));
} else if (sv.type() == ComValue::ObjectType && sv.class_symid() == Attribute::class_symid()) {
push_stack(*((Attribute*)sv.obj_val())->Value());
} else if (sv.type() == ComValue::BlankType) {
!
/* ignore it */
eval_expr_internals(pedepth);
--- 201,240 ----
}
} else if (sv.type() == ComValue::SymbolType) {
!
! if (_func_for_next_sym) {
! ComFunc* func = _func_for_next_sym;
! _func_for_next_sym = nil;
!
! push_stack(sv);
! func->push_funcstate(1, 0, pedepth, func->funcid());
! func->execute();
! func->pop_funcstate();
! if (_just_reset) {
! push_stack(ComValue::blankval());
! _just_reset = false;
! }
!
! } else {
!
! if (_alist) {
! int id = sv.symbol_val();
! AttributeValue* val = _alist->find(id);
! if (val) {
! ComValue newval(*val);
! push_stack(newval);
! } else
! push_stack(ComValue::nullval());
! } else
! push_stack(lookup_symval(sv));
! }
} else if (sv.type() == ComValue::ObjectType && sv.class_symid() == Attribute::class_symid()) {
push_stack(*((Attribute*)sv.obj_val())->Value());
} else if (sv.type() == ComValue::BlankType) {
!
/* ignore it */
eval_expr_internals(pedepth);
***************
*** 592,597 ****
--- 629,635 ----
int ComTerp::add_command(const char* name, ComFunc* func, const char* alias) {
int symid = symbol_add((char *)name);
+ func->funcid(symid);
ComValue* comval = new ComValue();
comval->type(ComValue::CommandType);
comval->obj_ref() = (void*)func;
***************
*** 996,998 ****
--- 1034,1044 ----
ComFuncState* sfs = _fsstack + _fsstack_top;
*sfs = ComFuncState(funcstate);
}
+
+ void ComTerp::func_for_next_sym(ComFunc* func) {
+ if (!_func_for_next_sym)
+ _func_for_next_sym = func;
+ }
+
+
+
Index: ComTerp/comterp.h
diff -c ComTerp/comterp.h:1.1 ComTerp/comterp.h:1.2
*** ComTerp/comterp.h:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/comterp.h Tue Feb 15 04:56:31 2000
***************
*** 83,88 ****
--- 83,90 ----
// evaluate topmost expression on the stack, with a flag to
// indicate if this call to eval_expr() is nested inside
// another, so that initialization doesn't get repeated.
+ virtual int eval_expr(ComValue* pfvals, int npfvals);
+ // evaluate postfix expression stored in ComValue objects.
virtual int post_eval_expr(int tokcnt, int offtop, int pedepth);
// copy unevaluated expression to the stack and evaluate.
***************
*** 114,119 ****
--- 116,124 ----
ComValue& lookup_symval(ComValue&);
// look up a ComValue associated with a symbol (specified in the
// input ComValue) in the local or global symbol tables.
+ ComValue& lookup_symval(int symid);
+ // look up a ComValue associated with a symbol (specified with a
+ // symbol id) in the local or global symbol tables.
ComValue& stack_top(int n=0);
// return reference to top of the stack, offset by 'n' (usually negative).
***************
*** 189,194 ****
--- 194,202 ----
virtual boolean is_serv() { return false; }
// flag to test if ComTerp or ComTerpServ
+ void func_for_next_sym(ComFunc* func);
+ // set ComFunc to use on subsequent expression
+
protected:
void incr_stack();
void incr_stack(int n);
***************
*** 236,241 ****
--- 244,253 ----
ComterpHandler* _handler;
// I/O handler for this ComTerp.
+
+ ComFunc* _func_for_next_sym;
+ // ComFunc to run on next symbol
+
friend class ComFunc;
friend class ComterpHandler;
Index: ComTerp/symbolfunc.c
diff -c ComTerp/symbolfunc.c:1.1 ComTerp/symbolfunc.c:1.2
*** ComTerp/symbolfunc.c:1.1 Tue Jan 18 03:07:06 2000
--- src/ComTerp/symbolfunc.c Tue Feb 15 04:56:31 2000
***************
*** 42,47 ****
--- 42,48 ----
// return id of each symbol in the arguments
boolean noargs = !nargs() && !nkeys();
int numargs = nargs();
+ if (!numargs) return;
int symbol_ids[numargs];
for (int i=0; i<numargs; i++) {
ComValue& val = stack_arg(i, true);
***************
*** 56,66 ****
}
reset_stack();
! AttributeValueList* avl = new AttributeValueList();
! ComValue retval(avl);
! for (int i=0; i<numargs; i++)
! avl->Append(new AttributeValue(symbol_ids[i], AttributeValue::IntType));
! push_stack(retval);
}
/*****************************************************************************/
--- 57,73 ----
}
reset_stack();
! if (numargs>1) {
! AttributeValueList* avl = new AttributeValueList();
! ComValue retval(avl);
! for (int i=0; i<numargs; i++)
! avl->Append(new AttributeValue(symbol_ids[i], AttributeValue::IntType));
! push_stack(retval);
! } else {
! ComValue retval (symbol_ids[0], AttributeValue::IntType);
! push_stack(retval);
! }
!
}
/*****************************************************************************/
***************
*** 72,77 ****
--- 79,85 ----
// return symbol for each id argument
boolean noargs = !nargs() && !nkeys();
int numargs = nargs();
+ if (!numargs) return;
int symbol_ids[numargs];
for (int i=0; i<numargs; i++) {
ComValue& val = stack_arg(i, true);
***************
*** 81,92 ****
symbol_ids[i] = -1;
}
reset_stack();
- AttributeValueList* avl = new AttributeValueList();
- ComValue retval(avl);
- for (int i=0; i<numargs; i++)
- avl->Append(new AttributeValue(symbol_ids[i], AttributeValue::SymbolType));
- push_stack(retval);
}
--- 89,106 ----
symbol_ids[i] = -1;
}
reset_stack();
+
+ if (numargs>1) {
+ AttributeValueList* avl = new AttributeValueList();
+ ComValue retval(avl);
+ for (int i=0; i<numargs; i++)
+ avl->Append(new AttributeValue(symbol_ids[i], AttributeValue::SymbolType));
+ push_stack(retval);
+ } else {
+ ComValue retval (symbol_ids[0], AttributeValue::SymbolType);
+ push_stack(retval);
+ }
}
***************
*** 99,104 ****
--- 113,119 ----
// return value for each symbol variable
boolean noargs = !nargs() && !nkeys();
int numargs = nargs();
+ if (!numargs) return;
ComValue* varvalues[numargs];
for (int i=0; i<numargs; i++) {
***************
*** 106,117 ****
varvalues[i] = &stack_arg(i, false);
}
! AttributeValueList* avl = new AttributeValueList();
! ComValue retval(avl);
! for (int i=0; i<numargs; i++)
! avl->Append(new ComValue(*varvalues[i]));
! reset_stack();
! push_stack(retval);
}
--- 121,137 ----
varvalues[i] = &stack_arg(i, false);
}
! if (numargs>1) {
! AttributeValueList* avl = new AttributeValueList();
! ComValue retval(avl);
! for (int i=0; i<numargs; i++)
! avl->Append(new ComValue(*varvalues[i]));
! reset_stack();
! push_stack(retval);
! } else {
! ComValue retval (*varvalues[0]);
! push_stack(retval);
! }
}
Index: OverlayUnidraw/ovcomps.h
diff -c OverlayUnidraw/ovcomps.h:1.1 OverlayUnidraw/ovcomps.h:1.2
*** OverlayUnidraw/ovcomps.h:1.1 Tue Jan 18 03:10:44 2000
--- src/OverlayUnidraw/ovcomps.h Tue Feb 15 04:57:49 2000
***************
*** 31,51 ****
#include <UniIdraw/idcomp.h>
#include <InterViews/observe.h>
! extern "C" {
! #include <ComUtil/comutil.ci>
! }
!
! //: define methods for a class name and class symbol id.
! // adds ::class_name() and ::class_symid() based on 'name' to any
! // class definition. For use in servers built on ComTerp for generating a
! // unique id for a given type of component.
! #define classid(name) \
! public: \
! static const char* class_name() {return name;}\
! static int class_symid()\
! { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
! protected: \
! static int _symid;
class AttributeList;
class AttributeValue;
--- 31,37 ----
#include <UniIdraw/idcomp.h>
#include <InterViews/observe.h>
! #include <Attribute/_comutil.h>
class AttributeList;
class AttributeValue;
*** /dev/null Tue Feb 15 04:58:40 PST 2000
--- patches/ivtools-000215-johnston-021
*************** patches/ivtools-000215-johnston-021
*** 0 ****
--- 1 ----
+ ivtools-000215-johnston-021
|
|
From: <ivt...@li...> - 2000-02-17 17:54:40
|
Patch: ivtools-000213-johnston-020
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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 the "." (dot) operator to comterp, to allow for compound
variables (i.e. "a.b"). They can be used on the right-hand or
left-hand side of an assignment operator, and used pretty much
anywhere a symbol can be used.
The first operand is either a symbol to assign an AttributeList to, or
an expression that evaluates to an AttributeList. The second operand
is always a symbol. They can be concatenated (i.e. "a.b.c").
Index: ComUtil/optable.c
diff -c ComUtil/optable.c:1.1 ComUtil/optable.c:1.2
*** ComUtil/optable.c:1.1 Tue Jan 18 03:06:51 2000
--- src/ComUtil/optable.c Sun Feb 13 21:43:31 2000
***************
*** 79,85 ****
BOOLEAN rtol;
unsigned optype;
} DefaultOperatorTable[] = {
! {".", "dot", 130, TRUE, OPTYPE_BINARY },
{"^", "power", 120, TRUE, OPTYPE_BINARY },
{"!", "negate", 110, TRUE, OPTYPE_UNARY_PREFIX },
{"++", "incr", 110, TRUE, OPTYPE_UNARY_PREFIX },
--- 79,85 ----
BOOLEAN rtol;
unsigned optype;
} DefaultOperatorTable[] = {
! {".", "dot", 130, FALSE, OPTYPE_BINARY },
{"^", "power", 120, TRUE, OPTYPE_BINARY },
{"!", "negate", 110, TRUE, OPTYPE_UNARY_PREFIX },
{"++", "incr", 110, TRUE, OPTYPE_UNARY_PREFIX },
Index: Attribute/attribute.c
diff -c Attribute/attribute.c:1.1 Attribute/attribute.c:1.2
*** Attribute/attribute.c:1.1 Tue Jan 18 03:06:54 2000
--- src/Attribute/attribute.c Sun Feb 13 21:43:33 2000
***************
*** 26,31 ****
--- 26,33 ----
/*****************************************************************************/
+ int Attribute::_symid = -1;
+
Attribute::Attribute(const char* name, AttributeValue* value) {
if (name)
symbolid = symbol_add((char *)name);
Index: Attribute/attribute.h
diff -c Attribute/attribute.h:1.1 Attribute/attribute.h:1.2
*** Attribute/attribute.h:1.1 Tue Jan 18 03:06:54 2000
--- src/Attribute/attribute.h Sun Feb 13 21:43:33 2000
***************
*** 24,29 ****
--- 24,41 ----
#ifndef _attribute_h
#define _attribute_h
+ //: define methods for a class name and class symbol id.
+ // adds ::class_name() and ::class_symid() based on 'name' to any
+ // class definition. For use in servers built on ComTerp for generating a
+ // unique id for a given type of component.
+ #define classid(name) \
+ public: \
+ static const char* class_name() {return name;}\
+ static int class_symid()\
+ { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
+ protected: \
+ static int _symid;
+
extern "C" {
int symbol_add(char*);
int symbol_del(int);
***************
*** 68,73 ****
--- 80,87 ----
AttributeValue* valueptr;
friend AttributeList;
+
+ classid("Attribute");
};
#endif
Index: Attribute/attrlist.c
diff -c Attribute/attrlist.c:1.1 Attribute/attrlist.c:1.2
*** Attribute/attrlist.c:1.1 Tue Jan 18 03:06:55 2000
--- src/Attribute/attrlist.c Sun Feb 13 21:43:33 2000
***************
*** 42,47 ****
--- 42,49 ----
/*****************************************************************************/
+ int AttributeList::_symid = -1;
+
AttributeList::AttributeList (AttributeList* s) {
_alist = new AList;
_count = 0;
***************
*** 113,118 ****
--- 115,130 ----
for (First(i); !Done(i); Next(i)) {
Attribute* attr = GetAttr(i);
if (strcmp(n, attr->Name()) == 0)
+ return attr;
+ }
+ return nil;
+ }
+
+ Attribute* AttributeList::GetAttr (int symid) {
+ ALIterator i;
+ for (First(i); !Done(i); Next(i)) {
+ Attribute* attr = GetAttr(i);
+ if (symid == attr->SymbolId())
return attr;
}
return nil;
Index: Attribute/attrlist.h
diff -c Attribute/attrlist.h:1.1 Attribute/attrlist.h:1.2
*** Attribute/attrlist.h:1.1 Tue Jan 18 03:06:55 2000
--- src/Attribute/attrlist.h Sun Feb 13 21:43:33 2000
***************
*** 36,41 ****
--- 36,53 ----
#define AList _lib_iv(UList)
#endif
+ //: define methods for a class name and class symbol id.
+ // adds ::class_name() and ::class_symid() based on 'name' to any
+ // class definition. For use in servers built on ComTerp for generating a
+ // unique id for a given type of component.
+ #define classid(name) \
+ public: \
+ static const char* class_name() {return name;}\
+ static int class_symid()\
+ { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \
+ protected: \
+ static int _symid;
+
class ALIterator;
class AList;
class istream;
***************
*** 91,96 ****
--- 103,110 ----
Attribute* GetAttr(const char*);
// get attribute by name.
+ Attribute* GetAttr(int symid);
+ // get attribute by symbol id.
Attribute* GetAttr(ALIterator);
// get attribute pointed to by iterator.
void SetAttr(Attribute*, ALIterator&);
***************
*** 145,150 ****
--- 159,166 ----
AList* _alist;
unsigned int _count;
+
+ classid("AttributeList");
};
//: list of AttributeValue objects.
Index: Attribute/attrvalue.c
diff -c Attribute/attrvalue.c:1.1 Attribute/attrvalue.c:1.2
*** Attribute/attrvalue.c:1.1 Tue Jan 18 03:06:56 2000
--- src/Attribute/attrvalue.c Sun Feb 13 21:43:33 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1997 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 22,27 ****
--- 23,29 ----
*/
#include <Attribute/aliterator.h>
+ #include <Attribute/attribute.h>
#include <Attribute/attrvalue.h>
#include <Attribute/attrlist.h>
***************
*** 539,544 ****
--- 541,550 ----
return _v.objval.type;
}
+ unsigned int AttributeValue::class_symid() {
+ return _v.objval.type;
+ }
+
AttributeValueList* AttributeValue::array_val() {
return array_ref();
}
***************
*** 754,759 ****
--- 760,769 ----
case AttributeValue::BlankType:
break;
+ case AttributeValue::ObjectType:
+ out << "<" << symbol_pntr(svp->class_symid()) << ">";
+ break;
+
default:
out << "Unknown type";
break;
***************
*** 830,834 ****
--- 840,868 ----
default:
return 0;
}
+ }
+
+ void AttributeValue::assignval (const AttributeValue& av) {
+ void* v1 = &_v;
+ const void* v2 = &av._v;
+ memcpy(v1, v2, sizeof(double));
+ _type = av._type;
+ _aggregate_type = av._aggregate_type;
+ #if 0 // this end of reference counting disabled as well
+ if (_type == StringType || _type == SymbolType)
+ symbol_add((char *)string_ptr());
+ else
+ #endif
+ if (_type == ArrayType && _v.arrayval.ptr)
+ Resource::ref(_v.arrayval.ptr);
+ }
+
+
+ boolean AttributeValue::is_attributelist() {
+ return is_object() && class_symid() == AttributeList::class_symid();
+ }
+
+ boolean AttributeValue::is_attribute() {
+ return is_object() && class_symid() == Attribute::class_symid();
}
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.2 Attribute/attrvalue.h:1.3
*** Attribute/attrvalue.h:1.2 Tue Feb 1 23:08:39 2000
--- src/Attribute/attrvalue.h Sun Feb 13 21:43:33 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 143,148 ****
--- 144,152 ----
static int type_size(ValueType);
// return sizeof of value of given type.
+ void assignval (const AttributeValue&);
+ // copy contents of AttributeValue
+
char& char_ref(); // char by reference.
unsigned char& uchar_ref(); // unsigned char by reference.
short& short_ref(); // short by reference.
***************
*** 178,183 ****
--- 182,188 ----
unsigned int symbol_val(); // symbol id by value.
void* obj_val(); // void* pointer to object by value.
unsigned int obj_type_val(); // classid of object by value.
+ unsigned int class_symid(); // classid of object by value.
AttributeValueList* array_val(); // values in list by value.
unsigned int array_type_val(); // type of values in list by value
unsigned int keyid_val(); // symbol id of keyword by value.
***************
*** 268,278 ****
static boolean is_num(ValueType t)
{ return is_integer(t) || is_floatingpoint(t); }
-
boolean is_blank() { return is_type(BlankType); }
// returns true if BlankType.
static boolean is_blank(ValueType t)
{ return t==BlankType; };
friend ostream& operator << (ostream& s, const AttributeValue&);
// output AttributeValue to ostream.
--- 273,287 ----
static boolean is_num(ValueType t)
{ return is_integer(t) || is_floatingpoint(t); }
boolean is_blank() { return is_type(BlankType); }
// returns true if BlankType.
static boolean is_blank(ValueType t)
{ return t==BlankType; };
+
+ boolean is_attributelist();
+ // returns true if ObjectType with an AttributeList object.
+ boolean is_attribute();
+ // returns true if ObjectType with an Attribute object.
friend ostream& operator << (ostream& s, const AttributeValue&);
// output AttributeValue to ostream.
Index: ComTerp/Imakefile
diff -c ComTerp/Imakefile:1.1 ComTerp/Imakefile:1.2
*** ComTerp/Imakefile:1.1 Tue Jan 18 03:07:02 2000
--- src/ComTerp/Imakefile Sun Feb 13 21:43:36 2000
***************
*** 24,29 ****
--- 24,30 ----
Obj(comvalue)
Obj(condfunc)
ObjA(ctrlfunc)
+ Obj(dotfunc)
Obj(helpfunc)
Obj(iofunc)
Obj(listfunc)
Index: ComTerp/assignfunc.c
diff -c ComTerp/assignfunc.c:1.1 ComTerp/assignfunc.c:1.2
*** ComTerp/assignfunc.c:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/assignfunc.c Sun Feb 13 21:43:36 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1997,1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 53,58 ****
--- 54,62 ----
Unref(attrlist);
} else
comterp()->localtable()->insert(operand1.symbol_val(), operand2);
+ } else if (operand1.type() == ComValue::ObjectType && operand1.class_symid() == Attribute::class_symid()) {
+ Attribute* attr = (Attribute*)operand1.obj_val();
+ attr->Value(operand2);
} else {
cerr << "assignment to something other than a symbol ignored\n";
// should say something about assignment from something other than a symbol as well.
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2
*** ComTerp/comterp.c:1.1 Tue Jan 18 03:07:03 2000
--- src/ComTerp/comterp.c Sun Feb 13 21:43:36 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 31,36 ****
--- 32,38 ----
#include <ComTerp/comvalue.h>
#include <ComTerp/condfunc.h>
#include <ComTerp/ctrlfunc.h>
+ #include <ComTerp/dotfunc.h>
#include <ComTerp/helpfunc.h>
#include <ComTerp/iofunc.h>
#include <ComTerp/listfunc.h>
***************
*** 43,48 ****
--- 45,51 ----
#include <ComTerp/symbolfunc.h>
#include <ComTerp/xformfunc.h>
#include <Attribute/attrlist.h>
+ #include <Attribute/attribute.h>
#include <ctype.h>
#include <iostream.h>
***************
*** 189,194 ****
--- 192,201 ----
} else
push_stack(lookup_symval(sv));
+ } else if (sv.type() == ComValue::ObjectType && sv.class_symid() == Attribute::class_symid()) {
+
+ push_stack(*((Attribute*)sv.obj_val())->Value());
+
} else if (sv.type() == ComValue::BlankType) {
/* ignore it */
***************
*** 559,564 ****
--- 566,575 ----
} else
return ComValue::nullval();
}
+ } else if (comval.type() == ComValue::ObjectType && comval.class_symid() == Attribute::class_symid()) {
+
+ comval.assignval(*((Attribute*)comval.obj_val())->Value());
+
}
return comval;
}
***************
*** 709,714 ****
--- 720,729 ----
add_command("stream", new StreamFunc(this));
add_command("repeat", new RepeatFunc(this));
add_command("iterate", new IterateFunc(this));
+
+ add_command("dot", new DotFunc(this));
+ add_command("dname", new DotNameFunc(this));
+ add_command("dval", new DotValFunc(this));
add_command("at", new ListAtFunc(this));
add_command("size", new ListSizeFunc(this));
Index: ComTerp/comvalue.c
diff -c ComTerp/comvalue.c:1.1 ComTerp/comvalue.c:1.2
*** ComTerp/comvalue.c:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/comvalue.c Sun Feb 13 21:43:36 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1994-1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 24,29 ****
--- 25,31 ----
#include <ComTerp/comvalue.h>
#include <ComTerp/comterp.h>
#include <Attribute/attrlist.h>
+ #include <Attribute/attribute.h>
#include <Attribute/aliterator.h>
#include <Attribute/paramlist.h>
***************
*** 122,143 ****
return *this;
}
- void ComValue::assignval (const ComValue& sv) {
- void* v1 = &_v;
- const void* v2 = &sv._v;
- memcpy(v1, v2, sizeof(double));
- _type = sv._type;
- _aggregate_type = sv._aggregate_type;
- #if 0 // this end of reference counting disabled as well
- if (_type == StringType || _type == SymbolType)
- symbol_add((char *)string_ptr());
- else
- #endif
- if (_type == ArrayType && _v.arrayval.ptr)
- Resource::ref(_v.arrayval.ptr);
- }
-
-
int ComValue::narg() const { return _narg; }
int ComValue::nkey() const { return _nkey; }
int ComValue::nids() const { return _nids; }
--- 124,129 ----
***************
*** 301,312 ****
case ComValue::BlankType:
break;
case ComValue::UnknownType:
! out << "nil";
! break;
default:
! break;
}
return out;
}
--- 287,305 ----
case ComValue::BlankType:
break;
+ case ComValue::ObjectType:
+ if (svp->class_symid() == Attribute::class_symid())
+ out << "<" << *((Attribute*)svp->obj_val())->Value() << ">";
+ else
+ out << "<" << symbol_pntr(svp->class_symid()) << ">";
+ break;
+
case ComValue::UnknownType:
! out << "nil";
! break;
default:
! break;
}
return out;
}
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.5 ComTerp/comvalue.h:1.6
*** ComTerp/comvalue.h:1.5 Wed Feb 2 03:19:57 2000
--- src/ComTerp/comvalue.h Sun Feb 13 21:43:36 2000
***************
*** 88,95 ****
ComValue& operator= (const ComValue&);
// assignment operator.
- void assignval (const ComValue&);
- // assign only the AttributeValue portion of a ComValue.
int narg() const;
// number of arguments associated with this command or keyword.
--- 88,93 ----
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.1 ComTerp/ctrlfunc.c:1.2
*** ComTerp/ctrlfunc.c:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/ctrlfunc.c Sun Feb 13 21:43:36 2000
***************
*** 67,84 ****
/*****************************************************************************/
- DotFunc::DotFunc(ComTerp* comterp) : ComFunc(comterp) {
- }
-
- void DotFunc::execute() {
- ComValue thisval(stack_arg(0));
- ComValue methval(stack_arg(1));
- reset_stack();
- push_stack(methval);
- }
-
- /*****************************************************************************/
-
TimeExprFunc::TimeExprFunc(ComTerp* comterp) : ComFunc(comterp) {
}
--- 67,72 ----
Index: ComTerp/ctrlfunc.h
diff -c ComTerp/ctrlfunc.h:1.1 ComTerp/ctrlfunc.h:1.2
*** ComTerp/ctrlfunc.h:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/ctrlfunc.h Sun Feb 13 21:43:36 2000
***************
*** 63,77 ****
};
- //: . (dot) operator.
- class DotFunc : public ComFunc {
- public:
- DotFunc(ComTerp*);
-
- virtual void execute();
-
- };
-
//: timer expression command for ComTerp.
// timeexpr(comstr :sec n) -- command string to execute at intervals.
class TimeExprFunc : public ComFunc {
--- 63,68 ----
Index: ComTerp/dotfunc.c
diff -c /dev/null ComTerp/dotfunc.c:1.1
*** /dev/null Sun Feb 13 21:43:39 2000
--- src/ComTerp/dotfunc.c Sun Feb 13 21:43:36 2000
***************
*** 0 ****
--- 1,109 ----
+ /*
+ * Copyright (c) 2000 IET Inc.
+ *
+ * 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 <ComTerp/dotfunc.h>
+ #include <ComTerp/comvalue.h>
+ #include <ComTerp/comterp.h>
+ #include <Attribute/attrlist.h>
+ #include <Attribute/attribute.h>
+
+ #define TITLE "DotFunc"
+
+ /*****************************************************************************/
+
+ DotFunc::DotFunc(ComTerp* comterp) : ComFunc(comterp) {
+ }
+
+ void DotFunc::execute() {
+ ComValue before_part(stack_arg(0, true));
+ ComValue after_part(stack_arg(1, true));
+ reset_stack();
+ if (!before_part.is_symbol() &&
+ !(before_part.is_attribute() &&
+ ((Attribute*)before_part.obj_val())->Value()->is_attributelist())) {
+ cerr << "expression before \".\" needs to evaluate to a symbol or <AttributeList>\n";
+ return;
+ }
+ if (!after_part.is_symbol()) {
+ cerr << "expression after \".\" needs to be a symbol\n";
+ return;
+ }
+
+
+ /* lookup value of before variable */
+ void* vptr = nil;
+ AttributeList* al = nil;
+ if (!before_part.is_attribute()) {
+ int before_symid = before_part.symbol_val();
+ comterp()->localtable()->find(vptr, before_symid);
+ if (vptr &&((ComValue*) vptr)->class_symid() == AttributeList::class_symid()) {
+ al = (AttributeList*) ((ComValue*) vptr)->obj_val();
+ } else {
+ al = new AttributeList();
+ ComValue* comval = new ComValue(AttributeList::class_symid(), al);
+ comterp()->localtable()->insert(before_symid, comval);
+ }
+ } else
+ al = (AttributeList*) ((Attribute*) before_part.obj_val())->Value()->obj_val();
+
+ int after_symid = after_part.symbol_val();
+ Attribute* attr = al->GetAttr(after_symid);
+ if (!attr) {
+ attr = new Attribute(after_symid, new AttributeValue());
+ al->add_attribute(attr);
+ }
+ ComValue retval(Attribute::class_symid(), attr);
+ push_stack(retval);
+ }
+
+ /*****************************************************************************/
+
+ DotNameFunc::DotNameFunc(ComTerp* comterp) : ComFunc(comterp) {
+ }
+
+ void DotNameFunc::execute() {
+ ComValue dotted_pair(stack_arg(0));
+ reset_stack();
+ if (dotted_pair.class_symid() != Attribute::class_symid()) return;
+ Attribute *attr = (Attribute*)dotted_pair.obj_val();
+ ComValue retval(attr->SymbolId(), ComValue::SymbolType);
+ push_stack(retval);
+ }
+
+ /*****************************************************************************/
+
+ DotValFunc::DotValFunc(ComTerp* comterp) : ComFunc(comterp) {
+ }
+
+ void DotValFunc::execute() {
+ ComValue dotted_pair(stack_arg(0));
+ reset_stack();
+ if (dotted_pair.class_symid() != Attribute::class_symid()) return;
+ Attribute *attr = (Attribute*)dotted_pair.obj_val();
+ push_stack(*attr->Value());
+ }
+
+
+
+
+
Index: ComTerp/dotfunc.h
diff -c /dev/null ComTerp/dotfunc.h:1.1
*** /dev/null Sun Feb 13 21:43:39 2000
--- src/ComTerp/dotfunc.h Sun Feb 13 21:43:36 2000
***************
*** 0 ****
--- 1,63 ----
+ /*
+ * Copyright (c) 2000 IET Inc.
+ *
+ * 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.
+ *
+ */
+
+ /*
+ * dot func supports a compound variable
+ */
+
+ #if !defined(_dotfunc_h)
+ #define _dotfunc_h
+
+ #include <ComTerp/numfunc.h>
+
+ //: . (dot) operator, for compound variables.
+ class DotFunc : public ComFunc {
+ public:
+ DotFunc(ComTerp*);
+
+ virtual void execute();
+ virtual const char* docstring() {
+ return ". makes compound variables"; }
+ };
+
+ //: dname returns name field of a dotted pair
+ class DotNameFunc : public ComFunc {
+ public:
+ DotNameFunc(ComTerp*);
+
+ virtual void execute();
+ virtual const char* docstring() {
+ return "%s(attribute) returns name field of a dotted pair"; }
+ };
+
+ //: dval returns value field of a dotted pair
+ class DotValFunc : public ComFunc {
+ public:
+ DotValFunc(ComTerp*);
+
+ virtual void execute();
+ virtual const char* docstring() {
+ return "%s(attribute) returns value field of a dotted pair"; }
+ };
+ #endif /* !defined(_dotfunc_h) */
+
Index: ComTerp/helpfunc.c
diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2
*** ComTerp/helpfunc.c:1.1 Tue Jan 18 03:07:04 2000
--- src/ComTerp/helpfunc.c Sun Feb 13 21:43:36 2000
***************
*** 73,80 ****
} else if (val.is_type(AttributeValue::StringType)) {
void *vptr = nil;
comterp()->localtable()->find(vptr, val.string_val());
! if (vptr) {
! comfuncs[i] = (ComFunc*)((ComValue*)vptr)->obj_val();
} else
comfuncs[i] = nil;
command_ids[i] = val.string_val();
--- 73,80 ----
} else if (val.is_type(AttributeValue::StringType)) {
void *vptr = nil;
comterp()->localtable()->find(vptr, val.string_val());
! if (vptr && ((ComValue*)vptr)->is_command()) {
! comfuncs[i] = (ComFunc*)((ComValue*)vptr)->obj_val();
} else
comfuncs[i] = nil;
command_ids[i] = val.string_val();
***************
*** 104,110 ****
void* vptr;
comterp()->localtable()->find(vptr, command_id);
! if (vptr) {
comfuncs[j] = (ComFunc*)((ComValue*)vptr)->obj_val();
} else
comfuncs[j] = nil;
--- 104,110 ----
void* vptr;
comterp()->localtable()->find(vptr, command_id);
! if (vptr && ((ComValue*)vptr)->is_command()) {
comfuncs[j] = (ComFunc*)((ComValue*)vptr)->obj_val();
} else
comfuncs[j] = nil;
*** /dev/null Sun Feb 13 21:44:17 PST 2000
--- patches/ivtools-000213-johnston-020
*************** patches/ivtools-000213-johnston-020
*** 0 ****
--- 1 ----
+ ivtools-000213-johnston-020
|
|
From: <ivt...@li...> - 2000-02-11 18:32:50
|
Patch: ivtools-000211-johnston-019 For: ivtools-0.8 Author: joh...@us... This is an intermediate patch to ivtools-0.8. 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 the default behavior of make with no arguments to be the same as "make World" the first time it used. So now ivtools can build out of the box with ubiquitous "./configure;make" Index: top_ivtools/Imakefile diff -c top_ivtools/Imakefile:1.1 top_ivtools/Imakefile:1.2 *** top_ivtools/Imakefile:1.1 Tue Jan 18 03:06:44 2000 --- ./Imakefile Fri Feb 11 22:23:45 2000 *************** *** 1,16 **** XCOMM ! XCOMM "make CPU" prints the name you should assign to CPU. ! XCOMM "make World" builds everything. XCOMM "make install" installs everything. XCOMM PACKAGE = top_ivtools ! WORLDOPTS = -k SUBDIRS = src config MakeCPU() MakeWorld($(WORLDOPTS)) ! MakeInSubdirs($(SUBDIRS)) --- 1,21 ---- XCOMM ! XCOMM "make CPU" prints the CPU name used for machine-specific subdirectories. ! XCOMM "make" builds everything. XCOMM "make install" installs everything. XCOMM PACKAGE = top_ivtools ! WORLDOPTS = SUBDIRS = src config MakeCPU() MakeWorld($(WORLDOPTS)) ! MakeWorld2($(WORLDOPTS)) ! MakeInSubdirsTop($(SUBDIRS)) ! ! clean:: ! @$(RM_CMD) make.makefile make.makefiles make.depend make.make ! 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 Tue Jan 18 03:14:42 2000 --- config/rules.def Fri Feb 11 22:24:25 2000 *************** *** 33,46 **** @echo "Building $(RELEASE) on `date`" @@\ @echo "" @@\ $(MAKE) Makefile CONFIGSRC=$(CONFIGSRC) XCONFIGDIR=$(XCONFIGDIR)@@\ ! @echo "twice to propogate new toplevel pathname" @@\ $(MAKE) Makefile @@\ @echo "" @@\ $(MAKE) Makefiles @@\ @echo "" @@\ $(MAKE) depend @@\ @echo "" @@\ ! $(MAKE) flags all @@\ @echo "" @@\ @echo "$(RELEASE) build completed on `date`" @@\ @echo "" --- 33,46 ---- @echo "Building $(RELEASE) on `date`" @@\ @echo "" @@\ $(MAKE) Makefile CONFIGSRC=$(CONFIGSRC) XCONFIGDIR=$(XCONFIGDIR)@@\ ! @echo "twice to propogate new toplevel pathname" @@\ $(MAKE) Makefile @@\ @echo "" @@\ $(MAKE) Makefiles @@\ @echo "" @@\ $(MAKE) depend @@\ @echo "" @@\ ! $(MAKE) flags subdirs @@\ @echo "" @@\ @echo "$(RELEASE) build completed on `date`" @@\ @echo "" *************** *** 81,86 **** --- 81,118 ---- #endif /* + * Make everything by default + */ + #ifndef MakeWorld2 + #define MakeWorld2(flags) @@\ + all:: @@\ + -@if [ ! -f make.makefile ]; then \ @@\ + echo ""; \ @@\ + echo "Building $(RELEASE) on `date`"; \ @@\ + echo ""; \ @@\ + $(MAKE) Makefile CONFIGSRC=$(CONFIGSRC) XCONFIGDIR=$(XCONFIGDIR);\@@\ + echo "twice to propogate new toplevel pathname"; \ @@\ + $(MAKE) Makefile; \ @@\ + touch make.makefile; fi @@\ + -@if [ ! -f make.makefiles ]; then \ @@\ + echo ""; \ @@\ + $(MAKE) Makefiles; \ @@\ + touch make.makefiles; fi @@\ + -@if [ ! -f make.depend ]; then \ @@\ + echo ""; \ @@\ + $(MAKE) depend; \ @@\ + touch make.depend; fi @@\ + -@if [ ! -f make.make ]; then \ @@\ + echo ""; fi @@\ + $(MAKE) flags subdirs @@\ + -@if [ ! -f make.make ]; then \ @@\ + echo ""; \ @@\ + echo "$(RELEASE) build completed on `date`"; \ @@\ + echo ""; \ @@\ + touch make.make; fi + #endif + + /* * Make the Makefile in the current directory. */ #ifndef MakefileTarget *************** *** 178,183 **** --- 210,232 ---- done #endif + /* + * Make the given target in the list of subdirectories. + */ + #ifndef IntoSubdirs2 + #define IntoSubdirs2(name,dirs,verb,target) @@\ + target:: @@\ + -@for i in dirs; \ @@\ + do \ @@\ + if [ -d $$i ]; then ( \ @@\ + echo verb \ @@\ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ @@\ + cd $$i; \ @@\ + $(MAKE) $(PASSARCH) name; \ @@\ + ) else continue; fi; \ @@\ + done + #endif + #ifndef DependSubdirs #define DependSubdirs(dirs) @@\ IntoSubdirs(depend,dirs,"depending") *************** *** 188,193 **** --- 237,247 ---- IntoSubdirs(all,dirs,"making all") #endif + #ifndef MakeSubdirsTop + #define MakeSubdirsTop(dirs) @@\ + IntoSubdirs2(all,dirs,"making all",subdirs) + #endif + #ifndef InstallSubdirs #define InstallSubdirs(dirs) @@\ IntoSubdirs(install,dirs,"installing") @@\ *************** *** 283,288 **** --- 337,370 ---- MakefilesSubdirs(dirs) @@\ DependSubdirs(dirs) @@\ MakeSubdirs(dirs) @@\ + InstallSubdirs(dirs) @@\ + CleanSubdirs(dirs) @@\ + SpecialTargets(debug,-DUseDebug) @@\ + IvmkcmTargets($(PACKAGE)) @@\ + IvmkcmSubdirs(dirs) + #endif + #endif + + /* + * Version of MakeInSubdirs for the top-level without the MakeSubdirs + */ + #ifndef MakeInSubdirsTop + #if HasDynamicSharedLibraries + #define MakeInSubdirsTop(dirs) @@\ + MakefilesSubdirs(dirs) @@\ + DependSubdirs(dirs) @@\ + MakeSubdirsTop(dirs) @@\ + InstallSubdirs(dirs) @@\ + CleanSubdirs(dirs) @@\ + SpecialTargets(debug,-DUseDebug) @@\ + SpecialTargets(noshared,-DUseNonShared) @@\ + IvmkcmTargets($(PACKAGE)) @@\ + IvmkcmSubdirs(dirs) + #else + #define MakeInSubdirsTop(dirs) @@\ + MakefilesSubdirs(dirs) @@\ + DependSubdirs(dirs) @@\ + MakeSubdirsTop(dirs) @@\ InstallSubdirs(dirs) @@\ CleanSubdirs(dirs) @@\ SpecialTargets(debug,-DUseDebug) @@\ *** /dev/null Fri Feb 11 22:24:29 PST 2000 --- patches/ivtools-000211-johnston-019 *************** patches/ivtools-000211-johnston-019 *** 0 **** --- 1 ---- + ivtools-000211-johnston-019 |
|
From: <ivt...@li...> - 2000-02-10 17:35:05
|
Patch: ivtools-000210-johnston-018
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- modify lexical scanner to preserve token state between invocations.
This fixes a problem with multi-line comments when comterp is in
server (when comterp is receiving input strings one at a time from an
external source). However, this does not fix the problem with
multi-line strings when comterp is in server mode, which will require
a better solution for preserving more of the token state (i.e. the
partial token buffer) between invocations. This is also a necessary
step in preserving parallel use of one lexical scanner by more than
one comterp in the same program.
- fix another problem in server-mode comterp. Part of making
server-mode work was figuring out how to return from the depths of the
lexical scanner in the middle of an expression, when an expression
continues across multiple-lines, but the capability to retrieve a new
line (or string) is external to the parser/scanner. To make this work
I made up the convention that if the input function (the function
pointer with an fgets signature passed to the parser/scanner C
routines) returns a null string (a string that begins with '\000'),
return out of the scanner and parser, yet assume there is more to
come. When that function (ComTerpServ::s_fgets) was going to return
the null string, it still traversed the entire input buffer, which is
huge by default.
- change signature of accept() used in utils/sockets.cc to use an
unsigned instead of signed int* as the third argument. This seems to
be more the recent standard.
Index: ComUtil/_lexscan.c
diff -c ComUtil/_lexscan.c:1.1 ComUtil/_lexscan.c:1.2
*** ComUtil/_lexscan.c:1.1 Thu Feb 10 02:57:59 2000
--- src/ComUtil/_lexscan.c Thu Feb 10 02:57:59 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1993-1995 Vectaport Inc.
* Copyright (c) 1989 Triple Vision, Inc.
*
***************
*** 149,154 ****
--- 150,157 ----
BOOLEAN long_num = FALSE; /* Indicates long integer to be used */
unsigned token_state = TOK_WHITESPACE;
/* Internal token state variable */
+ static unsigned token_state_save = TOK_WHITESPACE;
+ /* variable to save token state between calls */
unsigned begcmt_len = /* Number of characters in comment beginning */
(begcmt != NULL ? strlen(begcmt) : 0 );
unsigned endcmt_len = /* Number of characters in comment ending */
***************
*** 172,177 ****
--- 175,182 ----
*toktype = TOK_NONE;
*toklen = 0;
*tokstart = 0;
+ token_state = token_state_save;
+ token_state_save = TOK_WHITESPACE;
/* Initialize if linenumber is 0 */
if( *linenum == 0 ) {
***************
*** 291,296 ****
--- 296,307 ----
/* Reset pointer to front of buffer */
*bufptr = 0;
CURR_CHAR = buffer[0];
+ if (CURR_CHAR == '\0') {
+ if (token_state == TOK_COMMENT)
+ token_state_save = token_state;
+ *linenum--;
+ return FUNCOK;
+ }
/* Echo source line if so desired */
#if 0
Index: ComTerp/comterpserv.c
diff -c ComTerp/comterpserv.c:1.1 ComTerp/comterpserv.c:1.2
*** ComTerp/comterpserv.c:1.1 Thu Feb 10 02:58:01 2000
--- src/ComTerp/comterpserv.c Thu Feb 10 02:58:01 2000
***************
*** 99,105 ****
/* copy characters until n-1 characters are transferred, */
/* the input buffer is exhausted, or a newline is found. */
! for (outpos = 0; outpos < n-1 && inpos < bufsize-1 && instr[inpos] != '\n';)
outstr[outpos++] = instr[inpos++];
/* copy the newline character if there is room */
--- 99,105 ----
/* copy characters until n-1 characters are transferred, */
/* the input buffer is exhausted, or a newline is found. */
! for (outpos = 0; outpos < n-1 && inpos < bufsize-1 && instr[inpos] != '\n' && instr[inpos] != '\0';)
outstr[outpos++] = instr[inpos++];
/* copy the newline character if there is room */
Index: ComTerp/comterpserv.h
diff -c ComTerp/comterpserv.h:1.1 ComTerp/comterpserv.h:1.2
*** ComTerp/comterpserv.h:1.1 Thu Feb 10 02:58:01 2000
--- src/ComTerp/comterpserv.h Thu Feb 10 02:58:01 2000
***************
*** 60,66 ****
// execute a buffer of postfix tokens and return the value.
virtual int runfile(const char*);
! // run interpreter on command read from a file.
void add_defaults();
// add a default list of ComFunc objects to this interpreter.
--- 60,66 ----
// execute a buffer of postfix tokens and return the value.
virtual int runfile(const char*);
! // run interpreter on commands read from a file.
void add_defaults();
// add a default list of ComFunc objects to this interpreter.
Index: utils_ivtools/sockets.cc
diff -c utils_ivtools/sockets.cc:1.1 utils_ivtools/sockets.cc:1.2
*** utils_ivtools/sockets.cc:1.1 Thu Feb 10 02:58:39 2000
--- src/utils/sockets.cc Thu Feb 10 02:58:39 2000
***************
*** 98,104 ****
int data_fd;
if ((data_fd = accept(Psocket_fd,
(struct sockaddr *)&Pclient_addr,
! (int *)&Palen)) < 0) {
// we can break out of accept if the system call was interrupted
#ifndef ERESTART /* ERESTART not defined on some systems */
if (errno != EINTR) {
--- 98,104 ----
int data_fd;
if ((data_fd = accept(Psocket_fd,
(struct sockaddr *)&Pclient_addr,
! (unsigned int *)&Palen)) < 0) {
// we can break out of accept if the system call was interrupted
#ifndef ERESTART /* ERESTART not defined on some systems */
if (errno != EINTR) {
|
|
From: <ivt...@li...> - 2000-02-02 00:17:24
|
Gregor, Thanks for the patch to ivtools-0.8 that allowed you to build it on frozen Debian 2.2. I removed the Makefile diffs and applied the rest to my copy of the source tree. I had to disable the sprintf definition in OS/directory with a temporary " #if Debian_Potato", but that's all, to get it built on RedHat 5.1. I'm forwarding back to you my result, and sending a copy to Guenter Geiger, the ivtools Debian maintainer who might want to do the same thing in the near future. Your changes will be incorporated in ivtools-0.8.1, and are already available on the CVS server at SourceForge: http:://sourceforge.net/cvs/?group_id=275 Scott Johnston p.s. I have not applied or tested your diffs for the clippoly library. Might there be a Debian package for this? -----------------------------8x-------------------------------------- Patch: ivtools-000201-GregorZych-001 For: ivtools-0.8 Author: Gregor Zych This is an intermediate patch to ivtools-0.8. 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: - patches submitted by Gregor Zych to compile ivtools-0.8 with frozen Debian Potato. The first patch adds a function definition that is disabled by default. Someone would need to change the #if clause to correctly test for the Debian 2.2 release. This was the only thing that didn't compile smoothly on RedHat 5.1. Index: src_os/directory.c diff -c src_os/directory.c:1.1 src_os/directory.c:1.2 *** src_os/directory.c:1.1 Wed Feb 2 03:09:38 2000 --- src/OS/directory.c Wed Feb 2 03:09:38 2000 *************** *** 51,56 **** --- 51,60 ---- */ extern "C" { + #if Debian_Potato + extern int sprintf __P ((char *__restrict __s, + __const char *__restrict __format, ...)); + #endif extern uid_t getuid(); extern void qsort( void*, size_t, size_t, int (*) (const void*, const void*) Index: IVGlyph/textview.h diff -c IVGlyph/textview.h:1.3 IVGlyph/textview.h:1.4 *** IVGlyph/textview.h:1.3 Wed Feb 2 03:09:42 2000 --- src/IVGlyph/textview.h Wed Feb 2 03:09:42 2000 *************** *** 134,140 **** private: void scroll_to_line(int line); void make_visible(const boolean scroll_page = true); ! event_to_index(const Event&); // popup menu stuff Menu* menu_; --- 134,140 ---- private: void scroll_to_line(int line); void make_visible(const boolean scroll_page = true); ! int event_to_index(const Event&); // popup menu stuff Menu* menu_; Index: examples3.1_morpher/figure.c diff -c examples3.1_morpher/figure.c:1.1 examples3.1_morpher/figure.c:1.2 *** examples3.1_morpher/figure.c:1.1 Wed Feb 2 03:09:51 2000 --- src/glyphs/examples3.1/morpher/figure.c Wed Feb 2 03:09:51 2000 *************** *** 1379,1385 **** /**********************************************************************/ declarePtrList(GraphicList, Graphic31); ! implmentPtrList(GraphicList, Graphic31); static Cursor* grabber_cursor = nil; static Cursor* window_cursor = nil; --- 1379,1385 ---- /**********************************************************************/ declarePtrList(GraphicList, Graphic31); ! int implmentPtrList(GraphicList, Graphic31); static Cursor* grabber_cursor = nil; static Cursor* window_cursor = nil; Index: Unidraw/stencilcomp.c diff -c Unidraw/stencilcomp.c:1.1 Unidraw/stencilcomp.c:1.2 *** Unidraw/stencilcomp.c:1.1 Wed Feb 2 03:09:55 2000 --- src/Unidraw/stencilcomp.c Wed Feb 2 03:09:55 2000 *************** *** 169,175 **** StencilComp* comp = (StencilComp*) GetSubject(); Bitmap* image, *mask; comp->GetStencil()->GetOriginal(image, mask); ! char* tag = (image == mask) ? "SSten" : "FSten"; Coord w = image->Width(); Coord h = image->Height(); --- 169,175 ---- StencilComp* comp = (StencilComp*) GetSubject(); Bitmap* image, *mask; comp->GetStencil()->GetOriginal(image, mask); ! const char* tag = (image == mask) ? "SSten" : "FSten"; Coord w = image->Width(); Coord h = image->Height(); Index: UniIdraw/ided.c diff -c UniIdraw/ided.c:1.1 UniIdraw/ided.c:1.2 *** UniIdraw/ided.c:1.1 Wed Feb 2 03:09:58 2000 --- src/UniIdraw/ided.c Wed Feb 2 03:09:58 2000 *************** *** 355,361 **** return commands; } ! static const unit = 15; static Coord xClosed[] = { unit/5, unit, unit, unit*3/5, 0 }; static Coord yClosed[] = { 0, unit/5, unit*3/5, unit, unit*2/5 }; --- 355,361 ---- return commands; } ! static const int unit = 15; static Coord xClosed[] = { unit/5, unit, unit, unit*3/5, 0 }; static Coord yClosed[] = { 0, unit/5, unit*3/5, unit, unit*2/5 }; Index: OverlayUnidraw/ovclip.c diff -c OverlayUnidraw/ovclip.c:1.1 OverlayUnidraw/ovclip.c:1.2 *** OverlayUnidraw/ovclip.c:1.1 Wed Feb 2 03:10:04 2000 --- src/OverlayUnidraw/ovclip.c Wed Feb 2 03:10:04 2000 *************** *** 115,121 **** int n1, n2; Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view)->GetGraphic(); ! n1 = g1->GetOriginal(tx1, ty1); ftx1 = new float[n1]; fty1 = new float[n1]; for (int j = 0; j < n1; j++) { --- 115,121 ---- int n1, n2; Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view)->GetGraphic(); ! n1 = g1->GetOriginal((const Coord*&)tx1,(const Coord*&) ty1); ftx1 = new float[n1]; fty1 = new float[n1]; for (int j = 0; j < n1; j++) { *************** *** 221,227 **** else { if (view->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic; ! n = ml->GetOriginal(x, y); } else if (view->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic; --- 221,227 ---- else { if (view->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic; ! n = ml->GetOriginal((const Coord*&)x,(const Coord*&) y); } else if (view->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic; *************** *** 384,390 **** int n1, n2; Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view)->GetGraphic(); ! n1 = g1->GetOriginal(tx1, ty1); ftx1 = new float[n1]; fty1 = new float[n1]; for (int ii = 0; ii < n1; ii++) { --- 384,390 ---- int n1, n2; Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view)->GetGraphic(); ! n1 = g1->GetOriginal((const Coord *&)tx1,(const Coord *&) ty1); ftx1 = new float[n1]; fty1 = new float[n1]; for (int ii = 0; ii < n1; ii++) { *************** *** 494,500 **** else { if (view->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic; ! n = ml->GetOriginal(x, y); } else if (view->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic; --- 494,500 ---- else { if (view->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic; ! n = ml->GetOriginal((const Coord *&)x,(const Coord *&) y); } else if (view->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic; *************** *** 705,712 **** Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal(tx1, ty1); ! n2 = g2->GetOriginal(tx2, ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; --- 705,712 ---- Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal((const Coord *&)tx1,(const Coord *&) ty1); ! n2 = g2->GetOriginal((const Coord *&)tx2,(const Coord *&) ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; *************** *** 777,783 **** Graphic* graphic1 = view1->GetGraphic(); if (view1->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal(x, y); } else if (view1->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; --- 777,783 ---- Graphic* graphic1 = view1->GetGraphic(); if (view1->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal((const Coord *&)x,(const Coord *&) y); } else if (view1->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; *************** *** 797,803 **** Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal(px, py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; --- 797,803 ---- Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal((const Coord *&)px,(const Coord *&) py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; *************** *** 898,905 **** Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal(tx1, ty1); ! n2 = g2->GetOriginal(tx2, ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; --- 898,905 ---- Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal((const Coord *&)tx1,(const Coord *&) ty1); ! n2 = g2->GetOriginal((const Coord *&)tx2,(const Coord *&) ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; *************** *** 970,976 **** Graphic* graphic1 = view2->GetGraphic(); if (view2->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal(x, y); } else if (view2->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; --- 970,976 ---- Graphic* graphic1 = view2->GetGraphic(); if (view2->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal((const Coord *&)x,(const Coord *&) y); } else if (view2->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; *************** *** 990,996 **** Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal(px, py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; --- 990,996 ---- Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal((const Coord *&)px,(const Coord *&) py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; *************** *** 1091,1098 **** Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal(tx1, ty1); ! n2 = g2->GetOriginal(tx2, ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; --- 1091,1098 ---- Transformer tn1, tn2; g1 = (SF_Polygon*)((PolygonOvView*)view1)->GetGraphic(); g2 = (SF_Polygon*)((PolygonOvView*)view2)->GetGraphic(); ! n1 = g1->GetOriginal((const Coord *&)tx1,(const Coord *&) ty1); ! n2 = g2->GetOriginal((const Coord *&)tx2,(const Coord *&) ty2); x1 = new float[n1]; y1 = new float[n1]; x2 = new float[n2]; *************** *** 1164,1170 **** Graphic* graphic1 = view1->GetGraphic(); if (view1->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal(x, y); } else if (view1->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; --- 1164,1170 ---- Graphic* graphic1 = view1->GetGraphic(); if (view1->IsA(OVMULTILINE_VIEW)) { MultiLine* ml = (MultiLine*)graphic1; ! n = ml->GetOriginal((const Coord *&)x, (const Coord *&)y); } else if (view1->IsA(OVLINE_VIEW)) { Line* line = (Line*)graphic1; *************** *** 1184,1190 **** Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal(px, py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; --- 1184,1190 ---- Coord* px; Coord* py; int pn; ! pn = graphic2->GetOriginal((const Coord *&)px,(const Coord *&) py); graphic2->TotalTransformation(tn2); float* tpx = new float[pn]; float* tpy = new float[pn]; Index: OverlayUnidraw/ovcmds.c diff -c OverlayUnidraw/ovcmds.c:1.1 OverlayUnidraw/ovcmds.c:1.2 *** OverlayUnidraw/ovcmds.c:1.1 Wed Feb 2 03:10:04 2000 --- src/OverlayUnidraw/ovcmds.c Wed Feb 2 03:10:04 2000 *************** *** 1256,1262 **** int* y; int np; SF_Polygon* poly = (SF_Polygon*)view->GetGraphic(); ! np = poly->GetOriginal(x, y); float* fx = new float[np]; float* fy = new float[np]; for (int i = 0; i < np; i++) { --- 1256,1262 ---- int* y; int np; SF_Polygon* poly = (SF_Polygon*)view->GetGraphic(); ! np = poly->GetOriginal((const iv2_6_Coord *&)x,(const iv2_6_Coord *&) y); float* fx = new float[np]; float* fy = new float[np]; for (int i = 0; i < np; i++) { Index: OverlayUnidraw/ovhull.c diff -c OverlayUnidraw/ovhull.c:1.1 OverlayUnidraw/ovhull.c:1.2 *** OverlayUnidraw/ovhull.c:1.1 Wed Feb 2 03:10:04 2000 --- src/OverlayUnidraw/ovhull.c Wed Feb 2 03:10:04 2000 *************** *** 53,59 **** if (comp && comp->IsA(OVPOLYGON_COMP)) { SF_Polygon* poly = ((PolygonOvComp*)comp)->GetPolygon(); Coord* x, *y; ! int np = poly->GetOriginal(x, y); if (np > 2) { float* fx = new float[np]; float* fy = new float[np]; --- 53,59 ---- if (comp && comp->IsA(OVPOLYGON_COMP)) { SF_Polygon* poly = ((PolygonOvComp*)comp)->GetPolygon(); Coord* x, *y; ! int np = poly->GetOriginal((const Coord*&)x,(const Coord*&) y); if (np > 2) { float* fx = new float[np]; float* fy = new float[np]; Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.1 OverlayUnidraw/ovkit.c:1.2 *** OverlayUnidraw/ovkit.c:1.1 Wed Feb 2 03:10:04 2000 --- src/OverlayUnidraw/ovkit.c Wed Feb 2 03:10:04 2000 *************** *** 170,176 **** static const char* grid_y_incr = "gridyincr"; static const char* scribble_pointer_attrib = "scribble_pointer"; ! static const unit = 15; static int xClosed[] = { unit/5, unit, unit, unit*3/5, 0 }; static int yClosed[] = { 0, unit/5, unit*3/5, unit, unit*2/5 }; --- 170,176 ---- static const char* grid_y_incr = "gridyincr"; static const char* scribble_pointer_attrib = "scribble_pointer"; ! static const int unit = 15; static int xClosed[] = { unit/5, unit, unit, unit*3/5, 0 }; static int yClosed[] = { 0, unit/5, unit*3/5, unit, unit*2/5 }; Index: OverlayUnidraw/ovstencil.c diff -c OverlayUnidraw/ovstencil.c:1.1 OverlayUnidraw/ovstencil.c:1.2 *** OverlayUnidraw/ovstencil.c:1.1 Wed Feb 2 03:10:04 2000 --- src/OverlayUnidraw/ovstencil.c Wed Feb 2 03:10:04 2000 *************** *** 167,173 **** UStencil* stencil = (UStencil*) GetGraphicComp()->GetGraphic(); Bitmap* image, *mask; stencil->GetOriginal(image, mask); ! char* tag = (image == mask) ? "SSten" : "FSten"; Coord w = image->Width(); Coord h = image->Height(); --- 167,173 ---- UStencil* stencil = (UStencil*) GetGraphicComp()->GetGraphic(); Bitmap* image, *mask; stencil->GetOriginal(image, mask); ! const char* tag = (image == mask) ? "SSten" : "FSten"; Coord w = image->Width(); Coord h = image->Height(); |
|
From: <ivt...@li...> - 2000-02-02 00:09:46
|
Patch: ivtools-000201-johnston-017
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- small touchup to 016
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.4 ComTerp/comvalue.h:1.5
*** ComTerp/comvalue.h:1.4 Wed Feb 2 03:19:58 2000
--- src/ComTerp/comvalue.h Wed Feb 2 03:19:58 2000
***************
*** 75,81 ****
// FloatType constructor.
ComValue(double val);
// DoubleType constructor.
! ComValue(int class_symid val, void* ptr);
// ObjectType constructor.
ComValue(AttributeValueList* listptr);
// ArrayType constructor.
--- 75,81 ----
// FloatType constructor.
ComValue(double val);
// DoubleType constructor.
! ComValue(int class_symid, void* ptr);
// ObjectType constructor.
ComValue(AttributeValueList* listptr);
// ArrayType constructor.
|
|
From: <ivt...@li...> - 2000-02-01 19:28:57
|
Patch: ivtools-000201-johnston-016
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- give variable names to all the constructor arguments in
Attribute/attrvalue.h and ComTerp/comvalue.h, to improve the PERCEPS
extracted web page.
Index: Attribute/attrvalue.h
diff -c Attribute/attrvalue.h:1.1 Attribute/attrvalue.h:1.2
*** Attribute/attrvalue.h:1.1 Tue Feb 1 23:08:40 2000
--- src/Attribute/attrvalue.h Tue Feb 1 23:08:40 2000
***************
*** 97,129 ****
AttributeValue();
// default constructor (UnknownType constructor).
! AttributeValue(char);
// CharType constructor.
! AttributeValue(unsigned char);
// UCharType constructor.
! AttributeValue(short);
// ShortType constructor.
! AttributeValue(unsigned short);
// UShortType constructor.
! AttributeValue(int, ValueType);
// IntType constructor or any other int-like value.
! AttributeValue(unsigned int, ValueType);
// UIntType constructor or any other unsigned-int-like value including SymbolType.
! AttributeValue(unsigned int, unsigned int, ValueType=KeywordType);
// KeywordType constructor (or can be used for ObjectType).
! AttributeValue(long);
// LongType constructor.
! AttributeValue(unsigned long);
// ULongType constructor.
! AttributeValue(float);
// FloatType constructor.
AttributeValue(double);
// DoubleType constructor.
! AttributeValue(int class_symid, void*);
// ObjectType constructor.
! AttributeValue(AttributeValueList*);
// ArrayType constructor.
! AttributeValue(const char*);
// StringType constructor.
virtual ~AttributeValue();
--- 97,129 ----
AttributeValue();
// default constructor (UnknownType constructor).
! AttributeValue(char val);
// CharType constructor.
! AttributeValue(unsigned char val);
// UCharType constructor.
! AttributeValue(short val);
// ShortType constructor.
! AttributeValue(unsigned short val);
// UShortType constructor.
! AttributeValue(int val, ValueType type);
// IntType constructor or any other int-like value.
! AttributeValue(unsigned int val, ValueType type);
// UIntType constructor or any other unsigned-int-like value including SymbolType.
! AttributeValue(unsigned int keysym, unsigned int narg, ValueType=KeywordType);
// KeywordType constructor (or can be used for ObjectType).
! AttributeValue(long val);
// LongType constructor.
! AttributeValue(unsigned long val);
// ULongType constructor.
! AttributeValue(float val);
// FloatType constructor.
AttributeValue(double);
// DoubleType constructor.
! AttributeValue(int class_symid, void* objptr);
// ObjectType constructor.
! AttributeValue(AttributeValueList* listptr);
// ArrayType constructor.
! AttributeValue(const char* val);
// StringType constructor.
virtual ~AttributeValue();
Index: ComTerp/comvalue.h
diff -c ComTerp/comvalue.h:1.1 ComTerp/comvalue.h:1.2
*** ComTerp/comvalue.h:1.1 Tue Feb 1 23:08:42 2000
--- src/ComTerp/comvalue.h Tue Feb 1 23:08:42 2000
***************
*** 53,85 ****
ComValue();
// construct of UnknownType.
! ComValue(char);
// CharType constructor.
! ComValue(unsigned char);
// UCharType constructor.
! ComValue(short);
// ShortType constructor.
! ComValue(unsigned short);
// UShortType constructor.
! ComValue(int, ValueType=IntType);
// IntType constructor or any other int-like value.
! ComValue(unsigned int, ValueType=IntType);
// UIntType constructor or any other unsigned-int-like value including SymbolType.
! ComValue(unsigned int, unsigned int, ValueType=KeywordType);
// KeywordType constructor (or can be used for ObjectType).
! ComValue(long);
// LongType constructor.
! ComValue(unsigned long);
// ULongType constructor.
! ComValue(float);
// FloatType constructor.
! ComValue(double);
// DoubleType constructor.
! ComValue(int class_symid, void*);
// ObjectType constructor.
! ComValue(AttributeValueList*);
// ArrayType constructor.
! ComValue(const char*);
// StringType constructor.
void init();
--- 53,85 ----
ComValue();
// construct of UnknownType.
! ComValue(char val);
// CharType constructor.
! ComValue(unsigned char val);
// UCharType constructor.
! ComValue(short val);
// ShortType constructor.
! ComValue(unsigned short val);
// UShortType constructor.
! ComValue(int val, ValueType type=ComValue::IntType);
// IntType constructor or any other int-like value.
! ComValue(unsigned int val, ValueType type=ComValue::IntType);
// UIntType constructor or any other unsigned-int-like value including SymbolType.
! ComValue(unsigned int val, unsigned int, ValueType type=ComValue::KeywordType);
// KeywordType constructor (or can be used for ObjectType).
! ComValue(long val);
// LongType constructor.
! ComValue(unsigned long val);
// ULongType constructor.
! ComValue(float val);
// FloatType constructor.
! ComValue(double val);
// DoubleType constructor.
! ComValue(int class_symid val, void* ptr);
// ObjectType constructor.
! ComValue(AttributeValueList* listptr);
// ArrayType constructor.
! ComValue(const char* val);
// StringType constructor.
void init();
|
|
From: <ivt...@li...> - 2000-01-26 22:06:54
|
Patch: ivtools-000127-johnston-015
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:
patch -p0 <ThisFile
Summary of Changes:
- new Dialog methods to support stay-up dialog boxes that don't block
events being handled by the main application:
void map_for(Window*);
virtual void map_for_aligned(Window*, float xalign, float yalign);
void map_at(Coord x, Coord y);
virtual void map_at_aligned(
Coord x, Coord y, float xalign, float yalign
);
void unmap();
boolean mapped();
These are an alternate to the pre-existing Dialog::post_* methods,
which map the dialog box to the screen then enter their own event
handling loop (the run() method), then unmap the dialog box when done.
With this new approach you call one of the Dialog::map_* methods to
bring up the dialog box, and control returns to the normal
event-handling loop of the main application. The action taken when a
Close or OK button has to be different with this new approach.
Instead of setting a flag that causes the local run loop to terminate,
you need to explicitly call Dialog::unmap.
Dialog::unmapped is provided as a way to test if the dialog is
currently displayed. Repeated calls to Dialog::map_* are ok, because
the first thing these methods do is check if already mapped, and if so
they do nothing.
- create a new ObsTextDialog that uses the new Dialog::map_* methods.
- modify the GraphicLoc tool to use the new ObsTextDialog box. Now
the GraphicLoc dialog box can stay up between uses of the tool, and
each new click refreshes the displayed text.
Index: top_ivtools/COPYRIGHT
diff -c top_ivtools/COPYRIGHT:1.1 top_ivtools/COPYRIGHT:1.2
*** top_ivtools/COPYRIGHT:1.1 Thu Jan 27 01:51:22 2000
--- ./COPYRIGHT Thu Jan 27 01:51:22 2000
***************
*** 1,6 ****
/*
! * Copyright (c) 2000 Vectaport Inc., I.E.T. Inc
! * Copyright (c) 1999 Vectaport Inc., I.E.T. Inc, R.B. Kissh and Associates
* Copyright (c) 1998 Vectaport Inc., R.B. Kissh and Associates, Eric F. Kahler
* Copyright (c) 1997 Vectaport Inc., R.B. Kissh and Associates
* Copyright (c) 1996 Vectaport Inc., R.B. Kissh and Associates, Cider Press
--- 1,6 ----
/*
! * 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
* Copyright (c) 1997 Vectaport Inc., R.B. Kissh and Associates
* Copyright (c) 1996 Vectaport Inc., R.B. Kissh and Associates, Cider Press
Index: top_ivtools/INSTALL
diff -c top_ivtools/INSTALL:1.3 top_ivtools/INSTALL:1.4
*** top_ivtools/INSTALL:1.3 Thu Jan 27 01:51:22 2000
--- ./INSTALL Thu Jan 27 01:51:22 2000
***************
*** 150,158 ****
Also you may want to review the rest of the entries in the
site.def.<CPU> file to see if they are good defaults for your system.
- Some of these, like UseRpath and InstallRelative, are overridden in
- the config/config-<os>-gcc.defs file, so their value in
- config/site.def.<CPU> has no affect.
** See http://www.vectaport.com/ivtools/faq.html for more info.
--- 150,155 ----
Index: src_interviews/dialogs.c
diff -c src_interviews/dialogs.c:1.1 src_interviews/dialogs.c:1.2
*** src_interviews/dialogs.c:1.1 Thu Jan 27 01:51:29 2000
--- src/InterViews/dialogs.c Thu Jan 27 01:51:29 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1991 Stanford University
* Copyright (c) 1991 Silicon Graphics, Inc.
*
***************
*** 154,160 ****
/* class Dialog */
! Dialog::Dialog(Glyph* g, Style* s) : InputHandler(g, s) { }
Dialog::~Dialog() { }
boolean Dialog::post_for_aligned(Window* w, float x_align, float y_align) {
--- 155,161 ----
/* class Dialog */
! Dialog::Dialog(Glyph* g, Style* s) : InputHandler(g, s) { t_ = nil;}
Dialog::~Dialog() { }
boolean Dialog::post_for_aligned(Window* w, float x_align, float y_align) {
***************
*** 186,191 ****
--- 187,228 ----
t->display()->sync();
delete t;
return b;
+ }
+
+ void Dialog::map_for_aligned(Window* w, float x_align, float y_align) {
+ if (t_) return;
+ t_ = new TransientWindow(this);
+ t_->style(new Style(style()));
+ t_->transient_for(w);
+ t_->wm_delete(new DialogHandler(this));
+ t_->place(w->left() + 0.5 * w->width(), w->bottom() + 0.5 * w->height());
+ t_->align(x_align, y_align);
+ t_->map();
+ }
+
+ void Dialog::map_at_aligned(
+ Coord x, Coord y, float x_align, float y_align
+ ) {
+ if (t_) return;
+ t_ = new TransientWindow(this);
+ t_->style(new Style(style()));
+ t_->wm_delete(new DialogHandler(this));
+ t_->place(x, y);
+ t_->align(x_align, y_align);
+ t_->map();
+ }
+
+ void Dialog::unmap() {
+ if (t_) {
+ t_->unmap();
+ t_->display()->sync();
+ delete t_;
+ t_ = nil;
+ }
+ }
+
+ boolean Dialog::mapped() {
+ return t_ != nil;
}
boolean Dialog::run() {
Index: IVGlyph/Imakefile
diff -c IVGlyph/Imakefile:1.1 IVGlyph/Imakefile:1.2
*** IVGlyph/Imakefile:1.1 Thu Jan 27 01:51:37 2000
--- src/IVGlyph/Imakefile Thu Jan 27 01:51:37 2000
***************
*** 1,5 ****
XCOMM
! XCOMM IVGlyph - InterViews-3.1-derived glyphs
XCOMM
PACKAGE = IVGlyph
--- 1,5 ----
XCOMM
! XCOMM IVGlyph - InterViews-3.1-derived glyphs, observables, and dialog boxes
XCOMM
PACKAGE = IVGlyph
***************
*** 28,33 ****
--- 28,34 ----
Obj(importchooser)
Obj(namestate)
Obj(observables)
+ Obj(odialogs)
Obj(ofilechooser)
Obj(printchooser)
Obj(saveaschooser)
Index: IVGlyph/observables.c
diff -c IVGlyph/observables.c:1.1 IVGlyph/observables.c:1.2
*** IVGlyph/observables.c:1.1 Thu Jan 27 01:51:37 2000
--- src/IVGlyph/observables.c Thu Jan 27 01:51:37 2000
***************
*** 216,221 ****
}
void ObservableText::accept() {
! if (ptr)
! strcpy(*ptr, text);
}
--- 216,223 ----
}
void ObservableText::accept() {
! if (ptr) {
! delete text;
! text = strdup(*ptr);
! }
}
Index: IVGlyph/odialogs.c
diff -c /dev/null IVGlyph/odialogs.c:1.1
*** /dev/null Thu Jan 27 01:51:37 2000
--- src/IVGlyph/odialogs.c Thu Jan 27 01:51:37 2000
***************
*** 0 ****
--- 1,147 ----
+ /*
+ * Copyright 2000 IET Inc.
+ * Copyright 1996 Vectaport Inc.
+ * Copyright 1995 Cartoactive Systems, Cider Press
+ *
+ * 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 <IVGlyph/odialogs.h>
+ #include <IVGlyph/textform.h>
+
+ #include <IV-look/kit.h>
+
+ #include <InterViews/action.h>
+ #include <InterViews/cursor.h>
+ #include <InterViews/event.h>
+ #include <InterViews/layout.h>
+ #include <InterViews/style.h>
+ #include <InterViews/target.h>
+ #include <InterViews/window.h>
+
+ #include <OS/string.h>
+
+ #include <stdio.h>
+
+
+ /*****************************************************************************/
+
+ class ObsTextDialogImpl {
+ private:
+ friend class ObsTextDialog;
+
+ WidgetKit* kit_;
+ Style* style_;
+ ObsTextDialog* dialog_;
+
+ void init(ObsTextDialog*, Style*, ObservableText*, const char*);
+ void build(ObservableText*, const char*);
+
+ void close();
+ };
+
+ declareActionCallback(ObsTextDialogImpl)
+ implementActionCallback(ObsTextDialogImpl)
+
+ ObsTextDialog::ObsTextDialog(ObservableText* otext, const char* title)
+ : Dialog(nil, WidgetKit::instance()->style())
+ {
+ impl_ = new ObsTextDialogImpl;
+ ObsTextDialogImpl& impl = *impl_;
+ impl.kit_ = WidgetKit::instance();
+ impl.init(this, WidgetKit::instance()->style(), otext, title);
+ }
+
+ ObsTextDialog::~ObsTextDialog() {
+ delete impl_;
+ }
+
+ void ObsTextDialog::keystroke(const Event& e) {
+ ObsTextDialogImpl& i = *impl_;
+ char c;
+ if (e.mapkey(&c, 1) != 0) {
+ i.close();
+ }
+ }
+
+ #if 0
+ void ObsTextDialog::post(Window* window, const char* message,
+ const char* submsg, const char* title) {
+ WidgetKit& kit = *WidgetKit::instance();
+ if (title) {
+ Style* ts = new Style(kit.style());
+ ts->attribute("name", title);
+ kit.push_style(ts);
+ }
+
+ ObsTextDialog* dialog = new ObsTextDialog(message, submsg);
+ Resource::ref(dialog);
+ dialog->post_for(window);
+ Resource::unref(dialog);
+ window->cursor(defaultCursor);
+ if (title)
+ kit.pop_style();
+ }
+ #endif
+
+
+ /** class ObsTextDialogImpl **/
+
+ void ObsTextDialogImpl::init(ObsTextDialog* d, Style* s,
+ ObservableText* otext, const char* title) {
+ dialog_ = d;
+ style_ = s;
+ build(otext, title);
+ }
+
+ void ObsTextDialogImpl::build(ObservableText* otext, const char* title) {
+ WidgetKit& kit = *kit_;
+ const LayoutKit& layout = *LayoutKit::instance();
+ Style* s = style_;
+ String titlestr(title);
+
+ Action* close = new ActionCallback(ObsTextDialogImpl)(
+ this, &ObsTextDialogImpl::close);
+
+ Glyph *g;
+ TextObserver* otextview = new TextObserver(otext, "");
+ g = layout.vbox(
+ kit.fancy_label(titlestr),
+ layout.vglue(5.0, 0.0, 2.0),
+ layout.hbox(
+ layout.hglue(),
+ layout.hcenter(otextview),
+ layout.hglue()),
+ layout.vspace(15.0),
+ layout.hbox(
+ layout.hglue(),
+ layout.hcenter(kit.push_button(kit.label("Close"), close)),
+ layout.hglue()
+ ));
+
+ dialog_->body(
+ kit.outset_frame(layout.margin(g, 10.0))
+ );
+ }
+
+ void ObsTextDialogImpl::close() {
+ dialog_->unmap();
+ }
+
Index: IVGlyph/odialogs.h
diff -c /dev/null IVGlyph/odialogs.h:1.1
*** /dev/null Thu Jan 27 01:51:37 2000
--- src/IVGlyph/odialogs.h Thu Jan 27 01:51:37 2000
***************
*** 0 ****
--- 1,50 ----
+ /*
+ * Copyright 2000 IET Inc.
+ * Copyright 1996 Vectaport Inc.
+ * Copyright 1995 Cartoactive Systems, Cider Press
+ *
+ * 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 odialogs_h
+ #define odialogs_h
+
+ #include <IV-3_1/InterViews/dialog.h>
+
+ #include <InterViews/_enter.h>
+
+ class ObservableText;
+ class ObsTextDialogImpl;
+ class WidgetKit;
+
+ class ObsTextDialog : public Dialog {
+ public:
+ ObsTextDialog(ObservableText* otext, const char* title);
+ virtual ~ObsTextDialog();
+
+ virtual void keystroke(const Event&);
+
+ private:
+ ObsTextDialogImpl* impl_;
+ };
+
+ #include <InterViews/_leave.h>
+
+ #endif
Index: OverlayUnidraw/grloctool.c
diff -c OverlayUnidraw/grloctool.c:1.1 OverlayUnidraw/grloctool.c:1.2
*** OverlayUnidraw/grloctool.c:1.1 Thu Jan 27 01:51:58 2000
--- src/OverlayUnidraw/grloctool.c Thu Jan 27 01:51:58 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright 2000 IET Inc.
* Copyright 1998 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 30,36 ****
#include <Unidraw/iterator.h>
#include <Unidraw/selection.h>
! #include <IVGlyph/gdialogs.h>
#include <InterViews/event.h>
#include <InterViews/transformer.h>
--- 31,38 ----
#include <Unidraw/iterator.h>
#include <Unidraw/selection.h>
! #include <IVGlyph/observables.h>
! #include <IVGlyph/odialogs.h>
#include <InterViews/event.h>
#include <InterViews/transformer.h>
***************
*** 49,56 ****
--- 51,78 ----
GrLocTool::GrLocTool (ControlInfo* m) : Tool(m)
{
+ _dialog = nil;
+ _bufsiz = 64;
+ _buffer = new char[_bufsiz];
+ strcpy(_buffer, "test string");
+ _otext = new ObservableText(&_buffer);
}
+ GrLocTool::~GrLocTool() {
+ delete _buffer;
+ delete _otext;
+ }
+
+ Dialog* GrLocTool::dialog() {
+ if (!_dialog) {
+ _dialog = new ObsTextDialog(_otext, "Location relative to graphic's coordinate system");
+ Resource::ref(_dialog);
+ }
+ return _dialog;
+ }
+
+
+
Tool* GrLocTool::Copy () { return new GrLocTool(CopyControlInfo()); }
Manipulator* GrLocTool::CreateManipulator (
***************
*** 66,77 ****
Graphic* gr;
if (view && (gr = view->GetGraphic())) {
viewer->ScreenToGraphic(e.x, e.y, gr, xgr, ygr);
! char buffer[BUFSIZ];
! sprintf( buffer, "x,y: %.2f %.2f", xgr, ygr);
! GAcknowledgeDialog* dialog = new GAcknowledgeDialog(buffer);
! Resource::ref(dialog);
! dialog->post_for(v->GetEditor()->GetWindow());
! Resource::unref(dialog);
}
}
Manipulator* m = nil;
--- 88,99 ----
Graphic* gr;
if (view && (gr = view->GetGraphic())) {
viewer->ScreenToGraphic(e.x, e.y, gr, xgr, ygr);
! sprintf( _buffer, "x,y: %.2f %.2f", xgr, ygr);
! _otext->accept();
! if (!dialog()->mapped())
! dialog()->map_for(v->GetEditor()->GetWindow());
! else
! _otext->notify();
}
}
Manipulator* m = nil;
Index: OverlayUnidraw/grloctool.h
diff -c OverlayUnidraw/grloctool.h:1.1 OverlayUnidraw/grloctool.h:1.2
*** OverlayUnidraw/grloctool.h:1.1 Thu Jan 27 01:51:58 2000
--- src/OverlayUnidraw/grloctool.h Thu Jan 27 01:51:58 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright 2000 IET Inc.
* Copyright 1998-1999 Vectaport Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
***************
*** 26,31 ****
--- 27,35 ----
#include <Unidraw/Tools/tool.h>
+ class Dialog;
+ class ObservableText;
+
//: tool to display coordinates relative to a graphic.
// For a raster or stencil the origin is 0,0.
// For all other graphics the origin is relative to the coordinates used to
***************
*** 34,39 ****
--- 38,44 ----
class GrLocTool : public Tool {
public:
GrLocTool(ControlInfo* = nil);
+ virtual ~GrLocTool();
virtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer* =nil);
// use event to select a component and determine graphic-relative coordinates
***************
*** 43,48 ****
--- 48,60 ----
virtual ClassId GetClassId();
virtual boolean IsA(ClassId);
+ Dialog* dialog();
+
+ protected:
+ Dialog* _dialog;
+ ObservableText* _otext;
+ char* _buffer;
+ int _bufsiz;
};
#endif
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.2 OverlayUnidraw/ovimport.c:1.3
*** OverlayUnidraw/ovimport.c:1.2 Thu Jan 27 01:51:58 2000
--- src/OverlayUnidraw/ovimport.c Thu Jan 27 01:51:58 2000
***************
*** 93,98 ****
--- 93,99 ----
#include <Dispatch/iohandler.h>
#include <Dispatch/dispatcher.h>
#include <fstream.h>
+ #include <string.h>
#include <strstream.h>
#include <fcntl.h>
#include <errno.h>
Index: include_interviews/dialog.h
diff -c include_interviews/dialog.h:1.1 include_interviews/dialog.h:1.2
*** include_interviews/dialog.h:1.1 Thu Jan 27 01:52:06 2000
--- src/include/InterViews/dialog.h Thu Jan 27 01:52:06 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright (c) 2000 IET Inc.
* Copyright (c) 1992 Stanford University
* Copyright (c) 1992 Silicon Graphics, Inc.
*
***************
*** 34,39 ****
--- 35,41 ----
#include <InterViews/_enter.h>
class Window;
+ class TransientWindow;
/*
* The post*_aligned operations replaced default parameters
***************
*** 51,61 ****
--- 53,72 ----
virtual boolean post_at_aligned(
Coord x, Coord y, float xalign, float yalign
);
+ void map_for(Window*);
+ virtual void map_for_aligned(Window*, float xalign, float yalign);
+ void map_at(Coord x, Coord y);
+ virtual void map_at_aligned(
+ Coord x, Coord y, float xalign, float yalign
+ );
+ void unmap();
+ boolean mapped();
virtual boolean run();
virtual void dismiss(boolean accept);
private:
boolean done_;
boolean accepted_;
+ TransientWindow* t_;
};
inline boolean Dialog::post_for(Window* w) {
***************
*** 64,69 ****
--- 75,88 ----
inline boolean Dialog::post_at(Coord x, Coord y) {
return post_at_aligned(x, y, 0.5, 0.5);
+ }
+
+ inline void Dialog::map_for(Window* w) {
+ map_for_aligned(w, 0.5, 0.5);
+ }
+
+ inline void Dialog::map_at(Coord x, Coord y) {
+ map_at_aligned(x, y, 0.5, 0.5);
}
#include <InterViews/_leave.h>
Index: config_ivtools/site.def.LINUX
diff -c config_ivtools/site.def.LINUX:1.2 config_ivtools/site.def.LINUX:1.3
*** config_ivtools/site.def.LINUX:1.2 Thu Jan 27 01:52:16 2000
--- config/site.def.LINUX Thu Jan 27 01:52:16 2000
***************
*** 56,60 ****
/* file output by configure script */
#include "config-linux-gcc.defs"
-
-
--- 56,58 ----
|
|
From: <ivt...@li...> - 2000-01-21 23:22:32
|
Patch: ivtools-000122-johnston-014
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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 --enable-install-subdir argument to ./configure. This allows a
user to install in /usr/local/lib/ivtools and /usr/local/bin/ivtools
if they want (/usr/local can be changed with --prefix).
- change src/scripts/mkdirhier.sh to work with new versions of mkdir
that no longer accept multiple arguments.
- pare down the various config/site.def.$CPU files to the things
actually used/required. Take out all definitions provided by the
./configure script.
Index: top_ivtools/INSTALL
diff -c top_ivtools/INSTALL:1.2 top_ivtools/INSTALL:1.3
*** top_ivtools/INSTALL:1.2 Sat Jan 22 02:29:52 2000
--- ./INSTALL Sat Jan 22 02:29:52 2000
***************
*** 115,124 ****
--x-libraries=DIR X library files are in DIR
--enable-install-relative[=ARG] install relative to source tree
! --prefix=DIR to use when install-relative false
(default is /usr/local)
! --enable-use-rpath[=ARG] use -rpath when linking
ARG can be 0 or 1, default is 1 when not specified. The configure
script is usually able to automatically determine --x-includes and
--- 115,127 ----
--x-libraries=DIR X library files are in DIR
--enable-install-relative[=ARG] install relative to source tree
! --enable-install-subdir[=ARG] install in ivtools sub-directory
! --prefix=DIR to use when install-relative is false
(default is /usr/local)
! --enable-use-rpath[=ARG] use -rpath when linking, to
! embed shared-library pathnames
! in executable.
ARG can be 0 or 1, default is 1 when not specified. The configure
script is usually able to automatically determine --x-includes and
Index: top_ivtools/configure
diff -c top_ivtools/configure:1.1 top_ivtools/configure:1.2
*** top_ivtools/configure:1.1 Sat Jan 22 02:29:52 2000
--- ./configure Sat Jan 22 02:29:52 2000
***************
*** 31,36 ****
--- 31,38 ----
--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
***************
*** 538,544 ****
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:571: checking host system type" >&5
host_alias=$host
case "$host_alias" in
--- 540,546 ----
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
! echo "configure:573: checking host system type" >&5
host_alias=$host
case "$host_alias" in
***************
*** 802,808 ****
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:835: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 804,810 ----
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:837: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 833,839 ****
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:866: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
--- 835,841 ----
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:868: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
***************
*** 843,853 ****
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
! #line 876 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
! if { (eval echo configure:880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 845,855 ----
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
! #line 878 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
! if { (eval echo configure:882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 873,884 ****
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:906: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
! echo "configure:911: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 875,886 ----
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:908: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
! echo "configure:913: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 887,893 ****
yes;
#endif
EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
--- 889,895 ----
yes;
#endif
EOF
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
***************
*** 902,908 ****
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! echo "configure:935: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 904,910 ----
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
! echo "configure:937: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 933,939 ****
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:966: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 935,941 ----
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:968: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 962,968 ****
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:995: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 964,970 ----
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:997: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1010,1016 ****
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
--- 1012,1018 ----
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
! echo "configure:1045: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
***************
*** 1020,1030 ****
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
! #line 1053 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
! if { (eval echo configure:1057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
--- 1022,1032 ----
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
! #line 1055 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
! if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
***************
*** 1044,1055 ****
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1077: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1082: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1046,1057 ----
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
! echo "configure:1079: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
! echo "configure:1084: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1058,1064 ****
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
--- 1060,1066 ----
yes;
#endif
EOF
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
***************
*** 1073,1079 ****
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1106: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1075,1081 ----
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
! echo "configure:1108: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1102,1108 ****
# check for CPP
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
! echo "configure:1135: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 1104,1110 ----
# check for CPP
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
! echo "configure:1137: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 1115,1126 ****
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
! #line 1148 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
--- 1117,1128 ----
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
! #line 1150 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
***************
*** 1148,1154 ****
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1181: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1150,1156 ----
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
! echo "configure:1183: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1176,1182 ****
# check for X paths
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1209: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
--- 1178,1184 ----
# check for X paths
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1211: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
***************
*** 1191,1203 ****
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
! #line 1224 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
--- 1193,1205 ----
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
! #line 1226 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
***************
*** 1208,1220 ****
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
! #line 1241 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
--- 1210,1222 ----
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
! #line 1243 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
***************
*** 1241,1247 ****
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:1274: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
--- 1243,1249 ----
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
! echo "configure:1276: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
***************
*** 1303,1314 ****
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
! #line 1336 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
--- 1305,1316 ----
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
! #line 1338 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
***************
*** 1377,1390 ****
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
! #line 1410 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
! if { (eval echo configure:1417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
--- 1379,1392 ----
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
! #line 1412 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
! if { (eval echo configure:1419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
***************
*** 1476,1482 ****
#AC_CXX_HEADERS
echo $ac_n "checking for directory to install c++ include files""... $ac_c" 1>&6
! echo "configure:1509: checking for directory to install c++ include files" >&5
if eval "test \"`echo '$''{'ice_cv_cxx_include_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1478,1484 ----
#AC_CXX_HEADERS
echo $ac_n "checking for directory to install c++ include files""... $ac_c" 1>&6
! echo "configure:1511: checking for directory to install c++ include files" >&5
if eval "test \"`echo '$''{'ice_cv_cxx_include_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1584,1589 ****
--- 1586,1600 ----
fi
+ # Check whether --enable-install-subdir or --disable-install-subdir was given.
+ if test "${enable_install_subdir+set}" = set; then
+ enableval="$enable_install_subdir"
+ INSTALLSUBDIR=YES
+ else
+ INSTALLSUBDIR=NO
+ fi
+
+
#AC_SUBST(OPENGL)
#AC_SUBST(XGL)
***************
*** 1615,1620 ****
--- 1626,1632 ----
+
#output to config-$host_fragd
PWD=`pwd`; export PWD
trap '' 1 2 15
***************
*** 1791,1796 ****
--- 1803,1809 ----
s%@PWD@%$PWD%g
s%@INSTALLRELATIVE@%$INSTALLRELATIVE%g
s%@USERPATH@%$USERPATH%g
+ s%@INSTALLSUBDIR@%$INSTALLSUBDIR%g
CEOF
EOF
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 Sat Jan 22 02:29:53 2000
--- ./configure.in Sat Jan 22 02:29:53 2000
***************
*** 284,289 ****
--- 284,291 ----
AC_ARG_ENABLE(use-rpath,[ --enable-use-rpath[=ARG] enable use of -rpath when linking], USERPATH=YES, USERPATH=NO)
+ AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO)
+
AC_SUBST(prefix)
#AC_SUBST(OPENGL)
#AC_SUBST(XGL)
***************
*** 314,319 ****
--- 316,322 ----
AC_SUBST(PWD)
AC_SUBST(INSTALLRELATIVE)
AC_SUBST(USERPATH)
+ AC_SUBST(INSTALLSUBDIR)
#output to config-$host_fragd
PWD=`pwd`; export PWD
Index: scripts_ivtools/mkdirhier.sh
diff -c scripts_ivtools/mkdirhier.sh:1.1 scripts_ivtools/mkdirhier.sh:1.2
*** scripts_ivtools/mkdirhier.sh:1.1 Sat Jan 22 02:30:26 2000
--- src/scripts/mkdirhier.sh Sat Jan 22 02:30:26 2000
***************
*** 37,43 ****
for filename
do
! path=$prefix$filename
prefix=$path/
shift
--- 37,45 ----
for filename
do
! if [ "$filename" != "" ]; then
! path=$prefix$filename
! fi
prefix=$path/
shift
***************
*** 50,63 ****
paths=$paths$newline$path
fi
done
! for paths
do
! if [ ! -f $paths ]; then
! mkdir $paths
! chmod g+w $paths
! fi
! done
break
}
--- 52,66 ----
paths=$paths$newline$path
fi
done
+
! for x in $paths
do
! if [ ! -d $x ]; then
! mkdir $x || status=$?
! chmod g+w $x
! fi
! done
break
}
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 Sat Jan 22 02:30:32 2000
--- config/config.defs.in Sat Jan 22 02:30:32 2000
***************
*** 1,6 ****
--- 1,7 ----
/* This file generated from config.defs.in, */
/* (unless this file *is* config.defs.in :) */
+ #if !@INSTALLSUBDIR@
#define Prefix @prefix@
#define BinDir Prefix/bin
#define LibDir Prefix/lib
***************
*** 8,13 ****
--- 9,23 ----
#define IncDir Prefix/include
#define ConfigDir LibAllDir/config
#define ManDir Prefix/man
+ #else
+ #define Prefix @prefix@
+ #define BinDir Prefix/bin/ivtools
+ #define LibDir Prefix/lib/ivtools
+ #define LibAllDir Prefix/lib/ivtools
+ #define IncDir Prefix/include
+ #define ConfigDir LibAllDir/config
+ #define ManDir Prefix/man
+ #endif
#define XConfigDir @x_libraries@/X11/config
#define XIncDir @x_includes@
Index: config_ivtools/site.def.ALPHA
diff -c config_ivtools/site.def.ALPHA:1.1 config_ivtools/site.def.ALPHA:1.2
*** config_ivtools/site.def.ALPHA:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.ALPHA Sat Jan 22 02:30:32 2000
***************
*** 43,51 ****
#undef ExtraLibraries
#define ExtraLibraries /**/
- /* libg++ include directory -- usually does not change with new version of libg++ */
- #define GPlusPlusIncludeDir /usr/cal/lib/g++-include
-
/* machine-specific gcc include directory -- does not change with each new version of gcc */
/* TAKE CARE TO PUT THIS VALUE ALSO IN ExtraCCLdLibs !!! */
#define ToolIncludeDir /usr/cal/lib
--- 43,48 ----
***************
*** 70,83 ****
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs, extra_flags) gcc -shared -Xlinker -all -Xlinker /usr/cal/lib/libstdc++.a -Xlinker -none -lc -lm extra_flags -o $@ ldobjs
! /*
! * Enable/disable relative InterViews-style installation of binaries
*/
! #undef InstallRelative
! #define InstallRelative YES
! /* use -rpath instead of -L to get slack developers shared libraries */
! #define UseRpath NO
/* use symbolic links for relative install of libraries */
#if !UseRpath
--- 67,86 ----
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs, extra_flags) gcc -shared -Xlinker -all -Xlinker /usr/cal/lib/libstdc++.a -Xlinker -none -lc -lm extra_flags -o $@ ldobjs
! /*
! * Irix strip is broken
*/
! #undef InstPgmFlags
! #define InstPgmFlags /**/
! #if 0
! /* override InterViews/iv-alpha.cf */
! #undef InstallCmd
! #define InstallCmd ${INSTALL_PATH}/install.sh
! #endif
!
! /* file output by configure script */
! #include "config-alpha4-gcc.defs"
/* use symbolic links for relative install of libraries */
#if !UseRpath
***************
*** 104,153 ****
$(RM) dest/Concat(lib,libname.a)
#endif
#endif
-
- /*
- * Irix strip is broken
- */
- #undef InstPgmFlags
- #define InstPgmFlags /**/
-
- #if 0
- /* override InterViews/iv-alpha.cf */
- #undef InstallCmd
- #define InstallCmd ${INSTALL_PATH}/install.sh
- #endif
-
- #if 0
-
- /* -------------- imake way of configuring ------------------ */
-
- /*
- * Where to put binaries, libraries, and data files when InstallRelative is NO
- */
- #define BinDir /usr/local/bin
- #define LibDir /usr/local/lib
- #define LibAllDir /usr/local/lib/ivtools
-
- /*
- * X11 directories -- remember to override XCONFIGDIR the
- * first time you run "make World".
- */
- #define XConfigDir /usr/lib/X11/config
- #define XIncDir /usr/include
- #define XLibDir /usr/lib
-
- /* clippoly directory: comment out if not available */
- /* #define ClipPolyDir ProjectDir/clippoly */
-
- /* ACE directory: comment out if not available */
- /* #define AceDir ProjectDir/ACE_wrappers */
-
- #else
-
- /* --------------- autconf way of configuring --------------- */
-
- /* file output by configure script */
- #include "config-alpha4-gcc.defs"
-
- #endif
-
--- 107,109 ----
Index: config_ivtools/site.def.HP800
diff -c config_ivtools/site.def.HP800:1.1 config_ivtools/site.def.HP800:1.2
*** config_ivtools/site.def.HP800:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.HP800 Sat Jan 22 02:30:32 2000
***************
*** 30,38 ****
#undef TIFFOptimizeCFlags
#define TIFFOptimizeCFlags -O3
- /* libg++ include directory -- usually does not change with new version of libg++ */
- #define GPlusPlusIncludeDir /usr/local/lib/g++-include
-
/* machine-specific gcc include directory -- does not change with each new version of gcc */
#define ToolIncludeDir /usr/local/hppa1.1-hp-hpux9/include
--- 30,35 ----
***************
*** 43,51 ****
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs) g++ -shared -fpic -o $@ ldobjs
- /* use -rpath instead of -L to get slack developers shared libraries */
- #define UseRpath NO
-
/* Different LdPath for HP */
#define LdPath(libname) -Wl,+s -L$(LIBSRC)/libname/$(ARCH) Concat(-l,libname)
--- 40,45 ----
***************
*** 66,114 ****
$(RM) dest/Concat(lib,libname.sl)
#endif
- /*
- * Enable/disable relative InterViews-style installation of binaries
- */
- #undef InstallRelative
- #define InstallRelative YES
-
#undef BuildProgram
#define BuildProgram(program,depobjs,ldobjs,deplibs,ldlibs) @@\
program: depobjs deplibs @@\
RemoveIfUnwritable($@) @@\
g++ $(CCLDFLAGS) -o $@ ldobjs ldlibs
- #if 0
-
- /* -------------- imake way of configuring ------------------ */
-
- /*
- /*
- * Where to put binaries, libraries, and data files when InstallRelative is NO
- */
- #define BinDir /usr/local/bin
- #define LibDir /usr/local/lib
- #define LibAllDir /usr/local/lib/ivtools
-
- /*
- * X11 directories -- remember to override XCONFIGDIR the
- * first time you run "make World".
- */
- #define XConfigDir /usr/local/lib/imake
- #define XIncDir /usr/include/X11R5
- #define XLibDir /usr/lib/X11R5
-
- /* clippoly directory: comment out if not available */
- /* #define ClipPolyDir ProjectDir/clippoly */
-
- /* ACE directory: comment out if not available */
- /* #define AceDir ProjectDir/ACE_wrappers */
-
- #else
-
- /* --------------- autconf way of configuring --------------- */
-
/* file output by configure script */
#include "config-hpux-gcc.defs"
-
- #endif
--- 60,70 ----
Index: config_ivtools/site.def.LINUX
diff -c config_ivtools/site.def.LINUX:1.1 config_ivtools/site.def.LINUX:1.2
*** config_ivtools/site.def.LINUX:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.LINUX Sat Jan 22 02:30:32 2000
***************
*** 27,35 ****
#undef DefaultCCOptions
#define DefaultCCOptions /**/
- /* libg++ include directory -- usually does not change with new version of libg++ */
- #define GPlusPlusIncludeDir /usr/local/include/g++
-
/* machine-specific gcc include directory -- does not change with each new version of gcc */
#define ToolIncludeDir /usr/local/include
--- 27,32 ----
***************
*** 40,48 ****
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs,extra_flags) gcc -shared extra_flags -o $@ ldobjs
- /* use -rpath instead of -L to get slack developers shared libraries */
- #define UseRpath YES
-
/*
* Install a shared library on Linux.
*/
--- 37,42 ----
***************
*** 60,108 ****
$(RM) dest/Concat(lib,libname.so)
#endif
- /*
- * Enable/disable relative InterViews-style installation of binaries
- */
- #undef InstallRelative
- #define InstallRelative NO
-
- #if 0
-
- /* -------------- imake way of configuring ------------------ */
-
- /*
- /*
- * Where to put binaries, libraries, and data files when InstallRelative is NO
- */
- #if 1
- #define BinDir /usr/local/bin
- #define LibDir /usr/local/lib
- #define LibAllDir /usr/local/lib/ivtools
- #else
- #define InstalledRoot $(DESTDIR)/usr/X11R6 // for Debian
- #endif
-
- /*
- * X11 directories -- remember to override XCONFIGDIR the
- * first time you run "make World".
- */
- #define XConfigDir /usr/X11R6/lib/X11/config
- #define XIncDir /usr/X11R6/include
- #define XLibDir /usr/X11R6/lib
-
- /* clippoly directory: comment out if not available */
- /* #define ClipPolyDir ProjectDir/clippoly */
-
- /* ACE directory: comment out if not available */
- /* #define AceDir ProjectDir/ACE_wrappers */
-
- #else
-
- /* --------------- autconf way of configuring --------------- */
-
/* file output by configure script */
#include "config-linux-gcc.defs"
-
- #endif
--- 54,60 ----
Index: config_ivtools/site.def.NETBSD
diff -c config_ivtools/site.def.NETBSD:1.1 config_ivtools/site.def.NETBSD:1.2
*** config_ivtools/site.def.NETBSD:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.NETBSD Sat Jan 22 02:30:32 2000
***************
*** 37,45 ****
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs,extra_flags) gcc -shared extra_flags -o $@ ldobjs
- /* use -rpath instead of -L to get slack developers shared libraries */
- #define UseRpath YES
-
/*
* Install a shared library on NetBSD.
*/
--- 37,42 ----
***************
*** 56,64 ****
$(RM) dest/Concat(lib,libname.so.rev) @@\
$(RM) dest/Concat(lib,libname.so)
#endif
-
-
- /* --------------- autconf way of configuring --------------- */
/* file output by configure script */
#include "config-netbsd-gcc.defs"
--- 53,58 ----
Index: config_ivtools/site.def.SGI
diff -c config_ivtools/site.def.SGI:1.1 config_ivtools/site.def.SGI:1.2
*** config_ivtools/site.def.SGI:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.SGI Sat Jan 22 02:30:32 2000
***************
*** 27,35 ****
#undef ExtraLibraries
#define ExtraLibraries /**/
- /* libg++ include directory -- usually does not change with new version of libg++ */
- #define GPlusPlusIncludeDir /usr/local/lib/g++-include
-
/* machine-specific gcc include directory -- does not change with each new version of gcc */
#define ToolIncludeDir /usr/local/mips-sgi-irix5.2/include
--- 27,32 ----
***************
*** 42,55 ****
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs, extra_flags) gcc -shared extra_flags -o $@ ldobjs
! /*
! * Enable/disable relative InterViews-style installation of binaries
*/
! #undef InstallRelative
! #define InstallRelative YES
! /* use -rpath instead of -L to get slack developers shared libraries */
! #define UseRpath NO
/* use symbolic links for relative install of libraries */
#if !UseRpath
--- 39,52 ----
/* command to create shared libraries */
#define SharedLibraryCmd(ldobjs, extra_flags) gcc -shared extra_flags -o $@ ldobjs
! /*
! * Irix strip is broken
*/
! #undef InstPgmFlags
! #define InstPgmFlags /**/
! /* file output by configure script */
! #include "config-irix5-gcc.defs"
/* use symbolic links for relative install of libraries */
#if !UseRpath
***************
*** 75,118 ****
uninstall:: @@\
$(RM) dest/Concat(lib,libname.a)
#endif
- #endif
-
- /*
- * Irix strip is broken
- */
- #undef InstPgmFlags
- #define InstPgmFlags /**/
-
- #if 0
-
- /* -------------- imake way of configuring ------------------ */
-
- /*
- * Where to put binaries, libraries, and data files when InstallRelative is NO
- */
- #define BinDir /usr/local/bin
- #define LibDir /usr/local/lib
- #define LibAllDir /usr/local/lib/ivtools
-
- /*
- * X11 directories -- remember to override XCONFIGDIR the
- * first time you run "make World".
- */
- #define XConfigDir /usr/lib/X11/config
- #define XIncDir /usr/include
- #define XLibDir /usr/lib
-
- /* clippoly directory: comment out if not available */
- /* #define ClipPolyDir ProjectDir/clippoly */
-
- /* ACE directory: comment out if not available */
- /* #define AceDir ProjectDir/ACE_wrappers */
-
- #else
-
- /* --------------- autconf way of configuring --------------- */
-
- /* file output by configure script */
- #include "config-irix5-gcc.defs"
-
#endif
--- 72,75 ----
Index: config_ivtools/site.def.SUN4
diff -c config_ivtools/site.def.SUN4:1.1 config_ivtools/site.def.SUN4:1.2
*** config_ivtools/site.def.SUN4:1.1 Sat Jan 22 02:30:32 2000
--- config/site.def.SUN4 Sat Jan 22 02:30:32 2000
***************
*** 31,39 ****
#define BuildRPCClasses YES
#define SOMAXCONN 5
- /* libg++ include directory -- usually does not change with new version of libg++ */
- #define GPlusPlusIncludeDir /usr/local/lib/g++-include
-
/* link libraries for the above */
#undef ExtraCCLdLibs
#ifndef SVR4Architecture
--- 31,36 ----
***************
*** 98,143 ****
#undef InstallRelative
#define InstallRelative YES
- #if 0
-
- /* -------------- imake way of configuring ------------------ */
-
- /*
- * Where to put binaries, libraries, and data files when InstallRelative is NO
- */
- #define BinDir /usr/local/bin
- #define LibDir /usr/local/lib
- #define LibAllDir /usr/local/lib/ivtools
-
- /*
- * X11 directories -- remember to override XCONFIGDIR the
- * first time you run "make World".
- */
- #ifndef SVR4Architecture
- #define XConfigDir /usr/local/lib/X11/config
- #define XIncDir /usr/local/include
- #define XLibDir /usr/local/lib
- #else
- #define XConfigDir /usr/X/lib/X11/config
- #define XIncDir /usr/X/include
- #define XLibDir /usr/X/lib
- #endif
-
- /* clippoly directory: comment out if not available */
- #define ClipPolyDir ProjectDir/clippoly
-
- /* ACE directory: comment out if not available */
- #define AceDir ProjectDir/ACE_wrappers
-
- #else
-
- /* --------------- autconf way of configuring --------------- */
-
/* file output by configure script */
#ifdef SVR4Architecture
#include "config-solaris-gcc.defs"
#else
#include "config-sunos4-gcc.defs"
#endif
-
- #endif
\ No newline at end of file
--- 95,103 ----
|
|
From: <ivt...@li...> - 2000-01-19 09:43:35
|
Patch: ivtools-000118-johnston-013
For: ivtools-0.8
Author: joh...@us...
This is an intermediate patch to ivtools-0.8. 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:
- make graphics-by-URL work for newer versions of the w3c utility.
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.1 OverlayUnidraw/ovimport.c:1.2
*** OverlayUnidraw/ovimport.c:1.1 Wed Jan 19 03:42:20 2000
--- src/OverlayUnidraw/ovimport.c Wed Jan 19 03:42:20 2000
***************
*** 1301,1307 ****
static boolean use_w3c = OverlayKit::bincheck("w3c");
static boolean use_curl = OverlayKit::bincheck("curl");
if (use_w3c)
! sprintf(buffer,"w3c %s", path);
else if (use_curl)
sprintf(buffer,"curl %s", path);
else
--- 1301,1307 ----
static boolean use_w3c = OverlayKit::bincheck("w3c");
static boolean use_curl = OverlayKit::bincheck("curl");
if (use_w3c)
! sprintf(buffer,"w3c -q %s", path);
else if (use_curl)
sprintf(buffer,"curl %s", path);
else
|
|
From: <ivt...@li...> - 2000-01-17 21:37:43
|
Patch: ivtools-000118-johnston-012
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- finish links from embedded extractable html to man pages for Unidraw.
Index: include_unidraw/manips.h
diff -c include_unidraw/manips.h:1.1 include_unidraw/manips.h:1.2
*** include_unidraw/manips.h:1.1 Tue Jan 18 01:27:02 2000
--- src/include/Unidraw/manips.h Tue Jan 18 01:27:02 2000
***************
*** 48,53 ****
--- 48,55 ----
class Transformer;
class UList;
+ //: group manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class ManipGroup : public Manipulator {
public:
ManipGroup(Viewer* = nil, Tool* = nil);
***************
*** 91,96 ****
--- 93,100 ----
Tool* _tool;
};
+ //: drag manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class DragManip : public Manipulator {
public:
DragManip(
***************
*** 135,140 ****
--- 139,146 ----
inline const Event& DragManip::GraspEvent () { return _grasp_e; }
+ //: vertex manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class VertexManip : public DragManip {
public:
VertexManip(
***************
*** 147,152 ****
--- 153,160 ----
GrowingVertices* GetGrowingVertices();
};
+ //: continuous vertex manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class ScribbleVertexManip : public VertexManip {
public:
ScribbleVertexManip(
***************
*** 160,165 ****
--- 168,175 ----
boolean _first;
};
+ //: connection manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class ConnectManip : public DragManip {
public:
ConnectManip(Viewer*, Rubberband*, Transformer* = nil, Tool* = nil);
***************
*** 170,175 ****
--- 180,187 ----
ConnectorView* _target;
};
+ //: text manipulator
+ // <a href=../man3.1/manips.html>man page</a>
class TextManip : public Manipulator {
public:
TextManip(Viewer*, Painter*, Coord tab, Tool* = nil);
Index: include_unidraw/statevars.h
diff -c include_unidraw/statevars.h:1.1 include_unidraw/statevars.h:1.2
*** include_unidraw/statevars.h:1.1 Tue Jan 18 01:27:02 2000
--- src/include/Unidraw/statevars.h Tue Jan 18 01:27:02 2000
***************
*** 35,40 ****
--- 35,42 ----
class PSPattern;
class PSFont;
+ //: name state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class NameVar : public StateVar {
public:
NameVar(const char* = nil);
***************
*** 53,58 ****
--- 55,62 ----
char* _name;
};
+ //: component name state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class CompNameVar : public NameVar {
public:
CompNameVar(Component* = nil);
***************
*** 75,80 ****
--- 79,86 ----
Component* _comp;
};
+ //: modified-status state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class ModifStatusVar : public StateVar {
public:
ModifStatusVar(Component* = nil, boolean = false);
***************
*** 100,105 ****
--- 106,113 ----
static class UList* _vars;
};
+ //: magnify factor state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class MagnifVar : public StateVar {
public:
MagnifVar(float = 1);
***************
*** 118,123 ****
--- 126,133 ----
float _magnif;
};
+ //: gravity-enabled state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class GravityVar : public StateVar {
public:
GravityVar(boolean = false);
***************
*** 136,141 ****
--- 146,153 ----
int _active;
};
+ //: current font state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class FontVar : public StateVar {
public:
FontVar(PSFont* = nil);
***************
*** 155,160 ****
--- 167,174 ----
PSFont* _psfont;
};
+ //: current brush state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class BrushVar : public StateVar {
public:
BrushVar(PSBrush* = nil);
***************
*** 174,179 ****
--- 188,195 ----
PSBrush* _psbrush;
};
+ //: current pattern state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class PatternVar : public StateVar {
public:
PatternVar(PSPattern* = nil);
***************
*** 193,198 ****
--- 209,216 ----
PSPattern* _pspattern;
};
+ //: current color state variable
+ // <a href=../man3.1/statevars.html>man page</a>
class ColorVar : public StateVar {
public:
ColorVar(PSColor* fg = nil, PSColor* bg = nil);
Index: include_unidraw/stateviews.h
diff -c include_unidraw/stateviews.h:1.1 include_unidraw/stateviews.h:1.2
*** include_unidraw/stateviews.h:1.1 Tue Jan 18 01:27:03 2000
--- src/include/Unidraw/stateviews.h Tue Jan 18 01:27:03 2000
***************
*** 45,50 ****
--- 45,52 ----
class PSFont;
class TextInteractor;
+ //: name state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class NameVarView : public StateVarView {
public:
NameVarView(NameVar*, Alignment = Center, const char* sample = nil);
***************
*** 53,58 ****
--- 55,62 ----
virtual boolean Stale();
};
+ //: file-name state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class FileNameVarView : public StateVarView {
public:
FileNameVarView(
***************
*** 65,70 ****
--- 69,76 ----
boolean _relative;
};
+ //: component-name state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class CompNameVarView : public StateVarView {
public:
CompNameVarView(
***************
*** 77,82 ****
--- 83,90 ----
boolean _relative;
};
+ //: modified-status state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class ModifStatusVarView : public StateVarView {
public:
ModifStatusVarView(ModifStatusVar*, Alignment = Center);
***************
*** 89,94 ****
--- 97,104 ----
boolean _prevVal, _prevProt;
};
+ //: magnify-factor state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class MagnifVarView : public StateVarView {
public:
MagnifVarView(MagnifVar*, Alignment = Center);
***************
*** 99,104 ****
--- 109,116 ----
float _prevVal;
};
+ //: gravity-enabled state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class GravityVarView : public StateVarView {
public:
GravityVarView(GravityVar*, Alignment = Center);
***************
*** 109,114 ****
--- 121,128 ----
boolean _prevVal;
};
+ //: current-font state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class FontVarView : public StateVarView {
public:
FontVarView(FontVar*, Alignment = Center, const char* sample = nil);
***************
*** 119,124 ****
--- 133,140 ----
PSFont* _prevVal;
};
+ //: current-brush state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class BrushVarView : public StateVarView {
public:
BrushVarView(BrushVar*, ColorVar* = nil);
***************
*** 132,137 ****
--- 148,155 ----
ColorVar* _colorSubj;
};
+ //: current-pattern state variable view
+ // <a href=../man3.1/stateviews.html>man page</a>
class PatternVarView : public StateVarView {
public:
PatternVarView(PatternVar*, ColorVar* = nil);
Index: include_unidraw/transfn.h
diff -c include_unidraw/transfn.h:1.1 include_unidraw/transfn.h:1.2
*** include_unidraw/transfn.h:1.1 Tue Jan 18 01:27:03 2000
--- src/include/Unidraw/transfn.h Tue Jan 18 01:27:03 2000
***************
*** 35,40 ****
--- 35,42 ----
class istream;
class ostream;
+ //: transfer function
+ // <a href=../man3.1/transfns.html>man page</a>
class TransferFunct {
public:
virtual void Evaluate(Path* = nil);
Index: include_unidraw/transfns.h
diff -c include_unidraw/transfns.h:1.1 include_unidraw/transfns.h:1.2
*** include_unidraw/transfns.h:1.1 Tue Jan 18 01:27:03 2000
--- src/include/Unidraw/transfns.h Tue Jan 18 01:27:03 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/transfn.h>
+ //: to-port transfer function
+ // <a href=../man3.1/transfns.html>man page</a>
class TF_2Port : public TransferFunct {
public:
virtual void Evaluate(Path* = nil);
***************
*** 50,55 ****
--- 52,59 ----
virtual boolean ChangedOutput(int index = 0);
};
+ //: direct transfer function
+ // <a href=../man3.1/transfns.html>man page</a>
class TF_Direct : public TF_2Port {
public:
TF_Direct(StateVar* input = nil, StateVar* output = nil);
Index: include_unidraw/uctrls.h
diff -c include_unidraw/uctrls.h:1.1 include_unidraw/uctrls.h:1.2
*** include_unidraw/uctrls.h:1.1 Tue Jan 18 01:27:03 2000
--- src/include/Unidraw/uctrls.h Tue Jan 18 01:27:03 2000
***************
*** 30,35 ****
--- 30,37 ----
#include <Unidraw/globals.h>
#include <Unidraw/uctrl.h>
+ //: command control
+ // <a href=../man3.1/uctrls.html>man page</a>
class CommandControl : public UControl {
public:
CommandControl(ControlInfo*);
***************
*** 43,48 ****
--- 45,52 ----
void Init(ControlInfo*);
};
+ //: panel control
+ // <a href=../man3.1/uctrls.html>man page</a>
class PanelControl : public UControl {
public:
PanelControl(Interactor*, ControlInfo*, ControlState* = nil);
***************
*** 58,75 ****
--- 62,85 ----
void Init(Interactor*, ControlState*);
};
+ //: horizontal-panel control
+ // <a href=../man3.1/uctrls.html>man page</a>
class HPanelControl : public PanelControl {
public:
HPanelControl(ControlInfo*, ControlState* = nil);
HPanelControl(const char*, ControlInfo*, ControlState* = nil);
};
+ //: vertical-panel control
+ // <a href=../man3.1/uctrls.html>man page</a>
class VPanelControl : public PanelControl {
public:
VPanelControl(ControlInfo*, ControlState* = nil);
VPanelControl(const char*, ControlInfo*, ControlState* = nil);
};
+ //: command "interactor" control
+ // <a href=../man3.1/uctrls.html>man page</a>
class CommandInteractor : public UControlInteractor {
public:
CommandInteractor(ControlInfo*);
***************
*** 78,83 ****
--- 88,95 ----
virtual void Resize();
};
+ //: panel "interactor" control
+ // <a href=../man3.1/uctrls.html>man page</a>
class PanelInteractor : public UControlInteractor {
public:
PanelInteractor(ControlInfo*, Orientation);
Index: include_commands/align.h
diff -c include_commands/align.h:1.1 include_commands/align.h:1.2
*** include_commands/align.h:1.1 Tue Jan 18 01:27:08 2000
--- src/include/Unidraw/Commands/align.h Tue Jan 18 01:27:08 2000
***************
*** 33,38 ****
--- 33,40 ----
class GraphicComp;
class GraphicView;
+ //: align command
+ // <a href=../man3.1/align.html>man page</a>
class AlignCmd : public Command {
public:
AlignCmd(ControlInfo*, Alignment = Left, Alignment = Left);
***************
*** 50,55 ****
--- 52,59 ----
Alignment _align1, _align2;
};
+ //: align-to-grid command
+ // <a href=../man3.1/align.html>man page</a>
class AlignToGridCmd : public Command {
public:
AlignToGridCmd(ControlInfo*);
Index: include_commands/catcmds.h
diff -c include_commands/catcmds.h:1.1 include_commands/catcmds.h:1.2
*** include_commands/catcmds.h:1.1 Tue Jan 18 01:27:08 2000
--- src/include/Unidraw/Commands/catcmds.h Tue Jan 18 01:27:08 2000
***************
*** 36,41 ****
--- 36,43 ----
class FileChooser;
class PrintDialog;
+ //: new component command
+ // <a href=../catcmds.h>man page</a>
class NewCompCmd : public Command {
public:
NewCompCmd(ControlInfo*, Component* prototype = nil);
***************
*** 58,63 ****
--- 60,67 ----
inline Component* NewCompCmd::GetPrototype () { return prototype_; }
+ //: revert command
+ // <a href=../catcmds.h>man page</a>
class RevertCmd : public Command {
public:
RevertCmd(ControlInfo*);
***************
*** 71,76 ****
--- 75,82 ----
virtual boolean IsA(ClassId);
};
+ //: view component command
+ // <a href=../catcmds.h>man page</a>
class ViewCompCmd : public Command {
public:
ViewCompCmd(ControlInfo*, FileChooser* = nil);
***************
*** 87,92 ****
--- 93,100 ----
FileChooser* chooser_;
};
+ //: save component command
+ // <a href=../catcmds.h>man page</a>
class SaveCompCmd : public Command {
public:
SaveCompCmd(ControlInfo*);
***************
*** 100,105 ****
--- 108,115 ----
virtual boolean IsA(ClassId);
};
+ //: save-as component command
+ // <a href=../catcmds.h>man page</a>
class SaveCompAsCmd : public Command {
public:
SaveCompAsCmd(ControlInfo*, FileChooser* = nil);
***************
*** 116,121 ****
--- 126,133 ----
FileChooser* chooser_;
};
+ //: print command
+ // <a href=../catcmds.h>man page</a>
class PrintCmd : public Command {
public:
PrintCmd(ControlInfo*, PrintDialog* = nil);
***************
*** 134,139 ****
--- 146,153 ----
PrintDialog* _dialog;
};
+ //: quit command
+ // <a href=../catcmds.h>man page</a>
class QuitCmd : public Command {
public:
QuitCmd(ControlInfo*);
Index: include_commands/datas.h
diff -c include_commands/datas.h:1.1 include_commands/datas.h:1.2
*** include_commands/datas.h:1.1 Tue Jan 18 01:27:09 2000
--- src/include/Unidraw/Commands/datas.h Tue Jan 18 01:27:09 2000
***************
*** 38,43 ****
--- 38,45 ----
class PSColor;
class FullGraphic;
+ //: void data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class VoidData : public Data {
public:
VoidData(void*);
***************
*** 45,50 ****
--- 47,54 ----
void* _void;
};
+ //: move data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class MoveData : public Data {
public:
MoveData(float, float);
***************
*** 52,57 ****
--- 56,63 ----
float _dx, _dy;
};
+ //: color data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class ColorData : public Data {
public:
ColorData(PSColor*, PSColor*);
***************
*** 59,64 ****
--- 65,72 ----
PSColor* _fg, *_bg;
};
+ //: graphic state data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class GSData : public Data {
public:
GSData(Graphic*);
***************
*** 67,72 ****
--- 75,82 ----
FullGraphic* _gs;
};
+ //: mobility state data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class MobilityData : public Data {
public:
MobilityData(Mobility, Graphic*);
***************
*** 78,83 ****
--- 88,95 ----
class GraphicComp;
+ //: ungroup data for command undo
+ // <a href=../man3.1/datas.h>man page</a>
class UngroupData : public Data {
public:
UngroupData(GraphicComp* parent, Graphic*);
Index: include_commands/edit.h
diff -c include_commands/edit.h:1.1 include_commands/edit.h:1.2
*** include_commands/edit.h:1.1 Tue Jan 18 01:27:09 2000
--- src/include/Unidraw/Commands/edit.h Tue Jan 18 01:27:09 2000
***************
*** 32,37 ****
--- 32,39 ----
class Connector;
class GraphicComp;
+ //: undo command
+ // <a href=../man3.1/edit.html>man page</a>
class UndoCmd : public Command {
public:
UndoCmd(ControlInfo*);
***************
*** 45,50 ****
--- 47,54 ----
virtual boolean IsA(ClassId);
};
+ //: redo command
+ // <a href=../man3.1/edit.html>man page</a>
class RedoCmd : public Command {
public:
RedoCmd(ControlInfo*);
***************
*** 58,63 ****
--- 62,69 ----
virtual boolean IsA(ClassId);
};
+ //: cut command
+ // <a href=../man3.1/edit.html>man page</a>
class CutCmd : public Command {
public:
CutCmd(ControlInfo*, Clipboard* = nil);
***************
*** 74,79 ****
--- 80,87 ----
boolean _executed;
};
+ //: copy command
+ // <a href=../man3.1/edit.html>man page</a>
class CopyCmd : public Command {
public:
CopyCmd(ControlInfo*, Clipboard* = nil);
***************
*** 88,93 ****
--- 96,103 ----
virtual boolean IsA(ClassId);
};
+ //: paste command
+ // <a href=../man3.1/edit.html>man page</a>
class PasteCmd : public Command {
public:
PasteCmd(ControlInfo*, Clipboard* = nil);
***************
*** 105,110 ****
--- 115,122 ----
boolean _executed;
};
+ //: replace command
+ // <a href=../man3.1/edit.html>man page</a>
class ReplaceCmd : public MacroCmd {
public:
ReplaceCmd(ControlInfo*, GraphicComp* = nil);
***************
*** 119,124 ****
--- 131,138 ----
void Init(GraphicComp*);
};
+ //: duplicate command
+ // <a href=../man3.1/edit.html>man page</a>
class DupCmd : public Command {
public:
DupCmd(ControlInfo*, Clipboard* = nil);
***************
*** 135,140 ****
--- 149,156 ----
boolean _executed;
};
+ //: delete command
+ // <a href=../man3.1/edit.html>man page</a>
class DeleteCmd : public Command {
public:
DeleteCmd(ControlInfo*, Clipboard* = nil);
***************
*** 151,156 ****
--- 167,174 ----
boolean _executed;
};
+ //: select-all command
+ // <a href=../man3.1/edit.html>man page</a>
class SlctAllCmd : public Command {
public:
SlctAllCmd(ControlInfo*);
***************
*** 164,169 ****
--- 182,189 ----
virtual boolean IsA(ClassId);
};
+ //: connect command
+ // <a href=../man3.1/edit.html>man page</a>
class ConnectCmd : public Command {
public:
ConnectCmd(ControlInfo*, Connector* = nil, Connector* = nil);
***************
*** 184,189 ****
--- 204,211 ----
Connector* _source, *_target;
};
+ //: mobility command
+ // <a href=../man3.1/edit.html>man page</a>
class MobilityCmd : public Command {
public:
MobilityCmd(ControlInfo*, Mobility = Fixed);
Index: include_commands/struct.h
diff -c include_commands/struct.h:1.1 include_commands/struct.h:1.2
*** include_commands/struct.h:1.1 Tue Jan 18 01:27:09 2000
--- src/include/Unidraw/Commands/struct.h Tue Jan 18 01:27:09 2000
***************
*** 33,38 ****
--- 33,40 ----
class Iterator;
class Selection;
+ //: group command
+ // <a href=../man3.1/struct.html>man page</a>
class GroupCmd : public Command {
public:
GroupCmd(ControlInfo*, GraphicComp* dest = nil);
***************
*** 62,67 ****
--- 64,71 ----
inline GraphicComp* GroupCmd::GetGroup () { return _group; }
inline void GroupCmd::SetGroup (GraphicComp* g) { _group = g; }
+ //: ungroup command
+ // <a href=../man3.1/struct.html>man page</a>
class UngroupCmd : public Command {
public:
UngroupCmd(ControlInfo*);
***************
*** 88,93 ****
--- 92,99 ----
inline Clipboard* UngroupCmd::GetKids () { return _kids; }
inline void UngroupCmd::SetKids (Clipboard* k) { _kids = k; }
+ //: move-to-front command
+ // <a href=../man3.1/struct.html>man page</a>
class FrontCmd : public Command {
public:
FrontCmd(ControlInfo*);
***************
*** 101,106 ****
--- 107,114 ----
virtual boolean IsA(ClassId);
};
+ //: move-to-back command
+ // <a href=../man3.1/struct.html>man page</a>
class BackCmd : public Command {
public:
BackCmd(ControlInfo*);
Index: include_commands/transforms.h
diff -c include_commands/transforms.h:1.1 include_commands/transforms.h:1.2
*** include_commands/transforms.h:1.1 Tue Jan 18 01:27:09 2000
--- src/include/Unidraw/Commands/transforms.h Tue Jan 18 01:27:09 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <IV-2_6/_enter.h>
+ //: move command
+ // <a href=../man3.1/transforms.html>man page</a>
class MoveCmd : public Command {
public:
MoveCmd(ControlInfo*, float = 0, float = 0);
***************
*** 47,52 ****
--- 49,56 ----
float _dx, _dy;
};
+ //: scale command
+ // <a href=../man3.1/transforms.html>man page</a>
class ScaleCmd : public Command {
public:
ScaleCmd(ControlInfo*, float = 1, float = 1, Alignment = Center);
***************
*** 67,72 ****
--- 71,78 ----
inline Alignment ScaleCmd::GetAlignment () { return _align; }
+ //: rotate command
+ // <a href=../man3.1/transforms.html>man page</a>
class RotateCmd : public Command {
public:
RotateCmd(ControlInfo*, float = 0);
***************
*** 87,92 ****
--- 93,100 ----
class Transformer;
+ //: transform command
+ // <a href=../man3.1/transforms.html>man page</a>
class TransformCmd : public Command {
public:
TransformCmd(ControlInfo*, Transformer* = nil);
Index: include_commands/viewcmds.h
diff -c include_commands/viewcmds.h:1.1 include_commands/viewcmds.h:1.2
*** include_commands/viewcmds.h:1.1 Tue Jan 18 01:27:09 2000
--- src/include/Unidraw/Commands/viewcmds.h Tue Jan 18 01:27:09 2000
***************
*** 32,37 ****
--- 32,39 ----
class ControlInfo;
class GridDialog;
+ //: normal-size command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class NormSizeCmd : public Command {
public:
NormSizeCmd(ControlInfo*);
***************
*** 45,50 ****
--- 47,54 ----
virtual boolean IsA(ClassId);
};
+ //: reduce-to-fit command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class RedToFitCmd : public Command {
public:
RedToFitCmd(ControlInfo*);
***************
*** 58,63 ****
--- 62,69 ----
virtual boolean IsA(ClassId);
};
+ //: center command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class CenterCmd : public Command {
public:
CenterCmd(ControlInfo*);
***************
*** 71,76 ****
--- 77,84 ----
virtual boolean IsA(ClassId);
};
+ //: enable/disable grid command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class GridCmd : public Command {
public:
GridCmd(ControlInfo*);
***************
*** 84,89 ****
--- 92,99 ----
virtual boolean IsA(ClassId);
};
+ //: grid-spacing command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class GridSpacingCmd : public Command {
public:
GridSpacingCmd(ControlInfo*);
***************
*** 100,105 ****
--- 110,117 ----
GridDialog* _dialog;
};
+ //: enable/disable gravity command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class GravityCmd : public Command {
public:
GravityCmd(ControlInfo*);
***************
*** 113,118 ****
--- 125,132 ----
virtual boolean IsA(ClassId);
};
+ //: landscape/portrait orientation command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class OrientationCmd : public Command {
public:
OrientationCmd(ControlInfo*);
***************
*** 126,131 ****
--- 140,147 ----
virtual boolean IsA(ClassId);
};
+ //: editor close command
+ // <a href=../man3.1/viewcmds.html>man page</a>
class CloseEditorCmd : public Command {
public:
CloseEditorCmd(ControlInfo*);
Index: include_graphic/ellipses.h
diff -c include_graphic/ellipses.h:1.1 include_graphic/ellipses.h:1.2
*** include_graphic/ellipses.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/ellipses.h Tue Jan 18 01:27:16 2000
***************
*** 33,38 ****
--- 33,40 ----
class MultiLineObj;
+ //: ellipse graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class Ellipse : public Graphic {
public:
void GetOriginal(Coord&, Coord&, int&, int&);
***************
*** 57,62 ****
--- 59,66 ----
void CalcControlPts(Transformer*);
};
+ //: stroked ellipse graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class S_Ellipse : public Ellipse {
public:
S_Ellipse(Coord x0, Coord y0, int r1, int r2, Graphic* gr = nil);
***************
*** 75,80 ****
--- 79,86 ----
PSBrush* _br;
};
+ //: filled ellipse graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class F_Ellipse : public Ellipse {
public:
F_Ellipse(Coord x0, Coord y0, int r1, int r2, Graphic* gr = nil);
***************
*** 93,98 ****
--- 99,106 ----
PSPattern* _pat;
};
+ //: stroke-filled ellipse graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class SF_Ellipse : public Ellipse {
public:
SF_Ellipse(Coord x0, Coord y0, int r1, int r2, Graphic* gr = nil);
***************
*** 115,120 ****
--- 123,130 ----
PSPattern* _pat;
};
+ //: stroked circle graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class S_Circle : public S_Ellipse {
public:
S_Circle(Coord x0, Coord y0, int radius, Graphic* gr = nil);
***************
*** 122,127 ****
--- 132,139 ----
virtual Graphic* Copy();
};
+ //: filled circle graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class F_Circle : public F_Ellipse {
public:
F_Circle(Coord x0, Coord y0, int radius, Graphic* gr = nil);
***************
*** 129,134 ****
--- 141,148 ----
virtual Graphic* Copy();
};
+ //: stroked-filled circle graphic
+ // <a href=../man3.1/ellipses.html>man page</a>
class SF_Circle : public SF_Ellipse {
public:
SF_Circle(Coord x0, Coord y0, int radius, Graphic* gr = nil);
Index: include_graphic/geomobjs.h
diff -c include_graphic/geomobjs.h:1.1 include_graphic/geomobjs.h:1.2
*** include_graphic/geomobjs.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/geomobjs.h Tue Jan 18 01:27:16 2000
***************
*** 37,42 ****
--- 37,44 ----
class UList;
class ostream;
+ //: point geometric object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class PointObj {
public:
PointObj(Coord = 0, Coord = 0);
***************
*** 47,52 ****
--- 49,56 ----
Coord _x, _y;
};
+ //: line geometric object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class LineObj {
public:
LineObj(Coord = 0, Coord = 0, Coord = 0, Coord = 0);
***************
*** 59,64 ****
--- 63,70 ----
PointObj _p1, _p2;
};
+ //: box geometric object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class BoxObj {
public:
BoxObj(Coord = 0, Coord = 0, Coord = 0, Coord = 0);
***************
*** 75,80 ****
--- 81,88 ----
Coord _bottom, _top;
};
+ //: multi-line geometric object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class MultiLineObj : public Resource {
public:
MultiLineObj(Coord* = nil, Coord* = nil, int = 0);
***************
*** 122,127 ****
--- 130,137 ----
static boolean _pts_by_n_enabled;
};
+ //: filled polygon geometric object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class FillPolygonObj : public MultiLineObj {
public:
FillPolygonObj(Coord* = nil, Coord* = nil, int = 0);
***************
*** 137,142 ****
--- 147,154 ----
int _normCount;
};
+ //: geometric extent object
+ // <a href=../man3.1/geomobjs.html>man page</a>
class Extent {
public:
Extent(float = 0, float = 0, float = 0, float = 0, float = 0);
Index: include_graphic/lines.h
diff -c include_graphic/lines.h:1.1 include_graphic/lines.h:1.2
*** include_graphic/lines.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/lines.h Tue Jan 18 01:27:16 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <IV-2_6/_enter.h>
+ //: point graphic
+ // <a href=../man3.1/lines.html>man page</a>
class Point : public Graphic {
public:
Point(Coord x, Coord y, Graphic* gr = nil);
***************
*** 53,58 ****
--- 55,62 ----
PSBrush* _br;
};
+ //: line graphic
+ // <a href=../man3.1/lines.html>man page</a>
class Line : public Graphic {
public:
Line(Coord x0, Coord y0, Coord x1, Coord y1, Graphic* gr = nil);
***************
*** 76,81 ****
--- 80,87 ----
PSBrush* _br;
};
+ //: multi-line graphic
+ // <a href=../man3.1/lines.html>man page</a>
class MultiLine : public Vertices {
protected:
MultiLine(Coord* x, Coord* y, int count, Graphic* gr = nil) ;
***************
*** 86,91 ****
--- 92,99 ----
boolean f_intersects(BoxObj&, Graphic*);
};
+ //: stroked multi-line graphic
+ // <a href=../man3.1/lines.html>man page</a>
class S_MultiLine : public MultiLine {
public:
S_MultiLine(Coord* x, Coord* y, int count, Graphic* gr = nil);
***************
*** 104,109 ****
--- 112,119 ----
PSBrush* _br;
};
+ //: stroked-filled multi-line graphic
+ // <a href=../man3.1/lines.html>man page</a>
class SF_MultiLine : public MultiLine {
public:
SF_MultiLine(Coord* x, Coord* y, int count, Graphic* = nil);
Index: include_graphic/polygons.h
diff -c include_graphic/polygons.h:1.1 include_graphic/polygons.h:1.2
*** include_graphic/polygons.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/polygons.h Tue Jan 18 01:27:16 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <IV-2_6/_enter.h>
+ //: rectangle graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class Rect : public Graphic {
public:
void GetOriginal(Coord&, Coord&, Coord&, Coord&);
***************
*** 49,54 ****
--- 51,58 ----
Coord _x0, _y0, _x1, _y1;
};
+ //: stroked rectangle graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class S_Rect : public Rect {
public:
S_Rect(Coord x0, Coord y0, Coord x1, Coord y1, Graphic* = nil);
***************
*** 67,72 ****
--- 71,78 ----
PSBrush* _br;
};
+ //: filled rectangle graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class F_Rect : public Rect {
public:
F_Rect(Coord x0, Coord y0, Coord x1, Coord y1, Graphic* = nil);
***************
*** 85,90 ****
--- 91,98 ----
PSPattern* _pat;
};
+ //: stroked-filled rectangle graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class SF_Rect : public Rect {
public:
SF_Rect(Coord x0, Coord y0, Coord x1, Coord y1, Graphic* = nil);
***************
*** 107,112 ****
--- 115,122 ----
PSPattern* _pat;
};
+ //: polygon graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class Polygon : public Vertices {
protected:
Polygon(Coord* x, Coord* y, int count, Graphic* gr = nil) ;
***************
*** 117,122 ****
--- 127,134 ----
boolean f_intersects(BoxObj&, Graphic*);
};
+ //: stroked polygon graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class S_Polygon : public Polygon {
public:
S_Polygon(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 135,140 ****
--- 147,154 ----
PSBrush* _br;
};
+ //: filled polygon graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class F_Polygon : public Polygon {
public:
F_Polygon(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 153,158 ****
--- 167,174 ----
PSPattern* _pat;
};
+ //: stroked-filled polygon graphic
+ // <a href=../man3.1/polygons.html>man page</a>
class SF_Polygon : public Polygon {
public:
SF_Polygon(Coord* x, Coord* y, int count, Graphic* = nil);
Index: include_graphic/pspaint.h
diff -c include_graphic/pspaint.h:1.1 include_graphic/pspaint.h:1.2
*** include_graphic/pspaint.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/pspaint.h Tue Jan 18 01:27:16 2000
***************
*** 38,43 ****
--- 38,45 ----
#undef None
+ //: "PostScript" brush object
+ // <a href=../man3.1/pspaint.html>man page</a>
class PSBrush : public Brush {
public:
PSBrush();
***************
*** 68,73 ****
--- 70,77 ----
inline int PSBrush::GetDashPatternSize () { return _dashpatsize; }
inline int PSBrush::GetDashOffset () { return _dashoffset; }
+ //: "PostScript" color object
+ // <a href=../man3.1/pspaint.html>man page</a>
class PSColor : public Color {
public:
PSColor(ColorIntensity, ColorIntensity, ColorIntensity, const char*);
***************
*** 82,87 ****
--- 86,93 ----
inline const char* PSColor::GetName () { return _name; }
+ //: "PostScript" font object
+ // <a href=../man3.1/pspaint.html>man page</a>
class PSFont : public Font {
public:
PSFont(const char*, const char*, const char*);
***************
*** 107,112 ****
--- 113,120 ----
inline const char* PSFont::GetPrintFontAndSize () { return _printfontandsize; }
inline int PSFont::GetLineHt () { return _lineHt; }
+ //: "PostScript" pattern object
+ // <a href=../man3.1/pspaint.html>man page</a>
class PSPattern : public Pattern {
public:
PSPattern();
Index: include_graphic/splines.h
diff -c include_graphic/splines.h:1.1 include_graphic/splines.h:1.2
*** include_graphic/splines.h:1.1 Tue Jan 18 01:27:16 2000
--- src/include/Unidraw/Graphic/splines.h Tue Jan 18 01:27:16 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <IV-2_6/_enter.h>
+ //: open b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class OpenBSpline : public Vertices {
public:
virtual int GetOriginal(const Coord*&, const Coord*&);
***************
*** 43,48 ****
--- 45,52 ----
boolean f_intersects(BoxObj&, Graphic*);
};
+ //: stroked open b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class S_OpenBSpline : public OpenBSpline {
public:
S_OpenBSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
***************
*** 61,66 ****
--- 65,72 ----
PSBrush* _br;
};
+ //: filled open b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class F_OpenBSpline : public OpenBSpline {
public:
F_OpenBSpline(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 79,84 ****
--- 85,92 ----
PSPattern* _pat;
};
+ //: stroked-filled open b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class SF_OpenBSpline : public OpenBSpline {
public:
SF_OpenBSpline(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 100,105 ****
--- 108,115 ----
PSPattern* _pat;
};
+ //: stroked-filled open b-spline graphic with control-point hit detection.
+ // <a href=../man3.1/splines.html>man page</a>
class SFH_OpenBSpline : public SF_OpenBSpline {
public:
SFH_OpenBSpline(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 111,116 ****
--- 121,128 ----
virtual boolean intersects(BoxObj&, Graphic*);
};
+ //: closed b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class ClosedBSpline : public Vertices {
protected:
ClosedBSpline(Coord* x, Coord* y, int count, Graphic* gr = nil) ;
***************
*** 121,126 ****
--- 133,140 ----
boolean f_intersects(BoxObj&, Graphic*);
};
+ //: stroked closed b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class S_ClosedBSpline : public ClosedBSpline {
public:
S_ClosedBSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
***************
*** 139,144 ****
--- 153,160 ----
PSBrush* _br;
};
+ //: filled closed b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class F_ClosedBSpline : public ClosedBSpline {
public:
F_ClosedBSpline(Coord* x, Coord* y, int count, Graphic* gr =nil);
***************
*** 157,162 ****
--- 173,180 ----
PSPattern* _pat;
};
+ //: stroked-filled closed b-spline graphic
+ // <a href=../man3.1/splines.html>man page</a>
class SF_ClosedBSpline : public ClosedBSpline {
public:
SF_ClosedBSpline(Coord* x, Coord* y, int count, Graphic* = nil);
***************
*** 178,183 ****
--- 196,203 ----
PSPattern* _pat;
};
+ //: stroked-filled closed b-spline graphic with control-point hit detection
+ // <a href=../man3.1/splines.html>man page</a>
class SFH_ClosedBSpline : public SF_ClosedBSpline {
public:
SFH_ClosedBSpline(Coord* x, Coord* y, int count, Graphic* = nil);
|
|
From: <ivt...@li...> - 2000-01-17 21:36:55
|
Patch: ivtools-000117-johnston-011
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- last of the NetBSD fixes?
Index: src_tiff/tiffcompat.h
diff -c src_tiff/tiffcompat.h:1.1 src_tiff/tiffcompat.h:1.2
*** src_tiff/tiffcompat.h:1.1 Mon Jan 17 21:42:18 2000
--- src/TIFF/tiffcompat.h Mon Jan 17 21:42:18 2000
***************
*** 152,158 ****
--- 152,160 ----
#define lseek mpw_lseek
extern long mpw_lseek(int, long, int);
#else
+ if !defined(__NetBSD__)
extern long lseek();
+ #endif
#endif
/*
Index: include_std/nan.h
diff -c include_std/nan.h:1.2 include_std/nan.h:1.3
*** include_std/nan.h:1.2 Mon Jan 17 21:42:48 2000
--- src/include/ivstd/nan.h Mon Jan 17 21:42:48 2000
***************
*** 9,15 ****
#include <math.h>
#endif
! #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__)
#define isnanorinf(dval) (isnan(dval)||isinf(dval))
#elif defined(__alpha)
#define isnanorinf(dval) (IsNANorINF(dval))
--- 9,15 ----
#include <math.h>
#endif
! #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__) || defined(__NetBSD)
#define isnanorinf(dval) (isnan(dval)||isinf(dval))
#elif defined(__alpha)
#define isnanorinf(dval) (IsNANorINF(dval))
Index: config_iv/TIFF.def
diff -c config_iv/TIFF.def:1.2 config_iv/TIFF.def:1.3
*** config_iv/TIFF.def:1.2 Mon Jan 17 21:42:56 2000
--- config/InterViews/TIFF.def Mon Jan 17 21:42:56 2000
***************
*** 121,131 ****
-DCOLORIMETRY_SUPPORT -DYCBCR_SUPPORT \
-DHAVE_IEEEFP=1 -DUSE_VARARGS=1 -DUSE_PROTOTYPES=0
#endif
- #if defined(AlphaArchitecture)
- #define TIFFStdCDefines \
- -DCOLORIMETRY_SUPPORT -DYCBCR_SUPPORT \
- -DHAVE_IEEEFP=1 -DUSE_VARARGS=1 -DUSE_PROTOTYPES=0
- #endif
#if defined(NeXTArchitecture)
#define TIFFStdCDefines \
-DCOLORIMETRY_SUPPORT -DJPEG_SUPPORT -DYCBCR_SUPPORT -DCMYK_SUPPORT \
--- 121,126 ----
***************
*** 145,150 ****
--- 140,150 ----
#if defined(CygwinArchitecture)
#define TIFFStdCDefines \
-DCOLORIMETRY_SUPPORT -DJPEG_SUPPORT -DYCBCR_SUPPORT -DCMYK_SUPPORT \
+ -DHAVE_IEEEFP=1 -DUSE_VARARGS=0 -DUSE_PROTOTYPES=1 -DUSE_CONST=1
+ #endif
+ #if defined(NetBSDArchitecture)
+ #define TIFFStdCDefines \
+ -DCOLORIMETRY_SUPPORT -DJPEG_SUPPORT -DYCBCR_SUPPORT -DCMYK_SUPPORT \
-DHAVE_IEEEFP=1 -DUSE_VARARGS=0 -DUSE_PROTOTYPES=1 -DUSE_CONST=1
#endif
|
|
From: <ivt...@li...> - 2000-01-17 21:36:25
|
Patch: ivtools-000115-jgautier-001
For: ivtools-0.7.10
Author: jga...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
This patch adds Pull/Push By One Commands to the Structure menu in drawtool,
also making them available to any OverlayUnidraw based program.
The Back and Front Commands are Executed by being Interpreted first by the
selected Components which add themselves to the Command's Clipboard in
GraphicComp::Interpret (grcomp.c); then their Execute methods get the
Editor's Component to Interpret the Command if the Clipboard is not empty,
and that composite Component modifies the position in the comp tree
(GraphicComps::Interpret).
To implement the Pull/Push By One Commands in OverlayUnidraw we subclass them
from Back and Front Commands respectively. The Execute/Unexecute methods are
identical and thus inherited from their respective base classes (the proto-
typical methods for a Command that is Interpreted by the selected Component
and by the top level Editor's Component.) The subclassed IsA/GetId methods
enable the "add self to clipboard" behavior of Front/Back in GraphicComp::
Interpret; the actual Pull/Push are interpreted in OverlaysComp::Interpret,
carefully placed before the Front/Back so that the more specific one takes
effect. Checking for the end of the list with !Done(j) avoids segfault.
Index: OverlayUnidraw/ovclasses.h
diff -c OverlayUnidraw/ovclasses.h:1.1 OverlayUnidraw/ovclasses.h:1.2
*** OverlayUnidraw/ovclasses.h:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovclasses.h Sat Jan 15 03:53:09 2000
***************
*** 91,96 ****
--- 91,98 ----
#define OVPRECISEROTATE_CMD 2058
#define OVPRECISEPAGE_CMD 2059
#define OVPRECISEBRUSH_CMD 2060
+ #define PUSH_CMD 2061
+ #define PULL_CMD 2062
#define OVERLAY_COMP 2150
#define OVERLAYS_COMP 2151
Index: OverlayUnidraw/ovcmds.c
diff -c OverlayUnidraw/ovcmds.c:1.1 OverlayUnidraw/ovcmds.c:1.2
*** OverlayUnidraw/ovcmds.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcmds.c Sat Jan 15 03:53:10 2000
***************
*** 1507,1509 ****
--- 1507,1537 ----
}
}
}
+
+ /*****************************************************************************/
+
+ ClassId PushCmd::GetClassId () { return PUSH_CMD; }
+ boolean PushCmd::IsA (ClassId id) { return PUSH_CMD==id || BackCmd::IsA(id);}
+
+ PushCmd::PushCmd (ControlInfo* c) : BackCmd(c) { }
+ PushCmd::PushCmd (Editor* ed) : BackCmd(ed) { }
+
+ Command* PushCmd::Copy () {
+ Command* copy = new PushCmd(CopyControlInfo());
+ InitCopy(copy);
+ return copy;
+ }
+
+ /*****************************************************************************/
+
+ ClassId PullCmd::GetClassId () { return PULL_CMD; }
+ boolean PullCmd::IsA (ClassId id) { return PULL_CMD==id || FrontCmd::IsA(id);}
+
+ PullCmd::PullCmd (ControlInfo* c) : FrontCmd(c) { }
+ PullCmd::PullCmd (Editor* ed) : FrontCmd(ed) { }
+
+ Command* PullCmd::Copy () {
+ Command* copy = new PullCmd(CopyControlInfo());
+ InitCopy(copy);
+ return copy;
+ }
Index: OverlayUnidraw/ovcmds.h
diff -c OverlayUnidraw/ovcmds.h:1.1 OverlayUnidraw/ovcmds.h:1.2
*** OverlayUnidraw/ovcmds.h:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcmds.h Sat Jan 15 03:53:10 2000
***************
*** 401,404 ****
--- 401,426 ----
int& ni, int*& ix, int*& iy);
};
+ //: command to push down one level in the graphical structure
+ class PushCmd : public BackCmd {
+ public:
+ PushCmd(ControlInfo*);
+ PushCmd(Editor* = nil);
+
+ virtual Command* Copy();
+ virtual ClassId GetClassId();
+ virtual boolean IsA(ClassId);
+ };
+
+ //: command to pull up one level in the graphical structure
+ class PullCmd : public FrontCmd {
+ public:
+ PullCmd(ControlInfo*);
+ PullCmd(Editor* = nil);
+
+ virtual Command* Copy();
+ virtual ClassId GetClassId();
+ virtual boolean IsA(ClassId);
+ };
+
#endif
Index: OverlayUnidraw/ovcomps.c
diff -c OverlayUnidraw/ovcomps.c:1.1 OverlayUnidraw/ovcomps.c:1.2
*** OverlayUnidraw/ovcomps.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcomps.c Sat Jan 15 03:53:10 2000
***************
*** 604,609 ****
--- 604,649 ----
cmd->GetClipboard()->Append(this);
}
+ } else if (cmd->IsA(PUSH_CMD) || cmd->IsA(PULL_CMD)) {
+ Component* edComp = cmd->GetEditor()->GetComponent();
+
+ if (edComp == (Component*) this) {
+ Clipboard* cb = cmd->GetClipboard();
+ Iterator i;
+
+ if (cmd->IsA(PULL_CMD)) {
+ for (cb->First(i); !cb->Done(i); cb->Next(i)) {
+ OverlayComp* comp = (OverlayComp*)cb->GetComp(i);
+ Iterator j;
+ SetComp(comp, j);
+ Next(j);
+ StorePosition(comp, cmd);
+ if (!Done(j)) {
+ Remove(comp);
+ InsertAfter(j, comp);
+ }
+ }
+
+ } else {
+ for (cb->Last(i); !cb->Done(i); cb->Prev(i)) {
+ OverlayComp* comp = (OverlayComp*) cb->GetComp(i);
+ Iterator j;
+ SetComp(comp, j);
+ Prev(j);
+ StorePosition(comp, cmd);
+ if (!Done(j)) {
+ Remove(comp);
+ InsertBefore(j, comp);
+ }
+ }
+ }
+ Notify();
+ unidraw->Update();
+
+ } else {
+ OverlayComp::Interpret(cmd);
+ }
+
} else if (cmd->IsA(FRONT_CMD) || cmd->IsA(BACK_CMD)) {
Component* edComp = cmd->GetEditor()->GetComponent();
Index: OverlayUnidraw/ovcreator.c
diff -c OverlayUnidraw/ovcreator.c:1.1 OverlayUnidraw/ovcreator.c:1.2
*** OverlayUnidraw/ovcreator.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcreator.c Sat Jan 15 03:53:10 2000
***************
*** 62,67 ****
--- 62,69 ----
ClassId id, istream& in, ObjectMap* objmap, int objid
) {
switch (id) {
+ case PUSH_CMD: CREATE(PushCmd, in, objmap, objid);
+ case PULL_CMD: CREATE(PullCmd, in, objmap, objid);
default: return IdrawCreator::Create(id, in,objmap,objid);
}
}
Index: OverlayUnidraw/ovkit.c
diff -c OverlayUnidraw/ovkit.c:1.1 OverlayUnidraw/ovkit.c:1.2
*** OverlayUnidraw/ovkit.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovkit.c Sat Jan 15 03:53:10 2000
***************
*** 892,897 ****
--- 892,903 ----
MakeMenu(mbi, new BackCmd(new ControlInfo("Send to Back",
KLBL_BACK, CODE_BACK)),
"Send to Back ");
+ MakeMenu(mbi, new PullCmd(new ControlInfo("Pull Up One"
+ )),
+ "Pull Up One ");
+ MakeMenu(mbi, new PushCmd(new ControlInfo("Push Down One"
+ )),
+ "Push Down One ");
return mbi;
}
|
|
From: <ivt...@li...> - 2000-01-15 12:27:33
|
Patch: ivtools-000115-jgautier-001
For: ivtools-0.7.10
Author: jga...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
This patch adds Pull/Push By One Commands to the Structure menu in drawtool,
also making them available to any OverlayUnidraw based program.
The Back and Front Commands are Executed by being Interpreted first by the
selected Components which add themselves to the Command's Clipboard in
GraphicComp::Interpret (grcomp.c); then their Execute methods get the
Editor's Component to Interpret the Command if the Clipboard is not empty,
and that composite Component modifies the position in the comp tree
(GraphicComps::Interpret).
To implement the Pull/Push By One Commands in OverlayUnidraw we subclass them
from Back and Front Commands respectively. The Execute/Unexecute methods are
identical and thus inherited from their respective base classes (the proto-
typical methods for a Command that is Interpreted by the selected Component
and by the top level Editor's Component.) The subclassed IsA/GetId methods
enable the "add self to clipboard" behavior of Front/Back in GraphicComp::
Interpret; the actual Pull/Push are interpreted in OverlaysComp::Interpret,
carefully placed before the Front/Back so that the more specific one takes
effect. Checking for the end of the list with !Done(j) avoids segfault.
Index: OverlayUnidraw/ovclasses.h
diff -c OverlayUnidraw/ovclasses.h:1.1 OverlayUnidraw/ovclasses.h:1.2
*** OverlayUnidraw/ovclasses.h:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovclasses.h Sat Jan 15 03:53:09 2000
***************
*** 91,96 ****
--- 91,98 ----
#define OVPRECISEROTATE_CMD 2058
#define OVPRECISEPAGE_CMD 2059
#define OVPRECISEBRUSH_CMD 2060
+ #define PUSH_CMD 2061
+ #define PULL_CMD 2062
#define OVERLAY_COMP 2150
#define OVERLAYS_COMP 2151
Index: OverlayUnidraw/ovcmds.c
diff -c OverlayUnidraw/ovcmds.c:1.1 OverlayUnidraw/ovcmds.c:1.2
*** OverlayUnidraw/ovcmds.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcmds.c Sat Jan 15 03:53:10 2000
***************
*** 1507,1509 ****
--- 1507,1537 ----
}
}
}
+
+ /*****************************************************************************/
+
+ ClassId PushCmd::GetClassId () { return PUSH_CMD; }
+ boolean PushCmd::IsA (ClassId id) { return PUSH_CMD==id || BackCmd::IsA(id);}
+
+ PushCmd::PushCmd (ControlInfo* c) : BackCmd(c) { }
+ PushCmd::PushCmd (Editor* ed) : BackCmd(ed) { }
+
+ Command* PushCmd::Copy () {
+ Command* copy = new PushCmd(CopyControlInfo());
+ InitCopy(copy);
+ return copy;
+ }
+
+ /*****************************************************************************/
+
+ ClassId PullCmd::GetClassId () { return PULL_CMD; }
+ boolean PullCmd::IsA (ClassId id) { return PULL_CMD==id || FrontCmd::IsA(id);}
+
+ PullCmd::PullCmd (ControlInfo* c) : FrontCmd(c) { }
+ PullCmd::PullCmd (Editor* ed) : FrontCmd(ed) { }
+
+ Command* PullCmd::Copy () {
+ Command* copy = new PullCmd(CopyControlInfo());
+ InitCopy(copy);
+ return copy;
+ }
Index: OverlayUnidraw/ovcmds.h
diff -c OverlayUnidraw/ovcmds.h:1.1 OverlayUnidraw/ovcmds.h:1.2
*** OverlayUnidraw/ovcmds.h:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcmds.h Sat Jan 15 03:53:10 2000
***************
*** 401,404 ****
--- 401,426 ----
int& ni, int*& ix, int*& iy);
};
+ //: command to push down one level in the graphical structure
+ class PushCmd : public BackCmd {
+ public:
+ PushCmd(ControlInfo*);
+ PushCmd(Editor* = nil);
+
+ virtual Command* Copy();
+ virtual ClassId GetClassId();
+ virtual boolean IsA(ClassId);
+ };
+
+ //: command to pull up one level in the graphical structure
+ class PullCmd : public FrontCmd {
+ public:
+ PullCmd(ControlInfo*);
+ PullCmd(Editor* = nil);
+
+ virtual Command* Copy();
+ virtual ClassId GetClassId();
+ virtual boolean IsA(ClassId);
+ };
+
#endif
Index: OverlayUnidraw/ovcomps.c
diff -c OverlayUnidraw/ovcomps.c:1.1 OverlayUnidraw/ovcomps.c:1.2
*** OverlayUnidraw/ovcomps.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcomps.c Sat Jan 15 03:53:10 2000
***************
*** 604,609 ****
--- 604,649 ----
cmd->GetClipboard()->Append(this);
}
+ } else if (cmd->IsA(PUSH_CMD) || cmd->IsA(PULL_CMD)) {
+ Component* edComp = cmd->GetEditor()->GetComponent();
+
+ if (edComp == (Component*) this) {
+ Clipboard* cb = cmd->GetClipboard();
+ Iterator i;
+
+ if (cmd->IsA(PULL_CMD)) {
+ for (cb->First(i); !cb->Done(i); cb->Next(i)) {
+ OverlayComp* comp = (OverlayComp*)cb->GetComp(i);
+ Iterator j;
+ SetComp(comp, j);
+ Next(j);
+ StorePosition(comp, cmd);
+ if (!Done(j)) {
+ Remove(comp);
+ InsertAfter(j, comp);
+ }
+ }
+
+ } else {
+ for (cb->Last(i); !cb->Done(i); cb->Prev(i)) {
+ OverlayComp* comp = (OverlayComp*) cb->GetComp(i);
+ Iterator j;
+ SetComp(comp, j);
+ Prev(j);
+ StorePosition(comp, cmd);
+ if (!Done(j)) {
+ Remove(comp);
+ InsertBefore(j, comp);
+ }
+ }
+ }
+ Notify();
+ unidraw->Update();
+
+ } else {
+ OverlayComp::Interpret(cmd);
+ }
+
} else if (cmd->IsA(FRONT_CMD) || cmd->IsA(BACK_CMD)) {
Component* edComp = cmd->GetEditor()->GetComponent();
Index: OverlayUnidraw/ovcreator.c
diff -c OverlayUnidraw/ovcreator.c:1.1 OverlayUnidraw/ovcreator.c:1.2
*** OverlayUnidraw/ovcreator.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovcreator.c Sat Jan 15 03:53:10 2000
***************
*** 62,67 ****
--- 62,69 ----
ClassId id, istream& in, ObjectMap* objmap, int objid
) {
switch (id) {
+ case PUSH_CMD: CREATE(PushCmd, in, objmap, objid);
+ case PULL_CMD: CREATE(PullCmd, in, objmap, objid);
default: return IdrawCreator::Create(id, in,objmap,objid);
}
}
Index: OverlayUnidraw/ovkit.c
diff -c OverlayUnidraw/ovkit.c:1.1 OverlayUnidraw/ovkit.c:1.2
*** OverlayUnidraw/ovkit.c:1.1 Fri Jan 14 00:17:26 2000
--- src/OverlayUnidraw/ovkit.c Sat Jan 15 03:53:10 2000
***************
*** 877,882 ****
--- 877,888 ----
MakeMenu(mbi, new BackCmd(new ControlInfo("Send to Back",
KLBL_BACK, CODE_BACK)),
"Send to Back ");
+ MakeMenu(mbi, new PullCmd(new ControlInfo("Pull Up One"
+ )),
+ "Pull Up One ");
+ MakeMenu(mbi, new PushCmd(new ControlInfo("Push Down One"
+ )),
+ "Push Down One ");
return mbi;
}
|
|
From: <ivt...@li...> - 2000-01-14 22:21:30
|
Patch: ivtools-000114-johnston-010
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- fix problem with nested parens in post-evaluated expressions. Now
commands like these work:
posteval((1+2)*3)
cond((1+2)*3 1 0)
The problem originated when for some reason the underlying parser was
modified to spew a Blank whenever it popped an empty paren pair from
the parser stack. Doing that made something, I don't recall what, and
could be useful in the future for representing n-depth streams by
nested parens (i.e. ((1,2,3),(3,4,5),(5,6,7)) could be a 3x3 pixmap
(or a list of 3 rgb values).
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.4 ComTerp/comterp.c:1.5
*** ComTerp/comterp.c:1.4 Sat Jan 15 02:02:49 2000
--- src/ComTerp/comterp.c Sat Jan 15 02:02:49 2000
***************
*** 313,319 ****
push_stack(argoffval);
}
}
! push_stack(_pfcomvals[offset]);
}
tokcnt--;
offset++;
--- 313,320 ----
push_stack(argoffval);
}
}
! if (!_pfcomvals[offset].is_blank())
! push_stack(_pfcomvals[offset]);
}
tokcnt--;
offset++;
***************
*** 374,379 ****
--- 375,385 ----
} else if (curr.is_type(ComValue::UnknownType)) {
cerr << "unexpected unknown found by ComTerp::skip_arg\n";
return false;
+ } else if (curr.is_type(ComValue::BlankType)) {
+ offset--;
+ boolean val = skip_arg(topval, offset, tokcnt);
+ tokcnt++;
+ return val;
} else {
offset--;
tokcnt++;
***************
*** 394,400 ****
} else if (next.is_type(ComValue::BlankType)) {
offset--;
skip_arg(topval, offset, subtokcnt);
! tokcnt += subtokcnt;
} else {
offset--;
tokcnt++;
--- 400,406 ----
} else if (next.is_type(ComValue::BlankType)) {
offset--;
skip_arg(topval, offset, subtokcnt);
! tokcnt += subtokcnt+1;
} else {
offset--;
tokcnt++;
Index: flipbook/Imakefile
diff -c flipbook/Imakefile:1.2 flipbook/Imakefile:1.3
*** flipbook/Imakefile:1.2 Sat Jan 15 02:03:07 2000
--- src/flipbook/Imakefile Sat Jan 15 02:03:07 2000
***************
*** 47,53 ****
#define Obj(file) MakeObjectFromSrcFlags(file,)
Obj(main)
- Obj(malloc)
IncludeDependencies()
--- 47,52 ----
Index: include_interviews/color.h
diff -c include_interviews/color.h:1.2 include_interviews/color.h:1.3
*** include_interviews/color.h:1.2 Sat Jan 15 02:03:13 2000
--- src/include/InterViews/color.h Sat Jan 15 02:03:13 2000
***************
*** 39,46 ****
typedef unsigned int ColorOp;
//: an RGB-alpha color object
! // defines an output color, which is specified by a mix of RGB (red,<BR>
! green, and blue) intensities, and an alpha value for blending
// <p><a href=../refman3.1/refman.html#PAGE38>in reference manual</a>.
class Color : public Resource {
public:
--- 39,46 ----
typedef unsigned int ColorOp;
//: an RGB-alpha color object
! // defines an output color, which is specified by a mix of RGB (red,
! // green, and blue) intensities, and an alpha value for blending
// <p><a href=../refman3.1/refman.html#PAGE38>in reference manual</a>.
class Color : public Resource {
public:
|
|
From: <ivt...@li...> - 2000-01-14 22:20:50
|
Patch: ivtools-000114-johnston-009
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- established half the links from the embedded extractable
documentation to the pre-existing man pages for Unidraw.
Index: include_interviews/page.h
diff -c include_interviews/page.h:1.1 include_interviews/page.h:1.2
*** include_interviews/page.h:1.1 Fri Jan 14 22:58:14 2000
--- src/include/InterViews/page.h Fri Jan 14 22:58:14 2000
***************
*** 33,38 ****
--- 33,40 ----
class PageInfo_List;
+ //: glyph for arbitrary placements
+ // <a href=../man3.1/Page.html>man page</a>
class Page : public Glyph {
public:
Page(Glyph* background);
Index: include_interviews/resource.h
diff -c include_interviews/resource.h:1.2 include_interviews/resource.h:1.3
*** include_interviews/resource.h:1.2 Fri Jan 14 22:58:14 2000
--- src/include/InterViews/resource.h Fri Jan 14 22:58:14 2000
***************
*** 32,38 ****
#include <InterViews/enter-scope.h>
//: shared reference-counted objects.
! // <a href=../man3.1/Resource.html>Resource</a>
class Resource {
public:
Resource();
--- 32,38 ----
#include <InterViews/enter-scope.h>
//: shared reference-counted objects.
! // <a href=../man3.1/Resource.html>man page</a>
class Resource {
public:
Resource();
Index: include_unidraw/clipboard.h
diff -c include_unidraw/clipboard.h:1.1 include_unidraw/clipboard.h:1.2
*** include_unidraw/clipboard.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/clipboard.h Fri Jan 14 22:58:17 2000
***************
*** 37,42 ****
--- 37,44 ----
class UList;
class Selection;
+ //: contains a list of component subjects
+ // <a href=../man3.1/Clipboard.html>man page</a>
class Clipboard {
public:
Clipboard(GraphicComp* = nil);
Index: include_unidraw/creator.h
diff -c include_unidraw/creator.h:1.1 include_unidraw/creator.h:1.2
*** include_unidraw/creator.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/creator.h Fri Jan 14 22:58:17 2000
***************
*** 39,44 ****
--- 39,46 ----
class ObjectMap;
class istream;
+ //: component factory class
+ // <a href=../man3.1/Creator.html>man page</a>
class Creator {
public:
Creator();
Index: include_unidraw/ctrlinfo.h
diff -c include_unidraw/ctrlinfo.h:1.1 include_unidraw/ctrlinfo.h:1.2
*** include_unidraw/ctrlinfo.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/ctrlinfo.h Fri Jan 14 22:58:17 2000
***************
*** 34,39 ****
--- 34,41 ----
class GraphicComp;
+ //: manages persistent information contained in a Control
+ // <a href=../man3.1/ControlInfo.html>man page</a>
class ControlInfo {
public:
ControlInfo(
Index: include_unidraw/editorinfo.h
diff -c include_unidraw/editorinfo.h:1.1 include_unidraw/editorinfo.h:1.2
*** include_unidraw/editorinfo.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/editorinfo.h Fri Jan 14 22:58:17 2000
***************
*** 32,37 ****
--- 32,39 ----
#include <InterViews/_enter.h>
+ //: manages persistent information contained in an editor
+ // <a href=../man3.1/EditorInfo.html>man page</a>
class EditorInfo : public UMap {
public:
EditorInfo();
Index: include_unidraw/grid.h
diff -c include_unidraw/grid.h:1.1 include_unidraw/grid.h:1.2
*** include_unidraw/grid.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/grid.h Fri Jan 14 22:58:17 2000
***************
*** 35,40 ****
--- 35,44 ----
class Graphic;
+ //: drawing editor grid
+ // constrains points to lie on a grid and provides a corresponding
+ // visual representation of the grid.
+ // <p><a href=../man3.1/Grid.html>man page</a>
class Grid {
public:
Grid(float w, float h, float xincr, float yincr);
Index: include_unidraw/keymap.h
diff -c include_unidraw/keymap.h:1.1 include_unidraw/keymap.h:1.2
*** include_unidraw/keymap.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/keymap.h Fri Jan 14 22:58:17 2000
***************
*** 31,36 ****
--- 31,38 ----
class UControl;
+ //: maintains a keycode-to-UControl mapping
+ // <a href=../man3.1/KeyMap.html>man page</a>
class KeyMap {
public:
KeyMap();
Index: include_unidraw/path.h
diff -c include_unidraw/path.h:1.1 include_unidraw/path.h:1.2
*** include_unidraw/path.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/path.h Fri Jan 14 22:58:17 2000
***************
*** 38,43 ****
--- 38,47 ----
class Connector;
class UList;
+ //: transmission path for state variable propogation
+ // accumulates information about the transmission path during
+ // state variable propagation.
+ // <p><a href=../man3.1/Path.html>man page</a>
class Path {
public:
Path(Path* = nil);
Index: include_unidraw/selection.h
diff -c include_unidraw/selection.h:1.1 include_unidraw/selection.h:1.2
*** include_unidraw/selection.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/selection.h Fri Jan 14 22:58:17 2000
***************
*** 38,43 ****
--- 38,45 ----
class UList;
class Viewer;
+ //: manages a set of selected components.
+ // <a href=../man3.1/Selection.html>man page</a>
class Selection {
public:
Selection(Selection* = nil);
Index: include_unidraw/statevar.h
diff -c include_unidraw/statevar.h:1.1 include_unidraw/statevar.h:1.2
*** include_unidraw/statevar.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/statevar.h Fri Jan 14 22:58:17 2000
***************
*** 34,39 ****
--- 34,41 ----
class istream;
class ostream;
+ //: state variable
+ // <a href=../man3.1/StateVar.html>man page</a>
class StateVar {
public:
Connector* GetBinding();
Index: include_unidraw/stateview.h
diff -c include_unidraw/stateview.h:1.1 include_unidraw/stateview.h:1.2
*** include_unidraw/stateview.h:1.1 Fri Jan 14 22:58:17 2000
--- src/include/Unidraw/stateview.h Fri Jan 14 22:58:17 2000
***************
*** 34,39 ****
--- 34,41 ----
class StateVar;
+ //: state variable view
+ // <a href=../man3.1/StateVarView.html>man page</a>
class StateVarView : public MonoScene {
public:
virtual ~StateVarView();
Index: include_commands/brushcmd.h
diff -c include_commands/brushcmd.h:1.1 include_commands/brushcmd.h:1.2
*** include_commands/brushcmd.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/brushcmd.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,38 ----
class PSBrush;
+ //: command to change brush of editor and current selection
+ // <a href=../man3.1/BrushCmd.html>man page</a>
class BrushCmd : public Command {
public:
BrushCmd(ControlInfo*, PSBrush* = nil);
Index: include_commands/colorcmd.h
diff -c include_commands/colorcmd.h:1.1 include_commands/colorcmd.h:1.2
*** include_commands/colorcmd.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/colorcmd.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,38 ----
class PSColor;
+ //: command to change color of current selection and editor
+ // <a href=../man3.1/ColorCmd.html>man page</a>
class ColorCmd : public Command {
public:
ColorCmd(ControlInfo*, PSColor* fg = nil, PSColor* bg = nil);
Index: include_commands/data.h
diff -c include_commands/data.h:1.1 include_commands/data.h:1.2
*** include_commands/data.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/data.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,40 ----
#include <InterViews/resource.h>
#include <Unidraw/enter-scope.h>
+ //: undo information object
+ // encapsulates undo information that components store in commands they
+ // interpret.
+ // <p><a href=../man3.1/Data.html>man page</a>
class Data : public Resource {
protected:
Data();
Index: include_commands/font.h
diff -c include_commands/font.h:1.1 include_commands/font.h:1.2
*** include_commands/font.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/font.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,38 ----
class PSFont;
+ //: command for changing font in current selection and editor
+ // <a href=../man3.1/FontCmd.html>man page</a>
class FontCmd : public Command {
public:
FontCmd(ControlInfo*, PSFont* = nil);
Index: include_commands/import.h
diff -c include_commands/import.h:1.1 include_commands/import.h:1.2
*** include_commands/import.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/import.h Fri Jan 14 22:58:19 2000
***************
*** 34,39 ****
--- 34,41 ----
class FileChooser;
+ //: command for importing graphical objects
+ // <a href=../man3.1/ImportCmd.html>man page</a>
class ImportCmd : public Command {
public:
ImportCmd(ControlInfo*, FileChooser* = nil);
Index: include_commands/macro.h
diff -c include_commands/macro.h:1.1 include_commands/macro.h:1.2
*** include_commands/macro.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/macro.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,38 ----
class UList;
+ //: command containing a sequence of other commands to execute
+ // <a href=../man3.1/MacroCmd.html>man page</a>
class MacroCmd : public Command {
public:
MacroCmd(ControlInfo*);
Index: include_commands/nop.h
diff -c include_commands/nop.h:1.1 include_commands/nop.h:1.2
*** include_commands/nop.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/nop.h Fri Jan 14 22:58:19 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Commands/command.h>
+ //: null command
+ // <a href=../man3.1/NOPCmd.html>man page</a>
class NOPCmd : public Command {
public:
NOPCmd(ControlInfo*);
Index: include_commands/patcmd.h
diff -c include_commands/patcmd.h:1.1 include_commands/patcmd.h:1.2
*** include_commands/patcmd.h:1.1 Fri Jan 14 22:58:19 2000
--- src/include/Unidraw/Commands/patcmd.h Fri Jan 14 22:58:19 2000
***************
*** 31,36 ****
--- 31,38 ----
class PSPattern;
+ //: command to change pattern of current selection and editor.
+ // <a href=../man3.1/PatternCmd.html>man page</a>
class PatternCmd : public Command {
public:
PatternCmd(ControlInfo*, PSPattern* = nil);
Index: include_components/cglue.h
diff -c include_components/cglue.h:1.1 include_components/cglue.h:1.2
*** include_components/cglue.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/cglue.h Fri Jan 14 22:58:22 2000
***************
*** 32,37 ****
--- 32,39 ----
class Shape;
+ //: connector glue for specifying connection behavior
+ // <a href=../man3.1/CGlue.html>man page</a>
class CGlue {
public:
CGlue(
Index: include_components/connector.h
diff -c include_components/connector.h:1.1 include_components/connector.h:1.2
*** include_components/connector.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/connector.h Fri Jan 14 22:58:22 2000
***************
*** 37,42 ****
--- 37,44 ----
class Path;
class StateVar;
+ //: for defining and maintaining connectivity between components.
+ // <a href=../man3.1/Connector.html>man page</a>
class Connector : public GraphicComp {
public:
virtual ~Connector();
Index: include_components/csolver.h
diff -c include_components/csolver.h:1.1 include_components/csolver.h:1.2
*** include_components/csolver.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/csolver.h Fri Jan 14 22:58:22 2000
***************
*** 40,45 ****
--- 40,47 ----
class istream;
class ostream;
+ //: connector constraint solver
+ // <a href=../man3.1/CSolver.html>man page</a>
class CSolver {
public:
CSolver();
Index: include_components/ellipse.h
diff -c include_components/ellipse.h:1.1 include_components/ellipse.h:1.2
*** include_components/ellipse.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/ellipse.h Fri Jan 14 22:58:22 2000
***************
*** 35,40 ****
--- 35,42 ----
class SF_Ellipse;
+ //: ellipse component
+ // <a href=../man3.1/EllipseComp>man page</a>
class EllipseComp : public GraphicComp {
public:
EllipseComp(SF_Ellipse* = nil);
Index: include_components/gvupdater.h
diff -c include_components/gvupdater.h:1.1 include_components/gvupdater.h:1.2
*** include_components/gvupdater.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/gvupdater.h Fri Jan 14 22:58:22 2000
***************
*** 34,39 ****
--- 34,43 ----
class GVU_HashTable;
class Iterator;
+ //: GraphicView updater
+ // class for reconciling a GraphicView's state and structure
+ // with its subject's.
+ // <p><a href=../man3.1/GVUpdater.html>man page</a>
class GVUpdater {
public:
GVUpdater(GraphicView*);
Index: include_components/line.h
diff -c include_components/line.h:1.1 include_components/line.h:1.2
*** include_components/line.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/line.h Fri Jan 14 22:58:22 2000
***************
*** 34,39 ****
--- 34,41 ----
class Line;
class SF_MultiLine;
+ //: line component
+ // <a href=../man3.1/LineComp.html>man page</a>
class LineComp : public GraphicComp {
public:
LineComp(Line* = nil);
Index: include_components/link.h
diff -c include_components/link.h:1.1 include_components/link.h:1.2
*** include_components/link.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/link.h Fri Jan 14 22:58:22 2000
***************
*** 36,41 ****
--- 36,43 ----
class Connector;
class Line;
+ //: link component
+ // <a href=../man3.1/LinkComp.html>man page</a>
class LinkComp : public GraphicComp {
public:
LinkComp(Line* = nil);
Index: include_components/pad.h
diff -c include_components/pad.h:1.1 include_components/pad.h:1.2
*** include_components/pad.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/pad.h Fri Jan 14 22:58:22 2000
***************
*** 35,40 ****
--- 35,42 ----
class PadGraphic;
+ //: pad component
+ // <a href=../man3.1/PadComp.html>man page</a>
class PadComp : public Connector {
public:
PadComp(PadGraphic* = nil);
Index: include_components/pin.h
diff -c include_components/pin.h:1.1 include_components/pin.h:1.2
*** include_components/pin.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/pin.h Fri Jan 14 22:58:22 2000
***************
*** 37,42 ****
--- 37,44 ----
class PinGraphic;
+ //: pin component
+ // <a href=../man3.1/PinComp.html>man page</a>
class PinComp : public Connector {
public:
PinComp(PinGraphic* = nil);
Index: include_components/polygon.h
diff -c include_components/polygon.h:1.1 include_components/polygon.h:1.2
*** include_components/polygon.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/polygon.h Fri Jan 14 22:58:22 2000
***************
*** 31,36 ****
--- 31,38 ----
class SF_Polygon;
+ //: polygon component
+ // <a href=../man3.1/PolygonComp.html>man page</a>
class PolygonComp : public VerticesComp {
public:
PolygonComp(SF_Polygon* = nil);
Index: include_components/psview.h
diff -c include_components/psview.h:1.1 include_components/psview.h:1.2
*** include_components/psview.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/psview.h Fri Jan 14 22:58:22 2000
***************
*** 32,37 ****
--- 32,41 ----
#include <IV-2_6/_enter.h>
+ //: PostScript serialization
+ // idraw-compatible PostScript external representation
+ // for graphical components.
+ // <p><a href=../man3.1/POSTSCRIPTVIEW.html>man page</a>
class PostScriptView : public PreorderView {
public:
virtual boolean Emit(ostream&);
Index: include_components/rastercomp.h
diff -c include_components/rastercomp.h:1.1 include_components/rastercomp.h:1.2
*** include_components/rastercomp.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/rastercomp.h Fri Jan 14 22:58:22 2000
***************
*** 33,38 ****
--- 33,40 ----
class RasterRect;
+ //: raster component
+ // <a href=../man3.1/RasterComp.html>man page</a>
class RasterComp : public GraphicComp {
public:
RasterComp(RasterRect* = nil, const char* filename = nil);
Index: include_components/rect.h
diff -c include_components/rect.h:1.1 include_components/rect.h:1.2
*** include_components/rect.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/rect.h Fri Jan 14 22:58:22 2000
***************
*** 35,40 ****
--- 35,42 ----
class SF_Rect;
+ //: rectangle component
+ // <a href=../man3.1/RectComp.html>man page</a>
class RectComp : public GraphicComp {
public:
RectComp(SF_Rect* = nil);
Index: include_components/slot.h
diff -c include_components/slot.h:1.1 include_components/slot.h:1.2
*** include_components/slot.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/slot.h Fri Jan 14 22:58:22 2000
***************
*** 35,40 ****
--- 35,42 ----
class SlotGraphic;
+ //: slot component
+ // <a href=../man3.1/SlotComp.html>man page</a>
class SlotComp : public Connector {
public:
virtual void Interpret(Command*);
Index: include_components/spline.h
diff -c include_components/spline.h:1.1 include_components/spline.h:1.2
*** include_components/spline.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/spline.h Fri Jan 14 22:58:22 2000
***************
*** 32,37 ****
--- 32,39 ----
class SFH_OpenBSpline;
class SFH_ClosedBSpline;
+ //: spline component
+ // <a href=../man3.1/SplineComp.html>man page</a>
class SplineComp : public VerticesComp {
public:
SplineComp(SFH_OpenBSpline* = nil);
Index: include_components/stencilcomp.h
diff -c include_components/stencilcomp.h:1.1 include_components/stencilcomp.h:1.2
*** include_components/stencilcomp.h:1.1 Fri Jan 14 22:58:22 2000
--- src/include/Unidraw/Components/stencilcomp.h Fri Jan 14 22:58:22 2000
***************
*** 33,38 ****
--- 33,40 ----
class UStencil;
+ //: stencil component
+ // <a href=../man3.1/StencilComp.html>man page</a>
class StencilComp : public GraphicComp {
public:
StencilComp(UStencil* = nil, const char* filename = nil);
Index: include_graphic/damage.h
diff -c include_graphic/damage.h:1.1 include_graphic/damage.h:1.2
*** include_graphic/damage.h:1.1 Fri Jan 14 22:58:25 2000
--- src/include/Unidraw/Graphic/damage.h Fri Jan 14 22:58:25 2000
***************
*** 40,45 ****
--- 40,49 ----
class Painter;
class UList;
+ //: damage-repair mechanism
+ // maintains an array of non-overlapping rectangles representing
+ // damaged areas of of a canvas, used for smart redraw.
+ // <p><a href=../man3.1/Damage.html>man page</a>
class Damage {
public:
Damage(Canvas* = nil, Painter* = nil, Graphic* = nil);
Index: include_graphic/graphic.h
diff -c include_graphic/graphic.h:1.1 include_graphic/graphic.h:1.2
*** include_graphic/graphic.h:1.1 Fri Jan 14 22:58:25 2000
--- src/include/Unidraw/Graphic/graphic.h Fri Jan 14 22:58:25 2000
***************
*** 42,47 ****
--- 42,51 ----
class Painter;
class Transformer;
+ //: graphic base-classe
+ // interface to Graphic base class and FullGraphic, a subclass of Graphic
+ // for which all graphics state is defined.
+ // <p><a href=../man3.1/Graphic.html>man page</a>
class Graphic {
public:
virtual ~Graphic();
Index: include_graphic/grblock.h
diff -c include_graphic/grblock.h:1.1 include_graphic/grblock.h:1.2
*** include_graphic/grblock.h:1.1 Fri Jan 14 22:58:25 2000
--- src/include/Unidraw/Graphic/grblock.h Fri Jan 14 22:58:25 2000
***************
*** 37,42 ****
--- 37,44 ----
class Graphic;
class Perspective;
+ //: an Interactor that contains a Picture.
+ // <a href=../man3.1/GraphicBlock.html>man page</a>
class GraphicBlock : public Interactor {
public:
GraphicBlock(
Index: include_graphic/picture.h
diff -c include_graphic/picture.h:1.1 include_graphic/picture.h:1.2
*** include_graphic/picture.h:1.1 Fri Jan 14 22:58:25 2000
--- src/include/Unidraw/Graphic/picture.h Fri Jan 14 22:58:25 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <IV-2_6/_enter.h>
+ //: composite Graphic
+ // <a href=../man3.1/Picture.html>man page</a>
class Picture : public FullGraphic {
public:
Picture(Graphic* gr = nil);
Index: include_graphic/rasterrect.h
diff -c include_graphic/rasterrect.h:1.1 include_graphic/rasterrect.h:1.2
*** include_graphic/rasterrect.h:1.1 Fri Jan 14 22:58:25 2000
--- src/include/Unidraw/Graphic/rasterrect.h Fri Jan 14 22:58:25 2000
***************
*** 33,38 ****
--- 33,40 ----
class Raster;
+ //: raster graphic
+ // <a href=../man3.1/RasterRect.html>man page</a>
class RasterRect : public Graphic {
public:
RasterRect(Raster*, Graphic* = nil);
Index: include_tools/connect.h
diff -c include_tools/connect.h:1.1 include_tools/connect.h:1.2
*** include_tools/connect.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/connect.h Fri Jan 14 22:58:27 2000
***************
*** 31,36 ****
--- 31,38 ----
class ConnectorView;
+ //: connect tool
+ // <a href=../man3.1/ConnectTool.html>man page</a>
class ConnectTool : public Tool {
public:
ConnectTool(ControlInfo* = nil);
Index: include_tools/grcomptool.h
diff -c include_tools/grcomptool.h:1.1 include_tools/grcomptool.h:1.2
*** include_tools/grcomptool.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/grcomptool.h Fri Jan 14 22:58:27 2000
***************
*** 32,37 ****
--- 32,39 ----
class Command;
class GraphicComp;
+ //: graphic component tool
+ // <a href=../man3.1/GraphicCompTool.html>man page</a>
class GraphicCompTool : public Tool {
public:
GraphicCompTool();
Index: include_tools/magnify.h
diff -c include_tools/magnify.h:1.1 include_tools/magnify.h:1.2
*** include_tools/magnify.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/magnify.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: zoom in to specified region
+ // <a href=../man3.1/MagnifyTool.html>man page</a>
class MagnifyTool : public Tool {
public:
MagnifyTool(ControlInfo* = nil);
Index: include_tools/move.h
diff -c include_tools/move.h:1.1 include_tools/move.h:1.2
*** include_tools/move.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/move.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: tool for moving graphics
+ // <a href=../man3.1/MoveTool.html>man page</a>
class MoveTool : public Tool {
public:
MoveTool(ControlInfo* = nil);
Index: include_tools/reshape.h
diff -c include_tools/reshape.h:1.1 include_tools/reshape.h:1.2
*** include_tools/reshape.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/reshape.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: reshape tool
+ // <a href=../man3.1/ReshapeTool.html>man page</a>
class ReshapeTool : public Tool {
public:
ReshapeTool(ControlInfo* = nil);
Index: include_tools/rotate.h
diff -c include_tools/rotate.h:1.1 include_tools/rotate.h:1.2
*** include_tools/rotate.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/rotate.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: rotate tool
+ // <a href=../man3.1/RotateTool.html>man page</a>
class RotateTool : public Tool {
public:
RotateTool(ControlInfo* = nil);
Index: include_tools/scale.h
diff -c include_tools/scale.h:1.1 include_tools/scale.h:1.2
*** include_tools/scale.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/scale.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: scale tool
+ // <a href=../man3.1/ScaleTool.html>man page</a>
class ScaleTool : public Tool {
public:
ScaleTool(ControlInfo* = nil);
Index: include_tools/select.h
diff -c include_tools/select.h:1.1 include_tools/select.h:1.2
*** include_tools/select.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/select.h Fri Jan 14 22:58:27 2000
***************
*** 31,36 ****
--- 31,38 ----
class Selection;
+ //: select tool
+ // <a href=../man3.1/SelectTool.html>man page</a>
class SelectTool : public Tool {
public:
SelectTool(ControlInfo* = nil);
Index: include_tools/stretch.h
diff -c include_tools/stretch.h:1.1 include_tools/stretch.h:1.2
*** include_tools/stretch.h:1.1 Fri Jan 14 22:58:27 2000
--- src/include/Unidraw/Tools/stretch.h Fri Jan 14 22:58:27 2000
***************
*** 29,34 ****
--- 29,36 ----
#include <Unidraw/Tools/tool.h>
+ //: stretch tool
+ // <a href=../man3.1/StretchTool.html>man page</a>
class StretchTool : public Tool {
public:
StretchTool(ControlInfo* = nil);
|
|
From: <ivt...@li...> - 2000-01-14 22:20:35
|
Patch: ivtools-000114-johnston-008
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- add links from inline extractable class documentation to the
pre-existing man pages of InterViews 3.1 (and InterViews 2.6)
Index: include_iviv-2_6/banner.h
diff -c include_iviv-2_6/banner.h:1.1 include_iviv-2_6/banner.h:1.2
*** include_iviv-2_6/banner.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/banner.h Fri Jan 14 21:02:47 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: one line title bar (iv-2.6
+ // <a href=../man3.1/Banner.html>man page</a>
class Banner : public Interactor {
public:
char* left;
Index: include_iviv-2_6/border.h
diff -c include_iviv-2_6/border.h:1.1 include_iviv-2_6/border.h:1.2
*** include_iviv-2_6/border.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/border.h Fri Jan 14 21:02:47 2000
***************
*** 33,39 ****
#include <IV-2_6/_enter.h>
! //: line of a given thickness (iv-2.6)
// <a href=../man3.1/Border.html>man page</a>
class Border : public Interactor {
protected:
--- 33,39 ----
#include <IV-2_6/_enter.h>
! //: infinitely stretchable dividing line (iv-2.6)
// <a href=../man3.1/Border.html>man page</a>
class Border : public Interactor {
protected:
Index: include_iviv-2_6/box.h
diff -c include_iviv-2_6/box.h:1.1 include_iviv-2_6/box.h:1.2
*** include_iviv-2_6/box.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/box.h Fri Jan 14 21:02:47 2000
***************
*** 36,41 ****
--- 36,43 ----
class BoxElement;
class BoxCanonical;
+ //: used to compose side-by-side (iv-2.6)
+ // <a href=../man3.1/Box2_6.html>man page</a>
class Box : public Scene {
public:
virtual ~Box();
Index: include_iviv-2_6/button.h
diff -c include_iviv-2_6/button.h:1.1 include_iviv-2_6/button.h:1.2
*** include_iviv-2_6/button.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/button.h Fri Jan 14 21:02:47 2000
***************
*** 57,62 ****
--- 57,66 ----
void Modify(void*);
};
+ //: button object (iv-2_6)
+ // A button is a view of some value that is normally set when
+ // the button is pressed.
+ // <p><a href=../man3.1/Button2_6.html>man page</a>
class Button : public Interactor {
public:
void Attach(Button*);
Index: include_iviv-2_6/compeditor.h
diff -c include_iviv-2_6/compeditor.h:1.1 include_iviv-2_6/compeditor.h:1.2
*** include_iviv-2_6/compeditor.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/compeditor.h Fri Jan 14 21:02:47 2000
***************
*** 35,40 ****
--- 35,42 ----
const char CEComplete = ' ';
+ //: string-editor with completion (iv-2_6)
+ // <p><a href=../man3.1/CompletionEditor.html>man page</a>
class CompletionEditor : public StringEditor {
public:
CompletionEditor(ButtonState*, const char* samp, const char* = SEDone);
Index: include_iviv-2_6/control.h
diff -c include_iviv-2_6/control.h:1.1 include_iviv-2_6/control.h:1.2
*** include_iviv-2_6/control.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/control.h Fri Jan 14 21:02:47 2000
***************
*** 38,43 ****
--- 38,45 ----
class Control;
class ControlState;
+ //: provide an interface to selecting and executing some action (iv-2.6)
+ // <a href=../man3.1/Control.html>man page</a>
class Control : public MonoScene {
public:
Control(Interactor*);
Index: include_iviv-2_6/deck.h
diff -c include_iviv-2_6/deck.h:1.1 include_iviv-2_6/deck.h:1.2
*** include_iviv-2_6/deck.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/deck.h Fri Jan 14 21:02:47 2000
***************
*** 35,40 ****
--- 35,42 ----
class Card;
+ //: a Scene for stacking one or more Interactor (iv-2.6)
+ // <a href=../man3.1/Deck2_6.html>man page</a>
class Deck : public Scene {
public:
Deck();
Index: include_iviv-2_6/dialog.h
diff -c include_iviv-2_6/dialog.h:1.1 include_iviv-2_6/dialog.h:1.2
*** include_iviv-2_6/dialog.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/dialog.h Fri Jan 14 21:02:47 2000
***************
*** 35,40 ****
--- 35,42 ----
class ButtonState;
+ //: a simple dialog box input handler (iv-2.6)
+ // <a href=../man3.1/Dialog.html>man page</a>
class Dialog : public MonoScene {
public:
Dialog(ButtonState*, Interactor*, Alignment = Center);
Index: include_iviv-2_6/filebrowser.h
diff -c include_iviv-2_6/filebrowser.h:1.1 include_iviv-2_6/filebrowser.h:1.2
*** include_iviv-2_6/filebrowser.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/filebrowser.h Fri Jan 14 21:02:47 2000
***************
*** 36,41 ****
--- 36,43 ----
class FBDirectory;
class Regexp;
+ //: a StringBrowser that displays file names (iv-2.6)
+ // <a href=../man3.1/FileBrowser.html>man page</a>
class FileBrowser : public StringBrowser {
public:
FileBrowser(
Index: include_iviv-2_6/filechooser.h
diff -c include_iviv-2_6/filechooser.h:1.1 include_iviv-2_6/filechooser.h:1.2
*** include_iviv-2_6/filechooser.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/filechooser.h Fri Jan 14 21:02:47 2000
***************
*** 40,45 ****
--- 40,47 ----
#undef FileChooser
#define FileChooser _lib_iv2_6(FileChooser)
+ //: a StringChooser for choosing files from a directory (iv-2.6)
+ // <a href=../man3.1/FileChooser.html>man page</a>
class FileChooser : public StringChooser {
public:
FileChooser(
Index: include_iviv-2_6/frame.h
diff -c include_iviv-2_6/frame.h:1.1 include_iviv-2_6/frame.h:1.2
*** include_iviv-2_6/frame.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/frame.h Fri Jan 14 21:02:47 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: surrounds another Interactor (iv-2.6)
+ // <a href=../man3.1/Frame.html>man page</a>
class Frame : public MonoScene {
public:
Frame(Interactor* = nil, int width = 1);
Index: include_iviv-2_6/glue.h
diff -c include_iviv-2_6/glue.h:1.1 include_iviv-2_6/glue.h:1.2
*** include_iviv-2_6/glue.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/glue.h Fri Jan 14 21:02:47 2000
***************
*** 34,39 ****
--- 34,41 ----
#include <IV-2_6/_enter.h>
+ //: variable spacing between interactors (iv-2.6)
+ // <a href=../man3.1/Glue2_6.html>man page</a>
class Glue : public Interactor {
protected:
Glue();
Index: include_iviv-2_6/interactor.h
diff -c include_iviv-2_6/interactor.h:1.1 include_iviv-2_6/interactor.h:1.2
*** include_iviv-2_6/interactor.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/interactor.h Fri Jan 14 21:02:47 2000
***************
*** 60,65 ****
--- 60,67 ----
CanvasSaveUnder, CanvasSaveContents, CanvasSaveBoth
};
+ //: base class for interactive objects (iv-2.6)
+ // <a href=../man3.1/Interactor.html>man page</a>
class Interactor : public Glyph {
protected:
Interactor();
Index: include_iviv-2_6/matcheditor.h
diff -c include_iviv-2_6/matcheditor.h:1.1 include_iviv-2_6/matcheditor.h:1.2
*** include_iviv-2_6/matcheditor.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/matcheditor.h Fri Jan 14 21:02:47 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: StringEditor with pattern matching.
+ // <a href=../man3.1/MatchEditor>man page</a>
class MatchEditor : public StringEditor {
public:
MatchEditor(ButtonState*, const char* sample, const char* done = SEDone);
Index: include_iviv-2_6/menu.h
diff -c include_iviv-2_6/menu.h:1.1 include_iviv-2_6/menu.h:1.2
*** include_iviv-2_6/menu.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/menu.h Fri Jan 14 21:02:47 2000
***************
*** 48,53 ****
--- 48,55 ----
void Init();
};
+ //: menu derived from Control (iv-2.6)
+ // <a href=../man3.1/Menu2_6.html>man page</a>
class Menu : public Control {
public:
Menu(Interactor*);
Index: include_iviv-2_6/message.h
diff -c include_iviv-2_6/message.h:1.1 include_iviv-2_6/message.h:1.2
*** include_iviv-2_6/message.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/message.h Fri Jan 14 21:02:47 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: display a string of text (iv-2.6).
+ // <a href=../man3.1/Message.html>man page</a>
class Message : public Interactor {
public:
Message(
Index: include_iviv-2_6/painter.h
diff -c include_iviv-2_6/painter.h:1.1 include_iviv-2_6/painter.h:1.2
*** include_iviv-2_6/painter.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/painter.h Fri Jan 14 21:02:47 2000
***************
*** 47,52 ****
--- 47,54 ----
class Bitmap;
class Raster;
+ //: graphics rendering interface (iv-2.6)
+ // <a href=../man3.1/Painter.html>man page</a>
class Painter : public Resource {
public:
Painter();
Index: include_iviv-2_6/panner.h
diff -c include_iviv-2_6/panner.h:1.1 include_iviv-2_6/panner.h:1.2
*** include_iviv-2_6/panner.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/panner.h Fri Jan 14 21:02:47 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: an Interactor for two-dimensional scrolling and zooming (iv-2.6)
+ // <a href=../man3.1/Panner.html>man page</a>
class Panner : public MonoScene {
public:
Panner(Interactor*, int size = 0);
Index: include_iviv-2_6/perspective.h
diff -c include_iviv-2_6/perspective.h:1.1 include_iviv-2_6/perspective.h:1.2
*** include_iviv-2_6/perspective.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/perspective.h Fri Jan 14 21:02:47 2000
***************
*** 39,44 ****
--- 39,48 ----
class Interactor;
class ViewList;
+ //: indicates portion of total view shown (iv-2.6).
+ // A Perspective describes what portion of the total view
+ // an Interactor shows.
+ // <p><a href=../man3.1/Perspective.html>man page</a>
class Perspective : public Resource {
public:
IntCoord x0, y0; /* origin of view */
Index: include_iviv-2_6/rubband.h
diff -c include_iviv-2_6/rubband.h:1.1 include_iviv-2_6/rubband.h:1.2
*** include_iviv-2_6/rubband.h:1.1 Fri Jan 14 21:02:47 2000
--- src/include/IV-2_6/InterViews/rubband.h Fri Jan 14 21:02:47 2000
***************
*** 49,54 ****
--- 49,56 ----
class Canvas;
class Painter;
+ //: rubberbanding graphical objects (iv-2.6)
+ // <a href=../man3.1/Rubband.html>man page</a>
class Rubberband : public Resource {
public:
Rubberband(Painter*, Canvas*, IntCoord offx, IntCoord offy);
Index: include_iviv-2_6/scene.h
diff -c include_iviv-2_6/scene.h:1.1 include_iviv-2_6/scene.h:1.2
*** include_iviv-2_6/scene.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/scene.h Fri Jan 14 21:02:48 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: basic composite object for interaction.
+ // <a href=../man3.1/Scene.html>man page</a>
class Scene : public Interactor {
protected:
Scene();
Index: include_iviv-2_6/scroller.h
diff -c include_iviv-2_6/scroller.h:1.1 include_iviv-2_6/scroller.h:1.2
*** include_iviv-2_6/scroller.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/scroller.h Fri Jan 14 21:02:48 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <IV-2_6/_enter.h>
+ //: general scrolling interface (iv-2.6)
+ // <a href=../man3.1/Scroller.html>man page</a>
class Scroller : public Interactor {
protected:
Interactor* interactor;
Index: include_iviv-2_6/sensor.h
diff -c include_iviv-2_6/sensor.h:1.1 include_iviv-2_6/sensor.h:1.2
*** include_iviv-2_6/sensor.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/sensor.h Fri Jan 14 21:02:48 2000
***************
*** 37,42 ****
--- 37,44 ----
class Interactor;
class InteractorWindow;
+ //: describe input events of interest (iv-2.6)
+ // <a href=../man3.1/Sensor.html>man page</a>
class Sensor : virtual public Resource {
public:
Sensor();
Index: include_iviv-2_6/shape.h
diff -c include_iviv-2_6/shape.h:1.1 include_iviv-2_6/shape.h:1.2
*** include_iviv-2_6/shape.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/shape.h Fri Jan 14 21:02:48 2000
***************
*** 34,39 ****
--- 34,41 ----
static const int hfil = 1000000;
static const int vfil = 1000000;
+ //: for defining "infinite" stretchability or shrinkability (iv-2.6)
+ // <a href=../man3.1/Shape.html>man page</a>
class Shape {
public:
int width, height; /* natural dimensions */
Index: include_iviv-2_6/strbrowser.h
diff -c include_iviv-2_6/strbrowser.h:1.1 include_iviv-2_6/strbrowser.h:1.2
*** include_iviv-2_6/strbrowser.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/strbrowser.h Fri Jan 14 21:02:48 2000
***************
*** 56,61 ****
--- 56,63 ----
class ButtonState;
class TextDisplay;
+ //: for choosing from list of strings (iv-2.6)
+ // <a href=../man3.1/StrBrowser.html>man page</a>
class StringBrowser : public Interactor {
public:
StringBrowser(
Index: include_iviv-2_6/strchooser.h
diff -c include_iviv-2_6/strchooser.h:1.1 include_iviv-2_6/strchooser.h:1.2
*** include_iviv-2_6/strchooser.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/strchooser.h Fri Jan 14 21:02:48 2000
***************
*** 37,42 ****
--- 37,44 ----
class StringBrowser;
class StringEditor;
+ //: dialog box for choosing from list of strings (iv-2.6)
+ // <a href=../man3.1/StrChooser.html>man page</a>
class StringChooser : public Dialog {
public:
StringChooser(
Index: include_iviv-2_6/streditor.h
diff -c include_iviv-2_6/streditor.h:1.1 include_iviv-2_6/streditor.h:1.2
*** include_iviv-2_6/streditor.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/streditor.h Fri Jan 14 21:02:48 2000
***************
*** 50,55 ****
--- 50,57 ----
class TextDisplay;
class TextBuffer;
+ //: interactive editor for character strings (iv-2.6)
+ // <a href=../man3.1/StringEditor>man page</a>
class StringEditor : public Interactor {
public:
StringEditor(ButtonState*, const char* sample, const char* done = SEDone);
Index: include_iviv-2_6/subject.h
diff -c include_iviv-2_6/subject.h:1.1 include_iviv-2_6/subject.h:1.2
*** include_iviv-2_6/subject.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/subject.h Fri Jan 14 21:02:48 2000
***************
*** 36,41 ****
--- 36,43 ----
class Interactor;
class SubjectRep;
+ //: object with one or more views to notify when it changes (iv-2.6)
+ // <a href=../man3.1/Subject.html>man page</a>
class Subject : virtual public Resource {
public:
virtual ~Subject();
Index: include_iviv-2_6/textbuffer.h
diff -c include_iviv-2_6/textbuffer.h:1.1 include_iviv-2_6/textbuffer.h:1.2
*** include_iviv-2_6/textbuffer.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/textbuffer.h Fri Jan 14 21:02:48 2000
***************
*** 33,38 ****
--- 33,40 ----
class Regexp;
+ //: editable text buffer (iv-2.6)
+ // <a href=../man3.1/TextBuffer.html>man page</a>
class TextBuffer {
public:
TextBuffer(char* buffer, int length, int size);
Index: include_iviv-2_6/textdisplay.h
diff -c include_iviv-2_6/textdisplay.h:1.1 include_iviv-2_6/textdisplay.h:1.2
*** include_iviv-2_6/textdisplay.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/textdisplay.h Fri Jan 14 21:02:48 2000
***************
*** 43,48 ****
--- 43,50 ----
class Painter;
class Canvas;
+ //: basic text display (iv-2.6)
+ // <a href=../man3.1/TextDisplay.html>man page</a>
class TextDisplay {
public:
TextDisplay(boolean autosized = false);
Index: include_iviv-2_6/texteditor.h
diff -c include_iviv-2_6/texteditor.h:1.1 include_iviv-2_6/texteditor.h:1.2
*** include_iviv-2_6/texteditor.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/texteditor.h Fri Jan 14 21:02:48 2000
***************
*** 36,41 ****
--- 36,43 ----
class TextDisplay;
class TextBuffer;
+ //: basic interactive editor for mulit-line text (iv-2.6)
+ // <a href=../man3.1/TextEditor.html>man page</a>
class TextEditor : public Interactor {
public:
TextEditor(int rows, int cols, int tabsize, int highlight);
Index: include_iviv-2_6/tray.h
diff -c include_iviv-2_6/tray.h:1.1 include_iviv-2_6/tray.h:1.2
*** include_iviv-2_6/tray.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/tray.h Fri Jan 14 21:02:48 2000
***************
*** 50,55 ****
--- 50,57 ----
Shape* shape;
};
+ //: composes interactors into (possibly) overlapping layouts (iv-2.6)
+ // <a href=../man3.1/Tray.html>man page</a>
class Tray : public Scene {
public:
Tray(Interactor* background = nil);
Index: include_iviv-2_6/viewport.h
diff -c include_iviv-2_6/viewport.h:1.1 include_iviv-2_6/viewport.h:1.2
*** include_iviv-2_6/viewport.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/viewport.h Fri Jan 14 21:02:48 2000
***************
*** 36,41 ****
--- 36,47 ----
#include <IV-2_6/_enter.h>
+ //: Interactor that shows a portion of another Interactor (iv-2.6)
+ // A viewport contains another interactor. Unlike a MonoScene or Frame,
+ // a viewport always gives the interactor its desired shape. However,
+ // the interactor may not be entirely viewable through the viewport.
+ // The viewport's Perspective can be used to adjust what portion is visible.
+ // <p><a href=../man3.1/Viewport.html>man page</a>
class Viewport : public MonoScene {
public:
Viewport(Interactor* = nil, Alignment = Center);
Index: include_iviv-2_6/world.h
diff -c include_iviv-2_6/world.h:1.1 include_iviv-2_6/world.h:1.2
*** include_iviv-2_6/world.h:1.1 Fri Jan 14 21:02:48 2000
--- src/include/IV-2_6/InterViews/world.h Fri Jan 14 21:02:48 2000
***************
*** 39,44 ****
--- 39,46 ----
class Interactor;
class Sensor;
+ //: object representing a display (iv-2.6)
+ // <a href=../man3.1/World.html>man page</a>
class World {
protected:
World();
Index: include_interviews/regexp.h
diff -c include_interviews/regexp.h:1.1 include_interviews/regexp.h:1.2
*** include_interviews/regexp.h:1.1 Fri Jan 14 21:02:51 2000
--- src/include/InterViews/regexp.h Fri Jan 14 21:02:51 2000
***************
*** 58,63 ****
--- 58,65 ----
*/
#define REGEXP_MAGIC 0234
+ //: regular expression searching
+ // <a href=../man3.1/Regexp.html>man page</a>
class Regexp {
public:
Regexp(const char*);
Index: include_interviews/reqerr.h
diff -c include_interviews/reqerr.h:1.1 include_interviews/reqerr.h:1.2
*** include_interviews/reqerr.h:1.1 Fri Jan 14 21:02:51 2000
--- src/include/InterViews/reqerr.h Fri Jan 14 21:02:51 2000
***************
*** 33,38 ****
--- 33,40 ----
#include <InterViews/_enter.h>
+ //: Handling errors from window server.
+ // <a href=../man3.1/Reqerr.html>man page</a>
class ReqErr {
public:
unsigned long msgid;
Index: include_interviews/resource.h
diff -c include_interviews/resource.h:1.1 include_interviews/resource.h:1.2
*** include_interviews/resource.h:1.1 Fri Jan 14 21:02:51 2000
--- src/include/InterViews/resource.h Fri Jan 14 21:02:51 2000
***************
*** 31,36 ****
--- 31,38 ----
#include <InterViews/enter-scope.h>
+ //: shared reference-counted objects.
+ // <a href=../man3.1/Resource.html>Resource</a>
class Resource {
public:
Resource();
|
|
From: <ivt...@li...> - 2000-01-13 18:34:32
|
Patch: ivtools-000113-johnston-007
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- embed documentation to extract with PERCEPS that links the Brush,
Color, Font, and Pattern web pages to the InterViews 3.1 reference
manual and pspaint(3) man page.
- test and revise the src/html/README that describes how to gen a set
of ivtools html documentation.
Index: include_interviews/brush.h
diff -c include_interviews/brush.h:1.1 include_interviews/brush.h:1.2
*** include_interviews/brush.h:1.1 Thu Jan 13 22:24:37 2000
--- src/include/InterViews/brush.h Thu Jan 13 22:24:37 2000
***************
*** 38,43 ****
--- 38,46 ----
class BrushImpl;
class Display;
+ //: a brush style object
+ // defines the line thickness and line style for drawing operations.
+ // <p><a href=../refman3.1/refman.html#PAGE37>in reference manual</a>.
class Brush : public Resource {
public:
Brush(Coord width);
Index: include_interviews/color.h
diff -c include_interviews/color.h:1.1 include_interviews/color.h:1.2
*** include_interviews/color.h:1.1 Thu Jan 13 22:24:37 2000
--- src/include/InterViews/color.h Thu Jan 13 22:24:37 2000
***************
*** 38,43 ****
--- 38,47 ----
typedef float ColorIntensity;
typedef unsigned int ColorOp;
+ //: an RGB-alpha color object
+ // defines an output color, which is specified by a mix of RGB (red,<BR>
+ green, and blue) intensities, and an alpha value for blending
+ // <p><a href=../refman3.1/refman.html#PAGE38>in reference manual</a>.
class Color : public Resource {
public:
enum { Copy, Xor, Invisible };
Index: include_interviews/font.h
diff -c include_interviews/font.h:1.1 include_interviews/font.h:1.2
*** include_interviews/font.h:1.1 Thu Jan 13 22:24:37 2000
--- src/include/InterViews/font.h Thu Jan 13 22:24:37 2000
***************
*** 96,103 ****
inline Coord FontBoundingBox::font_ascent() const { return font_ascent_; }
inline Coord FontBoundingBox::font_descent() const { return font_descent_; }
! //: InterViews font class.
! // <a href=../refman3.1/refman.html#PAGE39>in reference manual</a>
class Font : public Resource {
public:
Font(const String&, float scale = 1.0);
--- 96,104 ----
inline Coord FontBoundingBox::font_ascent() const { return font_ascent_; }
inline Coord FontBoundingBox::font_descent() const { return font_descent_; }
! //: a font object
! // defines a mapping between character codes and their appearance on the screen.
! // <p><a href=../refman3.1/refman.html#PAGE39>in reference manual</a>
class Font : public Resource {
public:
Font(const String&, float scale = 1.0);
Index: include_interviews/pattern.h
diff -c include_interviews/pattern.h:1.1 include_interviews/pattern.h:1.2
*** include_interviews/pattern.h:1.1 Thu Jan 13 22:24:37 2000
--- src/include/InterViews/pattern.h Thu Jan 13 22:24:37 2000
***************
*** 35,40 ****
--- 35,43 ----
class PatternRep;
+ //: a pattern object
+ // defines a pattern for rendering operations
+ // <p><a href=../man3.1/pspaint3.html>pspaint(3)</a>.
class Pattern : public Resource {
public:
enum {
Index: man3_ivtools/pspaint.3
diff -c man3_ivtools/pspaint.3:1.1 man3_ivtools/pspaint.3:1.2
*** man3_ivtools/pspaint.3:1.1 Thu Jan 13 22:24:47 2000
--- src/man/man3/pspaint.3 Thu Jan 13 22:24:47 2000
***************
*** 117,120 ****
Return the array that defines the replicated pattern and its size, if
the pattern was constructed with one.
.SH SEE ALSO
! Brush(3I), Color(3I), Font(3I), Pattern(3I), idraw(1I)
--- 117,120 ----
Return the array that defines the replicated pattern and its size, if
the pattern was constructed with one.
.SH SEE ALSO
! idraw(1I), pspaint(3I), and the InterViews 3.1 reference manual
Index: html_ivtools/README
diff -c html_ivtools/README:1.1 html_ivtools/README:1.2
*** html_ivtools/README:1.1 Thu Jan 13 22:24:49 2000
--- src/html/README Thu Jan 13 22:24:49 2000
***************
*** 4,11 ****
1. Background
ivtools header files (.h files) include comments that can be extracted
! the PERCEPS, an automatic documentation generator for C++ written in
! Perl (http://friga.mer.utexas.edu/mark/perl/perceps/).
ivtools uses three techniques supported by PERCEPS for embedding
extractable comments:
--- 4,11 ----
1. Background
ivtools header files (.h files) include comments that can be extracted
! by PERCEPS, an automatic documentation generator for C++ written in
! Perl (http://starship.python.net/crew/tbryan/PERCEPS/).
ivtools uses three techniques supported by PERCEPS for embedding
extractable comments:
***************
*** 37,45 ****
ivtools, do the following:
2.1 Acquire and install a copy of PERCEPS, Version 3.4.1 or
! greater. Get it from the author's website:
! http://friga.mer.utexas.edu/mark/perl/perceps/
or from here:
--- 37,45 ----
ivtools, do the following:
2.1 Acquire and install a copy of PERCEPS, Version 3.4.1 or
! greater. Get it from the maintainers's website:
! http://starship.python.net/crew/tbryan/PERCEPS/
or from here:
***************
*** 50,61 ****
perl --version
! 2.3 Verify your copy of Perl is installed at /usr/local/bin/perl:
which perl
If it is not at that location, edit the first line of the
! perceps script in this directory to reflect the actual location.
2.4 Run the following commands to generate the html:
--- 50,62 ----
perl --version
! 2.3 Verify your copy of Perl is installed at /bin/perl:
which perl
If it is not at that location, edit the first line of the
! perceps script in this directory to reflect the actual
! location, or make a symbol link for.
2.4 Run the following commands to generate the html:
***************
*** 101,111 ****
Run the shell script getman31.sh from this directory.
Requires an installed and working copy of the ivtools utility
! ivdl.
4.2 HTML versions of InterViews 3.1 reference manual
Run the shell script getrefman31.sh from this directory.
Requires an installed and working copy of the ivtools utility
! ivdl.
--- 102,114 ----
Run the shell script getman31.sh from this directory.
Requires an installed and working copy of the ivtools utility
! ivdl. The script can be edited to use w3c or curl or any other
! command line URL grabber.
4.2 HTML versions of InterViews 3.1 reference manual
Run the shell script getrefman31.sh from this directory.
Requires an installed and working copy of the ivtools utility
! ivdl. The script can be edited to use w3c or curl or any other
! command line URL grabber.
|
|
From: <ivt...@li...> - 2000-01-10 23:43:18
|
Patch: ivtools-000111-johnston-006
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. 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 -s <ThisFile
Summary of Changes:
- "include" file touchups for NetBSD. *All* the problems are related
to finding the right include file for floating point constants
(i.e. the largest floating point value), and macros to test if a
floating point is equal to infinity or NAN. If anyone knows how to
POSIX this (and if POSIX'ing it won't break SUN4 support), please do.
I'll probably take care of this when I have to do it for the other
BSD's.
Index: TopoFace/topoelt.c
diff -c TopoFace/topoelt.c:1.1 TopoFace/topoelt.c:1.2
*** TopoFace/topoelt.c:1.1 Tue Jan 11 03:24:59 2000
--- src/TopoFace/topoelt.c Tue Jan 11 03:24:59 2000
***************
*** 22,33 ****
#include <TopoFace/topoelt.h>
- #if !defined(__CYGWIN__)
- #include <values.h>
- #else
#include <math.h>
#define MAXFLOAT HUGE_VAL
- #endif
/****************************************************************************/
--- 22,29 ----
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.3 ComTerp/comterp.c:1.4
*** ComTerp/comterp.c:1.3 Tue Jan 11 03:25:00 2000
--- src/ComTerp/comterp.c Tue Jan 11 03:25:00 2000
***************
*** 376,386 ****
return false;
} else {
offset--;
- if (curr.is_type(ComValue::BlankType)) {
- boolean status = skip_arg(topval, offset, tokcnt);
- tokcnt++;
- return status;
- }
tokcnt++;
if (curr.narg() || curr.nkey()) {
--- 376,381 ----
***************
*** 394,399 ****
--- 389,398 ----
if (subtokcnt) count++;
} else if (next.is_type(ComValue::CommandType) ||
next.is_type(ComValue::SymbolType)) {
+ skip_arg(topval, offset, subtokcnt);
+ tokcnt += subtokcnt;
+ } else if (next.is_type(ComValue::BlankType)) {
+ offset--;
skip_arg(topval, offset, subtokcnt);
tokcnt += subtokcnt;
} else {
Index: src_iv-2_6/rubrect.c
diff -c src_iv-2_6/rubrect.c:1.1 src_iv-2_6/rubrect.c:1.2
*** src_iv-2_6/rubrect.c:1.1 Tue Jan 11 03:25:03 2000
--- src/IV-2_6/rubrect.c Tue Jan 11 03:25:03 2000
***************
*** 35,41 ****
#if defined(__CYGWIN__)
#include <mingw32/float.h>
#else
! #include <values.h>
#endif
#endif
--- 35,42 ----
#if defined(__CYGWIN__)
#include <mingw32/float.h>
#else
! #include <math.h>
! #define MAXFLOAT HUGE_VAL
#endif
#endif
Index: src_x11/xwindow.c
diff -c src_x11/xwindow.c:1.1 src_x11/xwindow.c:1.2
*** src_x11/xwindow.c:1.1 Tue Jan 11 03:25:05 2000
--- src/IV-X11/xwindow.c Tue Jan 11 03:25:05 2000
***************
*** 62,68 ****
#include <stropts.h>
#include <sys/conf.h>
#endif
! #if !defined(__linux__) && !defined(__CYGWIN__)
/* no standard place for this */
extern "C" {
extern int ioctl(int, int, ...);
--- 62,68 ----
#include <stropts.h>
#include <sys/conf.h>
#endif
! #if !defined(__linux__) && !defined(__CYGWIN__) && !defined(__NetBSD__)
/* no standard place for this */
extern "C" {
extern int ioctl(int, int, ...);
Index: include_std/nan.h
diff -c include_std/nan.h:1.1 include_std/nan.h:1.2
*** include_std/nan.h:1.1 Tue Jan 11 03:25:27 2000
--- src/include/ivstd/nan.h Tue Jan 11 03:25:27 2000
***************
*** 3,9 ****
#if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2)
#include <bits/nan.h>
! #elif !defined(__CYGWIN__)
#include_next <nan.h>
#else
#include <math.h>
--- 3,9 ----
#if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2)
#include <bits/nan.h>
! #elif !defined(__CYGWIN__) && !defined(__NetBSD__)
#include_next <nan.h>
#else
#include <math.h>
|